+2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
+
+ * inferiors.c (current_inferior_cwd): New global variable.
+ (get_inferior_cwd): New function.
+ * inferiors.h (struct process_info) <cwd>: New field.
+
+2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
+
+ * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
+ (OBS): Add gdb_tilde_expand.o.
+
+2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
+
+ * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
+ * nto-x86-low.c (nto_x86_arch_setup): Likewise.
+
+2017-09-29 Pedro Alves <palves@redhat.com>
+
+ * ax.c (gdb_parse_agent_expr): Constify.
+ * ax.h (gdb_parse_agent_expr): Constify.
+ * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
+ Constify.
+ * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
+ * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
+ * remote-utils.h (read_ptid): Constify.
+ * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
+ (process_point_options, process_serial_event): Constify.
+ * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
+ (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
+ (cmd_qtbuffer): Constify.
+
+2017-09-29 Pedro Alves <palves@redhat.com>
+
+ * proc-service.c (ps_pdread): Return PS_ERR if reading memory
+ fails.
+
+2017-09-29 Pedro Alves <palves@redhat.com>
+
+ * linux-low.c (handle_extended_wait): Pass parent thread instead
+ of process to thread_db_notice_clone.
+ * linux-low.h (thread_db_notice_clone): Replace parent process
+ parameter with parent thread parameter.
+ * thread-db.c (find_one_thread): Add comment.
+ (thread_db_notice_clone): Replace parent process parameter with
+ parent thread parameter. Temporarily switch to the parent thread.
+
+2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
+
+ * gdbthread.h: Include "common-gdbthread.h".
+ * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
+ "if" when validating the ptid.
+ * remote-utils.c: Include "gdbthread.h".
+ (prepare_resume_reply): Use "switch_to_thread".
+ * target.c (done_accessing_memory): Likewise.
+
+2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
+
+ * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
+ s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
+ s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
+ srv_xmlfiles. Add s390-gs-linux64-ipa.o and
+ s390x-gs-linux64-ipa.o to ipa_obj.
+ * linux-s390-low.c (HWCAP_S390_GS): New define.
+ (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
+ New functions.
+ (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
+ (s390_arch_setup): Check for guarded-storage support and choose
+ appropriate tdesc.
+ (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
+ init_registers_s390x_gs_linux64.
+ * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
+ enum value.
+ (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
+ (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
+
+2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
+
+ * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
+
+2017-09-21 Kevin Buettner <kevinb@redhat.com>
+
+ * linux-low.h (struct lwp_info): Add new field, thread_handle.
+ (thread_db_thread_handle): Declare.
+ * linux-low.c (linux_target_ops): Initialize thread_handle.
+ * server.c (handle_qxfer_threads_worker): Add support for
+ "handle" attribute.
+ * target.h (struct target_ops): Add new function pointer,
+ thread_handle.
+ (target_thread_handle): Define.
+ * thread-db.c (find_one_thread, attach_thread): Set thread_handle
+ field in lwp.
+ (thread_db_thread_handle): New function.
+
+2017-09-21 Kevin Buettner <kevinb@redhat.com>
+
+ * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
+ * linux-low.h (thread_db_notice_clone): Declare.
+ * thread-db.c (thread_db_notice_clone): New function.
+
+2017-09-21 Pedro Alves <palves@redhat.com>
+
+ * server.c (gdb_read_memory, handle_status, process_serial_event)
+ (handle_serial_event, handle_target_event): Adjust to
+ set_desired_thread prototype change.
+ * target.c (set_desired_thread): Remove 'use_general' parameter
+ and adjust.
+ * target.h (set_desired_thread): Remove 'use_general' parameter.
+
+2017-09-20 Tom Tromey <tom@tromey.com>
+
+ * target.c (target_terminal::terminal_state): Define.
+ (target_terminal::init): Rename from target_terminal_init.
+ (target_terminal::inferior): Rename from
+ target_terminal_inferior.
+ (target_terminal::ours): Rename from target_terminal_ours.
+ (target_terminal::ours_for_output, target_terminal::info): New.
+
+2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
+
+ * server.c (accumulate_file_name_length): Remove.
+ (emit_dll_description): Adjust to std::string change.
+ (handle_qxfer_libraries): Use std::string to hold document.
+
+2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
+
+ * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
+ return type of xml_escape_text.
+ * server.c (emit_dll_description): Likewise.
+
+2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
+
+ * server.c (captured_main): Accept argument for --selftest.
+ Update run_tests call.
+ * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
+ when registering selftests.
+
+2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
+
+ * regcache.c (get_thread_regcache): Update code to use "std::vector"
+ instead of "VEC" for "target_desc.reg_defs".
+ (regcache_cpy): Likewise.
+ (registers_to_string): Likewise.
+ (registers_from_string): Likewise.
+ (find_regno): Likewise.
+ (supply_regblock): Likewise.
+ (regcache_raw_read_unsigned): Likewise.
+ * tdesc.c (init_target_desc): Likewise.
+ (tdesc_create_reg): Likewise.
+ * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
+ (struct target_desc) <reg_defs>: Convert to "std::vector".
+ (target_desc): Do not initialize "reg_defs".
+ (~target_desc): Update code to use "std::vector" instead of "VEC"
+ for "target_desc.reg_defs".
+ (operator==): Likewise.
+
+2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
+
+ * inferiors.h (thread_to_gdb_id): Remove.
+ * inferiors.c (thread_to_gdb_id): Remove.
+ * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
+ * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
+ lynx_store_registers, lynx_read_memory, lynx_write_memory):
+ Likewise.
+ * nto-low.c (nto_fetch_registers, nto_store_registers,
+ nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
+
+2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
+
+ * inferiors.h (gdb_id_to_thread_id): Remove.
+ * inferiors.c (gdb_id_to_thread_id): Remove.
+ * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
+ removal. Move pid declaration closer to where it's used.
+
+2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
+
+ * server.c (handle_detach): New function.
+ (process_serial_event): Move code out, call handle_detach.
+
+2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
+
+ * server.c (require_running): Rename to ...
+ (require_running_or_return): ... this ...
+ (require_running_or_break): ... and this.
+ (handle_query, process_serial_event): Adjust.
+
+2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
+
+ * linux-low.c (linux_set_resume_request): Remove unused
+ variables.
+
+2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
+
+ * server.c (first_thread_of): Remove.
+ (process_serial_event): Replace usage of first_thread_of with
+ find_any_thread_of_pid.
+ * tracepoint.c (same_process_p): Remove.
+ (gdb_agent_about_to_close): Replace usage of same_process_p with
+ find_any_thread_of_pid.
+ * linux-x86-low.c (same_process_callback): Remove.
+ (x86_arch_setup_process_callback): Replace usage of
+ same_process_callback with find_any_thread_of_pid.
+ * thread-db.c (any_thread_of): Remove.
+ (switch_to_process): Replace usage of any_thread_of with
+ find_any_thread_of_pid.
+ * inferiors.c (thread_pid_matches_callback): Remove.
+ (find_thread_process): Adjust to use find_any_thread_of_pid.
+
+2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
+
+ * regcache.c (get_thread_regcache): Guard calls to "memset"
+ with "!VEC_empty".
+
+2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
+
+ * linux-low.c (handle_extended_wait): Use
+ "allocate_target_description" instead of "XNEW".
+ * linux-x86-low.c (initialize_low_arch): Likewise.
+
+2017-09-05 Yao Qi <yao.qi@linaro.org>
+
+ * configure.srv (srv_i386_regobj): Remove.
+ (srv_amd64_regobj): Remove.
+ (srv_regobj): Set it to "" for x86 non-linux targets.
+ * linux-x86-tdesc.c (i386_linux_read_description):
+ * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
+ (init_registers_i386): Remove the declaration.
+ (tdesc_i386): Remove the declaration.
+ (lynx_i386_arch_setup): Call i386_create_target_description.
+ * nto-x86-low.c: Likewise.
+ * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
+ [!__x86_64__]: include arch/i386.h.
+ (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
+
+2017-09-05 Yao Qi <yao.qi@linaro.org>
+
+ * configure.srv (srv_amd64_linux_xmlfiles): Remove
+ i386/amd64-XXX-linux from it.
+
+2017-09-05 Yao Qi <yao.qi@linaro.org>
+
+ * configure.srv: Empty srv_amd64_linux_regobj if $development is
+ false.
+ (ipa_amd64_linux_regobj): Remove.
+ (ipa_x32_linux_regobj): Remove.
+
+2017-09-05 Yao Qi <yao.qi@linaro.org>
+
+ * Makefile.in (arch-amd64.o): New rule.
+ * configure.srv: Append arch-amd64.o.
+ * linux-amd64-ipa.c: Include common/x86-xstate.h.
+ (get_ipa_tdesc): Call amd64_linux_read_description.
+ (initialize_low_tracepoint): Don't call init_registers_x32_XXX
+ and init_registers_amd64_XXX.
+ * linux-x86-low.c (x86_linux_read_description): Call
+ amd64_linux_read_description.
+ (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
+ (initialize_low_arch): Don't call init_registers_x32_XXX and
+ init_registers_amd64_XXX.
+ * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
+ and tdesc_amd64_XXX.
+ [__x86_64__] (amd64_tdesc_test): New function.
+ (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
+ and init_registers_amd64_XXX.
+ * linux-x86-tdesc.c: Include arch/amd64.h.
+ (xcr0_to_tdesc_idx): New function.
+ (i386_linux_read_description): New function.
+ (amd64_get_ipa_tdesc_idx): New function.
+ * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
+ (amd64_get_ipa_tdesc): Declare.
+
+2017-09-05 Yao Qi <yao.qi@linaro.org>
+
+ * configure.srv (srv_i386_linux_xmlfiles): Remove
+ i386/i386-XXX-linux.xml from it.
+
+2017-09-05 Yao Qi <yao.qi@linaro.org>
+
+ * configure.srv: Set srv_i386_linux_regobj empty if $development
+ is false.
+ * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
+ initialize_low_tdesc.
+ * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
+ with #if initialize_low_tdesc.
+ * linux-x86-tdesc-selftest.c: New file.
+ * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
+
+2017-09-05 Yao Qi <yao.qi@linaro.org>
+
+ * Makefile.in (arch-i386.o): New rule.
+ * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
+ (x86_64-*-linux*): Likewise.
+ * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
+ include arch/i386.h.
+ (i386_linux_read_description): Remove code and call
+ i386_create_target_description.
+ * tdesc.c (allocate_target_description): New function.
+ * tdesc.h (set_tdesc_architecture): Remove declaration.
+ (set_tdesc_osabi): Likewise.
+
+2017-09-05 Yao Qi <yao.qi@linaro.org>
+
+ * linux-x86-tdesc.c: Don't include <inttypes.h>.
+ (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
+ set_tdesc_architecture and set_tdesc_osabi. Remove code setting
+ .xmltarget.
+ * server.c (get_features_xml): Call tdesc_get_features_xml.
+ * tdesc.c (set_tdesc_architecture): New function.
+ (set_tdesc_osabi): New function.
+ (tdesc_get_features_xml): New function.
+ (tdesc_create_feature): Add an argument.
+ * tdesc.h (struct target_desc) <features>: New field.
+ <arch, osabi>: New field.
+ (~target_desc): xfree features, arch, and osabi.
+ (target_desc::oerator==): Don't compare .xmltarget.
+ [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
+ (set_tdesc_osabi): Likewise.
+ (tdesc_get_features_xml): Likewise.
+
+2017-09-05 Yao Qi <yao.qi@linaro.org>
+
+ * linux-x86-tdesc.c: Include selftest.h.
+ (i386_tdesc_test): New function.
+ (initialize_low_tdesc): Call selftests::register_test.
+ * tdesc.h: Include regdef.h.
+ (target_desc): Override operator == and !=.
+
+2017-09-05 Yao Qi <yao.qi@linaro.org>
+
+ * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
+ (ipa_obj): Likewise.
+ * linux-i386-ipa.c: Include common/x86-xstate.h
+ (get_ipa_tdesc): Call i386_linux_read_description.
+ (initialize_low_tracepoint): Don't call init_registers_XXX
+ functions, call initialize_low_tdesc instead.
+ * linux-x86-low.c (x86_linux_read_description): Call
+ i386_linux_read_description.
+ (initialize_low_arch): Don't call init_registers_i386_XXX
+ functions, call initialize_low_tdesc.
+ * linux-x86-tdesc.c: New file.
+ * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
+ (i386_get_ipa_tdesc_idx): Declare.
+ (i386_get_ipa_tdesc): Declare.
+ (initialize_low_tdesc): Declare.
+
+2017-09-05 Yao Qi <yao.qi@linaro.org>
+
+ * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
+ instead of 0.
+
+2017-09-05 Yao Qi <yao.qi@linaro.org>
+
+ * Makefile.in (IPA_OBJS): Add vec-ipa.o
+ * regcache.c (get_thread_regcache): Use VEC_length.
+ (init_register_cache): Likewise.
+ (regcache_cpy): Likewise.
+ (registers_to_string): Iterate reg_defs via VEC_iterate.
+ (find_regno): Likewise.
+ (find_register_by_number): Use VEC_index.
+ (register_size): Call find_register_by_number.
+ (register_data): Call find_register_by_number.
+ (supply_regblock): Use VEC_length.
+ (regcache_raw_read_unsigned): Likewise.
+ * tdesc.c (init_target_desc): Iterate reg_defs via
+ VEC_iterate.
+ (default_description): Update initializer.
+ (copy_target_description): Don't update field num_registers.
+ * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
+ <num_registers>: Remove.
+
+2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
+
+ * Makefile.in (.SECONDARY): Define target.
+
+2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
+
+ * linux-low.c (linux_wait_1): Adjust.
+ * server.c (queue_stop_reply_callback): Adjust.
+
+2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
+
+ * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
+ QEnvironmentUnset and QEnvironmentReset packets.
+ (handle_query): Inform remote that QEnvironmentHexEncoded,
+ QEnvironmentUnset and QEnvironmentReset are supported.
+
+2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
+
+ * inferiors.h (inferior_target_data): Rename to ...
+ (thread_target_data): ... this.
+ (inferior_regcache_data): Rename to ...
+ (thread_regcache_data): ... this.
+ (set_inferior_regcache_data): Rename to ...
+ (set_thread_regcache_data): ... this.
+ * inferiors.c (inferior_target_data): Rename to ...
+ (thread_target_data): ... this.
+ (inferior_regcache_data): Rename to ...
+ (thread_regcache_data): ... this.
+ (set_inferior_regcache_data): Rename to ...
+ (set_thread_regcache_data): ... this.
+ (free_one_thread): Update.
+ * linux-low.h (get_thread_lwp): Update.
+ * regcache.c (get_thread_regcache): Update.
+ (regcache_invalidate_thread): Update.
+ (free_register_cache_thread): Update.
+ * win32-i386-low.c (update_debug_registers_callback): Update.
+ (win32_get_current_dr): Update.
+ * win32-low.c (thread_rec): Update.
+ (delete_thread_info): Update.
+ (continue_one_thread): Update.
+ (suspend_one_thread): Update.
+
+2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
+
+ * inferiors.c (set_inferior_target_data): Remove.
+ * inferiors.h (set_inferior_target_data): Remove.
+
+2017-08-18 Yao Qi <yao.qi@linaro.org>
+
+ * Makefile.in (OBS): Add selftest.o.
+ * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
+ * configure, config.in: Re-generated.
+ * server.c: Include common/sefltest.h.
+ (captured_main): Handle option --selftest.
+
2017-08-09 Yao Qi <yao.qi@linaro.org>
* configure.srv (srv_i386_regobj): Remove i386-avx.o,