1 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
2 Andrew Burgess <andrew.burgess@embecosm.com>
4 * linux-riscv-low.cc: New file.
5 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
6 and nat/riscv-linux-tdesc.c.
7 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
8 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
11 2020-02-14 Tom Tromey <tom@tromey.com>
13 * acinclude.m4: Don't include acx_configure_dir.m4.
14 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
15 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
16 (all, install-only, uninstall, clean-info, clean)
17 (maintainer-clean): Don't recurse.
18 (subdir_do, all-lib): Remove.
19 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
21 (generated_files): Update.
22 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
24 * configure.ac: Don't configure gnulib or libiberty.
27 2020-02-14 Eli Zaretskii <eliz@gnu.org>
29 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
30 preparing the command line for CreateProcess.
31 (win32_create_inferior): Reflect the program name in debugging
32 output that shows the process and its command line.
34 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
36 * Makefile.in: Rename source files from .c to .cc.
37 * %.c: Rename to %.cc.
38 * configure.ac: Rename server.c to server.cc.
39 * configure: Re-generate.
41 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
43 * Makefile.in: Rename gdbsupport source files from .c to .cc.
45 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
47 * win32-low.c (win32_create_inferior): Set signal_pid.
49 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
50 Pedro Alves <palves@redhat.com>
52 Skip building gdbserver in a cross-configuration.
53 * configure.srv: Set $gdbserver_host depending on whether $target
54 is $host. Use $gdbserver_host instead of $host.
56 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
58 * configure: Re-generate.
60 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
62 * configure: Re-generate.
64 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
66 * acinclude.m4: Update warning.m4 path.
68 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
70 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
71 (handle_exception): Set siginfo_er.
72 (win32_xfer_siginfo): New function.
74 2020-02-07 Tom Tromey <tom@tromey.com>
75 Pedro Alves <palves@redhat.com>
77 * README: Update build documentation.
78 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
80 * configure.ac: Update paths.
82 * acinclude.m4: Update paths.
83 * Makefile.in: Update include paths.
84 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
85 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
86 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
87 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
88 (%-generated.c): Update paths.
89 * Move entire directory from ../gdb/gdbserver.
91 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
93 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
95 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
97 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
98 assignment instead of srv_linux_obj.
100 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
102 * server.c (handle_qxfer_libraries): Write segment-address with
105 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
107 * Makefile.in (install-strip): New target.
108 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
109 * aclocal.m4: Regenerate.
110 * configure: Regenerate.
111 * configure.ac: Add AM_PROG_INSTALL_STRIP.
113 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
115 * Makefile.in (SFILES): Adjust paths to point to real files.
116 (OBS): Move waitstatus.o to target/waitstatus.o.
117 (TAGS): Transform paths appropriately.
119 (nat/%.o): ... this pattern rule.
121 (target/%.o): ... this pattern rule.
122 * configure.srv: Adjust paths throughout to include nat/ prefix
123 with the revant files.
124 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
125 * configure: Regenerate.
127 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
129 * Makefile.in (TAGS): Remove config files from the recipe.
131 2020-01-14 Tom Tromey <tom@tromey.com>
133 * configure: Rebuild.
134 * configure.ac: Remove any checks that were added to common.m4.
135 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
138 2020-01-14 Tom Tromey <tom@tromey.com>
140 * server.h: Include config.h.
141 * gdbreplay.c: Include config.h.
142 * configure: Rebuild.
143 * configure.ac: Don't source common.host.
144 * acinclude.m4: Update path.
145 * Makefile.in (INCSUPPORT): New variable.
146 (INCLUDE_CFLAGS): Add INCSUPPORT.
147 (SFILES): Update paths.
148 (version-generated.c): Update path to create-version.sh.
149 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
151 2020-01-14 Tom Tromey <tom@tromey.com>
153 * configure.ac (LIBS): Use WIN32APILIBS.
154 (USE_WIN32API): Don't define.
155 * configure: Rebuild.
157 2020-01-14 Tom Tromey <tom@tromey.com>
159 * configure: Rebuild.
161 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
163 * Makefile.in (%-generated.c): Remove rule for files from
166 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
168 * configure: Re-generate.
170 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
172 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
174 * tracepoint.c (stop_tracing, flush_trace_buffer,
175 about_to_request_buffer_space, get_trace_state_variable_value,
176 set_trace_state_variable_value, gdb_collect): Add declaration.
178 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
180 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
181 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
182 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
183 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
184 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
187 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
189 * inferiors.c: Include gdbsupport/common-inferior.h.
191 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
193 * hostio-errno.c: Include hostio.h.
195 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
197 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
200 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
202 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
203 * linux-arm-tdesc.h: Include arch/arm.h.
205 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
207 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
209 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
211 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
212 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
214 2020-01-10 Pedro Alves <palves@redhat.com>
216 * fork-child.c (post_fork_inferior): Pass target down to
218 * inferiors.c (switch_to_thread): Add process_stratum_target
220 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
221 * nto-low.c (nto_target_ops): Now a process_stratum_target.
222 * linux-low.c (linux_target_ops): Now a process_stratum_target.
223 * remote-utils.c (prepare_resume_reply): Pass the target to
225 * target.c (the_target): Now a process_stratum_target.
226 (done_accessing_memory): Pass the target to switch_to_thread.
227 (set_target_ops): Ajust to use process_stratum_target.
228 * target.h (struct target_ops): Rename to ...
229 (struct process_stratum_target): ... this.
230 (the_target, set_target_ops): Adjust.
231 (prepare_to_access_memory): Adjust comment.
232 * win32-low.c (child_xfer_memory): Adjust to use
233 process_stratum_target.
234 (win32_target_ops): Now a process_stratum_target.
236 2020-01-06 Eli Zaretskii <eliz@gnu.org>
237 Pedro Alves <palves@redhat.com>
239 * win32-low.c (get_child_debug_event): Extract the fatal exception
240 from the exit status and convert to the equivalent Posix signal
242 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
243 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
245 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
247 * Makefile.in: Use INSTALL_PROGRAM_ENV.
249 2020-01-01 Joel Brobecker <brobecker@adacore.com>
251 * server.c (gdbserver_version): Change copyright year to 2020.
252 * gdbreplay.c (gdbreplay_version): Likewise.
254 2019-12-19 Christian Biesinger <cbiesinger@google.com>
256 * configure: Regenerate.
257 * configure.ac: Quote variable arguments of test.
259 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
261 * Makefile.in: Fix build with GNU Make 3.81
263 2019-12-16 Tom Tromey <tromey@adacore.com>
265 * server.c (get_exec_file): Constify result.
267 2019-12-10 Christian Biesinger <cbiesinger@google.com>
269 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
270 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
271 * config.in: Regenerate.
272 * configure: Regenerate.
273 * configure.ac: Don't check for strerror.
274 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
275 Call safe_strerror instead of strerror.
276 * server.h (strerror): Remove this now-unnecessary declaration.
277 * tracepoint.c (init_named_socket): Call safe_strerror instead of
279 (gdb_agent_helper_thread): Likewise.
280 * utils.c (perror_with_name): Likewise.
282 2019-11-26 Tom Tromey <tom@tromey.com>
284 * configure, config.in: Rebuild.
286 2019-11-26 Tom Tromey <tom@tromey.com>
288 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
289 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
291 * configure, config.in: Rebuild.
293 2019-11-26 Tom Tromey <tom@tromey.com>
295 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
296 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
297 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
298 * acinclude.m4: Include ax_pthread.m4.
299 * config.in, configure: Rebuild.
301 2019-11-26 Christian Biesinger <cbiesinger@google.com>
303 * debug.c (debug_set_output): Call safe_strerror instead of
305 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
306 (linux_kill_one_lwp): Likewise.
307 (linux_detach_one_lwp): Likewise.
308 (linux_wait_for_event_filtered): Likewise.
309 (store_register): Likewise.
310 * lynx-low.c (lynx_attach): Likewise.
311 * mem-break.c (insert_memory_breakpoint): Likewise.
312 (remove_memory_breakpoint): Likewise.
313 (delete_fast_tracepoint_jump): Likewise.
314 (set_fast_tracepoint_jump): Likewise.
315 (uninsert_fast_tracepoint_jumps_at): Likewise.
316 (reinsert_fast_tracepoint_jumps_at): Likewise.
317 * nto-low.c (nto_xfer_memory): Likewise.
318 (nto_resume): Likewise.
320 2019-11-20 Luis Machado <luis.machado@linaro.org>
322 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
323 instead of register count.
324 * tdesc.c (tdesc_contains_feature): New function.
325 * tdesc.h (tdesc_contains_feature): New prototype.
327 2019-11-15 Christian Biesinger <cbiesinger@google.com>
329 * Makefile.in: Add safe-strerror.c.
330 * configure: Regenerate.
331 * configure.ac: Don't source common.host.
333 2019-11-15 Christian Biesinger <cbiesinger@google.com>
335 * config.in: Regenerate.
336 * configure: Regenerate.
338 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
340 * ax.c (ax_printf): Handle size_t_arg.
342 2019-11-06 Christian Biesinger <cbiesinger@google.com>
344 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
345 * mi/mi-main.c (output_cores): Likewise.
346 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
347 (linux_xfer_osdata_modules): Likewise.
348 * remote.c (register_remote_support_xml): Likewise.
349 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
350 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
352 2019-11-01 Christian Biesinger <cbiesinger@google.com>
354 * configure: Regenerate.
355 * configure.ac: Remove check for strerror_r.
357 2019-10-31 Christian Biesinger <cbiesinger@google.com>
359 * config.in: Regenerate.
360 * configure: Regenerate.
361 * configure.ac: Also check for strerror_r.
363 2019-10-31 Christian Biesinger <cbiesinger@google.com>
365 * ax.h (debug_agent): Remove duplicate declaration.
367 2019-10-26 Tom de Vries <tdevries@suse.de>
369 * linux-aarch64-low.c: Fix typos in comments.
370 * linux-arm-low.c: Same.
372 * linux-ppc-low.c: Same.
373 * proc-service.c: Same.
376 * tracepoint.c: Same.
379 2019-10-25 Tom Tromey <tromey@adacore.com>
381 * utils.c (xstrdup): Remove.
383 2019-10-23 Tom Tromey <tom@tromey.com>
385 * configure, config.in: Rebuild.
387 2019-10-23 Tom Tromey <tom@tromey.com>
389 * configure: Rebuild.
390 * acinclude.m4: Use m4_include, not sinclude.
392 2019-10-17 Tom Tromey <tromey@adacore.com>
394 * configure: Rebuild.
395 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
396 in AC_CONFIG_FILES invocation.
397 * Makefile.in (stamp-h, Makefile): Use new-style config.status
400 2019-10-16 Christian Biesinger <cbiesinger@google.com>
402 * server.c: Include xml-builtin.h.
403 (get_xml_features): Don't declare xml_builtins here.
405 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
407 * Makefile.in: Remove references to vec-ipa.o.
409 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
411 * Makefile.in: Remove references to vec.c.
413 2019-10-02 Christian Biesinger <cbiesinger@google.com>
415 * server.c (server_waiting): Change to bool.
416 (extended_protocol): Likewise.
417 (response_needed): Likewise.
418 (exit_requested): Likewise.
419 (run_once): Likewise.
420 (report_no_resumed): Likewise.
421 (non_stop): Likewise.
422 (disable_packet_vCont): Likewise.
423 (disable_packet_Tthread): Likewise.
424 (disable_packet_qC): Likewise.
425 (disable_packet_qfThreadInfo): Likewise.
426 (handle_general_set): Update.
427 (handle_detach): Update.
428 (handle_monitor_command): Update.
429 (handle_query): Update.
430 (captured_main): Update.
431 (process_serial_event): Update.
432 * server.h (server_waiting): Change to bool.
433 (disable_packet_vCont): Likewise.
434 (disable_packet_Tthread): Likewise.
435 (disable_packet_qC): Likewise.
436 (disable_packet_qfThreadInfo): Likewise.
437 (run_once): Likewise.
438 (non_stop): Likewise.
439 * target.c (target_stop_and_wait): Update.
441 2019-10-02 Tom Tromey <tromey@adacore.com>
443 * Makefile.in (SFILES): Add common-inferior.c.
444 (OBS): Add common-inferior.o.
445 * server.c (startup_with_shell): Don't define.
447 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
449 * linux-low.c (linux_low_read_btrace): Update for change to
452 2019-09-20 Christian Biesinger <cbiesinger@google.com>
454 * debug.c (debug_threads): Remove comment in favor of the header.
455 * debug.h (using_threads): Add declaration.
456 (debug_threads): Add comment.
457 * linux-aarch64-low.c: Include debug.h and remove declaration of
459 * nto-low.c: Likewise.
460 * remote-utils.c: Likewise.
461 * thread-db.c: Likewise.
463 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
465 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
466 and powerpc-cell64l-ipa.o.
467 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
468 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
469 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
472 * spu-low.c: Remove file.
474 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
475 (parse_spufs_run): Remove.
476 (ppc_get_pc): Remove Cell/B.E. support.
477 (ppc_set_pc): Likewise.
478 (ppc_breakpoint_at): Likewise.
479 (ppc_arch_setup): Likewise.
480 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
481 tdesc_powerpc_cell32l.
482 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
483 or init_registers_powerpc_cell32l.
484 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
485 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
486 or init_registers_powerpc_cell32l.
487 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
488 (init_registers_powerpc_cell32l): Remove prototype.
489 (init_registers_powerpc_cell64l): Likewise.
491 * target.h (struct target_ops): Remove qxfer_spu member.
492 * server.c (handle_qxfer_spu): Remove.
493 (qxfer_packets): Remove entry for "spu".
494 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
495 * linux-low.c (SPUFS_MAGIC): Remove.
496 (spu_enumerate_spu_ids): Remove.
497 (linux_qxfer_spu): Remove.
498 (linux_target_ops): Remove qxfer_spu member.
499 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
500 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
501 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
503 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
505 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
506 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
507 * config.in: Regenerate.
508 * configure: Regenerate.
510 2019-08-15 Tom Tromey <tromey@adacore.com>
512 * target.c (target_write_memory): Use gdb::byte_vector.
514 2019-08-15 Tom Tromey <tromey@adacore.com>
516 * tracepoint.c (write_inferior_data_pointer)
517 (write_inferior_integer, write_inferior_int8)
518 (write_inferior_uinteger, m_tracepoint_action_download)
519 (r_tracepoint_action_download, x_tracepoint_action_download)
520 (l_tracepoint_action_download, clear_inferior_trace_buffer)
521 (download_agent_expr, download_tracepoint_1)
522 (download_trace_state_variables, upload_fast_traceframes): Update.
523 * server.c (gdb_write_memory): Update.
524 * remote-utils.c (relocate_instruction): Update.
525 * proc-service.c (ps_pdwrite): Update.
526 * mem-break.c (remove_memory_breakpoint)
527 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
528 (uninsert_fast_tracepoint_jumps_at)
529 (reinsert_fast_tracepoint_jumps_at): Update.
530 * linux-x86-low.c (append_insns)
531 (i386_install_fast_tracepoint_jump_pad)
532 (amd64_write_goto_address, i386_write_goto_address): Update.
533 * linux-s390-low.c (append_insns, s390_write_goto_address):
535 * linux-ppc-low.c (ppc_relocate_instruction)
536 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
537 (ppc_write_goto_address): Update.
538 * linux-aarch64-low.c (append_insns): Update.
539 * target.h (struct target_ops): Update.
540 (write_inferior_memory): Don't declare.
541 * target.c (target_write_memory): Rename from
542 write_inferior_memory. Remove old target_write_memory.
544 2019-08-15 Tom Tromey <tromey@adacore.com>
546 * target.c (write_inferior_memory): Use std::vector.
548 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
551 * configure.ac: Drop enable-libmcheck support.
552 * configure, config.in: Rebuild.
553 * acinclude.m4: Don't include it.
555 2019-07-19 Alan Hayward <alan.hayward@arm.com>
557 * configure.srv: Remove Arm xml files.
559 2019-07-19 Alan Hayward <alan.hayward@arm.com>
561 * configure.srv: Add new files. Remove xml generated files.
562 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
564 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
565 * linux-aarch32-tdesc.c: New file.
566 * linux-aarch32-tdesc.h: New file.
567 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
568 * linux-arm-low.c (init_registers_arm, tdesc_arm)
569 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
570 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
571 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
572 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
573 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
574 (arm_read_description): Call arm_linux_read_description.
575 (initialize_low_arch): Don't init registers.
576 * linux-arm-tdesc.c: New file.
577 * linux-arm-tdesc.h: New file.
579 2019-07-10 Alan Hayward <alan.hayward@arm.com>
581 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
582 Move counter inside for.
583 (arm_read_description): Check ptrace earlier.
584 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
586 2019-07-09 Tom Tromey <tom@tromey.com>
588 * configure: Rebuild.
589 * configure.ac: Change common to gdbsupport.
590 * acinclude.m4: Change common to gdbsupport.
591 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
592 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
593 common to gdbsupport.
594 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
595 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
596 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
597 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
598 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
599 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
600 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
601 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
602 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
603 common to gdbsupport.
605 2019-07-04 Alan Hayward <alan.hayward@arm.com>
607 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
609 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
611 2019-07-04 Alan Hayward <alan.hayward@arm.com>
613 * configure.srv: Remove legacy xml.
614 * linux-aarch64-low.c (initialize_low_arch): Remove
615 initialize_low_tdesc call.
616 * linux-aarch64-tdesc-selftest.c: Remove file.
617 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
618 * linux-x86-low.c (initialize_low_arch): Remove
619 initialize_low_tdesc call.
620 * linux-x86-tdesc-selftest.c: Remove file.
621 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
623 2019-06-20 Tom de Vries <tdevries@suse.de>
625 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
626 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
628 2019-06-19 Tom de Vries <tdevries@suse.de>
630 * debug.h (debug_write): Change return type to ssize_t.
631 * debug.c (debug_write): Same.
633 2019-06-14 Tom Tromey <tom@tromey.com>
635 * configure.ac: Use new path to gnulib.
636 * configure: Rebuild.
637 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
640 2019-06-11 Tom Tromey <tom@tromey.com>
642 * Makefile.in (SFILES): Add alloc.c.
644 (IPA_OBJS): Add alloc-ipa.o.
645 (alloc-ipa.o): New target.
646 (%.o: ../%.c): New pattern rule.
648 2019-06-10 Tom Tromey <tromey@adacore.com>
650 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
651 end warning with a newline.
652 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
654 * thread-db.c (attach_thread): Don't end warning with a newline.
655 (thread_db_notice_clone): Likewise.
656 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
658 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
659 end warning with a newline.
661 2019-06-04 Pedro Alves <palves@redhat.com>
663 * server.c (captured_main): Use make_unique_xstrdup.
665 2019-06-02 Tom Tromey <tom@tromey.com>
667 * gdbreplay.c (fromhex): Remove.
668 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
670 2019-05-29 Tom Tromey <tromey@adacore.com>
672 * configure: Rebuild.
674 2019-05-06 Kevin Buettner <kevinb@redhat.com>
676 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
677 sign extension code on 32-bit builds.
679 2019-05-03 Eli Zaretskii <eliz@gnu.org>
682 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
684 2019-04-19 Tom Tromey <tom@tromey.com>
686 * server.c (struct vstop_notif): Derive from notif_event.
688 (queue_stop_reply): Update.
689 (remove_all_on_match_ptid): Change type. Rewrite.
690 (discard_queued_stop_replies): Rewrite.
691 (in_queued_stop_replies_ptid): Change type.
692 (in_queued_stop_replies): Rewrite.
693 (notif_stop): Update.
694 (queue_stop_reply_callback): Update.
695 (captured_main): Don't call initialize_notif.
696 (push_stop_notification): Update.
697 * notif.c (notif_write_event, handle_notif_ack)
698 (notif_event_enque, notif_push): Update.
699 (notif_event_xfree, initialize_notif): Remove.
700 * notif.h (struct notif_event): Include <list>, not
702 (struct notif_server) <queue>: Now a std::list.
703 (notif_event_p): Remove typedef.
704 (initialize_notif): Don't declare.
705 (struct notif_event): Add virtual destructor.
707 2019-04-17 Alan Hayward <alan.hayward@arm.com>
709 * ax.c (ax_vdebug): Call debug_printf.
710 * debug.c (debug_write): New function.
711 * debug.h (debug_write): New declaration.
712 * linux-low.c (sigchld_handler): Call debug_write.
714 2019-04-17 Alan Hayward <alan.hayward@arm.com>
716 * debug.c (debug_set_output): New function.
717 (debug_vprintf): Send output to debug_file.
718 (debug_flush): Likewise.
719 * debug.h (debug_set_output): New declaration.
720 * server.c (handle_monitor_command): Add debug-file option.
721 (captured_main): Likewise.
723 2019-04-17 Alan Hayward <alan.hayward@arm.com>
725 * debug.c (remote_debug): Add definition.
726 * debug.h (remote_debug): Add declaration.
727 * hostio.c (remote_debug): Remove declaration.
728 * remote-utils.c (struct ui_file): Likewise.
729 (remote_debug): Likewise.
730 * remote-utils.h (remote_debug): Likewise,
731 * server.c (remote_debug): Remove definition.
733 2019-04-10 Kevin Buettner <kevinb@redhat.com>
735 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
736 when using a 64-bit gdbserver.
738 2019-04-09 Tom Tromey <tromey@adacore.com>
740 * linux-low.c (select_event_lwp): Use find_thread_in_random.
742 2019-04-08 Tom Tromey <tom@tromey.com>
744 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
746 (linux_resume_one_lwp): Likewise.
748 2019-04-08 Tom Tromey <tom@tromey.com>
750 * gdbreplay.c: Update.
751 * linux-low.c: Update.
754 2019-04-08 Tom Tromey <tom@tromey.com>
756 * server.c: Use C++ exception handling.
757 * linux-low.c: Use C++ exception handling.
758 * gdbreplay.c: Use C++ exception handling.
760 2019-04-08 Tom Tromey <tom@tromey.com>
762 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
763 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
764 (captured_main, main): Update.
765 * gdbreplay.c (main): Update.
767 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
769 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
770 value in argument pointer, return 1 if the entry is found and 0
771 otherwise. Move comment.
772 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
773 * linux-low.h (linux_get_auxv): Declare.
774 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
776 2019-04-05 Tom Tromey <tromey@adacore.com>
778 * server.c (gdbserver_usage): Use upper-case for metasyntactic
781 2019-03-28 Alan Hayward <alan.hayward@arm.com>
783 * linux-low.c (AT_HWCAP2): Add define if not already included.
785 2019-03-26 Alan Hayward <alan.hayward@arm.com>
787 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
788 (aarch64_arch_setup): Call linux_get_hwcap.
789 * linux-arm-low.c (arm_get_hwcap): Remove function.
790 (arm_read_description): Call linux_get_hwcap.
791 * linux-low.c (linux_get_auxv): New function.
792 (linux_get_hwcap): Likewise.
793 (linux_get_hwcap2): Likewise.
794 * linux-low.h (linux_get_hwcap): New declaration.
795 (linux_get_hwcap2): Likewise.
796 * linux-ppc-low.c (ppc_get_auxv): Remove function.
797 (ppc_arch_setup): Call linux_get_hwcap.
798 * linux-s390-low.c (s390_get_hwcap): Remove function.
799 (s390_arch_setup): Call linux_get_hwcap.
801 2019-03-22 Alan Hayward <alan.hayward@arm.com>
802 Jiong Wang <jiong.wang@arm.com>
804 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
805 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
807 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
809 2019-03-22 Alan Hayward <alan.hayward@arm.com>
810 Jiong Wang <jiong.wang@arm.com>
812 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
813 (aarch64_get_hwcap): New function.
814 (aarch64_arch_setup): Read APIA hwcap.
816 2019-03-22 Alan Hayward <alan.hayward@arm.com>
817 Jiong Wang <jiong.wang@arm.com>
819 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
820 (initialize_low_tracepoint): Likewise.
821 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
822 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
823 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
824 (aarch64_linux_read_description): Likewise.
825 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
827 2019-03-12 John Baldwin <jhb@FreeBSD.org>
829 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
830 i386_create_target_description for 'segments' parameter.
831 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
832 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
833 * win32-i386-low.c (i386_arch_setup): Likewise.
835 2019-03-12 Tom Tromey <tromey@adacore.com>
837 * linux-low.c (iterate_over_lwps): Update.
839 2019-03-06 Tom Tromey <tom@tromey.com>
841 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
842 (captured_main): Use SCOPE_EXIT.
844 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
846 * configure.srv: Use '$enable_unittest' instead of '$development'
847 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
850 2019-02-27 Tom Tromey <tromey@adacore.com>
852 * gdbreplay.c (logchar): Handle \r\n.
854 2019-02-07 Alan Hayward <alan.hayward@arm.com>
856 * linux-low.c (linux_attach): Add process before lwp.
857 * server.c (attach_inferior): Check if already attached.
859 2019-02-07 Tom Tromey <tom@tromey.com>
861 * x86-tdesc.h: Rename include guard.
862 * x86-low.h: Add include guard.
863 * wincecompat.h: Rename include guard.
864 * win32-low.h: Add include guard.
865 * utils.h: Rename include guard.
866 * tracepoint.h: Rename include guard.
867 * tdesc.h: Rename include guard.
868 * target.h: Rename include guard.
869 * server.h: Rename include guard.
870 * remote-utils.h: Rename include guard.
871 * regcache.h: Rename include guard.
872 * nto-low.h: Rename include guard.
873 * notif.h: Add include guard.
874 * mem-break.h: Rename include guard.
875 * lynx-low.h: Add include guard.
876 * linux-x86-tdesc.h: Add include guard.
877 * linux-s390-tdesc.h: Add include guard.
878 * linux-ppc-tdesc-init.h: Add include guard.
879 * linux-low.h: Add include guard.
880 * linux-aarch64-tdesc.h: Add include guard.
881 * linux-aarch32-low.h: Add include guard.
882 * inferiors.h: Rename include guard.
883 * i387-fp.h: Rename include guard.
884 * hostio.h: Rename include guard.
885 * gdbthread.h: Rename include guard.
886 * gdb_proc_service.h: Rename include guard.
887 * event-loop.h: Rename include guard.
888 * dll.h: Rename include guard.
889 * debug.h: Rename include guard.
890 * ax.h: Rename include guard.
892 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
895 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
896 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
898 2019-01-25 Tom Tromey <tom@tromey.com>
900 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
902 2019-01-25 Tom Tromey <tom@tromey.com>
904 * win32-low.c: Fix common/ includes.
905 * win32-i386-low.c: Fix common/ includes.
906 * tracepoint.c: Fix common/ includes.
907 * thread-db.c: Fix common/ includes.
908 * target.h: Fix common/ includes.
909 * symbol.c: Fix common/ includes.
910 * spu-low.c: Fix common/ includes.
911 * server.h: Fix common/ includes.
912 * server.c: Fix common/ includes.
913 * remote-utils.c: Fix common/ includes.
914 * regcache.h: Fix common/ includes.
915 * regcache.c: Fix common/ includes.
916 * nto-x86-low.c: Fix common/ includes.
917 * notif.h: Fix common/ includes.
918 * mem-break.h: Fix common/ includes.
919 * lynx-low.c: Fix common/ includes.
920 * lynx-i386-low.c: Fix common/ includes.
921 * linux-x86-tdesc-selftest.c: Fix common/ includes.
922 * linux-x86-low.c: Fix common/ includes.
923 * linux-low.c: Fix common/ includes.
924 * inferiors.h: Fix common/ includes.
925 * i387-fp.c: Fix common/ includes.
926 * hostio.c: Fix common/ includes.
927 * hostio-errno.c: Fix common/ includes.
928 * gdbthread.h: Fix common/ includes.
929 * gdbreplay.c: Fix common/ includes.
930 * fork-child.c: Fix common/ includes.
931 * event-loop.c: Fix common/ includes.
933 (enum gdb_agent_op): Fix common/ includes.
935 2019-01-21 Tom Tromey <tom@tromey.com>
937 * tracepoint.c: Fix includes.
938 * remote-utils.c: Fix includes.
939 * linux-x86-low.c: Fix includes.
941 2019-01-01 Joel Brobecker <brobecker@adacore.com>
943 * gdbreplay.c (gdbreplay_version): Update copyright year in
945 * server.c (gdbserver_version): Likewise.
947 2018-12-05 Alan Hayward <alan.hayward@arm.com>
949 * linux-low.c (add_lwp): Switch ordering.
951 2018-11-29 Tom Tromey <tom@tromey.com>
953 * win32-low.c (win32_join): Take pid, not process.
954 * target.h (struct target_ops) <join>: Change argument type.
955 (join_inferior): Change argument name.
956 * spu-low.c (spu_join): Take pid, not process.
957 * server.c (handle_detach): Preserve pid before destroying
959 * lynx-low.c (lynx_join): Take pid, not process.
960 * linux-low.c (linux_join): Take pid, not process.
962 2018-11-23 Alan Hayward <alan.hayward@arm.com>
964 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
965 (aarch64_cannot_fetch_register): Likewise.
966 (struct linux_target_ops): Update references.
968 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
970 * linux-ppc-low.c: Include nat/linux-ptrace.h.
972 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
974 * configure.srv (ipa_ppc_linux_regobj): Add
975 powerpc-isa207-htm-vsx32l-ipa.o and
976 powerpc-isa207-htm-vsx64l-ipa.o.
977 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
978 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
979 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
980 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
981 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
982 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
983 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
984 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
985 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
986 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
987 (init_registers_powerpc_isa207_htm_vsx32l)
988 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
989 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
990 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
991 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
992 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
993 (ppc_store_tm_ctarregset): New functions.
994 (ppc_regsets): Add entries for HTM regsets.
995 (ppc_arch_setup): Set htm in features struct when needed. Set
996 sizes for the HTM regsets.
997 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
998 (initialize_low_arch): Call
999 init_registers_powerpc_isa207_htm_vsx32l and
1000 init_registers_powerpc_isa207_htm_vsx64l.
1001 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1002 PPC_TDESC_ISA207_HTM_VSX.
1003 (initialize_low_tracepoint): Call
1004 init_registers_powerpc_isa207_htm_vsx32l and
1005 init_registers_powerpc_isa207_htm_vsx64l.
1007 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1009 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1010 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1011 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1012 (ppc_store_pmuregset): New functions.
1013 (ppc_regsets): Add entries for ebb and pmu regsets.
1014 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1015 pmu regsets are available. Set sizes for these regsets.
1017 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1019 * configure.srv (ipa_ppc_linux_regobj): Add
1020 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1021 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1022 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1023 rs6000/powerpc-isa207-vsx32l.xml, and
1024 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1025 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1026 <PPC_TDESC_ISA207_VSX>: New enum value.
1027 (init_registers_powerpc_isa207_vsx32l): Declare.
1028 (init_registers_powerpc_isa207_vsx64l): Declare.
1029 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1030 (ppc_store_tarregset): New function.
1031 (ppc_regsets): Add entry for the TAR regset.
1032 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1033 size for the TAR regsets.
1034 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1035 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1036 and init_registers_powerpc_isa207_vsx64l.
1037 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1038 (initialize_low_tracepoint): Call
1039 init_registers_powerpc_isa207_vsx32l and
1040 init_registers_powerpc_isa207_vsx64l.
1042 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1043 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1045 * configure.srv (ipa_ppc_linux_regobj): Add
1046 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1047 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1048 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1049 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1050 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1051 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1052 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1053 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1054 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1055 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1056 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1057 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1058 (ppc_hwcap): Add comment.
1059 (ppc_hwcap2): New global.
1060 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1061 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1062 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1063 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1064 when needed. Set sizes for the the DSCR and PPR regsets.
1065 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1066 (initialize_low_arch): Call
1067 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1068 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1069 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1070 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1071 (initialize_low_tracepoint): Call
1072 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1073 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1075 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1077 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1079 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1080 Simon Marchi <simark@simark.ca>
1082 * acinclude.m4: Include "../selftest.m4".
1083 * configure: Regenerate.
1084 * configure.ac: Use "GDB_AC_SELFTEST".
1085 * configure.srv: Use "$enable_unittests" instead of
1086 "$development" when checking whether unit tests have been
1088 * server.c (captured_main): Update message informing that
1089 selftests have been disabled.
1091 2018-10-04 Tom Tromey <tom@tromey.com>
1093 * configure: Rebuild.
1095 2018-10-04 Tom Tromey <tom@tromey.com>
1097 * server.c (handle_status): Rename inner "thread".
1098 (process_serial_event): Declare "res" in 'm' case.
1099 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1100 (iterate_over_lwps): Rename inner "thread".
1101 (linux_qxfer_libraries_svr4): Rename inner "len".
1102 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1104 2018-10-01 Gary Benson <gbenson@redhat.com>
1106 * gdb_proc_service.h: Moved common code to
1107 common/gdb_proc_service.h.
1109 2018-10-01 Gary Benson <gbenson@redhat.com>
1111 * gdb_proc_service.h: Synchronize comments and whitespace with
1112 GDB's version of this file.
1114 2018-09-25 Tom Tromey <tom@tromey.com>
1116 * configure: Rebuild.
1117 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1119 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1121 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1122 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1123 ($(IPA_LIB)): Sort IPA_OBJS.
1125 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1127 * Makefile.in: Remove references to $(ADD_DEPS).
1129 2018-09-16 Tom Tromey <tom@tromey.com>
1131 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1133 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1136 2018-09-05 Tom Tromey <tom@tromey.com>
1138 * configure: Rebuild.
1140 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1143 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1145 2018-08-27 Tom Tromey <tom@tromey.com>
1148 * configure: Rebuild.
1150 2018-08-27 Tom Tromey <tom@tromey.com>
1152 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1153 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1154 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1155 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1156 (s390x_emit_stack_adjust): Add casts to unsigned char.
1158 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1162 * server.h (struct client_state) <disable_randomization>:
1165 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1167 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1169 (mips_supply_ptrace_register): Likewise.
1171 2018-07-22 Tom Tromey <tom@tromey.com>
1173 * configure: Rebuild.
1175 2018-07-22 Tom Tromey <tom@tromey.com>
1177 * win32-low.c (win32_create_inferior): Remove unused variables.
1178 * gdbreplay.c (remote_open): Remove unused variable.
1179 * remote-utils.c (remote_prepare): Remove unused variable.
1180 * x86-tdesc.h (X86_TDESC_H): Define.
1181 (amd64_expedite_regs): Define conditionally.
1182 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1183 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1184 * remote-utils.c (readchar): Remove unused variable.
1186 2018-07-13 Pedro Alves <palves@redhat.com>
1188 * linux-low.c (linux_kill): Change parameter to process_info
1189 pointer instead of pid. Adjust.
1190 * lynx-low.c (lynx_kill): Likewise.
1191 * nto-low.c (nto_kill): Likewise.
1192 * spu-low.c (spu_kill): Likewise.
1193 * win32-low.c (win32_kill): Likewise.
1194 * server.c (handle_v_kill, kill_inferior_callback)
1195 (detach_or_kill_for_exit): Adjust.
1196 * target.c (kill_inferior): Change parameter to process_info
1197 pointer instead of pid. Adjust.
1198 * target.h (struct target_ops) <kill>: Change parameter to
1199 process_info pointer instead of pid. Adjust all implementations
1201 (kill_inferior): Likewise.
1203 2018-07-13 Pedro Alves <palves@redhat.com>
1205 * linux-low.c (linux_detach, linux_join): Change parameter to
1206 process_info pointer instead of pid. Adjust.
1207 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1208 * nto-low.c (nto_detach): Likewise.
1209 * spu-low.c (spu_detach, spu_join): Likewise.
1210 * win32-low.c (win32_detach, win32_join): Likewise.
1211 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1212 * target.h (struct target_ops) <detach, join>: Change parameter to
1213 process_info pointer instead of pid. Adjust all implementations
1215 (detach_inferior, join_inferior): Rename 'pid' parameter to
1218 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1219 Jan Kratochvil <jan.kratochvil@redhat.com>
1220 Paul Fertser <fercerpav@gmail.com>
1221 Tsutomu Seki <sekiriki@gmail.com>
1223 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1224 (OBS): Add 'common/netstuff.o'.
1225 (GDBREPLAY_OBS): Likewise.
1226 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1227 (remote_open): Implement support for IPv6
1229 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1231 (handle_accept_event): Accept connections from IPv6 sources.
1232 (remote_prepare): Handle IPv6-style hostnames; implement
1233 support for IPv6 connections.
1234 (remote_open): Implement support for printing connections from
1237 2018-07-11 Pedro Alves <palves@redhat.com>
1240 * mem-break.c (any_persistent_commands): Add process_info
1241 parameter and use it instead of relying on the current process.
1242 Change return type to bool.
1243 * mem-break.h (any_persistent_commands): Add process_info
1244 parameter and change return type to bool.
1245 * server.c (handle_detach): Remove require_running_or_return call.
1246 Look up the process_info for the process we're about to detach.
1247 If not found, return back error to GDB. Adjust
1248 any_persistent_commands call to pass down a process pointer.
1250 2018-07-11 Pedro Alves <palves@redhat.com>
1252 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1253 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1254 instead of collect_register_by_name.
1255 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1256 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1258 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1259 Pedro Alves <palves@redhat.com>
1261 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1263 2018-07-03 Tom Tromey <tom@tromey.com>
1265 * linux-low.c: Update.
1266 * lynx-low.c: Update.
1267 * mem-break.c: Update.
1268 * nto-low.c: Update.
1269 * remote-utils.c: Update.
1271 * spu-low.c: Update.
1273 * win32-low.c: Update.
1275 2018-07-03 Tom Tromey <tom@tromey.com>
1279 2018-07-03 Tom Tromey <tom@tromey.com>
1281 * linux-low.c: Update.
1283 2018-07-03 Tom Tromey <tom@tromey.com>
1287 2018-07-03 Tom Tromey <tom@tromey.com>
1289 * linux-low.c: Update.
1290 * linux-mips-low.c: Update.
1291 * lynx-low.c: Update.
1292 * nto-low.c: Update.
1293 * remote-utils.c: Update.
1295 * spu-low.c: Update.
1297 * thread-db.c: Update.
1299 2018-07-03 Tom Tromey <tom@tromey.com>
1301 * linux-low.c: Update.
1302 * linux-mips-low.c: Update.
1303 * lynx-low.c: Update.
1304 * mem-break.c: Update.
1305 * nto-low.c: Update.
1306 * remote-utils.c: Update.
1308 * spu-low.c: Update.
1310 * tracepoint.c: Update.
1312 2018-07-03 Tom Tromey <tom@tromey.com>
1314 * linux-low.c: Update.
1315 * linux-ppc-low.c: Update.
1316 * linux-x86-low.c: Update.
1317 * proc-service.c: Update.
1319 * spu-low.c: Update.
1320 * thread-db.c: Update.
1321 * win32-low.c: Update.
1323 2018-07-03 Tom Tromey <tom@tromey.com>
1325 * linux-low.c: Update.
1326 * lynx-low.c: Update.
1327 * nto-low.c: Update.
1328 * remote-utils.c: Update.
1329 * spu-low.c: Update.
1330 * thread-db.c: Update.
1331 * win32-low.c: Update.
1333 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1335 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1336 parameter in call to 'amd64_create_target_description'.
1338 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1340 * x86-tdesc.h: Remove executable permission flag.
1342 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1344 * configure.ac: Remove AC_PREREQ, add missing quoting.
1345 * configure: Re-generate.
1346 * config.in: Re-generate.
1347 * aclocal.m4: Re-generate.
1349 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1351 * tracepoint.h (current_traceframe): Remove declaration.
1353 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1355 * linux-aarch64-low.c (is_sve_tdesc): New function.
1356 (aarch64_sve_regs_copy_to_regcache): Likewise.
1357 (aarch64_sve_regs_copy_from_regcache): Likewise.
1358 (aarch64_regs_info): Add SVE checks.
1359 (initialize_low_arch): Initialize SVE.
1361 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1363 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1365 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1367 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1368 (initialize_low_tracepoint): Likewise
1369 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1370 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1372 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1374 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1376 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1378 * server.h (PBUFSIZ): Increase size
1380 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1382 * regcache.c (regcache::raw_compare): New function.
1383 * regcache.h (regcache::raw_compare): New declaration.
1385 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1387 * regcache.c (new_register_cache): Use new.
1388 (free_register_cache): Use delete.
1389 (register_data): Use const.
1390 (supply_register): Move body inside regcache.
1391 (regcache::raw_supply): New override function.
1392 (collect_register): Move body inside regcache.
1393 (regcache::raw_collect): New override function.
1394 (regcache::get_register_status): New override function.
1395 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1397 2018-06-09 Tom Tromey <tom@tromey.com>
1399 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1401 (event_queue): Use std::queue.
1402 (gdb_event_xfree): Remove.
1403 (initialize_event_loop, process_event, wait_for_event): Update.
1405 2018-06-08 Stan Cox <scox@redhat.com>
1407 * win32-low.c (win32_create_inferior): last_ptid and last_status
1408 moved to client_state.
1410 2018-06-08 Pedro Alves <palves@redhat.com>
1412 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1413 common/common-exceptions.o, common/common-utils.o,
1414 common/errors.o, common/print-utils.o and utils.o.
1415 * gdbreplay.c: Include "common-defs.h" instead of the two
1416 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1417 string.h or alloca.h.
1418 (perror_with_name): Delete.
1419 (remote_open): Use xstrdup instead of strdup.
1420 (main): Rename to ...
1421 (captured_main): ... this.
1424 2018-06-08 Tom Tromey <tom@tromey.com>
1426 * linux-low.c (linux_low_read_btrace): Update.
1428 2018-06-04 Stan Cox <scox@redhat.com>
1430 * server.h (struct client_state): New.
1431 * server.c (cont_thread, general_thread, multi_process)
1432 (report_fork_events, report_vfork_events, report_exec_events)
1433 (report_thread_events, swbreak_feature, hwbreak_feature)
1434 (vCont_supported, disable_randomization, pass_signals)
1435 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1436 Moved to client_state.
1437 * remote-utils.c (remote_debug, noack_mode)
1438 (transport_is_reliable): Moved to client_state.
1439 * tracepoint.c (current_traceframe): Moved to client_state.
1442 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1443 linux-low.c, remote-utils.h, target.c: Use client_state.
1445 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1447 * configure.srv: Add new c/h file.
1449 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1451 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1454 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1456 * gdb.arch/mips-fpregset-core.exp: New test.
1457 * gdb.arch/mips-fpregset-core.c: New test source.
1459 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1462 * hostio.c (require_int): Do not report overflow for integers
1463 between 0xfffffff and 0x7fffffff.
1465 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1467 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1468 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1469 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1471 (the_low_target): Wire them.
1473 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1475 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1476 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1477 mode. Call collect_register_by_name with vscr using
1478 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1479 (ppc_store_vrregset): Add and set vscr_offset variable as in
1480 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1483 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1485 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1486 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1487 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1489 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1491 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1492 (ppc_store_vsxregset): Likewise.
1493 (ppc_fill_vrregset): Likewise.
1494 (ppc_store_vrregset): Likewise.
1495 (ppc_fill_evrregset): Likewise.
1496 (ppc_store_evrregset): Likewise.
1497 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1498 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1501 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1503 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1504 wordsize of the inferior. Call ppc_linux_target_wordsize.
1506 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1508 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1509 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1510 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1511 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1512 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1513 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1514 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1515 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1516 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1517 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1518 (tdesc_powerpc_e500l): Remove.
1519 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1520 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1521 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1522 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1524 (ppc_arch_setup): Remove target description matching code. Fill a
1525 ppc_linux_features struct and call ppc_linux_match_description
1528 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1530 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1531 width of the requested register exceeds the width of the
1533 (mips_cannot_store_register): Likewise.
1535 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1537 * linux-mips-low.c (mips_fetch_register): New function. Update
1539 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1540 (the_low_target): Wire `mips_fetch_register'.
1542 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1544 * lynx-i386-low.c (LYNXOS_178): New macro.
1545 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1546 the layout on LynxOS-178.
1547 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1548 handle floating point registers that are not supported by
1551 2018-05-10 Tom Tromey <tom@tromey.com>
1553 * configure: Rebuild.
1555 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1558 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1559 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1560 Use it to set the expedite_regs field in the given tdesc.
1561 * x86-tdesc.h: New file.
1562 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1563 Adjust following the addition of the new expedite_regs parameter
1564 to init_target_desc.
1565 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1566 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1567 (i386_linux_read_description, amd64_linux_read_description):
1568 Adjust following the addition of the new expedite_regs parameter
1569 to init_target_desc.
1570 * lynx-i386-low.c: #include "x86-tdesc.h".
1571 (lynx_i386_arch_setup): Adjust following the addition of the new
1572 expedite_regs parameter to init_target_desc.
1573 * nto-x86-low.c: #include "x86-tdesc.h".
1574 (nto_x86_arch_setup): Adjust following the addition of the new
1575 expedite_regs parameter to init_target_desc.
1576 * win32-i386-low.c: #include "x86-tdesc.h".
1577 (i386_arch_setup): Adjust following the addition of the new
1578 expedite_regs parameter to init_target_desc.
1580 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1583 * win32-low.c (win32_create_inferior): Add call to my_wait
1584 setting last_status global.
1586 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1589 * win32-low.c (create_process): Only call gdb_tilde_expand if
1590 inferior_cwd is not NULL.
1592 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1594 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1595 registers to the cache if their values have changed.
1596 (i387_xsave_to_cache): Provide default values for x87 control
1597 registers when these features are available, but disabled.
1598 * regcache.c (supply_register_by_name_zeroed): New function.
1599 * regcache.h (supply_register_by_name_zeroed): Declare new
1602 2018-05-07 Tom Tromey <tom@tromey.com>
1604 * configure: Rebuild.
1606 2018-05-04 Tom Tromey <tom@tromey.com>
1608 * configure: Rebuild.
1610 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1611 Pedro Alves <palves@redhat.com>
1613 * linux-aarch64-low.c (aarch64_stopped_data_address):
1616 2018-04-27 Tom Tromey <tom@tromey.com>
1618 * configure: Rebuild.
1620 2018-04-23 Tom Tromey <tom@tromey.com>
1622 * configure: Rebuild.
1624 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1626 * Makefile.in (depcomp): Add "..".
1627 (all_deps_files): New and use it.
1629 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1631 * configure.srv (aarch64*-*-linux*): Don't include xml.
1632 (i[34567]86-*-cygwin*): Likewise.
1633 (i[34567]86-*-linux*): Likewise.
1634 (i[34567]86-*-lynxos*): Likewise.
1635 (i[34567]86-*-mingw32ce*): Likewise.
1636 (i[34567]86-*-mingw*): Likewise.
1637 (i[34567]86-*-nto*): Likewise.
1638 (tic6x-*-uclinux): Likewise.
1639 (x86_64-*-linux*): Likewise.
1640 (x86_64-*-mingw*): Likewise.
1641 (x86_64-*-cygwin*): Likewise.
1643 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1645 * tdesc.c: Remove xml parameter.
1647 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1649 * server.c (get_features_xml): Remove cast.
1650 * tdesc.c (void target_desc::accept): Fill in function.
1651 (tdesc_get_features_xml): Remove old xml creation.
1652 (print_xml_feature::visit_pre): Add xml vistor.
1653 * tdesc.h (struct target_desc): Make xmltarget mutable.
1654 (tdesc_get_features_xml): Remove declaration.
1656 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1658 * tdesc.c (tdesc_architecture_name): Add new function.
1659 (tdesc_osabi_name): Likewise.
1660 (tdesc_get_features_xml): Use new functions.
1662 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1664 * tdesc.c (tdesc_create_flags): Remove.
1665 (tdesc_add_flag): Likewise.
1666 (tdesc_named_type): Likewise.
1667 (tdesc_create_union): Likewise.
1668 (tdesc_create_struct): Likewise.
1669 (tdesc_create_vector): Likewise.
1670 (tdesc_add_bitfield): Likewise.
1671 (tdesc_add_field): Likewise.
1672 (tdesc_set_struct_size): Likewise.
1674 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1676 * tdesc.c (~target_desc): Remove implictly deleted items.
1677 (init_target_desc): Iterate all features.
1678 (tdesc_get_features_xml): Use vector.
1679 (tdesc_create_feature): Create feature.
1680 * tdesc.h (tdesc_feature) Remove
1681 (target_desc): Add features.
1683 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1685 * Makefile.in: Add common/tdesc.c
1686 * tdesc.c (init_target_desc): init all reg_defs from register
1688 (tdesc_create_reg): Create tdesc_reg.
1689 * tdesc.h (tdesc_feature): Add register vector.
1691 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1693 * tdesc.h (struct target_desc) <features>: Change type to
1694 std::vector<std::string>.
1695 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1697 (tdesc_get_features_xml): Likewise.
1698 (tdesc_create_feature): Likewise.
1700 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1702 * regcache.c (find_register_by_number): Return a ref.
1703 (find_regno): Use references.
1704 (register_size): Likewise.
1705 (register_data): Likewise.
1706 * tdesc.c (target_desc::~target_desc): Remove free calls.
1707 (target_desc::operator==): Use std::vector compare.
1708 (init_target_desc): Use reference.
1709 (tdesc_create_reg): Use reg constructors.
1710 * tdesc.h (struct target_desc): Replace pointer with object.
1712 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1714 * regcache.c (find_register_by_number): Make static.
1715 (find_regno): Use find_register_by_number
1716 * regcache.h (struct reg): Remove declaration.
1718 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1720 * tdesc.c (target_desc::~target_desc): Move to here.
1721 (target_desc::operator==): Likewise.
1722 * tdesc.h (target_desc::~target_desc): Move from here.
1723 (target_desc::operator==): Likewise.
1725 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1727 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1729 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1731 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1733 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1734 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1735 and init_registers_s390_gs_linux64.
1737 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1739 * linux-s390-low.c (s390_fill_gs): Remove function.
1740 (s390_fill_gsbc): Remove function.
1741 (s390_regsets): Set fill functions for the guarded storage regsets
1744 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1746 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1747 the word size. Add comment.
1748 (s390_get_wordsize): New function.
1749 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1750 pswm with it. Instead, use s390_get_wordsize to determine the
1751 word size first and derive the correct tdesc from that directly.
1753 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1755 * Makefile.in: Include silent-rules.mk.
1756 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1757 (COMPILE): Add ECHO_CXX.
1758 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1759 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1760 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1761 (version-generated.c): Add ECHO_GEN.
1762 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1763 (IPAGENT_COMPILE): Add ECHO_CXX.
1764 (%-generated.c): Add ECHO_REGDAT.
1766 2018-03-14 Tom Tromey <tom@tromey.com>
1769 * ax.c (ax_printf): Special case for NULL.
1771 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1773 * linux-low.c (linux_qxfer_libraries_svr4): Use
1774 xml_escape_text_append.
1776 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1778 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1780 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1782 * server.c (handle_general_set): Remove unnecessary xstrdup.
1784 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1786 * server.c (parse_debug_format_options): Adjust to
1787 delim_string_to_char_ptr_vec changes.
1788 * thread-db.c (thread_db_load_search): Adjust to
1789 dirnames_to_char_ptr_vec changes.
1791 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1793 * target.h (target_enable_btrace, target_disable_btrace)
1794 (target_read_btrace, target_read_btrace_conf): Turn macro into
1795 inline function. Throw error if target method is not defined.
1796 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1797 check for btrace target method. Be prepared to handle exceptions
1798 from btrace target methods.
1800 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1802 * server.c (captured_main): Change order of error message printed
1803 when the current working directory cannot be found.
1805 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1807 * server.c: Include "filenames.h" and "pathstuff.h".
1808 (program_name): Delete variable.
1809 (program_path): New anonymous class.
1810 (get_exec_wrapper): Use "program_path" instead of
1812 (handle_v_run): Likewise.
1813 (captured_main): Likewise.
1814 (process_serial_event): Likewise.
1816 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1818 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1819 (OBJS): Add "pathstuff.o".
1820 * server.c (current_directory): New global variable.
1821 (captured_main): Initialize "current_directory".
1823 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1825 * tdesc.c: Use common/tdesc.h.
1826 * tdesc.h: Likewise.
1828 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1829 Simon Marchi <simon.marchi@ericsson.com>
1831 * Makefile.in: Switch order of make rules.
1833 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1835 * Makefile.in: Add common directory in build.
1836 * configure.ac: Add common reference.
1837 * configure: Regenerate.
1839 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1841 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1842 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1843 * spu-low.c (spu_target_ops): Likewise.
1844 * win32-low.c (win32_target_ops): Likewise.
1845 * server.c (supported_btrace_packets): Report packets unconditionally.
1846 * target.h (target_ops) <supports_btrace>: Remove.
1847 (target_supports_btrace): Remove.
1849 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1851 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1852 (handle_btrace_disable): Change return type to void. Use exceptions
1854 (handle_btrace_general_set): Catch exception and copy message to
1857 2018-02-08 Tom Tromey <tom@tromey.com>
1859 * linux-low.c (install_software_single_step_breakpoints): Use
1860 make_scoped_restore.
1861 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1862 (do_restore_current_thread_cleanup): Remove.
1863 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1866 2018-02-08 Tom Tromey <tom@tromey.com>
1868 * mem-break.c (set_raw_breakpoint_at): Use
1869 gdb::unique_xmalloc_ptr.
1871 2018-01-30 Pedro Alves <palves@redhat.com>
1874 * target.c (target_terminal::terminal_state): Rename to ...
1875 (target_terminal::m_terminal_state): ... this.
1877 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1879 * linux-low.c (handle_extended_wait): Surround call to
1880 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1882 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1884 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1885 linux_ptrace_attach_fail_reason_string now returning an
1887 (linux_attach): Likewise.
1888 * thread-db.c (attach_thread): Likewise.
1890 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1893 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1894 checking for fs_base/gs_base fields in struct user_regs_struct.
1895 * configure: Regenerate.
1897 2018-01-16 Yao Qi <yao.qi@linaro.org>
1900 * linux-low.c (fetch_register): Call supply_register instead of
1903 2018-01-08 Yao Qi <yao.qi@linaro.org>
1904 Simon Marchi <simon.marchi@ericsson.com>
1906 * Makefile.in (OBS): Remove selftest.o.
1907 * configure.ac: Set srv_selftest_objs if $development is true.
1908 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1909 * configure: Re-generated.
1910 * server.c (captured_main): Wrap variable selftest_filter with
1913 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1915 * server.c (parse_debug_format_options): Return std::string.
1916 (handle_monitor_command, captured_main): Adjust.
1918 2018-01-05 Pedro Alves <palves@redhat.com>
1921 * server.c (captured_main): Pass quiet=false to
1922 save_original_signals_state.
1924 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1926 * gdbreplay.c (gdbreplay_version): Update copyright year in
1928 * server.c (gdbserver_version): Likewise.
1930 2017-12-08 Tom Tromey <tom@tromey.com>
1932 * ax.c (ax_printf): Update.
1934 2017-12-07 Yao Qi <yao.qi@linaro.org>
1936 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1937 aarch64_linux_read_description.
1938 * linux-amd64-ipa.c (idx2mask): New array.
1939 (get_ipa_tdesc): Move idx2mask out.
1940 (initialize_low_tracepoint): Initialize target descriptions.
1941 * linux-i386-ipa.c (idx2mask): New array.
1942 (get_ipa_tdesc): Move idx2mask out.
1943 (initialize_low_tracepoint): Initialize target descriptions.
1945 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1947 * tdesc.c (struct tdesc_type): Change return type.
1948 (tdesc_add_flag): Change parameter type.
1949 (tdesc_add_bitfield): Likewise.
1950 (tdesc_add_field): Likewise.
1951 (tdesc_set_struct_size): Likewise.
1953 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1955 * regcache.c (registers_to_string): Remove unused variable.
1957 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1959 * inferiors.c (for_each_inferior_with_data): Remove.
1960 * inferiors.h (for_each_inferior_with_data): Remove.
1961 * server.c (handle_qxfer_threads_worker): Change parameter type.
1962 (handle_qxfer_threads_proper): Use for_each_thread.
1964 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1966 * inferiors.c (for_each_inferior): Remove.
1967 (clear_inferiors): Use for_each_thread.
1968 * inferiors.h (for_each_inferior): Remove.
1969 * linux-low.c (linux_wait_for_event_filtered): Use
1971 (linux_stabilize_threads): Likewise.
1972 * regcache.c (regcache_release): Likewise.
1973 * server.c (gdb_wants_all_threads_stopped): Likewise.
1974 (clear_pending_status_callback): Remove.
1975 (handle_status): Use for_each_thread.
1976 (captured_main): Likewise.
1977 * win32-low.c (child_init_thread_list): Likewise.
1978 (win32_clear_inferiors): Likewise.
1979 (fake_breakpoint_event): Likewise.
1981 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1983 * inferiors.h (find_inferior): Remove.
1984 * inferiors.c (find_inferior): Remove.
1986 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1988 * linux-low.c (resume_status_pending_p): Update comment.
1989 (need_step_over_p): Update comment.
1991 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1993 * linux-low.c (proceed_one_lwp): Return void, change parameter
1995 (unsuspend_and_proceed_one_lwp): Likewise.
1996 (proceed_all_lwps): Use for_each_thread.
1997 (unstop_all_lwps): Likewise.
1999 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2001 * linux-low.c (linux_resume_one_thread): Return void, take
2003 (linux_resume): Use for_each_thread.
2005 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2007 * linux-low.c (send_sigstop_callback): Return void, change
2008 parameter type. Rename to...
2009 (send_sigstop): ... this.
2010 (suspend_and_send_sigstop_callback): Return void, change parameter
2012 (suspend_and_send_sigstop): ... this.
2013 (stop_all_lwps): Use for_each_thread.
2015 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2017 * linux-low.c (lwp_running): Return bool, remove unused
2019 (linux_stabilize_threads): Use find_thread.
2021 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2023 * linux-low.c (select_singlestep_lwp_callback): Remove.
2024 (count_events_callback): Remove.
2025 (select_event_lwp_callback): Remove.
2026 (select_event_lwp): Use find_thread/for_each_thread.
2028 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2030 * linux-low.c (not_stopped_callback): Return bool, take filter
2032 (linux_wait_for_event_filtered): Use find_thread.
2033 (linux_wait_1): Likewise.
2035 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2037 * linux-low.c (same_lwp): Remove.
2038 (find_lwp_pid): Use find_thread.
2040 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2042 * linux-low.c (delete_lwp_callback): Remove.
2043 (linux_mourn): Use for_each_thread.
2045 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2047 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2048 args parameter, don't check for pid.
2049 (linux_detach): Use for_each_thread.
2051 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2053 * linux-low.c (struct counter): Remove.
2054 (second_thread_of_pid_p): Remove.
2055 (last_thread_of_process_p): Use find_thread.
2057 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2059 * inferiors.c (find_inferior_in_random): Remove.
2060 * inferiors.h (find_inferior_in_random): Remove.
2061 * linux-low.c (status_pending_p_callback): Return bool, accept
2062 parameter ptid directly.
2063 (linux_wait_for_event_filtered): Use find_thread_in_random.
2064 (linux_wait_1): Likewise.
2066 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2068 * inferiors.c (find_inferior_id): Remove.
2069 (find_thread_ptid): Move implemention from find_inferior_id to
2071 * inferiors.h (find_inferior_id): Remove.
2072 * server.c (handle_status): Use find_thread_ptid.
2073 (process_serial_event): Likewise.
2074 * thread-db.c (find_one_thread): Likewise.
2075 (thread_db_thread_handle): Likewise.
2076 * win32-low.c (thread_rec): Likewise.
2077 (child_delete_thread): Likewise.
2078 (win32_thread_alive): Likewise.
2079 (get_child_debug_event): Likewise.
2081 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2083 * linux-mips-low.c (update_watch_registers_callback): Return
2084 void, remove pid_p parameter, don't check for pid.
2085 (mips_insert_point, mips_remove_point): Use for_each_thread.
2087 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2089 * lynx.low (lynx_delete_thread_callback): Remove.
2090 (lynx_mourn): Use for_each_thread.
2092 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2094 * regcache.c (regcache_invalidate_one): Remove.
2095 (regcache_invalidate_pid): use for_each_thread.
2097 2017-11-26 Tom Tromey <tom@tromey.com>
2099 * linux-low.c (linux_create_inferior): Update.
2101 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2103 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2105 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2107 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2108 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2109 * linux-aarch64-tdesc-selftest.c: New file.
2110 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2112 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2114 * configure.srv: Add new file.
2115 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2116 * linux-aarch64-tdesc-selftest.c: New file.
2117 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2119 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2121 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2122 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2123 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2125 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2127 * configure.srv: Add new files.
2128 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2129 aarch64_linux_read_description.
2130 * linux-aarch64-low.c (aarch64_linux_read_description):
2131 Merge with aarch64_arch_setup.
2132 (aarch64_arch_setup): Call aarch64_linux_read_description.
2133 * linux-aarch64-tdesc.c: New file.
2134 * linux-aarch64-tdesc.h: New file.
2136 2017-11-24 Yao Qi <yao.qi@linaro.org>
2138 * configure.srv: Set $srv_regobj for tic6x-linux.
2139 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2140 (tic6x_read_description): Move some code to tic6x_arch_setup.
2141 (tic6x_tdesc_test): New function.
2142 (initialize_low_arch): Call selftests::register_test.
2144 2017-11-22 Yao Qi <yao.qi@linaro.org>
2146 * remote-utils.c (prepare_resume_reply): Use memcpy.
2148 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2150 * linux-low.c (kill_one_lwp_callback): Return void, take
2151 argument directly, don't filter on pid.
2152 (linux_kill): Use for_each_thread.
2154 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2156 * linux-low.c (need_step_over_p): Return bool, remove dummy
2158 (linux_resume, proceed_all_lwps): Use find_thread.
2160 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2162 * linux-low.c (resume_status_pending_p): Return bool, remove
2164 (linux_resume): Use find_thread.
2166 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2168 * linux-low.c (struct thread_resume_array): Remove.
2169 (linux_set_resume_request): Return void, take arguments
2171 (linux_resume): Use for_each_thread.
2173 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2175 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2176 return bool, remove data argument.
2177 (linux_stabilize_threads): Use find_thread.
2179 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2181 * linux-low.c (unsuspend_one_lwp): Remove.
2182 (unsuspend_all_lwps): Use for_each_thread, inline code from
2185 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2187 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2188 * linux-low.c (struct iterate_over_lwps_args): Remove.
2189 (iterate_over_lwps_filter): Remove.
2190 (iterate_over_lwps): Use find_thread.
2192 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2194 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2195 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2196 code from reset_lwp_ptrace_options_callback.
2198 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2200 * linux-arm-low.c (struct update_registers_data): Remove.
2201 (update_registers_callback): Return void, take arguments
2202 directly, don't check thread's pid.
2203 (arm_insert_point, arm_remove_point): Use for_each_thread.
2205 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2207 * win32-low.c (continue_one_thread): Return void, take argument
2209 (child_continue): Use for_each_thread.
2211 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2213 * win32-i386-low.c (update_debug_registers_callback): Rename
2215 (update_debug_registers): ... this, return void, remove pid_p arg.
2216 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2218 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2220 * inferiors.h (struct process_info): Add constructor, initialize
2222 <syscalls_to_catch>: Change type to std::vector<int>.
2223 * inferiors.c (add_process): Allocate process_info with new.
2224 (remove_process): Free process_info with delete.
2225 * linux-low.c (handle_extended_wait): Adjust.
2226 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2227 * server.c (handle_general_set): Adjust.
2229 2017-11-16 Pedro Alves <palves@redhat.com>
2231 * remote-utils.c (remote_close): Block SIGIO signals instead of
2232 uninstalling the SIGIO handler.
2234 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2236 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2238 2017-11-16 Yao Qi <yao.qi@linaro.org>
2240 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2241 (tic6x_store_gregset): Likewise.
2242 (tic6x_usrregs_info): Move it up.
2244 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2246 * Makefile.in: Update arch rules.
2247 * configure.srv: Explicitly mark arch/ files.
2249 2017-11-13 Andreas Schwab <schwab@suse.de>
2251 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2253 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2255 2017-11-06 Pedro Alves <palves@redhat.com>
2257 * config.in, configure: Regenerate.
2259 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2261 * target.c (struct thread_search): Remove.
2262 (thread_search_callback): Remove.
2263 (prepare_to_access_memory): Use for_each_thread instead of
2264 find_inferior. Inline code from thread_search_callback.
2266 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2268 * server.c (struct visit_actioned_threads_data): Remove.
2269 (visit_actioned_threads): Change prototype to take arguments
2271 (resume): Use find_thread instead of find_inferior.
2273 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2275 * server.c (queue_stop_reply_callback): Change prototype, return
2277 (find_status_pending_thread_callback): Remove.
2278 (handle_status): Replace find_inferior with find_thread and
2281 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2283 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2285 (aarch64_store_gregset): Likewise.
2286 (aarch64_fill_fpregset): Likewise.
2287 (aarch64_store_fpregset): Likewise.
2289 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2291 * gdbthread.h (find_thread, for_each_thread): New functions.
2292 * inferiors.c (thread_of_pid): Remove.
2293 (find_any_thread_of_pid): Use find_thread.
2294 * linux-low.c (num_lwps): Use for_each_thread.
2296 2017-10-17 Yao Qi <yao.qi@linaro.org>
2298 * Makefile.in: Remove one rule.
2299 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2301 2017-10-17 Yao Qi <yao.qi@linaro.org>
2303 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2304 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2306 2017-10-17 Yao Qi <yao.qi@linaro.org>
2308 * configure.srv: Rename arm.o with arch/arm.o.
2310 2017-10-17 Yao Qi <yao.qi@linaro.org>
2312 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2313 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2314 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2315 (arch-i386.o, arch-amd64.o): Remove rules.
2316 (arch/%.o): New rule.
2317 Update POSTCOMPILE and COMPILE.pre.
2318 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2319 * configure: Re-generated.
2320 * configure.srv: Replace arch-i386.o with arch/i386.o.
2321 Replace arch-amd64.o with arch/amd64.o.
2323 2017-10-16 Yao Qi <yao.qi@linaro.org>
2325 * configure: Regenerated.
2327 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2329 * inferiors.h: (struct inferior_list): Remove.
2330 (struct inferior_list_entry); Remove.
2331 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2332 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2333 get_first_inferior): Remove.
2334 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2335 find_inferior_id, find_inferior_in_random): Change signature.
2336 * inferiors.c (all_threads): Change type to
2337 std::list<thread_info *>.
2338 (get_thread): Remove macro.
2339 (find_inferior, find_inferior_id): Change signature, implement
2341 (find_inferior_in_random): Change signature, implement using
2342 find_thread_in_random.
2343 (for_each_inferior, for_each_inferior_with_data): Change
2344 signature, implement using for_each_thread.
2345 (add_inferior_to_list, remove_inferior): Remove.
2346 (add_thread, get_first_thread, thread_of_pid,
2347 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2348 (get_first_inferior, one_inferior_p, clear_inferior_list):
2350 (clear_inferiors, get_thread_process): Update.
2351 * gdbthread.h: Include <list>.
2352 (struct thread_info) <entry>: Remove field.
2354 (all_threads): Change type to std::list<thread_info *>.
2355 (get_first_inferior): Add doc.
2356 (find_thread, for_each_thread, find_thread_in_random): New
2358 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2359 * linux-arm-low.c (update_registers_callback): Update.
2360 * linux-low.c (second_thread_of_pid_p): Update.
2361 (kill_one_lwp_callback, linux_detach_lwp_callback,
2362 delete_lwp_callback, status_pending_p_callback, same_lwp,
2363 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2364 iterate_over_lwps, not_stopped_callback,
2365 resume_stopped_resumed_lwps, count_events_callback,
2366 select_singlestep_lwp_callback, select_event_lwp_callback,
2367 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2368 suspend_and_send_sigstop_callback, wait_for_sigstop,
2369 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2370 lwp_running, linux_set_resume_request, resume_status_pending_p,
2371 need_step_over_p, start_step_over, linux_resume_one_thread,
2372 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2373 reset_lwp_ptrace_options_callback): Update.
2374 * linux-mips-low.c (update_watch_registers_callback): Update.
2375 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2377 (free_register_cache_thread_one): Remove.
2378 (regcache_release): Update.
2379 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2380 handle_qxfer_threads_worker): Update.
2381 (handle_query): Update, use list iterator.
2382 (visit_actioned_threads, handle_pending_status,
2383 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2384 clear_pending_status_callback, set_pending_status_callback,
2385 find_status_pending_thread_callback, handle_status,
2386 process_serial_event): Update.
2387 * target.c (thread_search_callback): Update.
2388 * thread-db.c (thread_db_get_tls_address): Update.
2389 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2391 * win32-i386-low.c (update_debug_registers_callback): Update.
2392 * win32-low.c (delete_thread_info, child_delete_thread,
2393 continue_one_thread, suspend_one_thread,
2394 get_child_debug_event): Adjust.
2396 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2398 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2399 * inferiors.h: Include <list>.
2400 (struct process_info) <entry>: Remove field.
2402 (pid_of): Change macro to function.
2403 (ptid_of, lwpid_of): Remove macro.
2404 (all_processes): Change type to std::list<process_info *>.
2405 (ALL_PROCESSES): Remove macro.
2406 (for_each_process, find_process): New function.
2407 * inferiors.c (all_processes): Change type to
2408 std::list<process_info *>.
2409 (find_thread_process): Adjust.
2410 (add_process): Likewise.
2411 (remove_process): Likewise.
2412 (find_process_pid): Likewise.
2413 (get_first_process): Likewise.
2414 (started_inferior_callback): Remove.
2415 (have_started_inferiors_p): Adjust.
2416 (attached_inferior_callback): Remove.
2417 (have_attached_inferiors_p): Adjust.
2418 * linux-low.c (check_zombie_leaders): Likewise.
2419 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2420 (x86_linux_update_xmltarget): Adjust.
2421 * server.c (handle_query): Likewise.
2422 (gdb_reattached_process): Remove.
2423 (handle_status): Adjust.
2424 (kill_inferior_callback): Likewise.
2425 (detach_or_kill_inferior): Remove.
2426 (print_started_pid): Likewise.
2427 (print_attached_pid): Likewise.
2428 (detach_or_kill_for_exit): Update.
2429 (process_serial_event): Likewise.
2430 * linux-arm-low.c (arm_new_fork): Likewise.
2432 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2434 * dll.h: Include <list>.
2435 (struct dll_info): Add constructor.
2436 <entry>: Remove field.
2437 (all_dlls): Change type to std::list<dll_info>.
2438 * dll.c: Include <algorithm>.
2439 (get_dll): Remove macro.
2440 (all_dlls): Change type to std::list<dll_info *>.
2441 (free_one_dll): Remove.
2442 (match_dll): Likewise.
2443 (loaded_dll): Adjust.
2444 (unloaded_dll): Adjust to all_dlls type change, use
2445 std::find_if. Inline code from match_dll.
2446 (clear_dlls): Adjust to all_dlls type change.
2447 * server.c (emit_dll_description): Remove.
2448 (handle_qxfer_libraries): Adjust to all_dlls type change,
2449 integrate emit_dll_description's functionality.
2451 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2453 * linux-low.h (struct linux_target_ops) <delete_process>: New
2455 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2456 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2457 (struct linux_target_ops): Add delete_process callback.
2458 * linux-arm-low.c (arm_delete_process): New.
2459 (struct linux_target_ops): Add delete_process callback.
2460 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2461 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2462 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2463 * linux-mips-low.c (mips_linux_delete_process): New.
2464 (struct linux_target_ops): Add delete_process callback.
2465 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2466 * linux-s390-low.c (struct linux_target_ops): Likewise.
2467 * linux-sh-low.c (struct linux_target_ops): Likewise.
2468 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2469 * linux-tile-low.c (struct linux_target_ops): Likewise.
2470 * linux-x86-low.c (x86_linux_delete_process): New.
2471 (struct linux_target_ops): Add delete_process callback.
2472 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2474 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2476 * linux-aarch64-low.c (the_low_target): Add thread delete
2478 * linux-arm-low.c (arm_delete_thread): New function.
2479 (the_low_target): Add thread delete callback.
2480 * linux-bfin-low.c (the_low_target): Likewise.
2481 * linux-crisv32-low.c (the_low_target): Likewise.
2482 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2484 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2486 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2487 * linux-mips-low.c (mips_linux_delete_thread): New function.
2488 (the_low_target): Add thread delete callback.
2489 * linux-ppc-low.c (the_low_target): Likewise.
2490 * linux-s390-low.c (the_low_target): Likewise.
2491 * linux-sh-low.c (the_low_target): Likewise.
2492 * linux-tic6x-low.c (the_low_target): Likewise.
2493 * linux-tile-low.c (the_low_target): Likewise.
2494 * linux-x86-low.c (the_low_target): Likewise.
2495 * linux-xtensa-low.c (the_low_target): Likewise.
2497 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2499 * win32-low.c: Include "common-inferior.h".
2501 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2503 * inferiors.c (set_inferior_cwd): New function.
2504 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2505 (handle_query): Inform that QSetWorkingDir is supported.
2506 * win32-low.c (create_process): Pass the inferior's cwd to
2509 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2511 * inferiors.c (current_inferior_cwd): New global variable.
2512 (get_inferior_cwd): New function.
2513 * inferiors.h (struct process_info) <cwd>: New field.
2515 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2517 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2518 (OBS): Add gdb_tilde_expand.o.
2520 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2522 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2523 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2525 2017-09-29 Pedro Alves <palves@redhat.com>
2527 * ax.c (gdb_parse_agent_expr): Constify.
2528 * ax.h (gdb_parse_agent_expr): Constify.
2529 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2531 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2532 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2533 * remote-utils.h (read_ptid): Constify.
2534 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2535 (process_point_options, process_serial_event): Constify.
2536 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2537 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2538 (cmd_qtbuffer): Constify.
2540 2017-09-29 Pedro Alves <palves@redhat.com>
2542 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2545 2017-09-29 Pedro Alves <palves@redhat.com>
2547 * linux-low.c (handle_extended_wait): Pass parent thread instead
2548 of process to thread_db_notice_clone.
2549 * linux-low.h (thread_db_notice_clone): Replace parent process
2550 parameter with parent thread parameter.
2551 * thread-db.c (find_one_thread): Add comment.
2552 (thread_db_notice_clone): Replace parent process parameter with
2553 parent thread parameter. Temporarily switch to the parent thread.
2555 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2557 * gdbthread.h: Include "common-gdbthread.h".
2558 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2559 "if" when validating the ptid.
2560 * remote-utils.c: Include "gdbthread.h".
2561 (prepare_resume_reply): Use "switch_to_thread".
2562 * target.c (done_accessing_memory): Likewise.
2564 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2566 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2567 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2568 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2569 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2570 s390x-gs-linux64-ipa.o to ipa_obj.
2571 * linux-s390-low.c (HWCAP_S390_GS): New define.
2572 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2574 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2575 (s390_arch_setup): Check for guarded-storage support and choose
2577 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2578 init_registers_s390x_gs_linux64.
2579 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2581 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2582 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2584 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2586 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2588 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2590 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2591 (thread_db_thread_handle): Declare.
2592 * linux-low.c (linux_target_ops): Initialize thread_handle.
2593 * server.c (handle_qxfer_threads_worker): Add support for
2595 * target.h (struct target_ops): Add new function pointer,
2597 (target_thread_handle): Define.
2598 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2600 (thread_db_thread_handle): New function.
2602 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2604 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2605 * linux-low.h (thread_db_notice_clone): Declare.
2606 * thread-db.c (thread_db_notice_clone): New function.
2608 2017-09-21 Pedro Alves <palves@redhat.com>
2610 * server.c (gdb_read_memory, handle_status, process_serial_event)
2611 (handle_serial_event, handle_target_event): Adjust to
2612 set_desired_thread prototype change.
2613 * target.c (set_desired_thread): Remove 'use_general' parameter
2615 * target.h (set_desired_thread): Remove 'use_general' parameter.
2617 2017-09-20 Tom Tromey <tom@tromey.com>
2619 * target.c (target_terminal::terminal_state): Define.
2620 (target_terminal::init): Rename from target_terminal_init.
2621 (target_terminal::inferior): Rename from
2622 target_terminal_inferior.
2623 (target_terminal::ours): Rename from target_terminal_ours.
2624 (target_terminal::ours_for_output, target_terminal::info): New.
2626 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2628 * server.c (accumulate_file_name_length): Remove.
2629 (emit_dll_description): Adjust to std::string change.
2630 (handle_qxfer_libraries): Use std::string to hold document.
2632 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2634 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2635 return type of xml_escape_text.
2636 * server.c (emit_dll_description): Likewise.
2638 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2640 * server.c (captured_main): Accept argument for --selftest.
2641 Update run_tests call.
2642 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2643 when registering selftests.
2645 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2647 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2648 instead of "VEC" for "target_desc.reg_defs".
2649 (regcache_cpy): Likewise.
2650 (registers_to_string): Likewise.
2651 (registers_from_string): Likewise.
2652 (find_regno): Likewise.
2653 (supply_regblock): Likewise.
2654 (regcache_raw_read_unsigned): Likewise.
2655 * tdesc.c (init_target_desc): Likewise.
2656 (tdesc_create_reg): Likewise.
2657 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2658 (struct target_desc) <reg_defs>: Convert to "std::vector".
2659 (target_desc): Do not initialize "reg_defs".
2660 (~target_desc): Update code to use "std::vector" instead of "VEC"
2661 for "target_desc.reg_defs".
2662 (operator==): Likewise.
2664 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2666 * inferiors.h (thread_to_gdb_id): Remove.
2667 * inferiors.c (thread_to_gdb_id): Remove.
2668 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2669 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2670 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2672 * nto-low.c (nto_fetch_registers, nto_store_registers,
2673 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2675 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2677 * inferiors.h (gdb_id_to_thread_id): Remove.
2678 * inferiors.c (gdb_id_to_thread_id): Remove.
2679 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2680 removal. Move pid declaration closer to where it's used.
2682 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2684 * server.c (handle_detach): New function.
2685 (process_serial_event): Move code out, call handle_detach.
2687 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2689 * server.c (require_running): Rename to ...
2690 (require_running_or_return): ... this ...
2691 (require_running_or_break): ... and this.
2692 (handle_query, process_serial_event): Adjust.
2694 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2696 * linux-low.c (linux_set_resume_request): Remove unused
2699 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2701 * server.c (first_thread_of): Remove.
2702 (process_serial_event): Replace usage of first_thread_of with
2703 find_any_thread_of_pid.
2704 * tracepoint.c (same_process_p): Remove.
2705 (gdb_agent_about_to_close): Replace usage of same_process_p with
2706 find_any_thread_of_pid.
2707 * linux-x86-low.c (same_process_callback): Remove.
2708 (x86_arch_setup_process_callback): Replace usage of
2709 same_process_callback with find_any_thread_of_pid.
2710 * thread-db.c (any_thread_of): Remove.
2711 (switch_to_process): Replace usage of any_thread_of with
2712 find_any_thread_of_pid.
2713 * inferiors.c (thread_pid_matches_callback): Remove.
2714 (find_thread_process): Adjust to use find_any_thread_of_pid.
2716 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2718 * regcache.c (get_thread_regcache): Guard calls to "memset"
2721 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2723 * linux-low.c (handle_extended_wait): Use
2724 "allocate_target_description" instead of "XNEW".
2725 * linux-x86-low.c (initialize_low_arch): Likewise.
2727 2017-09-05 Yao Qi <yao.qi@linaro.org>
2729 * configure.srv (srv_i386_regobj): Remove.
2730 (srv_amd64_regobj): Remove.
2731 (srv_regobj): Set it to "" for x86 non-linux targets.
2732 * linux-x86-tdesc.c (i386_linux_read_description):
2733 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2734 (init_registers_i386): Remove the declaration.
2735 (tdesc_i386): Remove the declaration.
2736 (lynx_i386_arch_setup): Call i386_create_target_description.
2737 * nto-x86-low.c: Likewise.
2738 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2739 [!__x86_64__]: include arch/i386.h.
2740 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2742 2017-09-05 Yao Qi <yao.qi@linaro.org>
2744 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2745 i386/amd64-XXX-linux from it.
2747 2017-09-05 Yao Qi <yao.qi@linaro.org>
2749 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2751 (ipa_amd64_linux_regobj): Remove.
2752 (ipa_x32_linux_regobj): Remove.
2754 2017-09-05 Yao Qi <yao.qi@linaro.org>
2756 * Makefile.in (arch-amd64.o): New rule.
2757 * configure.srv: Append arch-amd64.o.
2758 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2759 (get_ipa_tdesc): Call amd64_linux_read_description.
2760 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2761 and init_registers_amd64_XXX.
2762 * linux-x86-low.c (x86_linux_read_description): Call
2763 amd64_linux_read_description.
2764 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2765 (initialize_low_arch): Don't call init_registers_x32_XXX and
2766 init_registers_amd64_XXX.
2767 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2768 and tdesc_amd64_XXX.
2769 [__x86_64__] (amd64_tdesc_test): New function.
2770 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2771 and init_registers_amd64_XXX.
2772 * linux-x86-tdesc.c: Include arch/amd64.h.
2773 (xcr0_to_tdesc_idx): New function.
2774 (i386_linux_read_description): New function.
2775 (amd64_get_ipa_tdesc_idx): New function.
2776 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2777 (amd64_get_ipa_tdesc): Declare.
2779 2017-09-05 Yao Qi <yao.qi@linaro.org>
2781 * configure.srv (srv_i386_linux_xmlfiles): Remove
2782 i386/i386-XXX-linux.xml from it.
2784 2017-09-05 Yao Qi <yao.qi@linaro.org>
2786 * configure.srv: Set srv_i386_linux_regobj empty if $development
2788 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2789 initialize_low_tdesc.
2790 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2791 with #if initialize_low_tdesc.
2792 * linux-x86-tdesc-selftest.c: New file.
2793 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2795 2017-09-05 Yao Qi <yao.qi@linaro.org>
2797 * Makefile.in (arch-i386.o): New rule.
2798 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2799 (x86_64-*-linux*): Likewise.
2800 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2801 include arch/i386.h.
2802 (i386_linux_read_description): Remove code and call
2803 i386_create_target_description.
2804 * tdesc.c (allocate_target_description): New function.
2805 * tdesc.h (set_tdesc_architecture): Remove declaration.
2806 (set_tdesc_osabi): Likewise.
2808 2017-09-05 Yao Qi <yao.qi@linaro.org>
2810 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2811 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2812 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2814 * server.c (get_features_xml): Call tdesc_get_features_xml.
2815 * tdesc.c (set_tdesc_architecture): New function.
2816 (set_tdesc_osabi): New function.
2817 (tdesc_get_features_xml): New function.
2818 (tdesc_create_feature): Add an argument.
2819 * tdesc.h (struct target_desc) <features>: New field.
2820 <arch, osabi>: New field.
2821 (~target_desc): xfree features, arch, and osabi.
2822 (target_desc::oerator==): Don't compare .xmltarget.
2823 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2824 (set_tdesc_osabi): Likewise.
2825 (tdesc_get_features_xml): Likewise.
2827 2017-09-05 Yao Qi <yao.qi@linaro.org>
2829 * linux-x86-tdesc.c: Include selftest.h.
2830 (i386_tdesc_test): New function.
2831 (initialize_low_tdesc): Call selftests::register_test.
2832 * tdesc.h: Include regdef.h.
2833 (target_desc): Override operator == and !=.
2835 2017-09-05 Yao Qi <yao.qi@linaro.org>
2837 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2838 (ipa_obj): Likewise.
2839 * linux-i386-ipa.c: Include common/x86-xstate.h
2840 (get_ipa_tdesc): Call i386_linux_read_description.
2841 (initialize_low_tracepoint): Don't call init_registers_XXX
2842 functions, call initialize_low_tdesc instead.
2843 * linux-x86-low.c (x86_linux_read_description): Call
2844 i386_linux_read_description.
2845 (initialize_low_arch): Don't call init_registers_i386_XXX
2846 functions, call initialize_low_tdesc.
2847 * linux-x86-tdesc.c: New file.
2848 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2849 (i386_get_ipa_tdesc_idx): Declare.
2850 (i386_get_ipa_tdesc): Declare.
2851 (initialize_low_tdesc): Declare.
2853 2017-09-05 Yao Qi <yao.qi@linaro.org>
2855 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2858 2017-09-05 Yao Qi <yao.qi@linaro.org>
2860 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2861 * regcache.c (get_thread_regcache): Use VEC_length.
2862 (init_register_cache): Likewise.
2863 (regcache_cpy): Likewise.
2864 (registers_to_string): Iterate reg_defs via VEC_iterate.
2865 (find_regno): Likewise.
2866 (find_register_by_number): Use VEC_index.
2867 (register_size): Call find_register_by_number.
2868 (register_data): Call find_register_by_number.
2869 (supply_regblock): Use VEC_length.
2870 (regcache_raw_read_unsigned): Likewise.
2871 * tdesc.c (init_target_desc): Iterate reg_defs via
2873 (default_description): Update initializer.
2874 (copy_target_description): Don't update field num_registers.
2875 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2876 <num_registers>: Remove.
2878 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2880 * Makefile.in (.SECONDARY): Define target.
2882 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2884 * linux-low.c (linux_wait_1): Adjust.
2885 * server.c (queue_stop_reply_callback): Adjust.
2887 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2889 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2890 QEnvironmentUnset and QEnvironmentReset packets.
2891 (handle_query): Inform remote that QEnvironmentHexEncoded,
2892 QEnvironmentUnset and QEnvironmentReset are supported.
2894 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2896 * inferiors.h (inferior_target_data): Rename to ...
2897 (thread_target_data): ... this.
2898 (inferior_regcache_data): Rename to ...
2899 (thread_regcache_data): ... this.
2900 (set_inferior_regcache_data): Rename to ...
2901 (set_thread_regcache_data): ... this.
2902 * inferiors.c (inferior_target_data): Rename to ...
2903 (thread_target_data): ... this.
2904 (inferior_regcache_data): Rename to ...
2905 (thread_regcache_data): ... this.
2906 (set_inferior_regcache_data): Rename to ...
2907 (set_thread_regcache_data): ... this.
2908 (free_one_thread): Update.
2909 * linux-low.h (get_thread_lwp): Update.
2910 * regcache.c (get_thread_regcache): Update.
2911 (regcache_invalidate_thread): Update.
2912 (free_register_cache_thread): Update.
2913 * win32-i386-low.c (update_debug_registers_callback): Update.
2914 (win32_get_current_dr): Update.
2915 * win32-low.c (thread_rec): Update.
2916 (delete_thread_info): Update.
2917 (continue_one_thread): Update.
2918 (suspend_one_thread): Update.
2920 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2922 * inferiors.c (set_inferior_target_data): Remove.
2923 * inferiors.h (set_inferior_target_data): Remove.
2925 2017-08-18 Yao Qi <yao.qi@linaro.org>
2927 * Makefile.in (OBS): Add selftest.o.
2928 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2929 * configure, config.in: Re-generated.
2930 * server.c: Include common/sefltest.h.
2931 (captured_main): Handle option --selftest.
2933 2017-08-09 Yao Qi <yao.qi@linaro.org>
2935 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2936 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2937 i386-avx-mpx.o and i386-mmx.o.
2938 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2939 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2940 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2941 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2942 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2943 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2944 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2945 i386/amd64-avx-mpx.xml.
2947 2017-08-09 Yao Qi <yao.qi@linaro.org>
2949 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2950 and x32-avx-avx512.o.
2951 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2952 i386/x32-avx-avx512.xml.
2954 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2956 * tracepoint.h (enum class fast_tpoint_collect_result): New
2958 (fast_tracepoint_collecting): Change return type to
2959 fast_tpoint_collect_result.
2960 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2961 * linux-low.h: Include tracepoint.h.
2962 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2963 fast_tpoint_collect_result.
2964 * linux-low.c (handle_tracepoints): Adjust.
2965 (linux_fast_tracepoint_collecting): Change return type to
2966 fast_tpoint_collect_result.
2967 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2968 linux_wait_1, stuck_in_jump_pad_callback,
2969 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2970 proceed_one_lwp): Adjust to type change.
2972 2017-07-10 Yao Qi <yao.qi@linaro.org>
2974 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2976 2017-06-29 Yao Qi <yao.qi@linaro.org>
2978 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2980 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2982 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2984 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2986 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2988 * linux-low.c (linux_create_inferior): Adjust code to access the
2989 environment information via 'gdb_environ' class.
2990 * lynx-low.c (lynx_create_inferior): Likewise.
2991 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2992 (get_environ): Return a pointer to 'our_environ'.
2993 (captured_main): Initialize 'our_environ'.
2994 * server.h (get_environ): Adjust prototype.
2995 * spu-low.c (spu_create_inferior): Adjust code to access the
2996 environment information via 'gdb_environ' class.
2998 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3000 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3001 usage of "register" keyword.
3003 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3005 * configure: Re-generate.
3007 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3009 * configure: Re-generate.
3011 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3013 * Makefile.in (COMPILE.pre): Add "-x c++".
3015 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3017 * fork-child.c: Conditionally include <signal.h>.
3019 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3021 * server.c (handle_general_set): Handle new packet
3022 "QStartupWithShell".
3023 (handle_query): Add "QStartupWithShell" to the list of supported
3025 (gdbserver_usage): Add help text explaining the
3026 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3028 (captured_main): Recognize and act upon the presence of the new
3031 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3032 Pedro Alves <palves@redhat.com>
3034 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3035 * configure: Regenerate.
3036 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3038 (i[34567]86-*-lynxos*): Likewise.
3039 (spu*-*-*): Likewise.
3040 * fork-child.c: New file.
3041 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3043 (linux_ptrace_fun): New function.
3044 (linux_create_inferior): Adjust function prototype to reflect
3045 change on "target.h". Adjust function code to use
3047 (linux_request_interrupt): Delete "signal_pid".
3048 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3049 (lynx_ptrace_fun): New function.
3050 (lynx_create_inferior): Adjust function prototype to reflect
3051 change on "target.h". Adjust function code to use
3053 * nto-low.c (nto_create_inferior): Adjust function prototype and
3054 code to reflect change on "target.h". Update comments.
3055 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3056 "common-terminal.h" and "environ.h".
3057 (terminal_fd): Moved to fork-child.c.
3058 (old_foreground_pgrp): Likewise.
3059 (restore_old_foreground_pgrp): Likewise.
3060 (last_status): Make it global.
3061 (last_ptid): Likewise.
3062 (our_environ): New variable.
3063 (startup_with_shell): Likewise.
3064 (program_name): Likewise.
3065 (program_argv): Rename to...
3066 (program_args): ...this.
3067 (wrapper_argv): New variable.
3068 (start_inferior): Delete function.
3069 (get_exec_wrapper): New function.
3070 (get_exec_file): Likewise.
3071 (get_environ): Likewise.
3072 (prefork_hook): Likewise.
3073 (post_fork_inferior): Likewise.
3074 (postfork_hook): Likewise.
3075 (postfork_child_hook): Likewise.
3076 (handle_v_run): Update code to deal with arguments coming from the
3077 remote host. Update calls from "start_inferior" to
3079 (captured_main): Likewise. Initialize environment variable. Call
3081 * server.h (post_fork_inferior): New prototype.
3082 (get_environ): Likewise.
3083 (last_status): Declare.
3084 (last_ptid): Likewise.
3085 (signal_pid): Likewise.
3086 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3087 (spu_ptrace_fun): New function.
3088 (spu_create_inferior): Adjust function prototype to reflect change
3089 on "target.h". Adjust function code to use "fork_inferior".
3090 * target.c (target_terminal_init): New function.
3091 (target_terminal_inferior): Likewise.
3092 (target_terminal_ours): Likewise.
3093 * target.h: Include <vector>.
3094 (struct target_ops) <create_inferior>: Update prototype.
3095 (create_inferior): Update macro.
3096 * utils.c (gdb_flush_out_err): New function.
3097 * win32-low.c (win32_create_inferior): Adjust function prototype
3098 and code to reflect change on "target.h".
3100 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3102 * inferiors.c (switch_to_thread): New function.
3104 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3106 * Makefile.in (SFILE): Add "common/job-control.c".
3107 (OBS): Add "job-control.o".
3109 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3111 * Makefile: Remove "@host_makefile_frag@".
3113 2017-05-05 Pedro Alves <palves@redhat.com>
3115 * configure: Regenerate.
3117 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3119 * configure: Regenerate.
3121 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3123 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3124 software_single_step change of return type to
3125 std::vector<CORE_ADDR>.
3126 * linux-low.c (install_software_single_step_breakpoints):
3128 * linux-low.h (install_software_single_step_breakpoints):
3131 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3133 * remote-utils.c: Include "gdb_termios.h" instead of
3135 * terminal.h: Delete file.
3137 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3139 * server.c: Include <vector>.
3140 <program_argv, wrapper_argv>: Convert to std::vector.
3141 (start_inferior): Rewrite function to use C++.
3142 (handle_v_run): Likewise. Update code that calculates the argv
3143 based on the vRun packet; use C++.
3144 (captured_main): Likewise.
3146 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3148 * server.c (handle_v_cont): Initialize thread_resume::thread
3151 2017-04-05 Pedro Alves <palves@redhat.com>
3153 * configure: Regenerate.
3155 2017-04-05 Pedro Alves <palves@redhat.com>
3157 * gdbreplay.c (sync_error): Constify.
3158 * linux-x86-low.c (push_opcode): Constify.
3160 2017-04-05 Pedro Alves <palves@redhat.com>
3162 * win32-low.c (get_child_debug_event)
3163 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3164 Report TARGET_WAITKIND_SPURIOUS instead.
3166 2017-04-05 Pedro Alves <palves@redhat.com>
3168 * remote-utils.c (remote_prepare, remote_open): Constify.
3169 * remote-utils.h (remote_prepare, remote_open): Constify.
3170 * server.c (captured_main): Constify 'port' handling.
3172 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3174 * Makefile.in (clean): Clear .deps.
3176 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3178 * .gitignore: Remove generated files, replace with wildcard.
3179 * (clean): Replace removal of generated files with wildcard.
3180 (version.c): Replace with...
3181 (version-generated.c): ...this.
3182 (xml-builtin.c): Replace with...
3183 (xml-builtin-generated.c): ...this.
3184 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3185 (%.c: *regformats*): Replace with...
3186 (%-generated.c: *regformats*): ...this.
3188 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3190 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3191 (xtensa_fill_gregset): Call collect_register_by_name for
3193 (xtensa_store_gregset): Call supply_register_by_name for
3196 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3198 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3199 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3200 (xtensa_store_gregset): Call supply_register for all registers in
3201 a0_regnum..a0_regnum + C0_NREGS range.
3203 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3205 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3206 (ax-ipa.o: ax.c): Remove.
3207 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3208 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3209 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3210 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3211 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3213 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3215 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3216 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3217 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3218 (errors-ipa.o: ../common/errors.c): Remove.
3219 (format-ipa.o: ../common/format.c): Remove.
3220 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3222 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3224 * Makefile.in (%-ipa.o: %.c): New rule.
3225 (tracepoint-ipa.o: tracepoint.c): Remove.
3226 (utils-ipa.o: utils.c): Remove.
3227 (remote-utils-ipa.o: remote-utils.c): Remove.
3228 (regcache-ipa.o: regcache.c): Remove.
3229 (i386-linux-ipa.o: i386-linux.c): Remove.
3230 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3231 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3232 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3233 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3234 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3235 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3236 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3237 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3238 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3239 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3240 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3241 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3242 (aarch64-ipa.o: aarch64.c): Remove.
3243 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3244 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3245 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3246 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3247 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3248 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3249 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3250 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3251 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3252 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3253 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3254 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3255 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3256 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3257 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3258 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3259 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3260 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3261 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3262 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3263 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3264 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3265 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3266 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3267 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3268 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3269 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3270 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3271 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3272 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3273 (tdesc-ipa.o: tdesc.c): Remove.
3274 (x32-linux-ipa.o: x32-linux.c): Remove.
3275 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3276 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3278 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3280 * Makefile.in (%.o: ../arch/%.c): New rule.
3281 (arm.o: ../arch/arm.c): Remove.
3282 (arm-linux.o: ../arch/arm-linux.c): Remove.
3283 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3284 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3286 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3288 * Makefile.in (%.o: ../nat/%.c): New rule.
3289 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3290 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3291 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3292 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3293 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3294 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3295 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3296 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3297 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3298 (linux-personality.o: ../nat/linux-personality.c): Remove.
3299 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3300 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3301 (x86-linux.o: ../nat/x86-linux.c): Remove.
3302 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3303 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3305 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3307 * Makefile.in (%.o: ../common/%.c): New rule.
3308 (signals.o: ../common/signals.c): Remove.
3309 (print-utils.o: ../common/print-utils.c): Remove.
3310 (rsp-low.o: ../common/rsp-low.c): Remove.
3311 (common-utils.o: ../common/common-utils.c): Remove.
3312 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3313 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3314 (vec.o: ../common/vec.c): Remove.
3315 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3316 (xml-utils.o: ../common/xml-utils.c): Remove.
3317 (ptid.o: ../common/ptid.c): Remove.
3318 (buffer.o: ../common/buffer.c): Remove.
3319 (format.o: ../common/format.c): Remove.
3320 (filestuff.o: ../common/filestuff.c): Remove.
3321 (agent.o: ../common/agent.c): Remove.
3322 (errors.o: ../common/errors.c): Remove.
3323 (environ.o: ../common/environ.c): Remove.
3324 (common-debug.o: ../common/common-debug.c): Remove.
3325 (cleanups.o: ../common/cleanups.c): Remove.
3326 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3327 (fileio.o: ../common/fileio.c): Remove.
3328 (common-regcache.o: ../common/common-regcache.c): Remove.
3329 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3330 (new-op.o: ../common/new-op.c): Remove.
3331 (btrace-common.o: ../common/btrace-common.c): Remove.
3333 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3335 * Makefile.in (%.o: ../target/%.c): New rule.
3336 (waitstatus.o: ../target/waitstatus.c): Remove.
3338 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3341 (%.c: ../regformats/%.dat,
3342 (%.c: ../regformats/arm/%.dat,
3343 (%.c: ../regformats/i386/%.dat,
3344 (%.c: ../regformats/rs6000/%.dat): New rules.
3345 (aarch64.c): Remove.
3346 (reg-arm.c): Remove.
3347 (arm-with-iwmmxt.c): Remove.
3348 (arm-with-vfpv2.c): Remove.
3349 (arm-with-vfpv3.c): Remove.
3350 (arm-with-neon.c): Remove.
3351 (reg-bfin.c): Remove.
3352 (reg-cris.c): Remove.
3353 (reg-crisv32.c): Remove.
3355 (i386-linux.c): Remove.
3356 (i386-avx.c): Remove.
3357 (i386-avx-linux.c): Remove.
3358 (i386-avx-avx512.c): Remove.
3359 (i386-avx-avx512-linux.c): Remove.
3360 (i386-mpx.c): Remove.
3361 (i386-mpx-linux.c): Remove.
3362 (i386-avx-mpx-avx512-pku.c): Remove.
3363 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3364 (i386-avx-mpx.c): Remove.
3365 (i386-avx-mpx-linux.c): Remove.
3366 (i386-mmx.c): Remove.
3367 (i386-mmx-linux.c): Remove.
3368 (reg-ia64.c): Remove.
3369 (reg-m32r.c): Remove.
3370 (reg-m68k.c): Remove.
3372 (mips-linux.c): Remove.
3373 (mips-dsp-linux.c): Remove.
3374 (mips64-linux.c): Remove.
3375 (mips64-dsp-linux.c): Remove.
3376 (nios2-linux.c): Remove.
3377 (powerpc-32.c): Remove.
3378 (powerpc-32l.c): Remove.
3379 (powerpc-altivec32l.c): Remove.
3380 (powerpc-cell32l.c): Remove.
3381 (powerpc-vsx32l.c): Remove.
3382 (powerpc-isa205-32l.c): Remove.
3383 (powerpc-isa205-altivec32l.c): Remove.
3384 (powerpc-isa205-vsx32l.c): Remove.
3385 (powerpc-e500l.c): Remove.
3386 (powerpc-64l.c): Remove.
3387 (powerpc-altivec64l.c): Remove.
3388 (powerpc-cell64l.c): Remove.
3389 (powerpc-vsx64l.c): Remove.
3390 (powerpc-isa205-64l.c): Remove.
3391 (powerpc-isa205-altivec64l.c): Remove.
3392 (powerpc-isa205-vsx64l.c): Remove.
3393 (s390-linux32.c): Remove.
3394 (s390-linux32v1.c): Remove.
3395 (s390-linux32v2.c): Remove.
3396 (s390-linux64.c): Remove.
3397 (s390-linux64v1.c): Remove.
3398 (s390-linux64v2.c): Remove.
3399 (s390-te-linux64.c): Remove.
3400 (s390-vx-linux64.c): Remove.
3401 (s390-tevx-linux64.c): Remove.
3402 (s390x-linux64.c): Remove.
3403 (s390x-linux64v1.c): Remove.
3404 (s390x-linux64v2.c): Remove.
3405 (s390x-te-linux64.c): Remove.
3406 (s390x-vx-linux64.c): Remove.
3407 (s390x-tevx-linux64.c): Remove.
3408 (tic6x-c64xp-linux.c): Remove.
3409 (tic6x-c64x-linux.c): Remove.
3410 (tic6x-c62x-linux.c): Remove.
3412 (reg-sparc64.c): Remove.
3413 (reg-spu.c): Remove.
3415 (amd64-linux.c): Remove.
3416 (amd64-avx.c): Remove.
3417 (amd64-avx-linux.c): Remove.
3418 (amd64-avx-avx512.c): Remove.
3419 (amd64-avx-avx512-linux.c): Remove.
3420 (amd64-mpx.c): Remove.
3421 (amd64-mpx-linux.c): Remove.
3422 (amd64-avx-mpx-avx512-pku.c): Remove.
3423 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3424 (amd64-avx-mpx.c): Remove.
3425 (amd64-avx-mpx-linux.c): Remove.
3427 (x32-linux.c): Remove.
3428 (x32-avx.c): Remove.
3429 (x32-avx-linux.c): Remove.
3430 (x32-avx-avx512.c): Remove.
3431 (x32-avx-avx512-linux.c): Remove.
3432 (reg-xtensa.c): Remove.
3433 (reg-tilegx.c): Remove.
3434 (reg-tilegx32.c): Remove.
3436 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3438 * Makefile.in (SFILES): Add "common/environ.c".
3439 (OBJS): Add "common/environ.h".
3441 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3443 * configure.ac: Check if the fs_base and gs_base members of
3444 `struct user_regs_struct' exist.
3445 * config.in: Regenerated.
3446 * configure: Likewise.
3448 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3450 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3452 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3453 (get_next_pcs_syscall_next_pc): Likewise.
3455 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3457 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3458 * nto-x86-low.c: Likewise.
3460 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3462 * Makefile.in: Include disable-implicit-rules.mk.
3464 2016-11-23 Pedro Alves <palves@redhat.com>
3466 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3467 (debug_vprintf): Use std::chrono::steady_clock instead of
3468 gettimeofday. Use '.' instead of ':'.
3469 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3470 (get_timestamp): Use std::chrono::steady_clock instead of
3473 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3475 * Makefile.in: Fix whitespace formatting.
3477 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3479 * Makefile.in (SFILES, OBS): Flatten list and order
3482 2016-11-23 Pedro Alves <palves@redhat.com>
3484 * event-loop.c (handle_file_event): Use warning.
3485 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3486 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3489 2016-11-23 Pedro Alves <palves@redhat.com>
3491 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3493 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3494 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3495 debug_printf and debug_flush for debug output.
3496 * server.c (handle_general_set): Likewise.
3497 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3500 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3502 * Makefile.in (.c.o): Replace rule with ...
3503 (%.o: %.c): ... this one.
3505 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3507 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3508 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3510 * configure.ac: Remove checks for the make program.
3511 * configure: Re-generate.
3513 2016-10-28 Pedro Alves <palves@redhat.com>
3515 * Makefile.in (CXX_DIALECT): Get from configure.
3516 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3517 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3518 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3519 * config.in: Regenerate.
3520 * configure: Regenerate.
3522 2016-10-27 Yao Qi <yao.qi@linaro.org>
3524 * linux-low.c (linux_supports_range_stepping): Return true if
3525 can_software_single_step return true.
3527 2016-10-27 Yao Qi <yao.qi@linaro.org>
3529 * inferiors.c (find_inferior_in_random): New function.
3530 * inferiors.h (find_inferior_in_random): Declare.
3531 * linux-low.c (linux_wait_for_event_filtered): Call
3532 find_inferior_in_random instead of find_inferior.
3534 2016-10-27 Yao Qi <yao.qi@linaro.org>
3536 * linux-low.c (linux_wait_1): If single-step breakpoints are
3537 inserted, remove them.
3539 2016-10-26 Pedro Alves <palves@redhat.com>
3541 * linux-low.c (handle_extended_wait): Link parent/child fork
3543 (linux_wait_1): Unlink them.
3544 (linux_set_resume_request): Ignore resume requests for
3545 already-resumed and unhandled fork child threads.
3546 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3547 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3549 (handle_v_requests) <vCont>: Don't call require_running.
3550 * server.h (in_queued_stop_replies): New declaration.
3552 2016-10-24 Yao Qi <yao.qi@linaro.org>
3555 * linux-aarch64-low.c (append_insns): Cast the return value to
3558 2016-10-10 Yao Qi <yao.qi@linaro.org>
3560 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3562 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3564 * target.c (target_supports_multi_process): New function, moved
3566 * target.h (target_supports_multi_process): ... here. Remove
3569 2016-10-05 Tom Tromey <tom@tromey.com>
3572 * tracepoint.c (handle_tracepoint_bkpts): Check
3573 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3575 2016-10-05 Yao Qi <yao.qi@linaro.org>
3577 * configure.srv: Update the path of arm-*.xml files.
3579 2016-10-05 Terry Guo <terry.guo@arm.com>
3580 Yao Qi <yao.qi@linaro.org>
3582 * Makefile.in: Adjust the path of rules.
3583 * configure.srv: Update the path of xml files.
3584 * regformats/arm-with-iwmmxt.dat: Regenerated.
3585 * regformats/arm-with-neon.dat: Likewise.
3586 * regformats/arm-with-vfpv2.dat: Likewise.
3587 * regformats/arm-with-vfpv3.dat Likewise.
3589 2016-09-30 Yao Qi <yao.qi@linaro.org>
3592 * target.c (target_stop_and_wait): Don't call
3593 target_continue_no_signal, use resume_stop instead.
3595 2016-09-26 Yao Qi <yao.qi@linaro.org>
3597 * linux-low.c (linux_wait_1): Call debug_exit.
3599 2016-09-23 Pedro Alves <palves@redhat.com>
3601 * Makefile.in (SFILES): Add common/new-op.c.
3602 (OBS): Add common/new-op.o.
3603 (new-op.o): New rule.
3605 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3607 * .gitinore: Ignore more files.
3609 2016-09-21 Yao Qi <yao.qi@linaro.org>
3611 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3614 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3616 * server.c (start_inferior): Call target_mourn_inferior instead of
3617 mourn_inferior; pass ptid_t argument to it.
3619 (handle_target_event): Likewise.
3620 * target.c (target_mourn_inferior): New function.
3621 * target.h (mourn_inferior): Delete macro.
3623 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3625 * linux-low.c (lwp_is_stepping): New function.
3627 2016-09-06 Carl Love <cel@us.ibm.com>
3629 * server.c (start_inferior): Fixed comment, requested comment change
3630 didn't get updated correctly. Removed reference to ptrace () call as
3631 it is only true on Linux systems.
3633 2016-09-06 Carl Love <cel@us.ibm.com>
3635 * server.c (start_inferior): Do not call
3636 function target_post_create_inferior () if the
3637 inferior process has already exited.
3639 2016-09-05 Pedro Alves <palves@redhat.com>
3641 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3642 (COMPILE.pre, CC_LD): Use CXX directly.
3643 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3644 * acinclude.m4: Don't include build-with-cxx.m4.
3645 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3646 * configure: Regenerate.
3648 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3651 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3652 call writing data to own_buf.
3654 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3656 * target.c (mywait): Call target_wait instead of
3658 (target_wait): New function.
3660 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3662 * server.c (start_inferior): New variable 'ptid'. Replace calls
3663 to the_target->resume by target_continue{,_no_signal}, depending
3665 * target.c (target_stop_and_wait): Call target_continue_no_signal
3666 instead of the_target->resume.
3667 (target_continue): New function.
3669 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3671 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3673 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3676 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3678 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3679 * linux-arm-low.c (ps_get_thread_area): Likewise.
3680 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3681 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3682 * linux-mips-low.c (ps_get_thread_area): Likewise.
3683 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3684 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3685 * linux-x86-low.c (ps_get_thread_area): Likewise.
3686 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3688 2016-08-19 Pedro Alves <palves@redhat.com>
3690 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3692 2016-08-19 Pedro Alves <palves@redhat.com>
3694 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3695 comment. Use memcpy instead of casting through unsigned long.
3697 2016-08-19 Pedro Alves <palves@redhat.com>
3699 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3700 allocating around 0x80000000.
3702 2016-08-19 Pedro Alves <palves@redhat.com>
3705 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3706 (x32-avx512-linux-ipa.o): New rules.
3707 * configure.ac (x86_64-*-linux*): New x32 check.
3708 * configure.srv (ipa_x32_linux_regobj): New.
3709 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3710 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3712 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3714 * configure: Regenerate.
3716 2016-08-09 Pedro Alves <palves@redhat.com>
3719 * Makefile.in (OBS): Add signals-state-save-restore.o.
3720 (signals-state-save-restore.o): New rule.
3721 * config.in: Regenerate.
3722 * configure: Regenerate.
3723 * linux-low.c: Include "signals-state-save-restore.h".
3724 (linux_create_inferior): Call
3725 restore_original_signals_state.
3726 * server.c: Include "dispositions-save-restore.h".
3727 (captured_main): Call save_original_signals_state.
3729 2016-08-05 Pedro Alves <palves@redhat.com>
3731 * configure: Regenerate.
3733 2016-08-04 Yao Qi <yao.qi@linaro.org>
3735 * linux-low.c (regsets_fetch_inferior_registers): Check
3736 errno is ESRCH or not.
3738 2016-08-02 Yao Qi <yao.qi@linaro.org>
3740 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3741 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3742 (thread_db_load_search): Update.
3743 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3744 td_ta_set_event and td_ta_event_getmsg.
3746 2016-07-26 Pedro Alves <palves@redhat.com>
3749 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3750 of unsigned long for 64-bit registers and use uint32_t instead of
3751 unsigned int for 32-bit registers.
3753 2016-07-26 Pedro Alves <palves@redhat.com>
3755 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3758 2016-07-21 Tom Tromey <tom@tromey.com>
3760 * configure: Rebuild.
3762 2016-07-21 Yao Qi <yao.qi@linaro.org>
3764 * mem-break.c (find_gdb_breakpoint): Cast bp to
3765 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3767 2016-07-21 Yao Qi <yao.qi@linaro.org>
3769 * server.c (handle_v_requests): Support s and S actions
3770 if target_supports_software_single_step return true.
3772 2016-07-21 Yao Qi <yao.qi@linaro.org>
3774 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3775 is resume_step, call maybe_hw_step.
3776 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3778 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3780 (proceed_one_lwp): If resume request is resume_step, install
3781 reinsert breakpoints and call maybe_hw_step.
3783 2016-07-21 Yao Qi <yao.qi@linaro.org>
3785 * linux-low.c (proceed_one_lwp): Declare.
3786 (linux_resume_one_thread): Remove local variable 'step'.
3787 Lift code enqueue signal. Call proceed_one_lwp instead of
3788 linux_resume_one_lwp.
3790 2016-07-21 Yao Qi <yao.qi@linaro.org>
3792 * linux-low.c (linux_resume_one_thread): Call
3793 enqueue_pending_signal.
3795 2016-07-21 Yao Qi <yao.qi@linaro.org>
3797 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3798 * inferiors.c (do_restore_current_thread_cleanup): New function.
3799 (make_cleanup_restore_current_thread): Likewise.
3800 * linux-low.c (install_software_single_step_breakpoints): Call
3801 make_cleanup_restore_current_thread. Switch current_thread to
3804 2016-07-21 Yao Qi <yao.qi@linaro.org>
3806 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3807 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3808 (clone_one_breakpoint): Likewise.
3809 (delete_reinsert_breakpoints): Change parameter to thread.
3811 (has_reinsert_breakpoints): Likewise.
3812 (uninsert_reinsert_breakpoints): Likewise.
3813 (reinsert_reinsert_breakpoints): Likewise.
3814 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3815 (delete_reinsert_breakpoints): Likewise.
3816 (reinsert_reinsert_breakpoints): Likewise.
3817 (uninsert_reinsert_breakpoints): Likewise.
3818 (has_reinsert_breakpoints): Likewise.
3820 2016-07-21 Yao Qi <yao.qi@linaro.org>
3822 * inferiors.c (get_thread_process): Make parameter const.
3823 * inferiors.h (get_thread_process): Update declaration.
3824 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3825 Add new parameters child_thread and parent_thread. Callers
3827 * mem-break.h (clone_all_breakpoints): Update declaration.
3829 2016-07-21 Yao Qi <yao.qi@linaro.org>
3831 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3832 <command_list, handler>: Remove.
3833 (struct gdb_breakpoint): New.
3834 (struct other_breakpoint): New.
3835 (struct reinsert_breakpoint): New.
3836 (is_gdb_breakpoint): New function.
3837 (any_persistent_commands): Update command_list if
3838 is_gdb_breakpoint returns true.
3839 (set_breakpoint): Create breakpoints according to their types.
3840 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3841 (set_gdb_breakpoint_1): Likewise.
3842 (set_gdb_breakpoint): Likewise.
3843 (clear_breakpoint_conditions): Change parameter type to
3844 'struct gdb_breakpoint *'.
3845 (clear_breakpoint_commands): Likewise.
3846 (clear_breakpoint_conditions_and_commands): Likewise.
3847 (add_condition_to_breakpoint): Likewise.
3848 (add_breakpoint_condition): Likewise.
3849 (add_commands_to_breakpoint): Likewise.
3850 (check_breakpoints): Check other_breakpoint.
3851 (clone_one_breakpoint): Clone breakpopint according to its type.
3852 * mem-break.h (struct gdb_breakpoint): Declare.
3853 (set_gdb_breakpoint): Update declaration.
3854 (clear_breakpoint_conditions_and_commands): Likewise.
3855 (add_breakpoint_condition): Likewise.
3856 (add_breakpoint_commands): Likewise.
3857 * server.c (process_point_options): Change parameter type to
3858 'struct gdb_breakpoint *'.
3860 2016-07-21 Yao Qi <yao.qi@linaro.org>
3862 * mem-break.c (set_breakpoint_at): Rename it to ...
3863 (set_breakpoint_type_at): ... it.
3864 (set_breakpoint_at): Call set_breakpoint_type_at.
3865 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3866 * mem-break.h (set_breakpoint_at): Update comments.
3868 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3870 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3872 (nios2_store_gregset): Likewise.
3874 2016-07-01 Pedro Alves <palves@redhat.com>
3875 Antoine Tremblay <antoine.tremblay@ericsson.com>
3877 * linux-low.c: Change interface to take the target lwp_info
3878 pointer directly and return void. Handle detaching from a zombie
3880 (linux_detach_lwp_callback): New function.
3881 (linux_detach): Detach from the leader thread after detaching from
3884 2016-06-28 Yao Qi <yao.qi@linaro.org>
3886 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3887 for variable new_offset.
3888 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3889 (aarch64_ftrace_insn_reloc_cb): Likewise.
3890 (aarch64_ftrace_insn_reloc_tb): Likewise.
3891 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3892 PRIx64 instead of PRIx32.
3894 2016-06-28 Yao Qi <yao.qi@linaro.org>
3896 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3897 (the_low_target): Install arm_get_syscall_trapinfo.
3899 2016-06-28 Yao Qi <yao.qi@linaro.org>
3901 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3903 (the_low_target): Install aarch64_get_syscall_trapinfo.
3905 2016-06-28 Yao Qi <yao.qi@linaro.org>
3907 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3909 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3910 Remove parameter sysno.
3911 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3914 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3916 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3917 (s390_emit_ne_goto): Likewise.
3918 (s390_emit_lt_goto): Likewise.
3919 (s390_emit_le_goto): Likewise.
3920 (s390_emit_gt_goto): Likewise.
3921 (s390_emit_ge_goto): Likewise.
3922 (s390x_emit_eq_goto): Likewise.
3923 (s390x_emit_ne_goto): Likewise.
3924 (s390x_emit_lt_goto): Likewise.
3925 (s390x_emit_le_goto): Likewise.
3926 (s390x_emit_gt_goto): Likewise.
3927 (s390x_emit_ge_goto): Likewise.
3928 (s390_emit_ops_impl): Mark variable static.
3929 (s390x_emit_ops): Likewise.
3931 2016-06-17 Yao Qi <yao.qi@linaro.org>
3933 * linux-low.c (handle_extended_wait): Call
3934 uninsert_reinsert_breakpoints for the parent process. Remove
3935 reinsert breakpoints from the child process. Reinsert them to
3936 the parent process when vfork is done.
3937 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3938 (reinsert_reinsert_breakpoints): New function.
3939 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3940 (reinsert_reinsert_breakpoints): Declare.
3942 2016-06-17 Yao Qi <yao.qi@linaro.org>
3944 * linux-low.c (handle_extended_wait): If the parent is doing
3945 step-over, remove the reinsert breakpoints from the forked child.
3947 2016-06-17 Yao Qi <yao.qi@linaro.org>
3949 * linux-low.c (unsuspend_all_lwps): Declare.
3950 (linux_low_filter_event): If thread exited, call finish_step_over.
3951 If step-over is finished, unsuspend other threads.
3953 2016-06-17 Yao Qi <yao.qi@linaro.org>
3955 * linux-low.c (linux_resume_one_lwp_throw): Assert
3956 has_reinsert_breakpoints returns false.
3957 * mem-break.c (delete_disabled_breakpoints): Assert
3958 bp type isn't reinsert_breakpoint.
3960 2016-06-17 Yao Qi <yao.qi@linaro.org>
3962 * linux-low.c (maybe_hw_step): New function.
3963 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3964 (finish_step_over): Switch current_thread to lwp temporarily,
3965 and assert has_reinsert_breakpoints returns true.
3966 (proceed_one_lwp): Call maybe_hw_step.
3967 * mem-break.c (has_reinsert_breakpoints): New function.
3968 * mem-break.h (has_reinsert_breakpoints): Declare.
3970 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3972 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3974 2016-05-17 Yao Qi <yao.qi@linaro.org>
3976 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3977 instead of find_inferior.
3979 2016-05-05 Yao Qi <yao.qi@linaro.org>
3981 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3982 Initialize res to zero.
3984 2016-05-05 Yao Qi <yao.qi@linaro.org>
3986 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3989 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3991 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3992 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3993 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3995 2016-04-28 Par Olsson <par.olsson@windriver.com>
3996 Simon Marchi <simon.marchi@ericsson.com>
3998 * tracepoint.c (write_inferior_int8): New function.
3999 (cmd_qtenable_disable): Write enable flag using
4000 write_inferior_int8.
4002 2016-04-25 Yao Qi <yao.qi@linaro.org>
4004 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4005 (need_step_over_p): Return zero if the LWP has pending signals
4006 can be delivered on software single step target.
4008 2016-04-25 Yao Qi <yao.qi@linaro.org>
4010 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4011 return instead of error.
4013 2016-04-22 Yao Qi <yao.qi@linaro.org>
4015 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4018 2016-04-22 Yao Qi <yao.qi@linaro.org>
4020 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4021 signal when stepping over breakpoint with software single
4024 2016-04-21 Pedro Alves <palves@redhat.com>
4026 * linux-s390-low.c (s390_collect_ptrace_register)
4027 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4029 (s390_check_regset): Use void * instead of gdb_byte *.
4031 2016-04-20 Pedro Alves <palves@redhat.com>
4033 * configure: Renegerate.
4035 2016-04-20 Yao Qi <yao.qi@linaro.org>
4037 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4038 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4040 (arm_store_gregset): Likewise.
4042 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4044 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4045 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4046 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4047 (amd64-avx-mpx-linux.c): New rules.
4048 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4049 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4050 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4051 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4052 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4053 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4054 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4055 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4056 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4057 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4058 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4059 * linux-x86-low.c (x86_linux_read_description): Add case for
4060 X86_XSTATE_AVX_MPX_MASK.
4061 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4062 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4063 init_registers_i386_avx_mpx_linux.
4064 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4065 (initialize_low_tracepoint): Call
4066 init_registers_i386_avx_mpx_linux.
4067 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4068 (initialize_low_tracepoint): Call
4069 init_registers_amd64_avx_mpx_linux.
4070 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4071 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4072 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4075 2016-04-18 Pedro Alves <palves@redhat.com>
4077 * configure: Regenerate.
4079 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4081 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4082 (aarch64_emit_sub): Likewise.
4084 2016-04-12 Pedro Alves <palves@redhat.com>
4086 * utils.c (prepare_to_throw_exception): Delete.
4088 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4090 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4092 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4094 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4096 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4098 * linux-aarch64-ipa.c: Add <elf.h> include.
4099 * linux-ppc-ipa.c: Add <elf.h> include.
4100 * linux-s390-ipa.c: Add <elf.h> include.
4102 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4104 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4105 (get_raw_reg_ptr): Likewise.
4106 (get_trace_state_variable_value_ptr): Likewise.
4107 (set_trace_state_variable_value_ptr): Likewise.
4108 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4111 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4112 Marcin Kościelnicki <koriakin@0x04.net>
4115 * linux-ppc-low.c (emit_insns): New function.
4116 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4117 (ppc_emit_prologue): New function.
4118 (ppc_emit_epilogue): New function.
4119 (ppc_emit_add): New function.
4120 (ppc_emit_sub): New function.
4121 (ppc_emit_mul): New function.
4122 (ppc_emit_lsh): New function.
4123 (ppc_emit_rsh_signed): New function.
4124 (ppc_emit_rsh_unsigned): New function.
4125 (ppc_emit_ext): New function.
4126 (ppc_emit_zero_ext): New function.
4127 (ppc_emit_log_not): New function.
4128 (ppc_emit_bit_and): New function.
4129 (ppc_emit_bit_or): New function.
4130 (ppc_emit_bit_xor): New function.
4131 (ppc_emit_bit_not): New function.
4132 (ppc_emit_equal): New function.
4133 (ppc_emit_less_signed): New function.
4134 (ppc_emit_less_unsigned): New function.
4135 (ppc_emit_ref): New function.
4136 (ppc_emit_const): New function.
4137 (ppc_emit_reg): New function.
4138 (ppc_emit_pop): New function.
4139 (ppc_emit_stack_flush): New function.
4140 (ppc_emit_swap): New function.
4141 (ppc_emit_stack_adjust): New function.
4142 (ppc_emit_call): New function.
4143 (ppc_emit_int_call_1): New function.
4144 (ppc_emit_void_call_2): New function.
4145 (ppc_emit_if_goto): New function.
4146 (ppc_emit_goto): New function.
4147 (ppc_emit_eq_goto): New function.
4148 (ppc_emit_ne_goto): New function.
4149 (ppc_emit_lt_goto): New function.
4150 (ppc_emit_le_goto): New function.
4151 (ppc_emit_gt_goto): New function.
4152 (ppc_emit_ge_goto): New function.
4153 (ppc_write_goto_address): New function.
4154 (ppc_emit_ops_impl): New static variable.
4155 (ppc64v1_emit_prologue): New function.
4156 (ppc64v2_emit_prologue): New function.
4157 (ppc64_emit_epilogue): New function.
4158 (ppc64_emit_add): New function.
4159 (ppc64_emit_sub): New function.
4160 (ppc64_emit_mul): New function.
4161 (ppc64_emit_lsh): New function.
4162 (ppc64_emit_rsh_signed): New function.
4163 (ppc64_emit_rsh_unsigned): New function.
4164 (ppc64_emit_ext): New function.
4165 (ppc64_emit_zero_ext): New function.
4166 (ppc64_emit_log_not): New function.
4167 (ppc64_emit_bit_and): New function.
4168 (ppc64_emit_bit_or): New function.
4169 (ppc64_emit_bit_xor): New function.
4170 (ppc64_emit_bit_not): New function.
4171 (ppc64_emit_equal): New function.
4172 (ppc64_emit_less_signed): New function.
4173 (ppc64_emit_less_unsigned): New function.
4174 (ppc64_emit_ref): New function.
4175 (ppc64_emit_const): New function.
4176 (ppc64v1_emit_reg): New function.
4177 (ppc64v2_emit_reg): New function.
4178 (ppc64_emit_pop): New function.
4179 (ppc64_emit_stack_flush): New function.
4180 (ppc64_emit_swap): New function.
4181 (ppc64v1_emit_call): New function.
4182 (ppc64v2_emit_call): New function.
4183 (ppc64v1_emit_int_call_1): New function.
4184 (ppc64v2_emit_int_call_1): New function.
4185 (ppc64v1_emit_void_call_2): New function.
4186 (ppc64v2_emit_void_call_2): New function.
4187 (ppc64_emit_if_goto): New function.
4188 (ppc64_emit_eq_goto): New function.
4189 (ppc64_emit_ne_goto): New function.
4190 (ppc64_emit_lt_goto): New function.
4191 (ppc64_emit_le_goto): New function.
4192 (ppc64_emit_gt_goto): New function.
4193 (ppc64_emit_ge_goto): New function.
4194 (ppc64v1_emit_ops_impl): New static variable.
4195 (ppc64v2_emit_ops_impl): New static variable.
4196 (ppc_emit_ops): New function.
4197 (linux_low_target): Wire in ppc_emit_ops.
4199 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4200 Marcin Kościelnicki <koriakin@0x04.net>
4203 * Makefile.in: Add powerpc-*-ipa.o
4204 * configure.srv: Add ipa_obj for powerpc*-linux.
4205 * linux-ppc-ipa.c: New file.
4206 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4208 (PPC_FIELD): New macro.
4209 (PPC_SEXT): New macro.
4210 (PPC_OP6): New macro.
4211 (PPC_BO): New macro.
4212 (PPC_LI): New macro.
4213 (PPC_BD): New macro.
4214 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4215 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4216 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4217 (ppc_get_thread_area): New function.
4218 (is_elfv2_inferior): New function.
4219 (gen_ds_form): New function.
4220 (GEN_STD): New macro.
4221 (GEN_STDU): New macro.
4222 (GEN_LD): New macro.
4223 (GEN_LDU): New macro.
4224 (gen_d_form): New function.
4225 (GEN_ADDI): New macro.
4226 (GEN_ADDIS): New macro.
4227 (GEN_LI): New macro.
4228 (GEN_LIS): New macro.
4229 (GEN_ORI): New macro.
4230 (GEN_ORIS): New macro.
4231 (GEN_LWZ): New macro.
4232 (GEN_STW): New macro.
4233 (GEN_STWU): New macro.
4234 (gen_xfx_form): New function.
4235 (GEN_MFSPR): New macro.
4236 (GEN_MTSPR): New macro.
4237 (GEN_MFCR): New macro.
4238 (GEN_MTCR): New macro.
4239 (GEN_SYNC): New macro.
4240 (GEN_LWSYNC): New macro.
4241 (gen_x_form): New function.
4242 (GEN_OR): New macro.
4243 (GEN_MR): New macro.
4244 (GEN_LWARX): New macro.
4245 (GEN_STWCX): New macro.
4246 (GEN_CMPW): New macro.
4247 (gen_md_form): New function.
4248 (GEN_RLDICL): New macro.
4249 (GEN_RLDICR): New macro.
4250 (gen_i_form): New function.
4252 (GEN_BL): New macro.
4253 (gen_b_form): New function.
4254 (GEN_BNE): New macro.
4255 (GEN_LOAD): New macro.
4256 (GEN_STORE): New macro.
4257 (gen_limm): New function.
4258 (gen_atomic_xchg): New function.
4259 (gen_call): New function.
4260 (ppc_relocate_instruction): New function.
4261 (ppc_install_fast_tracepoint_jump_pad): New function.
4262 (ppc_get_min_fast_tracepoint_insn_len): New function.
4263 (ppc_get_ipa_tdesc_idx): New function.
4264 (the_low_target): Wire in the new functions.
4265 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4267 * linux-ppc-tdesc.h: New file.
4269 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4271 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4272 (alloc_jump_pad_buffer): New function.
4273 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4274 (alloc_jump_pad_buffer): New function.
4275 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4276 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4277 (alloc_jump_pad_buffer): New function.
4278 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4279 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4280 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4281 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4283 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4285 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4286 * linux-amd64-ipa.c: Likewise.
4287 * linux-i386-ipa.c: Likewise.
4288 * linux-s390-ipa.c: Likewise.
4289 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4290 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4291 set_trace_state_variable_value_ptr.
4292 (struct ipa_sym_addresses): Likewise.
4293 (symbol_list): Likewise.
4294 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4295 accessing gdb_collect directly.
4296 (gdb_collect_ptr_type): New typedef.
4297 (get_raw_reg_ptr_type): New typedef.
4298 (get_trace_state_variable_value_ptr_type): New typedef.
4299 (set_trace_state_variable_value_ptr_type): New typedef.
4300 (gdb_collect_ptr): New global.
4301 (get_raw_reg_ptr): New global.
4302 (get_trace_state_variable_value_ptr): New global.
4303 (set_trace_state_variable_value_ptr): New global.
4304 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4305 accessing get_raw_reg directly.
4306 (get_get_tsv_func_addr): Likewise for
4307 get_trace_state_variable_value_ptr.
4308 (get_set_tsv_func_addr): Likewise for
4309 set_trace_state_variable_value_ptr.
4310 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4312 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4314 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4316 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4318 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4320 (relocate_instruction): Remove own_buf.
4321 * server.c (own_buf): Make global.
4322 (handle_v_requests): Make global.
4323 * server.h (own_buf): New declaration.
4324 (handle_v_requests): New prototype.
4326 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4329 * linux-s390-low.c (add_insns): New function.
4330 (s390_emit_prologue): New function.
4331 (s390_emit_epilogue): New function.
4332 (s390_emit_add): New function.
4333 (s390_emit_sub): New function.
4334 (s390_emit_mul): New function.
4335 (s390_emit_lsh): New function.
4336 (s390_emit_rsh_signed): New function.
4337 (s390_emit_rsh_unsigned): New function.
4338 (s390_emit_ext): New function.
4339 (s390_emit_log_not): New function.
4340 (s390_emit_bit_and): New function.
4341 (s390_emit_bit_or): New function.
4342 (s390_emit_bit_xor): New function.
4343 (s390_emit_bit_not): New function.
4344 (s390_emit_equal): New function.
4345 (s390_emit_less_signed): New function.
4346 (s390_emit_less_unsigned): New function.
4347 (s390_emit_ref): New function.
4348 (s390_emit_if_goto): New function.
4349 (s390_emit_goto): New function.
4350 (s390_write_goto_address): New function.
4351 (s390_emit_litpool): New function.
4352 (s390_emit_const): New function.
4353 (s390_emit_call): New function.
4354 (s390_emit_reg): New function.
4355 (s390_emit_pop): New function.
4356 (s390_emit_stack_flush): New function.
4357 (s390_emit_zero_ext): New function.
4358 (s390_emit_swap): New function.
4359 (s390_emit_stack_adjust): New function.
4360 (s390_emit_set_r2): New function.
4361 (s390_emit_int_call_1): New function.
4362 (s390_emit_void_call_2): New function.
4363 (s390_emit_eq_goto): New function.
4364 (s390_emit_ne_goto): New function.
4365 (s390_emit_lt_goto): New function.
4366 (s390_emit_le_goto): New function.
4367 (s390_emit_gt_goto): New function.
4368 (s390_emit_ge_goto): New function.
4369 (s390x_emit_prologue): New function.
4370 (s390x_emit_epilogue): New function.
4371 (s390x_emit_add): New function.
4372 (s390x_emit_sub): New function.
4373 (s390x_emit_mul): New function.
4374 (s390x_emit_lsh): New function.
4375 (s390x_emit_rsh_signed): New function.
4376 (s390x_emit_rsh_unsigned): New function.
4377 (s390x_emit_ext): New function.
4378 (s390x_emit_log_not): New function.
4379 (s390x_emit_bit_and): New function.
4380 (s390x_emit_bit_or): New function.
4381 (s390x_emit_bit_xor): New function.
4382 (s390x_emit_bit_not): New function.
4383 (s390x_emit_equal): New function.
4384 (s390x_emit_less_signed): New function.
4385 (s390x_emit_less_unsigned): New function.
4386 (s390x_emit_ref): New function.
4387 (s390x_emit_if_goto): New function.
4388 (s390x_emit_const): New function.
4389 (s390x_emit_call): New function.
4390 (s390x_emit_reg): New function.
4391 (s390x_emit_pop): New function.
4392 (s390x_emit_stack_flush): New function.
4393 (s390x_emit_zero_ext): New function.
4394 (s390x_emit_swap): New function.
4395 (s390x_emit_stack_adjust): New function.
4396 (s390x_emit_int_call_1): New function.
4397 (s390x_emit_void_call_2): New function.
4398 (s390x_emit_eq_goto): New function.
4399 (s390x_emit_ne_goto): New function.
4400 (s390x_emit_lt_goto): New function.
4401 (s390x_emit_le_goto): New function.
4402 (s390x_emit_gt_goto): New function.
4403 (s390x_emit_ge_goto): New function.
4404 (s390_emit_ops): New function.
4405 (struct linux_target_ops): Fill in emit_ops hook.
4407 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4410 * Makefile.in: Add s390 IPA files.
4411 * configure.srv: Build IPA for s390.
4412 * linux-s390-ipa.c: New file.
4413 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4414 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4415 (tdesc_s390_linux32): Likewise.
4416 (init_registers_s390_linux32v1): Likewise.
4417 (tdesc_s390_linux32v1): Likewise.
4418 (init_registers_s390_linux32v2): Likewise.
4419 (tdesc_s390_linux32v2): Likewise.
4420 (init_registers_s390_linux64): Likewise.
4421 (tdesc_s390_linux64): Likewise.
4422 (init_registers_s390_linux64v1): Likewise.
4423 (tdesc_s390_linux64v1): Likewise.
4424 (init_registers_s390_linux64v2): Likewise.
4425 (tdesc_s390_linux64v2): Likewise.
4426 (init_registers_s390_te_linux64): Likewise.
4427 (tdesc_s390_te_linux64): Likewise.
4428 (init_registers_s390_vx_linux64): Likewise.
4429 (tdesc_s390_vx_linux64): Likewise.
4430 (init_registers_s390_tevx_linux64): Likewise.
4431 (tdesc_s390_tevx_linux64): Likewise.
4432 (init_registers_s390x_linux64): Likewise.
4433 (tdesc_s390x_linux64): Likewise.
4434 (init_registers_s390x_linux64v1): Likewise.
4435 (tdesc_s390x_linux64v1): Likewise.
4436 (init_registers_s390x_linux64v2): Likewise.
4437 (tdesc_s390x_linux64v2): Likewise.
4438 (init_registers_s390x_te_linux64): Likewise.
4439 (tdesc_s390x_te_linux64): Likewise.
4440 (init_registers_s390x_vx_linux64): Likewise.
4441 (tdesc_s390x_vx_linux64): Likewise.
4442 (init_registers_s390x_tevx_linux64): Likewise.
4443 (tdesc_s390x_tevx_linux64): Likewise.
4444 (have_hwcap_s390_vx): New static variable.
4445 (s390_arch_setup): Fill have_hwcap_s390_vx.
4446 (s390_get_thread_area): New function.
4447 (s390_ft_entry_gpr_esa): New const.
4448 (s390_ft_entry_gpr_zarch): New const.
4449 (s390_ft_entry_misc): New const.
4450 (s390_ft_entry_fr): New const.
4451 (s390_ft_entry_vr): New const.
4452 (s390_ft_main_31): New const.
4453 (s390_ft_main_64): New const.
4454 (s390_ft_exit_fr): New const.
4455 (s390_ft_exit_vr): New const.
4456 (s390_ft_exit_misc): New const.
4457 (s390_ft_exit_gpr_esa): New const.
4458 (s390_ft_exit_gpr_zarch): New const.
4459 (append_insns): New function.
4460 (s390_relocate_instruction): New function.
4461 (s390_install_fast_tracepoint_jump_pad): New function.
4462 (s390_get_min_fast_tracepoint_insn_len): New function.
4463 (s390_get_ipa_tdesc_idx): New function.
4464 (struct linux_target_ops): Wire in the above functions.
4465 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4466 * linux-s390-tdesc.h: New file.
4468 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4470 * linux-s390-low.c (s390_supports_tracepoints): New function.
4471 (struct linux_target_ops): Fill supports_tracepoints hook.
4473 2016-03-18 Yao Qi <yao.qi@linaro.org>
4475 * linux-low.c (lwp_signal_can_be_delivered): New function.
4476 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4478 2016-03-18 Yao Qi <yao.qi@linaro.org>
4480 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4481 0 if signal is enqueued. Remove 'signal' from one debugging
4482 message. Move one debugging message to some lines below.
4483 Remove code setting 'signal' to 0.
4485 2016-03-18 Yao Qi <yao.qi@linaro.org>
4487 * linux-low.c (linux_low_filter_event): Remove redundant
4488 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4490 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4492 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4493 (struct linux_target_ops): Wire in the above.
4495 2016-03-03 Yao Qi <yao.qi@linaro.org>
4497 * linux-low.c: Update comments to start_step_over.
4499 2016-03-03 Yao Qi <yao.qi@linaro.org>
4502 * linux-low.c (handle_extended_wait): Set child suspended
4503 if event_lwp->bp_reinsert isn't zero.
4505 2016-03-02 Yao Qi <yao.qi@linaro.org>
4507 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4508 enqueue_pending_signal.
4510 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4512 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4515 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4517 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4518 (s390_regmap_3264) [!__s390x__]: New global.
4519 (s390_collect_ptrace_register): Skip map entries containing -1.
4520 (s390_supply_ptrace_register): Ditto.
4521 (s390_fill_gprs_high): New function.
4522 (s390_store_gprs_high): New function.
4523 (s390_regsets): Add NT_S390_HIGH_GPRS.
4524 (s390_get_hwcap): Enable on 31-bit.
4525 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4526 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4527 Detect NT_S390_HIGH_GPRS.
4528 (s390_usrregs_info_3264): Enable on 31-bit.
4529 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4530 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4532 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4535 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4536 * configure.srv: Ditto.
4537 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4538 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4539 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4540 (init_registers_amd64_linux): Remove prototype.
4541 (tdesc_amd64_linux): Remove declaration.
4542 (get_ipa_tdesc): New function.
4543 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4544 initialize remaining tdescs.
4545 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4546 (init_registers_i386_linux): Remove prototype.
4547 (tdesc_i386_linux): Remove declaration.
4548 (get_ipa_tdesc): New function.
4549 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4550 initialize remaining tdescs.
4551 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4552 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4553 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4554 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4555 (x86_get_ipa_tdesc_idx): New function.
4556 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4557 * linux-x86-tdesc.h: New file.
4558 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4559 (target_get_ipa_tdesc_idx): New macro.
4560 * tracepoint.c (ipa_tdesc_idx): New macro.
4561 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4562 (symbol_list): Add ipa_tdesc_idx.
4563 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4564 (ipa_tdesc): Remove.
4565 (ipa_tdesc_idx): New variable.
4566 (get_context_regcache): Use get_ipa_tdesc.
4567 (gdb_collect): Ditto.
4569 * tracepoint.h (get_ipa_tdesc): New prototype.
4570 (ipa_tdesc): Remove.
4572 2016-02-24 Pedro Alves <palves@redhat.com>
4574 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4575 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4576 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4577 Factor out common code between the USE_SIGTRAP_SIGINFO and
4578 !USE_SIGTRAP_SIGINFO blocks.
4579 (linux_low_filter_event): Call save_stop_reason instead of
4580 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4582 (linux_wait_1): Update comments.
4584 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4586 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4587 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4588 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4589 ppc_insert_point, ppc_remove_point.
4591 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4593 * linux-s390-low.c (s390_supports_z_point_type): New function.
4594 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4596 2016-02-16 Yao Qi <yao.qi@linaro.org>
4598 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4599 PC. Get pc from regcache_read_pc.
4601 2016-02-12 Yao Qi <yao.qi@linaro.org>
4603 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4604 or linux_get_pc_32bit.
4605 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4607 2016-02-12 Yao Qi <yao.qi@linaro.org>
4609 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4610 arm_linux_get_next_pcs_fixup.
4612 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4614 * tracepoint.c (x_tracepoint_action_download): Change
4615 write_inferior_data_ptr to write_inferior_data_pointer.
4616 (cmd_qtstart): Likewise.
4617 (write_inferior_data_ptr): Remove.
4618 (download_agent_expr): Change write_inferior_data_ptr to
4619 write_inferior_data_pointer.
4620 (download_tracepoint_1): Likewise.
4621 (download_tracepoint): Likewise.
4622 (download_trace_state_variables): Likewise.
4624 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4625 Marcin Kościelnicki <koriakin@0x04.net>
4627 * tracepoint.c (struct tracepoint_action_ops): Remove.
4628 (struct tracepoint_action): Remove ops.
4629 (m_tracepoint_action_download, r_tracepoint_action_download)
4630 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4631 size and offset accordingly.
4632 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4633 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4634 (tracepoint_action_send, tracepoint_action_download): New functions.
4635 Helpers for trace action handlers.
4636 (add_tracepoint_action): Remove setup actions ops.
4637 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4639 2016-02-10 Yao Qi <yao.qi@linaro.org>
4641 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4643 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4645 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4647 * configure: Regenerate.
4649 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4651 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4652 void * to gdb_byte *.
4653 * linux-low.c (siginfo_fixup): Likewise.
4654 (linux_xfer_siginfo): Likewise.
4655 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4657 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4659 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4661 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4663 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4665 * linux-x86-low.c [__x86_64__]: Include
4666 "nat/amd64-linux-siginfo.h".
4667 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4668 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4669 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4670 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4671 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4672 (cpt_si_fd, si_timerid, si_overrun): Move from
4673 nat/amd64-linux-siginfo.c.
4674 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4676 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4678 * server.c (skip_to_semicolon): Remove.
4679 (process_point_options): Use strchrnul instead of
4682 2016-01-26 Yao Qi <yao.qi@linaro.org>
4684 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4685 * linux-low.c (install_software_single_step_breakpoints): Don't
4686 call regcache_read_pc.
4687 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4690 2016-01-26 Yao Qi <yao.qi@linaro.org>
4692 * linux-low.c (install_software_single_step_breakpoints): Call
4693 regcache_read_pc instead of get_pc.
4695 2016-01-26 Yao Qi <yao.qi@linaro.org>
4697 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4698 (unblock_async_io): Rename to ...
4699 (block_unblock_async_io): ... it. New function.
4700 (enable_async_io): Don't install SIGIO handler. Unblock it
4702 (disable_async_io): Don't ignore SIGIO. Block it instead.
4703 (initialize_async_io): Install SIGIO handler. Don't call
4706 2016-01-26 Yao Qi <yao.qi@linaro.org>
4708 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4709 first character is '\003', call *the_target->request_interrupt.
4711 2016-01-25 Yao Qi <yao.qi@linaro.org>
4713 * remote-utils.c (new_thread_notify): Remove.
4714 (dead_thread_notify): Likewise.
4715 * remote-utils.h (new_thread_notify): Remove declaration.
4716 (dead_thread_notify): Likewise.
4718 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4720 * gdb.trace/pending.exp: Fix expected message on continue.
4722 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4724 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4725 it works properly on big-endian machines where sizeof (CORE_ADDR)
4728 2016-01-21 Pedro Alves <palves@redhat.com>
4730 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4731 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4732 * configure: Regenerate.
4734 2016-01-21 Yao Qi <yao.qi@linaro.org>
4736 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4737 is_thumb and set it according to CPSR saved on the stack.
4738 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4739 arm_sigreturn_next_pc.
4741 2016-01-18 Yao Qi <yao.qi@linaro.org>
4743 * linux-low.c (linux_set_pc_64bit): New function.
4744 (linux_get_pc_64bit): New function.
4745 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4747 * linux-sparc-low.c (debug_threads): Remove declaration.
4748 (sparc_get_pc): Remove.
4749 (the_low_target): Use linux_get_pc_64bit instead of
4751 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4752 (the_low_target): Use linux_get_pc_64bit and
4755 2016-01-18 Yao Qi <yao.qi@linaro.org>
4757 * linux-arm-low.c (debug_threads): Remove declaration.
4758 (arm_get_pc, arm_set_pc): Remove.
4759 (the_low_target): Use linux_get_pc_32bit and
4761 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4762 (the_low_target): Use linux_get_pc_32bit and
4764 * linux-cris-low.c (debug_threads): Remove declaration.
4765 (cris_get_pc, cris_set_pc,): Remove.
4766 (the_low_target): Use linux_get_pc_32bit and
4768 * linux-crisv32-low.c (debug_threads): Remove declaration.
4769 (cris_get_pc, cris_set_pc): Remove.
4770 (the_low_target): Use linux_get_pc_32bit and
4772 * linux-low.c: Include inttypes.h.
4773 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4774 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4775 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4776 (the_low_target): Use linux_get_pc_32bit and
4778 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4779 (the_low_target): Use linux_get_pc_32bit and
4781 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4782 (the_low_target): Use linux_get_pc_32bit and
4784 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4785 (the_low_target): Use linux_get_pc_32bit and
4787 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4788 (the_low_target): Use linux_get_pc_32bit and
4791 2016-01-18 Gary Benson <gbenson@redhat.com>
4793 * configure.ac (AC_FUNC_FORK): New check.
4794 * config.in: Regenerate.
4795 * configure: Likewise.
4797 2016-01-14 Yao Qi <yao.qi@linaro.org>
4799 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4800 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4801 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4802 arm_get_next_pcs_ctor.
4804 2016-01-12 Josh Stone <jistone@redhat.com>
4805 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4807 * inferiors.h: Include "gdb_vecs.h".
4808 (struct process_info): Add syscalls_to_catch.
4809 * inferiors.c (remove_process): Free syscalls_to_catch.
4810 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4811 syscall_return stops.
4812 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4813 * server.c (handle_general_set): Handle QCatchSyscalls.
4814 (handle_query): Report support for QCatchSyscalls.
4815 * target.h (struct target_ops): Add supports_catch_syscall.
4816 (target_supports_catch_syscall): New macro.
4817 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4818 (struct lwp_info): Add syscall_state.
4819 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4820 Maintain syscall_state and syscalls_to_catch across exec.
4821 (get_syscall_trapinfo): New function, proxy to the_low_target.
4822 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4823 (linux_low_filter_event): Toggle syscall_state entry/return for
4824 syscall traps, and set it ignored for all others.
4825 (gdb_catching_syscalls_p): New function.
4826 (gdb_catch_this_syscall_p): New function.
4827 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4828 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4829 (linux_supports_catch_syscall): New function.
4830 (linux_target_ops): Install it.
4831 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4832 (the_low_target): Install it.
4834 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4836 * acinclude.m4: Include new ../warning.m4 file.
4837 * configure: Regenerated.
4838 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4840 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4842 * ax.c (is_goto_target): Mark static.
4843 * linux-low.c (register_addr): Likewise.
4844 (linux_fetch_registers, linux_store_registers): Likewise.
4845 * mem-break.c (any_persistent_commands): Fix old prototype.
4846 (add_commands_to_breakpoint): Mark static.
4847 * regcache.c (find_register_by_name): Delete unused func.
4848 * remote-utils.c (hex_or_minus_one): Mark static.
4849 * server.c (monitor_show_help): Mark static.
4850 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4851 handle_v_requests): Likewise.
4853 2016-01-12 Pedro Alves <palves@redhat.com>
4855 Remove use of the registered trademark symbol throughout.
4857 2016-01-08 Yao Qi <yao.qi@linaro.org>
4859 * remote-utils.c (getpkt): If c is '\003', call target hook
4862 2016-01-06 Yao Qi <yao.qi@linaro.org>
4864 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4865 linux-aarch32-low.c.
4866 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4867 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4868 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4869 (thumb2_breakpoint): Declare.
4870 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4871 linux-aarch32-low.h.
4872 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4873 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4874 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4876 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4878 * gdbreplay.c (gdbreplay_version): Change copyright year in
4880 * server.c (gdbserver_version): Likewise.
4882 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4884 * server.c (crc32_table): Delete.
4885 (crc32): Use libiberty's xcrc32 function.
4887 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4889 * lynx-low.c (lynx_delete_thread_callback): New function.
4890 (lynx_mourn): Properly delete our process and all of its
4891 threads. Remove call to clear_inferiors.
4893 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4895 * target.c (thread_search_callback): Add check that
4896 the thread_stopped target callback is not NULL before
4899 2015-12-21 Yao Qi <yao.qi@linaro.org>
4901 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4904 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4906 * server.c (handle_query): Call target_supports_software_single_step.
4908 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4910 * linux-low.c (single_step): New function.
4911 (linux_resume_one_lwp_throw): Call single_step.
4912 (start_step_over): Likewise.
4914 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4916 * Makefile.in (SFILES): Append arch/arm-linux.c,
4917 arch/arm-get-next-pcs.c.
4918 (arm-linux.o): New rule.
4919 (arm-get-next-pcs.o): New rule.
4920 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4922 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4923 to linux-aarch32-low.c.
4924 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4925 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4926 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4927 (thumb2_breakpoint_len): Likewise.
4928 (arm_is_thumb_mode): Make non-static.
4929 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4930 from linux-aarch32-low.c.
4931 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4932 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4933 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4934 (thumb2_breakpoint_len): Likewise.
4935 (arm_is_thumb_mode): New declaration.
4936 * linux-arm-low.c: Include arch/arm-linux.h
4937 aarch/arm-get-next-pcs.h, sys/syscall.h.
4938 (get_next_pcs_ops): New struct.
4939 (get_next_pcs_addr_bits_remove): New function.
4940 (get_next_pcs_is_thumb): New function.
4941 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4942 (arm_sigreturn_next_pc): Likewise.
4943 (get_next_pcs_syscall_next_pc): Likewise.
4944 (arm_gdbserver_get_next_pcs): Likewise.
4945 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4947 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4948 * server.h: Include gdb_vecs.h.
4950 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4952 * Makefile.in (SFILES): Append common/common-regcache.c.
4953 (OBS): Append common-regcache.o.
4954 (common-regcache.o): New rule.
4955 * regcache.c (init_register_cache): Initialize cache to
4957 (regcache_raw_read_unsigned): New function.
4958 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4959 register_status enum.
4961 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4963 * linux-aarch64-low.c (the_low_targets): Rename
4964 breakpoint_reinsert_addr to get_next_pcs.
4965 * linux-arm-low.c (the_low_targets): Likewise.
4966 * linux-bfin-low.c (the_low_targets): Likewise.
4967 * linux-cris-low.c (the_low_targets): Likewise.
4968 * linux-crisv32-low.c (the_low_targets): Likewise.
4969 * linux-low.c (can_software_single_step): Likewise.
4970 (install_software_single_step_breakpoints): New function.
4971 (start_step_over): Use install_software_single_step_breakpoints.
4972 * linux-low.h: New CORE_ADDR vector.
4973 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4975 * linux-mips-low.c (the_low_targets): Likewise.
4976 * linux-nios2-low.c (the_low_targets): Likewise.
4977 * linux-sparc-low.c (the_low_targets): Likewise.
4979 2015-12-17 Pedro Alves <palves@redhat.com>
4981 * linux-low.c (linux_kill_one_lwp): Remove references to
4983 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4985 (linux_init_signals): Delete.
4986 (initialize_low): Adjust.
4987 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4989 2015-12-16 Pedro Alves <palves@redhat.com>
4991 * configure.ac (compiler warning flags): When testing a
4992 -Wno-foo option, check whether -Wfoo works instead.
4993 * configure: Regenerate.
4995 2015-12-11 Don Breazeal <donb@codesourcery.com>
4997 * server.c (process_serial_event): Don't exit from gdbserver
4998 in remote mode if there are still active inferiors.
5000 2015-12-11 Yao Qi <yao.qi@linaro.org>
5002 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5003 arm_breakpoint_at if the process is 32-bit.
5005 2015-12-11 Yao Qi <yao.qi@linaro.org>
5007 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5010 2015-12-07 Yao Qi <yao.qi@linaro.org>
5012 * configure.srv: Append arm.o to srv_tgtobj for
5013 aarch64*-*-linux* target.
5014 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5015 from linux-arm-low.c.
5016 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5017 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5018 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5019 (thumb2_breakpoint_len): Likewise.
5020 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5021 (arm_breakpoint_kinds): Likewise.
5022 (arm_breakpoint_kind_from_pc): Likewise.
5023 (arm_sw_breakpoint_from_kind): Likewise.
5024 (arm_breakpoint_kind_from_current_state): Likewise.
5025 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5026 (arm_sw_breakpoint_from_kind): Declare.
5027 (arm_breakpoint_kind_from_current_state): Declare.
5028 (arm_breakpoint_at): Declare.
5029 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5030 arm_sw_breakpoint_from_kind if process is 32-bit.
5031 (aarch64_breakpoint_kind_from_pc): New function.
5032 (aarch64_breakpoint_kind_from_current_state): New function.
5033 (the_low_target): Initialize fields breakpoint_kind_from_pc
5034 and breakpoint_kind_from_current_state.
5035 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5036 linux-aarch32-low.c.
5037 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5038 (arm_breakpoint, arm_breakpoint_len): Likewise.
5039 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5040 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5041 (arm_is_thumb_mode): Likewise.
5042 (arm_breakpoint_at): Likewise.
5043 (arm_breakpoint_kind_from_pc): Likewise.
5044 (arm_sw_breakpoint_from_kind): Likewise.
5045 (arm_breakpoint_kind_from_current_state): Likewise.
5048 2015-08-04 Yao Qi <yao.qi@linaro.org>
5050 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5051 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5052 * server.c (extended_protocol): Remove "static".
5053 * server.h (extended_protocol): Declare it.
5055 2015-12-04 Josh Stone <jistone@redhat.com>
5057 * target.h (struct target_ops) <arch_setup>: Rename to ...
5058 (struct target_ops) <post_create_inferior>: ... this.
5059 (target_arch_setup): Rename to ...
5060 (target_post_create_inferior): ... this, calling post_create_inferior.
5061 * server.c (start_inferior): Update target_arch_setup calls to
5062 target_post_create_inferior.
5063 * linux-low.c (linux_low_ptrace_options): Forward declare.
5064 (linux_arch_setup): Update its comment for general use.
5065 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5066 (struct linux_target_ops): Use linux_post_create_inferior.
5067 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5068 to post_create_inferior.
5069 * nto-low.c (struct nto_target_ops): Likewise.
5070 * spu-low.c (struct spu_target_ops): Likewise.
5071 * win32-low.c (struct win32_target_ops): Likewise.
5073 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5075 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5077 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5079 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5080 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5081 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5082 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5083 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5084 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5085 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5086 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5087 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5088 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5089 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5090 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5092 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5094 * linux-low.c (linux_look_up_symbols): Don't call
5095 linux_supports_traceclone.
5096 * linux-low.h (thread_db_init): Remove use_events argument.
5097 * thread-db.c (thread_db_use_event): Remove global variable.
5098 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5099 (struct thread_db) <td_create_bp>: Remove field.
5100 (thread_db_create_event): Remove function.
5101 (thread_db_enable_reporting): Likewise.
5102 (find_one_thread): Don't check for thread_db_use_events.
5103 (attach_thread): Likewise.
5104 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5105 (try_thread_db_load_1): Don't check for thread_db_use_events.
5106 (thread_db_init): Remove use_events argument and thread events
5108 (remove_thread_event_breakpoints): Remove function.
5109 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5111 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5113 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5115 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5116 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5117 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5118 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5119 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5121 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5123 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5124 * linux-low.c (can_hardware_single_step): Use
5125 supports_hardware_single_step.
5126 (can_software_single_step): New function.
5127 (start_step_over): Call can_software_single_step.
5128 (linux_supports_hardware_single_step): New function.
5129 (struct target_ops) <supports_software_single_step>: Initialize.
5130 * linux-low.h (struct linux_target_ops)
5131 <supports_hardware_single_step>: Initialize.
5132 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5133 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5134 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5135 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5136 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5137 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5138 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5139 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5140 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5141 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5143 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5144 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5146 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5147 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5148 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5150 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5151 * target.h (struct target_ops): <supports_software_single_step>:
5153 (target_supports_software_single_step): New macro.
5155 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5157 * linux-low.c (linux_wait_1): Fix pc advance condition.
5158 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5159 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5161 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5163 * linux-arm-low.c (arm_is_thumb_mode): New function.
5164 (arm_breakpoint_at): Use arm_is_thumb_mode.
5165 (arm_breakpoint_kind_from_current_state): New function.
5166 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5168 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5169 (linux_breakpoint_kind_from_current_state): New function.
5170 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5171 * linux-low.h (struct linux_target_ops)
5172 <breakpoint_kind_from_current_state>: New field.
5173 * target.h (struct target_ops): Likewise.
5174 (target_breakpoint_kind_from_current_state): New macro.
5176 2015-11-30 Pedro Alves <palves@redhat.com>
5178 * linux-low.c (linux_resume): Wake up the event loop before
5181 2015-11-30 Pedro Alves <palves@redhat.com>
5183 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5185 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5187 * target.c (struct thread_search): New structure.
5188 (thread_search_callback): New function.
5189 (prev_general_thread): New global.
5190 (prepare_to_access_memory, done_accessing_memory): New functions.
5191 * target.h (prepare_to_access_memory, done_accessing_memory):
5192 Replace macros with function declarations.
5194 2015-11-30 Pedro Alves <palves@redhat.com>
5197 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5198 report TARGET_WAITKIND_NO_RESUMED.
5199 * remote-utils.c (prepare_resume_reply): Handle
5200 TARGET_WAITKIND_NO_RESUMED.
5201 * server.c (report_no_resumed): New global.
5202 (handle_query) <qSupported>: Handle "no-resumed+". Report
5203 "no-resumed+" support.
5204 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5205 return error if the client doesn't support no-resumed events.
5206 (push_stop_notification): New function.
5207 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5208 events if the client supports them.
5210 2015-11-30 Pedro Alves <palves@redhat.com>
5212 * linux-low.c (thread_still_has_status_pending_p): Don't check
5214 (lwp_resumed): New function.
5215 (status_pending_p_callback): Return early if the LWP is not
5216 supposed to be resumed.
5218 2015-11-30 Pedro Alves <palves@redhat.com>
5220 * linux-low.c (handle_extended_wait): Assert that the LWP's
5221 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5222 thread create events, leave the new child's status pending.
5223 (linux_low_filter_event): If GDB wants to hear about thread exit
5224 events, leave the LWP marked dead and don't delete it.
5225 (linux_wait_for_event_filtered): Don't check for thread exit.
5226 (filter_exit_event): New function.
5227 (linux_wait_1): Use it, when returning an exit event.
5228 (linux_resume_one_lwp_throw): Assert that the LWP's
5229 waitstatus is TARGET_WAITKIND_IGNORE.
5230 * remote-utils.c (prepare_resume_reply): Handle
5231 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5232 * server.c (report_thread_events): New global.
5233 (handle_general_set): Handle QThreadEvents.
5234 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5235 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5236 TARGET_WAITKIND_THREAD_EXITED.
5237 * server.h (report_thread_events): Declare.
5239 2015-11-30 Pedro Alves <palves@redhat.com>
5241 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5242 the thread's last_resume_kind was resume_stop.
5244 2015-11-30 Pedro Alves <palves@redhat.com>
5246 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5249 2015-11-30 Pedro Alves <palves@redhat.com>
5251 * server.c (handle_v_requests): Handle vCtrlC.
5253 2015-11-30 Pedro Alves <palves@redhat.com>
5255 * gdbthread.h (find_any_thread_of_pid): Declare.
5256 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5258 * server.c (handle_query): If current_thread is NULL, look for
5259 another thread of the selected process.
5261 2015-11-26 Daniel Colascione <dancol@dancol.org>
5262 Simon Marchi <simon.marchi@ericsson.com>
5264 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5265 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5267 * target.h (struct target_ops) <thread_name>: New field.
5268 (target_thread_name): New macro.
5270 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5272 * regcache.h (regcache_invalidate_pid): Add declaration.
5273 * regcache.c (regcache_invalidate_pid): New function, extracted
5274 from regcache_invalidate.
5275 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5276 Add trivial documentation comment.
5277 * lynx-low.c: Use regcache_invalidate_pid instead of
5278 regcache_invalidate.
5280 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5282 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5283 and Elf64_auxv_t if the target is Android.
5285 2015-11-22 Doug Evans <xdje42@gmail.com>
5287 * target.h: #include <sys/types.h>.
5289 2015-11-19 Pedro Alves <palves@redhat.com>
5291 * linux-low.c (linux_process_qsupported): Change prototype.
5293 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5295 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5296 and adjust to loop over all features.
5297 * server.c (handle_query) <qSupported>: Adjust to call
5298 target_process_qsupported once, passing it a vector of unprocessed
5300 * target.h (struct target_ops) <process_qsupported>: Change
5302 (target_process_qsupported): Adjust.
5304 2015-11-19 Pedro Alves <palves@redhat.com>
5306 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5308 * configure: Regenerate.
5310 2015-11-19 Pedro Alves <palves@redhat.com>
5312 * configure: Regenerate.
5314 2015-11-19 Yao Qi <yao.qi@linaro.org>
5316 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5319 2015-11-19 Yao Qi <yao.qi@linaro.org>
5321 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5322 (struct aarch64_operand): Move enum out.
5324 2015-11-19 Yao Qi <yao.qi@linaro.org>
5326 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5327 struct user_fpsimd_state *.
5328 (aarch64_store_fpregset): Likewise.
5330 2015-11-19 Yao Qi <yao.qi@linaro.org>
5332 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5333 struct user_pt_regs *.
5334 (aarch64_store_gregset): Likewise.
5336 2015-11-18 Pedro Alves <palves@redhat.com>
5338 * Makefile.in (all_object_files): Add $IPA_OBJS.
5340 2015-11-17 Pedro Alves <palves@redhat.com>
5342 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5343 GDB_SIGNAL_0 and gdb_signal_to_string.
5345 2015-11-17 Pedro Alves <palves@redhat.com>
5347 * win32-low.c (handle_output_debug_string): Remove parameter.
5348 (win32_kill): Remove our_status local and adjust call to
5349 handle_output_debug_string.
5350 (get_child_debug_event): Adjust call to
5351 handle_output_debug_string.
5353 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5355 * linux-mips-low.c (mips_fill_gregset): Add cast.
5356 (mips_store_gregset): Likewise.
5357 (mips_fill_fpregset): Likewise.
5358 (mips_store_fpregset): Likewise.
5360 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5362 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5365 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5367 * linux-mips-low.c (mips_linux_new_thread): Change type of
5368 watch_type to enum target_hw_bp_type.
5370 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5372 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5373 Change return type to arm_hwbp_type.
5375 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5377 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5378 (arm_store_gregset): Likewise.
5379 * linux-arm-low.c (arm_get_hwcap): Likewise.
5380 (arm_read_description): Likewise.
5382 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5384 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5386 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5388 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5389 (ppc_fill_vsxregset): Likewise.
5390 (ppc_store_vsxregset): Likewise.
5391 (ppc_fill_vrregset): Likewise.
5392 (ppc_store_vrregset): Likewise.
5393 (ppc_fill_evrregset): Likewise.
5394 (ppc_store_evrregset): Likewise.
5396 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5398 * linux-ppc-low.c (ppc_usrregs_info): Remove
5399 forward-declaration.
5400 (ppc_arch_setup): Move lower in file.
5402 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5404 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5405 (ps_pdwrite): Likewise.
5407 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5409 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5410 to after assert checks.
5412 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5414 * proc-service.c (ps_pdread): Add/adjust casts.
5415 (ps_pdwrite): Add/adjust casts.
5417 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5419 * server.c (handle_search_memory_1): Cast return value of
5422 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5424 * server.c (write_qxfer_response): Change type of data to
5427 2015-10-29 Pedro Alves <palves@redhat.com>
5429 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5431 2015-10-29 Pedro Alves <palves@redhat.com>
5433 * tracepoint.c (clear_installed_tracepoints): Add casts.
5435 2015-10-29 Pedro Alves <palves@redhat.com>
5437 * server.c (handle_v_cont, process_serial_event): Add enum
5438 gdb_signal casts to signal parsing code.
5440 2015-10-29 Pedro Alves <palves@redhat.com>
5442 * linux-low.h (NULL_REGSET): Define.
5443 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5444 * linux-arm-low.c (arm_regsets): Likewise.
5445 * linux-crisv32-low.c (cris_regsets): Likewise.
5446 * linux-m68k-low.c (m68k_regsets): Likewise.
5447 * linux-mips-low.c (mips_regsets): Likewise.
5448 * linux-nios2-low.c (nios2_regsets): Likewise.
5449 * linux-ppc-low.c (ppc_regsets): Likewise.
5450 * linux-s390-low.c (s390_regsets): Likewise.
5451 * linux-sh-low.c (sh_regsets): Likewise.
5452 * linux-sparc-low.c (sparc_regsets): Likewise.
5453 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5454 * linux-tile-low.c (tile_regsets): Likewise.
5455 * linux-x86-low.c (x86_regsets): Likewise.
5456 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5458 2015-10-29 Pedro Alves <palves@redhat.com>
5460 * linux-low.h (NULL_REGSET): Define.
5461 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5462 * linux-arm-low.c (arm_regsets): Likewise.
5463 * linux-crisv32-low.c (cris_regsets): Likewise.
5464 * linux-m68k-low.c (m68k_regsets): Likewise.
5465 * linux-mips-low.c (mips_regsets): Likewise.
5466 * linux-nios2-low.c (nios2_regsets): Likewise.
5467 * linux-ppc-low.c (ppc_regsets): Likewise.
5468 * linux-s390-low.c (s390_regsets): Likewise.
5469 * linux-sh-low.c (sh_regsets): Likewise.
5470 * linux-sparc-low.c (sparc_regsets): Likewise.
5471 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5472 * linux-tile-low.c (tile_regsets): Likewise.
5473 * linux-x86-low.c (x86_regsets): Likewise.
5474 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5476 2015-10-26 Doug Evans <dje@google.com>
5478 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5480 2015-10-26 Doug Evans <dje@google.com>
5482 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5484 2015-10-26 Doug Evans <dje@google.com>
5486 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5488 (attach_thread, find_new_threads_callback): Ditto.
5490 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5492 * mem-break.h (set_breakpoint_data): Remove.
5494 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5496 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5497 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5498 (initialize_low): Remove set_breakpoint_data call.
5499 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5500 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5501 (initialize_low): Remove set_breakpoint_data call.
5502 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5503 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5504 (initialize_low): Remove set_breakpoint_data call.
5506 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5508 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5509 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5510 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5511 * target.h (target_breakpoint_kind_from_pc): New macro.
5513 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5515 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5516 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5517 the default breakpoint kind.
5519 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5521 * linux-arm-low.c (arm_supports_z_point_type): Add software
5524 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5526 * linux-arm-low.c: Refactor breakpoint definitions.
5527 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5528 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5530 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5532 * Makefile.in: Add arm.c/o.
5533 * configure.srv: Likewise.
5534 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5535 (arm_breakpoint_kind_from_pc): New function.
5536 (arm_sw_breakpoint_from_kind): Return proper kind.
5537 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5539 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5541 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5543 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5544 (struct raw_breakpoint) <size>: Remove.
5545 (struct raw_breakpoint) <kind>: Add.
5546 (bp_size): New function.
5547 (bp_opcode): Likewise.
5548 (find_raw_breakpoint_at): Adjust for kind.
5549 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5550 (remove_memory_breakpoint): Adjust for kind call bp_size.
5551 (set_raw_breakpoint_at): Adjust for kind.
5552 (set_breakpoint): Likewise.
5553 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5554 (delete_raw_breakpoint): Adjust for kind.
5555 (delete_breakpoint): Likewise.
5556 (find_gdb_breakpoint): Likewise.
5557 (set_gdb_breakpoint_1): Likewise.
5558 (set_gdb_breakpoint): Likewise.
5559 (delete_gdb_breakpoint_1): Likewise.
5560 (delete_gdb_breakpoint): Likewise.
5561 (uninsert_raw_breakpoint): Likewise.
5562 (reinsert_raw_breakpoint): Likewise.
5563 (set_breakpoint_data): Remove.
5564 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5565 (check_mem_read): Adjust for kind call bp_size.
5566 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5567 (clone_one_breakpoint): Adjust for kind.
5568 * mem-break.h (set_gdb_breakpoint): Likewise.
5569 (delete_gdb_breakpoint): Likewise.
5570 * server.c (process_serial_event): Likewise.
5572 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5574 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5575 (struct linux_target_ops) <breakpoint>: Remove.
5576 (struct linux_target_ops) <breakpoint_len>: Remove.
5577 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5578 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5579 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5580 (arm_sw_breakpoint_from_kind): New function.
5581 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5582 (struct linux_target_ops) <breakpoint>: Remove.
5583 (struct linux_target_ops) <breakpoint_len>: Remove.
5584 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5585 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5586 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5587 (struct linux_target_ops) <breakpoint>: Remove.
5588 (struct linux_target_ops) <breakpoint_len>: Remove.
5589 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5590 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5591 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5592 (struct linux_target_ops) <breakpoint>: Remove.
5593 (struct linux_target_ops) <breakpoint_len>: Remove.
5594 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5595 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5596 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5597 and sw_breakpoint_from_kind to increment the pc.
5598 (linux_breakpoint_kind_from_pc): New function.
5599 (linux_sw_breakpoint_from_kind): New function.
5600 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5601 (initialize_low): Call breakpoint_kind_from_pc and
5602 sw_breakpoint_from_kind to replace breakpoint_data/len.
5603 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5605 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5606 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5607 (struct linux_target_ops) <breakpoint>: Remove.
5608 (struct linux_target_ops) <breakpoint_len>: Remove.
5609 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5610 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5611 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5612 (struct linux_target_ops) <breakpoint>: Remove.
5613 (struct linux_target_ops) <breakpoint_len>: Remove.
5614 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5615 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5616 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5617 (struct linux_target_ops) <breakpoint>: Remove.
5618 (struct linux_target_ops) <breakpoint_len>: Remove.
5619 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5620 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5621 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5622 (struct linux_target_ops) <breakpoint>: Remove.
5623 (struct linux_target_ops) <breakpoint_len>: Remove.
5624 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5625 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5626 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5627 (struct linux_target_ops) <breakpoint>: Remove.
5628 (struct linux_target_ops) <breakpoint_len>: Remove.
5629 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5630 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5631 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5632 (struct linux_target_ops) <breakpoint>: Remove.
5633 (struct linux_target_ops) <breakpoint_len>: Remove.
5634 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5635 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5636 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5637 (struct linux_target_ops) <breakpoint>: Remove.
5638 (struct linux_target_ops) <breakpoint_len>: Remove.
5639 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5640 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5641 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5642 (struct linux_target_ops) <breakpoint>: Remove.
5643 (struct linux_target_ops) <breakpoint_len>: Remove.
5644 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5645 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5646 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5647 (struct linux_target_ops) <breakpoint>: Remove.
5648 (struct linux_target_ops) <breakpoint_len>: Remove.
5649 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5650 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5651 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5652 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5653 (struct linux_target_ops) <breakpoint>: Remove.
5654 (struct linux_target_ops) <breakpoint_len>: Remove.
5655 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5656 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5657 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5658 (struct linux_target_ops) <breakpoint>: Remove.
5659 (struct linux_target_ops) <breakpoint_len>: Remove.
5660 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5661 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5663 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5665 * linux-cris-low.c (cris_get_pc): Remove void arg.
5667 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5669 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5672 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5674 * inferiors.c (thread_pid_matches_callback): New function.
5675 (find_thread_process): New function.
5676 (remove_thread): Reset current_thread.
5677 (remove_process): Assert threads have been removed first.
5679 2015-10-15 Yao Qi <yao.qi@linaro.org>
5681 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5683 (aarch64_remove_point): Likewise.
5684 * regcache.c (regcache_register_size): New function.
5686 2015-10-12 Yao Qi <yao.qi@linaro.org>
5688 * linux-aarch64-low.c: Update all callers as emit_load_store
5689 is renamed to aarch64_emit_load_store.
5691 2015-10-12 Yao Qi <yao.qi@linaro.org>
5693 * linux-aarch64-low.c: Update all callers of function renaming
5694 from emit_insn to aarch64_emit_insn.
5696 2015-10-12 Yao Qi <yao.qi@linaro.org>
5698 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5699 arch/aarch64-insn.h.
5700 (struct aarch64_memory_operand): Likewise.
5702 (emit_insn): Move to arch/aarch64-insn.c.
5703 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5704 (emit_load_store): Move to arch/aarch64-insn.c.
5705 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5706 (can_encode_int32): Remove.
5708 2015-10-12 Yao Qi <yao.qi@linaro.org>
5710 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5711 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5712 (aarch64_relocate_instruction): Likewise.
5713 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5714 (struct aarch64_insn_visitor): Likewise.
5716 2015-10-12 Yao Qi <yao.qi@linaro.org>
5718 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5719 (struct aarch64_insn_visitor): New.
5720 (struct aarch64_insn_relocation_data): New.
5721 (aarch64_ftrace_insn_reloc_b): New function.
5722 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5723 (aarch64_ftrace_insn_reloc_cb): Likewise.
5724 (aarch64_ftrace_insn_reloc_tb): Likewise.
5725 (aarch64_ftrace_insn_reloc_adr): Likewise.
5726 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5727 (aarch64_ftrace_insn_reloc_others): Likewise.
5729 (aarch64_relocate_instruction): Use visitor.
5731 2015-10-12 Yao Qi <yao.qi@linaro.org>
5733 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5734 int. Add argument buf.
5735 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5736 aarch64_relocate_instruction.
5738 2015-10-12 Yao Qi <yao.qi@linaro.org>
5740 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5741 argument insn. Remove local variable insn. Don't call
5743 (aarch64_install_fast_tracepoint_jump_pad): Call
5746 2015-09-30 Yao Qi <yao.qi@linaro.org>
5748 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5749 (emit_load_store_pair): Likewise.
5751 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5753 * dll.c (match_dll): Add cast(s).
5754 (unloaded_dll): Likewise.
5755 * linux-low.c (second_thread_of_pid_p): Likewise.
5756 (delete_lwp_callback): Likewise.
5757 (count_events_callback): Likewise.
5758 (select_event_lwp_callback): Likewise.
5759 (linux_set_resume_request): Likewise.
5760 * server.c (accumulate_file_name_length): Likewise.
5761 (emit_dll_description): Likewise.
5762 (handle_qxfer_threads_worker): Likewise.
5763 (visit_actioned_threads): Likewise.
5764 * thread-db.c (any_thread_of): Likewise.
5765 * tracepoint.c (same_process_p): Likewise.
5766 (match_blocktype): Likewise.
5767 (build_traceframe_info_xml): Likewise.
5769 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5771 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5773 (gdb_unparse_agent_expr): Likewise.
5774 * hostio.c (require_data): Likewise.
5775 (handle_pread): Likewise.
5776 * linux-low.c (disable_regset): Likewise.
5777 (fetch_register): Likewise.
5778 (store_register): Likewise.
5779 (get_dynamic): Likewise.
5780 (linux_qxfer_libraries_svr4): Likewise.
5781 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5782 (set_fast_tracepoint_jump): Likewise.
5783 (uninsert_fast_tracepoint_jumps_at): Likewise.
5784 (reinsert_fast_tracepoint_jumps_at): Likewise.
5785 (validate_inserted_breakpoint): Likewise.
5786 (clone_agent_expr): Likewise.
5787 * regcache.c (init_register_cache): Likewise.
5788 * remote-utils.c (putpkt_binary_1): Likewise.
5789 (decode_M_packet): Likewise.
5790 (decode_X_packet): Likewise.
5791 (look_up_one_symbol): Likewise.
5792 (relocate_instruction): Likewise.
5793 (monitor_output): Likewise.
5794 * server.c (handle_search_memory): Likewise.
5795 (handle_qxfer_exec_file): Likewise.
5796 (handle_qxfer_libraries): Likewise.
5797 (handle_qxfer): Likewise.
5798 (handle_query): Likewise.
5799 (handle_v_cont): Likewise.
5800 (handle_v_run): Likewise.
5801 (captured_main): Likewise.
5802 * target.c (write_inferior_memory): Likewise.
5803 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5804 * tracepoint.c (init_trace_buffer): Likewise.
5805 (add_tracepoint_action): Likewise.
5806 (add_traceframe): Likewise.
5807 (add_traceframe_block): Likewise.
5808 (cmd_qtdpsrc): Likewise.
5809 (cmd_qtdv): Likewise.
5810 (cmd_qtstatus): Likewise.
5811 (response_source): Likewise.
5812 (response_tsv): Likewise.
5813 (cmd_qtnotes): Likewise.
5814 (gdb_collect): Likewise.
5815 (initialize_tracepoint): Likewise.
5817 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5819 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5820 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5821 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5823 (enum aarch64_condition_codes): New enum.
5824 (w0): New static global.
5827 (struct aarch64_memory_operand) <type>: New
5828 MEMORY_OPERAND_POSTINDEX type.
5829 (postindex_memory_operand): New helper function.
5830 (emit_ret): New function.
5831 (emit_load_store_pair): New function, factored out of emit_stp
5832 with support for MEMORY_OPERAND_POSTINDEX.
5833 (emit_stp): Rewrite using emit_load_store_pair.
5834 (emit_ldp): New function.
5835 (emit_load_store): Likewise.
5836 (emit_ldr): Mention post-index instruction in comment.
5837 (emit_ldrh): New function.
5838 (emit_ldrb): New function.
5839 (emit_ldrsw): Mention post-index instruction in comment.
5840 (emit_str): Likewise.
5841 (emit_subs): New function.
5842 (emit_cmp): Likewise.
5843 (emit_and): Likewise.
5844 (emit_orr): Likewise.
5845 (emit_orn): Likewise.
5846 (emit_eor): Likewise.
5847 (emit_mvn): Likewise.
5848 (emit_lslv): Likewise.
5849 (emit_lsrv): Likewise.
5850 (emit_asrv): Likewise.
5851 (emit_mul): Likewise.
5852 (emit_sbfm): Likewise.
5853 (emit_sbfx): Likewise.
5854 (emit_ubfm): Likewise.
5855 (emit_ubfx): Likewise.
5856 (emit_csinc): Likewise.
5857 (emit_cset): Likewise.
5858 (emit_nop): Likewise.
5859 (emit_ops_insns): New helper function.
5860 (emit_pop): Likewise.
5861 (emit_push): Likewise.
5862 (aarch64_emit_prologue): New function.
5863 (aarch64_emit_epilogue): Likewise.
5864 (aarch64_emit_add): Likewise.
5865 (aarch64_emit_sub): Likewise.
5866 (aarch64_emit_mul): Likewise.
5867 (aarch64_emit_lsh): Likewise.
5868 (aarch64_emit_rsh_signed): Likewise.
5869 (aarch64_emit_rsh_unsigned): Likewise.
5870 (aarch64_emit_ext): Likewise.
5871 (aarch64_emit_log_not): Likewise.
5872 (aarch64_emit_bit_and): Likewise.
5873 (aarch64_emit_bit_or): Likewise.
5874 (aarch64_emit_bit_xor): Likewise.
5875 (aarch64_emit_bit_not): Likewise.
5876 (aarch64_emit_equal): Likewise.
5877 (aarch64_emit_less_signed): Likewise.
5878 (aarch64_emit_less_unsigned): Likewise.
5879 (aarch64_emit_ref): Likewise.
5880 (aarch64_emit_if_goto): Likewise.
5881 (aarch64_emit_goto): Likewise.
5882 (aarch64_write_goto_address): Likewise.
5883 (aarch64_emit_const): Likewise.
5884 (aarch64_emit_call): Likewise.
5885 (aarch64_emit_reg): Likewise.
5886 (aarch64_emit_pop): Likewise.
5887 (aarch64_emit_stack_flush): Likewise.
5888 (aarch64_emit_zero_ext): Likewise.
5889 (aarch64_emit_swap): Likewise.
5890 (aarch64_emit_stack_adjust): Likewise.
5891 (aarch64_emit_int_call_1): Likewise.
5892 (aarch64_emit_void_call_2): Likewise.
5893 (aarch64_emit_eq_goto): Likewise.
5894 (aarch64_emit_ne_goto): Likewise.
5895 (aarch64_emit_lt_goto): Likewise.
5896 (aarch64_emit_le_goto): Likewise.
5897 (aarch64_emit_gt_goto): Likewise.
5898 (aarch64_emit_ge_got): Likewise.
5899 (aarch64_emit_ops_impl): New static global variable.
5900 (aarch64_emit_ops): New target function, return
5901 &aarch64_emit_ops_impl.
5902 (struct linux_target_ops): Install it.
5904 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5906 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5907 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5909 * linux-aarch64-ipa.c: New file.
5910 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5912 (aarch64_get_thread_area): New target method.
5913 (extract_signed_bitfield): New helper function.
5914 (aarch64_decode_ldr_literal): New function.
5915 (enum aarch64_opcodes): New enum.
5916 (struct aarch64_register): New struct.
5917 (struct aarch64_operand): New struct.
5918 (x0): New static global.
5927 (aarch64_register): New helper function.
5928 (register_operand): Likewise.
5929 (immediate_operand): Likewise.
5930 (struct aarch64_memory_operand): New struct.
5931 (offset_memory_operand): New helper function.
5932 (preindex_memory_operand): Likewise.
5933 (enum aarch64_system_control_registers): New enum.
5934 (ENCODE): New macro.
5935 (emit_insn): New helper function.
5936 (emit_b): New function.
5937 (emit_bcond): Likewise.
5938 (emit_cb): Likewise.
5939 (emit_tb): Likewise.
5940 (emit_blr): Likewise.
5941 (emit_stp): Likewise.
5942 (emit_ldp_q_offset): Likewise.
5943 (emit_stp_q_offset): Likewise.
5944 (emit_load_store): Likewise.
5945 (emit_ldr): Likewise.
5946 (emit_ldrsw): Likewise.
5947 (emit_str): Likewise.
5948 (emit_ldaxr): Likewise.
5949 (emit_stxr): Likewise.
5950 (emit_stlr): Likewise.
5951 (emit_data_processing_reg): Likewise.
5952 (emit_data_processing): Likewise.
5953 (emit_add): Likewise.
5954 (emit_sub): Likewise.
5955 (emit_mov): Likewise.
5956 (emit_movk): Likewise.
5957 (emit_mov_addr): Likewise.
5958 (emit_mrs): Likewise.
5959 (emit_msr): Likewise.
5960 (emit_sevl): Likewise.
5961 (emit_wfe): Likewise.
5962 (append_insns): Likewise.
5963 (can_encode_int32_in): New helper function.
5964 (aarch64_relocate_instruction): New function.
5965 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5966 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5967 (struct linux_target_ops): Install aarch64_get_thread_area,
5968 aarch64_install_fast_tracepoint_jump_pad and
5969 aarch64_get_min_fast_tracepoint_insn_len.
5971 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5973 * Makefile.in (aarch64-insn.o): New rule.
5974 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5976 2015-09-21 Yao Qi <yao.qi@linaro.org>
5978 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5980 2015-09-21 Yao Qi <yao.qi@linaro.org>
5982 * tracepoint.c (max_jump_pad_size): Remove.
5984 2015-09-18 Yao Qi <yao.qi@linaro.org>
5986 * linux-aarch64-low.c: Don't include sys/uio.h.
5987 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5989 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5991 * tracepoint.c (eval_result_type): Change prototype.
5992 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5994 2015-09-15 Pedro Alves <palves@redhat.com>
5996 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5997 Check whether to report exec events instead of checking whether
5998 multiprocess is enabled.
6000 2015-09-15 Pedro Alves <palves@redhat.com>
6003 * remote-utils.c (prepare_resume_reply): Merge
6004 TARGET_WAITKIND_VFORK_DONE switch case with the
6005 TARGET_WAITKIND_FORKED case.
6007 2015-09-15 Yao Qi <yao.qi@linaro.org>
6009 * server.c (handle_query): Check string comparison using
6010 "else if" instead of "if".
6012 2015-09-15 Yao Qi <yao.qi@linaro.org>
6014 * server.c (vCont_supported): New global variable.
6015 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6016 matches. Append ";vContSupported+" to own_buf.
6017 (handle_v_requests): Append ";s;S" to own_buf if target supports
6018 hardware single step or vCont_supported is false.
6019 (capture_main): Set vCont_supported to zero.
6021 2015-09-15 Yao Qi <yao.qi@linaro.org>
6023 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6025 (linux_supports_hardware_single_step): ... New function.
6026 (linux_target_ops): Update.
6027 * lynx-low.c (lynx_target_ops): Set field
6028 supports_hardware_single_step to target_can_do_hardware_single_step.
6029 * nto-low.c (nto_target_ops): Likewise.
6030 * spu-low.c (spu_target_ops): Likewise.
6031 * win32-low.c (win32_target_ops): Likewise.
6032 * target.c (target_can_do_hardware_single_step): New function.
6033 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6034 Remove. <supports_hardware_single_step>: New field.
6035 (target_supports_conditional_breakpoints): Remove.
6036 (target_supports_hardware_single_step): New macro.
6037 (target_can_do_hardware_single_step): Declare.
6038 * server.c (handle_query): Use target_supports_hardware_single_step
6039 instead of target_supports_conditional_breakpoints.
6041 2015-09-15 Yao Qi <yao.qi@linaro.org>
6043 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6045 (struct linux_target_ops the_low_target): Install
6046 aarch64_linux_siginfo_fixup.
6048 2015-09-11 Don Breazeal <donb@codesourcery.com>
6049 Luis Machado <lgustavo@codesourcery.com>
6051 * linux-low.c (linux_mourn): Static declaration.
6052 (linux_arch_setup): Move in front of
6053 handle_extended_wait.
6054 (linux_arch_setup_thread): New function.
6055 (handle_extended_wait): Handle exec events. Call
6056 linux_arch_setup_thread. Make event_lwp argument a
6057 pointer-to-a-pointer.
6058 (check_zombie_leaders): Do not check stopped threads.
6059 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6060 (linux_low_filter_event): Add lwp and thread for exec'ing
6061 non-leader thread if leader thread has been deleted.
6062 Refactor code into linux_arch_setup_thread and call it.
6063 Pass child lwp pointer by reference to handle_extended_wait.
6064 (linux_wait_for_event_filtered): Update comment.
6065 (linux_wait_1): Prevent clobbering exec event status.
6066 (linux_supports_exec_events): New function.
6067 (linux_target_ops) <supports_exec_events>: Initialize new member.
6068 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6070 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6071 * server.c (report_exec_events): New global variable.
6072 (handle_query): Handle qSupported query for exec-events feature.
6073 (captured_main): Initialize report_exec_events.
6074 * server.h (report_exec_events): Declare new global variable.
6075 * target.h (struct target_ops) <supports_exec_events>: New
6077 (target_supports_exec_events): New macro.
6078 * win32-low.c (win32_target_ops) <supports_exec_events>:
6079 Initialize new member.
6081 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6083 * linux-low.c (linux_low_enable_btrace): Remove.
6084 (linux_target_ops): Replace linux_low_enable_btrace with
6085 linux_enable_btrace.
6087 2015-09-03 Yao Qi <yao.qi@linaro.org>
6089 * linux-aarch64-low.c (aarch64_insert_point): Call
6090 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6093 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6095 * linux-low.c (check_stopped_by_breakpoint): Use
6096 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6098 2015-08-27 Pedro Alves <palves@redhat.com>
6100 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6102 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6104 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6105 the XNEW-family equivalent.
6106 (compile_bytecodes): Likewise.
6107 * dll.c (loaded_dll): Likewise.
6108 * event-loop.c (append_callback_event): Likewise.
6109 (create_file_handler): Likewise.
6110 (create_file_event): Likewise.
6111 * hostio.c (handle_open): Likewise.
6112 * inferiors.c (add_thread): Likewise.
6113 (add_process): Likewise.
6114 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6115 * linux-arm-low.c (arm_new_process): Likewise.
6116 (arm_new_thread): Likewise.
6117 * linux-low.c (add_to_pid_list): Likewise.
6118 (linux_add_process): Likewise.
6119 (handle_extended_wait): Likewise.
6120 (add_lwp): Likewise.
6121 (enqueue_one_deferred_signal): Likewise.
6122 (enqueue_pending_signal): Likewise.
6123 (linux_resume_one_lwp_throw): Likewise.
6124 (linux_resume_one_thread): Likewise.
6125 (linux_read_memory): Likewise.
6126 (linux_write_memory): Likewise.
6127 * linux-mips-low.c (mips_linux_new_process): Likewise.
6128 (mips_linux_new_thread): Likewise.
6129 (mips_add_watchpoint): Likewise.
6130 * linux-x86-low.c (initialize_low_arch): Likewise.
6131 * lynx-low.c (lynx_add_process): Likewise.
6132 * mem-break.c (set_raw_breakpoint_at): Likewise.
6133 (set_breakpoint): Likewise.
6134 (add_condition_to_breakpoint): Likewise.
6135 (add_commands_to_breakpoint): Likewise.
6136 (clone_agent_expr): Likewise.
6137 (clone_one_breakpoint): Likewise.
6138 * regcache.c (new_register_cache): Likewise.
6139 * remote-utils.c (look_up_one_symbol): Likewise.
6140 * server.c (queue_stop_reply): Likewise.
6141 (start_inferior): Likewise.
6142 (queue_stop_reply_callback): Likewise.
6143 (handle_target_event): Likewise.
6144 * spu-low.c (fetch_ppc_memory): Likewise.
6145 (store_ppc_memory): Likewise.
6146 * target.c (set_target_ops): Likewise.
6147 * thread-db.c (thread_db_load_search): Likewise.
6148 (try_thread_db_load_1): Likewise.
6149 * tracepoint.c (add_tracepoint): Likewise.
6150 (add_tracepoint_action): Likewise.
6151 (create_trace_state_variable): Likewise.
6152 (cmd_qtdpsrc): Likewise.
6153 (cmd_qtro): Likewise.
6154 (add_while_stepping_state): Likewise.
6155 * win32-low.c (child_add_thread): Likewise.
6156 (get_image_name): Likewise.
6158 2015-08-25 Yao Qi <yao.qi@linaro.org>
6160 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6162 2015-08-25 Yao Qi <yao.qi@linaro.org>
6164 * Makefile.in (aarch64-linux.o): New rule.
6165 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6167 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6168 (aarch64_init_debug_reg_state): Make it extern.
6169 (aarch64_linux_prepare_to_resume): Remove.
6171 2015-08-25 Yao Qi <yao.qi@linaro.org>
6173 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6174 lwp_arch_private_info and ptid_of_lwp.
6176 2015-08-25 Yao Qi <yao.qi@linaro.org>
6178 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6179 Find proc_info by find_process_pid. All callers updated.
6181 2015-08-25 Yao Qi <yao.qi@linaro.org>
6183 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6185 (debug_reg_change_callback): Remove.
6186 (aarch64_notify_debug_reg_change): Remove.
6188 2015-08-25 Yao Qi <yao.qi@linaro.org>
6190 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6191 Call current_lwp_ptid.
6193 2015-08-25 Yao Qi <yao.qi@linaro.org>
6195 * linux-aarch64-low.c (debug_reg_change_callback): Use
6198 2015-08-25 Yao Qi <yao.qi@linaro.org>
6200 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6202 2015-08-25 Yao Qi <yao.qi@linaro.org>
6204 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6206 2015-08-25 Yao Qi <yao.qi@linaro.org>
6208 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6211 2015-08-25 Yao Qi <yao.qi@linaro.org>
6213 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6215 (debug_reg_change_callback): Remove argument entry and add argument
6216 lwp. Remove local variable thread. Don't print thread id in the
6217 debugging output. Don't check whether pid of thread equals to pid.
6218 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6219 iterate_over_lwps instead find_inferior.
6221 2015-08-24 Pedro Alves <palves@redhat.com>
6223 * inferiors.c (get_first_process): New function.
6224 * inferiors.h (get_first_process): New declaration.
6225 * remote-utils.c (read_ptid): Default to the first process in the
6226 list, instead of to the current thread's process.
6228 2015-08-24 Pedro Alves <palves@redhat.com>
6230 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6231 * event-loop.c: Likewise.
6232 * remote-utils.c: Likewise.
6233 * tracepoint.c: Likewise.
6235 2015-08-24 Pedro Alves <palves@redhat.com>
6237 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6240 2015-08-21 Pedro Alves <palves@redhat.com>
6242 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6243 instead of literal 1.
6245 2015-08-21 Pedro Alves <palves@redhat.com>
6247 * tdesc.c (default_description): Explicitly zero-initialize.
6249 2015-08-21 Pedro Alves <palves@redhat.com>
6252 * inferiors.c (remove_thread): Discard any pending stop reply for
6254 * server.c (remove_all_on_match_pid): Rename to ...
6255 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6257 (discard_queued_stop_replies): Change parameter to a ptid. Now
6259 (handle_v_kill, kill_inferior_callback, captured_main)
6260 (process_serial_event): Adjust.
6261 * server.h (discard_queued_stop_replies): Declare.
6263 2015-08-21 Pedro Alves <palves@redhat.com>
6265 * linux-low.c (wait_for_sigstop): Always switch to no thread
6266 selected if the previously current thread dies.
6267 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6268 process instead of the current thread's.
6269 * remote-utils.c (input_interrupt): Don't check if there's no
6271 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6272 current thread to the general thread fails, error out.
6273 (handle_qxfer_auxv, handle_qxfer_libraries)
6274 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6275 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6276 (handle_query): Check if there's a thread selected instead of
6277 checking whether there's any thread in the thread list.
6278 (handle_qxfer_threads, handle_qxfer_btrace)
6279 (handle_qxfer_btrace_conf): Don't error out early if there's no
6280 thread in the thread list.
6281 (handle_v_cont, myresume): Don't set the current thread to the
6283 (process_serial_event) <Hg handling>: Also set thread_id if the
6284 previous general thread is still alive.
6285 (process_serial_event) <g/G handling>: If setting the current
6286 thread to the general thread fails, error out.
6287 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6288 thread's lwp instead of the current thread's.
6289 * target.c (set_desired_thread): If the desired thread was not
6290 found, leave the current thread pointing to NULL. Return an int
6291 (boolean) indicating success.
6292 * target.h (set_desired_thread): Change return type to int.
6294 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6296 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6297 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6299 (ps_get_thread_area): New function.
6301 2015-08-19 Gary Benson <gbenson@redhat.com>
6303 * hostio.c (handle_pread): Do not attempt to read more data
6304 than hostio_reply_with_data can fit in a packet.
6306 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6308 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6310 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6312 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6314 2015-08-06 Pedro Alves <palves@redhat.com>
6316 * tracepoint.c (expr_eval_result): Now an int.
6318 2015-08-06 Pedro Alves <palves@redhat.com>
6320 * gdbthread.h (struct regcache): Forward declare.
6321 (struct thread_info) <regcache_data>: Now a struct regcache
6323 * inferiors.c (inferior_regcache_data)
6324 (set_inferior_regcache_data): Now work with struct regcache
6326 * inferiors.h (struct regcache): Forward declare.
6327 (inferior_regcache_data, set_inferior_regcache_data): Now work
6328 with struct regcache pointers.
6329 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6330 (free_register_cache_thread): Remove struct regcache pointer
6333 2015-08-06 Pedro Alves <palves@redhat.com>
6335 * server.c (captured_main): On error, print the exception message
6336 to stderr, and if run_once is set, throw a quit.
6338 2015-08-06 Pedro Alves <palves@redhat.com>
6340 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6343 2015-08-06 Pedro Alves <palves@redhat.com>
6345 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6346 reading beyond the passed in buffer length.
6348 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6350 * tracepoint.c (symbol_list) <required>: Remove.
6352 2015-08-06 Pedro Alves <palves@redhat.com>
6354 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6355 count if stopping and suspending threads.
6356 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6357 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6358 (linux_detach): Complete an ongoing step-over.
6359 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6361 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6362 (linux_wait_1): If passing a signal to the inferior after
6363 finishing a step-over, unsuspend and re-resume all lwps. If we
6364 see a single-step event but the thread should be continuing, don't
6365 pass the trap to gdb.
6366 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6367 internal_error instead of gdb_assert.
6368 (enqueue_pending_signal): New function.
6369 (check_ptrace_stopped_lwp_gone): Add debug output.
6370 (start_step_over): Use internal_error instead of gdb_assert.
6371 (complete_ongoing_step_over): New function.
6372 (linux_resume_one_thread): Don't resume a suspended thread.
6373 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6376 2015-08-06 Pedro Alves <palves@redhat.com>
6378 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6379 (linux_thread_alive): Use lwp_is_marked_dead.
6380 (extended_event_reported): Delete.
6381 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6382 instead of extended_event_reported.
6383 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6385 (lwp_is_marked_dead): New function.
6386 (lwp_running): Use lwp_is_marked_dead.
6387 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6390 2015-08-06 Pedro Alves <palves@redhat.com>
6392 * linux-low.c (linux_wait_1): Move fork event output out of the
6393 !report_to_gdb check. Pass event_child->waitstatus to
6394 target_waitstatus_to_string instead of ourstatus.
6396 2015-08-04 Yao Qi <yao.qi@linaro.org>
6398 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6399 if current_thread is 32 bit.
6401 2015-08-04 Yao Qi <yao.qi@linaro.org>
6403 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6404 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6405 * server.c (extended_protocol): Remove "static".
6406 * server.h (extended_protocol): Declare it.
6408 2015-08-04 Yao Qi <yao.qi@linaro.org>
6410 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6411 both aarch64 and aarch32.
6412 (aarch64_set_pc): Likewise.
6414 2015-08-04 Yao Qi <yao.qi@linaro.org>
6416 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6417 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6418 arm-with-neon.xml to srv_xmlfiles.
6419 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6420 (is_64bit_tdesc): New function.
6421 (aarch64_linux_read_description): New function.
6422 (aarch64_arch_setup): Call aarch64_linux_read_description.
6423 (regs_info): Rename to regs_info_aarch64.
6424 (aarch64_regs_info): Return right regs_info.
6425 (initialize_low_arch): Call initialize_low_arch_aarch32.
6427 2015-08-04 Yao Qi <yao.qi@linaro.org>
6429 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6430 * linux-aarch32-low.c: New file.
6431 * linux-aarch32-low.h: New file.
6432 * linux-arm-low.c (arm_fill_gregset): Move it to
6433 linux-aarch32-low.c.
6434 (arm_store_gregset): Likewise.
6435 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6436 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6437 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6438 (regs_info): Rename to regs_info_arm.
6439 (arm_regs_info): Return regs_info_aarch32 if
6440 have_ptrace_getregset is 1 and target description is
6441 arm_with_neon or arm_with_vfpv3.
6442 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6443 Call initialize_low_arch_aarch32 instead.
6445 2015-08-04 Yao Qi <yao.qi@linaro.org>
6447 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6448 * linux-low.c: ... here.
6449 * linux-low.h (have_ptrace_getregset): Declare it.
6451 2015-08-04 Pedro Alves <palves@redhat.com>
6453 * thread-db.c (struct thread_db): Use new typedefs.
6454 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6456 (disable_thread_event_reporting): Cast result of dlsym to
6457 destination function pointer type.
6458 (thread_db_mourn): Use td_ta_delete_ftype.
6460 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6462 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6464 (CDX_BREAKPOINT): Define for R2.
6465 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6466 (the_low_target): Add comments.
6468 2015-07-30 Yao Qi <yao.qi@linaro.org>
6470 * linux-arm-low.c (arm_hwcap): Remove it.
6471 (arm_read_description): New local variable arm_hwcap. Don't
6472 set arm_hwcap to zero.
6474 2015-07-30 Yao Qi <yao.qi@linaro.org>
6476 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6477 Use regcache->tdesc instead.
6478 (arm_store_wmmxregset): Likewise.
6479 (arm_fill_vfpregset): Likewise.
6480 (arm_store_vfpregset): Likewise.
6482 2015-07-30 Yao Qi <yao.qi@linaro.org>
6484 * linux-arm-low.c: Include arch/arm.h.
6485 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6486 (arm_store_gregset): Likewise.
6488 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6490 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6491 ptrace's 4th parameter.
6493 2015-07-27 Yao Qi <yao.qi@linaro.org>
6495 * configure.srv (case aarch64*-*-linux*): Don't set
6498 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6500 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6502 * linux-arm-low.c: Likewise.
6503 * linux-cris-low.c: Likewise.
6504 * linux-crisv32-low.c: Likewise.
6505 * linux-low.c: Likewise.
6506 * linux-m68k-low.c: Likewise.
6507 * linux-mips-low.c: Likewise.
6508 * linux-nios2-low.c: Likewise.
6509 * linux-s390-low.c: Likewise.
6510 * linux-sparc-low.c: Likewise.
6511 * linux-tic6x-low.c: Likewise.
6512 * linux-tile-low.c: Likewise.
6513 * linux-x86-low.c: Likewise.
6515 2015-07-24 Pedro Alves <palves@redhat.com>
6517 * config.in: Regenerate.
6518 * configure: Regenerate.
6520 2015-07-24 Pedro Alves <palves@redhat.com>
6522 * acinclude.m4: Include ../ptrace.m4.
6523 * configure.ac: Call GDB_AC_PTRACE.
6524 * config.in, configure: Regenerate.
6526 2015-07-24 Yao Qi <yao.qi@linaro.org>
6528 * linux-low.c (linux_create_inferior): Remove setting to
6529 proc->priv->new_inferior.
6530 (linux_attach): Likewise.
6531 (linux_low_filter_event): Likewise.
6532 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6534 2015-07-24 Yao Qi <yao.qi@linaro.org>
6536 * linux-low.c (linux_arch_setup): New function.
6537 (linux_low_filter_event): If proc->tdesc is NULL and
6538 proc->attached is true, call the_low_target.arch_setup.
6539 Otherwise, keep status pending, and return.
6540 (linux_resume_one_lwp_throw): Don't call get_pc if
6541 thread->while_stepping isn't NULL. Don't call
6542 get_thread_regcache if proc->tdesc is NULL.
6543 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6544 (linux_target_ops): Install arch_setup.
6545 * server.c (start_inferior): Call the_target->arch_setup.
6546 * target.h (struct target_ops) <arch_setup>: New field.
6547 (target_arch_setup): New marco.
6548 * lynx-low.c (lynx_target_ops): Update.
6549 * nto-low.c (nto_target_ops): Update.
6550 * spu-low.c (spu_target_ops): Update.
6551 * win32-low.c (win32_target_ops): Update.
6553 2015-07-24 Yao Qi <yao.qi@linaro.org>
6555 * linux-low.c (linux_add_process): Don't set
6556 proc->priv->new_inferior.
6557 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6558 (linux_attach): Likewise.
6560 2015-07-24 Yao Qi <yao.qi@linaro.org>
6562 * server.c (start_inferior): Code refactor.
6564 2015-07-24 Yao Qi <yao.qi@linaro.org>
6566 * server.c (process_serial_event): Set general_thread.
6568 2015-07-21 Yao Qi <yao.qi@linaro.org>
6570 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6571 aarch64_linux_get_debug_reg_capacity.
6573 2015-07-17 Yao Qi <yao.qi@linaro.org>
6575 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6576 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6577 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6578 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6579 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6580 (AARCH64_HWP_ALIGNMENT): Likewise.
6581 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6582 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6583 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6584 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6585 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6586 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6587 (struct aarch64_debug_reg_state): Likewise.
6588 (struct arch_lwp_info): Likewise.
6589 (aarch64_align_watchpoint): Likewise.
6590 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6591 (aarch64_watchpoint_length): Likewise.
6592 (aarch64_point_encode_ctrl_reg): Likewise
6593 (aarch64_point_is_aligned): Likewise.
6594 (aarch64_align_watchpoint): Likewise.
6595 (aarch64_linux_set_debug_regs):
6596 (aarch64_dr_state_insert_one_point): Likewise.
6597 (aarch64_dr_state_remove_one_point): Likewise.
6598 (aarch64_handle_breakpoint): Likewise.
6599 (aarch64_handle_aligned_watchpoint): Likewise.
6600 (aarch64_handle_unaligned_watchpoint): Likewise.
6601 (aarch64_handle_watchpoint): Likewise.
6603 2015-07-17 Yao Qi <yao.qi@linaro.org>
6605 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6606 and don't aarch64_get_debug_reg_state. All callers update.
6607 (aarch64_handle_aligned_watchpoint): Likewise.
6608 (aarch64_handle_unaligned_watchpoint): Likewise.
6609 (aarch64_handle_watchpoint): Likewise.
6610 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6611 (aarch64_remove_point): Likewise.
6613 2015-07-17 Yao Qi <yao.qi@linaro.org>
6615 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6617 (aarch64_handle_unaligned_watchpoint): Likewise.
6619 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6621 Revert the previous 3 commits:
6622 Move gdb_regex* to common/
6623 Move linux_find_memory_regions_full & co.
6624 gdbserver build-id attribute generator
6626 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6627 Jan Kratochvil <jan.kratochvil@redhat.com>
6629 gdbserver build-id attribute generator.
6630 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6631 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6632 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6634 (get_dynamic): Use find_pdhr to traverse program headers.
6635 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6636 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6637 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6638 (get_hex_build_id): New.
6639 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6640 to reply XML document.
6642 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6643 Jan Kratochvil <jan.kratochvil@redhat.com>
6645 * target.c: Include target/target-utils.h and fcntl.h.
6646 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6647 (target_fileio_read_stralloc): New functions.
6649 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6651 * Makefile.in (OBS): Add gdb_regex.o.
6653 * config.in: Rebuilt.
6654 * configure: Rebuilt.
6656 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6657 Jan Kratochvil <jan.kratochvil@redhat.com>
6659 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6660 * Makefile.in (OBS): Add target-utils.o.
6661 (linux-maps.o, target-utils.o): New.
6662 * configure.srv (srv_linux_obj): Add linux-maps.o.
6664 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6666 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6668 (the_low_target): Install it.
6670 2015-07-14 Pedro Alves <palves@redhat.com>
6672 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6673 Instead, ignore ECHILD, and throw an error for other errnos.
6675 2015-07-10 Pedro Alves <palves@redhat.com>
6677 * event-loop.c (struct callback_event) <data>: Change type to
6678 gdb_client_data instance instead of gdb_client_data pointer.
6679 (append_callback_event): Adjust.
6681 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6683 * linux-aarch64-low.c: Add comments for each linux_target_ops
6684 method. Remove comments already covered in target_ops and
6685 linux_target_ops definitions.
6686 (the_low_target): Add comments for each unimplemented method.
6688 2015-07-09 Yao Qi <yao.qi@linaro.org>
6690 * linux-aarch64-low.c (aarch64_regmap): Remove.
6691 (aarch64_usrregs_info): Remove.
6692 (regs_info): Set field usrregs to NULL.
6694 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6696 * linux-low.c: Include "rsp-low.h"
6697 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6698 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6699 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6700 (handle_btrace_enable_pt): New.
6701 (handle_btrace_general_set): Support "pt".
6702 (handle_btrace_conf_general_set): Support "pt:size".
6704 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6706 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6709 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6711 * linux-aarch64-low.c: Remove comment about endianness.
6712 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6713 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6716 2015-06-24 Gary Benson <gbenson@redhat.com>
6718 * linux-i386-ipa.c (stdint.h): Do not include.
6719 * lynx-i386-low.c (stdint.h): Likewise.
6720 * lynx-ppc-low.c (stdint.h): Likewise.
6721 * mem-break.c (stdint.h): Likewise.
6722 * thread-db.c (stdint.h): Likewise.
6723 * tracepoint.c (stdint.h): Likewise.
6724 * win32-low.c (stdint.h): Likewise.
6726 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6728 * server.c (write_qxfer_response): Update call to
6729 remote_escape_output.
6731 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6732 Jan Kratochvil <jan.kratochvil@redhat.com>
6734 Merge multiple hex conversions.
6735 * gdbreplay.c (tohex): Rename to 'fromhex'.
6736 (logchar): Use fromhex.
6738 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6740 * server.c (handle_qxfer_libraries): Set `version' attribute for
6743 2015-06-10 Gary Benson <gbenson@redhat.com>
6745 * target.h (struct target_ops) <multifs_open>: New field.
6746 <multifs_unlink>: Likewise.
6747 <multifs_readlink>: Likewise.
6748 * linux-low.c (nat/linux-namespaces.h): New include.
6749 (linux_target_ops): Initialize the_target->multifs_open,
6750 the_target->multifs_unlink and the_target->multifs_readlink.
6751 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6752 * hostio.c (hostio_fs_pid): New static variable.
6753 (hostio_handle_new_gdb_connection): New function.
6754 (handle_setfs): Likewise.
6755 (handle_open): Use the_target->multifs_open as appropriate.
6756 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6757 (handle_readlink): Use the_target->multifs_readlink as
6759 (handle_vFile): Handle vFile:setfs packets.
6760 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6761 after target_handle_new_gdb_connection.
6763 2015-06-10 Gary Benson <gbenson@redhat.com>
6765 * configure.ac (AC_CHECK_FUNCS): Add setns.
6766 * config.in: Regenerate.
6767 * configure: Likewise.
6768 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6769 (linux-namespaces.o): New rule.
6770 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6772 2015-06-09 Gary Benson <gbenson@redhat.com>
6774 * hostio.c (handle_open): Process mode argument with
6775 fileio_to_host_mode.
6777 2015-06-01 Yao Qi <yao.qi@linaro.org>
6779 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6780 * linux-x86-low.c: Likewise.
6782 2015-05-28 Don Breazeal <donb@codesourcery.com>
6784 * linux-low.c (handle_extended_wait): Initialize
6785 thread_info.last_resume_kind for new fork children.
6787 2015-05-15 Pedro Alves <palves@redhat.com>
6789 * target.h (target_handle_new_gdb_connection): Rewrite using if
6790 wrapped in do/while.
6792 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6794 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6795 * configure, config.in: Regenerate.
6796 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6799 2015-05-12 Don Breazeal <donb@codesourcery.com>
6801 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6802 PTRACE_EVENT_VFORK_DONE.
6803 (linux_low_ptrace_options, extended_event_reported): Add vfork
6805 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6806 and "vforkdone" for RSP 'T' Stop Reply Packet.
6807 * server.h (report_vfork_events): Declare
6810 2015-05-12 Don Breazeal <donb@codesourcery.com>
6812 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6813 (the_low_target) <new_fork>: Initialize new member.
6814 * linux-arm-low.c (arm_new_fork): New function.
6815 (the_low_target) <new_fork>: Initialize new member.
6816 * linux-low.c (handle_extended_wait): Call new target function
6818 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6819 * linux-mips-low.c (mips_add_watchpoint): New function
6820 extracted from mips_insert_point.
6821 (the_low_target) <new_fork>: Initialize new member.
6822 (mips_linux_new_fork): New function.
6823 (mips_insert_point): Call mips_add_watchpoint.
6824 * linux-x86-low.c (x86_linux_new_fork): New function.
6825 (the_low_target) <new_fork>: Initialize new member.
6827 2015-05-12 Don Breazeal <donb@codesourcery.com>
6829 * linux-low.c (handle_extended_wait): Implement return value,
6830 rename argument 'event_child' to 'event_lwp', handle
6831 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6832 (linux_low_ptrace_options): New function.
6833 (linux_low_filter_event): Call linux_low_ptrace_options,
6834 use different argument fo linux_enable_event_reporting,
6835 use return value from handle_extended_wait.
6836 (extended_event_reported): New function.
6837 (linux_wait_1): Call extended_event_reported and set
6838 status to report fork events.
6839 (linux_write_memory): Add pid to debug message.
6840 (reset_lwp_ptrace_options_callback): New function.
6841 (linux_handle_new_gdb_connection): New function.
6842 (linux_target_ops): Initialize new structure member.
6843 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6844 * lynx-low.c: Initialize new structure member.
6845 * remote-utils.c (prepare_resume_reply): Implement stop reason
6846 "fork" for "T" stop message.
6847 * server.c (handle_query): Call handle_new_gdb_connection.
6848 * server.h (report_fork_events): Declare global flag.
6849 * target.h (struct target_ops) <handle_new_gdb_connection>:
6851 (target_handle_new_gdb_connection): New macro.
6852 * win32-low.c: Initialize new structure member.
6854 2015-05-12 Don Breazeal <donb@codesourcery.com>
6856 * mem-break.c (APPEND_TO_LIST): Define macro.
6857 (clone_agent_expr): New function.
6858 (clone_one_breakpoint): New function.
6859 (clone_all_breakpoints): New function.
6860 * mem-break.h: Declare new functions.
6862 2015-05-12 Don Breazeal <donb@codesourcery.com>
6864 * linux-low.c (linux_supports_fork_events): New function.
6865 (linux_supports_vfork_events): New function.
6866 (linux_target_ops): Initialize new structure members.
6867 (initialize_low): Call linux_check_ptrace_features.
6868 * lynx-low.c (lynx_target_ops): Initialize new structure
6870 * server.c (report_fork_events, report_vfork_events):
6872 (handle_query): Add new features to qSupported packet and
6874 (captured_main): Initialize new global variables.
6875 * target.h (struct target_ops) <supports_fork_events>:
6877 <supports_vfork_events>: New member.
6878 (target_supports_fork_events): New macro.
6879 (target_supports_vfork_events): New macro.
6880 * win32-low.c (win32_target_ops): Initialize new structure
6883 2015-05-12 Gary Benson <gbenson@redhat.com>
6885 * server.c (handle_qxfer_exec_file): Use current process
6888 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6890 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6891 Remove HAVE_PTRACE_GETREGS conditionals.
6892 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6893 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6895 2015-05-08 Yao Qi <yao.qi@linaro.org>
6897 * linux-low.c (linux_supports_conditional_breakpoints): New
6899 (linux_target_ops): Install new target method.
6900 * lynx-low.c (lynx_target_ops): Install NULL hook for
6901 supports_conditional_breakpoints.
6902 * nto-low.c (nto_target_ops): Likewise.
6903 * spu-low.c (spu_target_ops): Likewise.
6904 * win32-low.c (win32_target_ops): Likewise.
6905 * server.c (handle_query): Check
6906 target_supports_conditional_breakpoints.
6907 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6909 (target_supports_conditional_breakpoints): New macro.
6911 2015-05-06 Pedro Alves <palves@redhat.com>
6914 * server.c (start_inferior): If the process exits, mourn it.
6916 2015-04-21 Gary Benson <gbenson@redhat.com>
6918 * hostio.c (fileio_open_flags_to_host): Factored out to
6919 fileio_to_host_openflags in common/fileio.c. Single use
6922 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6924 * linux-xtensa-low.c (xtensa_fill_gregset)
6925 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6928 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6930 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6931 (regs_info): Replace usrregs pointer with NULL.
6933 2015-04-17 Gary Benson <gbenson@redhat.com>
6935 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6936 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6937 * server.c (handle_qxfer_exec_file): New function.
6938 (qxfer_packets): Add exec-file entry.
6939 (handle_query): Report qXfer:exec-file:read as supported packet.
6941 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6943 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6945 2015-04-09 Gary Benson <gbenson@redhat.com>
6947 * hostio-errno.c (errno_to_fileio_error): Remove function.
6948 Update caller to use remote_fileio_to_fio_error.
6950 2015-04-09 Yao Qi <yao.qi@linaro.org>
6952 * linux-low.c (linux_insert_point): Call
6953 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6954 (linux_remove_point): Call remove_memory_breakpoint if type is
6956 * linux-x86-low.c (x86_insert_point): Don't call
6957 insert_memory_breakpoint.
6958 (x86_remove_point): Don't call remove_memory_breakpoint.
6960 2015-04-01 Pedro Alves <palves@redhat.com>
6961 Cleber Rosa <crosa@redhat.com>
6963 * server.c (gdbserver_usage): Reorganize and extend the usage
6966 2015-03-24 Pedro Alves <palves@redhat.com>
6968 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6969 output. Also dump TRAP_TRACE.
6970 (linux_low_filter_event): In debug output, distinguish a
6971 resume_stop SIGSTOP from a delayed SIGSTOP.
6973 2015-03-24 Gary Benson <gbenson@redhat.com>
6975 * linux-x86-low.c (x86_linux_new_thread): Moved to
6977 (x86_linux_prepare_to_resume): Likewise.
6979 2015-03-24 Gary Benson <gbenson@redhat.com>
6981 * Makefile.in (x86-linux-dregs.o): New rule.
6982 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6983 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6984 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6985 (x86_linux_dr_get): Likewise.
6986 (x86_linux_dr_set): Likewise.
6987 (update_debug_registers_callback): Likewise.
6988 (x86_linux_dr_set_addr): Likewise.
6989 (x86_linux_dr_get_addr): Likewise.
6990 (x86_linux_dr_set_control): Likewise.
6991 (x86_linux_dr_get_control): Likewise.
6992 (x86_linux_dr_get_status): Likewise.
6993 (x86_linux_update_debug_registers): Likewise.
6995 2015-03-24 Gary Benson <gbenson@redhat.com>
6997 * linux-x86-low.c (x86_linux_update_debug_registers):
6998 New function, factored out from...
6999 (x86_linux_prepare_to_resume): ...this.
7001 2015-03-24 Gary Benson <gbenson@redhat.com>
7003 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7004 (x86_linux_dr_set): Likewise.
7005 (update_debug_registers_callback): Likewise.
7006 (x86_linux_dr_set_addr): Likewise.
7007 (x86_linux_dr_get_addr): Likewise.
7008 (x86_linux_dr_set_control): Likewise.
7009 (x86_linux_dr_get_control): Likewise.
7010 (x86_linux_dr_get_status): Likewise.
7011 (x86_linux_prepare_to_resume): Likewise.
7013 2015-03-24 Gary Benson <gbenson@redhat.com>
7015 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7016 Use perror_with_name. Pass string through gettext.
7017 (x86_linux_dr_set): Likewise.
7019 2015-03-24 Gary Benson <gbenson@redhat.com>
7021 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7022 (x86_linux_dr_set_addr): ...this.
7023 (x86_dr_low_get_addr): Rename to...
7024 (x86_linux_dr_get_addr): ...this.
7025 (x86_dr_low_set_control): Rename to...
7026 (x86_linux_dr_set_control): ...this.
7027 (x86_dr_low_get_control): Rename to...
7028 (x86_linux_dr_get_control): ...this.
7029 (x86_dr_low_get_status): Rename to...
7030 (x86_linux_dr_get_status): ...this.
7031 (x86_dr_low): Update with new function names.
7033 2015-03-24 Gary Benson <gbenson@redhat.com>
7035 * Makefile.in (x86-linux.o): New rule.
7036 * configure.srv: Add x86-linux.o to relevant targets.
7037 * linux-low.c (lwp_set_arch_private_info): New function.
7038 (lwp_arch_private_info): Likewise.
7039 * linux-x86-low.c: Include nat/x86-linux.h.
7040 (arch_lwp_info): Removed structure.
7041 (update_debug_registers_callback):
7042 Use lwp_set_debug_registers_changed.
7043 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7044 and lwp_set_debug_registers_changed.
7045 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7047 2015-03-24 Gary Benson <gbenson@redhat.com>
7049 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7050 * linux-arm-low.c (arm_new_thread): Likewise.
7051 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7052 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7053 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7054 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7056 2015-03-24 Gary Benson <gbenson@redhat.com>
7058 * linux-low.c (ptid_of_lwp): New function.
7059 (lwp_is_stopped): Likewise.
7060 (lwp_stop_reason): Likewise.
7061 * linux-x86-low.c (update_debug_registers_callback):
7063 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7066 2015-03-24 Gary Benson <gbenson@redhat.com>
7068 * linux-low.h (linux_stop_lwp): Remove declaration.
7070 2015-03-24 Gary Benson <gbenson@redhat.com>
7072 * linux-low.h: Include nat/linux-nat.h.
7073 * linux-low.c (iterate_over_lwps_args): New structure.
7074 (iterate_over_lwps_filter): New function.
7075 (iterate_over_lwps): Likewise.
7076 * linux-x86-low.c (update_debug_registers_callback):
7077 Update signature to what iterate_over_lwps expects.
7078 Remove PID check that iterate_over_lwps now performs.
7079 (x86_dr_low_set_addr): Use iterate_over_lwps.
7080 (x86_dr_low_set_control): Likewise.
7082 2015-03-24 Gary Benson <gbenson@redhat.com>
7084 * linux-x86-low.c (x86_debug_reg_state): New function.
7085 (x86_linux_prepare_to_resume): Use the above.
7087 2015-03-24 Gary Benson <gbenson@redhat.com>
7089 * linux-low.c (current_lwp_ptid): New function.
7090 * linux-x86-low.c: Include nat/linux-nat.h.
7091 (x86_dr_low_get_addr): Use current_lwp_ptid.
7092 (x86_dr_low_get_control): Likewise.
7093 (x86_dr_low_get_status): Likewise.
7095 2015-03-20 Pedro Alves <palves@redhat.com>
7097 * tracepoint.c (cmd_qtstatus): Make "str" const.
7099 2015-03-20 Pedro Alves <palves@redhat.com>
7101 * server.c (handle_general_set): Make "req_str" const.
7103 2015-03-19 Pedro Alves <palves@redhat.com>
7105 * linux-low.c (linux_resume_one_lwp): Rename to ...
7106 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7107 instead call perror_with_name.
7108 (check_ptrace_stopped_lwp_gone): New function.
7109 (linux_resume_one_lwp): Reimplement as wrapper around
7110 linux_resume_one_lwp_throw that swallows errors if the LWP is
7113 2015-03-19 Pedro Alves <palves@redhat.com>
7115 * linux-low.c (count_events_callback, select_event_lwp_callback):
7116 No longer check whether the thread has resume_stop as last resume
7119 2015-03-19 Pedro Alves <palves@redhat.com>
7121 * linux-low.c (count_events_callback, select_event_lwp_callback):
7122 Use the lwp's status_pending_p field, not the thread's.
7124 2015-03-19 Pedro Alves <palves@redhat.com>
7126 * linux-low.c (select_event_lwp_callback): Update comments to
7127 no longer mention SIGTRAP.
7129 2015-03-18 Gary Benson <gbenson@redhat.com>
7131 * server.c (handle_query): Do not report vFile:fstat as supported.
7133 2015-03-11 Gary Benson <gbenson@redhat.com>
7135 * hostio.c (sys/types.h): New include.
7136 (sys/stat.h): Likewise.
7137 (common-remote-fileio.h): Likewise.
7138 (handle_fstat): New function.
7139 (handle_vFile): Handle vFile:fstat packets.
7141 2015-03-11 Gary Benson <gbenson@redhat.com>
7143 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7144 struct stat.st_blocks and struct stat.st_blksize.
7145 * configure: Regenerate.
7146 * config.in: Likewise.
7147 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7148 (OBS): Add common-remote-fileio.o.
7149 (common-remote-fileio.o): New rule.
7151 2015-03-09 Pedro Alves <palves@redhat.com>
7153 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7154 'struct sockaddr' pointer in 'accept' call.
7156 2015-03-09 Pedro Alves <palves@redhat.com>
7159 2015-03-07 Pedro Alves <palves@redhat.com>
7160 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7161 or <winsock2.h> here. Instead include "gdb_socket.h".
7162 (remote_open): Use union gdb_sockaddr_u.
7163 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7164 or <winsock2.h> here. Instead include "gdb_socket.h".
7165 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7166 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7168 (init_named_socket, gdb_agent_helper_thread): Use union
7171 2015-03-07 Pedro Alves <palves@redhat.com>
7173 * configure.ac (build_warnings): Move
7174 -Wdeclaration-after-statement to the C-specific set.
7175 * configure: Regenerate.
7177 2015-03-07 Pedro Alves <palves@redhat.com>
7179 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7180 or <winsock2.h> here. Instead include "gdb_socket.h".
7181 (remote_open): Use union gdb_sockaddr_u.
7182 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7183 or <winsock2.h> here. Instead include "gdb_socket.h".
7184 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7185 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7187 (init_named_socket, gdb_agent_helper_thread): Use union
7190 2015-03-07 Pedro Alves <palves@redhat.com>
7192 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7195 2015-03-06 Yao Qi <yao.qi@linaro.org>
7197 * linux-aarch64-low.c (aarch64_insert_point): Use
7198 show_debug_regs as a boolean.
7199 (aarch64_remove_point): Likewise.
7201 2015-03-05 Pedro Alves <palves@redhat.com>
7203 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7204 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7205 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7206 * nto-low.c (nto_target_ops): Likewise.
7207 * spu-low.c (spu_target_ops): Likewise.
7208 * win32-low.c (win32_target_ops): Likewise.
7210 2015-03-04 Pedro Alves <palves@redhat.com>
7212 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7213 Decide whether a breakpoint triggered based on the SIGTRAP's
7215 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7216 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7217 (linux_low_filter_event): Check for breakpoints before checking
7219 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7221 (linux_stopped_by_sw_breakpoint)
7222 (linux_supports_stopped_by_sw_breakpoint)
7223 (linux_stopped_by_hw_breakpoint)
7224 (linux_supports_stopped_by_hw_breakpoint): New functions.
7225 (linux_target_ops): Install new target methods.
7227 2015-03-04 Pedro Alves <palves@redhat.com>
7229 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7230 * server.c (swbreak_feature, hwbreak_feature): New globals.
7231 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7232 (captured_main): Clear swbreak_feature and hwbreak_feature.
7233 * server.h (swbreak_feature, hwbreak_feature): Declare.
7234 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7235 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7236 supports_stopped_by_hw_breakpoint>: New fields.
7237 (target_supports_stopped_by_sw_breakpoint)
7238 (target_stopped_by_sw_breakpoint)
7239 (target_supports_stopped_by_hw_breakpoint)
7240 (target_stopped_by_hw_breakpoint): Declare.
7242 2015-03-04 Pedro Alves <palves@redhat.com>
7244 enum lwp_stop_reason -> enum target_stop_reason
7245 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7246 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7247 (linux_wait_1, stuck_in_jump_pad_callback)
7248 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7249 (linux_stopped_by_watchpoint):
7250 * linux-low.h (enum lwp_stop_reason): Delete.
7251 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7252 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7254 2015-03-04 Yao Qi <yao.qi@linaro.org>
7256 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7258 2015-03-03 Gary Benson <gbenson@redhat.com>
7260 * hostio.c (handle_vFile): Fix prefix lengths.
7262 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7264 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7267 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7269 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7270 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7271 (clean): Add "rm -f" for above C files.
7272 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7273 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7274 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7275 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7276 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7277 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7278 (init_registers_s390x_vx_linux64)
7279 (init_registers_s390x_tevx_linux64)
7280 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7281 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7283 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7284 (s390_store_vxrs_high): New functions.
7285 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7287 (s390_arch_setup): Add logic for selecting one of the new target
7288 descriptions. Activate the new vector regsets if applicable.
7289 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7290 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7291 and init_registers_s390x_tevx_linux64.
7293 2015-03-01 Pedro Alves <palves@redhat.com>
7295 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7298 2015-02-27 Pedro Alves <palves@redhat.com>
7300 * linux-x86-low.c (u_debugreg_offset): New function.
7301 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7303 2015-02-27 Pedro Alves <palves@redhat.com>
7305 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7306 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7307 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7308 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7309 (ps_lsetfpregs, ps_getpid)
7310 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7311 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7312 (ps_lsetxregs, ps_plog): Declare.
7314 2015-02-27 Pedro Alves <palves@redhat.com>
7316 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7317 IP_AGENT_EXPORT_FUNC.
7318 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7319 IP_AGENT_EXPORT_FUNC.
7320 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7321 (IP_AGENT_EXPORT): Delete.
7322 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7323 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7324 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7325 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7326 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7327 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7328 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7329 (traceframe_read_count, traceframe_write_count)
7330 (traceframes_created, trace_state_variables, get_raw_reg)
7331 (get_trace_state_variable_value, set_trace_state_variable_value)
7332 (ust_loaded, helper_thread_id, cmd_buf): Use
7333 IPA_SYM_EXPORTED_NAME.
7334 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7335 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7336 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7337 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7338 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7339 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7340 EXTERN_C_PUSH/EXTERN_C_POP.
7341 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7342 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7343 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7344 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7345 (traceframe_write_count, traceframe_read_count)
7346 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7347 (about_to_request_buffer_space, get_trace_state_variable_value)
7348 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7349 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7350 EXTERN_C_PUSH/EXTERN_C_POP.
7351 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7352 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7353 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7354 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7355 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7356 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7357 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7358 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7360 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7361 (IP_AGENT_EXPORT_VAR_DECL): Define.
7363 (gdb_agent_get_raw_reg): Declare.
7365 2015-02-27 Tom Tromey <tromey@redhat.com>
7366 Pedro Alves <palves@redhat.com>
7368 Rename symbols whose names are reserved C++ keywords throughout.
7370 2015-02-27 Pedro Alves <palves@redhat.com>
7372 * Makefile.in (COMPILER): New, get it from autoconf.
7373 (CXX): Get from autoconf instead.
7374 (COMPILE.pre): Use COMPILER.
7375 (CC-LD): Rename to ...
7376 (CC_LD): ... this. Use COMPILER.
7377 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7378 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7379 * acinclude.m4: Include build-with-cxx.m4.
7380 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7381 Disable -Werror by default if building in C++ mode.
7382 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7383 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7384 the C++ compiler. Save/restore CXXFLAGS too.
7385 * configure: Regenerate.
7387 2015-02-27 Pedro Alves <palves@redhat.com>
7389 * acinclude.m4: Include libiberty.m4.
7390 * configure.ac: Call libiberty_INIT.
7391 * config.in, configure: Regenerate.
7393 2015-02-26 Pedro Alves <palves@redhat.com>
7395 * linux-low.c (linux_wait_1): When incrementing the PC past a
7396 program breakpoint always use the_low_target.breakpoint_len as
7397 increment, rather than the maximum between that and
7398 the_low_target.decr_pc_after_break.
7400 2015-02-23 Pedro Alves <palves@redhat.com>
7402 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7403 thread was doing a step-over; always adjust the PC if
7404 we stepped over a permanent breakpoint.
7405 (linux_wait_1): If we stepped over breakpoint that was on top of a
7406 permanent breakpoint, manually advance the PC past it.
7408 2015-02-23 Pedro Alves <palves@redhat.com>
7410 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7412 (x86_fill_gregset, x86_store_gregset): Use it when handling
7415 2015-02-20 Pedro Alves <palves@redhat.com>
7417 * thread-db.c: Include "nat/linux-procfs.h".
7418 (thread_db_init): Skip listing new threads if the kernel supports
7419 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7421 2015-02-20 Pedro Alves <palves@redhat.com>
7423 * linux-low.c (status_pending_p_callback): Use ptid_match.
7425 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7427 PR breakpoints/16812
7428 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7429 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7430 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7432 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7434 PR breakpoints/15956
7435 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7437 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7439 * linux-low.c (linux_low_btrace_conf): Print size.
7440 * server.c (handle_btrace_conf_general_set): New.
7441 (hanle_general_set): Call handle_btrace_conf_general_set.
7442 (handle_query): Report Qbtrace-conf:bts:size as supported.
7444 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7446 * linux-low.c (linux_low_enable_btrace): Update parameters.
7447 (linux_low_btrace_conf): New.
7448 (linux_target_ops)<to_btrace_conf>: Initialize.
7449 * server.c (current_btrace_conf): New.
7450 (handle_btrace_enable): Rename to ...
7451 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
7452 to target_enable_btrace. Update comment. Update users.
7453 (handle_qxfer_btrace_conf): New.
7454 (qxfer_packets): Add btrace-conf entry.
7455 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7456 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7457 (target_ops)<read_btrace_conf>: New.
7458 (target_enable_btrace): Update parameters.
7459 (target_read_btrace_conf): New.
7461 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7463 * server.c (handle_btrace_general_set): Remove call to
7464 target_supports_btrace.
7465 (supported_btrace_packets): New.
7466 (handle_query): Call supported_btrace_packets.
7467 * target.h: include btrace-common.h.
7468 (btrace_target_info): Removed.
7469 (supports_btrace, target_supports_btrace): Update parameters.
7471 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7473 * Makefile.in (SFILES): Add common/btrace-common.c.
7474 (OBS): Add common/btrace-common.o.
7475 (btrace-common.o): Add build rules.
7476 * linux-low: Include btrace-common.h.
7477 (linux_low_read_btrace): Use struct btrace_data. Call
7478 btrace_data_init and btrace_data_fini.
7480 2015-02-06 Pedro Alves <palves@redhat.com>
7482 * thread-db.c (find_new_threads_callback): Add debug output.
7484 2015-02-04 Pedro Alves <palves@redhat.com>
7486 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7487 (resume_stopped_resumed_lwps): New function.
7488 (linux_wait_for_event_filtered): Use it.
7490 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7492 * Makefile.in (SFILES): Add linux-personality.c.
7493 (linux-personality.o): New rule.
7494 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7495 list of objects to be built.
7496 * linux-low.c: Include nat/linux-personality.h.
7497 (linux_create_inferior): Remove code to disable address space
7498 randomization (moved to ../nat/linux-personality.c). Create
7499 cleanup to disable address space randomization.
7501 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7503 * Makefile.in (posix-strerror.o): New rule.
7504 (mingw-strerror.o): Likewise.
7505 * configure: Regenerated.
7506 * configure.ac: Source file ../common/common.host. Initialize new
7507 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7509 2015-01-14 Yao Qi <yao@codesourcery.com>
7511 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7512 (ppc-linux.o): New rule.
7513 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7514 * configure.ac: AC_CHECK_FUNCS(getauxval).
7515 * config.in: Re-generated.
7516 * configure: Re-generated.
7517 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7518 ppc64_64bit_inferior_p
7520 2015-01-14 Yao Qi <yao@codesourcery.com>
7522 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7523 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7524 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7525 (PT_ORIG_R3, PT_TRAP): Likewise.
7526 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7527 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7528 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7530 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7532 * i387-fp.c (i387_cache_to_xsave): In look over
7533 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7534 zmmh_low_space field by use of zmmh_high_space.
7536 2015-01-09 Pedro Alves <palves@redhat.com>
7538 * linux-low.c (step_over_bkpt): Move higher up in the file.
7539 (handle_extended_wait): Don't store the stop_pc here.
7540 (get_stop_pc): Adjust comments and rename to ...
7541 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7542 stopped for a software breakpoint or hardware breakpoint.
7543 (thread_still_has_status_pending_p): New function.
7544 (status_pending_p_callback): Use
7545 thread_still_has_status_pending_p. If the event is no longer
7546 interesting, resume the LWP.
7547 (handle_tracepoints): Add assert.
7548 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7549 (wstatus_maybe_breakpoint): New function.
7550 (cancel_breakpoint): Delete function.
7551 (check_stopped_by_watchpoint): New function, factored out from
7552 linux_low_filter_event.
7553 (lp_status_maybe_breakpoint): Delete function.
7554 (linux_low_filter_event): Remove filter_ptid argument.
7555 Leave thread group exits pending here. Store the LWP's stop PC.
7556 Always leave events pending.
7557 (linux_wait_for_event_filtered): Pull all events out of the
7558 kernel, and leave them all pending.
7559 (count_events_callback, select_event_lwp_callback): Consider all
7561 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7562 (select_event_lwp): Only give preference to the stepping LWP in
7563 all-stop mode. Adjust comments.
7564 (ignore_event): New function.
7565 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7566 references to cancel_breakpoints. Adjust to renames. Also give
7567 equal priority to all LWPs that have had events in non-stop mode.
7568 If reporting a software breakpoint event, unadjust the LWP's PC.
7569 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7570 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7572 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7573 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7574 (linux_stopped_by_watchpoint): Adjust.
7575 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7576 * linux-low.h (enum lwp_stop_reason): New.
7577 (struct lwp_info) <stop_pc>: Adjust comment.
7578 <stopped_by_watchpoint>: Delete field.
7579 <stop_reason>: New field.
7580 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7581 * mem-break.c (software_breakpoint_inserted_here)
7582 (hardware_breakpoint_inserted_here): New function.
7583 * mem-break.h (software_breakpoint_inserted_here)
7584 (hardware_breakpoint_inserted_here): Declare.
7585 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7586 (cancel_breakpoints): Delete.
7587 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7588 (upload_fast_traceframes): Remove references to
7591 2015-01-09 Pedro Alves <palves@redhat.com>
7593 * thread-db.c (find_new_threads_callback): Ignore thread if the
7594 kernel thread ID is -1.
7596 2015-01-09 Pedro Alves <palves@redhat.com>
7598 * linux-low.c (linux_attach_fail_reason_string): Move to
7599 nat/linux-ptrace.c, and rename.
7600 (linux_attach_lwp): Update comment.
7601 (attach_proc_task_lwp_callback): New function.
7602 (linux_attach): Adjust to rename and use
7603 linux_proc_attach_tgid_threads.
7604 (linux_attach_fail_reason_string): Delete declaration.
7606 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7608 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7609 * server.c (gdbserver_version): Likewise.
7611 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7613 * remote-utils.c: Include ctype.h.
7614 (input_interrupt): Explicitly handle the case when the char
7615 received is the NUL byte. Improve the printing of non-ASCII
7618 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7620 * linux-low.c (linux_low_filter_event): Update call to
7621 linux_enable_event_reporting following the addition of
7622 a new parameter to that function.
7624 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7627 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7628 (AARCH64_FPCR_REGNO): Likewise.
7629 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7630 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7631 (aarch64_store_fpregset): Likewise.
7633 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7635 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7636 Remove FIXME comment about assumption about N.
7638 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7640 * configure.ac: If large-file support is disabled in GDBserver,
7641 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7642 * configure: Regenerate.
7644 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7646 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7647 warning upon ENODATA from ptrace.
7648 * linux-s390-low.c (s390_store_tdb): New.
7649 (s390_regsets): Add regset for NT_S390_TDB.
7651 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7653 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7654 without a fill_function.
7655 * linux-s390-low.c (s390_fill_last_break): Remove.
7656 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7657 (s390_arch_setup): Use regset's size instead of fill_function for
7660 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7662 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7663 the regset's store function when ptrace returned an error.
7664 * regcache.c (get_thread_regcache): Invalidate register cache
7665 before fetching inferior's registers.
7667 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7669 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7670 while-loop as for-loop.
7671 (regsets_store_inferior_registers): Likewise.
7673 2014-11-28 Yao Qi <yao@codesourcery.com>
7675 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7676 * config.in, configure: Re-generate.
7677 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7680 2014-11-21 Yao Qi <yao@codesourcery.com>
7682 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7683 (AC_CHECK_HEADERS): Remove malloc.h.
7684 * configure: Re-generated.
7685 * config.in: Re-generated.
7686 * server.h: Don't include alloca.h and malloc.h.
7687 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7688 Don't include malloc.h.
7690 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7692 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7693 corresponding ERRNO check in same block.
7695 2014-11-12 Pedro Alves <palves@redhat.com>
7697 * server.c (cont_thread): Update comment.
7698 (start_inferior, attach_inferior): No longer clear cont_thread.
7699 (handle_v_cont): No longer set cont_thread.
7700 (captured_main): Clear cont_thread each time a GDB connects.
7702 2014-11-12 Pedro Alves <palves@redhat.com>
7704 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7705 thread, and don't resume all threads if the Hc thread has exited.
7707 2014-11-12 Pedro Alves <palves@redhat.com>
7709 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7710 the process group instead of to a specific LWP.
7712 2014-10-15 Pedro Alves <palves@redhat.com>
7715 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7717 (arm_set_thread_context): Delete.
7718 (the_low_target): Adjust.
7719 * win32-i386-low.c (debug_registers_changed)
7720 (debug_registers_used): Delete.
7721 (update_debug_registers_callback): New function.
7722 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7723 needing to update their debug registers.
7724 (win32_get_current_dr): New function.
7725 (x86_dr_low_get_addr, x86_dr_low_get_control)
7726 (x86_dr_low_get_status): Fetch the debug register from the thread
7728 (i386_initial_stuff): Adjust.
7729 (i386_get_thread_context): Remove current_event parameter. Don't
7730 clear debug_registers_changed nor copy DR values to
7732 (i386_set_thread_context): Delete.
7733 (i386_prepare_to_resume): New function.
7734 (i386_thread_added): Mark the thread as needing to update irs
7736 (the_low_target): Remove i386_set_thread_context and install
7737 i386_prepare_to_resume.
7738 * win32-low.c (win32_get_thread_context): Adjust.
7739 (win32_set_thread_context): Use SetThreadContext
7741 (win32_prepare_to_resume): New function.
7742 (win32_require_context): New function, factored out from ...
7743 (thread_rec): ... this.
7744 (continue_one_thread): Call win32_prepare_to_resume on each thread
7745 we're about to continue.
7746 (win32_resume): Call win32_prepare_to_resume on the event thread.
7747 * win32-low.h (struct win32_thread_info)
7748 <debug_registers_changed>: New field.
7749 (struct win32_target_ops): Change prototype of set_thread_context,
7750 delete set_thread_context and add prepare_to_resume.
7751 (win32_require_context): New declaration.
7753 2014-10-08 Gary Benson <gbenson@redhat.com>
7755 * server.h: Do not include common-exceptions.h.
7757 2014-10-08 Gary Benson <gbenson@redhat.com>
7759 * server.h: Do not include cleanups.h.
7761 2014-09-30 James Hogan <james.hogan@imgtec.com>
7763 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7766 2014-09-23 Yao Qi <yao@codesourcery.com>
7768 * linux-low.c (lp_status_maybe_breakpoint): New function.
7769 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7770 (count_events_callback): Likewise.
7771 (select_event_lwp_callback): Likewise.
7772 (cancel_breakpoints_callback): Likewise.
7774 2014-09-19 Don Breazeal <donb@codesourcery.com>
7776 * linux-low.c (handle_extended_wait): Call
7777 linux_ptrace_get_extended_event.
7778 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7779 linux_is_extended_waitstatus.
7781 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7783 * Makefile.in (CPPFLAGS): Define.
7784 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7785 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7787 2014-09-16 Gary Benson <gbenson@redhat.com>
7789 * inferiors.h (current_inferior): Renamed as...
7790 (current_thread): New variable. All uses updated.
7791 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7792 (maybe_move_out_of_jump_pad): Likewise.
7793 (cancel_breakpoint): Likewise.
7794 (linux_low_filter_event): Likewise.
7795 (wait_for_sigstop): Likewise.
7796 (linux_resume_one_lwp): Likewise.
7797 (need_step_over_p): Likewise.
7798 (start_step_over): Likewise.
7799 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7800 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7801 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7802 and save_inferior as saved_thread.
7803 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7805 (regcache_invalidate_thread): Likewise.
7806 * remote-utils.c (prepare_resume_reply): Likewise.
7807 * thread-db.c (thread_db_get_tls_address): Likewise.
7808 (disable_thread_event_reporting): Likewise.
7809 (remove_thread_event_breakpoints): Likewise.
7810 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7812 * target.h (set_desired_inferior): Renamed as...
7813 (set_desired_thread): New declaration. All uses updated.
7814 * server.c (myresume): Updated comment to reference thread instead
7816 (handle_serial_event): Likewise.
7817 (handle_target_event): Likewise.
7819 2014-09-12 Tom Tromey <tromey@redhat.com>
7820 Gary Benson <gbenson@redhat.com>
7822 * regcache.h: Include common-regcache.h.
7823 (regcache_read_pc): Don't declare.
7824 * regcache.c (get_thread_regcache_for_ptid): New function.
7826 2014-09-11 Tom Tromey <tromey@redhat.com>
7827 Gary Benson <gbenson@redhat.com>
7829 * symbol.c: New file.
7830 * Makefile.in (SFILES): Add symbol.c.
7831 (OBS): Add symbol.o.
7833 2014-09-11 Gary Benson <gbenson@redhat.com>
7835 * target.c (target_stop_ptid, target_continue_ptid): New
7838 2014-09-11 Tom Tromey <tromey@redhat.com>
7839 Gary Benson <gbenson@redhat.com>
7841 * target.h: Include target/target.h.
7842 * target.c (target_read_memory, target_read_uint32)
7843 (target_write_memory): New functions.
7845 2014-09-11 Gary Benson <gbenson@redhat.com>
7847 * server.h (debug_hw_points): Don't declare.
7848 * server.c (debug_hw_points): Don't define. Replace all uses
7849 with show_debug_regs.
7850 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7851 all uses with show_debug_regs.
7853 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7855 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7856 endianness into account.
7857 (ppc_supply_ptrace_register): Likewise.
7859 2014-09-03 James Hogan <james.hogan@imgtec.com>
7861 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7862 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7864 2014-09-03 Gary Benson <gbenson@redhat.com>
7866 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7867 ALL_DEBUG_ADDRESS_REGISTERS.
7869 2014-09-02 Gary Benson <gbenson@redhat.com>
7871 * i386-low.h: Renamed as...
7872 * x86-low.h: New file. All type, function and variable name
7873 prefixes changed from "i386_" to "x86_". All references updated.
7874 * i386-low.c: Renamed as...
7875 * x86-low.c: New file. All type, function and variable name
7876 prefixes changed from "i386_" to "x86_". All references updated.
7878 2014-09-02 Gary Benson <gbenson@redhat.com>
7880 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7881 (x86_linux_new_thread): Likewise.
7883 2014-08-29 Gary Benson <gbenson@redhat.com>
7885 * server.h (setjmp.h): Do not include.
7886 (toplevel): Do not declare.
7887 (common-exceptions.h): Include.
7888 (cleanups.h): Likewise.
7889 * server.c (toplevel): Do not define.
7890 (exit_code): New static global.
7891 (detach_or_kill_for_exit_cleanup): New function.
7892 (main): New function. Original main renamed to...
7893 (captured_main): New function.
7894 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7896 2014-08-29 Gary Benson <gbenson@redhat.com>
7898 * Makefile.in (SFILES): Add common/common-exceptions.c.
7899 (OBS): Add common-exceptions.o.
7900 (common-exceptions.o): New rule.
7901 * utils.c (prepare_to_throw_exception): New function.
7903 2014-08-29 Gary Benson <gbenson@redhat.com>
7905 * config.in: Regenerate.
7906 * configure: Likewise.
7908 2014-08-29 Gary Benson <gbenson@redhat.com>
7910 * Makefile.in (SFILES): Add common/cleanups.c.
7912 (cleanups.o): New rule.
7914 2014-08-29 Gary Benson <gbenson@redhat.com>
7916 * utils.c (internal_vwarning): New function.
7918 2014-08-28 Gary Benson <gbenson@redhat.com>
7920 * utils.h (fatal): Remove declaration.
7921 * utils.c (fatal): Remove function.
7923 2014-08-28 Gary Benson <gbenson@redhat.com>
7925 * tracepoint.c (gdb_agent_init): Replace fatal with
7927 (initialize_tracepoint): Likewise.
7929 2014-08-28 Gary Benson <gbenson@redhat.com>
7931 * remote-utils.c (remote_prepare): Replace fatal with error.
7933 2014-08-28 Gary Benson <gbenson@redhat.com>
7935 * linux-low.c (linux_async): Replace fatal with warning.
7937 (linux_start_non_stop): Return -1 if linux_async failed.
7939 2014-08-28 Gary Benson <gbenson@redhat.com>
7941 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7943 (i386_dr_low_get_addr): Remove vague comment.
7944 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7947 2014-08-28 Gary Benson <gbenson@redhat.com>
7949 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7950 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7952 (linux_resume_one_lwp): Likewise.
7953 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7955 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7956 with internal_error.
7957 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7958 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7959 (find_register_by_name): Replace fatal with internal_error.
7960 (find_regno): Likewise.
7961 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7962 * thread-db.c (thread_db_create_event): Likewise.
7963 (thread_db_load_search): Likewise.
7964 (try_thread_db_load_1): Likewise.
7965 * tracepoint.c (get_jump_space_head): Replace fatal with
7967 (claim_trampoline_space): Likewise.
7968 (have_fast_tracepoint_trampoline_buffer): Likewise.
7969 (cmd_qtstart): Likewise.
7970 (stop_tracing): Likewise.
7971 (fast_tracepoint_collecting): Likewise.
7972 (target_malloc): Likewise.
7973 (download_tracepoint): Likewise.
7974 (download_trace_state_variables): Replace check with gdb_assert.
7975 (upload_fast_traceframes): Replace fatal with internal_error.
7977 2014-08-19 Tom Tromey <tromey@redhat.com>
7978 Gary Benson <gbenson@redhat.com>
7980 * Makefile.in (SFILES): Add common/common-debug.c.
7981 (OBS): Add common-debug.o.
7982 (common-debug.o): New rule.
7983 * debug.h (debug_printf): Don't declare.
7984 * debug.c (debug_printf): Renamed and rewritten as...
7985 (debug_vprintf): New function.
7987 2014-08-19 Gary Benson <gbenson@redhat.com>
7989 * utils.h: Do not include print-utils.h.
7991 2014-08-19 Tom Tromey <tromey@redhat.com>
7992 Gary Benson <gbenson@redhat.com>
7994 * server.h: Add static assertion.
7995 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7997 2014-08-19 Tom Tromey <tromey@redhat.com>
7998 Gary Benson <gbenson@redhat.com>
8000 * Makefile.in (SFILES): Add common/errors.c.
8001 (OBS): Add errors.o.
8002 (IPA_OBS): Add errors-ipa.o.
8003 (errors.o): New rule.
8004 (errors-ipa.o): Likewise.
8005 * utils.h (perror_with_name, error, warning): Don't declare.
8006 * utils.c (warning): Renamed and rewritten as...
8007 (vwarning): New function.
8008 (error): Renamed and rewritten as...
8009 (verror): New function.
8010 (internal_error): Renamed and rewritten as...
8011 (internal_verror): New function.
8013 2014-08-07 Gary Benson <gbenson@redhat.com>
8015 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8016 * configure: Regenerate.
8017 * config.in: Likewise.
8018 * server.h: Do not include errno.h.
8019 * event-loop.c: Likewise.
8020 * hostio-errno.c: Likewise.
8021 * linux-low.c: Likewise.
8022 * remote-utils.c: Likewise.
8023 * spu-low.c: Likewise.
8024 * utils.c: Likewise.
8025 * gdbreplay.c: Unconditionally include errno.h.
8027 2014-08-07 Gary Benson <gbenson@redhat.com>
8029 * server.h: Do not include string.h.
8030 * event-loop.c: Likewise.
8031 * linux-low.c: Likewise.
8032 * regcache.c: Likewise.
8033 * remote-utils.c: Likewise.
8034 * spu-low.c: Likewise.
8035 * utils.c: Likewise.
8037 2014-08-07 Gary Benson <gbenson@redhat.com>
8039 * server.h: Do not include gdb_assert.h.
8041 2014-08-07 Gary Benson <gbenson@redhat.com>
8043 * server.h: Do not include common-utils.h.
8045 2014-08-07 Gary Benson <gbenson@redhat.com>
8047 * server.h: Do not include ptid.h.
8048 * notif.h: Likewise.
8050 2014-08-07 Gary Benson <gbenson@redhat.com>
8052 * server.h: Do not include gdb_locale.h.
8054 2014-08-07 Gary Benson <gbenson@redhat.com>
8056 * server.h: Do not include gdb/signals.h.
8057 * win32-low.c: Likewise.
8059 2014-08-07 Gary Benson <gbenson@redhat.com>
8061 * server.h: Do not include pathmax.h.
8063 2014-08-07 Gary Benson <gbenson@redhat.com>
8065 * server.h: Do not include libiberty.h.
8066 * linux-bfin-low.c: Likewise.
8068 2014-08-07 Gary Benson <gbenson@redhat.com>
8070 * server.h: Do not include ansidecl.h.
8072 2014-08-07 Gary Benson <gbenson@redhat.com>
8074 * linux-x86-low.c: Do not include stddef.h.
8075 * lynx-ppc-low.c: Likewise.
8076 * tracepoint.c: Likewise.
8078 2014-08-07 Gary Benson <gbenson@redhat.com>
8080 * server.h: Do not include stdarg.h.
8081 * nto-low.c: Likewise.
8083 2014-08-07 Gary Benson <gbenson@redhat.com>
8085 * server.h: Do not include stdlib.h.
8086 * inferiors.c: Likewise.
8087 * linux-low.c: Likewise.
8088 * regcache.c: Likewise.
8089 * spu-low.c: Likewise.
8090 * tracepoint.c: Likewise.
8091 * utils.c: Likewise.
8093 2014-08-07 Gary Benson <gbenson@redhat.com>
8095 * server.h: Do not include stdio.h.
8096 * linux-low.c: Likewise.
8097 * remote-utils.c: Likewise.
8098 * spu-low.c: Likewise.
8099 * utils.c: Likewise.
8100 * wincecompat.c: Likewise.
8102 2014-08-06 Gary Benson <gbenson@redhat.com>
8104 * regcache.c (init_register_cache): Move conditionals inside if.
8106 2014-08-06 Gary Benson <gbenson@redhat.com>
8108 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8110 2014-07-31 Gary Benson <gbenson@redhat.com>
8112 * ax.h: Do not include server.h.
8113 * gdbthread.h: Likewise.
8114 * lynx-low.h: Likewise.
8115 * notif.h: Likewise.
8117 2014-07-30 Gary Benson <gbenson@redhat.com>
8119 * server.h: Include common-defs.h.
8120 Do not include config.h or build-gnulib-gdbserver/config.h.
8122 2014-07-30 Gary Benson <gbenson@redhat.com>
8124 * hostio-errno.c: Move server.h to top of includes list.
8125 * inferiors.c: Likewise.
8126 * linux-x86-low.c: Likewise.
8127 * notif.c: Include server.h.
8129 2014-07-24 Tom Tromey <tromey@redhat.com>
8130 Gary Benson <gbenson@redhat.com>
8132 * server.h (CORE_ADDR): Now unsigned.
8134 2014-07-16 Pedro Alves <palves@redhat.com>
8136 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8138 2014-07-15 Pedro Alves <palves@redhat.com>
8140 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8143 2014-07-11 Pedro Alves <palves@redhat.com>
8145 * linux-low.c (kill_wait_lwp): New function, based on
8146 kill_one_lwp_callback, but use my_waitpid directly.
8147 (kill_one_lwp_callback, linux_kill): Use it.
8149 2014-06-23 Pedro Alves <palves@redhat.com>
8151 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8152 before setting DR0..DR3.
8154 2014-06-20 Gary Benson <gbenson@redhat.com>
8156 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8157 * configure: Regenerated.
8158 * config.in: Likewise.
8160 2014-06-20 Gary Benson <gbenson@redhat.com>
8162 * Makefile.in (SFILES): Update locations for files moved
8164 (object file files): Reordered.
8166 2014-06-20 Gary Benson <gbenson@redhat.com>
8168 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8169 (i386_dr_low_set_addr): Likewise.
8170 (i386_dr_low_get_addr): Likewise.
8171 (i386_dr_low_can_set_control): Likewise.
8172 (i386_dr_low_set_control): Likewise.
8173 (i386_dr_low_get_control): Likewise.
8174 (i386_dr_low_get_status): Likewise.
8175 (i386_get_debug_register_length): Likewise.
8176 * linux-x86-low.c (i386_dr_low_set_addr):
8177 Changed signature. Made static.
8178 (i386_dr_low_get_addr): Likewise.
8179 (i386_dr_low_set_control): Likewise.
8180 (i386_dr_low_get_control): Likewise.
8181 (i386_dr_low_get_status): Likewise.
8182 (i386_dr_low): New global variable.
8183 * win32-i386-low.c (i386_dr_low_set_addr):
8184 Changed signature. Made static.
8185 (i386_dr_low_get_addr): Likewise.
8186 (i386_dr_low_set_control): Likewise.
8187 (i386_dr_low_get_control): Likewise.
8188 (i386_dr_low_get_status): Likewise.
8189 (i386_dr_low): New global variable.
8191 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8193 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8194 * Makefile.in (AR, AR_FLAGS): Define.
8195 * configure: Regenerate.
8197 2014-06-19 Gary Benson <gbenson@redhat.com>
8199 * Makefile.in (i386-dregs.o): New rule.
8200 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8201 * i386-low.c (target.h): Remove include.
8202 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8203 (DR_CONTROL_SHIFT): Likewise.
8204 (DR_CONTROL_SIZE): Likewise.
8205 (DR_RW_EXECUTE): Likewise.
8206 (DR_RW_WRITE): Likewise.
8207 (DR_RW_READ): Likewise.
8208 (DR_RW_IORW): Likewise.
8209 (DR_LEN_1): Likewise.
8210 (DR_LEN_2): Likewise.
8211 (DR_LEN_4): Likewise.
8212 (DR_LEN_8): Likewise.
8213 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8214 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8215 (DR_ENABLE_SIZE): Likewise.
8216 (DR_LOCAL_SLOWDOWN): Likewise.
8217 (DR_GLOBAL_SLOWDOWN): Likewise.
8218 (DR_CONTROL_RESERVED): Likewise.
8219 (I386_DR_CONTROL_MASK): Likewise.
8220 (I386_DR_VACANT): Likewise.
8221 (I386_DR_LOCAL_ENABLE): Likewise.
8222 (I386_DR_GLOBAL_ENABLE): Likewise.
8223 (I386_DR_DISABLE): Likewise.
8224 (I386_DR_SET_RW_LEN): Likewise.
8225 (I386_DR_GET_RW_LEN): Likewise.
8226 (I386_DR_WATCH_HIT): Likewise.
8227 (i386_wp_op_t): Likewise.
8228 (i386_show_dr): Likewise.
8229 (i386_length_and_rw_bits): Likewise.
8230 (i386_insert_aligned_watchpoint): Likewise.
8231 (i386_remove_aligned_watchpoint): Likewise.
8232 (i386_handle_nonaligned_watchpoint): Likewise.
8233 i386_update_inferior_debug_regs(): Likewise.
8234 (i386_dr_insert_watchpoint): Likewise.
8235 (i386_dr_remove_watchpoint): Likewise.
8236 (i386_dr_region_ok_for_watchpoint): Likewise.
8237 (i386_dr_stopped_data_address): Likewise.
8238 (i386_dr_stopped_by_watchpoint): Likewise.
8240 2014-06-19 Gary Benson <gbenson@redhat.com>
8242 * i386-low.c (i386_dr_show): Renamed to
8243 i386_show_dr and made static. All uses updated.
8244 (i386_dr_length_and_rw_bits): Renamed to
8245 i386_length_and_rw_bits and made static.
8247 (i386_dr_insert_aligned_watchpoint): Renamed to
8248 i386_insert_aligned_watchpoint and made static.
8250 (i386_dr_remove_aligned_watchpoint): Renamed to
8251 i386_remove_aligned_watchpoint and made static.
8253 (i386_dr_update_inferior_debug_regs): Renamed to
8254 i386_update_inferior_debug_regs and made static.
8257 2014-06-18 Gary Benson <gbenson@redhat.com>
8259 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8260 (i386_dr_low_can_set_control): Likewise.
8261 (i386_get_debug_register_length): Likewise.
8262 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8263 (i386_dr_low_can_set_control): Likewise.
8264 (i386_get_debug_register_length): Likewise.
8266 2014-06-17 Gary Benson <gbenson@redhat.com>
8268 * i386-low.h (i386-dregs.h): New include.
8269 (DR_FIRSTADDR): Now in i386-dregs.h.
8270 (DR_LASTADDR): Likewise.
8271 (DR_NADDR): Likewise.
8272 (DR_STATUS): Likewise.
8273 (DR_CONTROL): Likewise.
8274 (i386_debug_reg_state): Likewise.
8275 (i386_dr_insert_watchpoint): Likewise.
8276 (i386_dr_remove_watchpoint): Likewise.
8277 (i386_dr_region_ok_for_watchpoint): Likewise.
8278 (i386_dr_stopped_data_address): Likewise.
8279 (i386_dr_stopped_by_watchpoint): Likewise.
8280 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8282 2014-06-18 Gary Benson <gbenson@redhat.com>
8284 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8285 i386_dr_insert_watchpoint.
8286 (i386_low_remove_watchpoint): Renamed to
8287 i386_dr_remove_watchpoint.
8288 (i386_low_region_ok_for_watchpoint): Renamed to
8289 i386_dr_region_ok_for_watchpoint.
8290 (i386_low_stopped_data_address): Renamed to
8291 i386_dr_stopped_data_address.
8292 (i386_low_stopped_by_watchpoint): Renamed to
8293 i386_dr_stopped_by_watchpoint.
8294 * i386-low.c (i386_show_dr): Renamed to
8295 i386_dr_show and made nonstatic. All uses updated.
8296 (i386_length_and_rw_bits): Renamed to
8297 i386_dr_length_and_rw_bits and made nonstatic.
8299 (i386_insert_aligned_watchpoint): Renamed to
8300 i386_dr_insert_aligned_watchpoint and made nonstatic.
8302 (i386_remove_aligned_watchpoint): Renamed to
8303 i386_dr_remove_aligned_watchpoint and made nonstatic.
8305 (i386_update_inferior_debug_regs): Renamed to
8306 i386_dr_update_inferior_debug_regs and made nonstatic.
8308 (i386_low_insert_watchpoint): Renamed to
8309 i386_dr_insert_watchpoint. All uses updated.
8310 (i386_low_remove_watchpoint): Renamed to
8311 i386_dr_remove_watchpoint. All uses updated.
8312 (i386_low_region_ok_for_watchpoint): Renamed to
8313 i386_dr_region_ok_for_watchpoint. All uses updated.
8314 (i386_low_stopped_data_address): Renamed to
8315 i386_dr_stopped_data_address. All uses updated.
8316 (i386_low_stopped_by_watchpoint): Renamed to
8317 i386_dr_stopped_by_watchpoint. All uses updated.
8319 2014-06-18 Gary Benson <gbenson@redhat.com>
8321 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8322 (i386_dr_low_can_set_control): Likewise.
8323 (i386_insert_aligned_watchpoint): New check.
8325 2014-06-18 Gary Benson <gbenson@redhat.com>
8327 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8330 2014-06-18 Gary Benson <gbenson@redhat.com>
8332 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8333 instead of fatal and error.
8334 (i386_handle_nonaligned_watchpoint): Likewise.
8336 2014-06-18 Gary Benson <gbenson@redhat.com>
8338 * i386-low.c (i386_get_debug_register_length): New macro.
8339 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8340 (i386_show_dr): Use debug_printf instead of fprintf. Use
8341 phex to format values.
8343 2014-06-18 Gary Benson <gbenson@redhat.com>
8345 * i386-low.h: Comment changes.
8346 * i386-low.c: Likewise.
8348 2014-06-18 Gary Benson <gbenson@redhat.com>
8350 * i386-low.c: Whitespace changes.
8352 2014-06-12 Tom Tromey <tromey@redhat.com>
8354 * utils.c (freeargv): Remove.
8356 2014-06-12 Tom Tromey <tromey@redhat.com>
8358 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8359 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8360 (parse_debug_format_options): Likewise.
8361 (gdbserver_usage): Likewise.
8362 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8363 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8364 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8366 ($(LIBGNU)): Depend on libiberty.
8367 (all-lib): Recurse into all subdirs.
8368 (install-only): Invoke "install" target in subdirs.
8369 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8371 * configure: Rebuild.
8372 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8373 for vasprintf, vsnprintf, or gettimeofday.
8374 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8377 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8379 * development.sh: Delete.
8380 * Makefile.in (config.status): Adjust dependency on development.sh.
8381 * configure.ac: Adjust development.sh source call.
8382 * configure: Regenerate.
8384 2014-06-02 Pedro Alves <palves@redhat.com>
8386 * ax.c (gdb_free_agent_expr): New function.
8387 * ax.h (gdb_free_agent_expr): New declaration.
8388 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8390 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8392 (clear_breakpoint_conditions_and_commands): New function.
8393 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8394 (clear_breakpoint_conditions_and_commands): New declaration.
8396 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8398 * linux-aarch64-low.c (asm/ptrace.h): Include.
8400 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8402 Fix TLS access for -static -pthread.
8403 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8404 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8405 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8407 2014-05-20 Pedro Alves <palves@redhat.com>
8409 * linux-aarch64-low.c (aarch64_insert_point)
8410 (aarch64_remove_point): No longer check whether the type is
8411 supported here. Adjust to new interface.
8412 (the_low_target): Install aarch64_supports_z_point_type as
8413 supports_z_point_type method.
8414 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8415 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8416 instead of a Z packet char. Adjust.
8417 (arm_supports_z_point_type): New function.
8418 (arm_insert_point, arm_remove_point): Adjust to new interface.
8419 (the_low_target): Install arm_supports_z_point_type.
8420 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8421 (cris_insert_point, cris_remove_point): Adjust to new interface.
8422 Don't check whether the type is supported here.
8423 (the_low_target): Install cris_supports_z_point_type.
8424 * linux-low.c (linux_supports_z_point_type): New function.
8425 (linux_insert_point, linux_remove_point): Adjust to new interface.
8426 * linux-low.h (struct linux_target_ops) <insert_point,
8427 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8428 raw_breakpoint pointer parameter.
8429 <supports_z_point_type>: New method.
8430 * linux-mips-low.c (mips_supports_z_point_type): New function.
8431 (mips_insert_point, mips_remove_point): Adjust to new interface.
8432 Use mips_supports_z_point_type.
8433 (the_low_target): Install mips_supports_z_point_type.
8434 * linux-ppc-low.c (the_low_target): Install NULL as
8435 supports_z_point_type method.
8436 * linux-s390-low.c (the_low_target): Install NULL as
8437 supports_z_point_type method.
8438 * linux-sparc-low.c (the_low_target): Install NULL as
8439 supports_z_point_type method.
8440 * linux-x86-low.c (x86_supports_z_point_type): New function.
8441 (x86_insert_point): Adjust to new insert_point interface. Use
8442 insert_memory_breakpoint. Adjust to new
8443 i386_low_insert_watchpoint interface.
8444 (x86_remove_point): Adjust to remove_point interface. Use
8445 remove_memory_breakpoint. Adjust to new
8446 i386_low_remove_watchpoint interface.
8447 (the_low_target): Install x86_supports_z_point_type.
8448 * lynx-low.c (lynx_target_ops): Install NULL as
8449 supports_z_point_type callback.
8450 * nto-low.c (nto_supports_z_point_type): New.
8451 (nto_insert_point, nto_remove_point): Adjust to new interface.
8452 (nto_target_ops): Install nto_supports_z_point_type.
8453 * mem-break.c: Adjust intro comment.
8454 (struct raw_breakpoint) <raw_type, size>: New fields.
8455 <inserted>: Update comment.
8456 <shlib_disabled>: Delete field.
8457 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8458 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8459 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8460 (raw_bkpt_type_to_target_hw_bp_type): New function.
8461 (find_enabled_raw_code_breakpoint_at): New function.
8462 (find_raw_breakpoint_at): New type and size parameters. Use them.
8463 (insert_memory_breakpoint): New function, based off
8464 set_raw_breakpoint_at.
8465 (remove_memory_breakpoint): New function.
8466 (set_raw_breakpoint_at): Reimplement.
8467 (set_breakpoint): New, based on set_breakpoint_at.
8468 (set_breakpoint_at): Reimplement.
8469 (delete_raw_breakpoint): Go through the_target->remove_point
8470 instead of assuming memory breakpoints.
8471 (find_gdb_breakpoint_at): Delete.
8472 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8473 (find_gdb_breakpoint): New function.
8474 (set_gdb_breakpoint_at): Delete.
8475 (z_type_supported): New function.
8476 (set_gdb_breakpoint_1): New function, loosely based off
8477 set_gdb_breakpoint_at.
8478 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8479 (delete_gdb_breakpoint_at): Delete.
8480 (delete_gdb_breakpoint_1): New function, loosely based off
8481 delete_gdb_breakpoint_at.
8482 (delete_gdb_breakpoint): New function.
8483 (clear_gdb_breakpoint_conditions): Rename to ...
8484 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8486 (add_condition_to_breakpoint): Make static.
8487 (add_breakpoint_condition): Take a struct breakpoint pointer
8488 instead of an address. Adjust.
8489 (gdb_condition_true_at_breakpoint): Rename to ...
8490 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8492 (gdb_condition_true_at_breakpoint): Reimplement.
8493 (add_breakpoint_commands): Take a struct breakpoint pointer
8494 instead of an address. Adjust.
8495 (gdb_no_commands_at_breakpoint): Rename to ...
8496 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8497 parameter. Return true if no breakpoint was found. Change debug
8499 (gdb_no_commands_at_breakpoint): Reimplement.
8500 (run_breakpoint_commands): Rename to ...
8501 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8502 and change return type to boolean.
8503 (run_breakpoint_commands): New function.
8504 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8505 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8506 breakpoint. Go through the_target->remove_point instead of
8507 assuming memory breakpoint.
8508 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8509 software and hardware breakpoints.
8510 (reinsert_raw_breakpoint): Go through the_target->insert_point
8511 instead of assuming memory breakpoint.
8512 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8513 software and hardware breakpoints.
8514 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8515 Check both software and hardware breakpoints.
8516 (validate_inserted_breakpoint): Assert the breakpoint is a
8517 software breakpoint. Set the inserted flag to -1 instead of
8518 setting shlib_disabled.
8519 (delete_disabled_breakpoints): Adjust.
8520 (validate_breakpoints): Only validate software breakpoints.
8521 Adjust to inserted flag change.
8522 (check_mem_read, check_mem_write): Skip breakpoint types other
8523 than software breakpoints. Adjust to inserted flag change.
8524 * mem-break.h (enum raw_bkpt_type): New enum.
8525 (raw_breakpoint, struct process_info): Forward declare.
8526 (Z_packet_to_target_hw_bp_type): Delete declaration.
8527 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8528 (set_gdb_breakpoint, delete_gdb_breakpoint)
8529 (clear_breakpoint_conditions): New declarations.
8530 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8531 (breakpoint_inserted_here): Update comment.
8532 (add_breakpoint_condition, add_breakpoint_commands): Replace
8533 address parameter with a breakpoint pointer parameter.
8534 (gdb_breakpoint_here): Update comment.
8535 (delete_gdb_breakpoint_at): Delete.
8536 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8537 * server.c (process_point_options): Take a struct breakpoint
8538 pointer instead of an address. Adjust.
8539 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8540 delete_gdb_breakpoint.
8541 * spu-low.c (spu_target_ops): Install NULL as
8542 supports_z_point_type method.
8543 * target.h: Include mem-break.h.
8544 (struct target_ops) <prepare_to_access_memory>: Update comment.
8545 <supports_z_point_type>: New field.
8546 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8547 instead of a char. Also take a raw breakpoint pointer.
8548 * win32-arm-low.c (the_low_target): Install NULL as
8549 supports_z_point_type.
8550 * win32-i386-low.c (i386_supports_z_point_type): New function.
8551 (i386_insert_point, i386_remove_point): Adjust to new interface.
8552 (the_low_target): Install i386_supports_z_point_type.
8553 * win32-low.c (win32_supports_z_point_type): New function.
8554 (win32_insert_point, win32_remove_point): Adjust to new interface.
8555 (win32_target_ops): Install win32_supports_z_point_type.
8556 * win32-low.h (struct win32_target_ops):
8557 <supports_z_point_type>: New method.
8558 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8559 instead of a char. Also take a raw breakpoint pointer.
8561 2014-05-20 Pedro Alves <palves@redhat.com>
8563 * mem-break.h: Include break-common.h.
8564 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8565 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8566 (Z_packet_to_target_hw_bp_type): New declaration.
8567 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8568 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8569 (Z_PACKET_ACCESS_WP): Delete macros.
8570 (Z_packet_to_hw_type): Delete function.
8571 * i386-low.h: Don't include break-common.h here.
8572 (Z_packet_to_hw_type): Delete declaration.
8573 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8574 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8575 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8576 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8577 * linux-aarch64-low.c: Don't include break-common.h here.
8578 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8579 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8580 (Z_packet_to_target_hw_bp_type): Delete function.
8581 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8583 (mips_insert_point, mips_remove_point): Use
8584 Z_packet_to_target_hw_bp_type.
8586 2014-05-20 Pedro Alves <palves@redhat.com>
8588 * linux-aarch64-low.c: Include break-common.h.
8589 (enum target_point_type): Delete.
8590 (Z_packet_to_point_type): Rename to ...
8591 (Z_packet_to_target_hw_bp_type): ... this, and return a
8592 target_hw_bp_type instead.
8593 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8594 instead of an enum target_point_type.
8595 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8597 (aarch64_dr_state_insert_one_point)
8598 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8599 (aarch64_handle_aligned_watchpoint)
8600 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8601 Take an enum target_hw_bp_type instead of an enum
8603 (aarch64_supports_z_point_type): New function.
8604 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8605 use Z_packet_to_target_hw_bp_type.
8607 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8609 * configure.ac: Only use -Werror by default when DEVELOPMENT
8611 * configure: Regenerate.
8613 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8615 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8616 * linux-x86-low.c (X86_64_USER_REGS): New.
8617 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8619 2014-04-28 Yao Qi <yao@codesourcery.com>
8621 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8624 2014-04-25 Pedro Alves <palves@redhat.com>
8627 * linux-low.c (linux_attach_fail_reason_string): New function.
8628 (linux_attach_lwp): Delete.
8629 (linux_attach_lwp_1): Rename to ...
8630 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8631 argument. Remove "initial" parameter. Return int instead of
8632 void. Don't error or warn here.
8633 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8634 failure to attach to the tgid. Call warning when failing to
8636 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8637 argument. Remove "initial" parameter. Return int instead of
8638 void. Don't error or warn here.
8639 (linux_attach_fail_reason_string): New declaration.
8640 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8641 interface change. Use linux_attach_fail_reason_string.
8643 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8644 Walfred Tedeschi <walfred.tedeschi@intel.com>
8646 * Makefile.in: Added rules to handle new files
8647 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8648 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8649 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8650 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8651 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8652 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8654 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8655 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8656 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8657 i386/x32-avx512.xml.
8658 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8659 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8660 i386/x32-avx512-linux.xml.
8661 * i387-fp.c (num_avx512_k_registers): New constant for number
8663 (num_avx512_zmmh_low_registers): New constant for number of
8664 lower ZMM registers (0-15).
8665 (num_avx512_zmmh_high_registers): New constant for number of
8666 higher ZMM registers (16-31).
8667 (num_avx512_ymmh_registers): New contant for number of higher
8668 YMM registers (ymm16-31 added by avx521 on x86_64).
8669 (num_avx512_xmm_registers): New constant for number of higher
8670 XMM registers (xmm16-31 added by AVX512 on x86_64).
8671 (struct i387_xsave): Add space for AVX512 registers.
8672 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8673 Add code to handle AVX512 registers.
8674 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8675 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8676 prototypei from generated file.
8677 (tdesc_amd64_avx512_linux): Likewise.
8678 (init_registers_x32_avx512_linux): Likewise.
8679 (tdesc_x32_avx512_linux): Likewise.
8680 (init_registers_i386_avx512_linux): Likewise.
8681 (tdesc_i386_avx512_linux): Likewise.
8682 (x86_64_regmap): Add AVX512 registers.
8683 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8685 (initialize_low_arch): Add code to initialize AVX512 registers.
8687 2014-04-23 Pedro Alves <palves@redhat.com>
8689 * mem-break.c (find_gdb_breakpoint_at): Make static.
8690 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8692 2014-04-23 Pedro Alves <palves@redhat.com>
8694 * i386-low.c: Don't include break-common.h here.
8695 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8696 prototype to take target_hw_bp_type as argument instead of a Z
8698 * i386-low.h: Include break-common.h here.
8699 (Z_packet_to_hw_type): Declare.
8700 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8702 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8703 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8704 (x86_remove_point): Convert the packet number to a
8705 target_hw_bp_type before calling i386_low_remove_watchpoint.
8706 * win32-i386-low.c (i386_insert_point): Convert the packet number
8707 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8708 (i386_remove_point): Convert the packet number to a
8709 target_hw_bp_type before calling i386_low_remove_watchpoint.
8711 2014-04-23 Pedro Alves <palves@redhat.com>
8713 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8715 2014-04-10 Pedro Alves <palves@redhat.com>
8717 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8718 Check if the condition or command is NULL before checking if the
8719 breakpoint is known. On success, return true.
8720 * mem-break.h (add_breakpoint_condition): Document return.
8721 (add_breakpoint_commands): Add describing comment.
8722 * server.c (skip_to_semicolon): New function.
8723 (process_point_options): Use it.
8725 2014-04-09 Pedro Alves <palves@redhat.com>
8727 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8730 2014-02-27 Pedro Alves <palves@redhat.com>
8733 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8735 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8737 (last_thread_of_process_p): Take a PID argument instead of a
8739 (linux_wait_for_lwp): Delete.
8740 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8742 (linux_low_filter_event): New function, party factored out from
8743 linux_wait_for_event.
8744 (linux_wait_for_event): Rename to ...
8745 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8746 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8747 sigsuspend. Check for zombie leaders.
8748 (linux_wait_for_event): Reimplement as wrapper around
8749 linux_wait_for_event_filtered.
8750 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8751 a normal or signal exit is seen, it's the whole process exiting.
8752 (wait_for_sigstop): No longer a for_each_inferior callback.
8753 Rewrite on top of linux_wait_for_event_filtered.
8754 (stop_all_lwps): Call wait_for_sigstop directly.
8755 * server.c (resume, handle_target_event): Handle
8756 TARGET_WAITKIND_NO_RESUMED.
8758 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8760 * win32-low.c (psapi_get_dll_name,
8761 * win32_CreateToolhelp32Snapshot): Delete.
8762 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8763 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8765 (handle_load_dll): Add function description.
8766 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8768 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8770 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8772 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8773 base address when calling win32_add_one_solib.
8774 (handle_load_dll): Delete local variable load_addr.
8775 Remove 0x1000 offset applied to DLL base address when calling
8776 win32_add_one_solib.
8777 (handle_unload_dll): Add comment.
8779 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8781 * win32-low.c (win32_add_all_dlls): Renames
8782 win32_ensure_ntdll_loaded. Rewrite function documentation.
8783 Adjust implementation to always load all DLLs.
8784 Add 0x1000 offset to DLL base address when calling
8785 win32_add_one_solib.
8786 (child_initialization_done): New static global.
8787 (do_initial_child_stuff): Set child_initialization_done to
8788 zero during child initialization, and 1 after. Replace call
8789 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8791 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8792 (handle_unload_dll): Add function documentation.
8793 (get_child_debug_event): Ignore load and unload DLL events
8794 during child initialization.
8796 2014-02-20 Doug Evans <dje@google.com>
8798 Remove global all_lwps.
8799 * inferiors.h (ptid_of): Move here from linux-low.h.
8800 (pid_of, lwpid_of): Ditto.
8801 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8802 parameter is a struct thread_info * now.
8803 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8804 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8805 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8807 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8808 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8809 * linux-arm-low.c (update_registers_callback): Update, "entry"
8810 parameter is a struct thread_info * now.
8811 Fetch lwpid from current_inferior directly.
8812 (arm_insert_point): Pass &all_threads to find_inferior instead of
8814 (arm_remove_point): Ditto.
8815 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8816 (arm_prepare_to_resume): Fetch pid from thread.
8817 (arm_read_description): Fetch lwpid from current_inferior directly.
8818 * linux-low.c (all_lwps): Delete.
8819 (delete_lwp): Delete call to remove_inferior.
8820 (handle_extended_wait): Fetch lwpid from thread.
8821 (add_lwp): Don't set lwp->entry.id. Remove call to
8822 add_inferior_to_list.
8823 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8824 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8825 (kill_one_lwp_callback): Ditto.
8826 (linux_kill): Don't dereference NULL pointer.
8827 Fetch ptid,lwpid from thread.
8828 (get_detach_signal): Fetch ptid from thread.
8829 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8830 Simplify call to regcache_invalidate_thread.
8831 (delete_lwp_callback): Update, "entry" parameter is a
8832 struct thread_info * now. Fetch pid from thread.
8833 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8834 (status_pending_p_callback): Update, "entry" parameter is a
8835 struct thread_info * now. Fetch ptid from thread.
8836 (find_lwp_pid): Update, "entry" parameter is a
8837 struct thread_info * now.
8838 (linux_wait_for_lwp): Fetch pid from thread.
8839 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8840 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8841 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8842 (dequeue_one_deferred_signal): Ditto.
8843 (cancel_breakpoint): Fetch ptid from current_inferior.
8844 (linux_wait_for_event): Pass &all_threads to find_inferior,
8845 not &all_lwps. Fetch ptid, lwpid from thread.
8846 (count_events_callback): Update, "entry" parameter is a
8847 struct thread_info * now.
8848 (select_singlestep_lwp_callback): Ditto.
8849 (select_event_lwp_callback): Ditto.
8850 (cancel_breakpoints_callback): Ditto.
8851 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8853 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8854 (unsuspend_one_lwp): Update, "entry" parameter is a
8855 struct thread_info * now.
8856 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8858 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8859 Fetch lwpid from thread, not lwp.
8860 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8861 Pass &all_threads to find_inferior, not &all_lwps.
8862 (send_sigstop): Fetch lwpid from thread, not lwp.
8863 (send_sigstop_callback): Update, "entry" parameter is a
8864 struct thread_info * now.
8865 (suspend_and_send_sigstop_callback): Ditto.
8866 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8867 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8868 struct thread_info * now.
8869 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8871 (lwp_running): Update, "entry" parameter is a
8872 struct thread_info * now.
8873 (stop_all_lwps): Fetch ptid from thread.
8874 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8875 (linux_resume_one_lwp): Fetch lwpid from thread.
8876 (linux_set_resume_request): Update, "entry" parameter is a
8877 struct thread_info * now. Fetch pid, lwpid from thread.
8878 (resume_status_pending_p): Update, "entry" parameter is a
8879 struct thread_info * now.
8880 (need_step_over_p): Ditto. Fetch lwpid from thread.
8881 (start_step_over): Fetch lwpid from thread.
8882 (linux_resume_one_thread): Update, "entry" parameter is a
8883 struct thread_info * now. Fetch lwpid from thread.
8884 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8885 (proceed_one_lwp): Update, "entry" parameter is a
8886 struct thread_info * now. Fetch lwpid from thread.
8887 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8888 struct thread_info * now.
8889 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8890 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8891 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8893 (regsets_store_inferior_registers): Ditto.
8894 (fetch_register, store_register): Ditto.
8895 (linux_read_memory, linux_write_memory): Ditto.
8896 (linux_request_interrupt): Ditto.
8897 (linux_read_auxv): Ditto.
8898 (linux_xfer_siginfo): Ditto.
8899 (linux_qxfer_spu): Ditto.
8900 (linux_qxfer_libraries_svr4): Ditto.
8901 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8902 moved to inferiors.h.
8904 (get_thread_lwp): Update.
8905 (struct lwp_info): Delete member "entry". Simplify comment for
8908 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8909 current_inferior directly.
8910 (update_watch_registers_callback): Update, "entry" parameter is a
8911 struct thread_info * now. Fetch pid from thread.
8912 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8913 (mips_insert_point): Fetch lwpid from current_inferior.
8914 Pass &all_threads to find_inferior, not &all_lwps.
8915 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8916 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8918 (mips_stopped_data_address): Ditto.
8919 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8921 * linux-tile-low.c (tile_arch_setup): Ditto.
8922 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8923 (update_debug_registers_callback): Update, "entry" parameter is a
8924 struct thread_info * now. Fetch pid from thread.
8925 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8926 Pass &all_threads to find_inferior, not &all_lwps.
8927 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8928 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8929 Pass &all_threads to find_inferior, not &all_lwps.
8930 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8931 (i386_dr_low_get_status): Ditto.
8932 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8933 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8934 (x86_linux_read_description): Ditto.
8935 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8937 2014-02-20 Doug Evans <dje@google.com>
8939 * inferiors.c (get_first_inferior): Fix buglet.
8941 2014-02-19 Doug Evans <dje@google.com>
8943 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8944 * inferiors.c (add_thread): Change result type to struct thread_info *.
8945 All callers updated.
8946 (add_lwp): Call add_thread here instead of in callers.
8947 All callers updated.
8948 * linux-low.h (get_lwp_thread): Rewrite.
8949 (struct lwp_info): New member "thread".
8951 2014-02-19 Doug Evans <dje@google.com>
8953 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8954 All callers updated.
8956 2014-02-19 Doug Evans <dje@google.com>
8958 * inferiors.c (add_thread): Fix whitespace.
8960 2014-02-19 Doug Evans <dje@google.com>
8962 * dll.c (clear_dlls): Replace accessing list implemention details
8964 * gdbthread.h (get_first_thread): Declare.
8965 * inferiors.c (for_each_inferior_with_data): New function.
8966 (get_first_thread): New function.
8967 (find_thread_ptid): Simplify.
8968 (get_first_inferior): New function.
8969 (clear_list): Delete.
8970 (one_inferior_p): New function.
8971 (clear_inferior_list): New function.
8972 (clear_inferiors): Update.
8973 * inferiors.h (for_each_inferior_with_data): Declare.
8974 (clear_inferior_list): Declare.
8975 (one_inferior_p): Declare.
8976 (get_first_inferior): Declare.
8977 * linux-low.c (linux_wait_for_event): Replace accessing list
8978 implemention details with API function.
8979 * server.c (target_running): Ditto.
8980 (accumulate_file_name_length): New function.
8981 (emit_dll_description): New function.
8982 (handle_qxfer_libraries): Replace accessing list implemention
8983 details with API function.
8984 (handle_qxfer_threads_worker): New function.
8985 (handle_qxfer_threads_proper): Replace accessing list implemention
8986 details with API function.
8987 (handle_query): Ditto.
8988 (visit_actioned_threads_callback_ftype): New typedef.
8989 (visit_actioned_threads_data): New struct.
8990 (visit_actioned_threads): Rewrite to be find_inferior callback.
8991 (resume): Call find_inferior.
8992 (handle_status): Replace accessing list implemention
8993 details with API function.
8994 (process_serial_event): Replace accessing list implemention details
8996 * target.c (set_desired_inferior): Replace accessing list implemention
8997 details with API function.
8998 * tracepoint.c (same_process_p): New function.
8999 (gdb_agent_about_to_close): Replace accessing list implemention
9000 details with API function.
9001 * win32-low.c (child_delete_thread): Replace accessing list
9002 implemention details with API function.
9003 (match_dll_by_basename): New function.
9004 (dll_is_loaded_by_basename): New function.
9005 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9006 details call to dll_is_loaded_by_basename.
9008 2014-02-19 Doug Evans <dje@google.com>
9010 * dll.h (struct dll_info): Add comment.
9011 * gdbthread.h (struct thread_info): Add comment.
9012 (current_ptid): Simplify.
9013 * inferiors.c (add_process): Update.
9014 (remove_process): Update.
9015 * inferiors.h (struct process_info): Rename member "head" to "entry".
9016 * linux-low.c (delete_lwp): Update.
9018 (last_thread_of_process_p): Update.
9019 (kill_one_lwp_callback, linux_kill): Update.
9020 (status_pending_p_callback): Update.
9021 (wait_for_sigstop): Update. Simplify read of ptid.
9022 (start_step_over): Update.
9023 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9024 (get_lwp_thread): Update.
9025 (struct lwp_info): Rename member "head" to "entry".
9026 * regcache.h (inferior_list_entry): Delete.
9027 * server.c (kill_inferior_callback): Update.
9028 (detach_or_kill_inferior_callback): Update.
9029 (print_started_pid): Update.
9030 (print_attached_pid): Update.
9031 (process_serial_event): Simplify read of ptid.
9032 * thread-db.c (thread_db_create_event): Update.
9033 (thread_db_get_tls_address): Update.
9034 * win32-low.c (current_inferior_ptid): Simplify.
9036 2014-02-19 Tom Tromey <tromey@redhat.com>
9038 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9040 (target_supports_btrace): Update.
9042 2014-02-14 Yao Qi <yao@codesourcery.com>
9044 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9045 (rsp-low-ipa.o): New target.
9047 2014-02-12 Tom Tromey <tromey@redhat.com>
9049 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9050 convert_ascii_to_int.
9051 * regcache.c (registers_to_string): Likewise.
9052 * remote-utils.c (decode_M_packet): Likewise.
9053 * server.c (process_serial_event): Likewise.
9055 2014-02-12 Tom Tromey <tromey@redhat.com>
9057 * server.c (handle_query, handle_v_run): Use hex2bin, not
9059 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9061 2014-02-12 Tom Tromey <tromey@redhat.com>
9063 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9064 convert_int_to_ascii.
9065 * regcache.c (registers_to_string, collect_register_as_string):
9067 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9069 * server.c (process_serial_event): Likewise.
9070 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9071 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9073 2014-02-12 Tom Tromey <tromey@redhat.com>
9075 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9076 bin2hex, not hexify.
9077 * tracepoint.c (cmd_qtstatus): Likewise.
9079 2014-02-12 Tom Tromey <tromey@redhat.com>
9081 * remote-utils.c (monitor_output): Pass explicit length to
9084 2014-02-12 Tom Tromey <tromey@redhat.com>
9086 * tracepoint.c: Include rsp-low.h.
9087 * server.c: Include rsp-low.h.
9088 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9089 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9091 * remote-utils.c: Include rsp-low.h.
9092 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9093 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9094 (convert_int_to_ascii, convert_ascii_to_int): Move to
9096 * regcache.c: Include rsp-low.h.
9097 * ax.c: Include rsp-low.h.
9098 * Makefile.in (SFILES): Add common/rsp-low.c.
9099 (OBS): Add rsp-low.o.
9100 (rsp-low.o): New target.
9102 2014-02-12 Tom Tromey <tromey@redhat.com>
9104 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9105 Include print-utils.h.
9106 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9107 (plongest, thirty_two, phex_nz): Remove.
9108 * Makefile.in (SFILES): Add common/print-utils.c.
9109 (OBS): Add print-utils.o.
9110 (print-utils-ipa.o): New target.
9111 (print-utils.o): New target.
9112 (IPA_OBJS): Add print-utils-ipa.o.
9114 2014-02-06 Tom Tromey <tromey@redhat.com>
9116 * Makefile.in (SFILES): Fix indentation.
9118 2014-02-05 Doug Evans <dje@google.com>
9120 * linux-low.c (linux_wait_for_event): Improve comment.
9121 (linux_wait_1): Keep current_inferior in sync with event_child.
9123 2014-01-22 Doug Evans <dje@google.com>
9125 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9127 2014-01-22 Doug Evans <dje@google.com>
9129 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9130 * configure: Regenerate.
9131 * config.in: Regenerate.
9132 * Makefile.in (SFILES): Add debug.c.
9134 * debug.c: New file.
9135 * debug.h: New file.
9136 * linux-aarch64-low.c (*): Update all debugging printfs to use
9137 debug_printf instead of fprintf.
9138 * linux-arm-low.c (*): Ditto.
9139 * linux-cris-low.c (*): Ditto.
9140 * linux-crisv32-low.c (*): Ditto.
9141 * linux-m32r-low.c (*): Ditto.
9142 * linux-sparc-low.c (*): Ditto.
9143 * linux-x86.c (*): Ditto.
9144 * linux-low.c (*): Ditto.
9145 (linux_wait_1): Add calls to debug_enter, debug_exit.
9146 (linux_wait): Remove redundant debugging printf.
9147 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9148 (linux_resume, unstop_all_lwps): Ditto.
9149 * mem-break.c (*): Update all debugging printfs to use
9150 debug_printf instead of fprintf.
9151 * remote-utils.c (*): Ditto.
9152 * thread-db.c (*): Ditto.
9153 * server.c #include <ctype.h>, "gdb_vecs.h".
9154 (debug_threads): Moved to debug.c.
9155 (*): Update all debugging printfs to use debug_printf instead of
9157 (start_inferior): Replace call to fflush with call to debug_flush.
9158 (monitor_show_help): Mention set debug-format.
9159 (parse_debug_format_options): New function.
9160 (handle_monitor_command): Handle "monitor set debug-format".
9161 (gdbserver_usage): Mention --debug-format.
9162 (main): Parse --debug-format.
9163 * server.h (debug_threads): Declaration moved to debug.h.
9165 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9166 trace_debug_1 that uses debug_printf.
9167 (tracepoint_look_up_symbols): Update all debugging printfs to use
9168 debug_printf instead of fprintf.
9170 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9172 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9175 2014-01-17 Pedro Alves <palves@redhat.com>
9178 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9179 defined after including gdb_proc_service.h.
9181 2014-01-16 Doug Evans <dje@google.com>
9183 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9184 (match_dll): Use it.
9186 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9188 * target.h (target_ops) <read_btrace>: Change parameters and
9189 return type to allow error reporting.
9190 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9191 trace reading errors on.
9192 * linux-low.c (linux_low_read_btrace): Pass trace reading
9194 (linux_low_disable_btrace): New.
9196 2014-01-15 Doug Evans <dje@google.com>
9198 * inferiors.c (thread_id_to_gdb_id): Delete.
9199 * inferiors.h (thread_id_to_gdb_id): Delete.
9201 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9203 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9204 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9207 2014-01-08 Pedro Alves <palves@redhat.com>
9209 * server.c (handle_status): Don't discard previous queued stop
9210 replies or thread's pending status here.
9211 (main) <disconnection>: Do it here instead.
9213 2014-01-08 Pedro Alves <palves@redhat.com>
9215 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9216 * server.c (visit_actioned_threads, handle_pending_status): New
9218 (handle_v_cont): Factor out parts to ...
9219 (resume): ... this new function. If in all-stop, and a thread
9220 being resumed has a pending status, report it without actually
9222 (myresume): Adjust to use the new 'resume' function.
9223 (clear_pending_status_callback, set_pending_status_callback)
9224 (find_status_pending_thread_callback): New functions.
9225 (handle_status): Handle the case of multiple threads having
9226 interesting statuses to report. Report threads' real last signal
9227 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9228 with an interesting thread to report the status for, instead of
9229 always reporting the status of the first thread.
9231 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9233 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9234 * gdbreplay.c (gdbreplay_version): Likewise.
9236 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9238 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9239 iov.iov_len with the real length in use.
9241 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9243 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9244 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9245 for all targets that use win32-low.c.
9246 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9247 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9249 2013-12-13 Pedro Alves <palves@redhat.com>
9251 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9252 if equal to TARGET_WAITKIND_LOADED.
9253 * win32-low.c (cached_status): New static global.
9254 (win32_wait): Add declaration.
9255 (do_initial_child_stuff): Flush all initial pending debug events
9256 up to the initial breakpoint.
9257 (win32_wait): If CACHED_STATUS was set, return that instead
9258 of doing a real wait. Remove the code resuming the execution
9259 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9260 during the initial phase. Also remove the code changing
9261 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9262 TARGET_WAITKIND_STOPPED.
9264 2013-12-11 Yao Qi <yao@codesourcery.com>
9266 * notif.c (handle_notif_ack): Return 0 if no notification
9269 2013-11-20 Doug Evans <dje@google.com>
9271 * linux-low.c (linux_set_resume_request): Fix comment.
9273 2013-11-20 Doug Evans <dje@google.com>
9275 * linux-low.c (resume_status_pending_p): Tweak comment.
9277 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9279 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9280 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9281 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9282 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9283 (srv_amd64_regobj): Add amd64-mpx.o.
9284 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9285 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9286 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9287 * i387-fp.c (num_pl_bnd_register) Added constant.
9288 (num_pl_bnd_cfg_registers) Added constant.
9289 (struct i387_xsave) Added reserved area and MPX fields.
9290 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9291 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9293 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9294 (init_registers_amd64_mpx_linux): Declare new function.
9295 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9296 (x86_64_regmap): Add MPX registers.
9297 (x86_linux_read_description): Add MPX case.
9298 (initialize_low_arch): Initialize MPX targets.
9300 2013-11-18 Tom Tromey <tromey@redhat.com>
9302 * configure: Rebuild.
9303 * configure.ac: Don't check for stdlib.h.
9304 * gdbreplay.c: Unconditionally include stdlib.h.
9306 2013-11-18 Tom Tromey <tromey@redhat.com>
9308 * config.in: Rebuild.
9309 * configure: Rebuild.
9310 * configure.ac: Don't use AC_HEADER_DIRENT.
9312 2013-11-18 Tom Tromey <tromey@redhat.com>
9314 * server.h: Don't check HAVE_STRING_H.
9315 * gdbreplay.c: Don't check HAVE_STRING_H.
9316 * configure: Rebuild.
9318 2013-11-18 Tom Tromey <tromey@redhat.com>
9320 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9323 2013-11-08 Tom Tromey <tromey@redhat.com>
9325 * configure, config.in: Rebuild.
9326 * configure.ac: Remove unused configury.
9328 2013-11-08 Tom Tromey <tromey@redhat.com>
9330 * acinclude.m4: Include common.m4, codeset.m4.
9331 * configure, config.in: Rebuild.
9332 * configure.ac: Use GDB_AC_COMMON.
9334 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9336 * linux-s390-low.c (HWCAP_S390_TE): New define.
9337 (s390_arch_setup): Consider the TE field in the HWCAP for
9338 determining 'have_regset_tdb'.
9340 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9343 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9346 2013-10-02 Pedro Alves <palves@redhat.com>
9348 * server.c (process_serial_event): Don't output "GDBserver
9349 exiting" if GDB is connected through stdio.
9350 * target.c (mywait): Likewise, be silent if GDB is connected
9353 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9355 * lynx-low.c (lynx_add_threads_after_attach): New function.
9356 (lynx_attach): Remove call to add_thread. Add call to
9357 lynx_add_threads_after_attach instead.
9359 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9361 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9362 * config.in, configure: Regenerated.
9364 2013-09-18 Yao Qi <yao@codesourcery.com>
9367 * server.c (start_inferior): Clear 'resume_info'.
9369 2013-09-16 Jiong Wang <jiwang@tilera.com>
9371 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9374 2013-09-16 Jiong Wang <jiwang@tilera.com>
9376 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9377 linux-tile-low.o to srv_tgtobj.
9379 2013-09-16 Will Newton <will.newton@linaro.org>
9381 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9384 2013-09-06 Pedro Alves <palves@redhat.com>
9386 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9387 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9388 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9389 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9390 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9391 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9393 2013-09-06 Pedro Alves <palves@redhat.com>
9395 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9396 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9398 2013-09-06 Pedro Alves <palves@redhat.com>
9400 * linux-amd64-ipa.c: Include tracepoint.h.
9401 * linux-i386-ipa.c: Include tracepoint.h.
9403 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9405 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9406 (ps_get_thread_area): New function.
9408 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9410 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9411 (initialize_low_arch): Call init_registers_crisv32 rather than
9412 init_register_crisv32.
9414 2013-09-05 Pedro Alves <palves@redhat.com>
9416 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9418 * hostio.h: ... this new file.
9419 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9420 win32-low.c: Include hostio.h.
9422 2013-09-05 Pedro Alves <palves@redhat.com>
9424 * server.h (gdb_client_data, handler_func, callback_handler_func)
9425 (delete_file_handler, add_file_handler, append_callback_event)
9426 (delete_callback_event, start_event_loop, initialize_event_loop):
9427 Move to event-loop.h and include it.
9428 * event-loop.h: New file.
9430 2013-09-05 Pedro Alves <palves@redhat.com>
9432 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9433 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9434 (loaded_dll, unloaded_dll): Move to ...
9435 * dll.h: ... this new file.
9436 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9438 2013-09-05 Pedro Alves <palves@redhat.com>
9440 * server.h (current_process, get_thread_process, all_processes)
9441 (add_inferior_to_list, for_each_inferior, current_inferior)
9442 (remove_inferior, add_process, remove_process, find_process_pid)
9443 (have_started_inferiors_p, have_attached_inferiors_p)
9444 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9445 (clear_inferiors, find_inferior, find_inferior_id)
9446 (inferior_target_data, set_inferior_target_data)
9447 (inferior_regcache_data, set_inferior_regcache_data): Move to
9448 inferiors.h, and include it.
9449 * inferiors.h: New file.
9451 2013-09-05 Pedro Alves <palves@redhat.com>
9453 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9457 2013-09-05 Pedro Alves <palves@redhat.com>
9459 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9461 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9462 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9463 (handle_tracepoint_general_set, handle_tracepoint_query)
9464 (tracepoint_finished_step, tracepoint_was_hit)
9465 (release_while_stepping_state_list, current_traceframe)
9466 (in_readonly_region, traceframe_read_mem)
9467 (fetch_traceframe_registers, traceframe_read_sdata)
9468 (traceframe_read_info, struct fast_tpoint_collect_status)
9469 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9470 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9471 (supply_fast_tracepoint_registers)
9472 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9473 (ipa_tdesc, claim_trampoline_space)
9474 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9475 (agent_mem_read, agent_get_trace_state_variable_value)
9476 (agent_set_trace_state_variable_value, agent_tsv_read)
9477 (agent_mem_read_string, get_raw_reg_func_addr)
9478 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9479 * tracepoint.h: ... this new file.
9481 2013-09-05 Pedro Alves <palves@redhat.com>
9483 * server.h (perror_with_name, error, fatal, warning, paddress)
9484 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9486 * utils.h: New file.
9488 2013-09-05 Pedro Alves <palves@redhat.com>
9490 * server.h (remote_debug, noack_mode, transport_is_reliable)
9491 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9492 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9493 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9494 (write_enn, initialize_async_io, enable_async_io)
9495 (disable_async_io, check_remote_input_interrupt_request)
9496 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9497 (dead_thread_notify, prepare_resume_reply)
9498 (decode_address_to_semicolon, decode_address, decode_m_packet)
9499 (decode_M_packet, decode_X_packet, decode_xfer_write)
9500 (decode_search_memory_packet, unhexify, hexify)
9501 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9502 (look_up_one_symbol, relocate_instruction)
9503 (monitor_output): Move to remote-utils.h, and include it.
9504 * remote-utils.h: New file.
9506 2013-09-05 Pedro Alves <palves@redhat.com>
9508 * server.h (_): Delete.
9510 2013-09-02 Pedro Alves <palves@redhat.com>
9512 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9513 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9515 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9517 2013-09-02 Pierre Muller <muller@sourceware.org>
9519 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9520 or WriteProcessMemory complete successfully and handle
9521 ERROR_PARTIAL_COPY error.
9523 2013-09-02 Pedro Alves <palves@redhat.com>
9525 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9526 error instead of EIO.
9528 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9531 * linux-low.c: Include filestuff.h.
9532 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9533 * lynx-low.c: Include filestuff.h.
9534 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9535 * server.c: Include filestuff.h.
9536 (main): Call notice_open_fds.
9537 * spu-low.c: Include filestuff.h.
9538 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9540 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9542 * Makefile.in: Explain why ../target and ../nat are not
9543 listed as include file search paths.
9544 (linux-waitpid.o): New object file rule.
9545 * configure.srv (srv_native_linux_obj): New variable.
9546 Replace all occurrences of linux native object files with
9547 $srv_native_linux_obj.
9548 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9549 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9550 (linux_enable_event_reporting): Remove declaration.
9551 (my_waitpid): Moved to common/linux-waitpid.c.
9552 (linux_wait_for_event): Pass ptid when calling
9553 linux_enable_event_reporting.
9554 (linux_supports_tracefork_flag): Remove.
9555 (linux_enable_event_reporting): Likewise.
9556 (linux_tracefork_grandchild): Remove.
9557 (STACK_SIZE): Moved to common/linux-ptrace.c.
9558 (linux_tracefork_child): Remove.
9559 (linux_test_for_tracefork): Remove.
9560 (linux_look_up_symbols): Call linux_supports_traceclone.
9561 (initialize_low): Remove call to linux_test_for_tracefork.
9562 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9563 common/linux-ptrace.h.
9564 (PTRACE_TYPE_ARG4): Likewise.
9565 Include linux-ptrace.h.
9567 2013-08-21 Pedro Alves <palves@redhat.com>
9569 * config.in: Renegerate.
9571 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9573 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9574 (SFILES): Remove $(srcdir)/common/target-common.c and
9575 add $(srcdir)/target/waitstatus.c.
9576 (OBS): Remove target-common.o and add waitstatus.o.
9577 (server_h): Remove $(srcdir)/../common/target-common.h and
9578 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9579 and $(srcdir)/../target/waitstatus.h.
9580 (target-common.o): Remove.
9581 (waitstatus.o): New target object file.
9582 * target.h: Do not include target-common.h and
9583 include target/resume.h, target/wait.h and
9584 target/waitstatus.h.
9586 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9588 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9589 to PTRACE_TYPE_ARG3.
9590 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9591 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9593 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9594 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9596 2013-07-27 Jie Zhang <jie@codesourcery.com>
9597 Daniel Jacobowitz <dan@codesourcery.com>
9598 Yao Qi <yao@codesourcery.com>
9600 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9601 (mips-linux-watch.o): New rule.
9602 (mips_linux_watch_h): New variable.
9603 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9605 * linux-mips-low.c: Include mips-linux-watch.h.
9606 (struct arch_process_info, struct arch_lwp_info): New.
9607 (update_watch_registers_callback): New function.
9608 (mips_linux_new_process, mips_linux_new_thread) New functions.
9609 (mips_linux_prepare_to_resume, mips_insert_point): New
9611 (mips_remove_point, mips_stopped_by_watchpoint): New
9613 (rsp_bp_type_to_target_hw_bp_type): New function.
9614 (mips_stopped_data_address): New function.
9615 (the_low_target): Add watchpoint support functions.
9617 2013-07-27 Yao Qi <yao@codesourcery.com>
9619 * i386-low.c: Include break-common.h.
9620 (enum target_hw_bp_type): Remove.
9622 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9624 * Makefile.in (SFILES): /common/target-common.c.
9625 (OBS): Add target-common.o.
9626 (server_h): Add $(srcdir)/../common/target-common.h.
9627 (target-common.o): New target.
9628 * server.c (queue_stop_reply_callback): Free
9629 status string after use.
9630 * target.c (target_waitstatus_to_string): Remove.
9631 * target.h: Include target-common.h.
9632 (resume_kind): Likewise.
9633 (target_waitkind): Likewise.
9634 (target_waitstatus): Likewise.
9635 (TARGET_WNOHANG): Likewise.
9637 2013-07-04 Yao Qi <yao@codesourcery.com>
9639 * Makefile.in (host_alias): Use @host_noncanonical@.
9640 (target_alias): Use @target_noncanonical@.
9641 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9642 ACX_NONCANONICAL_HOST.
9643 * configure: Regenerated.
9646 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9648 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9649 * configure: Rebuild.
9650 * Makefile.in (version_host, version_target): Get from configure.
9651 (version.c): Use $(version_host) and $(version_target).
9653 2013-07-03 Pedro Alves <palves@redhat.com>
9655 * Makefile.in (config.status): Depend on development.sh.
9656 * acinclude.m4: Include libmcheck.m4.
9657 * configure: Regenerate.
9659 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9661 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9662 attribute inside the parentheses.
9663 (winapi_DebugSetProcessKillOnExit): Ditto.
9664 (winapi_DebugBreakProcess): Ditto.
9665 (winapi_GenerateConsoleCtrlEvent): Ditto.
9667 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9669 * notif.h (notif_event): Add a dummy member to avoid compiler
9672 2013-07-01 Pedro Alves <palves@redhat.com>
9674 * hostio.c (HOSTIO_PATH_MAX): Define.
9675 (require_filename, handle_open, handle_unlink, handle_readlink):
9678 2013-07-01 Pedro Alves <palves@redhat.com>
9680 * server.h: Include "pathmax.h".
9681 * linux-low.c: Don't include sys/param.h.
9682 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9684 * win32-low.c: Don't include sys/param.h.
9685 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9687 2013-07-01 Pedro Alves <palves@redhat.com>
9689 * event-loop.c: Don't check HAVE_UNISTD_H before including
9691 * gdbreplay.c: Likewise.
9692 * remote-utils.c: Likewise.
9693 * server.c: Likewise.
9694 * configure.ac: Don't check for unistd.h.
9695 * configure: Regenerate.
9697 2013-06-28 Tom Tromey <tromey@redhat.com>
9699 * Makefile.in (version.c): Use version.in, not
9702 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9704 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9705 * configure: Rebuild.
9706 * Makefile.in (version_host, version_target): Get from configure.
9707 (version.c): Use $(version_host) and $(version_target).
9709 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9711 Fix trace-status to output user name without trailing colon.
9712 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9714 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9716 Fix trace-status to output proper start-time and stop-time.
9717 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9718 output start time and stop time in hex as gdb expects.
9720 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9722 * tracepoint.c (build_traceframe_info_xml): Output trace state
9723 variables present in the trace buffer.
9725 2013-06-24 Tom Tromey <tromey@redhat.com>
9727 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9729 (version.o): Remove.
9730 * gdbreplay.c: Include version.h.
9731 (version, host_name): Don't declare.
9732 * server.h: Include version.h.
9733 (version, host_name): Don't declare.
9735 2013-06-12 Pedro Alves <palves@redhat.com>
9737 * linux-x86-low.c (linux_is_elf64): Delete global.
9738 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9739 with local linux_pid_exe_is_elf_64_file use.
9741 2013-06-11 Pedro Alves <palves@redhat.com>
9743 * linux-low.c (regset_disabled, disable_regset): New functions.
9744 (regsets_fetch_inferior_registers)
9745 (regsets_store_inferior_registers): Use them.
9746 (initialize_regsets_info); Don't allocate the disabled_regsets
9748 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9751 2013-06-11 Pedro Alves <palves@redhat.com>
9753 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9756 2013-06-11 Pedro Alves <palves@redhat.com>
9758 * linux-x86-low.c (initialize_low_arch): Call
9759 init_registers_x32_avx_linux.
9761 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9763 Fix compatibility with Android Bionic.
9764 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9767 2013-06-07 Pedro Alves <palves@redhat.com>
9770 * Makefile.in (OBS): Add tdesc.o.
9771 (IPA_OBJS): Add tdesc-ipa.o.
9772 (tdesc-ipa.o): New rule.
9773 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9775 * linux-low.c (new_inferior): Delete.
9776 (disabled_regsets, num_regsets): Delete.
9777 (linux_add_process): Adjust to set the new per-process
9779 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9780 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9781 was a stop. When calling arch_setup, switch the current inferior
9782 to the thread that got an event.
9783 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9784 (regsets_fetch_inferior_registers)
9785 (regsets_store_inferior_registers): New regsets_info parameter.
9787 (linux_register_in_regsets): New regs_info parameter. Adjust to
9789 (register_addr, fetch_register, store_register): New usrregs_info
9790 parameter. Adjust to use it.
9791 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9792 parameter regs_info. Adjust to use it.
9793 (linux_fetch_registers): Get the current inferior's regs_info, and
9795 (linux_store_registers): Ditto.
9796 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9797 (initialize_low): Don't initialize the target_regsets here. Call
9798 initialize_low_arch.
9799 * linux-low.h (target_regsets): Delete declaration.
9800 (struct regsets_info): New.
9801 (struct usrregs_info): New.
9802 (struct regs_info): New.
9803 (struct process_info_private) <new_inferior>: New field.
9804 (struct linux_target_ops): Delete the num_regs, regmap, and
9805 regset_bitmap fields. New field regs_info.
9806 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9807 * i387-fp.c (num_xmm_registers): Delete.
9808 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9809 calls to new interface.
9810 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9811 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9812 Infer the number of xmm registers from the regcache's target
9814 * i387-fp.h (num_xmm_registers): Delete.
9815 * inferiors.c (add_thread): Don't install the thread's regcache
9817 * proc-service.c (gregset_info): Fetch the current inferior's
9818 regs_info. Adjust to use it.
9819 * regcache.c: Include tdesc.h.
9820 (register_bytes, reg_defs, num_registers)
9821 (gdbserver_expedite_regs): Delete.
9822 (get_thread_regcache): If the thread doesn't have a regcache yet,
9823 create one, instead of aborting gdbserver.
9824 (regcache_invalidate_one): Rename to ...
9825 (regcache_invalidate_thread): ... this.
9826 (regcache_invalidate_one): New.
9827 (regcache_invalidate): Only invalidate registers of the current
9829 (init_register_cache): Add target_desc parameter, and use it.
9830 (new_register_cache): Ditto. Assert the target description has a
9831 non zero registers_size.
9832 (regcache_cpy): Add assertions. Adjust.
9833 (realloc_register_cache, set_register_cache): Delete.
9834 (registers_to_string, registers_from_string): Adjust.
9835 (find_register_by_name, find_regno, find_register_by_number)
9836 (register_cache_size): Add target_desc parameter, and use it.
9837 (free_register_cache_thread, free_register_cache_thread_one)
9838 (regcache_release, register_cache_size): New.
9839 (register_size): Add target_desc parameter, and use it.
9840 (register_data, supply_register, supply_register_zeroed)
9841 (supply_regblock, supply_register_by_name, collect_register)
9842 (collect_register_as_string, collect_register_by_name): Adjust.
9843 * regcache.h (struct target_desc): Forward declare.
9844 (struct regcache) <tdesc>: New field.
9845 (init_register_cache, new_register_cache): Add target_desc
9847 (regcache_invalidate_thread): Declare.
9848 (regcache_invalidate_one): Delete declaration.
9849 (regcache_release): Declare.
9850 (find_register_by_number, register_cache_size, register_size)
9851 (find_regno): Add target_desc parameter.
9852 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9854 * remote-utils.c: Include tdesc.h.
9855 (outreg, prepare_resume_reply): Adjust.
9856 * server.c: Include tdesc.h.
9857 (gdbserver_xmltarget): Delete declaration.
9858 (get_features_xml, process_serial_event): Adjust.
9859 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9861 (struct process_info) <tdesc>: New field.
9862 (ipa_tdesc): Declare.
9863 * tdesc.c: New file.
9864 * tdesc.h: New file.
9865 * tracepoint.c: Include tdesc.h.
9866 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9867 (get_context_regcache): Adjust to pass ipa_tdesc down.
9868 (do_action_at_tracepoint): Adjust to get the register cache size
9869 from the context regcache's description.
9870 (traceframe_walk_blocks): Adjust to get the register cache size
9871 from the current trace frame's description.
9872 (traceframe_get_pc): Adjust to get current trace frame's
9873 description and pass it down.
9874 (gdb_collect): Adjust to get the register cache size from the
9876 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9877 (gdbserver_xmltarget): Delete.
9878 (initialize_low_tracepoint): Set the ipa's target description.
9879 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9880 (initialize_low_tracepoint): Set the ipa's target description.
9881 * linux-x86-low.c: Include tdesc.h.
9882 [__x86_64__] (is_64bit_tdesc): New.
9883 (ps_get_thread_area, x86_get_thread_area): Use it.
9884 (i386_cannot_store_register): Rename to ...
9885 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9886 (i386_cannot_fetch_register): Rename to ...
9887 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9888 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9890 (target_regsets): Rename to ...
9891 (x86_regsets): ... this.
9892 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9894 (x86_siginfo_fixup): Use is_64bit_tdesc.
9895 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9896 (tdesc_x32_avx_linux, tdesc_x32_linux)
9897 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9899 (x86_linux_update_xmltarget): Delete.
9900 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9901 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9902 (AMD64_LINUX_USER64_CS): New.
9903 (x86_linux_read_description): New, based on
9904 x86_linux_update_xmltarget.
9905 (same_process_callback): New.
9906 (x86_arch_setup_process_callback): New.
9907 (x86_linux_update_xmltarget): New.
9908 (x86_regsets_info): New.
9909 (amd64_linux_regs_info): New.
9910 (i386_linux_usrregs_info): New.
9911 (i386_linux_regs_info): New.
9912 (x86_linux_regs_info): New.
9913 (x86_arch_setup): Reimplement.
9914 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9915 (x86_emit_ops): Ditto.
9916 (the_low_target): Adjust. Install x86_linux_regs_info,
9917 x86_cannot_fetch_register, and x86_cannot_store_register.
9918 (initialize_low_arch): New.
9919 * linux-ia64-low.c (tdesc_ia64): Declare.
9920 (ia64_fetch_register): Adjust.
9921 (ia64_usrregs_info, regs_info): New globals.
9922 (ia64_regs_info): New function.
9923 (the_low_target): Adjust.
9924 (initialize_low_arch): New function.
9925 * linux-sparc-low.c (tdesc_sparc64): Declare.
9926 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9928 (sparc_arch_setup): New function.
9929 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9930 (the_low_target): Adjust.
9931 (initialize_low_arch): New function.
9932 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9933 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9934 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9935 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9936 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9937 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9938 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9939 (tdesc_powerpc_isa205_vsx64l): Declare.
9940 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9941 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9942 (ppc_set_pc, ppc_get_hwcap): Adjust.
9943 (ppc_usrregs_info): Forward declare.
9944 (!__powerpc64__) ppc_regmap_adjusted: New global.
9945 (ppc_arch_setup): Adjust to the current process'es target
9947 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9948 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9949 (ppc_store_evrregset): Adjust.
9950 (target_regsets): Rename to ...
9951 (ppc_regsets): ... this, and make static.
9952 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9953 (ppc_regs_info): New function.
9954 (the_low_target): Adjust.
9955 (initialize_low_arch): New function.
9956 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9957 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9958 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9959 (tdesc_s390x_linux64v2): Declare.
9960 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9961 (s390_fill_gregset, s390_store_last_break): Adjust.
9962 (target_regsets): Rename to ...
9963 (s390_regsets): ... this, and make static.
9964 (s390_get_pc, s390_set_pc): Adjust.
9965 (s390_get_hwcap): New target_desc parameter, and use it.
9966 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9967 (s390_arch_setup): Adjust to set the current process'es target
9968 description. Don't adjust the regmap.
9969 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9970 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9971 (regs_info_3264): New globals.
9972 (s390_regs_info): New function.
9973 (the_low_target): Adjust.
9974 (initialize_low_arch): New function.
9975 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9976 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9977 [__mips64] (init_registers_mips_linux)
9978 (init_registers_mips_dsp_linux): Delete defines.
9979 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9980 (have_dsp): New global.
9981 (mips_read_description): New, based on mips_arch_setup.
9982 (mips_arch_setup): Reimplement.
9983 (get_usrregs_info): New function.
9984 (mips_cannot_fetch_register, mips_cannot_store_register)
9985 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9986 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9987 (target_regsets): Rename to ...
9988 (mips_regsets): ... this, and make static.
9989 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9990 (dsp_regs_info, regs_info): New globals.
9991 (mips_regs_info): New function.
9992 (the_low_target): Adjust.
9993 (initialize_low_arch): New function.
9994 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9995 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9997 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9998 (arm_read_description): New, with bits factored from
10000 (arm_arch_setup): Reimplement.
10001 (target_regsets): Rename to ...
10002 (arm_regsets): ... this, and make static.
10003 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10004 (arm_regs_info): New function.
10005 (the_low_target): Adjust.
10006 (initialize_low_arch): New function.
10007 * linux-m68k-low.c (tdesc_m68k): Declare.
10008 (target_regsets): Rename to ...
10009 (m68k_regsets): ... this, and make static.
10010 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10011 (m68k_regs_info): New function.
10012 (m68k_arch_setup): New function.
10013 (the_low_target): Adjust.
10014 (initialize_low_arch): New function.
10015 * linux-sh-low.c (tdesc_sharch): Declare.
10016 (target_regsets): Rename to ...
10017 (sh_regsets): ... this, and make static.
10018 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10019 (sh_regs_info, sh_arch_setup): New functions.
10020 (the_low_target): Adjust.
10021 (initialize_low_arch): New function.
10022 * linux-bfin-low.c (tdesc_bfin): Declare.
10023 (bfin_arch_setup): New function.
10024 (bfin_usrregs_info, regs_info): New globals.
10025 (bfin_regs_info): New function.
10026 (the_low_target): Adjust.
10027 (initialize_low_arch): New function.
10028 * linux-cris-low.c (tdesc_cris): Declare.
10029 (cris_arch_setup): New function.
10030 (cris_usrregs_info, regs_info): New globals.
10031 (cris_regs_info): New function.
10032 (the_low_target): Adjust.
10033 (initialize_low_arch): New function.
10034 * linux-cris-low.c (tdesc_crisv32): Declare.
10035 (cris_arch_setup): New function.
10036 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10037 (cris_regs_info): New function.
10038 (the_low_target): Adjust.
10039 (initialize_low_arch): New function.
10040 * linux-m32r-low.c (tdesc_m32r): Declare.
10041 (m32r_arch_setup): New function.
10042 (m32r_usrregs_info, regs_info): New globals.
10043 (m32r_regs_info): Adjust.
10044 (initialize_low_arch): New function.
10045 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10046 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10047 (tic6x_usrregs_info): Forward declare.
10048 (tic6x_read_description): New function, based on ...
10049 (tic6x_arch_setup): ... this. Reimplement.
10050 (target_regsets): Rename to ...
10051 (tic6x_regsets): ... this, and make static.
10052 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10053 (tic6x_regs_info): New function.
10054 (the_low_target): Adjust.
10055 (initialize_low_arch): New function.
10056 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10057 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10058 (target_regsets): Rename to ...
10059 (xtensa_regsets): ... this, and make static.
10060 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10062 (xtensa_arch_setup, xtensa_regs_info): New functions.
10063 (the_low_target): Adjust.
10064 (initialize_low_arch): New function.
10065 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10066 (nios2_arch_setup): Set the current process'es tdesc.
10067 (target_regsets): Rename to ...
10068 (nios2_regsets): ... this.
10069 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10070 (nios2_regs_info): New function.
10071 (the_low_target): Adjust.
10072 (initialize_low_arch): New function.
10073 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10074 (aarch64_arch_setup): Set the current process'es tdesc.
10075 (target_regsets): Rename to ...
10076 (aarch64_regsets): ... this.
10077 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10078 (aarch64_regs_info): New function.
10079 (the_low_target): Adjust.
10080 (initialize_low_arch): New function.
10081 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10083 (target_regsets): Rename to ...
10084 (tile_regsets): ... this.
10085 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10086 (tile_regs_info): New function.
10087 (tile_arch_setup): Set the current process'es tdesc.
10088 (the_low_target): Adjust.
10089 (initialize_low_arch): New function.
10090 * spu-low.c (tdesc_spu): Declare.
10091 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10092 * win32-arm-low.c (tdesc_arm): Declare.
10093 (arm_arch_setup): New function.
10094 (the_low_target): Install arm_arch_setup instead of
10095 init_registers_arm.
10096 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10097 (init_windows_x86): Rename to ...
10098 (i386_arch_setup): ... this. Set `win32_tdesc'.
10099 (the_low_target): Adjust.
10100 * win32-low.c (win32_tdesc): New global.
10101 (child_add_thread): Don't create the thread cache here.
10102 (do_initial_child_stuff): Set the new process'es tdesc.
10103 * win32-low.h (struct target_desc): Forward declare.
10104 (win32_tdesc): Declare.
10105 * lynx-i386-low.c (tdesc_i386): Declare global.
10106 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10107 * lynx-low.c (lynx_tdesc): New global.
10108 (lynx_add_process): Set the new process'es tdesc.
10109 * lynx-low.h (struct target_desc): Forward declare.
10110 (lynx_tdesc): Declare global.
10111 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10112 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10113 * nto-low.c (nto_tdesc): New global.
10114 (do_attach): Set the new process'es tdesc.
10115 * nto-low.h (struct target_desc): Forward declare.
10116 (nto_tdesc): Declare.
10117 * nto-x86-low.c (tdesc_i386): Declare.
10118 (nto_x86_arch_setup): Set `nto_tdesc'.
10120 2013-06-04 Gary Benson <gbenson@redhat.com>
10122 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10123 to qSupported response when appropriate.
10124 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10125 with nonzero-length annex.
10126 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10127 arguments supplied in annex.
10129 2013-05-31 Doug Evans <dje@google.com>
10132 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10133 64 bits in 64-cross-32 environment.
10135 2013-05-28 Pedro Alves <palves@redhat.com>
10137 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10138 (aarch64-without-fpu.c): Delete rule.
10139 * configure.srv (aarch64*-*-linux*): Remove references to
10140 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10141 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10144 2013-05-24 Pedro Alves <palves@redhat.com>
10146 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10147 instead of strchr/decode_address. Error if the range isn't split
10148 with a ','. Don't assume there's be a ':' in the action.
10150 2013-05-23 Yao Qi <yao@codesourcery.com>
10151 Pedro Alves <palves@redhat.com>
10153 * linux-low.c (lwp_in_step_range): New function.
10154 (linux_wait_1): If the thread was range stepping and stopped
10155 outside the stepping range, report the stop to GDB. Otherwise,
10156 continue stepping. Add range stepping debug output.
10157 (linux_set_resume_request): Copy the step range from the resume
10158 request to the lwp.
10159 (linux_supports_range_stepping): New.
10160 (linux_target_ops) <supports_range_stepping>: Set to
10161 linux_supports_range_stepping.
10162 * linux-low.h (struct linux_target_ops)
10163 <supports_range_stepping>: New field.
10164 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10165 * linux-x86-low.c (x86_supports_range_stepping): New.
10166 (the_low_target) <supports_range_stepping>: Set to
10167 x86_supports_range_stepping.
10168 * server.c (handle_v_cont): Handle 'r' action.
10169 (handle_v_requests): Append ";r" if the target supports range
10171 * target.h (struct thread_resume) <step_range_start,
10172 step_range_end>: New fields.
10173 (struct target_ops) <supports_range_stepping>:
10175 (target_supports_range_stepping): New macro.
10177 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10179 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10180 confusion in comment.
10182 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10184 * lynx-low.c (struct process_info_private): New type.
10185 (lynx_add_process): New function.
10186 (lynx_create_inferior, lynx_attach): Replace calls to
10187 add_process by calls to lynx_add_process.
10188 (lynx_resume): If PTID is null, then try using
10189 current_process()->private->last_wait_event_ptid.
10191 (lynx_clear_inferiors): Delete. The contents of that function
10192 has been inlined in lynx_mourn;
10193 (lynx_wait_1): Save the ptid in the process's private data.
10194 (lynx_mourn): Free the process' private data. Replace call
10195 to lynx_clear_inferiors by call to clear_inferiors.
10197 2013-05-17 Yao Qi <yao@codesourcery.com>
10199 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10202 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10204 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10205 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10206 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10207 PT_TEXT_END_ADDR guards. Update comments.
10208 (linux_target_op) <read_offsets>: Conditionally define to
10209 linux_read_offsets if the target is UCLIBC and if it defines
10210 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10212 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10213 Andrew Jenner <andrew@codesourcery.com>
10215 * Makefile.in (SFILES): Add linux-nios2-low.c.
10216 (clean): Add action to delete nios2-linux.c.
10217 (nios2-linux.c): New rule.
10218 * configure.srv: Add nios2*-*-linux*.
10219 * linux-nios2-low.c: New.
10221 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10223 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10225 2013-04-25 Hui Zhu <hui@codesourcery.com>
10228 * ax.c (ax_printf): Add fflush.
10230 2013-04-22 Tom Tromey <tromey@redhat.com>
10232 * Makefile.in (SFILES): Add filestuff.c.
10233 (OBS): Add filestuff.o.
10234 (filestuff.o): New target.
10235 * config.in, configure: Rebuild.
10236 * configure.ac: Check for fdwalk, pipe2.
10238 2013-04-17 Pedro Alves <palves@redhat.com>
10240 * configure.ac (USE_THREAD_DB): Delete variable.
10241 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10242 Don't AC_SUBST USE_THREAD_DB.
10243 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10244 * config.in, configure: Regenerate.
10246 2013-04-16 Pedro Alves <palves@redhat.com>
10248 * linux-low.h (struct lwp_info) <thread_known>: Move under
10249 the USE_THREAD_DB #ifdef.
10251 2013-04-16 Pedro Alves <palves@redhat.com>
10253 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10254 (linux-low.o): Delete rule.
10255 * linux-low.h: Always include "gdb_thread_db.h" instead of
10256 conditionally including thread_db.h.
10257 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10260 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10262 * Makefile.in (install-only): Fix make install regression.
10264 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10266 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10267 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10269 * gdbserver.1: Remove.
10271 2013-03-22 Pedro Alves <palves@redhat.com>
10273 * linux-low.c (handle_extended_wait): Don't call
10274 linux_enable_event_reporting.
10276 2013-03-15 Tony Theodore <tonyt@logyst.com>
10279 * Makefile.in (SHELL): Use @SHELL@.
10281 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10283 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10286 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10288 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10289 Remove extraneous NULL element.
10291 2013-03-13 Yao Qi <yao@codesourcery.com>
10293 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10294 'V' block in trace frame.
10296 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10298 * target.h (struct target_ops): Add btrace ops.
10299 (target_supports_btrace): New macro.
10300 (target_enable_btrace): New macro.
10301 (target_disable_btrace): New macro.
10302 (target_read_btrace): New macro.
10303 * gdbthread.h (struct thread_info): Add btrace field.
10304 * server.c: Include btrace-common.h.
10305 (handle_btrace_general_set): New function.
10306 (handle_btrace_enable): New function.
10307 (handle_btrace_disable): New function.
10308 (handle_general_set): Call handle_btrace_general_set.
10309 (handle_qxfer_btrace): New function.
10310 (struct qxfer qxfer_packets[]): Add btrace entry.
10311 * inferiors.c (remove_thread): Disable btrace.
10312 * linux-low: Include linux-btrace.h.
10313 (linux_low_enable_btrace): New function.
10314 (linux_low_read_btrace): New function.
10315 (linux_target_ops): Add btrace ops.
10316 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10317 Add srv_linux_btrace=yes.
10318 (x86_64-*-linux*): Add linux-btrace.o.
10319 Add srv_linux_btrace=yes.
10320 * configure.ac: Define HAVE_LINUX_BTRACE.
10321 * config.in: Regenerated.
10322 * configure: Regenerated.
10324 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10326 * server.c (handle_qxfer): Preserve error message if -3 is
10328 (qxfer): Document the -3 return value.
10330 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10332 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10333 (linux_btrace_h): New variable.
10334 (linux-btrace.o): New rule.
10336 2013-03-08 Stan Shebs <stan@codesourcery.com>
10337 Hafiz Abid Qadeer <abidh@codesourcery.com>
10339 * tracepoint.c (trace_buffer_size): New global.
10340 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10341 (init_trace_buffer): Change to one-argument function. Allocate
10342 trace buffer memory.
10343 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10344 handle QTBuffer:size packet.
10345 (cmd_bigqtbuffer_size): New function.
10346 (initialize_tracepoint): Call init_trace_buffer with
10347 DEFAULT_TRACE_BUFFER_SIZE.
10348 * server.c (handle_query): Add QTBuffer:size in the
10351 2013-03-07 Yao Qi <yao@codesourcery.com>
10353 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10354 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10356 (cmd_qtsp): Adjust condition. Do post increment.
10357 Set cur_action and cur_step_action back to 0.
10359 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10362 * linux-low.c (linux_write_memory): Return early success if LEN is
10365 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10367 * configure.srv: Add x86_64-*-cygwin* as target.
10369 2013-02-28 Tom Tromey <tromey@redhat.com>
10371 * configure.ac: Invoke AC_SYS_LARGEFILE.
10372 * configure, config.in: Rebuild.
10374 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10376 * win32-low.c: Throughout, fix format strings and casts of
10377 printf-like functions to avoid type related warnings on all
10379 (get_child_debug_event): Print dwDebugEventCode as hex since
10380 that's how it's usually documented.
10382 2013-02-28 Yao Qi <yao@codesourcery.com>
10384 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10387 2013-02-27 Jiong Wang <jiwang@tilera.com>
10389 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10390 (reg-tilegx32.c): New rule.
10391 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10392 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10393 different register info initializer according to elf class.
10394 (init_registers_tilgx32): New function. The tilegx32 register info
10396 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10397 (tile_store_gregset): Likewise.
10399 2013-02-27 Yao Qi <yao@codesourcery.com>
10401 * server.c (process_point_options): Print debug message when
10402 debug_threads is true.
10404 2013-02-26 Yao Qi <yao@codesourcery.com>
10406 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10408 2013-02-19 Pedro Alves <palves@redhat.com>
10409 Kai Tietz <ktietz@redhat.com>
10413 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10414 instead of strtoul to extract address from packet.
10415 (process_serial_event) <'z'>: Likewise.
10417 2013-02-18 Yao Qi <yao@codesourcery.com>
10419 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10421 2013-02-14 Pedro Alves <palves@redhat.com>
10425 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10426 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10428 2013-02-14 Pedro Alves <palves@redhat.com>
10430 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10432 2013-02-14 Pedro Alves <palves@redhat.com>
10434 * tracepoint.c (save_string): Delete.
10435 (add_tracepoint_action): Use savestring instead of save_string.
10437 2013-02-12 Pedro Alves <palves@redhat.com>
10439 * linux-xtensa-low.c: Ditto.
10440 * xtensa-xtregs.c: Ditto.
10442 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10444 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10447 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10449 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10450 aarch64_num_wp_regs and aarch64_num_bp_regs to
10451 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10453 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10455 * linux-aarch64-low.c (ps_get_thread_area): Replace
10456 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10458 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10459 Marcus Shawcroft <marcus.shawcroft@arm.com>
10460 Nigel Stephens <nigel.stephens@arm.com>
10461 Yufeng Zhang <yufeng.zhang@arm.com>
10463 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10464 (aarch64.c, aarch64-without-fpu.c): New targets.
10465 * configure.srv (aarch64*-*-linux*): New.
10466 * linux-aarch64-low.c: New file.
10468 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10470 * linux-low.c (handle_extended_wait, linux_create_inferior)
10471 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10472 (dequeue_one_deferred_signal, linux_resume_one_thread)
10473 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10474 (linux_tracefork_grandchild, linux_test_for_tracefork)
10475 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10476 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10477 where the argument is 0.
10479 2013-01-25 Yao Qi <yao@codesourcery.com>
10481 * event-loop.c: Include "queue.h".
10482 (gdb_event_p): New typedef.
10483 (struct gdb_event) <next_event>: Remove.
10484 (event_queue): Change to QUEUE(gdb_event_p).
10485 (async_queue_event): Remove.
10486 (gdb_event_xfree): New.
10487 (initialize_event_loop): New.
10488 (process_event): Use API from QUEUE.
10489 (wait_for_event): Likewise.
10490 * server.c (main): Call initialize_event_loop.
10491 * server.h (initialize_event_loop): Declare.
10493 2013-01-18 Yao Qi <yao@codesourcery.com>
10495 * ax.h (struct eval_agent_expr_context): New.
10496 (gdb_eval_agent_expr): Update declaration.
10497 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10498 TFRAME. Add new argument CTX.
10499 * server.h (struct eval_agent_expr_context): Declare.
10500 (agent_mem_read, agent_tsv_read): Update declaration.
10501 (agent_mem_read_string): Likewise.
10502 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10503 (add_traceframe_block): Add new argument TPOINT.
10504 Increase TPOINT->traceframe_usage.
10505 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10506 eval_tracepoint_agent_expr.
10507 (condition_true_at_tracepoint): Likewise.
10508 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10509 (agent_mem_read_string, agent_tsv_read): Likewise.
10511 2013-01-16 Yao Qi <yao@codesourcery.com>
10513 * linux-low.c (linux_resume_one_lwp): Don't check
10514 'lwp->bp_reinsert != 0'.
10516 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10517 Pedro Alves <palves@redhat.com>
10519 * lynx-low.c (ptrace_request_to_str): Define a temporary
10520 macro and use it to simplify this function's implementation.
10522 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10524 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10527 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10529 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10531 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10533 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10535 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10537 * lynx-low.c (lynx_resume): Use the resume_info parameter
10538 to determine the ptid for the lynx_ptrace call, unless
10539 it is equal to minus_one_ptid, in which case we use the
10540 ptid of the current_inferior.
10541 (lynx_wait_1): After having received a thread create/exit
10542 event, resume the inferior's execution using the signaling
10543 thread's ptid, rather than the old ptid.
10545 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10547 * lynx-low.c (lynx_resume): Delete variable ret.
10549 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10551 * gdbreplay.c (gdbreplay_version): Update copyright year.
10552 * server.c (gdbserver_version): Likewise.
10554 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10556 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10559 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10561 * lynx-low.c (ptrace_request_to_str): Add handling for
10562 PTRACE_GETTRACESIG.
10564 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10566 * lynx-low.c (lynx_attach): Delete variable new_process.
10568 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10570 * lynx-low.c (lynx_create_inferior): Delete variable
10573 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10575 * lynx-low.c (ptrace_request_to_str): Do not handle
10576 PTRACE_GETTHREADLIST if this macro does not exist.
10578 2012-12-15 Yao Qi <yao@codesourcery.com>
10580 * Makefile.in (OBS): Add notif.o.
10581 * notif.c, notif.h: New.
10582 * server.c: Include "notif.h".
10583 (struct vstop_notif) <next>: Remove.
10585 (queue_stop_reply): Update.
10586 (push_event, send_next_stop_reply): Remove.
10587 (discard_queued_stop_replies): Update.
10588 (notif_stop): New variable.
10589 (handle_v_stopped): Remove.
10590 (handle_v_requests): Don't call handle_v_stopped. Call
10591 handle_ack_notif instead.
10592 (queue_stop_reply_callback): Call notif_event_enque instead
10593 of queue_stop_reply.
10594 (handle_status): Don't call send_next_stop_reply, call
10595 notif_write_event instead.
10596 (kill_inferior_callback): Likewise.
10597 (detach_or_kill_inferior_callback): Likewise.
10598 (main): Call initialize_notif.
10599 (process_serial_event): Call QUEUE_is_empty.
10600 (handle_target_event): Call notif_push instead of push event.
10601 * server.h (push_event): Remove declaration.
10603 2012-12-10 Tom Tromey <tromey@redhat.com>
10605 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10606 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10609 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10610 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10611 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10612 (amd64-linux-ipa.o, ax.o): Rewrite.
10613 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10614 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10615 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10616 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10617 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10618 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10619 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10620 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10621 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10622 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10623 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10624 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10625 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10626 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10627 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10628 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10629 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10630 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10631 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10632 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10633 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10634 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10635 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10636 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10637 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10638 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10639 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10640 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10641 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10642 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10643 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10644 (reg-tilegx.o): Remove.
10645 (all_object_files): New macro.
10646 Include .deps files.
10647 * aclocal.m4, configure: Rebuild.
10648 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10649 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10650 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10652 2012-12-05 Tom Tromey <tromey@redhat.com>
10655 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10657 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10659 * configure.ac: Check for linux/perf_event.h.
10660 * config.in: Regenerated.
10661 * configure: Regenerated.
10663 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10665 * hostio.c (handle_readlink): Decrease buffer size
10666 parameter passed to readlink by one byte.
10668 2012-11-26 Yao Qi <yao@codesourcery.com>
10670 * configure.ac (build_warnings): Append '-Wempty-body'.
10671 * configure: Regenerated.
10672 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10675 2012-11-15 Pierre Muller <muller@sourceware.org>
10677 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10678 * config.in: Regenerate.
10679 * configure: Regenerate.
10680 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10681 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10682 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10683 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10685 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10686 instead of <sys/wait.h> header.
10687 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10689 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10691 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10692 (various make rules): Remove -DGDBSERVER
10694 2012-11-09 Yao Qi <yao@codesourcery.com>
10696 * spu-low.c (current_ptid): Move it to ..
10697 * gdbthread.h: ... here. New.
10698 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10699 * server.c (myresume, process_serial_event): Likewise.
10700 * thread-db.c (thread_db_find_new_threads): Likewise.
10701 * tracepoint.c (run_inferior_command): Likewise.
10703 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10705 * server.c (handle_search_memory_1): Include access length in
10708 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10710 * linux-crisv32-low.c: Fix compile errors.
10712 2012-09-04 Yao Qi <yao@codesourcery.com>
10714 * tracepoint.c (cmd_qtsv): Adjust debug message.
10715 Don't check CUR_TPOINT.
10717 2012-08-28 Yao Qi <yao@codesourcery.com>
10719 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10720 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10721 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10722 Remove declarations of xmalloc, xreallloc, xstrdup and
10724 * Makefile.in (libiberty_h): New.
10725 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10726 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10728 2012-08-23 Yao Qi <yao@codesourcery.com>
10730 * server.h: Remove declaration of 'xsnprintf'.
10732 2012-08-22 Keith Seitz <keiths@redhat.com>
10734 * server.h: Include build-gnulib-gbserver/config.h.
10735 * gdbreplay.c: Likewise.
10737 2012-08-08 Doug Evans <dje@google.com>
10739 * Makefile.in (SFILES): Add gdb_vecs.c.
10740 (OBS): Add gdb_vecs.o.
10741 (gdb_vecs_h, host_defs_h): New variables.
10742 (thread-db.o): Add $(gdb_vecs_h) dependency.
10743 (gdb_vecs.o): New rule.
10744 * thread-db.c: #include "gdb_vecs.h".
10745 (thread_db_load_search): Use a vector to iterate over path elements.
10746 Handle text appearing after "$pdir".
10748 * configure.ac: Add check for strstr.
10749 * config.in: Regenerate.
10750 * configure: Regenerate.
10752 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10754 * hostio.c (handle_pread): If pread fails, fall back to attempting
10756 (handle_pwrite): Likewise for pwrite.
10758 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10760 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10761 between unsupported TYPE and unimplementable ADDR/LEN combination.
10762 (arm_insert_point): Act on new return value.
10764 2012-07-31 Pedro Alves <palves@redhat.com>
10766 * server.c (process_point_options): Only skip tokens if we find
10767 one that is unrecognized. Don't treat 'X' specially while
10768 skipping unrecognized tokens.
10770 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10772 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10773 to 4-byte-align HW breakpoint addresses for Thumb.
10775 2012-07-27 Yao Qi <yao@codesourcery.com>
10779 * server.h: Declare gdb_agent_about_to_close.
10780 * target.c (kill_inferior): Include "agent.h".
10781 New. Send command 'kill'.
10782 * target.h (kill_inferior): Removed macro.
10783 * tracepoint.c (gdb_agent_about_to_close): New.
10784 (gdb_agent_helper_thread): Handle command 'close'.
10785 Wait endlessly until the inferior stops.
10786 Install gdb_agent_remove_socket to atexit hook.
10787 (agent_socket_name): New static variable.
10788 (gdb_agent_socket_init): Replace local variable 'name' with
10789 'agent_socket_name'.
10790 (gdb_agent_remove_socket): New.
10792 2012-07-27 Yao Qi <yao@codesourcery.com>
10794 * server.c (process_point_options): Stop at 'X' when parsing.
10796 2012-07-19 Michael Eager <eager@eagercon.com>
10798 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10800 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10801 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10802 hardware breakpoint.
10804 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10806 * gdbserver/linux-low.c (initialize_low): Call
10807 linux_ptrace_init_warnings.
10809 2012-07-02 Doug Evans <dje@google.com>
10811 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10814 2012-07-02 Stan Shebs <stan@codesourcery.com>
10816 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10817 (ax.o): Add it to build rule.
10819 (OBS): Add format.o.
10820 (IPA_OBS): Add format.o.
10821 * server.c (handle_query): Claim support for breakpoint commands.
10822 (process_point_options): Add command case.
10823 (process_serial_event): Leave running if there are printfs in
10825 * mem-break.h (any_persistent_commands): Declare.
10826 (add_breakpoint_commands): Declare.
10827 (gdb_no_commands_at_breakpoint): Declare.
10828 (run_breakpoint_commands): Declare.
10829 * mem-break.c (struct point_command_list): New struct.
10830 (struct breakpoint): New field command_list.
10831 (any_persistent_commands): New function.
10832 (add_commands_to_breakpoint): New function.
10833 (add_breakpoint_commands): New function.
10834 (gdb_no_commands_at_breakpoint): New function.
10835 (run_breakpoint_commands): New function.
10836 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10838 * ax.c: Include format.h.
10839 (ax_printf): New function.
10840 (gdb_eval_agent_expr): Add printf opcode.
10842 2012-06-13 Yao Qi <yao@codesourcery.com>
10844 * server.c (start_inferior): Remove duplicated writes to fields
10845 'last_resume_kind' and 'last_status' of 'current_inferior'.
10847 2012-06-12 Yao Qi <yao@codesourcery.com>
10848 Pedro Alves <palves@redhat.com>
10850 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10852 * server.c (handle_v_cont): Extend comment.
10854 2012-06-11 Yao Qi <yao@codesourcery.com>
10856 * linux-low.c (linux_attach): Add 'static'.
10858 2012-06-06 Yao Qi <yao@codesourcery.com>
10860 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10862 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10864 Fix gcc -flto compilation warning.
10865 * server.c (main): Make variable multi_mode and attach volatile.
10867 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10869 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10870 if the platform doesn't know about it.
10872 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10874 * Makefile.in (SFILES): Add linux-tile-low.c.
10875 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10876 * configure.srv: Handle tilegx-*-linux*.
10877 * linux-tile-low.c: New file.
10879 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10881 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10883 2012-05-24 Pedro Alves <palves@redhat.com>
10887 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10889 2012-05-24 Pedro Alves <palves@redhat.com>
10893 Replace target_signal with gdb_signal throughout.
10895 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10897 * linux-low.c (linux_store_registers): Avoid the copying sequence
10898 when no data has been retrieved by ptrace.
10900 2012-05-22 Will Deacon <will.deacon@arm.com>
10902 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10903 Include asm/ptrace.h.
10904 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10907 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10909 * linux-low.c (linux_store_registers): Don't re-retrieve data
10910 with ptrace that has already been obtained from /proc. Always
10911 copy any data retrieved with ptrace to the buffer supplied.
10913 2012-05-11 Yao Qi <yao@codesourcery.com>
10914 Pedro Alves <palves@redhat.com>
10916 * linux-low.c (enum stopping_threads_kind): New.
10917 (stopping_threads): Change type to `enum stopping_threads_kind'.
10918 (handle_extended_wait): If stopping and suspending threads, leave
10919 the new_lwp suspended too.
10920 (linux_wait_for_event): Adjust.
10921 (stop_all_lwps): Set `stopping_threads' to
10922 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10923 whether we're suspending threads or just stopping them. Assert no
10926 2012-04-29 Yao Qi <yao@codesourcery.com>
10928 * server.h: Move some code to ...
10929 * gdbthread.h: ... here. New.
10930 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10931 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10932 (nto-low.o, win32-low.o): Likewise.
10933 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10934 * regcache.c, remote-utils.c, server.c: Likewise.
10935 * target.c, tracepoint.c, win32-low.c: Likewise.
10937 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10939 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10940 (PTRACE_ARG4_TYPE): Likewise.
10941 (PTRACE_XFER_TYPE): Likewise.
10942 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10943 ptrace to PTRACE_ARG3_TYPE.
10944 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10945 (PTRACE_ARG4_TYPE): Likewise.
10946 (PTRACE_XFER_TYPE): Likewise.
10947 (linux_detach_one_lwp): Cast fourth argument of
10948 ptrace to long then PTRACE_ARG4_TYPE.
10949 (regsets_fetch_inferior_registers): Cast third argument of
10950 ptrace to long then PTRACE_ARG3_TYPE.
10951 (regsets_store_inferior_registers): Likewise.
10953 2012-04-20 Pedro Alves <palves@redhat.com>
10955 * configure: Regenerate.
10957 2012-04-19 Pedro Alves <palves@redhat.com>
10959 * Makefile.in (GNULIB_BUILDDIR): New.
10960 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10961 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10962 (all, install-only, uninstall, clean-info, all-lib, clean): No
10963 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10964 (maintainer-clean realclean distclean): Use subdir_do.
10966 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10967 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10968 * acinclude.m4: Include acx_configure_dir.m4.
10969 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10970 calls. Call AC_PROG_RANLIB. Configure gnulib using
10973 (GNULIB_STDINT_H): Adjust.
10974 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10975 * gdbreplay.c: Include build-gnulib/config.h.
10976 * server.h: Likewise.
10977 * aclocal.m4: Regenerate.
10978 * config.in: Regenerate.
10979 * configure: Regenerate.
10981 2012-04-19 Pedro Alves <palves@redhat.com>
10983 * Makefile.in (LIBGNU, INCGNU): Adjust.
10984 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10985 (all, install-only, uninstall, clean-info, all-lib, clean)
10986 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10987 * configure.ac: Adjust AC_OUTPUT output.
10988 * aclocal.m4: Regenerate.
10989 * configure: Regenerate.
10991 2012-04-19 Pedro Alves <palves@redhat.com>
10993 * Makefile.in (generated_files): New.
10994 (server_h): Remove the explicit dependency on config.h, and depend
10995 on $generated_files.
10997 2012-04-19 Pedro Alves <palves@redhat.com>
10999 * Makefile.in (INCGNU): Add -Ignulib.
11001 2012-04-19 Pedro Alves <palves@redhat.com>
11003 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11004 (INCGNU): ... this, and spell out -I here.
11005 (GNULIB_LIB): Rename to ...
11006 (LIBGNU): ... this.
11007 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11009 2012-04-19 Pedro Alves <palves@redhat.com>
11011 * config.in: Regenerate.
11013 2012-04-19 Pedro Alves <palves@redhat.com>
11015 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11016 * server.h (memmem): Remove declaration.
11017 * config.in: Regenerate.
11018 * configure: Regenerate.
11020 2012-04-19 Yao Qi <yao@codesourcery.com>
11022 * Makefile.in (SFILES): Add common/vec.c.
11026 2012-04-19 Yao Qi <yao@codesourcery.com>
11028 * remote-utils.c (prepare_resume_reply): Replace with macro
11029 target_core_of_thread.
11030 * server.c (handle_qxfer_threads_proper): Likewise.
11031 * target.h (traget_core_of_thread): New macro.
11033 2012-04-18 Pedro Alves <palves@redhat.com>
11035 * aclocal.m4: Regenerate.
11036 * configure: Regenerate.
11038 2012-04-16 Yao Qi <yao@codesourcery.com>
11040 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11041 duplicated on address.
11043 2012-04-16 Yao Qi <yao@codesourcery.com>
11045 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11046 (struct tracepoint_action_ops) <send>: New field.
11047 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11048 (agent_expr_send, x_tracepoint_action_send): New.
11049 (l_tracepoint_action_send): New.
11050 (cmd_qtdp): Download and install tracepoint
11051 according to `use_agent'.
11052 (run_inferior_command): Add one more parameter `len'.
11054 (tracepoint_send_agent): New.
11055 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11057 2012-04-16 Yao Qi <yao@codesourcery.com>
11059 * tracepoint.c (download_tracepoints): Moved to ...
11060 (cmd_qtstart): ... here.
11062 2012-04-14 Yao Qi <yao@codesourcery.com>
11064 * tracepoint.c: Include inttypes.h.
11065 (struct collect_memory_action): Use sized types.
11066 (struct tracepoint): Likewise.
11067 (cmd_qtdp, stop_tracing): Update print specifiers.
11068 (cmd_qtp, response_tracepoint): Likewise.
11069 (collect_data_at_tracepoint): Likewise.
11070 (collect_data_at_step): Likewise.
11072 2012-04-14 Yao Qi <yao@codesourcery.com>
11074 Import gnulib module inttypes.
11075 * aclocal.m4, config.in, configure: Regenerated.
11077 2012-04-14 Yao Qi <yao@codesourcery.com>
11079 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11080 Makefile and config.status at last.
11082 2012-04-13 Yao Qi <yao@codesourcery.com>
11084 * tracepoint.c: Include stdint.h unconditionally.
11086 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11088 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11089 on BFD_HAVE_SYS_PROCFS_TYPE.
11090 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11091 * configure: Regenerate.
11092 * config.in: Likewise.
11094 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11096 * Makefile.in (clean): Also remove x32.c x32-linux.c
11097 x32-avx.c x32-avx-linux.c.
11098 (x32.o): New target.
11100 (x32-linux.o): Likewise.
11101 (x32-linux.c): Likewise.
11102 (x32-avx.o): Likewise.
11103 (x32-avx.c): Likewise.
11104 (x32-avx-linux.o): Likewise.
11105 (x32-avx-linux.c): Likewise.
11107 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11108 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11109 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11110 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11111 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11112 i386/x32-avx-linux.xml.
11114 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11115 (init_registers_x32_avx_linux): Likwise.
11116 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11117 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11119 2012-04-13 Pedro Alves <palves@redhat.com>
11121 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11122 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11123 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11124 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11127 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11129 * linux-x86-low.c (compat_x32_clock_t): New.
11130 (compat_x32_siginfo_t): Likewise.
11131 (compat_x32_siginfo_from_siginfo): Likewise.
11132 (siginfo_from_compat_x32_siginfo): Likewise.
11133 (linux_is_elf64): Likewise.
11134 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11135 and siginfo_from_compat_x32_siginfo for x32.
11136 (x86_arch_setup): Set linux_is_elf64.
11138 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11141 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11143 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11144 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11145 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11146 compatible with process.
11148 2012-04-12 Yao Qi <yao@codesourcery.com>
11150 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11151 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11152 (install-only, install-info, clean): Handle sub dir gnulib.
11153 (all-lib, am--refresh): New targets.
11154 (memmem.o): Remove target.
11155 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11156 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11157 (AC_REPLACE_FUNCS): Remove memmem.
11158 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11159 (AC_OUTPUT): Generate Makefile in gnulib/.
11160 * aclocal.m4, config.in, configure: Regenerated.
11162 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11164 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11166 2012-04-05 Pedro Alves <palves@redhat.com>
11168 -Werror=strict-aliasing
11170 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11173 2012-04-04 Pedro Alves <palves@redhat.com>
11175 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11176 (sparc_store_gregset_from_stack, sparc_store_gregset)
11177 (sparc_breakpoint_at): Fix formatting.
11179 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11181 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11183 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11184 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11185 * config.in: Regenerate.
11186 * configure: Likewise.
11188 2012-03-29 Pedro Alves <palves@redhat.com>
11190 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11191 Correct ptrace arguments.
11193 2012-03-28 Pedro Alves <palves@redhat.com>
11195 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11196 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11197 (IA64_FR1_REGNUM): New defines.
11198 (ia64_fetch_register): New.
11199 (the_low_target): Install it.
11200 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11202 * linux-low.c (linux_fetch_registers): Try the
11203 the_low_target.fetch_register hook first.
11205 * linux-arm-low.c (the_low_target): Adjust.
11206 * linux-bfin-low.c (the_low_target): Adjust.
11207 * linux-cris-low.c (the_low_target): Adjust.
11208 * linux-crisv32-low.c (the_low_target): Adjust.
11209 * linux-m32r-low.c (the_low_target): Adjust.
11210 * linux-m68k-low.c (the_low_target): Adjust.
11211 * linux-mips-low.c (the_low_target): Adjust.
11212 * linux-ppc-low.c (the_low_target): Adjust.
11213 * linux-s390-low.c (the_low_target): Adjust.
11214 * linux-sh-low.c (the_low_target): Adjust.
11215 * linux-sparc-low.c (the_low_target): Adjust.
11216 * linux-tic6x-low.c (the_low_target): Adjust.
11217 * linux-x86-low.c (the_low_target): Adjust.
11218 * linux-xtensa-low.c (the_low_target): Adjust.
11220 2012-03-26 Pedro Alves <palves@redhat.com>
11222 * server.c (handle_qxfer_libraries): Don't bail early if
11223 the_target->qxfer_libraries_svr4 is not NULL.
11225 2012-03-26 Pedro Alves <palves@redhat.com>
11227 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11229 2012-03-23 Pedro Alves <palves@redhat.com>
11231 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11232 "library-list-svr4" element's start tag when the the DSO list is
11235 2012-03-23 Pedro Alves <palves@redhat.com>
11237 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11238 a variable whose type size is the same as the inferior's pointer
11241 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11243 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11245 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11246 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11247 * linux-low.h: Include <signal.h>.
11248 (struct siginfo): Remove forward declaration.
11249 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11252 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11254 * .gitignore: Ignore more files.
11256 2012-03-19 Pedro Alves <palves@redhat.com>
11257 Jan Kratochvil <jan.kratochvil@redhat.com>
11259 * server.c (cont_thread, general_thread): Add describing comments.
11260 (start_inferior): Clear `cont_thread'.
11261 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11264 2012-03-15 Yao Qi <yao@codesourcery.com>
11266 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11268 (cmd_qtdp): ... here.
11270 2012-03-15 Yao Qi <yao@codesourcery.com>
11272 * tracepoint.c (struct tracepoint_action_ops): New.
11273 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11274 (m_tracepoint_action_download): New.
11275 (r_tracepoint_action_download): New.
11276 (x_tracepoint_action_download): New.
11277 (l_tracepoint_action_download): New.
11278 (add_tracepoint_action): Install `action->ops' according type.
11279 (download_tracepoint_1): Move code `download' function pointer
11280 of various tracepoint_action_ops.
11282 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11284 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11285 linux_ptrace_attach_warnings.
11287 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11289 * Makefile.in (linux-ptrace.o): New.
11290 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11291 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11292 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11293 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11294 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11296 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11298 2012-03-08 Yao Qi <yao@codesourcery.com>
11299 Pedro Alves <palves@redhat.com>
11301 Fix PR server/13392.
11302 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11303 offset of JMP insn.
11304 * tracepoint.c (remove_tracepoint): New.
11305 (cmd_qtdp): Call remove_tracepoint when failed to install.
11307 2012-03-07 Pedro Alves <palves@redhat.com>
11309 * linux-low.c (get_detach_signal): New.
11310 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11311 Pass on pending signals to PTRACE_DETACH. Check the result of the
11313 * server.c (program_signals, program_signals_p): New.
11314 (handle_general_set): Handle QProgramSignals.
11315 * server.h (program_signals, program_signals_p): Declare.
11317 2012-03-05 Pedro Alves <palves@redhat.com>
11318 Jan Kratochvil <jan.kratochvil@redhat.com>
11320 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11323 2012-03-03 Yao Qi <yao@codesourcery.com>
11325 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11326 agent_look_up_symbols.
11328 2012-03-03 Yao Qi <yao@codesourcery.com>
11330 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11331 (linux-x86-low.o): Likewise.
11332 * server.h: Remove in_process_agent_loaded.
11333 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11337 2012-03-03 Yao Qi <yao@codesourcery.com>
11339 * tracepoint.c (gdb_agent_capability): New global.
11340 (in_process_agent_loaded_ust): Renamed to
11341 `in_process_agent_supports_ust'.
11343 (in_process_agent_supports_ust): Call agent_capability_check.
11344 (clear_installed_tracepoints): Assert that agent supports
11347 2012-03-03 Yao Qi <yao@codesourcery.com>
11349 * linux-low.c (linux_supports_agent): New.
11350 (linux_target_ops): Initialize field `supports_agent' with
11351 linux_supports_agent.
11352 * target.h (struct target_ops) <supports_agent>: New.
11353 (target_supports_agent): New macro.
11354 * server.c (handle_general_set): Handle packet 'QAgent'.
11355 (handle_query): Send `QAgent+'.
11356 * Makefile.in (server.o): Depends on agent.h.
11358 2012-03-03 Yao Qi <yao@codesourcery.com>
11360 * Makefile.in (OBS): Add agent.o.
11361 Add new rule for agent.o.
11362 Track dependence of tracepoint.c on agent.h.
11363 * tracepoint.c (run_inferior_command_1):
11364 (run_inferior_command): Call agent_run_command.
11365 (gdb_ust_connect_sync_socket): Deleted. Move it to
11367 (resume_thread, stop_thread): Likewise.
11368 (gdb_ust_socket_init): Renamed to ...
11369 (gdb_agent_socket_init): ... New.
11370 (gdb_ust_thread): Renamed to ...
11371 (gdb_agent_helper_thread): ... New.
11372 (gdb_ust_init): Move some code to ...
11373 (gdb_agent_init): ... here. New.
11374 [HAVE_UST]: Call gdb_ust_init.
11375 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11376 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11377 * config.in, configure: Regenerated.
11379 2012-03-02 Pedro Alves <palves@redhat.com>
11381 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11382 * linux-low.c (struct simple_pid_list): New.
11383 (stopped_pids): New a struct simple_pid_list pointer.
11384 (add_to_pid_list, pull_pid_from_list): New.
11385 (handle_extended_wait): Don't assume the first signal new children
11386 report is SIGSTOP. Adjust call to pull_pid_from_list.
11387 (linux_wait_for_lwp): Adjust.
11389 2012-03-02 Yao Qi <yao@codesourcery.com>
11391 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11394 2012-03-02 Yao Qi <yao@codesourcery.com>
11396 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11397 `stop_pc' and `tpoint'. Update caller.
11399 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11401 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11402 * linux-low.c (use_linux_regsets): New macro.
11403 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11404 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11405 (linux_register_in_regsets): New function.
11406 (usr_fetch_inferior_registers): Skip registers covered by
11408 (usr_store_inferior_registers): Likewise.
11409 (usr_fetch_inferior_registers): New macro.
11410 (usr_store_inferior_registers): Likewise.
11411 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11412 (linux_store_registers): Likewise.
11413 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11415 (init_registers_mips64_dsp_linux): Likewise.
11416 (init_registers_mips_linux): New macro.
11417 (init_registers_mips_dsp_linux): Likewise.
11418 (mips_dsp_num_regs): Likewise.
11419 (DSP_BASE, DSP_CONTROL): New fallback macros.
11420 (mips_base_regs): New macro.
11421 (mips_regmap): Use it. Fix the size.
11422 (mips_dsp_regmap): New variable.
11423 (mips_dsp_regset_bitmap): Likewise.
11424 (mips_arch_setup): New function.
11425 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11427 (mips_cannot_store_register): Likewise.
11428 (the_low_target): Update .arch_setup, .num_regs and .regmap
11429 initializers. Add .regset_bitmap initializer.
11430 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11432 * linux-bfin-low.c (the_low_target): Likewise.
11433 * linux-cris-low.c (the_low_target): Likewise.
11434 * linux-crisv32-low.c (the_low_target): Likewise.
11435 * linux-ia64-low.c (the_low_target): Likewise.
11436 * linux-m32r-low.c (the_low_target): Likewise.
11437 * linux-m68k-low.c (the_low_target): Likewise.
11438 * linux-ppc-low.c (the_low_target): Likewise.
11439 * linux-s390-low.c (the_low_target): Likewise.
11440 * linux-sh-low.c (the_low_target): Likewise.
11441 * linux-sparc-low.c (the_low_target): Likewise.
11442 * linux-tic6x-low.c (the_low_target): Likewise.
11443 * linux-x86-low.c (the_low_target): Likewise.
11444 * linux-xtensa-low.c (the_low_target): Likewise.
11445 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11446 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11447 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11449 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11450 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11452 2012-02-29 Yao Qi <yao@codesourcery.com>
11453 Pedro Alves <palves@redhat.com>
11455 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11456 `step_over_finished' is true.
11458 2012-02-27 Pedro Alves <palves@redhat.com>
11460 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11461 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11463 2012-02-27 Pedro Alves <palves@redhat.com>
11466 * linux-low.c (pid_is_stopped): New.
11467 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11469 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11471 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11474 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11476 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11478 2012-02-24 Luis Machado <lgustavo@codesourcery>
11480 * server.c (handle_query): Advertise support for target-side
11481 breakpoint condition evaluation.
11482 (process_point_options): New function.
11483 (process_serial_event): When inserting a breakpoint, check for
11484 a target-side condition that should be evaluated.
11486 * mem-break.c: Include regcache.h and ax.h.
11487 (point_cond_list_t): New data structure.
11488 (breakpoint) <cond_list>: New field.
11489 (find_gdb_breakpoint_at): Make non-static.
11490 (delete_gdb_breakpoint_at): Clear any target-side
11492 (clear_gdb_breakpoint_conditions): New function.
11493 (add_condition_to_breakpoint): Likewise.
11494 (add_breakpoint_condition): Likewise.
11495 (gdb_condition_true_at_breakpoint): Likewise.
11496 (gdb_breakpoint_here): Return result directly instead
11497 of going through a local variable.
11499 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11500 (clear_gdb_breakpoint_conditions): Likewise.
11501 (add_breakpoint_condition): Likewise.
11502 (gdb_condition_true_at_breakpoint): Likewise.
11504 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11505 (need_step_over_p): Take target-side breakpoint condition into
11508 2012-02-24 Luis Machado <lgustavo@codesourcery>
11510 * server.h: Include tracepoint.h.
11511 (agent_mem_read, agent_get_trace_state_variable_value,
11512 agent_set_trace_state_variable_value,
11513 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11514 get_set_tsv_func_addr): New prototypes.
11516 * ax.h: New include file.
11517 * ax.c: New source file.
11519 * tracepoint.c: Include ax.h.
11520 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11521 agent_expr, eval_result_type): Move to ax.h.
11522 (parse_agent_expr): Rename to ...
11523 (gdb_parse_agent_expr): ... this, make it non-static and move
11525 (unparse_agent_expr) Rename to ...
11526 (gdb_unparse_agent_expr): ... this, make it non-static and move
11528 (eval_agent_expr): Rename to ...
11529 (eval_tracepoint_agent_expr): ... this.
11530 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11531 forward declarations.
11532 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11533 (agent_get_trace_state_variable_value): New function.
11534 (agent_set_trace_state_variable_value): New function.
11535 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11536 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11537 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11538 (condition_true_at_tracepoint): Likewise.
11539 (parse_agent_expr): Rename to ...
11540 (gdb_parse_agent_expr): ... this and move to ax.c.
11541 (unparse_agent_expr): Rename to ...
11542 (gdb_unparse_agent_expr): ... this and move to ax.c.
11543 (gdb_agent_op_name): Move to ax.c.
11544 (eval_agent_expr): Rename to ...
11545 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11547 (eval_tracepoint_agent_expr): New function.
11548 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11550 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11552 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11553 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11554 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11555 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11556 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11557 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11558 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11559 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11560 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11561 (compile_bytecodes): Remove forward declaration.
11562 (is_goto_target): Move to ax.c.
11563 (compile_bytecodes): Move to ax.c and call
11564 agent_get_trace_state_variable_value (...) and
11565 agent_set_trace_state_variable_value (...).
11567 * Makefile.in: Update ax.c and IPA dependencies.
11569 2012-02-24 Pedro Alves <palves@redhat.com>
11571 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11572 (cmd_bigqtbuffer_circular): ... this. Only handle
11573 'QTBuffer:circular:'.
11574 (handle_tracepoint_general_set): Adjust.
11576 2012-02-16 Yao Qi <yao@codesourcery.com>
11578 * inferiors.c: Move code to ...
11579 * dll.c: .... here. New.
11580 * server.h: Declare clear_dlls.
11581 * Makefile.in (SFILES): Add dll.c.
11585 2012-02-11 Yao Qi <yao@codesourcery.com>
11587 * server.c: (handle_monitor_command): Add a new parameter
11589 (handle_query): Update caller.
11591 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11593 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11594 * configure, config.in: Regenerate.
11595 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11598 2012-02-02 Pedro Alves <palves@redhat.com>
11600 Try SIGKILL first, then PTRACE_KILL.
11601 * linux-low.c (linux_kill_one_lwp): New.
11602 (linux_kill_one_lwp): Rename to ...
11603 (kill_one_lwp_callback): ... this. Use the new
11604 linux_kill_one_lwp.
11606 2012-02-02 Pedro Alves <palves@redhat.com>
11608 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11611 2012-01-27 Pedro Alves <palves@redhat.com>
11613 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11614 (elf_64_file_p): Make static.
11615 (linux_pid_exe_is_elf_64_file): New.
11616 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11617 Delete declarations.
11618 (linux_pid_exe_is_elf_64_file): Declare.
11619 * linux-x86-low.c (x86_arch_setup): Use
11620 linux_pid_exe_is_elf_64_file.
11622 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11624 * linux-low.c (linux_wait_for_event_1): Rename to ...
11625 (linux_wait_for_event): ... here and merge it with former
11626 linux_wait_for_event - new variable wait_ptid, use it.
11627 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11629 2012-01-23 Pedro Alves <palves@redhat.com>
11631 * server.c (main): Avoid yet another case of infinite loop while
11632 detaching/killing after a longjmp.
11634 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11637 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11639 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11641 * hostio.c (handle_readlink): New function.
11642 (handle_vFile): Call it to handle "vFile:readlink" packets.
11644 2012-01-20 Pedro Alves <palves@redhat.com>
11645 Ulrich Weigand <ulrich.weigand@linaro.org>
11647 * server.c (handle_v_requests): Only support vAttach and vRun to
11648 start multiple processes when in extended protocol mode.
11650 2012-01-17 Pedro Alves <palves@redhat.com>
11652 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11653 memalign plus mprotect to allocate the scratch buffer.
11655 2012-01-13 Pedro Alves <palves@redhat.com>
11657 * server.c (attach_inferior): Clear `cont_thread'.
11659 2012-01-13 Pedro Alves <palves@redhat.com>
11661 * server.c (main): Avoid infinite loop while detaching/killing
11664 2012-01-09 Doug Evans <dje@google.com>
11666 * server.c (start_inferior): Set last_ptid in --wrapper case.
11668 2012-01-06 Yao Qi <yao@codesourcery.com>
11670 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11672 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11674 2012-01-04 Yao Qi <yao@codesourcery.com>
11676 * tracepoint.c (cmd_qtdp): Print debug message
11677 for static tracepoint.
11679 2012-01-04 Yao Qi <yao@codesourcery.com>
11681 * tracepoint.c (trace_vdebug): Differentiate debug message
11682 between gdbserver and IPA.
11684 2012-01-03 Yao Qi <yao@codesourcery.com>
11686 * tracepoint.c (tracepoint_was_hit): Don't collect for
11689 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11691 * terminal.h: Reformat copyright header.
11693 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11695 * server.c (gdbserver_version): Update copyright year.
11696 * gdbreplay.c (gdbreplay_version): Likewise.
11698 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11700 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11703 2011-12-18 Hui Zhu <teawater@gmail.com>
11704 * linux-low.c (linux_create_inferior): Save return value to ret.
11706 2011-12-18 Hui Zhu <teawater@gmail.com>
11708 * linux-low.c (linux_create_inferior): Save return value to ret.
11710 2011-12-16 Doug Evans <dje@google.com>
11712 * linux-low.c (linux_create_inferior): If stdio connection,
11713 redirect stdin from /dev/null, stdout to stderr.
11714 * remote-utils.c (remote_is_stdio): New static global.
11715 (remote_connection_is_stdio): New function.
11716 (remote_prepare): Handle stdio connection.
11717 (remote_open): Ditto.
11718 (remote_close): Don't close stdin for stdio connections.
11719 (read_prim,write_prim): New functions. Replace all calls to
11720 read/write to these.
11721 * server.c (main): Watch for "-" argument. Move call to
11722 remote_prepare before start_inferior.
11723 * server.h (STDIO_CONNECTION_NAME): New macro.
11724 (remote_connection_is_stdio): Declare.
11726 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11727 in debugging output.
11729 2011-12-15 Yao Qi <yao@codesourcery.com>
11731 * tracepoint.c: Include sys/syscall.h.
11732 (gdb_ust_thread): Remove preprocessor conditional.
11734 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11736 * linux-low.c (linux_detach_one_lwp): Call
11737 the_low_target.prepare_to_resume before detaching.
11739 2011-12-14 Yao Qi <yao@codesourcery.com>
11741 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11744 2011-12-14 Yao Qi <yao@codesourcery.com>
11746 * i386-low.c (i386_low_stopped_data_address): Initialize local
11747 variable `control'.
11749 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11753 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11754 DR_CONTROL unless necessary. Extend comments.
11755 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11756 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11758 2011-12-13 Yao Qi <yao@codesourcery.com>
11760 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11762 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11764 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11766 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11767 Print new debug message for such case.
11769 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11771 Fix overlapping memcpy.
11772 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11773 the read_inferior_memory transfer.
11774 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11775 write_inferior_memory transfer.
11776 (set_fast_tracepoint_jump): New variable buf. Use it for the
11777 read_inferior_memory and write_inferior_memory transfers.
11778 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11779 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11780 Use it for the write_inferior_memory transfer.
11781 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11784 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11786 * linux-low.c (fetch_register, store_register): Make code
11787 consistent, fix formatting.
11789 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11791 * linux-low.c (usr_store_inferior_registers): Factor out code
11792 to handle individual registers into...
11793 (store_register): ... this new function.
11795 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11797 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11798 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11799 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11800 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11801 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11802 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11803 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11804 (srv_xmlfiles): Add new XML files.
11806 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11808 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11809 (init_registers_s390_linux32v1): Add prototype.
11810 (init_registers_s390_linux32v2): Likewise.
11811 (init_registers_s390_linux64v1): Likewise.
11812 (init_registers_s390_linux64v2): Likewise.
11813 (init_registers_s390x_linux64v1): Likewise.
11814 (init_registers_s390x_linux64v2): Likewise.
11815 (s390_num_regs): Increment to 52.
11816 (s390_regmap): Add orig_r2 register.
11817 (s390_num_regs_3264): Increment to 68.
11818 (s390_regmap_3264): Add orig_r2 register.
11819 (s390_collect_ptrace_register): Handle orig_r2 register.
11820 (s390_supply_ptrace_register): Likewise.
11821 (s390_fill_last_break): New function.
11822 (s390_store_last_break): Likewise.
11823 (s390_fill_system_call): New function.
11824 (s390_store_system_call): Likewise.
11825 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11827 (s390_check_regset): New function.
11828 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11829 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11830 Update target_regsets for available register sets.
11832 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11833 Jan Kratochvil <jan.kratochvil@redhat.com>
11835 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11836 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11838 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11839 * linux-low.h (struct process_info_private): New member r_debug.
11840 * server.c (handle_qxfer_libraries): Call
11841 the_target->qxfer_libraries_svr4.
11842 (handle_qxfer_libraries_svr4): New function.
11843 (qxfer_packets): New entry "libraries-svr4".
11844 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11845 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11846 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11847 PACKET_qXfer_libraries_svr4.
11849 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11851 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11852 PSW address/mask between 8-byte and 16-byte formats.
11853 (s390_supply_ptrace_register): Likewise.
11854 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11855 basic addressing mode bit.
11857 2011-11-24 Stan Shebs <stan@codesourcery.com>
11859 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11861 2011-11-17 Stan Shebs <stan@codesourcery.com>
11863 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11864 (tracing_start_time): New global.
11865 (tracing_stop_time): New global.
11866 (tracing_user_name): New global.
11867 (tracing_notes): New global.
11868 (tracing_stop_note): New global.
11869 (cmd_qtstart): Set traceframe_usage, start_time.
11870 (stop_tracing): Set stop_time.
11871 (cmd_qtstatus): Report additional status.
11872 (cmd_qtp): New function.
11873 (handle_tracepoint_query): Call it.
11874 (cmd_qtnotes): New function.
11875 (handle_tracepoint_general_set): Call it.
11876 (get_timestamp): Rename from tsv_get_timestamp.
11878 2011-11-14 Stan Shebs <stan@codesourcery.com>
11879 Kwok Cheung Yeung <kcy@codesourcery.com>
11881 * linux-x86-low.c (small_jump_insn): New.
11882 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11883 trampoline and error message, build a trampoline and issue a small
11884 jump instruction to it.
11885 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11886 trampoline and error message.
11887 (x86_get_min_fast_tracepoint_insn_len): New.
11888 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11889 * linux-low.h (struct linux_target_ops): Add arguments to
11890 install_fast_tracepoint_jump_pad operation, add new operation.
11891 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11893 (linux_get_min_fast_tracepoint_insn_len): New function.
11894 (linux_target_op): Add new operation.
11895 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11896 (gdb_trampoline_buffer_end): Ditto.
11897 (gdb_trampoline_buffer_error): Ditto.
11898 (struct ipa_sym_addresses): Add fields for new IPA variables.
11899 (symbol_list): Add entries for new IPA variables.
11900 (struct tracepoint): Add fields to hold the address range of the
11901 trampoline used by the tracepoint.
11902 (trampoline_buffer_head): New static variable.
11903 (trampoline_buffer_tail): Ditto.
11904 (claim_trampoline_space): New function.
11905 (have_fast_tracepoint_trampoline_buffer): New function.
11906 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11908 (install_fast_tracepoint): Ditto, also add error buffer argument.
11909 (cmd_qtminftpilen): New function.
11910 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11911 (fast_tracepoint_from_trampoline_address): New function.
11912 (fast_tracepoint_collecting): Handle trampoline as part of jump
11914 (set_trampoline_buffer_space): New function.
11915 (initialize_tracepoint): Initialize new IPA variables.
11916 * target.h (struct target_ops): Add arguments to
11917 install_fast_tracepoint_jump_pad operation, add new
11918 get_min_fast_tracepoint_insn_len operation.
11919 (target_get_min_fast_tracepoint_insn_len): New.
11920 (install_fast_tracepoint_jump_pad): Add arguments.
11921 * server.h (IPA_BUFSIZ): Define.
11922 * linux-i386-ipa.c: Include extra header files.
11923 (initialize_fast_tracepoint_trampoline_buffer): New function.
11924 (initialize_low_tracepoint): Call it.
11925 * server.h (set_trampoline_buffer_space): Declare.
11926 (claim_trampoline_space): Ditto.
11927 (have_fast_tracepoint_trampoline_buffer): Ditto.
11929 2011-11-14 Yao Qi <yao@codesourcery.com>
11931 * server.c (handle_query): Handle InstallInTrace for qSupported.
11932 * tracepoint.c (add_tracepoint): Sort list.
11933 (install_tracepoint, download_tracepoint): New.
11934 (cmd_qtdp): Call them to install and download tracepoints.
11935 (sort_tracepoints): Removed.
11936 (cmd_qtstart): Update.
11938 2011-11-14 Yao Qi <yao@codesourcery.com>
11940 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11941 * mem-break.h: Declare.
11942 * tracepoint.c (cmd_qtstart): Move some code to ...
11943 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11945 (download_tracepoints): Move some code to ...
11946 (download_tracepoint_1): ... here. New.
11948 2011-11-08 Yao Qi <yao@codesourcery.com>
11950 * remote-utils.c (relocate_instruction): A comment fix.
11952 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11954 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11955 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11956 dr_status_mirror and dr_control_mirror from debug_reg_state.
11957 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11958 (i386_initial_stuff): Remove use of deleted globals.
11959 (i386_get_thread_context, i386_set_thread_context,
11960 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11961 from debug_reg_state.
11963 2011-11-05 Yao Qi <yao@codesourcery.com>
11965 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11966 address as TPOINT's.
11968 2011-11-02 Stan Shebs <stan@codesourcery.com>
11970 * tracepoint.c (agent_mem_read_string): New function.
11971 (eval_agent_expr): Call it for tracenz.
11972 * server.c (handle_query): Report support for tracenz.
11974 2011-11-02 Yao Qi <yao@codesourcery.com>
11976 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11978 2011-11-02 Yao Qi <yao@codesourcery.com>
11980 * target.h: Fix a typo in comment.
11982 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11984 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11985 clobber the breakpoints' shadows with fast tracepoint jumps.
11986 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11987 * target.c (write_inferior_memory): Also pass MYADDR down to
11990 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11992 * configure.ac: Check support for personality routine.
11993 * configure: Regenerate.
11994 * config.in: Likewise.
11995 * linux-low.c: Include <sys/personality.h>.
11996 Define ADDR_NO_RANDOMIZE if necessary.
11997 (linux_create_inferior): Disable address space randomization when
11998 forking inferior, if requested.
11999 (linux_supports_disable_randomization): New function.
12000 (linux_target_ops): Install it.
12001 * server.h (disable_randomization): Declare.
12002 * server.c (disable_randomization): New global variable.
12003 (handle_general_set): Handle QDisableRandomization.
12004 (handle_query): Likewise for qSupported.
12005 (main): Support --disable-randomization and --no-disable-randomization
12006 command line arguments.
12007 * target.h (struct target_ops): Add supports_disable_randomization.
12008 (target_supports_disable_randomization): New macro.
12010 2011-09-29 Mike Frysinger <vapier@gentoo.org>
12012 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12014 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12015 [!PT_GETDSBT] (target_loadmap): New definition.
12016 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12017 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12018 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12019 and PT_GETDSBT to LINUX_LOADMAP.
12020 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12021 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12023 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12025 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12026 (arm_linux_hwbp_cap): New static variable.
12027 (arm_linux_get_hwbp_cap): Replace by ...
12028 (arm_linux_init_hwbp_cap): ... this new function.
12029 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12030 (arm_linux_get_hw_watchpoint_count): Likewise.
12031 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12032 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12033 (arm_prepare_to_resume): Use perror_with_name instead of error.
12035 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12037 * linux-arm-low.c: Include <signal.h>.
12038 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12039 (struct arm_linux_hwbp_cap): New data type.
12040 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12041 (struct arm_linux_hw_breakpoint): New data type.
12042 (MAX_BPTS, MAX_WPTS): Define.
12043 (struct arch_process_info, struct arch_lwp_info): New data types.
12044 (arm_linux_get_hwbp_cap): New function.
12045 (arm_linux_get_hw_breakpoint_count): Likewise.
12046 (arm_linux_get_hw_watchpoint_count): Likewise.
12047 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12048 (arm_hwbp_control_initialize): Likewise.
12049 (arm_hwbp_control_is_enabled): Likewise.
12050 (arm_hwbp_control_is_initialized): Likewise.
12051 (arm_hwbp_control_disable): Likewise.
12052 (arm_linux_hw_breakpoint_equal): Likewise.
12053 (arm_linux_hw_point_initialize): Likewise.
12054 (struct update_registers_data): New data structure.
12055 (update_registers_callback: New function.
12056 (arm_insert_point): Likewise.
12057 (arm_remove_point): Likewise.
12058 (arm_stopped_by_watchpoint): Likewise.
12059 (arm_stopped_data_address): Likewise.
12060 (arm_new_process): Likewise.
12061 (arm_new_thread): Likewise.
12062 (arm_prepare_to_resume): Likewise.
12063 (the_low_target): Register arm_insert_point, arm_remove_point,
12064 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12065 arm_new_thread, and arm_prepare_to_resume.
12067 2011-09-15 Stan Shebs <stan@codesourcery.com>
12069 * server.h (struct emit_ops): Add compare-goto fields.
12070 * tracepoint.c (gdb_agent_op_sizes): New table.
12071 (emit_eq_goto): New function.
12072 (emit_ne_goto): New function.
12073 (emit_lt_goto): New function.
12074 (emit_le_goto): New function.
12075 (emit_gt_goto): New function.
12076 (emit_ge_goto): New function.
12077 (is_goto_target): New function.
12078 (compile_bytecodes): Recognize special cases of compare-goto
12079 combinations and call specialized emitters for them.
12080 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12081 (amd64_emit_ne_goto): New function.
12082 (amd64_emit_lt_goto): New function.
12083 (amd64_emit_le_goto): New function.
12084 (amd64_emit_gt_goto): New function.
12085 (amd64_emit_ge_goto): New function.
12086 (amd64_emit_ops): Add the new functions.
12087 (i386_emit_eq_goto): New function.
12088 (i386_emit_ne_goto): New function.
12089 (i386_emit_lt_goto): New function.
12090 (i386_emit_le_goto): New function.
12091 (i386_emit_gt_goto): New function.
12092 (i386_emit_ge_goto): New function.
12093 (i386_emit_ops): Add the new functions.
12095 2011-09-08 Stan Shebs <stan@codesourcery.com>
12097 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12098 (i386_emit_epilogue): Restore %ebx.
12100 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12102 * server.c (step_thread): Remove definition.
12103 (process_serial_event): Don't handle Hs.
12104 * server.h (step_thread): Remove declaration.
12105 * target.c (set_desired_inferior): Remove use of step_thread.
12107 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12109 * linux-low.c: Include linux-procfs.h.
12110 (linux_attach_lwp_1): Update comments.
12111 (linux_attach): Scan for existing threads when attaching to a
12112 process that is the tgid.
12113 * Makefile.in: Update dependencies.
12115 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12117 * configure.srv: Add linux-procfs.o dependencies.
12119 2011-08-14 Yao Qi <yao@codesourcery.com>
12121 * target.h (struct target_ops): Fix indent.
12122 * win32-low.c (win32_target_ops): Fix comment.
12124 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12125 Yao Qi <yao@codesourcery.com>
12127 * Makefile.in (clean): Remove tic6x-*.c files.
12128 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12129 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12130 (tic6x-c64xp-linux.c): Likewise.
12131 * configure.srv: Add support for tic6x-*-uclinux.
12132 * linux-tic6x-low.c: New.
12133 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12135 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12136 Yao Qi <yao@codesourcery.com>
12138 * target.h (struct target_ops): Add read_loadmap.
12139 * linux-low.c (struct target_loadseg): New type.
12140 (struct target_loadmap): New type.
12141 (linux_read_loadmap): New function.
12142 (linux_target_ops): Add linux_read_loadmap.
12143 * server.c (handle_query): Support qXfer:fdpic:read packet.
12144 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12147 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12149 * win32-low.c: Include <stdint.h>.
12151 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12153 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12154 to the inferior here.
12155 (i386_remove_aligned_watchpoint): Ditto.
12156 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12157 fit part of the watchpoint in the debug registers.
12158 (i386_update_inferior_debug_regs): New.
12159 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12160 registers, and only update the inferior on success.
12161 (i386_low_remove_watchpoint): Ditto.
12163 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12165 * linux-low.c (compare_ints, unique, list_threads, show_process,
12166 linux_core_of_thread): Delete.
12167 (linux_target_ops): Change linux_core_of_thread to
12168 linux_common_core_of_thread.
12169 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12170 * utils.c (malloc_failure): Change type of argument.
12171 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12172 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12173 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12174 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12175 (IPA_OBJS): Add common-utils-ipa.o.
12176 (ptid_h, linux_osdata_h): New macros.
12177 (server_h): Add common/common-utils.h, common/xml-utils.h,
12178 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12180 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12181 ptid.o, buffer.o): New rules.
12182 (linux-low.o): Add common/linux-osdata.h as a dependency.
12183 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12184 * configure.ac: Add AC_HEADER_DIRENT check.
12185 * config.in: Regenerate.
12186 * configure: Regenerate.
12187 * remote-utils.c (xml_escape_text): Delete.
12188 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12189 buffer_xml_printf): Move to common/buffer.c.
12190 * server.c (main): Remove call to initialize_inferiors.
12191 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12192 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12193 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12194 internal_error, gdb_assert, gdb_assert_fail): Delete.
12195 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12196 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12198 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12199 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12200 initialize_inferiors): Delete.
12202 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12204 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12207 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12209 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12211 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12213 2011-05-26 Yao Qi <yao@codesourcery.com>
12215 * Makefile.in (thread-db.o): Track dependence to
12216 common/gdb_thread_db.h.
12217 * thread-db.c: include gdb_thread_db.h from right place.
12219 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12221 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12222 __FILE__ and __LINE__ to internal_error.
12224 2011-05-13 Doug Evans <dje@google.com>
12226 * thread-db.c (try_thread_db_load_from_sdir): New function.
12227 (try_thread_db_load_from_dir): New function.
12228 (thread_db_load_search): Handle $sdir, ignore $pdir.
12229 Remove trying of system directories if search of
12230 libthread-db-search-path fails, that is now done via $sdir.
12232 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12234 * server.c (handle_query): Add EnableDisableTracepoints to the list
12235 of supported features.
12236 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12238 (cmd_qtenable_disable): New.
12239 (cmd_qtstart): Install tracepoints even if disabled.
12240 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12241 receiving a QTEnable or QTDisable packet.
12242 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12243 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12245 (gdb_probe): Skip data collection if static tracepoint is disabled.
12247 2011-05-10 Doug Evans <dje@google.com>
12249 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12251 2011-05-04 Doug Evans <dje@google.com>
12253 * linux-low.c (linux_join): Skip process lookup.
12254 * spu-low.c (spu_join): Ditto.
12255 * server.c (join_inferiors_callback): Delete.
12256 (process_serial_event): For 'D' packet (detach) call join_inferior
12259 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12261 * README: Don't mention xscale*-*-linux*.
12262 * configure.srv (xscale*-*-linux*): Don't handle target.
12264 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12266 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12268 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12269 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12270 (i386_emit_void_call_2): Likewise.
12272 2011-04-26 Yao Qi <yao@codesourcery.com>
12274 * linux-low.c: Move common macros to linux-ptrace.h.
12275 Include linux-ptrace.h.
12276 * Makefile.in (linux_ptrace_h): New.
12277 (linux-low.o): Depends on linux-ptrace.h.
12279 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12281 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12282 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12283 (remote_prepare): New function with most of the TCP code from ...
12284 (remote_open): ... here. Detect PORT here unconditionally. Move also
12285 setting transport_is_reliable.
12286 * server.c (run_once): New variable.
12287 (gdbserver_usage): Document it.
12288 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12289 the first run if RUN_ONCE.
12290 * server.h (run_once, remote_prepare): New declarations.
12292 2011-04-19 Tom Tromey <tromey@redhat.com>
12294 * win32-low.c (handle_load_dll): Remove duplicate "the".
12296 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12298 Remove support for old Cygwin 1.5 versions.
12299 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12300 function to avoid warning.
12301 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12304 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12306 * gdbserver/server.h (Macro _): Define it if not available.
12308 2011-03-14 Michael Snyder <msnyder@vmware.com>
12310 * hostio.c (handle_close): Remove unnecessary null test.
12312 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12314 * Makefile.in (maintainer-clean realclean distclean): Remove
12315 "make ... subdir_do" command.
12317 2011-03-10 Michael Snyder <msnyder@vmware.com>
12319 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12321 * server.c (handle_v_run): Free alloced buffer on early return.
12323 2011-03-09 Yao Qi <yao@codesourcery.com>
12326 2011-03-04 Yao Qi <yao@codesourcery.com>
12328 * Makefile.in: Remove GNU make feature --directory.
12330 2011-03-05 Yao Qi <yao@codesourcery.com>
12332 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12333 (subdir_do): New make target. Copied from gdb/Makefile.
12334 (maintainer-clean, realclean, distclean, clean): Call corresponding
12335 make targets in common/Makefile.
12337 2011-02-11 Yao Qi <yao@codesourcery.com>
12339 * configure.ac: Call AC_PROG_RANLIB.
12340 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12341 * configure: Regenerate.
12343 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12345 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12347 2011-03-06 Yao Qi <yao@codesourcery.com>
12349 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12351 2011-03-05 Yao Qi <yao@codesourcery.com>
12353 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12354 (subdir_do): New make target. Copied from gdb/Makefile.
12355 (maintainer-clean, realclean, distclean, clean): Call corresponding
12356 make targets in common/Makefile.
12358 2011-03-04 Yao Qi <yao@codesourcery.com>
12360 * Makefile.in: Remove GNU make feature --directory.
12362 2011-03-04 Michael Snyder <msnyder@vmware.com>
12364 * server.c (queue_stop_reply): Call xmalloc not malloc.
12366 2011-03-02 Michael Snyder <msnyder@vmware.com>
12368 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12370 2011-02-28 Michael Snyder <msnyder@vmware.com>
12372 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12373 (cmd_qtframe): Ditto.
12374 (cmd_qtbuffer): Ditto.
12375 (cmd_bigqtbuffer): Ditto.
12377 * utils.c (decimal2str): Initialize 'width' to nine, then
12378 don't mess with it.
12380 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12382 * hostio.c (require_data): Free *data, not data.
12384 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12386 * hostio.c (require_data): Use free, not xfree.
12388 2011-02-27 Michael Snyder <msnyder@vmware.com>
12390 * server.c (handle_query): Discard unused value.
12392 * hostio.c (require_data): Free malloc memory before returning
12395 2011-02-26 Michael Snyder <msnyder@vmware.com>
12397 * linux-low.c (list_threads): Call closedir for dirent.
12399 2011-02-27 Michael Snyder <msnyder@vmware.com>
12401 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12402 a case statement falls through.
12404 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12406 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12409 2011-02-26 Michael Snyder <msnyder@vmware.com>
12411 * utils.c (decimal2str): Eliminate dead code and dead param.
12412 (pulongest): Drop dead param from call to decimal2str.
12415 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12417 Revert the following patch (not approved yet):
12418 2011-02-21 Hui Zhu <teawater@gmail.com>
12419 * tracepoint.c (tp_printf): New function.
12420 (eval_agent_expr): Handle gdb_agent_op_printf.
12422 2011-02-21 Hui Zhu <teawater@gmail.com>
12424 * tracepoint.c (tp_printf): New function.
12425 (eval_agent_expr): Handle gdb_agent_op_printf.
12427 2011-02-18 Tom Tromey <tromey@redhat.com>
12429 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12430 (tracepoint.o): Likewise.
12431 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12432 (gdb_agent_op_names): Likewise.
12434 2011-02-18 Tom Tromey <tromey@redhat.com>
12436 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12437 gdb_agent_op_rot>: New constants.
12438 (gdb_agent_op_names): Add pick and roll.
12439 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12442 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12444 * aclocal.m4: Regenerated with aclocal-1.11.1.
12446 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12448 * server.c (handle_qxfer_traceframe_info): New.
12449 (qxfer_packets): Register "traceframe-info".
12450 (handle_query): Report support for qXfer:traceframe-info:read+.
12451 * tracepoint.c (match_blocktype): New.
12452 (traceframe_find_block_type): Rename to ...
12453 (traceframe_walk_blocks): ... this. Add callback filter argument,
12455 (traceframe_find_block_type): New, reimplemented on top of
12456 traceframe_walk_blocks.
12457 (build_traceframe_info_xml): New.
12458 (traceframe_read_info): New.
12459 * server.h (traceframe_read_info): Declare.
12461 2011-02-11 Yao Qi <yao@codesourcery.com>
12463 * configure.ac: Call AC_PROG_RANLIB.
12464 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12465 * configure: Regenerate.
12467 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12469 * server.c (gdb_read_memory): Change return semantics to allow
12471 (handle_search_memory_1): Adjust.
12472 (process_serial_event) <'m' packet>: Handle partial transfers.
12473 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12475 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12477 * regcache.c (init_register_cache): Initialize
12478 regcache->register_status.
12479 (free_register_cache): Release regcache->register_status.
12480 (regcache_cpy): Copy register_status.
12481 (registers_to_string): Print 'x's for unavailable registers.
12482 (supply_register): Mark the register's status valid or
12483 unavailable, depending on whether a buffer was passed in or not.
12484 (supply_register_zeroed): New.
12485 (supply_regblock): Mark the registers' status valid or
12486 unavailable, depending on whether a buffer was passed in or not.
12487 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12488 (struct regcache): New `register_status' field.
12489 (supply_register_zeroed): Declare.
12490 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12491 supply_register_zeroed, rather than passing a NULL buffer to
12493 * tracepoint.c (fetch_traceframe_registers): Update comment.
12495 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12497 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12500 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12502 * server.h (decode_xfer_write): Change prototype.
12503 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12504 and don't extract the annex here.
12505 * server.c (decode_xfer_read): Remove `annex' parameter,
12506 and don't extract the annex here.
12507 (decode_xfer): New.
12508 (struct qxfer): New.
12509 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12510 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12511 (handle_qxfer_statictrace): New functions, abstracted out from
12512 handle_query, and made to use the struct qxfer interface.
12513 (handle_threads_qxfer_proper): Rename to ...
12514 (handle_qxfer_threads_proper): ... this.
12515 (handle_threads_qxfer): Rename to ...
12516 (handle_qxfer_threads): ... this. Adjust.
12517 (qxfer_packets): New array.
12518 (handle_qxfer): New function.
12519 (handle_query): Use handle_qxfer.
12521 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12523 * gdbreplay.c: Shorten lines of >= 80 columns.
12524 * linux-low.c: Ditto.
12525 * linux-ppc-low.c: Ditto.
12526 * linux-s390-low.c: Ditto.
12527 * linux-sparc-low.c: Ditto.
12528 * linux-x86-low.c: Ditto.
12529 * linux-xtensa-low.c: Ditto.
12530 * mem-break.c: Ditto.
12531 * nto-low.c: Ditto.
12532 * regcache.h: Ditto.
12533 * remote-utils.c: Ditto.
12536 * thread-db.c: Ditto.
12537 * tracepoint.c: Ditto.
12539 * win32-low.h: Ditto.
12541 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12543 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12546 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12548 * server.c (gdbserver_version): Update copyright year in version
12550 * gdbreplay.c (gdbreplay_version): Ditto.
12552 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12554 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12555 * linux-bfin-low.c: New file.
12556 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12557 PT_DATA_ADDR for BFIN targets.
12558 * Makefile.in (SFILES): Add linux-bfin-low.c.
12559 (clean): Remove reg-bfin.c.
12560 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12561 * README: Mention supported Blackfin targets.
12563 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12565 * .gitignore: New file.
12567 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12569 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12571 2010-10-22 Jie Zhang <jie@codesourcery.com>
12573 * Makefile.in: Add FLAGS_TO_PASS variable.
12574 (install): Remove dependency of install-only and recursively
12575 invoke make for install-only.
12577 2010-10-04 Doug Evans <dje@google.com>
12579 * Makefile.in (uninstall): Use $(DESTDIR).
12581 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12585 * linux-x86-low.c (compat_siginfo_from_siginfo)
12586 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12587 si_code is < 0. Check for si_code == SI_TIMER before checking for
12590 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12592 * lynx-i386-low.c: New file.
12593 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12595 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12597 * lynx-low.c (ptrace_request_to_str): Remove handling for
12598 request values that have been removed in LynxOS 5.x.
12600 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12602 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12605 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12607 * configure.ac: Add --enable-inprocess-agent option.
12608 * configure: Rebuilt.
12610 2010-09-06 Yao Qi <yao@codesourcery.com>
12612 * linux-low.c (linux_kill): Remove unused variable.
12613 (linux_stabilize_threads): Likewise.
12614 * server.c (start_inferior): Likewise.
12615 (queue_stop_reply_callback): Likewise.
12616 * tracepoint.c (do_action_at_tracepoint): Likewise.
12618 2010-09-06 Yao Qi <yao@codesourcery.com>
12620 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12623 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12625 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12627 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12629 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12632 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12634 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12635 gdbserver/lynx-ppc-low.c: New files.
12636 * Makefile.in (lynx_low_h): New variable.
12637 (lynx-low.o, lynx-ppc-low.o): New rules.
12638 * configure.ac: On LynxOS, link with -lnetinet.
12639 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12640 * configure: regenerate.
12642 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12644 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12645 * configure.ac: Add check for vasprintf and vsnprintf.
12646 * configure, config.in: Regenerate.
12647 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12649 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12651 * gdbreplay.c: Move include of alloca.h up, next to include of
12653 * server.h: Add include of malloc.h.
12654 * mem-break.c: Remove include of malloc.h.
12655 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12657 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12659 * Makefile.in (memmem.o): Build with -Wno-error.
12661 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12663 * utils.c (xsnprintf): Make non-static.
12664 * server.h: Add xsnprintf declaration.
12665 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12666 replace calls to snprintf by calls to xsnprintf throughout.
12668 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12670 * configure.ac: Add configure check for alloca.
12671 * configure, config.in: Regenerate.
12672 * server.h: Include alloca.h if it exists.
12673 * gdbreplay.c: Include alloca.h if it exists.
12675 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12677 * linux-low.c (__SIGRTMIN): Define if not already defined.
12678 (linux_create_inferior): Check for __ANDROID__ rather than
12680 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12681 are already deferred.
12682 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12683 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12684 stopped and already has a pending signal to report.
12685 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12686 a pending signal to report or is moving out of a jump pad.
12687 (linux_init_signals): Check for __ANDROID__ rather than
12690 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12692 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12693 debug_threads check. Avoid a linear search when not doing debug
12696 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12698 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12699 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12700 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12701 (process_event): Change local fd's type to gdb_fildes_t.
12702 (create_file_handler): Adjust prototype.
12703 (delete_file_handler): Adjust prototype.
12704 (handle_file_event): Adjust prototype. Use pfildes.
12705 (create_file_event): Adjsut prototype.
12706 * remote-utils.c (remote_desc, listen_desc): Change type to
12708 * server.h: New gdb_fildes_t typedef.
12709 [USE_WIN32API]: Include winsock2.h.
12710 (delete_file_handler, add_file_handler): Adjust prototypes.
12711 (pfildes): Declare.
12712 * utils.c (pfildes): New.
12714 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12716 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12717 * configure: Regenerate.
12719 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12721 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12722 (linux_done_accessing_memory): ... this.
12723 (linux_target_ops): Adjust.
12724 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12725 * nto-low.c (nto_target_ops): Adjust comment.
12726 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12727 * spu-low.c (spu_target_ops): Adjust comment.
12728 * target.h (target_ops): Rename unprepare_to_access_memory field
12729 to done_accessing_memory.
12730 (unprepare_to_access_memory): Rename to ...
12731 (done_accessing_memory): ... this.
12733 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12735 * linux-low.c (linux_prepare_to_access_memory): New.
12736 (linux_unprepare_to_access_memory): New.
12737 (linux_target_ops): Install them.
12738 * server.c (read_memory): Rename to ...
12739 (gdb_read_memory): ... this. Use
12740 prepare_to_access_memory/prepare_to_access_memory.
12741 (write_memory): Rename to ...
12742 (gdb_write_memory): ... this. Use
12743 prepare_to_access_memory/prepare_to_access_memory.
12744 (handle_search_memory_1): Adjust.
12745 (process_serial_event): Adjust.
12746 * target.h (struct target_ops): New fields
12747 prepare_to_access_memory and unprepare_to_access_memory.
12748 (prepare_to_access_memory, unprepare_to_access_memory): New.
12749 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12750 prepare_to_access_memory/prepare_to_access_memory.
12751 * nto-low.c (nto_target_ops): Adjust.
12752 * spu-low.c (spu_target_ops): Adjust.
12753 * win32-low.c (win32_target_ops): Adjust.
12755 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12757 * Makefile.in (WARN_CFLAGS): Get it from configure.
12758 (WERROR_CFLAGS): New.
12759 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12760 * configure.ac: Introduce --enable-werror, which adds -Werror to
12761 the compiler command line. Enabled by default. Disable with
12762 --disable-werror. Add -Wdeclaration-after-statement
12763 Wpointer-arith and -Wformat-nonliteral to warning flags.
12764 * configure: Regenerate.
12766 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12768 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12770 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12772 * gdbreplay.c (remote_error): New.
12774 (expect): Use gdbchar. Check for error reading from GDB.
12775 Clarify sync error output.
12776 (play): Check for errors writing to GDB.
12777 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12778 * remote-utils.c (getpkt): Check for errors writing to the remote
12781 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12783 * linux-low.c (linux_wait_1): Move non-debugging code out of
12784 `debug_threads' control.
12786 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12788 * linux-low.c (linux_wait_1): Don't set last_status here.
12789 * server.c (push_event, queue_stop_reply_callback): Assert we're
12790 not pushing a TARGET_WAITKIND_IGNORE event.
12791 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12792 (myresume, handle_target_event): Set the thread's last_resume_kind
12793 and last_status from the target returned status.
12795 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12799 * linux-x86-low.c (update_debug_registers_callback): New.
12800 (i386_dr_low_set_addr): Use it.
12801 (i386_dr_low_get_addr): New.
12802 (i386_dr_low_set_control): Use update_debug_registers_callback.
12803 (i386_dr_low_get_control): New.
12804 (i386_dr_low_get_status): Adjust.
12805 * linux-low.c (linux_stop_lwp): New.
12806 * linux-low.h (linux_stop_lwp): Declare.
12808 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12809 argument instead of a i386_debug_reg_state.
12810 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12811 a i386_debug_reg_state.
12812 (i386_insert_aligned_watchpoint): Adjust.
12813 (i386_remove_aligned_watchpoint): Adjust.
12814 (i386_low_stopped_data_address): Read the debug registers from the
12815 inferior instead of from the mirrors.
12816 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12817 (i386_dr_low_get_addr): Declare.
12818 (i386_dr_low_get_control): Declare.
12819 (i386_dr_low_get_status): Change prototype.
12821 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12822 (i386_dr_low_get_addr): New.
12823 (i386_dr_low_get_control): New.
12824 (i386_dr_low_get_status): Adjust prototype. Return
12826 (i386_initial_stuff): Clear dr_status_mirror and
12828 (i386_get_thread_context): Adjust.
12829 (i386_set_thread_context): Adjust.
12830 (i386_thread_added): Adjust.
12832 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12834 * linux-low.h (linux_thread_area): Delete declaration.
12836 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12838 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12839 after its termination.
12841 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12843 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12844 (gdb_wants_all_stopped): Delete.
12845 (linux_wait_1): Don't call them.
12846 * server.c (handle_v_cont): Tag all threads as want-stopped.
12847 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12848 stopped as "client-wants-stopped".
12850 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12852 * Makefile.in (signals_h): New.
12853 (server_h): Depend on it.
12854 (server.o): Don't depend on $(signals_def).
12855 (signals.o): Depend on $(signals_def).
12857 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12859 * Makefile.in (signals_def): New.
12860 (server_h): Append include/gdb/signals.h and signals_def.
12861 (server.o): Append signals_def.
12863 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12865 * server.c (handle_target_event): Use target_signal_to_host for
12866 resume_info.sig initialization.
12867 * target.h (struct thread_resume) <sig>: New comment.
12869 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12871 * server.c (handle_query): strcpy() the returned string from paddress()
12872 instead of sprintf().
12873 * utils.c (paddress): Return phex_nz().
12875 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12877 * server.c (handle_v_cont): Call mourn_inferior if process
12879 (myresume): Likewise.
12881 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12883 Static tracepoints, and integration with UST.
12885 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12886 * mem-break.c (uninsert_all_breakpoints)
12887 (reinsert_all_breakpoints): New.
12888 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12889 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12890 (gdb_agent_ust_loaded, helper_thread_id)
12891 (gdb_agent_helper_thread_id): New macros.
12892 (struct ipa_sym_addresses): Add addr_ust_loaded,
12893 addr_helper_thread_id, addr_cmd_buf.
12894 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12895 (in_process_agent_loaded_ust): New.
12896 (write_e_ust_not_loaded): New.
12897 (maybe_write_ipa_ust_not_loaded): New.
12898 (struct collect_static_trace_data_action): New.
12899 (enum tracepoint_type) <static_tracepoint>: New.
12900 (struct tracepoint) <handle>: Mention static tracepoints.
12901 (struct static_tracepoint_ctx): New.
12902 (CMD_BUF_SIZE): New.
12903 (add_tracepoint_action): Handle static tracepoint actions.
12904 (unprobe_marker_at): New.
12905 (clear_installed_tracepoints): Handle static tracepoints.
12906 (cmd_qtdp): Handle static tracepoints.
12907 (probe_marker_at): New.
12908 (cmd_qtstart): Handle static tracepoints.
12909 (response_tracepoint): Handle static tracepoints.
12910 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12911 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12912 (get_context_regcache): Handle static tracepoints.
12913 (do_action_at_tracepoint): Handle static tracepoint actions.
12914 (traceframe_find_block_type): Handle static trace data blocks.
12915 (traceframe_read_sdata): New.
12916 (download_tracepoints): Download static tracepoint actions.
12917 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12918 (GDB_PROBE_NAME): New.
12920 (GET_UST_SYM): New.
12923 (ust_marker_to_static_tracepoint): New.
12925 (collect_ust_data_at_tracepoint): New.
12926 (gdb_ust_probe): New.
12927 (UNIX_PATH_MAX, SOCK_DIR): New.
12928 (gdb_ust_connect_sync_socket): New.
12929 (resume_thread, stop_thread): New.
12930 (run_inferior_command): New.
12931 (init_named_socket): New.
12932 (gdb_ust_socket_init): New.
12933 (cstr_to_hexstr): New.
12935 (first_marker, next_marker): New.
12936 (response_ust_marker): New.
12937 (cmd_qtfstm, cmd_qtsstm): New.
12938 (unprobe_marker_at, probe_marker_at): New.
12939 (cmd_qtstmat, gdb_ust_thread): New.
12940 (gdb_ust_init): New.
12941 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12942 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12943 (ST_REGENTRY): New.
12944 (x86_64_st_collect_regmap): New.
12945 (X86_64_NUM_ST_COLLECT_GREGS): New.
12946 (AMD64_RIP_REGNUM): New.
12947 (supply_static_tracepoint_registers): New.
12948 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12949 (ST_REGENTRY): New.
12950 (i386_st_collect_regmap): New.
12951 (i386_NUM_ST_COLLECT_GREGS): New.
12952 (supply_static_tracepoint_registers): New.
12953 * server.c (handle_query): Handle qXfer:statictrace:read.
12954 <qSupported>: Report support for StaticTracepoints, and
12955 qXfer:statictrace:read features.
12956 * server.h (traceframe_read_sdata)
12957 (supply_static_tracepoint_registers): Declare.
12958 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12959 (unpack_varlen_hex): Include in IPA build.
12960 * Makefile.in (ustlibs, ustinc): New.
12961 (IPA_OBJS): Add remote-utils-ipa.o.
12962 ($(IPA_LIB)): Link -ldl and -lpthread.
12964 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12965 * config.in, configure: Regenerate.
12967 2010-06-20 Ian Lance Taylor <iant@google.com>
12968 Pedro Alves <pedro@codesourcery.com>
12970 * linux-x86-low.c (always_true): Delete.
12971 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12972 trying to fool the compiler with always_true.
12974 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12976 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12977 conditions in gdbserver.
12979 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12981 * spu-low.c (spu_read_memory): Wrap around local store limit.
12982 (spu_write_memory): Likewise.
12984 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12986 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12987 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12989 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12991 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12992 uses with LONGEST uses.
12994 2010-06-14 Stan Shebs <stan@codesourcery.com>
12995 Pedro Alves <pedro@codesourcery.com>
12999 * linux-x86-low.c: Include limits.h.
13001 (always_true): New.
13004 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13005 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13006 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13007 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13008 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13009 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13010 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13011 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13012 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13013 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13014 (amd64_emit_void_call_2): New.
13015 (amd64_emit_ops): New.
13016 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13017 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13018 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13019 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13020 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13021 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13022 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13023 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13024 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13025 (i386_emit_stack_adjust, i386_emit_int_call_1)
13026 (i386_emit_void_call_2): New.
13027 (i386_emit_ops): New.
13028 (x86_emit_ops): New.
13029 (the_low_target): Install x86_emit_ops.
13030 * server.h (struct emit_ops): New.
13031 (get_raw_reg_func_addr): Declare.
13032 (current_insn_ptr, emit_error): Declare.
13033 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13034 (set_trace_state_variable_value): New defines.
13035 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13036 addr_get_trace_state_variable_value and
13037 addr_set_trace_state_variable_value.
13038 (symbol_list): New fields for get_raw_reg,
13039 get_trace_state_variable_value and set_trace_state_variable_value.
13040 (condfn): New typedef.
13041 (struct tracepoint): New field `compiled_cond'.
13042 (do_action_at_tracepoint): Clear compiled_cond.
13043 (get_trace_state_variable_value, set_trace_state_variable_value):
13045 (condition_true_at_tracepoint): If there's a compiled condition,
13047 (current_insn_ptr, emit_error): New globals.
13048 (struct bytecode_address): New.
13049 (get_raw_reg_func_addr): New.
13050 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13051 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13052 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13053 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13054 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13055 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13056 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13057 (compile_tracepoint_condition, compile_bytecodes): New.
13058 * target.h (emit_ops): Forward declare.
13059 (struct target_ops): New field emit_ops.
13060 (target_emit_ops): New.
13061 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13062 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13063 * linux-low.c (linux_emit_ops): New.
13064 (linux_target_ops): Install it.
13065 * linux-low.h (struct linux_target_ops): New field emit_ops.
13067 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13069 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13070 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13072 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13073 Stan Shebs <stan@codesourcery.com>
13075 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13076 (all): Depend on $(extra_libraries).
13077 (install-only): Install the IPA.
13078 (IPA_OBJS, IPA_LIB): New.
13079 (clean): Remove the IPA lib.
13080 (IPAGENT_CFLAGS): New.
13081 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13082 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13083 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13084 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13085 * configure.ac: Check for atomic builtins support in the compiler.
13086 (IPA_DEPFILES, extra_libraries): Define.
13087 * configure.srv (ipa_obj): Add description.
13088 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13089 (i[34567]86-*-linux*): Set ipa_obj.
13090 (x86_64-*-linux*): Set ipa_obj.
13091 * linux-low.c (stabilizing_threads): New.
13092 (supports_fast_tracepoints): New.
13093 (linux_detach): Stabilize threads before detaching.
13094 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13095 the lwp is either not stabilizing, or is moving out of a jump pad.
13096 (linux_fast_tracepoint_collecting): New.
13097 (maybe_move_out_of_jump_pad): New.
13098 (enqueue_one_deferred_signal): New.
13099 (dequeue_one_deferred_signal): New.
13100 (linux_wait_for_event_1): If moving out of a jump pad, defer
13101 pending signals to later.
13102 (linux_stabilize_threads): New.
13103 (linux_wait_1): Check if threads need moving out of jump pads, and
13105 (stuck_in_jump_pad_callback): New.
13106 (move_out_of_jump_pad_callback): New.
13107 (lwp_running): New.
13108 (linux_resume_one_lwp): Handle moving out of jump pads.
13109 (linux_set_resume_request): Dequeue deferred signals.
13110 (need_step_over_p): Also step over fast tracepoint jumps.
13111 (start_step_over): Also uninsert fast tracepoint jumps.
13112 (finish_step_over): Also reinsert fast tracepoint jumps.
13113 (linux_install_fast_tracepoint_jump): New.
13114 (linux_target_ops): Install linux_stabilize_threads and
13115 linux_install_fast_tracepoint_jump_pad.
13116 * linux-low.h (linux_target_ops) <get_thread_area,
13117 install_fast_tracepoint_jump_pad>: New fields.
13118 (struct lwp_info) <collecting_fast_tracepoint,
13119 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13120 (linux_get_thread_area): Declare.
13121 * linux-x86-low.c (jump_insn): New.
13122 (x86_get_thread_area): New.
13123 (append_insns): New.
13124 (push_opcode): New.
13125 (amd64_install_fast_tracepoint_jump_pad): New.
13126 (i386_install_fast_tracepoint_jump_pad): New.
13127 (x86_install_fast_tracepoint_jump_pad): New.
13128 (the_low_target): Install x86_get_thread_area and
13129 x86_install_fast_tracepoint_jump_pad.
13130 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13131 (struct fast_tracepoint_jump): New.
13132 (fast_tracepoint_jump_insn): New.
13133 (fast_tracepoint_jump_shadow): New.
13134 (find_fast_tracepoint_jump_at): New.
13135 (fast_tracepoint_jump_here): New.
13136 (delete_fast_tracepoint_jump): New.
13137 (set_fast_tracepoint_jump): New.
13138 (uninsert_fast_tracepoint_jumps_at): New.
13139 (reinsert_fast_tracepoint_jumps_at): New.
13140 (set_breakpoint_at): Use write_inferior_memory.
13141 (uninsert_raw_breakpoint): Use write_inferior_memory.
13142 (check_mem_read): Mask out fast tracepoint jumps.
13143 (check_mem_write): Mask out fast tracepoint jumps.
13144 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13145 (set_fast_tracepoint_jump): Declare.
13146 (delete_fast_tracepoint_jump)
13147 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13148 (reinsert_fast_tracepoint_jumps_at): Declare.
13149 * regcache.c: Don't compile many functions when building the
13150 in-process agent library.
13151 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13152 the register buffer in the heap.
13153 (free_register_cache): If the register buffer isn't owned by the
13154 regcache, don't free it.
13155 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13156 pre-existing register caches.
13157 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13159 (convert_ascii_to_int): : Constify `from' parameter type.
13160 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13161 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13162 the needed buffer in-place.
13163 (relocate_instruction): New.
13164 * server.c (handle_query) <qSymbols>: If the target supports
13165 tracepoints, give it a chance of looking up symbols. Report
13166 support for fast tracepoints.
13167 (handle_status): Stabilize threads.
13168 (process_serial_event): Adjust.
13169 * server.h (struct fast_tracepoint_jump): Forward declare.
13170 (struct process_info) <fast_tracepoint_jumps>: New field.
13171 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13172 (decode_X_packet, decode_M_packet): Adjust.
13173 (relocate_instruction): Declare.
13174 (in_process_agent_loaded): Declare.
13175 (tracepoint_look_up_symbols): Declare.
13176 (struct fast_tpoint_collect_status): Declare.
13177 (fast_tracepoint_collecting): Declare.
13178 (force_unlock_trace_buffer): Declare.
13179 (handle_tracepoint_bkpts): Declare.
13180 (initialize_low_tracepoint)
13181 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13182 * target.h (struct target_ops) <stabilize_threads,
13183 install_fast_tracepoint_jump_pad>: New fields.
13184 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13185 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13186 [HAVE_STDINT_H]: Include stdint.h.
13187 (trace_debug_1): Rename to ...
13188 (trace_vdebug): ... this.
13189 (trace_debug): Rename to ...
13190 (trace_debug_1): ... this. Add `level' parameter.
13191 (trace_debug): New.
13192 (ATTR_USED, ATTR_NOINLINE): New.
13193 (IP_AGENT_EXPORT): New.
13194 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13195 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13196 (about_to_request_buffer_space, trace_buffer_is_full)
13197 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13198 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13199 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13200 (traceframe_write_count, traceframes_created)
13201 (trace_state_variables)
13202 New renaming defines.
13203 (struct ipa_sym_addresses): New.
13204 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13205 (symbol_list): New.
13206 (ipa_sym_addrs): New.
13207 (all_tracepoint_symbols_looked_up): New.
13208 (in_process_agent_loaded): New.
13209 (write_e_ipa_not_loaded): New.
13210 (maybe_write_ipa_not_loaded): New.
13211 (tracepoint_look_up_symbols): New.
13212 (debug_threads) [IN_PROCESS_AGENT]: New.
13213 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13214 (UNKNOWN_SIDE_EFFECTS): New.
13215 (stop_tracing): New.
13216 (flush_trace_buffer): New.
13217 (stop_tracing_bkpt): New.
13218 (flush_trace_buffer_bkpt): New.
13219 (read_inferior_integer): New.
13220 (read_inferior_uinteger): New.
13221 (read_inferior_data_pointer): New.
13222 (write_inferior_data_pointer): New.
13223 (write_inferior_integer): New.
13224 (write_inferior_uinteger): New.
13225 (struct collect_static_trace_data_action): Delete.
13226 (enum tracepoint_type): New.
13227 (struct tracepoint) <type>: New field `type'.
13228 <actions_str, step_actions, step_actions_str>: Only include in
13230 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13231 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13232 (tracepoints): Use IP_AGENT_EXPORT.
13233 (last_tracepoint): Don't include in the IPA.
13234 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13235 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13236 (alloced_trace_state_variables): New.
13237 (trace_state_variables): Use IP_AGENT_EXPORT.
13238 (traceframe_t): Delete unused variable.
13239 (circular_trace_buffer): Don't include in the IPA.
13240 (trace_buffer_start): Delete.
13241 (struct trace_buffer_control): New.
13242 (trace_buffer_free): Delete.
13243 (struct ipa_trace_buffer_control): New.
13244 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13245 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13247 (trace_buffer_ctrl): New.
13248 (TRACE_BUFFER_CTRL_CURR): New.
13249 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13250 Reimplement as macros.
13251 (trace_buffer_wrap): Delete.
13252 (traceframe_write_count, traceframe_read_count)
13253 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13254 (struct tracepoint_hit_ctx) <type>: New field.
13255 (struct fast_tracepoint_ctx): New.
13256 (memory_barrier): New.
13258 (record_tracepoint_error): Update atomically in the IPA.
13259 (clear_inferior_trace_buffer): New.
13260 (about_to_request_buffer_space): New.
13261 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13262 updating the same buffer.
13263 (add_tracepoint): Default the tracepoint's type to trap
13264 tracepoint, and orig_size to -1.
13265 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13266 internal variables.
13267 (create_trace_state_variable): New parameter `gdb'. Handle it.
13268 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13269 (cmd_qtdp): Handle fast tracepoints.
13270 (cmd_qtdv): Adjust.
13271 (max_jump_pad_size): New.
13272 (gdb_jump_pad_head): New.
13273 (get_jump_space_head): New.
13274 (claim_jump_space): New.
13275 (sort_tracepoints): New.
13276 (MAX_JUMP_SIZE): New.
13277 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13279 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13280 support. Upload fast traceframes, and delete internal IPA
13282 (stop_tracing_handler): New.
13283 (flush_trace_buffer_handler): New.
13284 (cmd_qtstop): Upload fast tracepoints.
13285 (response_tracepoint): Handle fast tracepoints.
13286 (tracepoint_finished_step): Upload fast traceframes. Set the
13287 tracepoint hit context's tracepoint type.
13288 (handle_tracepoint_bkpts): New.
13289 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13290 type. Add comment about fast tracepoints.
13291 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13292 non-existing action_str field.
13293 (get_context_regcache): Handle fast tracepoints.
13294 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13296 (fast_tracepoint_from_jump_pad_address): New.
13297 (fast_tracepoint_from_ipa_tpoint_address): New.
13298 (collecting_t): New.
13299 (force_unlock_trace_buffer): New.
13300 (fast_tracepoint_collecting): New.
13302 (gdb_collect): New.
13303 (write_inferior_data_ptr): New.
13304 (target_tp_heap): New.
13305 (target_malloc): New.
13306 (download_agent_expr): New.
13308 (download_tracepoints): New.
13309 (download_trace_state_variables): New.
13310 (upload_fast_traceframes): New.
13311 (IPA_FIRST_TRACEFRAME): New.
13312 (IPA_NEXT_TRACEFRAME_1): New.
13313 (IPA_NEXT_TRACEFRAME): New.
13314 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13315 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13316 (gdb_jump_pad_buffer_end): New.
13317 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13318 (initialize_tracepoint): Adjust.
13319 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13320 buffer. Initialize the low module.
13321 * utils.c (PREFIX, TOOLNAME): New.
13322 (malloc_failure): Use PREFIX.
13323 (error): In the IPA, an error causes an exit.
13324 (fatal, warning): Use PREFIX.
13325 (internal_error): Use TOOLNAME.
13326 (NUMCELLS): Increase to 10.
13327 * configure, config.in: Regenerate.
13329 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13331 * server.c (handle_query) <qSupported>: Do two passes over the
13332 qSupported string to avoid nesting strtok.
13334 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13336 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13338 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13339 -Wl,--dynamic-list.
13340 * configure: Regenerate.
13341 * proc-service.list: New.
13343 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13345 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13348 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13350 * gdbreplay.c (remote_open): Check error return from socket() call by
13351 its equality to -1 not by it being negative.
13352 * remote-utils.c (remote_open): Likewise.
13354 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13356 * config.h: Regenerate.
13358 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13360 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13361 doesn't provide PTRACE_GET_THREAD_AREA.
13363 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13365 * linux-m68k-low.c: Include <asm/ptrace.h>
13366 (ps_get_thread_area): Implement.
13368 2010-05-03 Doug Evans <dje@google.com>
13370 * event-loop.c (struct callback_event): New struct.
13371 (callback_list): New global.
13372 (append_callback_event, delete_callback_event): New functions.
13373 (process_callback): New function.
13374 (start_event_loop): Call it.
13375 * remote-utils.c (NOT_SCHEDULED): Define.
13376 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13377 moved out of readchar.
13378 (readchar): Rewrite. Call reschedule before returning.
13379 (reset_readchar): New function.
13380 (remote_close): Call it.
13381 (process_remaining, reschedule): New functions.
13382 * server.h (callback_handler_func): New typedef.
13383 (append_callback_event, delete_callback_event): Declare.
13385 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13387 * proc-service.c (ps_pglobal_lookup): Use
13388 thread_db_look_up_one_symbol.
13389 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13390 parameter. Use it instead of all_symbols_looked_up.
13391 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13393 (all_symbols_looked_up): Don't declare.
13394 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13395 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13397 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13398 Set all_symbols_looked_up here.
13399 (thread_db_look_up_one_symbol): New.
13400 (thread_db_get_tls_address): Adjust.
13401 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13402 thread_db object on the heap, and tentatively set it in the
13404 (thread_db_init): Don't set all_symbols_looked_up here.
13405 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13407 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13409 * linux-low.c (linux_kill, linux_detach): Adjust.
13410 (status_pending_p_callback): Remove redundant statement. Check
13411 for !TARGET_WAITIKIND_IGNORE, instead of
13412 TARGET_WAITKIND_STOPPED.
13413 (handle_tracepoints): Make sure LWP is locked. Adjust.
13414 (linux_wait_for_event_1): Adjust.
13415 (linux_cancel_breakpoints): New.
13416 (unsuspend_one_lwp): New.
13417 (unsuspend_all_lwps): New.
13418 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13419 (send_sigstop_callback): Change return type to int, add new
13420 `except' parameter and handle it.
13421 (suspend_and_send_sigstop_callback): New.
13422 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13423 pass them down. If SUSPEND, also increment the lwp's suspend
13425 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13426 (need_step_over_p): Don't consider suspended LWPs.
13427 (start_step_over): Adjust.
13428 (proceed_one_lwp): Change return type to int, add new `except'
13429 parameter and handle it.
13430 (unsuspend_and_proceed_one_lwp): New.
13431 (proceed_all_lwps): Use find_inferior instead of
13433 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13434 also decrement the suspend count of LWPs. Pass `except' down,
13435 instead of hacking its suspend count.
13436 (linux_pause_all): Add `freeze' parameter. Adjust.
13437 (linux_unpause_all): New.
13438 (linux_target_ops): Install linux_unpause_all.
13439 * server.c (handle_status): Adjust.
13440 * target.h (struct target_ops): New fields `unpause_all' and
13441 `cancel_breakpoints'. Add new parameter to `pause_all'.
13442 (pause_all): Add new `freeze' parameter.
13443 (unpause_all): New.
13444 (cancel_breakpoints): New.
13445 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13446 cancel breakpoints.
13447 (cmd_qtstart): Pause threads.
13448 (stop_tracing): Pause threads, and cancel breakpoints.
13449 * win32-low.c (win32_target_ops): Adjust.
13451 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13453 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13454 the inferior right away from here...
13455 (linux_wait_1): ... to here, and adjust to check the thread's
13456 last_resume_kind instead of the lwp's step or stop_expected flags.
13458 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13460 * README: Use consistent `GDB' and `GDBserver' spellings.
13462 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13464 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13465 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13466 (linux_detach_one_lwp): Assume the lwp is stopped.
13467 (any_thread_of): Delete.
13468 (linux_detach): Stop all lwps here. Don't blindly delete all
13470 (delete_lwp_callback): New.
13471 (linux_mourn): Delete all lwps of the process that is gone.
13472 (linux_wait_1): Don't delete the last lwp of the process here.
13473 * mem-break.h (mark_breakpoints_out): Declare.
13474 * mem-break.c (mark_breakpoints_out): New.
13475 (free_all_breakpoints): Use it.
13476 * server.c (handle_target_event): If the process is gone, mark
13478 * thread-db.c (struct thread_db) <create_bp>: New field.
13479 (thread_db_enable_reporting): Fix prototype. Store a thread event
13480 breakpoint reference in the thread_db struct.
13481 (thread_db_load_search): Clear the thread_db object.
13482 (try_thread_db_load_1): Ditto.
13483 (switch_to_process): New.
13484 (disable_thread_event_reporting): Use it.
13485 (remove_thread_event_breakpoints): New.
13486 (thread_db_detach, thread_db_mourn): Use it.
13488 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13490 * linux-low.c (linux_enable_event_reporting): New.
13491 (linux_wait_for_event_1, handle_extended_wait): Use it.
13493 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13495 * linux-low.c (linux_kill_one_lwp, linux_kill)
13496 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13497 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13498 SIGSTOP even if the LWP is stopped.
13499 (send_sigstop_callback): New.
13500 (stop_all_lwps): Use send_sigstop_callback instead.
13501 (linux_resume_one_thread): Adjust.
13502 (proceed_one_lwp): Still proceed an LWP that the client has
13503 requested to stop, if we haven't reported it as stopped yet. Make
13504 sure that LWPs the client want stopped, have a pending SIGSTOP.
13506 2010-04-26 Doug Evans <dje@google.com>
13508 * server.c (handle_general_set): Make static.
13510 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13511 Print received char after testing for error/eof instead of before.
13512 (input_interrupt): Tweak comment.
13514 2010-04-23 Doug Evans <dje@google.com>
13516 * server.c (start_inferior): Print inferior argv if --debug.
13518 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13520 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13521 * nto-x86-low.c: Include server.h
13523 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13525 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13526 be consistent with other sources of this directory.
13527 (init_registers_amd64): Correct name of source file of this function
13530 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13532 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13533 64-bit executables.
13535 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13537 * win32-i386-low.c: Add 64-bit support.
13538 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13539 (init_registers_amd64): Declare.
13540 (mappings): Add 64-bit version of array.
13541 (init_windows_x86): New function.
13542 (the_low_target): Change init_arch field to init_windows_x86.
13544 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13546 * win32-low.c: Adapt to support also 64-bit architecture.
13547 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13548 (get_image_name): Use SIZE_T type for local variable `done'.
13549 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13550 (toolhelp_get_dll_name): Idem.
13551 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13552 Use uintptr_t typecast to avoid warning.
13553 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13554 (handle_exception): Use phex_nz to avoid warning.
13555 (win32_wait): Remove unused local variable `process'.
13557 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13559 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13562 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13564 * configure.ac: Use `ws2_32' library for srv_mingw.
13565 * configure: Regenerate.
13566 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13567 * remote-utils.c: Likewise.
13569 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13571 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13572 if __x86_64__ is defined.
13574 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13576 * configure: Regenerate.
13578 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13580 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13581 * target.h (target_ops): New get_tib_address field.
13582 * win32-low.h (win32_thread_info): Add thread_local_base field.
13583 * win32-low.c (child_add_thread): Add tlb argument.
13584 Set thread_local_base field to TLB.
13585 (get_child_debug_event): Adapt to child_add_thread change.
13586 (win32_get_tib_address): New function.
13587 (win32_target_ops): Set get_tib_address field to
13588 win32_get_tib_address.
13589 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13591 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13593 * linux-low.c (linux_mourn): Also remove the process.
13594 * server.c (handle_target_event): Don't remove the process here.
13595 * nto-low.c (nto_mourn): New.
13596 (nto_target_ops): Install it.
13597 * spu-low.c (spu_mourn): New.
13598 (spu_target_ops): Install it.
13599 * win32-low.c (win32_mourn): New.
13600 (win32_target_ops): Install it.
13602 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13604 * server.h (buffer_xml_printf): Remove redundant `;'.
13606 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13608 * regcache.c (set_register_cache): Invalidate regcaches before
13609 changing the register cache layout.
13610 (regcache_invalidate_one): Allow a NULL regcache.
13611 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13612 regcaches before changing the register cache layout or the target
13615 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13617 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13618 variable warning on Linux/x86-64.
13620 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13622 GDBserver disconnected tracing support.
13624 * linux-low.c (linux_remove_process): Delete.
13625 (add_lwp): Don't set last_resume_kind here.
13626 (linux_kill): Use `mourn'.
13627 (linux_detach): Use `thread_db_detach', and `mourn'.
13628 (linux_mourn): New.
13629 (linux_attach_lwp_1): Adjust comment.
13630 (linux_attach): last_resume_kind moved the thread_info; adjust.
13631 (status_pending_p_callback): Adjust.
13632 (linux_wait_for_event_1): Adjust.
13633 (count_events_callback, select_singlestep_lwp_callback)
13634 (select_event_lwp_callback, cancel_breakpoints_callback)
13635 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13636 (proceed_one_lwp): Adjust.
13637 (linux_async): Add debug output.
13638 (linux_thread_stopped): New.
13639 (linux_pause_all): New.
13640 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13642 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13643 (thread_db_free): Delete declaration.
13644 (thread_db_detach, thread_db_mourn): Declare.
13645 * thread-db.c (thread_db_init): Use thread_db_mourn.
13646 (thread_db_free): Delete, split in two.
13647 (disable_thread_event_reporting): New.
13648 (thread_db_detach): New.
13649 (thread_db_mourn): New.
13651 * server.h (struct thread_info) <last_resume_kind>: New field.
13652 <attached>: Add comment.
13653 <gdb_detached>: New field.
13654 (handler_func): Change return type to int.
13655 (handle_serial_event, handle_target_event): Ditto.
13656 (gdb_connected): Declare.
13658 (disconnected_tracing): Declare.
13659 (stop_tracing): Declare.
13661 * server.c (handle_query) <qSupported>: Report support for
13662 disconnected tracing.
13663 (queue_stop_reply_callback): Account for running threads.
13664 (gdb_wants_thread_stopped): New.
13665 (gdb_wants_all_threads_stopped): New.
13666 (gdb_reattached_process): New.
13667 (handle_status): Clear the `gdb_detached' flag of all processes.
13668 In all-stop, stop all threads.
13669 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13670 (process_serial_event): If the remote connection breaks, or if an
13671 exit was forced with "monitor exit", force an event loop exit.
13672 Handle disconnected tracing on detach.
13673 (handle_serial_event): Adjust.
13674 (handle_target_event): If GDB isn't connected, forward events back
13675 to the inferior, unless the last process exited, in which case,
13676 exit gdbserver. Adjust interface.
13678 * remote-utils.c (remote_open): Don't block in accept. Instead
13679 register an event loop source on the listen socket file
13680 descriptor. Refactor bits into ...
13681 (listen_desc): ... this new global.
13682 (gdb_connected): ... this new function.
13683 (enable_async_notification): ... this new function.
13684 (handle_accept_event): ... this new function.
13685 (remote_close): Clear remote_desc.
13687 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13689 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13691 (mourn_inferior): Define.
13692 (target_process_qsupported): Avoid the dangling else problem.
13693 (thread_stopped): Define.
13694 (pause_all): Define.
13695 (target_waitstatus_to_string): Declare.
13696 * target.c (target_waitstatus_to_string): New.
13698 * tracepoint.c (tracing): Make extern.
13699 (disconnected_tracing): New.
13700 (stop_tracing): Make extern. Handle tracing stops due to GDB
13702 (cmd_qtdisconnected): New.
13703 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13704 (handle_tracepoint_general_set): Handle QTDisconnected.
13706 * event-loop.c (event_handler_func): Change return type to int.
13707 (process_event): Bail out if the event handler wants the event
13709 (handle_file_event): Ditto.
13710 (start_event_loop): Bail out if the event handler wants the event
13713 * nto-low.c (nto_target_ops): Adjust.
13714 * spu-low.c (spu_wait): Don't remove the process here.
13715 (spu_target_ops): Adjust.
13716 * win32-low.c (win32_wait): Don't remove the process here.
13717 (win32_target_ops): Adjust.
13719 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13721 * regcache.c (realloc_register_cache): Invalidate inferior's
13722 regcache before recreating it.
13724 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13726 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13728 2010-04-09 Stan Shebs <stan@codesourcery.com>
13729 Pedro Alves <pedro@codesourcery.com>
13731 * server.h (LONGEST): New.
13732 (struct thread_info) <while_stepping>: New field.
13733 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13735 (initialize_tracepoint, handle_tracepoint_general_set)
13736 (handle_tracepoint_query, tracepoint_finished_step)
13737 (tracepoint_was_hit, release_while_stepping_state_list):
13738 (current_traceframe): Declare.
13739 * server.c (handle_general_set): Handle tracepoint packets.
13740 (read_memory): New.
13741 (write_memory): New.
13742 (handle_search_memory_1): Use read_memory.
13743 (handle_query): Report support for conditional tracepoints, trace
13744 state variables, and tracepoint sources. Handle tracepoint
13746 (main): Initialize the tracepoints module.
13747 (process_serial_event): Handle traceframe reads/writes.
13749 * linux-low.c (handle_tracepoints): New.
13750 (linux_wait_1): Call it.
13751 (linux_resume_one_lwp): Handle while-stepping.
13752 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13753 (linux_target_ops): Install them.
13754 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13756 * linux-x86-low.c (x86_supports_tracepoints): New.
13757 (the_low_target). Install it.
13759 * mem-break.h (delete_breakpoint): Declare.
13760 * mem-break.c (delete_breakpoint): Make external.
13762 * target.h (struct target_ops): Add `supports_tracepoints',
13763 `read_pc', and `write_pc' fields.
13764 (target_supports_tracepoints): Define.
13765 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13768 * regcache.h (struct regcache) <registers_owned>: New field.
13769 (init_register_cache, regcache_cpy): Declare.
13770 (regcache_read_pc, regcache_write_pc): Declare.
13771 (register_cache_size): Declare.
13772 (supply_regblock): Declare.
13773 * regcache.c (init_register_cache): New.
13774 (new_register_cache): Use it.
13775 (regcache_cpy): New.
13776 (register_cache_size): New.
13777 (supply_regblock): New.
13778 (regcache_read_pc, regcache_write_pc): New.
13780 * tracepoint.c: New.
13782 * Makefile.in (OBS): Add tracepoint.o.
13783 (tracepoint.o): New rule.
13785 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13787 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13789 (i386-mmx.c): Likewise.
13790 (i386-mmx-linux.o): Likewise.
13791 (i386-mmx-linux.c): Likewise.
13793 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13794 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13795 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13796 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13798 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13799 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13800 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13802 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13804 * Makefile.in (clean): Updated.
13806 (i386-avx.c): Likewise.
13807 (i386-avx-linux.o): Likewise.
13808 (i386-avx-linux.c): Likewise.
13809 (amd64-avx.o): Likewise.
13810 (amd64-avx.c): Likewise.
13811 (amd64-avx-linux.o): Likewise.
13812 (amd64-avx-linux.c): Likewise.
13814 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13815 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13816 (srv_amd64_regobj): Add amd64-avx.o.
13817 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13818 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13819 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13820 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13821 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13822 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13823 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13825 * i387-fp.c: Include "i386-xstate.h".
13827 (i387_cache_to_xsave): Likewise.
13828 (i387_xsave_to_cache): Likewise.
13829 (x86_xcr0): Likewise.
13831 * i387-fp.h (i387_cache_to_xsave): Likewise.
13832 (i387_xsave_to_cache): Likewise.
13833 (x86_xcr0): Likewise.
13835 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13836 * linux-crisv32-low.c (target_regsets): Likewise.
13837 * linux-m68k-low.c (target_regsets): Likewise.
13838 * linux-mips-low.c (target_regsets): Likewise.
13839 * linux-ppc-low.c (target_regsets): Likewise.
13840 * linux-s390-low.c (target_regsets): Likewise.
13841 * linux-sh-low.c (target_regsets): Likewise.
13842 * linux-sparc-low.c (target_regsets): Likewise.
13843 * linux-xtensa-low.c (target_regsets): Likewise.
13845 * linux-low.c: Include <sys/uio.h>.
13846 (regsets_fetch_inferior_registers): Support nt_type.
13847 (regsets_store_inferior_registers): Likewise.
13848 (linux_process_qsupported): New.
13849 (linux_target_ops): Add linux_process_qsupported.
13851 * linux-low.h (regset_info): Add nt_type.
13852 (linux_target_ops): Add process_qsupported.
13854 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13856 (init_registers_i386_avx_linux): New.
13857 (init_registers_amd64_avx_linux): Likewise.
13858 (xmltarget_i386_linux_no_xml): Likewise.
13859 (xmltarget_amd64_linux_no_xml): Likewise.
13860 (PTRACE_GETREGSET): Likewise.
13861 (PTRACE_SETREGSET): Likewise.
13862 (x86_fill_xstateregset): Likewise.
13863 (x86_store_xstateregset): Likewise.
13864 (use_xml): Likewise.
13865 (x86_linux_update_xmltarget): Likewise.
13866 (x86_linux_process_qsupported): Likewise.
13867 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13868 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13869 init_registers_i386_linux here. Call
13870 x86_linux_update_xmltarget.
13871 (the_low_target): Add x86_linux_process_qsupported.
13873 * server.c (handle_query): Call target_process_qsupported.
13875 * target.h (target_ops): Add process_qsupported.
13876 (target_process_qsupported): New.
13878 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13880 * inferiors.c (add_thread): Set last_status kind to
13881 TARGET_WAITKIND_IGNORE.
13882 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13883 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13884 (linux_wait_1): Move `thread' local definition to block that uses
13885 it. Don't NULL initialize `event_child'.
13886 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13887 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13888 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13890 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13892 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13893 an extended waitstatus, or by a watchpoint.
13894 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13895 thread was stepping or has been stopped by a watchpoint.
13897 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13899 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13900 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13901 of another, then delete the previous, and validate all
13903 (validate_inserted_breakpoint): New.
13904 (delete_disabled_breakpoints): New.
13905 (validate_breakpoints): New.
13906 (check_mem_read): Validate breakpoints before trusting their
13907 shadow. Delete disabled breakpoints.
13908 (check_mem_write): Validate breakpoints before trusting they
13909 should be inserted. Delete disabled breakpoints.
13910 * mem-break.h (validate_breakpoints):
13911 * server.c (handle_query): Validate breakpoints when we see a
13914 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13916 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13917 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13918 if we could tell there's a GDB breakpoint at stop_pc.
13919 (need_step_over_p): Don't do a step over if we find a GDB
13920 breakpoint at the resume PC.
13922 * mem-break.c (struct raw_breakpoint): New.
13923 (enum bkpt_type): New type `gdb_breakpoint'.
13924 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13925 fields. New field `raw'.
13926 (find_raw_breakpoint_at): New.
13927 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13928 breakpoint instead.
13929 (set_breakpoint_at): Adjust.
13930 (delete_raw_breakpoint): New.
13931 (release_breakpoint): New.
13932 (delete_breakpoint): Rename to...
13933 (delete_breakpoint_1): ... this. Add proc parameter. Use
13934 release_breakpoint. Return ENOENT.
13935 (delete_breakpoint): Reimplement.
13936 (find_breakpoint_at): Delete.
13937 (find_gdb_breakpoint_at): New.
13938 (delete_breakpoint_at): Delete.
13939 (set_gdb_breakpoint_at): New.
13940 (delete_gdb_breakpoint_at): New.
13941 (gdb_breakpoint_here): New.
13942 (set_reinsert_breakpoint): Use release_breakpoint.
13943 (uninsert_breakpoint): Rename to ...
13944 (uninsert_raw_breakpoint): ... this.
13945 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13946 (reinsert_raw_breakpoint): Change parameter type to
13948 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13950 (check_breakpoints): Adjust. Use release_breakpoint.
13951 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13952 (breakpoint_inserted_here): Ditto.
13953 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13954 Don't trust the breakpoint's shadow if it is not inserted.
13955 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13956 (delete_all_breakpoints): Adjust.
13957 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13958 use delete_breakpoint_1.
13960 * mem-break.h (breakpoints_supported): Delete declaration.
13961 (set_gdb_breakpoint_at): Declare.
13962 (gdb_breakpoint_here): Declare.
13963 (delete_breakpoint_at): Delete.
13964 (delete_gdb_breakpoint_at): Declare.
13966 * server.h (struct raw_breakpoint): Forward declare.
13967 (struct process_info): New field `raw_breakpoints'.
13969 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13972 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13974 * linux-low.c (status_pending_p_callback): Fix comment.
13975 (linux_wait_for_event_1): Move most of the internal breakpoint
13976 handling from here...
13977 (linux_wait_1): ... to here.
13978 (count_events_callback): New.
13979 (select_singlestep_lwp_callback): New.
13980 (select_event_lwp_callback): New.
13981 (cancel_breakpoints_callback): New.
13982 (select_event_lwp): New.
13983 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13984 priority to all LWPs that have had events that should be reported
13985 to the client. Cancel breakpoints when about to reporting the
13986 event to the client, not while stopping lwps. No longer cancel
13987 finished single-steps here.
13988 (cancel_finished_single_step): Delete.
13989 (cancel_finished_single_steps): Delete.
13991 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13993 * mem-break.c (enum bkpt_type): New.
13994 (struct breakpoint): New field `type'.
13995 (set_breakpoint_at): Change return type to struct breakpoint
13996 pointer. Set type to `other_breakpoint' by default.
13997 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13998 in the breakpoint list.
13999 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14000 (reinsert_breakpoint): Rename to ...
14001 (reinsert_raw_breakpoint): ... this.
14002 (reinsert_breakpoints_at): Adjust.
14003 * mem-break.h (struct breakpoint): Declare.
14004 (set_breakpoint_at): Change return type to struct breakpoint
14007 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14009 * server.c (handle_query): Assign, not compare.
14011 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14013 Teach linux gdbserver to step-over-breakpoints.
14015 * linux-low.c (can_hardware_single_step): New.
14016 (supports_breakpoints): New.
14017 (handle_extended_wait): If stopping threads, read the stop pc of
14018 the new cloned LWP.
14020 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14021 low target doesn't support retrieving the PC.
14022 (add_lwp): Set last_resume_kind to resume_continue.
14023 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14024 (linux_attach): Don't clear stop_expected. Set the lwp's
14025 last_resume_kind to resume_stop.
14026 (linux_detach_one_lwp): Don't check for removed breakpoints.
14027 (check_removed_breakpoint): Delete.
14028 (status_pending_p): Rename to ...
14029 (status_pending_p_callback): ... this. Don't check for removed
14030 breakpoints. Don't consider threads that are stopped from GDB's
14032 (linux_wait_for_lwp): Always read the stop_pc here.
14033 (cancel_breakpoint): New.
14034 (step_over_bkpt): New global.
14035 (linux_wait_for_event_1): Implement stepping over breakpoints.
14036 (gdb_wants_lwp_stopped): New.
14037 (gdb_wants_all_stopped): New.
14038 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14039 single-step traps here. Store the thread's last reported target
14041 (send_sigstop): Don't clear stop_expected. Always set it,
14043 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14044 (cancel_finished_single_step): New.
14045 (cancel_finished_single_steps): New.
14046 (wait_for_sigstop): Don't cancel finished single-step traps here.
14047 (linux_resume_one_lwp): Don't check for removed breakpoints.
14048 Don't set `step' on non-hardware step archs.
14049 (linux_set_resume_request): Ignore resume_stop requests if already
14050 stopping or stopped. Set the lwp's last_resume_kind.
14051 (resume_status_pending_p): Don't check for removed breakpoints.
14052 (need_step_over_p): New.
14053 (start_step_over): New.
14054 (finish_step_over): New.
14055 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14056 requests. Clear the thread's last reported target waitstatus.
14057 Don't use the `suspended' flag. Don't consider pending breakpoints.
14058 (linux_resume): Start a step-over if necessary.
14059 (proceed_one_lwp): New.
14060 (proceed_all_lwps): New.
14061 (unstop_all_lwps): New.
14062 * linux-low.h (struct lwp_info): Rewrite comment for the
14063 `suspended' flag. Add the `stop_pc' field. Delete the
14064 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14065 Add `'last_resume_kind' and `need_step_over' fields.
14066 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14067 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14068 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14069 (set_raw_breakpoint_at): New.
14070 (set_breakpoint_at): Rewrite to use it.
14071 (reinsert_breakpoint_handler): Delete.
14072 (set_reinsert_breakpoint): New.
14073 (reinsert_breakpoint_by_bp): Delete.
14074 (delete_reinsert_breakpoints): New.
14075 (uninsert_breakpoint): Rewrite.
14076 (uninsert_breakpoints_at): New.
14077 (reinsert_breakpoint): Rewrite.
14078 (reinsert_breakpoints_at): New.
14079 (check_breakpoints): Rewrite.
14080 (breakpoint_here): New.
14081 (breakpoint_inserted_here): New.
14082 (check_mem_read): Adjust.
14083 * mem-break.h (breakpoints_supported, breakpoint_here)
14084 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14085 (reinsert_breakpoint_by_bp): Delete declaration.
14086 (delete_reinsert_breakpoints): Declare.
14087 (reinsert_breakpoint): Delete declaration.
14088 (reinsert_breakpoints_at): Declare.
14089 (uninsert_breakpoint): Delete declaration.
14090 (uninsert_breakpoints_at): Declare.
14091 (check_breakpoints): Adjust prototype.
14092 * server.h: Adjust include order.
14093 (struct thread_info): Declare here. Add a `last_status' field.
14095 2010-03-23 Michael Snyder <msnyder@vmware.com>
14097 * server.c (crc32): New function.
14098 (handle_query): Add handling for 'qCRC:' request.
14100 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14102 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14103 lwp had been stopped by a watchpoint.
14105 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14107 * server.h (internal_error): Declare.
14108 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14109 * utils.c (internal_error): New function.
14111 2010-03-15 Andreas Schwab <schwab@redhat.com>
14113 * configure.srv: Fix typo setting srv_regobj.
14115 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14117 * linux-low.c (fetch_register): Avoid passing a non string literal
14119 (usr_store_inferior_registers): Ditto.
14121 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14123 * linux-low.c (linux_write_memory): Bail out early if peeking
14126 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14128 * linux-low.h (struct lwp_info): New fields
14129 `stopped_by_watchpoint' and `stopped_data_address'.
14130 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14131 here, and cache them in the lwp object.
14132 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14134 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14136 (linux_stopped_by_watchpoint): Rewrite.
14137 (linux_stopped_data_address): Rewrite.
14139 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14141 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14142 switching the current inferior, not before.
14144 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14146 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14147 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14148 i386-linux.c and amd64-linux.c.
14149 (reg-i386.o): Removed.
14150 (reg-i386.c): Likewise.
14151 (reg-i386-linux.o): Likewise.
14152 (reg-i386-linux.c): Likewise.
14153 (reg-x86-64.o): Likewise.
14154 (reg-x86-64.c): Likewise.
14155 (reg-x86-64-linux.o): Likewise.
14156 (reg-x86-64-linux.c): Likewise.
14158 (i386.c): Likewise.
14159 (i386-linux.o): Likewise.
14160 (i386-linux.c): Likewise.
14161 (amd64.o): Likewise.
14162 (amd64.c): Likewise.
14163 (amd64-linux.o): Likewise.
14164 (amd64-linux.c): Likewise.
14166 * configure.srv (srv_i386_regobj): New.
14167 (srv_i386_linux_regobj): Likewise.
14168 (srv_amd64_regobj): Likewise.
14169 (srv_amd64_linux_regobj): Likewise.
14170 (srv_i386_32bit_xmlfiles): Likewise.
14171 (srv_i386_64bit_xmlfiles): Likewise.
14172 (srv_i386_xmlfiles): Likewise.
14173 (srv_amd64_xmlfiles): Likewise.
14174 (srv_i386_linux_xmlfiles): Likewise.
14175 (srv_amd64_linux_xmlfiles): Likewise.
14176 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14177 srv_xmlfiles to $srv_i386_xmlfiles.
14178 (i[34567]86-*-mingw32ce*): Likewise.
14179 (i[34567]86-*-mingw*): Likewise.
14180 (i[34567]86-*-nto*): Likewise.
14181 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14182 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14183 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14184 (x86_64-*-linux*): Likewise.
14186 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14187 (init_registers_amd64_linux): New.
14188 (x86_arch_setup): Replace init_registers_x86_64_linux with
14189 init_registers_amd64_linux.
14191 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14193 * configure.ac: Check for libdl. If it is not available link against
14194 static libthread_db.
14195 * configure: Regenerate.
14197 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14201 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14202 handing a read watchpoint.
14203 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14205 2010-02-12 Doug Evans <dje@google.com>
14207 * linux-low.c (linux_supports_tracefork_flag): Document.
14208 (linux_look_up_symbols): Add comment.
14210 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14212 * regcache.c (supply_register): Clear regcache if buf is NULL.
14214 2010-02-02 Nicolas Roche <roche@sourceware.org>
14215 Joel Brobecker <brobecker@adacore.com>
14217 * inferiors.c (find_inferior): Add function documentation.
14218 (unloaded_dll): Handle the case where the unloaded dll has not
14219 been previously registered in the dll list.
14221 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14223 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14224 (thumb2_breakpoint): New.
14225 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14227 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14229 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14230 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14233 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14235 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14237 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14239 * linux-s390-low.c (s390_collect_ptrace_register)
14240 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14242 2010-01-21 Doug Evans <dje@google.com>
14244 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14245 (PTRACE_ARG4_TYPE): New macro.
14246 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14247 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14248 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14249 (usr_store_inferior_registers): Ditto.
14250 (linux_read_memory, linux_write_memory): Ditto.
14251 (linux_test_for_tracefork): Ditto.
14253 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14254 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14256 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14258 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14261 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14263 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14264 prototype to take a regcache. Adjust.
14266 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14268 * regcache.h (struct thread_info): Forward declare.
14269 (struct regcache): New.
14270 (new_register_cache): Adjust prototype.
14271 (get_thread_regcache): Declare.
14272 (free_register_cache): Adjust prototype.
14273 (registers_to_string, registers_from_string): Ditto.
14274 (supply_register, supply_register_by_name, collect_register)
14275 (collect_register_as_string, collect_register_by_name): Ditto.
14276 * regcache.c (struct inferior_regcache_data): Delete.
14277 (get_regcache): Rename to ...
14278 (get_thread_regcache): ... this. Adjust. Switch inferior before
14279 fetching registers.
14280 (regcache_invalidate_one): Adjust.
14281 (regcache_invalidate): Fix prototype.
14282 (new_register_cache): Return the new register cache.
14283 (free_register_cache): Change prototype.
14284 (realloc_register_cache): Adjust.
14285 (registers_to_string): Change prototype to take a regcache. Adjust.
14286 (registers_from_string): Ditto.
14287 (register_data): Ditto.
14288 (supply_register): Ditto.
14289 (supply_register_by_name): Ditto.
14290 (collect_register): Ditto.
14291 (collect_register_as_string): Ditto.
14292 (collect_register_by_name): Ditto.
14293 * server.c (process_serial_event): Adjust.
14294 * linux-low.h (regset_fill_func, regset_store_func): Change
14296 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14298 * linux-low.c (get_stop_pc): Adjust.
14299 (check_removed_breakpoint): Adjust.
14300 (linux_wait_for_event): Adjust.
14301 (linux_resume_one_lwp): Adjust.
14302 (fetch_register): Add regcache parameter. Adjust.
14303 (usr_store_inferior_registers): Ditto.
14304 (regsets_fetch_inferior_registers): Ditto.
14305 (regsets_store_inferior_registers): Ditto.
14306 (linux_fetch_registers, linux_store_registers): Ditto.
14307 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14309 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14311 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14312 prototype to take a regcache.
14313 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14314 * remote-utils.c (convert_ascii_to_int, outreg)
14315 (prepare_resume_reply): Change prototype to take a regcache.
14317 * target.h (struct target_ops) <fetch_registers, store_registers>:
14318 Change prototype to take a regcache.
14319 (fetch_inferior_registers, store_inferior_registers): Change
14320 prototype to take a regcache. Adjust.
14321 * proc-service.c (ps_lgetregs): Adjust.
14322 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14323 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14324 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14325 take a regcache. Adjust.
14326 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14327 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14328 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14329 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14330 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14331 (cris_cannot_fetch_register):
14332 (cris_breakpoint_at): Change prototype to take a regcache.
14334 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14335 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14336 to take a regcache. Adjust.
14337 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14339 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14340 take a regcache. Adjust.
14341 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14342 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14343 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14344 * linux-mips-low.c (mips_get_pc):
14345 (mips_set_pc): Change prototype to take a regcache. Adjust.
14346 (mips_reinsert_addr): Adjust.
14347 (mips_collect_register): Change prototype to take a regcache.
14349 (mips_supply_register):
14350 (mips_collect_register_32bit, mips_supply_register_32bit)
14351 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14352 (mips_store_fpregset): Ditto.
14353 * linux-ppc-low.c (ppc_supply_ptrace_register)
14354 (ppc_supply_ptrace_register): Ditto.
14355 (parse_spufs_run): Adjust.
14356 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14357 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14358 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14359 take a regcache. Adjust.
14360 * linux-s390-low.c (s390_collect_ptrace_register)
14361 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14362 (s390_set_pc): Change prototype to take a regcache. Adjust.
14363 (s390_arch_setup): Adjust.
14364 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14365 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14366 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14367 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14368 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14370 (sparc_breakpoint_at): Adjust.
14371 * linux-xtensa-low.c (xtensa_fill_gregset):
14372 (xtensa_store_gregset):
14373 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14374 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14375 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14376 prototype to take a regcache. Adjust.
14377 * win32-arm-low.c (arm_fetch_inferior_register)
14378 (arm_store_inferior_register): Change prototype to take a
14380 * win32-i386-low.c (i386_fetch_inferior_register)
14381 (i386_store_inferior_register): Change prototype to take a
14383 * win32-low.c (child_fetch_inferior_registers)
14384 (child_store_inferior_registers): Change prototype to take a
14386 (win32_wait): Adjust.
14387 (win32_fetch_inferior_registers): Change prototype to take a
14389 (win32_store_inferior_registers): Adjust.
14390 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14391 store_inferior_register>: Change prototype to take a regcache.
14393 2010-01-20 Doug Evans <dje@google.com>
14395 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14397 (linux_wait_for_event1, linux_init_signals): Ditto.
14398 (W_STOPCODE): Provide definition if missing.
14400 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14402 * linux-low.c (linux_core_of_thread): New.
14403 (compare_ints, show_process, list_threads): New.
14404 (linux_qxfer_osdata): Report threads and cores.
14405 (linux_target_op): Register linux_core_of_thread.
14406 * remote-utils.c (prepare_resume_reply): Report the core.
14407 (buffer_xml_printf): Support %d specifier.
14408 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14410 (handle_query): Handle qXfer:threads. Announce availability
14412 * target.h (struct target_ops): New field core_of_thread.
14414 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14416 * Makefile.in (clean): Remove new generated files.
14417 (reg-s390.o, reg-s390.c): Remove rules.
14418 (reg-s390x.o, reg-s390x.c): Likewise.
14419 (s390-linux32.o, s390-linux32.c): Add rules.
14420 (s390-linux64.o, s390-linux64.c): Likewise.
14421 (s390x-linux64.o, s390x-linux64.c): Likewise.
14422 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14423 * linux-s390-low.c: Include <elf.h>.
14424 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14425 (init_registers_s390): Remove prototype.
14426 (init_registers_s390x): Likewise.
14427 (init_registers_s390_linux32): Add prototype.
14428 (init_registers_s390_linux64): Likewise.
14429 (init_registers_s390x_linux64): Likewise.
14430 (s390_num_regs_3264): New define.
14431 (s390_regmap_3264): New global variable.
14432 (s390_cannot_fetch_register): Remove obsolete check.
14433 (s390_cannot_store_register): Likewise.
14434 (s390_collect_ptrace_register): Handle upper/lower register halves.
14435 (s390_supply_ptrace_register): Likewise.
14436 (s390_fill_gregset): Update to register number changes.
14437 (s390_get_hwcap): New routine.
14438 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14439 Install appropriate regmap and register set.
14441 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14443 * server.c (gdbserver_version): Update copyright year to 2010.
14444 * gdbreplay.c (gdbreplay_version): Likewise.
14446 2009-12-28 Doug Evans <dje@google.com>
14448 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14449 elf/external.h. Include <elf.h> instead but only if necessary.
14451 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14453 * linux-low.c (linux_remove_process): Remove `detaching'
14454 parameter. Don't release/detach from thread_db here.
14455 (linux_kill): Release/detach from thread_db here, ...
14456 (linux_detach): ... and here, before actually detaching.
14457 (linux_wait_1): ... and here, when a process exits.
14458 * thread-db.c (any_thread_of): New.
14459 (thread_db_free): Switch the current inferior to a thread of the
14462 2009-12-21 Doug Evans <dje@google.com>
14464 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14466 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14467 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14468 warning ifndef __NR_tkill. Move setting of errno there too.
14469 Delete unnecessary resetting of errno after syscall.
14470 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14472 * configure.ac: Check for dladdr.
14473 * config.in: Regenerate.
14474 * configure: Regenerate.
14475 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14476 (try_thread_db_load): Update.
14478 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14480 2009-12-18 Doug Evans <dje@google.com>
14482 * event-loop.c: Include unistd.h if it exists.
14484 * linux-low.c (my_waitpid): Move definition away from being in
14485 between linux_tracefork_child/linux_test_for_tracefork.
14487 * gdb_proc_service.h (psaddr_t): Fix type.
14488 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14489 signature to match glibc.
14491 2009-12-16 Doug Evans <dje@google.com>
14493 * linux-low.c (linux_read_memory): Fix argument to read.
14495 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14497 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14498 events, don't leave current_inferior pointing at null.
14500 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14502 * win32-low.c (LOG): Delete.
14503 (OUTMSG): Output to stderr.
14504 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14505 on compile time LOG macro.
14506 (win32_wait): Fix debug output.
14508 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14510 * win32-low.c (win32_add_one_solib): If the dll name is
14511 "ntdll.dll", prepend the system directory to the dll path.
14513 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14515 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14517 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14518 Vladimir Prus <vladimir@codesourcery.com>
14520 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14521 * configure.ac: Check for __mcoldfire__ and set
14522 gdb_cv_m68k_is_coldfire.
14523 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14524 reg-cf.o and reg-m68k.o.
14525 * configure: Regenerated.
14527 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14529 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14530 Pass it to thread_db_free.
14531 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14532 proper `detaching' argument to linux_remove_process.
14533 * linux-low.h (thread_db_free): Add `detaching' parameter.
14534 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14536 (thread_db_free): Add `detaching' parameter. Only
14537 call td_ta_clear_event if detaching from process.
14539 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14541 * thread-db.c (thread_db_free): Fix typo.
14543 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14546 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14548 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14550 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14551 with an i686 compiler.
14552 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14554 * configure: Rebuilt.
14556 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14560 * server.c (handle_search_memory_1): Correct read_addr initialization
14561 in loop for searching subsequent chunks.
14563 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14565 * configure.ac: New --with-libthread-db option.
14566 * thread-db.c: Allow direct dependence on libthread_db.
14567 (thread_db_free): Adjust.
14568 * config.in: Regenerate.
14569 * configure: Likewise.
14571 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14574 * thread-db.c (attach_thread): New function.
14575 (maybe_attach_thread): Return success/failure.
14576 (find_new_threads_callback): Adjust.
14577 (thread_db_find_new_threads): Loop until no new threads.
14579 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14581 * proc-service.c (ps_lgetregs): Formatting.
14583 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14585 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14586 * configure.ac: Adjust.
14587 * linux-low.h (struct process_info_private): Move members to struct
14589 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14590 * linux-low.c (linux_remove_process): Adjust.
14591 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14592 * server.c (handle_query): Move code ...
14593 (handle_monitor_command): ... here. New function.
14594 * target.h (struct target_ops): New member.
14595 * thread-db.c (struct thread_db): New.
14596 (libthread_db_search_path): New variable.
14597 (thread_db_create_event, thread_db_enable_reporting)
14598 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14599 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14600 (try_thread_db_load_1, dladdr_to_soname): New functions.
14601 (try_thread_db_load, thread_db_load_search): New functions.
14602 (thread_db_init): Search for libthread_db.
14603 (thread_db_free): New function.
14604 (thread_db_handle_monitor_command): Likewise.
14605 * config.in: Regenerate.
14606 * configure: Regenerate.
14608 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14610 * spu-low.c (spu_kill): Wait for inferior to terminate.
14611 Call clear_inferiors.
14612 (spu_detach): Call clear_inferiors.
14614 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14616 * aclocal.m4: Regenerate.
14617 * config.in: Likewise.
14618 * configure: Likewise.
14620 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14622 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14623 (parse_spufs_run): New function.
14624 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14625 (ppc_breakpoint_at): Handle SPU breakpoints.
14627 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14629 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14630 (SPUFS_MAGIC): Define.
14631 (spu_enumerate_spu_ids): New function.
14632 (linux_qxfer_spu): New function.
14633 (linux_target_ops): Install linux_qxfer_spu.
14635 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14637 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14638 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14639 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14640 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14641 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14642 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14643 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14644 (init_registers_powerpc_cell32l): Add prototype.
14645 (init_registers_powerpc_cell64l): Likewise.
14646 (ppc_arch_setup): Detect Cell/B.E. architecture.
14648 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14650 * Makefile.in (datarootdir): New variable.
14652 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14654 * linux-low.c (linux_write_memory): Update debugging output.
14655 * Makefile.in (clean): Add new descriptions.
14656 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14657 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14658 * configure.srv: Add new files for arm*-*-linux*.
14659 * linux-arm-low.c: Add new declarations.
14660 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14661 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14662 (HWCAP_VFPv3D16): New.
14663 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14664 instead of __IWMMXT__.
14665 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14666 (arm_arch_setup): New.
14667 (target_regsets): Remove #ifdef. Add VFP regset.
14668 (the_low_target): Use arm_arch_setup.
14670 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14672 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14673 the main thread again.
14675 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14677 Adding Neutrino gdbserver.
14678 * configure: Regenerated.
14679 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14680 * configure.srv (i[34567]86-*-nto*): New target.
14681 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14682 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14683 (nto_comctrl) [__QNX__]: New function.
14684 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14686 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14688 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14691 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14692 Pedro Alves <pedro@codesourcery.com>
14694 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14695 don't support CONTEXT_EXTENDED_REGISTERS.
14696 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14697 (the_low_target): Install them.
14698 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14699 failing with ERROR_PIPE_NOT_CONNECTED.
14701 2009-06-30 Doug Evans <dje@google.com>
14702 Pierre Muller <muller@ics.u-strasbg.fr>
14704 Add h/w watchpoint support to x86-linux, win32-i386.
14705 * Makefile.in (SFILES): Add i386-low.c
14706 (i386_low_h): Define.
14707 (i386-low.o): Add dependencies.
14708 (linux-x86-low.o): Add i386-low.h dependency.
14709 (win32-i386-low.o): Ditto.
14710 * i386-low.c: New file.
14711 * i386-low.h: New file.
14712 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14713 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14714 * linux-low.c (linux_add_process): Initialize arch_private.
14715 (linux_remove_process): Free arch_private.
14716 (add_lwp): Initialize arch_private.
14717 (delete_lwp): Free arch_private.
14718 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14720 * linux-low.h (process_info_private): New member arch_private.
14721 (lwp_info): New member arch_private.
14722 (linux_target_ops): New members new_process, new_thread,
14724 (ptid_of): New macro.
14725 * linux-x86-low.c: Include stddef.h, i386-low.h.
14726 (arch_process_info): New struct.
14727 (arch_lwp_info): New struct.
14728 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14729 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14730 (i386_dr_low_get_status): New function.
14731 (x86_insert_point, x86_remove_point): New functions.
14732 (x86_stopped_by_watchpoint): New function.
14733 (x86_stopped_data_address): New function.
14734 (x86_linux_new_process, x86_linux_new_thread): New functions.
14735 (x86_linux_prepare_to_resume): New function.
14736 (the_low_target): Add entries for insert_point, remove_point,
14737 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14739 * server.c (debug_hw_points): New global.
14740 (monitor_show_help): Document set debug-hw-points.
14741 (handle_query): Process "set debug-hw-points".
14742 * server.h (debug_hw_points): Declare.
14743 (paddress): Declare.
14744 * utils.c (NUMCELLS, CELLSIZE): New macros.
14745 (get_sell, xsnprintf, paddress): New functions.
14746 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14747 remove_point, stopped_by_watchpoint, stopped_data_address.
14748 * win32-i386-low.c: Include i386-low.h.
14749 (debug_reg_state): Replaces dr.
14750 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14751 (i386_dr_low_get_status): New function.
14752 (i386_insert_point, i386_remove_point): New functions.
14753 (i386_stopped_by_watchpoint): New function.
14754 (i386_stopped_data_address): New function.
14755 (i386_initial_stuff): Update.
14756 (get_thread_context,set_thread_context,i386_thread_added): Update.
14757 (the_low_target): Add entries for insert_point,
14758 remove_point, stopped_by_watchpoint, stopped_data_address.
14759 * win32-low.c (win32_insert_watchpoint): New function.
14760 (win32_remove_watchpoint): New function.
14761 (win32_stopped_by_watchpoint): New function.
14762 (win32_stopped_data_address): New function.
14763 (win32_target_ops): Add entries for insert_watchpoint,
14764 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14765 * win32-low.h (win32_target_ops): New members insert_point,
14766 remove_point, stopped_by_watchpoint, stopped_data_address.
14768 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14770 * server.c (process_serial_event): Re-return unsupported, not
14771 error, if the type isn't recognized. Re-allow supporting only
14772 insert or remove packets. Also call require_running for
14773 breakpoints. Add missing break statement to default case. Tidy.
14774 * target.h (struct target_ops): Rename insert_watchpoint to
14775 insert_point, and remove_watchpoint to remove_point.
14777 * linux-low.h (struct linux_target_ops): Likewise.
14778 * linux-low.c (linux_insert_watchpoint): Rename to ...
14779 (linux_insert_point): ... this. Adjust.
14780 (linux_remove_watchpoint): Rename to ...
14781 (linux_remove_point): ... this. Adjust.
14782 (linux_target_ops): Adjust.
14783 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14784 (cris_insert_point): ... this.
14785 (cris_remove_watchpoint): Rename to ...
14786 (cris_remove_point): ... this.
14787 (the_low_target): Adjust.
14789 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14791 * server.c (handle_v_kill): Pass signal_pid to
14792 kill_inferior if multi_process is zero.
14794 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14796 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14797 * target.h (target_ops): Comment for *_watchpoint to make it clear
14798 the functions can get types '0' and '1'.
14800 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14802 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14803 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14804 * regcache.c (get_regcache): Likewise.
14805 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14806 * win32-low.c (child_fetch_inferior_registers): Remove check for
14809 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14810 Pedro Alves <pedro@codesourcery.com>
14812 * target.h (struct target_ops) <supports_multi_process>: New
14814 (target_supports_multi_process): New.
14815 * server.c (handle_query): Even if GDB reports support, only
14816 enable multi-process if the target also supports it. Report
14817 multi-process support only if the target backend supports it.
14818 * linux-low.c (linux_supports_multi_process): New function.
14819 (linux_target_ops): Install it as target_supports_multi_process
14822 2009-05-24 Doug Evans <dje@google.com>
14824 Global renaming of find_thread_pid to find_thread_ptid.
14825 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14826 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14827 All callers updated.
14829 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14830 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14833 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14834 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14835 (linux_resume_one_lwp): Ditto.
14837 2009-05-23 Doug Evans <dje@google.com>
14839 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14840 from struct inferior_list_entry * to struct lwp_info *.
14841 All callers updated.
14843 2009-05-13 Doug Evans <dje@google.com>
14845 * linux-x86-low.c: Don't include assert.h.
14846 (x86_siginfo_fixup): Use fatal, not assert.
14847 (x86_arch_setup): Fix comment.
14849 2009-05-12 Doug Evans <dje@google.com>
14851 Biarch support for i386/amd64 gdbserver.
14852 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14853 Add linux-x86-low.c.
14854 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14855 (linux-x86-low.o): Add.
14856 * linux-x86-64-low.c: Delete.
14857 * linux-i386-low.c: Delete.
14858 * linux-x86-low.c: New file.
14859 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14861 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14863 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14864 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14865 (linux_child_pid_to_exec_file): New function.
14866 (elf_64_header_p, elf_64_file_p): New functions.
14867 (siginfo_fixup): New function.
14868 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14869 give target a chance to convert layout.
14870 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14871 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14873 2009-05-07 Doug Evans <dje@google.com>
14875 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14876 (regsets_store_inferior_registers): Ditto.
14878 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14882 * linux-low.c (must_set_ptrace_flags): Delete.
14883 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14885 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14886 `lwp->must_set_ptrace_flags' instead.
14887 (linux_wait_for_event_1): Set ptrace options here.
14888 (linux_wait_1): ... not here.
14890 2009-04-30 Doug Evans <dje@google.com>
14892 * inferiors.c (started_inferior_callback): New function.
14893 (attached_inferior_callback): New function.
14894 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14895 * server.c (print_started_pid, print_attached_pid): New functions.
14896 (detach_or_kill_for_exit): New function.
14897 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14898 * server.h (have_started_inferiors_p): Declare.
14899 (have_attached_inferiors_p): Declare.
14901 * inferiors.c (remove_process): Fix memory leak, free process.
14902 * linux-low.c (linux_remove_process): New function.
14903 (linux_kill): Call it instead of remove_process.
14904 (linux_detach, linux_wait_1): Ditto.
14906 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14908 * configure.srv: Add x86 Windows CE target.
14910 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14912 * inferiors.c (get_thread_process): Make global.
14913 * server.h (get_thread_process): Add prototype.
14914 * thread-db.c (find_one_thread): Use get_thread_process
14915 instead of current_process.
14916 (thread_db_get_tls_address): Do not crash if called when
14917 thread layer is not yet initialized.
14919 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14921 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14922 * spu-low.c (current_tid): Rename to ...
14923 (current_ptid): ... this.
14924 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14925 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14926 ptid_get_lwp (current_ptid) instead of current_tid.
14927 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14928 instead of current_tid. Use find_process_pid to verify pid
14929 argument is valid. Pass proper argument to remove_process.
14930 (spu_thread_alive): Compare current_ptid instead of current_tid.
14931 (spu_resume): Likewise.
14933 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14935 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14938 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14940 Implement the multiprocess extensions, and add linux multiprocess
14943 * server.h (ULONGEST): Declare.
14944 (struct ptid, ptid_t): New.
14945 (minus_one_ptid, null_ptid): Declare.
14946 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14947 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14948 (struct inferior_list_entry): Change `id' type from unsigned from
14950 (struct sym_cache, struct breakpoint, struct
14951 process_info_private): Forward declare.
14952 (struct process_info): Declare.
14953 (current_process): Declare.
14954 (all_processes): Declare.
14955 (initialize_inferiors): Declare.
14956 (add_thread): Adjust to use ptid_t.
14957 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14958 (add_process, remove_process, find_thread_pid): Declare.
14959 (find_inferior_id): Adjust to use ptid_t.
14960 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14961 (multi_process): Declare.
14962 (push_event): Adjust to use ptid_t.
14963 (read_ptid, write_ptid): Declare.
14964 (prepare_resume_reply): Adjust to use ptid_t.
14965 (clear_symbol_cache): Declare.
14966 * inferiors.c (all_processes): New.
14967 (null_ptid, minus_one_ptid): New.
14968 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14969 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14970 (add_thread): Change unsigned long to ptid. Remove gdb_id
14972 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14973 (gdb_id_to_thread): Rename to ...
14974 (find_thread_pid): ... this. Change unsigned long to ptid.
14975 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14976 (loaded_dll, pull_pid_from_list): Adjust.
14977 (add_process, remove_process, find_process_pid)
14978 (get_thread_process, current_process, initialize_inferiors): New.
14979 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14980 (struct target_waitstatus) <related_pid>: Ditto.
14981 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14982 return type to int.
14983 (struct target_ops) <join>: Add `pid' argument.
14984 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14985 (struct target_ops) <wait>: Add `ptid' field. Change return type
14987 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14988 (mywait): Add `ptid' argument. Change return type to ptid_t.
14989 (target_pid_to_str): Declare.
14990 * target.c (set_desired_inferior): Adjust to use ptids.
14991 (mywait): Add new `ptid' argument. Adjust.
14992 (target_pid_to_str): New.
14993 * mem-break.h (free_all_breakpoints): Declare.
14994 * mem-break.c (breakpoints): Delelete.
14995 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14996 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14997 to use per-process breakpoint list.
14998 (free_all_breakpoints): New.
14999 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15000 (symbol_cache, all_symbols_looked_up): Delete.
15002 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15004 (prepare_resume_reply): Change ptid argument's type from unsigned
15005 long to ptid_t. Adjust. Implement W;process and X;process.
15006 (free_sym_cache, clear_symbol_cache): New.
15007 (look_up_one_symbol): Adjust to per-process symbol cache. *
15008 * server.c (cont_thread, general_thread, step_thread): Change type
15010 (attached): Delete.
15011 (multi_process): New.
15012 (last_ptid): Change type to ptid_t.
15013 (struct vstop_notif) <ptid>: Change type to ptid_t.
15014 (queue_stop_reply, push_event): Change `ptid' argument's type to
15016 (discard_queued_stop_replies): Add `pid' argument.
15017 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15018 changes. Don't reference the `attached' global.
15019 (attach_inferior): Adjust to mywait interface changes.
15020 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15021 features. Handle and report "multiprocess+". Handle
15023 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15025 (handle_v_kill): New.
15026 (handle_v_stopped): Adjust to use target_pid_to_str.
15027 (handle_v_requests): Allow multiple attaches and runs when
15028 multiprocess extensions are in effect. Handle "vKill".
15029 (myresume): Adjust to use ptids.
15030 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15031 (handle_status): Adjust to discard_queued_stop_replies interface
15033 (first_thread_of, kill_inferior_callback)
15034 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15035 (main): Call initialize_inferiors. Adjust to use ptids, killing
15036 and detaching from all inferiors. Handle multiprocess packet
15038 * linux-low.h: Include gdb_proc_service.h.
15039 (struct process_info_private): New.
15040 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15041 <lwpid_of>: Use ptid_get_lwp.
15042 (get_lwp_thread): Adjust.
15043 (struct lwp_info): Add `dead' member.
15044 (find_lwp_pid): Declare.
15045 * linux-low.c (thread_db_active): Delete.
15046 (new_inferior): Adjust comment.
15047 (inferior_pid): Delete.
15048 (linux_add_process): New.
15049 (handle_extended_wait): Adjust.
15050 (add_lwp): Change unsigned long to ptid.
15051 (linux_create_inferior): Add process to processes table. Adjust
15052 to use ptids. Don't set new_inferior here.
15053 (linux_attach_lwp): Rename to ...
15054 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15055 it. Adjust to use ptids.
15056 (linux_attach_lwp): New.
15057 (linux_attach): Add process to processes table. Don't set
15059 (struct counter): New.
15060 (second_thread_of_pid_p, last_thread_of_process_p): New.
15061 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15062 multiple processes.
15063 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15064 processes. Remove process from process table.
15065 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15066 to multiple processes.
15067 (any_thread_of): New.
15068 (linux_detach): Add `pid' argument, and handle it. Remove process
15069 from processes table.
15070 (linux_join): Add `pid' argument. Handle it.
15071 (linux_thread_alive): Change unsighed long argument to ptid_t.
15072 Consider dead lwps as not being alive.
15073 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15074 threads we're not interested in.
15075 (same_lwp, find_lwp_pid): New.
15076 (linux_wait_for_lwp): Change `pid' argument's type from int to
15078 (linux_wait_for_event): Rename to ...
15079 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15080 from int to ptid_t. Adjust.
15081 (linux_wait_for_event): New.
15082 (linux_wait_1): Add `ptid' argument. Change return type to
15083 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15084 that exit from the process table.
15085 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15087 (mark_lwp_dead): New.
15088 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15089 stopping all threads, mark its main lwp as dead.
15090 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15092 (fetch_register, usr_store_inferior_registers)
15093 (regsets_fetch_inferior_registers)
15094 (regsets_store_inferior_registers, linux_read_memory)
15095 (linux_write_memory): Inline `inferior_pid'.
15096 (linux_look_up_symbols): Adjust to use per-process
15097 `thread_db_active'.
15098 (linux_request_interrupt): Adjust to use ptids.
15099 (linux_read_auxv): Inline `inferior_pid'.
15100 (initialize_low): Don't reference thread_db_active.
15101 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15102 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15103 (ps_getpid): Return the pid of the current inferior.
15104 * thread-db.c (proc_handle, thread_agent): Delete.
15105 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15107 (find_one_thread): Change argument type to ptid_t. Adjust to
15109 (maybe_attach_thread): Adjust to per-process data and ptids.
15110 (thread_db_find_new_threads): Ditto.
15111 (thread_db_init): Ditto.
15112 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15113 processes table. Adjust to use ptids.
15114 (spu_kill, spu_detach): Adjust interface. Remove process from
15116 (spu_join, spu_thread_alive): Adjust interface.
15117 (spu_wait): Adjust interface. Remove process from processes
15118 table. Adjust to use ptids.
15119 * win32-low.c (current_inferior_tid): Delete.
15120 (current_inferior_ptid): New.
15121 (debug_event_ptid): New.
15122 (thread_rec): Take a ptid. Adjust.
15123 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15124 (child_delete_thread): Ditto.
15125 (do_initial_child_stuff): Add `attached' argument. Add process to
15127 (child_fetch_inferior_registers, child_store_inferior_registers):
15129 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15130 (win32_attach): Pass 1 to do_initial_child_stuff.
15131 (win32_kill): Adjust interface. Remove process from processes
15133 (win32_detach): Ditto.
15134 (win32_join): Adjust interface.
15135 (win32_thread_alive): Take a ptid.
15136 (win32_resume): Adjust to use ptids.
15137 (get_child_debug_event): Ditto.
15138 (win32_wait): Adjust interface. Remove exiting process from
15141 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15143 Non-stop mode support.
15145 * server.h (non_stop): Declare.
15146 (gdb_client_data, handler_func): Declare.
15147 (delete_file_handler, add_file_handler, start_event_loop):
15149 (handle_serial_event, handle_target_event, push_event)
15150 (putpkt_notif): Declare.
15151 * target.h (enum resume_kind): New.
15152 (struct thread_resume): Replace `step' field by `kind' field.
15153 (TARGET_WNOHANG): Define.
15154 (struct target_ops) <wait>: Add `options' argument.
15155 <supports_non_stop, async, start_non_stop>: New fields.
15156 (target_supports_non_stop, target_async): New.
15157 (start_non_stop): Declare.
15158 (mywait): Add `options' argument.
15159 * target.c (mywait): Add `options' argument. Print child exit
15160 notifications here.
15161 (start_non_stop): New.
15162 * server.c (non_stop, own_buf, mem_buf): New globals.
15163 (struct vstop_notif): New.
15164 (notif_queue): New global.
15165 (queue_stop_reply, push_event, discard_queued_stop_replies)
15166 (send_next_stop_reply): New.
15167 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15169 (attach_inferior): In non-stop mode, don't wait for the target
15171 (handle_general_set): Handle QNonStop.
15172 (handle_query): When handling qC, return the current general
15173 thread, instead of the first thread of the list.
15174 (handle_query): If the backend supports non-stop mode, include
15175 QNonStop+ in the qSupported query response.
15176 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15178 (handle_v_attach, handle_v_run): Handle non-stop mode.
15179 (handle_v_stopped): New.
15180 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15181 (myresume): Adjust to use resume_kind. Handle non-stop.
15182 (queue_stop_reply_callback): New.
15183 (handle_status): Handle non-stop mode.
15184 (main): Clear non_stop flag on reconnection. Use the event-loop.
15185 Refactor serial protocol handling from here ...
15186 (process_serial_event): ... to this new function. When GDB
15187 selects any thread, select one here. In non-stop mode, wait until
15188 GDB acks all pending events before exiting.
15189 (handle_serial_event, handle_target_event): New.
15190 * remote-utils.c (remote_open): Install remote_desc in the event
15192 (remote_close): Remove remote_desc from the event loop.
15193 (putpkt_binary): Rename to...
15194 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15195 (putpkt_binary): New as wrapper around putpkt_binary_1.
15196 (putpkt_notif): New.
15197 (prepare_resume_reply): In non-stop mode, don't change the
15199 * event-loop.c: New.
15200 * Makefile.in (OBJ): Add event-loop.o.
15201 (event-loop.o): New rule.
15203 * linux-low.h (pid_of): Moved here.
15205 (get_lwp_thread): Use lwpid_of.
15206 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15207 * linux-low.c (pid_of): Delete.
15208 (inferior_pid): Use lwpid_of.
15209 (linux_event_pipe): New.
15210 (target_is_async_p): New.
15212 (handle_extended_wait): Use lwpid_of.
15213 (add_lwp): Don't set lwpid field.
15214 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15215 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15216 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15217 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15218 first. Adjust to linux_wait_for_event interface changes. Use
15220 (linux_detach): Don't delete the main lwp here.
15221 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15222 (status_pending_p): Don't consider explicitly suspended lwps.
15223 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15224 pointer. Add OPTIONS argument. Change return type to int. Use
15225 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15226 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15227 pointer. Add status pointer argument. Return a pid instead of a
15228 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15229 changes. In non-stop mode, don't switch to a random thread.
15230 (linux_wait): Rename to...
15231 (linux_wait_1): ... this. Add target_options argument, and handle
15232 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15233 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15234 clean exit and signal exit code. Don't stop all threads in
15235 non-stop mode. In all-stop mode, only stop all threads when
15236 reporting a stop to GDB. Handle explicit thread stop requests.
15237 (async_file_flush, async_file_mark): New.
15239 (send_sigstop): Use lwpid_of.
15240 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15241 interface changes. In non-stop mode, don't switch to a random
15243 (linux_resume_one_lwp): Use lwpid_of.
15244 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15245 (linux_resume_one_thread): ... this. Handle resume_stop. In
15246 non-stop mode, don't look for pending flag in all threads.
15247 (resume_status_pending_p): Don't consider explicitly suspended
15249 (my_waitpid): Reimplement. Emulate __WALL.
15250 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15252 (sigchld_handler, linux_supports_non_stop, linux_async)
15253 (linux_start_non_stop): New.
15254 (linux_target_ops): Register linux_supports_non_stop, linux_async
15255 and linux_start_non_stop.
15256 (initialize_low): Install SIGCHLD handler.
15257 * thread-db.c (thread_db_create_event, find_one_thread)
15258 (thread_db_get_tls_address): Use lwpid_of.
15259 * win32-low.c (win32_detach): Adjust to use resume_kind.
15260 (win32_wait): Add `options' argument.
15261 * spu-low.c (spu_resume): Adjust to use resume_kind.
15262 (spu_wait): Add `options' argument.
15264 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15266 Decouple target code from remote protocol.
15268 * target.h (enum target_waitkind): New.
15269 (struct target_waitstatus): New.
15270 (struct target_ops) <wait>: Return an unsigned long. Take a
15271 target_waitstatus pointer instead of a char pointer.
15272 (mywait): Likewise.
15273 * target.c (mywait): Change prototype to return an unsigned long.
15274 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15275 * server.h (thread_from_wait, old_thread_from_wait): Delete
15277 (prepare_resume_reply): Change prototype to take a
15279 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15280 (last_status, last_ptid): New.
15281 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15282 pid instead of a signal.
15283 (attach_inferior): Remove "status" and "signal" parameters.
15285 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15287 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15288 (handle_v_requests, myresume): Remove "status" and "signal"
15289 parameters. Adjust.
15290 (handle_status): New.
15291 (main): Delete local `status'. Adjust.
15292 * remote-utils.c: Include target.h.
15293 (prepare_resume_reply): Change prototype to take a
15294 target_waitstatus. Adjust.
15296 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15298 * spu-low.c (spu_wait): Adjust.
15299 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15301 (win32_wait): Adjust.
15303 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15305 * target.h (struct thread_resume): Delete leave_stopped member.
15306 (struct target_ops): Add a `n' argument to the `resume' callback.
15307 * server.c (start_inferior): Adjust.
15308 (handle_v_cont, myresume): Adjust.
15309 * linux-low.c (check_removed_breakpoint): Adjust to resume
15310 interface change, and to removed leave_stopped field.
15311 (resume_ptr): Delete.
15312 (struct thread_resume_array): New.
15313 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15314 resume interface change.
15315 (linux_continue_one_thread, linux_queue_one_thread)
15316 (resume_status_pending_p): Check if the resume field is NULL
15317 instead of checking the leave_stopped member.
15318 (linux_resume): Adjust to the target resume interface change.
15319 * spu-low.c (spu_resume): Adjust to the target resume interface
15321 * win32-low.c (win32_detach, win32_resume): Ditto.
15323 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15325 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15327 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15329 (linux_continue_one_thread): Only preserve the stepping flag if
15330 there's a pending breakpoint.
15332 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15334 * server.c (main): After the inferior having exited, call
15335 remote_close before exiting gdbserver.
15337 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15339 Fix size of FPSCR in Power 7 processors.
15340 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15341 (PPC_FEATURE_HAS_DFP): New #define.
15342 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15345 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15347 * server.c (handle_query) Whitespace and formatting.
15349 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15351 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15352 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15353 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15354 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15355 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15356 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15357 Makefile.in, configure.ac: Fix whitespace throughout.
15358 * configure: Regenerate.
15360 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15362 * inferiors.c (find_inferior): Make it safe for the callback
15363 function to delete the currently iterated inferior.
15365 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15367 * Makefile.in (linuw_low_h): Move higher.
15368 (thread-db.o): Depend on $(linux_low_h).
15370 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15372 Rename "process" to "lwp" throughout.
15374 * linux-low.c (all_processes): Rename to...
15375 (all_lwps): ... this.
15376 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15377 (add_process): Rename to ...
15378 (add_lwp): ... this. Adjust.
15379 (linux_create_inferior): Adjust.
15380 (linux_attach_lwp): Adjust.
15381 (linux_attach): Adjust.
15382 (linux_kill_one_process): Rename to ...
15383 (linux_kill_one_lwp): ... this. Adjust.
15384 (linux_kill): Adjust.
15385 (linux_detach_one_process): Rename to ...
15386 (linux_detach_one_lwp): ... this. Adjust.
15387 (linux_detach): Adjust.
15388 (check_removed_breakpoint): Adjust.
15389 (status_pending_p): Adjust.
15390 (linux_wait_for_process): Rename to ...
15391 (linux_wait_for_lwp): ... this. Adjust.
15392 (linux_wait_for_event): Adjust.
15393 (send_sigstop): Adjust.
15394 (wait_for_sigstop): Adjust.
15395 (stop_all_processes): Rename to ...
15396 (stop_all_lwps): ... this.
15397 (linux_resume_one_process): Rename to ...
15398 (linux_resume_one_lwp): ... this. Adjust.
15399 (linux_set_resume_request, linux_continue_one_thread)
15400 (linux_queue_one_thread, resume_status_pending_p)
15401 (usr_store_inferior_registers, regsets_store_inferior_registers)
15402 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15404 * linux-low.h (get_process): Rename to ...
15405 (get_lwp): ... this. Adjust.
15406 (get_thread_process): Rename to ...
15407 (get_thread_lwp): ... this. Adjust.
15408 (get_process_thread): Rename to ...
15409 (get_lwp_thread): ... this. Adjust.
15410 (struct process_info): Rename to ...
15411 (struct lwp_info): ... this.
15412 (all_processes): Rename to ...
15413 (all_lwps): ... this.
15414 * proc-service.c (ps_lgetregs): Adjust.
15415 * thread-db.c (thread_db_create_event, find_one_thread)
15416 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15418 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15420 * server.c (handle_query): Handle "qAttached".
15422 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15424 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15425 GPLv3, update license URL.
15427 2009-03-01 Doug Evans <dje@google.com>
15429 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15430 (server_h): Add gdb_signals.h.
15431 (signals.o): Update.
15432 * server.h (target_signal_from_host,target_signal_to_host_p)
15433 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15435 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15437 * remote-utils.c (getpkt): Also generate remote-debug
15438 information if noack_mode is set.
15440 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15442 * server.c (handle_query): Report qXfer:siginfo:read and
15443 qXfer:siginfo:write as supported and handle them.
15444 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15445 * linux-low.c (linux_xfer_siginfo): New.
15446 (linux_target_ops): Set it.
15448 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15450 * server.c (gdbserver_usage): Mention --remote-debug.
15451 (main): Accept '--remote-debug' switch.
15453 2009-01-18 Doug Evans <dje@google.com>
15455 * regcache.c (new_register_cache): No need to check result of xcalloc.
15456 * server.c (handle_search_memory): Back out calls to xmalloc,
15457 result is checked and error is returned to user upon failure.
15458 (handle_query): Ditto. Add more checks for result of malloc.
15459 (handle_v_cont): Check result of malloc, report error back to
15461 (handle_v_run): Ditto. Call freeargv.
15462 * server.h (freeargv): Declare.
15463 * utils.c (freeargv): New fn.
15465 2009-01-15 Doug Evans <dje@google.com>
15467 * gdbreplay.c (perror_with_name): Make arg const char *.
15468 * server.h (target_signal_to_name): Make return type const char *.
15469 * thread-db.c (thread_db_err_str): Make return type const char *.
15470 * utils.c (perror_with_name): Make arg const char *.
15472 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15474 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15475 when handling a EXIT_PROCESS_DEBUG_EVENT.
15477 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15479 * gdbreplay.c (gdbreplay_version): Update copyright year.
15480 * server.c (gdbserver_version): Likewise.
15482 2009-01-05 Doug Evans <dje@google.com>
15484 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15485 (handle_extended_wait): Improve comment.
15487 2008-12-13 Doug Evans <dje@google.com>
15489 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15490 * server.h (ATTR_MALLOC): New macro.
15491 (xmalloc,xcalloc,xstrdup): Declare.
15492 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15493 * inferiors.c: Ditto.
15494 * linux-low.c: Ditto.
15495 * mem-break.c: Ditto.
15496 * regcache.c: Ditto.
15497 * remote-utils.c: Ditto.
15500 * win32-low.c: Ditto.
15502 2008-12-12 Doug Evans <dje@google.com>
15504 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15505 in debugging printf.
15507 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15509 2008-12-09 Doug Evans <dje@google.com>
15511 * linux-low.h (struct process_info): Delete member tid, unused.
15512 * thread-db.c (find_one_thread): Update.
15513 (maybe_attach_thread): Update.
15515 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15517 * target.h (struct target_ops): Add qxfer_osdata member.
15518 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15520 (linux_qxfer_osdata): New functions.
15521 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15523 * server.c (handle_query): Handle "qXfer:osdata:read:".
15524 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15525 (buffer_xml_printf): New functions.
15526 * server.h (struct buffer): New.
15527 (buffer_grow_str, buffer_grow_str0): New macros.
15528 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15529 (buffer_xml_printf): Declare.
15531 2008-11-24 Doug Evans <dje@google.com>
15533 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15535 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15537 * server.c (handle_v_run): Always use the supplied argument list.
15539 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15541 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15542 (xtensa_regmap_table): Add entry for scompare1.
15544 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15546 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15547 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15548 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15549 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15550 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15551 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15552 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15553 XML target descriptions.
15554 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15555 when inferior is running on an ISA 2.05 or later processor. Add
15556 special case to return offset for full 64-bit slot of FPSCR when
15559 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15561 * Makefile.in (SFILES, clean): Added sparc64 files.
15562 (reg-sparc64.o, reg-sparc64.c): New.
15563 * configure.srv (sparc*-*-linux*): New configuration.
15564 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15565 syscall arguments for SPARC.
15566 (regsets_store_inferior_registers): Likewise.
15567 * linux-sparc-low.c: New file.
15569 2008-10-21 Doug Evans <dje@google.com>
15571 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15572 (READLINE_DIR,READLINE_DEP): Delete.
15573 (INTERNAL_CFLAGS): Update.
15574 (LINTFLAGS): Update.
15576 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15578 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15579 whole argv from the last run, not just argv[0].
15581 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15583 * regcache.c (new_register_cache): Return NULL if the register
15584 cache size isn't known yet.
15585 (free_register_cache): Avoid dereferencing a NULL regcache.
15587 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15589 * configure.srv: Merge MIPS and MIPS64.
15591 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15593 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15595 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15597 * Makefile.in: Add required vsx dependencies.
15599 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15600 Declare init_registers_powerpc_vsx32l.
15601 Declare init_registers_powerpc_vsx64l.
15602 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15603 (ppc_arch_setup): Check for VSX in hwcap.
15604 (ppc_fill_vsxregset): New function.
15605 (ppc_store_vsxregset): New function.
15606 Add new VSX entry in regset_info target_regsets.
15608 * configure.srv: Add new VSX dependencies.
15610 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15612 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15613 (remote_open): Set or clear transport_is_reliable.
15614 (putpkt_binary): Don't expect acks in noack mode.
15615 (getpkt): Don't send ack/nac in noack mode.
15616 * server.c (handle_general_set): Handle QStartNoAckMode.
15617 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15619 (main): Reset noack_mode on every connection.
15620 * server.h (noack_mode): Declare.
15622 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15624 * Makefile.in (GDBREPLAY_OBS): New variable.
15625 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15627 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15628 Daniel Jacobowitz <dan@codesourcery.com>
15630 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15631 (usr_store_inferior_registers): Likewise.
15632 (regsets_store_inferior_registers): Likewise.
15634 2008-07-31 Rolf Jansen <rj@surtec.com>
15635 Pedro Alves <pedro@codesourcery.com>
15637 * configure.ac: Check for memmem declaration.
15638 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15639 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15640 (disable_packet_qfThreadInfo): Unconditionally compile.
15641 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15642 * configure, config.in: Regenerate.
15644 2008-07-28 Doug Kwan <dougkwan@google.com>
15646 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15647 (linux_write_memory): Remove declaration of errno.
15649 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15651 * linux-low.c (handle_extended_wait): Do not use "status"
15652 variable uninitialized.
15654 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15656 * server.c (handle_v_attach): Inhibit reporting dll changes.
15658 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15660 * remote-utils.c (prepare_resume_reply): If requested, don't
15661 output "thread:TID" in the T stop reply.
15663 * server.c (disable_packet_vCont, disable_packet_Tthread)
15664 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15665 (handle_query): If requested, disable support for qC, qfThreadInfo
15667 (handle_v_requests): If requested, disable support for vCont.
15668 (gdbserver_show_disableable): New.
15669 (main): Handle --disable-packet and --disable-packet=LIST.
15671 * server.h (disable_packet_vCont, disable_packet_Tthread)
15672 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15674 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15676 * server.c (gdbserver_usage): Mention --version.
15678 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15680 * Makefile.in (gdbreplay.o): New rule.
15682 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15684 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15685 message, not gdbserver.
15687 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15688 Nathan Sidwell <nathan@codesourcery.com>
15689 Joseph Myers <joseph@codesourcery.com>
15691 * acinclude.m4: Include ../../config/acx.m4.
15692 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15693 * configure, config.in: Regenerate.
15694 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15695 * server.c (gdbserver_version): Print PKGVERSION.
15696 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15697 (main): Adjust gdbserver_usage calls.
15698 * gdbreplay.c (version, host_name): Add declarations.
15699 (gdbreplay_version, gdbreplay_usage): New.
15700 (main): Accept --version and --help options.
15702 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15704 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15705 (arm_breakpoint_at): Handle Thumb.
15706 (the_low_target): Add comment.
15708 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15710 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15712 2008-05-09 Doug Evans <dje@google.com>
15714 * server.h (decode_search_memory_packet): Declare.
15715 * remote-utils.c (decode_search_memory_packet): New fn.
15716 * server.c (handle_search_memory_1): New fn.
15717 (handle_search_memory): New fn.
15718 (handle_query): Process qSearch:memory packets.
15720 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15722 * regcache.c (registers_length): Remove.
15723 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15724 full register packet.
15725 * regcache.h (registers_length): Remove prototype.
15726 * server.h (PBUFSIZ): Define to 16384.
15728 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15730 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15731 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15732 powerpc-64l.o, and powerpc-altivec64l.o.
15733 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15734 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15735 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15736 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15737 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15740 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15741 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15742 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15743 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15744 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15745 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15746 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15747 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15748 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15749 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15752 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15753 (init_registers_powerpc_32l): ... this new prototype.
15754 (init_registers_powerpc_32): Remove, replace by ...
15755 (init_registers_powerpc_altivec32l): ... this new prototype.
15756 (init_registers_powerpc_e500): Remove, replace by ...
15757 (init_registers_powerpc_e500l): ... this new prototype.
15758 (init_registers_ppc64): Remove, replace by ...
15759 (init_registers_powerpc_64l): ... this new prototype.
15760 (init_registers_powerpc_64): Remove, replace by ...
15761 (init_registers_powerpc_altivec64l): ... this new prototype.
15762 (ppc_num_regs): Set to 73.
15763 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15764 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15765 (ppc_cannot_store_register): Handle orig_r3 and trap.
15766 (ppc_arch_setup): Update init_registers_... calls.
15767 (ppc_fill_gregset): Handle orig_r3 and trap.
15769 * inferiors.c (clear_inferiors): Reset current_inferior.
15771 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15773 * acinclude.m4: Add override.m4.
15774 * configure: Regenerate.
15776 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15778 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15779 initial call to init_register_ppc64.
15781 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15783 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15784 single powerpc*-*-linux* case.
15785 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15787 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15789 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15790 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15792 * linux-ppc-low.c: Include <elf.h>.
15793 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15794 (ppc_hwcap): New global variable.
15795 (ppc_regmap): Remove __SPE__ #ifdef sections.
15796 (ppc_regmap_e500): New global variable.
15797 (ppc_cannot_store_register): Update __SPE__ special case.
15798 (ppc_get_hwcap): New function.
15799 (ppc_arch_setup): Use it to determine whether inferior supports
15800 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15801 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15802 Do not access registers if target does not support AltiVec.
15803 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15804 Do not access registers if target does not support SPE.
15805 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15807 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15809 * linux-low.c (disabled_regsets, num_regsets): New.
15810 (use_regsets_p): Delete.
15811 (linux_wait_for_process): Clear disabled_regsets.
15812 (regsets_fetch_inferior_registers): Check and set it.
15813 (regsets_store_inferior_registers): Likewise.
15814 (linux_fetch_registers, linux_store_registers): Do not use
15816 (initialize_low): Allocate disabled_regsets.
15818 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15820 * Makefile.in (LIBOBJS): New.
15821 (OBS): Use LIBOBJS.
15822 (memmem.o): New rule.
15823 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15824 * configure: Regenerated.
15826 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15828 * server.c (handle_query): Never return "unsupported" for
15829 qXfer:features:read queries.
15831 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15833 * server.c (get_features_xml): Fix inverted condition.
15834 (handle_query): Always support qXfer:feature:read.
15836 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15838 * server.c (wrapper_argv): New.
15839 (start_inferior): Handle wrapper_argv. If set, expect an extra
15841 (gdbserver_usage): Document --wrapper.
15842 (main): Parse --wrapper.
15844 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15846 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15847 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15848 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15849 (ppc_set_pc): Likewise.
15850 (ppc_arch_setup): New function.
15851 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15852 of collect_register.
15853 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15855 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15857 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15858 instead of linux-ppc64-low.o.
15859 * linux-ppc64-low.c: Remove file.
15860 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15861 (linux-ppc64-low.o): Remove rule.
15863 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15864 (init_registers_powerpc_64): Likewise.
15865 (ppc_regmap): Conditionally define depending on __powerpc64__.
15866 (ppc_cannot_store_register): Do not special-case "fpscr" when
15867 compiled on __powerpc64__.
15868 (ppc_collect_ptrace_register): New function.
15869 (ppc_supply_ptrace_register): New function.
15870 (ppc_breakpoint): Change type to "unsigned int".
15871 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15872 (the_low_target): Conditionally provide initializers for the
15873 arch_setup member depending on __powerpc64__. Install
15874 collect_ptrace_register and supply_ptrace_register members.
15876 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15878 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15879 * server.c (gdbserver_xmltarget): Define.
15880 (get_features_xml): Use it to replace "target.xml" and arch_string.
15882 * configure.srv: Remove srv_xmltarget. Add XML files that were
15883 mentioned there to srv_xmlfiles instead. Remove conditional tests
15884 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15885 srv_xmlfiles and srv_regobj to include all possible choices.
15886 * configure.ac (srv_xmltarget): Remove.
15887 (srv_xmlfiles): Do not add "target.xml".
15888 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15889 checks for supplementary target information.
15890 * configure: Regenerate.
15891 * Makefile.in (XML_TARGET): Remove.
15892 (target.xml): Remove rule.
15893 (clean): Do not clean up target.xml.
15894 (.PRECIOUS): Do not mention target.xml.
15896 * target.h (struct target_ops): Remove arch_string member.
15897 * linux-low.c (linux_arch_string): Remove.
15898 (linux_target_ops): Remove arch_string initializer.
15899 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15900 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15901 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15902 * spu-low.c (spu_arch_string): Remove.
15903 (spu_target_ops): Remove arch_string initializer.
15904 * win32-low.c (win32_arch_string): Remove.
15905 (win32_target_ops): Remove arch_string initializer.
15906 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15907 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15908 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15910 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15912 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15913 by collect_ptrace_register and supply_ptrace_register hooks.
15914 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15915 instead of checking for the_low_target.left_pad_xfer.
15916 (usr_store_inferior_registers): Use collect_ptrace_register callback
15917 instead of checking for the_low_target.left_pad_xfer.
15919 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15920 (s390_supply_ptrace_register): Likewise.
15921 (s390_fill_gregset): Call s390_collect_ptrace_register.
15922 (the_low_target): Update.
15924 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15925 (ppc_supply_ptrace_register): Likewise.
15926 (the_low_target): Update.
15928 * linux-i386-low.c (the_low_target): Update.
15929 * linux-x86-64-low.c (the_low_target): Update.
15931 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15933 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15934 reg-s390.o and reg-s390x.o.
15936 * linux-low.c (new_inferior): New global variable.
15937 (linux_create_inferior, linux_attach): Set it.
15938 (linux_wait_for_process): Call the_low_target.arch_setup after the
15939 target has stopped for the first time.
15940 (initialize_low): Do not call the_low_target.arch_setup.
15942 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15943 (s390_set_pc): Likewise.
15944 (s390_arch_setup): New function.
15945 (the_low_target): Use s390_arch_setup as arch_setup routine.
15947 * regcache.c (realloc_register_cache): New function.
15948 (set_register_cache): Call it for each existing regcache.
15950 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15952 * server.h (init_registers): Remove prototype.
15954 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15955 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15956 instead of init_registers ().
15957 * linux-arm-low.c (init_registers_arm): Add prototype.
15958 (init_registers_arm_with_iwmmxt): Likewise.
15959 (the_low_target): Add initializer for arch_setup field.
15960 * linux-cris-low.c (init_registers_cris): Add prototype.
15961 (the_low_target): Add initializer for arch_setup field.
15962 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15963 (the_low_target): Add initializer for arch_setup field.
15964 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15965 (the_low_target): Add initializer for arch_setup field.
15966 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15967 (the_low_target): Add initializer for arch_setup field.
15968 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15969 (the_low_target): Add initializer for arch_setup field.
15970 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15971 (the_low_target): Add initializer for arch_setup field.
15972 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15973 (init_registers_mips64_linux): Likewise.
15974 (the_low_target): Add initializer for arch_setup field.
15975 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15976 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15977 (the_low_target): Add initializer for arch_setup field.
15978 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15979 (init_registers_powerpc_64): Likewise.
15980 (the_low_target): Add initializer for arch_setup field.
15981 * linux-s390-low.c (init_registers_s390): Add prototype.
15982 (init_registers_s390x): Likewise.
15983 (the_low_target): Add initializer for arch_setup field.
15984 * linux-sh-low.c (init_registers_sh): Add prototype.
15985 (the_low_target): Add initializer for arch_setup field.
15986 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15987 (the_low_target): Add initializer for arch_setup field.
15988 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15989 (the_low_target): Add initializer for arch_setup field.
15991 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15992 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15993 instead of init_registers ().
15994 * win32-arm-low.c (init_registers_arm): Add prototype.
15995 (the_low_target): Add initializer for arch_setup field.
15996 * win32-i386-low.c (init_registers_i386): Add prototype.
15997 (the_low_target): Add initializer for arch_setup field.
15999 * spu-low.c (init_registers_spu): Add prototype.
16000 (initialize_low): Call initialie_registers_spu () instead of
16001 initialize_registers ().
16003 2008-02-19 Pedro Alves <pedro@codesourcery.com>
16005 * server.c (handle_v_requests): When handling the vRun and vAttach
16006 packets, if already debugging a process, don't kill it. Return an
16009 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16011 * server.c (handle_query): Correct length check.
16013 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16015 * win32-low.c (do_initial_child_stuff): Add process handle
16016 parameter. Set current_process_handle and current_process_id from the
16017 parameters. Clear globals.
16018 (win32_create_inferior): Don't set current_process_handle and
16019 current_process_id here. Instead pass them on the call to
16020 do_initial_child_stuff.
16021 (win32_attach): Likewise.
16022 (win32_clear_inferiors): New.
16023 (win32_kill): Don't close the current process handle or the
16024 current thread handle here. Instead call win32_clear_inferiors.
16025 (win32_detach): Don't open a new handle to the process. Call
16026 win32_clear_inferiors.
16027 (win32_join): Don't rely on current_process_handle; open a new
16028 handle using the process id.
16029 (win32_wait): Call win32_clear_inferiors when the inferior process
16032 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16034 * server.c (monitor_show_help): Add "exit".
16036 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16038 * Makefile.in (SFILES): Add linux-xtensa-low.c.
16039 (clean): Add reg-xtensa.c.
16040 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
16041 * configure.srv (xtensa*-*-linux*) New target.
16042 * linux-xtensa-low.c: New.
16043 * xtensa-xtregs.c: New.
16045 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16047 * hostio.c: Don't include errno.h.
16048 (errno_to_fileio_errno): Move to hostio-errno.
16049 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16050 error number outputting to the target->hostio_last_error callback.
16051 (hostio_packet_error): Use FILEIO_EINVAL directly.
16052 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16053 calls to hostio_error.
16054 * hostio-errno.c: New.
16055 * server.h (hostio_last_error_from_errno): Declare.
16056 * target.h (target_ops): Add hostio_last_error member.
16057 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16058 as hostio_last_error handler.
16059 * spu-low.c (spu_target_ops): Likewise.
16060 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16061 (wince_hostio_last_error): New functions.
16062 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16063 as hostio_last_error handler.
16064 (win32_target_ops) [!_WIN32_WCE]: Register
16065 hostio_last_error_from_errno as hostio_last_error handler.
16066 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16067 (hostio-errno.o): New rule.
16068 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16069 * configure.srv (srv_hostio_err_objs): New variable. Default to
16071 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16072 * configure: Regenerate.
16074 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16076 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16077 (linux_kill, linux_detach): Clean up the process list.
16078 * remote-utils.c (remote_open): Improve port number parsing.
16079 (putpkt_binary, input_interrupt): Only send interrupts if the target
16081 * server.c (extended_protocol): Make static.
16082 (attached): Define earlier.
16083 (exit_requested, response_needed, program_argv): New variables.
16084 (target_running): New.
16085 (start_inferior): Clear attached here.
16086 (attach_inferior): Set attached here.
16087 (require_running): Define.
16088 (handle_query): Use require_running and target_running. Implement
16090 (handle_v_attach, handle_v_run): New.
16091 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16092 (gdbserver_usage): Update.
16093 (main): Redo argument parsing. Handle --debug and --multi. Handle
16094 --attach along with other options or after the port. Save
16095 program_argv. Support no initial program. Resynchronize
16096 communication with GDB after an error. Handle "monitor exit".
16097 Use require_running and target_running. Always allow the extended
16098 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16099 restart in extended mode.
16100 * README: Refer to the GDB manual. Update --attach usage.
16102 2007-12-20 Andreas Schwab <schwab@suse.de>
16104 * linux-low.c (STACK_SIZE): Define.
16105 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16106 (linux_test_for_tracefork): Likewise.
16108 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16110 * linux-low.c (linux_wait_for_event): Update messages. Do not
16111 reinsert auto-delete breakpoints.
16112 * mem-break.c (struct breakpoint): Change return type of handler to
16114 (set_breakpoint_at): Update handler type.
16115 (reinsert_breakpoint_handler): Return 1 instead of calling
16117 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16119 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16120 * mem-break.h (set_breakpoint_at): Update handler type.
16121 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16122 * win32-low.c (auto_delete_breakpoint): New.
16123 (get_child_debug_event): Use it.
16125 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16127 * configure.ac: Check for pread and pwrite.
16128 * hostio.c (handle_pread): Fall back to lseek and read.
16129 (handle_pwrite): Fall back to lseek and write.
16130 * config.in, configure: Regenerated.
16132 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16134 * server.c (myresume): Add own_buf argument.
16135 (main): Update calls.
16137 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16139 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16140 * remote-utils.c (remote_open): Do not call disable_async_io.
16141 (block_async_io): Delete.
16142 (unblock_async_io): Make static.
16143 (initialize_async_io): New.
16144 * server.c (handle_v_cont): Handle async I/O here.
16145 (myresume): Likewise. Move other common resume tasks here...
16146 (main): ... from here. Call initialize_async_io. Disable async
16147 I/O before the main loop.
16148 * server.h (initialize_async_io): Declare.
16149 (block_async_io, unblock_async_io): Delete prototypes.
16150 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16152 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16154 * remote-utils.c (readchar): Allow binary data in received messages.
16156 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16158 * win32-low.c (attaching): New global.
16159 (win32_create_inferior): Clear the `attaching' global.
16160 (win32_attach): Set the `attaching' global.
16161 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16162 attaching. Only set a breakpoint at the entry point if not
16165 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16167 * server.c (main): Don't report dll events on the initial
16168 connection on attaches.
16170 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16172 * server.c (main): Relax numerical bases supported for the pid of
16173 the --attach command line argument.
16175 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16177 * win32-low.c (win32_attach): Call OpenProcess before
16178 DebugActiveProcess, not after. Add last error output to error
16181 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16183 * win32-low.c (win32_get_thread_context)
16184 (win32_set_thread_context): New functions.
16185 (thread_rec): Use win32_get_thread_context.
16186 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16187 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16190 2007-12-03 Leo Zayas
16191 Pedro Alves <pedro_alves@portugalmail.pt>
16193 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16195 (child_add_thread): Minor cleanup.
16196 (child_continue): Resume artificially suspended threads before
16197 calling ContinueDebugEvent.
16198 (suspend_one_thread): New.
16199 (fake_breakpoint_event): New.
16200 (get_child_debug_event): Change return type to int. Check here if
16201 gdb sent an interrupt request. If a soft interrupt was requested,
16202 fake a breakpoint event. Return 0 if there is no event to handle,
16204 (win32_wait): Don't check here if gdb sent an interrupt request.
16205 Ensure there is a valid event to handle.
16206 (win32_request_interrupt): Add soft interruption method as last
16209 2007-12-03 Leo Zayas
16210 Pedro Alves <pedro_alves@portugalmail.pt>
16212 * win32-low.h (win32_thread_info): Add descriptions to the
16213 structure members. Replace `suspend_count' counter by a
16215 * win32-low.c (thread_rec): Update condition of when to get the
16216 context from the inferior. Rely on ContextFlags being set if it
16217 has already been retrieved. Only suspend the inferior thread if
16218 we haven't already. Warn if that fails.
16219 (continue_one_thread): s/suspend_count/suspended/. Only call
16220 ResumeThread once. Warn if that fails.
16222 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16224 * win32-low.c (win32_wait): Don't read from the inferior when it
16225 has already exited.
16227 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16229 * Makefile.in (win32_low_h): New variable.
16230 (win32-low.o): Add dependency on $(win32_low_h).
16231 (win32-arm-low.o, win32-i386-low.o): New rules.
16233 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16235 * hostio.c: Correct copyright year.
16237 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16239 * Makefile.in (OBS): Add hostio.o.
16240 (hostio.o): New rule.
16241 * server.h (handle_vFile): Declare.
16242 * hostio.c: New file.
16243 * server.c (handle_v_requests): Take packet_len and new_packet_len
16244 for binary packets. Call handle_vFile.
16245 (main): Update call to handle_v_requests.
16247 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16249 * linux-low.c: Include <sched.h>.
16251 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16253 * linux-low.c (linux_tracefork_grandchild): New.
16254 (linux_tracefork_child): Use clone.
16255 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16257 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16259 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16261 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16263 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16265 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16267 * inferiors.c (change_inferior_id): Delete.
16268 (add_pid_to_list, pull_pid_from_list): New.
16269 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16270 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16271 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16272 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16273 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16274 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16275 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16276 (using_threads): Always set to 1.
16277 (handle_extended_wait): New.
16278 (add_process): Do not set TID.
16279 (linux_create_inferior): Set must_set_ptrace_flags.
16280 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16281 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16282 (linux_thread_alive): Rename TID argument to LWPID.
16283 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16284 (linux_wait_for_event): Do not use TID or check using_threads. Update
16285 call to dead_thread_notify. Call handle_extended_wait.
16286 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16287 (send_sigstop): Delete sigstop_sent.
16288 (wait_for_sigstop): Avoid TID.
16289 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16290 (linux_test_for_tracefork): New.
16291 (linux_lookup_signals): Use thread_db_active and
16292 linux_supports_tracefork_flag.
16293 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16294 * linux-low.h (get_process_thread): Avoid TID.
16295 (struct process_ifo): Move thread_known and tid to the end. Remove
16297 (linux_attach_lwp, thread_db_init): Update prototypes.
16298 * server.h (change_inferior_id): Delete prototype.
16299 (add_pid_to_list, pull_pid_from_list): New prototypes.
16300 * thread-db.c (thread_db_use_events): New.
16301 (find_first_thread): Rename to...
16302 (find_one_thread): ...this. Update callers and messages. Do not
16303 call fatal. Check thread_db_use_events. Do not call
16304 change_inferior_id or new_thread_notify.
16305 (maybe_attach_thread): Update. Do not call new_thread_notify.
16306 (thread_db_init): Set thread_db_use_events. Check use_events.
16307 * utils.c (fatal, warning): Correct message prefix.
16309 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16311 * Makefile.in (clean): Remove new files.
16312 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16313 (powerpc-64.o, powerpc-64.c): New rules.
16314 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16315 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16317 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16319 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16320 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16321 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16322 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16323 (target_regsets): Add AltiVec and SPE register sets.
16324 * configure.ac: Check for AltiVec and SPE.
16325 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16326 (ppc_fill_vrregset, ppc_store_vrregset): New.
16327 (target_regsets): Add AltiVec register set.
16328 * configure: Regenerated.
16330 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16332 * linux-low.c (O_LARGEFILE): Define.
16333 (linux_read_memory): Use /proc/PID/mem.
16334 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16335 * configure, config.in: Regenerated.
16337 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16339 * linux-low.c (linux_wait_for_event): Do not pass signals while
16342 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16344 * win32-low.c (create_process): New.
16345 (win32_create_inferior): Use create_process instead of
16346 CreateProcess. If create_process failed retry appending an ".exe"
16347 suffix. Store the GetLastError result immediatelly after
16348 create_process calls and use it on the call to error.
16350 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16352 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16354 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16356 * configure.ac: Switch license to GPLv3.
16358 2007-08-01 Michael Snyder <msnyder@access-company.com>
16360 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16362 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16364 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16366 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16367 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16368 CloseToolhelp32Snapshot.
16369 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16370 CloseToolhelp32Snapshot.
16372 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16374 * server.c (main): Check for inferior exit before main loop.
16376 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16378 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16379 instead of on tmp_desc.
16381 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16382 Daniel Jacobowitz <dan@codesourcery.com>
16384 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16385 (add_thread): Minor cleanups.
16386 (clear_inferiors): Move lower in the file. Clear the DLL
16388 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16389 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16390 (xml_escape_text): New.
16391 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16393 (handle_v_cont): Report errors.
16394 (gdbserver_version): Update.
16395 (main): Correct size of own_buf. Do not report initial DLL events.
16396 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16397 (unloaded_dll, xml_escape_text): New.
16398 * win32-low.c (enum target_waitkind): Update comments.
16399 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16400 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16401 (win32_EnumProcessModules, win32_GetModuleInformation)
16402 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16403 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16404 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16405 (win32_Module32First, win32_Module32Next, load_toolhelp)
16406 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16407 (get_child_debug_event): Handle DLL events.
16408 (win32_wait): Likewise.
16410 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16412 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16413 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16415 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16417 * win32-low.c (handle_output_debug_string): Ignore event if not
16420 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16422 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16424 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16426 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16428 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16430 * inferiors.c (change_inferior_id): Add comment.
16431 * linux-low.c (check_removed_breakpoint): Add an early
16432 prototype. Improve debug output.
16433 (linux_attach): Doc update.
16434 (linux_detach_one_process, linux_detach): Clean up before releasing
16436 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16437 * linux-low.h (struct process_info): Doc improvement.
16438 * mem-break.c (delete_all_breakpoints): New.
16439 * mem-break.h (delete_all_breakpoints): New prototype.
16440 * thread-db.c (find_first_thread): New.
16441 (thread_db_create_event): Call it instead of
16442 thread_db_find_new_threads. Clean up unused variables.
16443 (maybe_attach_thread): Remove first thread handling.
16444 (thread_db_find_new_threads): Use find_first_thread.
16445 (thread_db_get_tls_address): Likewise.
16447 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16449 * thread-db.c (thread_db_find_new_threads): Add prototype.
16450 (thread_db_create_event): Check for the main thread before adding
16452 (maybe_attach_thread): Only enable event reporting if TID == 0.
16453 (thread_db_get_tls_address): Check for new threads.
16455 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16457 * linux-low.c (linux_create_inferior): Try execv before execvp.
16458 * spu-low.c (spu_create_inferior): Likewise.
16460 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16462 * linux-low.c (linux_create_inferior): Change execv to execvp.
16463 * spu-low.c (spu_create_inferior): Likewies.
16465 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16467 * Makefile.in (clean): Clean new files instead of deleted ones.
16468 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16469 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16471 * configure.srv: Specify XML files and new regformats for MIPS and
16473 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16474 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16475 an entry for the restart register.
16476 (mips_cannot_fetch_register, mips_cannot_store_register)
16477 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16478 register names to match the XML descriptions.
16479 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16480 restart register instead of $0.
16482 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16483 Markus Deuling <deuling@de.ibm.com>
16485 * remote-utils.c (decode_xfer_write): New function.
16486 * server.h (decode_xfer_write): Add prototype.
16487 * server.c (handle_query): Add PACKET_LEN argument. Support
16488 qXfer:spu:read and qXfer:spu:write packets.
16489 (main): Pass packet_len to handle_query.
16490 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16491 * target.h (target_ops): Add qxfer_spu.
16493 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16495 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16496 accessing non-seekable spufs files.
16498 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16500 * server.c (handle_query): Add reply for qC packet.
16502 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16503 Leo Zayas <lerele@champenstudios@com>
16505 * server.h (check_remote_input_interrupt_request): New function.
16506 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16507 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16508 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16509 (check_remote_input_interrupt_request): New function.
16510 * server.h (check_remote_input_interrupt_request): Declare.
16511 * win32-low.c (winapi_DebugBreakProcess,
16512 winapi_GenerateConsoleCtrlEvent): New typedefs.
16513 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16515 (win32_wait): Check for remote interrupt request
16516 with check_remote_input_interrupt_request.
16517 (win32_request_interrupt): New function.
16518 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16520 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16522 * win32-low.c (debug_registers_changed,
16523 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16524 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16525 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16526 (thread_rec): Get context using the low target.
16527 (child_add_thread): Call thread_added on the low target,
16528 which does the same thing.
16530 (do_initial_child_stuff): Remove debug registers references.
16531 Set context using the low target. Resume threads after
16532 setting the contexts.
16533 (child_continue): Remove dead variable. Remove debug
16534 registers references.
16535 (child_fetch_inferior_registers): Go through the low target.
16536 (do_child_store_inferior_registers): Remove.
16537 (child_store_inferior_registers): Go through the low target.
16538 (win32_resume): Remove debug registers references.
16539 Set context using the low target.
16540 (handle_exception): Change return type to void. Don't record
16541 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16542 first chance exception.
16543 (get_child_debug_event): Change return type to void. Remove
16544 goto loop. Always return after waiting for debug event.
16545 (win32_wait): Convert to switch statement. Handle spurious
16548 * win32-i386-low.c (debug_registers_changed,
16549 debug_registers_used): New.
16550 (initial_stuff): Rename to ...
16551 (i386_initial_stuff): ... this. Clear debug registers
16553 (store_debug_registers): Delete.
16554 (i386_get_thread_context): New.
16555 (load_debug_registers): Delete.
16556 (i386_set_thread_context): New.
16557 (i386_thread_added): New.
16558 (single_step): Rename to ...
16559 (i386_single_step): ... this.
16560 (do_fetch_inferior_registers): Rename to ...
16561 (i386_fetch_inferior_register): ... this.
16562 (i386_store_inferior_register): New.
16563 (the_low_target): Adapt to new interface.
16565 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16566 (arm_get_thread_context): New.
16567 (arm_set_thread_context): New.
16569 (do_fetch_inferior_registers): Rename to ...
16570 (arm_fetch_inferior_register): ... this.
16571 (arm_store_inferior_register): New.
16572 (arm_wince_breakpoint): Reimplement as unsigned long.
16573 (arm_wince_breakpoint_len): Define.
16574 (the_low_target): Adapt to new interface.
16576 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16577 load_debug_registers. Add get_thread_context, set_thread_context,
16578 thread_added and store_inferior_register. Rename
16579 fetch_inferior_registers to fetch_inferior_register.
16580 (regptr): Remove declaration.
16582 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16584 * linux-low.c (linux_detach): Change return type to int. Return 0.
16585 * spu-low.c (spu_detach): Likewise.
16587 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16589 * target.h (target_ops): Change return type of detach to int.
16591 (join_inferior): New.
16592 * server.c (main): Don't skip detach support on mingw32.
16593 If the inferior doesn't support detaching return error.
16594 Call join_inferior instead of using waitpid.
16595 * linux-low.c (linux_join): New.
16596 (linux_target_op): Add linux_join.
16597 * spu-low.c (spu_join): New.
16598 (spu_target_ops): Add spu_join.
16599 * win32-low.c (win32_detach): Adapt to new interface.
16600 Reopen current_process_handle before detaching. Issue a child
16601 resume before detaching.
16603 (win32_target_op): Add win32_join.
16605 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16607 * win32-low.c (win32-attach): Fix return value.
16608 * target.h (target_ops): Describe ATTACH return values.
16610 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16612 * win32-low.c (GETPROCADDRESS): Define.
16613 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16614 (winapi_DebugSetProcessKillOnExit): Likewise.
16615 (win32_create_inferior): Force usage of ansi CreateProcessA.
16616 (win32_attach): Use GETPROCADDRESS.
16617 (win32_detach): Likewise.
16619 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16621 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16623 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16625 * win32-low.c: Commit leftover changes from 2007-03-29.
16627 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16629 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16630 fields short instead of int. Add explicit padding.
16631 (i387_cache_to_fsave): Remove unnecessary casts.
16632 (i387_fsave_to_cache): Doc fix.
16633 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16635 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16637 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16638 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16640 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16642 * configure.srv (arm*-*-mingw32ce*): Move near the other
16645 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16647 * configure.ac: Add errno checking.
16648 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16649 sys/file.h and malloc.h.
16650 (AC_CHECK_DECLS): Add perror.
16651 (srv_mingwce): Handle.
16652 * configure.srv (i[34567]86-*-cygwin*): Add
16653 win32-i386-low.o to srv_tgtobj.
16654 (i[34567]86-*-mingw*): Likewise.
16655 (arm*-*-mingw32ce*): Add case.
16656 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16657 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16658 [__MINGW32CE__] (strerror): New function.
16659 [__MINGW32CE__] (errno): Define to GetLastError.
16660 [__MINGW32CE__] (COUNTOF): New macro.
16661 (remote_open): Remove extra close call.
16662 * mem-break.c (delete_breakpoint_at): New function.
16663 * mem-break.h (delete_breakpoint_at): Declare.
16664 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16665 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16666 [USE_WIN32API] (read, write): Add char* casts.
16667 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16668 * server.h: Include wincecompat.h on Windows CE.
16669 [HAVE_ERRNO_H]: Check.
16670 (perror): Declare if not declared.
16671 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16672 (perror_with_name): Remove errno declaration.
16673 * wincecompat.h: New.
16674 * wincecompat.c: New.
16675 * win32-low.h: New.
16676 * win32-arm-low.c: New.
16677 * win32-i386-low.c: New.
16678 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16679 (OUTMSG2): Make it safe.
16681 (COUNTOF): New macro.
16682 (NUM_REGS): Get it from the low target.
16683 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16684 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16685 (thread_rec): Let low target handle debug registers.
16686 (child_add_thread): Likewise.
16687 (child_init_thread_list): Likewise.
16688 (continue_one_thread): Likewise.
16690 (do_child_fetch_inferior_registers): Move to ...
16691 * win32-i386-low.c: ... here, and rename to ...
16692 (do_fetch_inferior_registers): ... this.
16693 * win32-low.c (child_fetch_inferior_registers):
16694 Go through the low target.
16695 (do_child_store_inferior_registers): Use regptr.
16696 (strwinerror): New function.
16697 (win32_create_inferior): Handle Windows CE.
16698 Use strwinerror instead of strerror on Windows error
16699 codes. Add program to the error output.
16700 Don't close the main thread handle on Windows CE.
16701 (win32_attach): Use coredll.dll on Windows CE.
16702 (win32_kill): Close current process and current
16704 (win32_detach): Use coredll.dll on Windows CE.
16705 (win32_resume): Let low target handle debug registers, and
16707 (handle_exception): Add/Remove initial breakpoint. Avoid
16708 non-existant WSTOPSIG on Windows CE.
16709 (win32_read_inferior_memory): Cast to remove warning.
16710 (win32_arch_string): Go through the low target.
16711 (initialize_low): Call set_breakpoint_data with the low
16712 target's breakpoint.
16713 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16714 FOP_REGNUM, mappings): Move to ...
16715 * win32-i386-low.c: ... here.
16716 * win32-low.c (win32_thread_info): Move to ...
16717 * win32-low.h: ... here.
16718 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16719 win32-arm-low.c and wincecompat.c.
16720 (all:): Add $EXEEXT.
16721 (install-only:): Likewise.
16722 (gdbserver:): Likewise.
16723 (gdbreplay:): Likewise.
16724 * config.in: Regenerate.
16725 * configure: Regenerate.
16727 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16729 * win32-low.c: Rename typedef thread_info to
16730 win32_thread_info throughout.
16732 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16734 * win32-i386-low.c: Rename to ...
16735 * win32-low.c: ... this.
16736 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16737 * Makefile.in: Likewise.
16739 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16741 * remote-utils.c (monitor_output): Constify msg parameter.
16742 * server.h (monitor_output): Likewise.
16743 * win32-i386-low.c (handle_output_debug_string): New.
16744 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16745 handle_output_debug_string.
16746 (get_child_debug_event): Likewise.
16748 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16750 * server.c (main): Correct strtoul check.
16752 2007-03-27 Jon Ringle <jon@ringle.org>
16754 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16756 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16758 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16760 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16762 * terminal.h: Check HAVE_SGTTY_H.
16764 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16766 * remote-utils.c (remote_open): Print out the assigned port number.
16768 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16770 * remote-utils.c (monitor_output): New function.
16771 * server.c (debug_threads): Define here.
16772 (monitor_show_help): New function.
16773 (handle_query): Handle qRcmd.
16774 (main): Do not handle 'd' packet.
16775 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16776 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16779 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16781 * Makefile.in (EXEEXT): New.
16782 (clean): Use $(EXEEXT).
16784 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16786 * target.h (target_ops): Rename send_signal to request_interrupt,
16787 and remove enum target_signal parameter.
16788 * linux-low.c (linux_request_interrupt): Rename from
16789 linux_send_signal, and always send SIGINT.
16790 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16791 and always send SIGINT.
16792 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16794 (input_interrupt): Likewise.
16796 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16798 * server.c (get_features_xml): Check if target implemented
16800 * win32-i386-low.c (win32_arch_string): New.
16801 (win32_target_ops): Add win32_arch_string as arch_string member.
16803 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16805 * spu-low.c (spu_arch_string): New.
16806 (spu_target_ops): Add spu_arch_string.
16808 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16810 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16811 * configure.ac: Do not check for terminal.h.
16812 * configure, config.in: Regenerated.
16814 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16816 * Makefile.in (OBS): Add $(XML_BUILTIN).
16817 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16819 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16820 (arm-with-iwmmxt.c): New.
16821 * config.in, configure: Regenerate.
16822 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16823 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16824 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16825 (arm*-*-linux*): Add iWMMXt and regset support.
16826 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16827 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16828 (arm_store_wmmxregset, target_regsets): New.
16829 * server.c (get_features_xml): Take annex argument. Check builtin
16831 (handle_query): Handle multiple annexes.
16833 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16835 * remote-utils.c [USE_WIN32API] (read, write): Define.
16836 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16839 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16841 * linux-i386-low.c (the_low_target): Set arch_string.
16842 * linux-x86-64-low.c (the_low_target): Likewise.
16843 * linux-low.c (linux_arch_string): New.
16844 (linux_target_ops): Add it.
16845 * linux-low.h (struct linux_target_ops): Add arch_string.
16846 * server.c (write_qxfer_response): Use const void * for DATA.
16847 (get_features_xml): New.
16848 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16849 * target.h (struct target_ops): Add arch_string method.
16851 2007-01-03 Denis Pilat <denis.pilat@st.com>
16852 Daniel Jacobowitz <dan@codesourcery.com>
16854 * linux-low.c (linux_kill): Handle being called with no threads.
16855 * win32-i386-low.c (win32_kill): Likewise.
16856 (get_child_debug_event): Clear current_process_handle.
16858 2006-12-30 Denis PILAT <denis.pilat@st.com>
16859 Daniel Jacobowitz <dan@codesourcery.com>
16861 * remote-utils.c (remote_open): Check the type of specified
16862 serial port devices before opening them.
16863 * server.c (main): Kill the inferior if an error occurs during
16864 the first remote_open.
16866 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16868 * README: Update supported targets.
16870 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16872 * Makefile.in (clean): Remove reg-mips64.c.
16873 (reg-mips64.c, reg-mips64.o): New rules.
16874 * configure.srv: Handle mips64. Include regset support for mips.
16875 * linux-mips-low.c (union mips_register): New.
16876 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16877 (mips_breakpoint, mips_breakpoint_at): Use int.
16878 (mips_collect_register, mips_supply_register)
16879 (mips_collect_register_32bit, mips_supply_register_32bit)
16880 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16881 (mips_store_fpregset, target_regsets): New.
16882 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16884 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16886 * configure.srv: Add target "spu*-*-*".
16887 * Makefile.in (clean): Remove reg-spu.c.
16888 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16889 * spu-low.c: New file.
16891 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16893 * configure.ac: Correct td_thr_tls_get_addr test.
16894 * configure: Regenerated.
16896 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16898 * linux-low.c (linux_wait_for_event): Reformat. Use the
16899 pass_signals array.
16900 * remote-utils.c (decode_address_to_semicolon): New.
16901 * server.c (pass_signals, handle_general_set): New.
16902 (handle_query): Mention QPassSignals for qSupported.
16903 (main): Call handle_general_set.
16904 * server.h (pass_signals, decode_address_to_semicolon): New.
16906 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16908 * server.c (handle_query): Correct error handling for read_auxv.
16910 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16912 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16913 and srv_linux_thread_db to yes.
16914 * linux-s390-low.c (s390_fill_gregset): New function.
16915 (target_regsets): Define data structure.
16917 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16919 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16920 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16921 * config.in, configure: Regenerated.
16922 * inferiors.c (gdb_id_to_thread): New function.
16923 (gdb_id_to_thread_id): Use it.
16924 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16925 * linux-low.h (struct process_info): Add th member.
16926 (thread_db_get_tls_address): New prototype.
16927 * remote-utils.c (decode_address): Make non-static.
16928 * server.c (handle_query): Handle qGetTLSAddr.
16929 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16930 * target.h (struct target_ops): Add get_tls_address.
16931 * thread-db.c (maybe_attach_thread): Save the thread handle.
16932 (thread_db_get_tls_address): New.
16934 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16936 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16937 (linux_resume_one_process): Take a siginfo_t *. Update all
16938 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16939 (struct pending_signals): Add a siginfo_t.
16940 (linux_wait_for_process): Always set last_status.
16941 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16942 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16943 * linux-low.h (struct process_info): Add last_status.
16945 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16947 * remote-utils.c (try_rle): New function.
16948 (putpkt_binary): Use it.
16950 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16952 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16953 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16954 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16955 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16956 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16959 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16961 * server.c (terminal_fd): New variable.
16962 (old_foreground_pgrp): Likewise.
16963 (restore_old_foreground_pgrp): New function.
16964 (start_inferior): Record the terminal file descriptor in terminal_fd
16965 and its original foreground group in old_foreground_pgrp. Register
16966 restore_old_foreground_pgrp with atexit().
16968 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16970 * server.c (handle_query): Correct qPart to qXfer.
16972 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16974 * configure.ac: Check for more headers which are missing on
16975 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16976 * configure.srv: Add Cygwin and mingw32.
16977 * remote-utils.c: Don't include headers unconditionally which
16978 are missing on mingw32. Include <winsock.h> for mingw32.
16979 (remote_open): Adjust for mingw32 support. Flush
16980 standard error after writing to it.
16981 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16982 (unblock_async_io, enable_async_io, disable_async_io)
16983 (readchar, getpkt): Update for Winsock support.
16984 (prepare_resume_reply): Expect a protocol signal number.
16985 * server.c: Disable <sys/wait.h> on mingw32.
16986 (start_inferior): Adjust for mingw32 support. Flush
16987 standard error after writing to it.
16988 (attach_inferior): Likewise. Use protocol signal
16990 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16992 * win32-i386-low.c: New file.
16993 * Makefile.in (XM_CLIBS): Set.
16994 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16995 (win32-i386-low.o): New dependency rule.
16996 * linux-low.c (linux_wait): Use target signal numbers.
16997 * target.h (struct target_ops): Doc fix.
16998 * server.h (target_signal_to_name): New prototype.
16999 * gdbreplay.c: Don't include headers unconditionally which
17000 are missing on mingw32. Include <winsock.h> for mingw32.
17001 (remote_close, remote_open): Adjust for Winsock support.
17002 * configure, config.in: Regenerated.
17004 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17006 * server.c (decode_xfer_read, write_qxfer_response): New.
17007 (handle_query): Take a packet length argument. Handle
17008 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17009 the qSupported response.
17010 (main): Update call to handle_query.
17012 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17014 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17015 (putpkt_binary): Renamed from putpkt and adjusted for binary
17017 (putpkt): New wrapper for putpkt_binary.
17018 (readchar): Don't mask off the high bit.
17019 (decode_X_packet): New function.
17020 * server.c (main): Call putpkt_binary if a handler sets the packet
17021 length. Save the length of the incoming packet. Handle 'X'.
17022 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17024 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17026 * server.c (handle_query): Handle qSupported.
17028 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17030 * remote-utils.c (all_symbols_looked_up): New variable.
17031 (look_up_one_symbol): Check it.
17032 * server.h (look_up_one_symbol): New declaration.
17033 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17035 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17037 * Makefile.in (linux-arm-low.o): Update dependencies.
17038 * linux-arm-low.c: Include "gdb_proc_service.h".
17039 (PTRACE_GET_THREAD_AREA): Define.
17040 (ps_get_thread_area): New function.
17042 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17044 * configure.srv (m68k*-*-uclinux*): New target.
17045 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17046 (linux_resume_one_process): Remove extraneous cast.
17047 (linux_read_offsets): New.
17048 (linux_target_op): Add linux_read_offsets on mmuless systems.
17049 * server.c (handle_query): Add qOffsets logic.
17050 * target.h (struct target_ops): Add read_offsets.
17052 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17054 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17055 (PTRACE_GET_THREAD_AREA): Define.
17056 (ps_get_thread_area): New function.
17057 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17058 (linux-x86-64-low.o): Update.
17060 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17062 * configure.ac: Remove checks for prfpregset_t.
17063 * gdb_proc_service.h: New file.
17064 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17065 new "gdb_proc_service.h".
17066 * proc-service.c: Likewise.
17067 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17068 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17069 * Makefile.in (gdb_proc_service_h): Updated.
17070 * configure, config.in: Regenerated.
17072 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17074 * remote-utils.c (prepare_resume_reply): Move declaration
17075 of gdb_id_from_wait to the top of the block.
17077 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17079 * linux-low.c (regsets_store_inferior_registers): Read the regset
17080 from the target before filling it.
17082 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17084 * server.c (attach_inferior): Return SIGTRAP for a successful
17087 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17089 * Makefile.in (OBS): Add version.o.
17090 (STAGESTUFF): Delete.
17091 (version.o): Add dependencies.
17092 (version.c): Replace rule.
17093 (clean): Remove version.c.
17094 * server.c (gdbserver_version): New.
17095 (gdbserver_usage): Use printf.
17096 (main): Handle --version and --help.
17097 * server.h (version, host_name): Add declarations.
17099 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17111 * linux-x86-64-low.c:
17113 * linux-s390-low.c:
17114 * linux-ppc64-low.c:
17116 * linux-mips-low.c:
17117 * linux-m68k-low.c:
17118 * linux-m32r-low.c:
17121 * linux-ia64-low.c:
17122 * linux-i386-low.c:
17123 * linux-crisv32-low.c:
17135 * gdbserver.1: Add (C) after Copyright. Update the FSF
17138 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17140 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17141 (arm_breakpoint_at): Recognize both breakpoints.
17142 (the_low_target): Use the correct breakpoint instruction.
17144 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17146 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17147 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17148 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17149 (the_low_target): Update.
17151 2005-10-25 Andreas Schwab <schwab@suse.de>
17153 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17155 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17156 (ia64_num_regs): Reduce to 462.
17158 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17160 * acinclude.m4: Correct quoting.
17161 * aclocal.m4: Regenerated.
17163 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17164 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17165 (thread_db_init): Call thread_db_err_str.
17166 * configure.ac: Check for TD_VERSION.
17167 * config.in, configure: Regenerated.
17169 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17171 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17173 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17175 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17176 is not available. Define HAVE_PTRACE_GETREGS if it is.
17177 * config.in, configure: Regenerated.
17178 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17179 * linux-i386-low.c, linux-m68k-low.c: Update to use
17180 HAVE_PTRACE_GETREGS.
17181 * linux-low.c (regsets_fetch_inferior_registers)
17182 (regsets_store_inferior_registers): Only return 0 if we processed
17184 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17185 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17187 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17189 * inferiors.c (struct thread_info): Add gdb_id.
17190 (add_thread): Add gdb_id argument.
17191 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17192 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17193 calls to add_thread.
17194 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17195 * server.c (handle_query): Use thread_to_gdb_id.
17196 (handle_v_cont, main): Use gdb_id_to_thread_id.
17197 * server.h (add_thread): Update prototype.
17198 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17201 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17203 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17204 left-padded registers.
17205 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17206 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17208 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17210 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17211 * configure: Regenerate.
17212 * config.in: Regenerate.
17213 * server.h (NEED_DECLARATION_STRERROR):
17214 Replace with !HAVE_DECL_STRERROR.
17216 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17218 * linux-low.c (linux_wait, linux_send_signal): Don't test
17219 an unsigned long variable for > 0 if it could be MAX_ULONG.
17220 * server.c (myresume): Likewise.
17221 * target.c (set_desired_inferior): Likewise.
17223 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17225 * configure.ac: Simplify and improve check for socklen_t.
17226 * configure, config.in: Regenerate.
17228 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17230 * acconfig.h: Remove.
17231 * configure.ac: Add a test for socklen_t. Use three-argument
17232 AC_DEFINE throughout.
17233 * config.in: Regenerated using autoheader 2.59.
17234 * configure: Regenerated.
17236 * gdbreplay.c (socklen_t): Provide a default.
17237 (remote_open): Use socklen_t.
17238 * remote-utils.c (socklen_t): Provide a default.
17239 (remote_open): Use socklen_t.
17240 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17243 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17245 * linux-low.c (linux_read_memory, linux_write_memory)
17246 (linux_read_auxv): Likewise.
17247 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17248 (check_mem_write): Likewise.
17249 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17251 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17252 (registers_from_string, register_data): Likewise.
17253 * server.c (handle_query, main): Likewise.
17254 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17255 (decode_M_packet): Likewise.
17256 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17257 * target.h (struct target_ops): Update read_memory, write_memory,
17259 (read_inferior_memory, write_inferior_memory): Update.
17260 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17261 to unsigned char *.
17262 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17263 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17264 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17265 linux-s390-low.c, linux-sh-low.c: Update for changes in
17266 read_inferior_memory and the_low_target->breakpoint.
17268 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17270 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17271 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17272 * configure.srv: Add powerpc64-*-linux*.
17273 * linux-ppc64-low.c: New file.
17275 2005-05-23 Orjan Friberg <orjanf@axis.com>
17277 * linux-cris-low.c: New file with support for CRIS.
17278 * linux-crisv32-low.c: Ditto for CRISv32.
17279 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17280 (clean): Add reg-cris.c and reg-crisv32.c.
17281 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17282 reg-crisv32.o, and reg-crisv32.c to make rules.
17283 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17284 recognized targets.
17286 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17288 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17289 of sizeof (PTRACE_XFER_TYPE).
17290 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17292 2005-05-12 Orjan Friberg <orjanf@axis.com>
17294 * target.h (struct target_ops): Add insert_watchpoint,
17295 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17296 pointers for hardware watchpoint support.
17297 * linux-low.h (struct linux_target_ops): Ditto.
17298 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17299 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17300 to linux_target_ops.
17301 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17303 * server.c (main): Recognize 'Z' and 'z' packets.
17305 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17307 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17308 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17309 (the_low_target): Add new members.
17311 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17313 * proc-service.c (ps_lgetregs): Search all_processes instead of
17316 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17318 * server.c (start_inferior): Change return type to int.
17319 (attach_inferior): Change sigptr to int *.
17320 (handle_v_cont, handle_v_requests): Change signal to int *.
17321 (main): Change signal to int.
17323 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17325 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17326 * configure.srv: Add m32r*-*-linux*.
17327 * linux-m32r-low.c: New file.
17329 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17331 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17333 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17335 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17336 Take unsigned long arguments for PIDs.
17337 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17338 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17339 (wait_for_sigstop, linux_resume_one_process)
17340 (regsets_fetch_inferior_registers, linux_send_signal)
17341 (linux_read_auxv): Likewise. Update the types of variables holding
17342 PIDs. Update format string specifiers.
17343 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17344 * remote-utils.c (prepare_resume_reply): Likewise.
17345 * server.c (cont_thread, general_thread, step_thread)
17346 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17348 (handle_query): Update format specifiers.
17349 (handle_v_cont, main): Use strtoul for thread IDs.
17350 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17351 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17352 (general_thread, step_thread, thread_from_wait)
17353 (old_thread_from_wait): Update.
17354 * target.h (struct thread_resume): Use unsigned long for THREAD.
17355 (struct target_ops): Use unsigned long for arguments to attach and
17358 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17360 * acinclude.m4: Include bfd/bfd.m4 directly.
17361 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17362 <agriffis@toolchain.org>.
17363 * aclocal.m4, configure: Regenerated.
17365 2005-01-07 Andrew Cagney <cagney@gnu.org>
17367 * configure.ac: Rename configure.in, require autoconf 2.59.
17368 * configure: Re-generate.
17370 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17372 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17373 LIBS when finished.
17374 * aclocal.m4: Regenerated.
17375 * configure: Regenerated.
17377 2004-11-21 Andreas Schwab <schwab@suse.de>
17379 * linux-m68k-low.c (m68k_num_gregs): Define.
17380 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17381 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17382 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17383 (m68k_breakpoint_at): New. Add to the_low_target.
17385 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17386 srv_linux_thread_db to yes.
17388 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17390 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17391 (ARCH_SET_FS): Likewise.
17392 (ARCH_GET_FS): Likewise.
17393 (ARCH_GET_GS): Likewise.
17395 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17397 * linux-i386-low.c (ps_get_thread_area): New.
17398 * linux-x86-64-low.c (ps_get_thread_area): New.
17399 * linux-low.c: Include <sys/syscall.h>.
17400 (linux_kill_one_process): Don't kill the first thread here.
17401 (linux_kill): Kill the first thread here.
17402 (kill_lwp): New function.
17403 (send_sigstop, linux_send_signal): Use it.
17404 * proc-service.c: Clean up #ifdefs.
17405 (fpregset_info): Delete.
17406 (ps_lgetregs): Update and enable implementation.
17407 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17409 * remote-utils.c (struct sym_cache, symbol_cache): New.
17410 (input_interrupt): Print a clearer message.
17411 (async_io_enabled): New variable.
17412 (enable_async_io, disable_async_io): Use it. Update comments.
17413 (look_up_one_symbol): Use the symbol cache.
17414 * thread-db.c (thread_db_look_up_symbols): New function.
17415 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17417 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17419 * configure.in: Test for -rdynamic.
17420 * configure: Regenerated.
17421 * Makefile (INTERNAL_LDFLAGS): New.
17422 (gdbserver, gdbreplay): Use it.
17424 2004-09-02 Andrew Cagney <cagney@gnu.org>
17426 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17428 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17430 * linux-low.c (linux_wait): Clear all_processes list also.
17432 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17434 * linux-low.c: Include <errno.h>. Remove extern declaration of
17437 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17439 * gdbreplay.c, server.h, utils.c: Update copyright years.
17441 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17443 * server.c (main): Print child status or termination signal from
17444 variable 'signal', not 'sig'.
17446 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17448 * linux-low.c (linux_read_memory): Change return type to
17449 int. Check for and return error from ptrace().
17450 * target.c (read_inferior_memory): Change return type to int. Pass
17451 back return status from the_target->read_memory().
17452 * target.h (struct target_ops): Adapt *read_memory() prototype.
17454 (read_inferior_memory): Adapt prototype.
17455 * server.c (main): Return an error packet if
17456 read_inferior_memory() returns an error.
17458 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17460 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17461 Unify with other clean targets.
17463 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17465 * server.c (handle_v_cont): Call set_desired_inferior.
17467 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17469 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17471 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17473 * linux-low.c (linux_wait): Unblock async I/O.
17474 (linux_resume): Block and enable async I/O.
17475 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17476 * server.h (block_async_io, unblock_async_io): Add prototypes.
17478 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17480 * remote-utils.c (remote_open): Print a status notice after
17481 opening a TCP port.
17482 * server.c (attach_inferior): Print a status notice after
17485 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17487 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17489 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17491 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17493 * server.c, target.h: Update copyright years.
17495 2004-02-25 Roland McGrath <roland@redhat.com>
17497 * target.h (struct target_ops): New member `read_auxv'.
17498 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17499 * linux-low.c (linux_read_auxv): New function.
17500 (linux_target_ops): Initialize `read_auxv' member to that.
17502 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17504 Committed by Jim Blandy <jimb@redhat.com>.
17506 * linux-s390-low.c (s390_num_regs): Update.
17507 (s390_regmap): Remove control registers. Use __s390x__ predefine
17508 instead of GPR_SIZE to distiguish s390 and s390x targets.
17510 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17512 * linux-low.c: Update copyright year.
17513 (check_removed_breakpoint): Clear pending_is_breakpoint.
17514 (linux_set_resume_request, linux_queue_one_thread)
17515 (resume_status_pending_p): New functions.
17516 (linux_continue_one_thread): Use process->resume.
17517 (linux_resume): Only resume threads if there are no pending events.
17518 * linux-low.h (struct process_info): Add resume request
17521 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17523 * regcache.c (new_register_cache): Clear the allocated register
17524 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17526 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17528 * linux-low.c (linux_resume): Take a struct thread_resume *
17530 (linux_wait): Update call.
17531 (resume_ptr): New static variable.
17532 (linux_continue_one_thread): Renamed from
17533 linux_continue_one_process. Use resume_ptr.
17534 (linux_resume): Use linux_continue_one_thread.
17535 * server.c (handle_v_cont, handle_v_requests): New functions.
17536 (myresume): New function.
17537 (main): Handle 'v' case.
17538 * target.h (struct thread_resume): New type.
17539 (struct target_ops): Change argument of "resume" to struct
17541 (myresume): Delete macro.
17543 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17545 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17546 (uninstall): Support DESTDIR.
17548 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17550 * configure.srv: Add xscale*linux copy of arm*linux entry.
17552 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17554 * linux-arm-low.c (arm_reinsert_addr): New function.
17555 (the_low_target): Add arm_reinsert_addr.
17557 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17559 * mem-break.c: Remove whitespace at end of file.
17561 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17563 * configure.in: Check whether we need to prototype strerror.
17564 * server.h: Optionally prototype strerror.
17565 * gdbreplay.c (perror_with_name): Use strerror.
17566 * linux-low.c (linux_attach_lwp): Use strerror.
17567 * utils.c (perror_with_name): Use strerror.
17568 * config.in, configure: Regenerated.
17570 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17572 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17573 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17575 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17577 * Makefile.in (SFILES): Update.
17578 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17579 low-sun3.c: Remove files.
17581 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17583 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17584 (linux_detach_one_process, linux_detach): New functions.
17585 (linux_target_ops): Add linux_detach.
17586 * server.c (main): Handle 'D' packet.
17587 * target.h (struct target_ops): Add "detach" member.
17588 (detach_inferior): Define.
17590 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17592 From Kelley Cook <kelleycook@wideopenwest.com>:
17593 * configure.srv: Accept i[34567]86 variants.
17595 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17597 * linux-low.c (linux_wait_for_event): Correct comment typos.
17598 (linux_resume_one_process): Call check_removed_breakpoint.
17599 (linux_send_signal): New function.
17600 (linux_target_ops): Add linux_send_signal.
17601 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17603 * target.h (struct target_ops): Add send_signal.
17605 2003-05-29 Jim Blandy <jimb@redhat.com>
17607 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17608 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17609 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17610 away part of the register's value.
17612 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17614 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17615 (linux_wait_for_event, linux_init_signals): Likewise.
17617 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17619 * configure.in: Check for stdlib.h.
17620 * configure: Regenerated.
17621 * config.in: Regenerated.
17623 2003-01-04 Andreas Schwab <schwab@suse.de>
17625 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17627 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17629 * Makefile.in: Remove obsolete code.
17631 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17633 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17634 defined(PT_FPR0_HI).
17636 2002-11-17 Stuart Hughes <seh@zee2.com>
17638 * linux-arm-low.c (arm_num_regs): Increase.
17639 (arm_regmap): Include status register.
17641 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17643 * linux-low.c (register_addr): Remove incorrect -1 check.
17645 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17647 * linux-low.c (linux_create_inferior): Call setpgid. Return
17649 (unstopped_p, linux_signal_pid): Remove.
17650 (linux_target_ops): Remove linux_signal_pid.
17651 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17652 global instead of target method.
17653 * target.h (struct target_ops): Remove signal_pid. Update comment
17654 for create_inferior.
17655 * server.c (signal_pid): New variable.
17656 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17657 gdbserver. Set the child to be the foreground process group.
17658 (attach_inferior): Set signal_pid.
17660 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17662 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17664 2002-08-20 Jim Blandy <jimb@redhat.com>
17666 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17669 2002-08-01 Andrew Cagney <cagney@redhat.com>
17671 * Makefile.in: Make chill references obsolete.
17673 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17675 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17676 * configure: Regenerate.
17677 * config.in: Regenerate.
17679 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17681 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17682 (perror_with_name, remote_close, remote_open, expect, play): Static.
17684 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17686 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17687 byte offsets instead of an array of indexes.
17688 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17690 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17692 * regcache.c: Add comment.
17694 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17696 * thread-db.c: New file.
17697 * proc-service.c: New file.
17698 * acinclude.m4: New file.
17699 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17700 proc-service.o, and thread-db.o.
17701 (linux-low.o): Add USE_THREAD_DB.
17702 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17703 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17704 * aclocal.m4: Regenerated.
17705 * config.in: Regenerated.
17706 * configure: Regenerated.
17707 * configure.in: Check for proc_service.h, sys/procfs.h,
17708 thread_db.h, and linux/elf.h headrs.
17709 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17710 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17711 Check for -lthread_db and thread support.
17712 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17713 PowerPC, and SuperH.
17714 * i387-fp.c: Constify arguments.
17715 * i387-fp.h: Likewise.
17716 * inferiors.c: (struct thread_info): Renamed from
17717 `struct inferior_info'. Remove PID member. Use generic inferior
17718 list header. All uses updated.
17719 (inferiors, signal_pid): Removed.
17720 (all_threads): New variable.
17721 (get_thread): Define.
17722 (add_inferior_to_list): New function.
17723 (for_each_inferior): New function.
17724 (change_inferior_id): New function.
17725 (add_inferior): Removed.
17726 (remove_inferior): New function.
17727 (add_thread): New function.
17728 (free_one_thread): New function.
17729 (remove_thread): New function.
17730 (clear_inferiors): Use for_each_inferior and free_one_thread.
17731 (find_inferior): New function.
17732 (find_inferior_id): New function.
17733 (inferior_target_data): Update argument type.
17734 (set_inferior_target_data): Likewise.
17735 (inferior_regcache_data): Likewise.
17736 (set_inferior_regcache_data): Likewise.
17737 * linux-low.c (linux_bp_reinsert): Remove.
17738 (all_processes, stopping_threads, using_thrads)
17739 (struct pending_signals, debug_threads, pid_of): New.
17740 (inferior_pid): Replace with macro.
17741 (struct inferior_linux_data): Remove.
17742 (get_stop_pc, add_process): New functions.
17743 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17744 Use add_process and add_thread.
17745 (linux_attach_lwp): New function, based on old linux_attach. Use
17746 add_process and add_thread. Set stop_expected for new threads.
17747 (linux_attach): New function.
17748 (linux_kill_one_process): New function.
17749 (linux_kill): Kill all LWPs.
17750 (linux_thread_alive): Use find_inferior_id.
17751 (check_removed_breakpoints, status_pending_p): New functions.
17752 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17753 Update. Use WNOHANG. Wait for cloned processes also. Update process
17754 struct for the found process.
17755 (linux_wait_for_event): New function.
17756 (linux_wait): Use it. Support LWPs.
17757 (send_sigstop, wait_for_sigstop, stop_all_processes)
17758 (linux_resume_one_process, linux_continue_one_process): New functions.
17759 (linux_resume): Support LWPs.
17760 (REGISTER_RAW_SIZE): Remove.
17761 (fetch_register): Use register_size instead. Call supply_register.
17762 (usr_store_inferior_registers): Likewise. Call collect_register.
17763 Fix recursive case.
17764 (regsets_fetch_inferior_registers): Improve error message.
17765 (regsets_store_inferior_registers): Add debugging.
17766 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17767 (unstopped_p, linux_signal_pid): New functions.
17768 (linux_target_ops): Add linux_signal_pid.
17769 (linux_init_signals): New function.
17770 (initialize_low): Call it. Initialize using_threads.
17771 * regcache.c (inferior_regcache_data): Add valid
17773 (get_regcache): Fetch registers lazily. Add fetch argument
17774 and update all callers.
17775 (regcache_invalidate_one, regcache_invalidate): New
17777 (new_register_cache): Renamed from create_register_cache.
17778 Return the new regcache.
17779 (free_register_cache): Change argument to a void *.
17780 (registers_to_string, registers_from_string): Call get_regcache
17781 with fetch flag set.
17782 (register_data): Make static. Pass fetch flag to get_regcache.
17783 (supply_register): Call get_regcache with fetch flag clear.
17784 (collect_register): Call get_regcache with fetch flag set.
17785 (collect_register_as_string): New function.
17786 * regcache.h: Update.
17787 * remote-utils.c (putpkt): Flush after debug output and use
17789 Handle input interrupts while waiting for an ACK.
17790 (input_interrupt): Use signal_pid method.
17791 (getpkt): Flush after debug output and use stderr.
17792 (outreg): Use collect_register_as_string.
17793 (new_thread_notify, dead_thread_notify): New functions.
17794 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17795 and general_thread.
17796 (look_up_one_symbol): Flush after debug output.
17797 * server.c (step_thread, server_waiting): New variables.
17798 (start_inferior): Don't use signal_pid. Update call to mywait.
17799 (attach_inferior): Update call to mywait.
17800 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17801 (main): Don't fetch/store registers explicitly. Use
17802 set_desired_inferior. Support proposed ``Hs'' packet. Update
17804 * server.h: Update.
17805 (struct inferior_list, struct_inferior_list_entry): New.
17806 * target.c (set_desired_inferior): New.
17807 (write_inferior_memory): Constify.
17808 (mywait): New function.
17809 * target.h: Update.
17810 (struct target_ops): New signal_pid method.
17811 (mywait): Removed macro, added prototype.
17813 * linux-low.h (regset_func): Removed.
17814 (regset_fill_func, regset_store_func): New.
17815 (enum regset_type): New.
17816 (struct regset_info): Add type field. Use new operation types.
17817 (struct linux_target_ops): stop_pc renamed to get_pc.
17818 Add decr_pc_after_break and breakpoint_at.
17819 (get_process, get_thread_proess, get_process_thread)
17820 (strut process_info, all_processes, linux_attach_lwp)
17821 (thread_db_init): New.
17823 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17824 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17825 (the_low_target): Add new members.
17826 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17827 (i386_store_fpxregset): Constify.
17828 (target_regsets): Add new kind identifier.
17829 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17830 (i386_set_pc): Add debugging.
17831 (i386_breakpoint_at): New function.
17832 (the_low_target): Add new members.
17833 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17834 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17835 (mips_breakpoint_at): New.
17836 (the_low_target): Add new members.
17837 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17838 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17839 (the_low_target): Add new members.
17840 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17841 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17842 (the_low_target): Add new members.
17843 * linux-x86-64-low.c (target_regsets): Add new kind
17846 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17848 From Martin Pool <mbp@samba.org>:
17849 * server.c (gdbserver_usage): New function.
17852 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17854 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17855 stop_at -> stop_pc.
17857 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17859 * Makefile.in: Remove obsolete code.
17861 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17863 * linux-low.c (regsets_fetch_inferior_registers),
17864 (regsets_store_inferior_registers): Removed cast to int from
17866 * regcache.h: Added declaration of struct inferior_info.
17868 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17870 * inferiors.c (struct inferior_info): Add regcache_data.
17871 (add_inferior): Call create_register_cache.
17872 (clear_inferiors): Call free_register_cache.
17873 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17874 * regcache.c (struct inferior_regcache_data): New.
17875 (registers): Remove.
17876 (get_regcache): New function.
17877 (create_register_cache, free_register_cache): New functions.
17878 (set_register_cache): Don't initialize the register cache here.
17879 (registers_to_string, registers_from_string, register_data): Call
17881 * regcache.h: Add prototypes.
17882 * server.h: Likewise.
17884 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17886 * mem-break.c: New file.
17887 * mem-break.h: New file.
17888 * Makefile.in: Add mem-break.o rule; update server.h
17890 * inferiors.c (struct inferior_info): Add target_data
17892 (clear_inferiors): Free target_data member if set.
17893 (inferior_target_data, set_inferior_target_data): New functions.
17894 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17895 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17896 * linux-low.c (linux_bp_reinsert): New variable.
17897 (struct inferior_linux_data): New.
17898 (linux_create_inferior): Use set_inferior_target_data.
17899 (linux_attach): Likewise. Call add_inferior.
17900 (linux_wait_for_one_inferior): New function.
17901 (linux_wait): Call it.
17902 (linux_write_memory): Add const.
17903 (initialize_low): Call set_breakpoint_data.
17904 * linux-low.h (struct linux_target_ops): Add breakpoint
17906 * server.c (attach_inferior): Remove extra add_inferior
17908 * server.h: Include mem-break.h. Update inferior.c
17910 * target.c (read_inferior_memory)
17911 (write_inferior_memory): New functions.
17912 * target.h (read_inferior_memory)
17913 (write_inferior_memory): Change macros to prototypes.
17914 (struct target_ops): Update comments. Add const to write_memory
17917 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17919 * linux-low.c (usr_store_inferior_registers): Support
17920 registers which are allowed to fail to store.
17921 * linux-low.h (linux_target_ops): Likewise.
17922 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17923 (ppc_cannot_store_register): FPSCR may not be storable.
17925 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17927 * server.h: Include <string.h> if HAVE_STRING_H.
17928 * ChangeLog: Correct paths in last ChangeLog entry.
17930 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17932 * linux-low.h: Remove obsolete prototypes.
17933 (struct linux_target_ops): New.
17934 (extern the_low_target): New.
17935 * linux-low.c (num_regs, regmap): Remove declarations.
17936 (register_addr): Use the_low_target explicitly.
17937 (fetch_register): Likewise.
17938 (usr_fetch_inferior_registers): Likewise.
17939 (usr_store_inferior_registers): Likewise.
17940 * linux-arm-low.c (num_regs): Remove.
17941 (arm_num_regs): Define.
17942 (arm_regmap): Renamed from regmap, made static.
17943 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17945 (arm_cannot_store_register): Renamed from cannot_store_register,
17947 (the_low_target): New.
17948 * linux-i386-low.c (num_regs): Remove.
17949 (i386_num_regs): Define.
17950 (i386_regmap): Renamed from regmap, made static.
17951 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17953 (i386_cannot_store_register): Renamed from cannot_store_register,
17955 (the_low_target): New.
17956 * linux-ia64-low.c (num_regs): Remove.
17957 (ia64_num_regs): Define.
17958 (ia64_regmap): Renamed from regmap, made static.
17959 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17961 (ia64_cannot_store_register): Renamed from cannot_store_register,
17963 (the_low_target): New.
17964 * linux-m68k-low.c (num_regs): Remove.
17965 (m68k_num_regs): Define.
17966 (m68k_regmap): Renamed from regmap, made static.
17967 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17969 (m68k_cannot_store_register): Renamed from cannot_store_register,
17971 (the_low_target): New.
17972 * linux-mips-low.c (num_regs): Remove.
17973 (mips_num_regs): Define.
17974 (mips_regmap): Renamed from regmap, made static.
17975 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17977 (mips_cannot_store_register): Renamed from cannot_store_register,
17979 (the_low_target): New.
17980 * linux-ppc-low.c (num_regs): Remove.
17981 (ppc_num_regs): Define.
17982 (ppc_regmap): Renamed from regmap, made static.
17983 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17985 (ppc_cannot_store_register): Renamed from cannot_store_register,
17987 (the_low_target): New.
17988 * linux-s390-low.c (num_regs): Remove.
17989 (s390_num_regs): Define.
17990 (s390_regmap): Renamed from regmap, made static.
17991 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17993 (s390_cannot_store_register): Renamed from cannot_store_register,
17995 (the_low_target): New.
17996 * linux-sh-low.c (num_regs): Remove.
17997 (sh_num_regs): Define.
17998 (sh_regmap): Renamed from regmap, made static.
17999 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18001 (sh_cannot_store_register): Renamed from cannot_store_register,
18003 (the_low_target): New.
18004 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18005 (the_low_target): New.
18007 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18009 * Makefile.in: Add stamp-h target.
18010 * configure.in: Create stamp-h.
18011 * configure: Regenerated.
18013 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18015 * inferiors.c: New file.
18016 * target.c: New file.
18017 * target.h: New file.
18018 * Makefile.in: Add target.o and inferiors.o. Update
18020 * linux-low.c (inferior_pid): New static variable,
18021 moved from server.c.
18022 (linux_create_inferior): Renamed from create_inferior.
18023 Call add_inferior. Return 0 on success instead of a PID.
18024 (linux_attach): Renamed from myattach.
18025 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18026 (linux_thread_alive): Renamed from mythread_alive.
18027 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18029 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18030 (regsets_store_inferior_registers): Correct error message.
18031 Add missing ``return 0''.
18032 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18033 (linux_store_registers): Renamed from store_inferior_registers.
18034 (linux_read_memory): Renamed from read_inferior_memory.
18035 (linux_write_memory): Renamed from write_inferior_memory.
18036 (linux_target_ops): New structure.
18037 (initialize_low): Call set_target_ops ().
18038 * remote-utils.c (unhexify): New function.
18039 (hexify): New function.
18040 (input_interrupt): Send signals to ``signal_pid''.
18041 * server.c (inferior_pid): Remove.
18042 (start_inferior): Update create_inferior call.
18043 (attach_inferior): Call add_inferior.
18044 (handle_query): New function.
18045 (main): Call handle_query for `q' packets.
18046 * server.h: Include "target.h". Remove obsolete prototypes.
18047 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18049 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18051 * Makefile.in: Add WARN_CFLAGS. Update configury
18053 * configure.in: Check for <string.h>
18054 * configure: Regenerate.
18055 * config.in: Regenerate.
18056 * gdbreplay.c: Include needed system headers.
18057 (remote_open): Remove strchr prototype.
18058 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18059 * regcache.c (supply_register): Change buf argument to const void *.
18060 (supply_register_by_name): Likewise.
18061 (collect_register): Change buf argument to void *.
18062 (collect_register_by_name): Likewise.
18063 * regcache.h: Add missing prototypes.
18064 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18065 * server.c (handle_query): New function.
18066 (attached): New static variable, moved out of main.
18067 (main): Quiet longjmp clobber warnings.
18068 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18069 * utils.c (error): Remove NORETURN.