-Wwrite-strings: Constify target_pid_to_str and target_thread_extra_thread_info
[deliverable/binutils-gdb.git] / gdb / ChangeLog
index 298948e4ddf29042914ad4df7e23a14575a3ca7f..f0219682c50d1afa7d0f67085b3a4ac6e2415d45 100644 (file)
@@ -1,3 +1,500 @@
+2017-04-05  Pedro Alves  <palves@redhat.com>
+
+       * aix-thread.c (aix_thread_pid_to_str)
+       (aix_thread_extra_thread_info): Constify.
+       * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
+       * bsd-uthread.c (bsd_uthread_extra_thread_info)
+       (bsd_uthread_pid_to_str): Constify.
+       * corelow.c (core_pid_to_str): Constify.
+       * darwin-nat.c (darwin_pid_to_str): Constify.
+       * fbsd-nat.c (fbsd_pid_to_str): Constify.
+       * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
+       Constify.
+       * gnu-nat.c (gnu_pid_to_str): Constify.
+       * go32-nat.c (go32_pid_to_str): Constify.
+       * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
+       * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
+       * inferior.c (inferior_pid_to_str): Constify.
+       * linux-nat.c (linux_nat_pid_to_str): Constify.
+       * linux-tdep.c (linux_core_pid_to_str): Constify.
+       * linux-thread-db.c (thread_db_pid_to_str)
+       (thread_db_extra_thread_info): Constify.
+       * nto-tdep.c (nto_extra_thread_info): Constify.
+       * nto-tdep.h (nto_extra_thread_info): Constify.
+       * obsd-nat.c (obsd_pid_to_str): Constify.
+       * procfs.c (procfs_pid_to_str): Constify.
+       * ravenscar-thread.c (ravenscar_extra_thread_info)
+       (ravenscar_pid_to_str): Constify.
+       * remote-sim.c (gdbsim_pid_to_str): Constify.
+       * remote.c (remote_threads_extra_info, remote_pid_to_str):
+       Constify.
+       * sol-thread.c (solaris_pid_to_str): Constify.
+       * sol2-tdep.c (sol2_core_pid_to_str): Constify.
+       * sol2-tdep.h (sol2_core_pid_to_str): Constify.
+       * target.c (default_pid_to_str, target_pid_to_str)
+       (normal_pid_to_str, default_pid_to_str): Constify.
+       * target.h (target_ops::to_pid_to_str)
+       (target_ops::to_extra_thread_info): Constify.
+       (target_pid_to_str, normal_pid_to_str): Constify.
+       * windows-nat.c (windows_pid_to_str): Constify.
+       * gdbarch.sh (core_pid_to_str): Constify.
+       * target-delegates.c: Regenerate.
+       * gdbarch.h, gdbarch.c: Regenerate.
+
+2017-04-05  Pedro Alves         <palves@redhat.com>
+
+       * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
+       the memory of the temporary warning_pre_print override.
+       * utils.c (warning_pre_print): Constify.
+       * utils.h (warning_pre_print): Constify.
+
+2017-04-05  Pedro Alves         <palves@redhat.com>
+
+       * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
+       (shell_command): New function.
+       (make_command): Use std::string.
+       (init_cli_cmds): Register shell_command instead of shell_escape.
+
+2017-04-05  Pedro Alves  <palves@redhat.com>
+
+       * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
+       * tracepoint.c (default_collect): Don't initialize.
+
+2017-04-05  Pedro Alves  <palves@redhat.com>
+
+       * macroexp.c (macro_buffer::shared): Now a bool.
+       (init_buffer): Update.
+       (init_shared_buffer): Constify 'addr' parameter.
+       (substitute_args, expand, macro_expand, macro_expand_next): Remove
+       casts.
+
+2017-04-05  Pedro Alves  <palves@redhat.com>
+
+       * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
+       * disasm.c (set_disassembler_options): Constify local.
+       * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
+
+2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+       PR gdb/21352
+       * tracefile.c (tsave_command): Fix argument parsing for '-r'
+       option.
+
+2017-04-05  Yao Qi  <yao.qi@linaro.org>
+
+       * frame.c (frame_unwind_register_unsigned): Call
+       frame_unwind_register_value.
+
+2017-04-05  Yao Qi  <yao.qi@linaro.org>
+
+       * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
+       Use gdb_test_multiple, and don't match anchor.
+
+2017-04-05  Pedro Alves  <palves@redhat.com>
+
+       * MAINTAINERS (Global Maintainers): Add Simon Marchi.
+       (Write After Approval): Remove Simon Marchi.
+
+2017-04-05  Pedro Alves  <palves@redhat.com>
+
+       * common/gdb_optional.h (optional::optional): Make constexpr and
+       initialize m_dummy.
+
+2017-04-04  John Baldwin  <jhb@FreeBSD.org>
+
+       * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
+       (amd64fbsd_jmp_buf_reg_offset): Remove.
+       (amd64fbsd_supply_uthread): Remove function.
+       (amd64fbsd_collect_uthread): Remove function.
+       (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
+       * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
+       (x86_64-*-freebsd*): Remove bsd-uthread.o.
+       (fbsd-nat.c): Update comment.
+       * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
+       (i386fbsd_jmp_buf_reg_offset): Remove.
+       (i386fbsd_supply_uthread): Remove function.
+       (i386fbsd_collect_uthread): Remove function.
+       (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
+
+2017-04-04  John Baldwin  <jhb@FreeBSD.org>
+
+       * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
+       (ALLDEPFILES): Remove alpha-fbsd-tdep.c
+       * NEWS: Mention that support for FreeBSD/alpha was removed.
+       * alpha-fbsd-tdep.c: Delete file.
+       * config/alpha/fbsd.mh: Delete file.
+       * configure.host: Delete alpha*-*-freebsd* and
+       alpha*-*-kfreebsd*-gnu.
+       * configure.tgt: Delete alpha*-*-freebsd* and
+       alpha*-*-kfreebsd*-gnu.
+
+2017-04-04  John Baldwin  <jhb@FreeBSD.org>
+
+       * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
+       amd64bsd_store_inferior_registers): Use ptid from regcache.
+
+2017-04-04  Pedro Alves  <palves@redhat.com>
+
+       * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
+       data fields, make them private and add "m_" prefixes.
+       (lnp_state_machine::lnp_state_machine): New ctor.
+       (record_line, check_line_address, handle_set_discriminator)
+       (handle_set_address, handle_advance_pc, handle_special_opcode)
+       (handle_advance_line, handle_set_file, handle_negate_stmt)
+       (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
+       (end_sequence, advance_line): New methods.
+       (m_gdbarch, m_record_lines_p): New fields.
+       (lnp_reader_state): Delete.
+       (dwarf_record_line): Rename to ...
+       (lnp_state_machine::record_line): ... adjust.
+       (init_lnp_state_machine): Delete.
+       (lnp_state_machine::lnp_state_machine): New.
+       (check_line_address): Rename to ...
+       (lnp_state_machine::check_line_address): This.
+       (dwarf_decode_lines_1): Remove reference to "reader_state".
+       Adjust lnp_state_machine having a non-default ctor.  Use bool.
+       State machine internal state manipulation moved to
+       lnp_state_machine methods.
+
+2017-04-04  Pedro Alves  <palves@redhat.com>
+
+       * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
+       unittests/offset-type-selftests.c.
+       (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
+       * common/offset-type.h: New file.
+       * common/preprocessor.h: New file.
+       * common/traits.h: New file.
+       * common/valid-expr.h: New file.
+       * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
+       sect_offset and cu_offset strong typedefs throughout.
+       * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
+       typedefs throughout.
+       * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
+       sect_offset and cu_offset strong typedefs throughout.
+       * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
+       typedefs throughout.
+       * gdbtypes.h: Include "common/offset-type.h".
+       (cu_offset): Now an offset type (strong typedef) instead of a
+       struct.
+       (sect_offset): Likewise.
+       (union call_site_parameter_u): Rename "param_offset" field to
+       "param_cu_off".
+       * unittests/offset-type-selftests.c: New file.
+
+2017-04-04  Pedro Alves  <palves@redhat.com>
+
+       * common/underlying.h: New file.
+       * dwarf2read.c: Include "common/gdb_optional.h" and
+       "common/underlying.h".
+       (dir_index, file_name_index): New types.
+       (file_entry): Use them.
+       (file_entry::include): Use to_underlying.
+       (line_header::add_file_name): Use dir_index.
+       (read_formatted_entries): Use gdb::optional.  Read form before
+       writting to file_entry.
+       (dwarf_decode_line_header): Use dir_index.
+       (lnp_state_machine::current_file): Use to_underlying.
+       (lnp_state_machine::file): Change type to file_name_index.
+       (dwarf_record_line): Use to_underlying.
+       (init_lnp_state_machine): Use file_name_index.
+       (dwarf_decode_lines_1): Use dir_index and file_name_index.
+
+2017-04-04  Pedro Alves  <palves@redhat.com>
+
+       * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
+       operator bool, has_value and get methods.
+
+2017-04-04  Pedro Alves  <palves@redhat.com>
+
+       * dwarf2read.c (struct file_entry): Add ctors, and initialize all
+       fields.
+       (line_header): Initialize all data fields.  Change type of
+       standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
+       Change type of include_dirs to std::vector<const char *>.  Remove
+       num_include_dirs, include_dirs_size.  Change type of file_names to
+       std::vector<file_entry>.  Remove num_file_names, file_names_size.
+       (line_header::line_header): New.
+       (line_header::add_include_dir, line_header::add_file_name): New
+       methods.
+       (line_header::include_dir_at): Remove NULL check.
+       (line_header::file_name_at): Add const overload.
+       (line_header_up): New unique_ptr typedef.
+       (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
+       std::vector.  Remove free_line_header call.
+       (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
+       free_line_header call.
+       (free_cu_line_header): Delete.
+       (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
+       (setup_type_unit_groups): Use line_header_up instead of cleanups.
+       Adjust to use std::vector.
+       (free_line_header): Delete.
+       (free_line_header_voidp): Use delete.
+       (add_include_dir): Replace with ...
+       (line_header::add_include_dir): ... this method.  Use std::vector.
+       (add_file_name): Replace with ...
+       (line_header::add_file_name): ... this method.  Use std::vector.
+       (add_include_dir_stub): Delete.
+       (read_formatted_entries): Remove memset.
+       (dwarf_decode_line_header): Return a line_header_up instead of a
+       raw pointer.  Remove cleanup handling.  Pass lambdas to
+       read_formatted_entries.  Adjust to use line_header methods.
+       (dwarf_decode_lines_1): Adjust to use line_header methods.
+       (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
+       use std::vector.
+
+2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * remote.c (set_general_thread, set_continue_thread): Use ptid_t
+       instead of struct ptid.
+
+2017-05-04  Alan Hayward  <alan.hayward@arm.com>
+
+       * frame.c (get_frame_register_bytes): Unwind using value.
+       (put_frame_register_bytes): Likewise.
+
+2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
+
+2017-03-29  Yao Qi  <yao.qi@linaro.org>
+
+       * gdbthread.h (struct thread_info): Declare constructor and
+       destructor.  Add some in-class member initializers.
+       * thread.c (free_thread): Remove.
+       (init_thread_list): Call delete instead of free_thread.
+       (new_thread): Call thread_info constructor.
+       (thread_info::thread_info): New function.
+       (thread_info::~thread_info): New function.
+       (delete_thread_1): Call delete instead of free_thread.
+       (make_cleanup_restore_current_thread): Move tp and frame to
+       inner block.
+
+2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
+
+       * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
+       (arc_skip_prologue): Likewise.
+       (arc_make_frame_cache): Likewise.
+       (arc_pv_get_operand): New function.
+       (arc_is_in_prologue): Likewise.
+       (arc_analyze_prologue): Likewise.
+       (arc_print_frame_cache): Likewise.
+       (MAX_PROLOGUE_LENGTH): New constant.
+
+2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
+
+       * configure.tgt: Add arc-insn.o.
+       * arc-tdep.c (arc_delayed_print_insn): Make non-static.
+       (dump_arc_instruction_command): New function.
+       (arc_fprintf_disasm): Likewise.
+       (arc_disassemble_info): Likewise.
+       (arc_insn_get_operand_value): Likewise.
+       (arc_insn_get_operand_value_signed): Likewise.
+       (arc_insn_get_memory_base_reg): Likewise.
+       (arc_insn_get_memory_offset): Likewise.
+       (arc_insn_get_branch_target): Likewise.
+       (arc_insn_dump): Likewise.
+       (arc_insn_get_linear_next_pc): Likewise.
+       * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
+       (arc_disassemble_info): Likewise.
+       (arc_insn_get_branch_target): Likewise.
+       (arc_insn_get_linear_next_pc): Likewise.
+       * NEWS: Mention new "maint print arc arc-instruction".
+
+2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
+
+       * arc-tdep (maintenance_print_arc_list): New variable.
+       (maintenance_print_arc_command): New function.
+
+2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
+
+       * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
+       Add "limm" and "reserved".
+       (arc_cannot_fetch_register, arc_cannot_store_register): Add
+       ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
+       * arc-tdep.h (arc_regnum): Likewise.
+
+2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
+
+       * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
+       for THREADPTR register.
+       (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
+       register.
+       * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
+       (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
+       * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
+
+2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
+
+       * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
+       registers above gdbarch_num_regs (gdbarch) as privileged in
+       call0 ABI.
+
+2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
+
+       * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
+       for a single specified register or for all registers in
+       a0_base..a0_base + C0_NREGS range.
+       (supply_gregset_reg): Call regcache_raw_supply for a single
+       specified register or for all registers in a0_base..a0_base +
+       C0_NREGS range.
+
+2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
+
+       * arch/xtensa.h (C0_NREGS): Add definition.
+       * xtensa-tdep.c (C0_NREGS): Remove definition.
+
+2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
+
+       * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
+       Drop xtensa_default_isa initialization.
+       (xtensa_gdbarch_init): Initialize xtensa_default_isa.
+
+2017-03-27  Pedro Alves  <palves@redhat.com>
+
+       * dwarf2read.c (file_entry) <dir_index>: Add comment.
+       (file_entry::include_dir): New method.
+       (line_header::include_dir_at, line_header::file_name_at): New
+       methods.
+       (setup_type_unit_groups, setup_type_unit_groups)
+       (psymtab_include_file_name): Simplify using the new methods.
+       (lnp_state_machine) <the_line_header>: New field.
+       <file>: Add comment.
+       (lnp_state_machine::current_file): New method.
+       (dwarf_record_line): Simplify using the new methods.
+       (init_lnp_state_machine): Initialize the "the_line_header" field.
+       (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
+       Simplify using the new methods.
+
+2017-03-27  Pedro Alves  <palves@redhat.com>
+
+       * cp-name-parser.y (make_empty): Delete.
+       (demangler_special, nested_name, ptr_operator, array_indicator)
+       (direct_declarator, declarator_1): Use fill_comp instead of
+       make_empty.
+
+2017-03-27  Pedro Alves  <palves@redhat.com>
+
+       * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
+       to ATTRIBUTE_PRINTF.
+       * solib-target.c (library_list_start_list): Print "string" not
+       "version".
+       * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
+       gdb_xml_error call.
+
+2017-03-27  Pedro Alves  <palves@redhat.com>
+
+       * dwarf2read.c (struct file_and_directory): New.
+       (dwarf2_get_dwz_file): Adjust to use std::string.
+       (dw2_get_file_names_reader): Adjust to use file_and_directory.
+       (find_file_and_directory): Adjust to return a file_and_directory
+       object.
+       (read_file_scope): Adjust to use file_and_directory.  Remove
+       make_cleanup/do_cleanups calls.
+       (open_and_init_dwp_file): Adjust to use std::string.  Remove
+       make_cleanup/do_cleanups calls.
+       * python/python.c (do_start_initialization): Adjust to ldirname
+       returning a std::string.
+       * utils.c (ldirname): Now returns a std::string.
+       * utils.h (ldirname): Change return type to std::string.
+       * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
+       returning a std::string.
+       * xml-tdesc.c (file_read_description_xml): Likewise.
+
+2017-03-24  Alan Hayward  <alan.hayward@arm.com>
+
+       * regcache.c (regcache_debug_print_register): New function.
+       * regcache.h (regcache_debug_print_register): New declaration.
+       * target.c (debug_print_register): Remove.
+       (target_fetch_registers): Call regcache_debug_print_register.
+       (target_store_registers): Likewise.
+
+2017-03-24  Pádraig Brady  <pbrady@fb.com>
+
+       * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
+       reference beyond the 'lh->include_dirs' array before accessing to
+       it.
+       (psymtab_include_file_name): Likewise.
+       (dwarf_decode_lines_1): Likewise.
+       (dwarf_decode_lines): Likewise.
+       (file_file_name): Likewise.
+
+2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
+
+       * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
+       inferior_ptid.
+       * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
+       ps_lsetfpregs): Likewise.
+       * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
+       * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
+       ps_lsetfpregs): Likewise.
+       * target.c (target_fetch_registers, target_store_registers):
+       Remove asserts.
+
+2017-03-23  Alan Hayward  <alan.hayward@arm.com>
+
+       * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
+
+2017-03-23  Yao Qi  <yao.qi@linaro.org>
+
+       * aarch64-tdep.c (aarch64_process_record_test): Declare.
+       (_initialize_aarch64_tdep): Register it.
+       (aarch64_record_load_store): Handle PRFM instruction.
+       (aarch64_process_record_test): New function.
+
+2017-03-23  Yao Qi  <yao.qi@linaro.org>
+
+       * aarch64-tdep.c (aarch64_record_load_store): Fix code
+       indentation.
+
+2017-03-23  Yao Qi  <yao.qi@linaro.org>
+
+       * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
+
+2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
+
+       python/python.c (do_start_initialization): Fix memory leak.
+
+2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
+       using get_ptrace_pid.
+       * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
+       inferior_ptid.
+       (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
+       inferior_ptid instead of pid.
+
+2017-03-22  Yao Qi  <yao.qi@linaro.org>
+
+       * aarch64-tdep.c: Wrap locally used classes in anonymous
+       namespace.
+       * arm-tdep.c: Likewise.
+       * linespec.c: Likewise.
+       * ui-out.c: Likewise.
+
+2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
+
+       PR gdb/19637
+       * python/lib/gdb/printer/bound_registers.py: Import sys.
+
+2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
+
+       * windows-nat.c (do_windows_fetch_inferior_registers): Add
+       windows_thread_info parameter and use it instead of
+       current_thread.
+       (windows_fetch_inferior_registers): Don't set current_thread,
+       pass the thread to do_windows_fetch_inferior_registers.  Use
+       ptid from regcache instead of inferior_ptid.
+       (do_windows_store_inferior_registers): Add windows_thread_info
+       parameter and use it instead of current_thread.
+       (windows_store_inferior_registers): Don't set current_thread,
+       pass the thread to do_windows_store_inferior_registers.  Use
+       ptid from regcache instead of inferior_ptid.
+
+2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
+
+       * ser-mingw.c (ser_windows_raw): Remove reference to
+       struct serial::current_timeout.
+
 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
 
        PR tdep/20928
This page took 0.028897 seconds and 4 git commands to generate.