Add attribute::as_unsigned method
[deliverable/binutils-gdb.git] / gdb / ChangeLog
index 1c950448c6f18b8d029131e984a3485688ba715c..9c161e421f506ac17bf76ccafa162056d706ae58 100644 (file)
@@ -1,3 +1,499 @@
+2020-09-29  Tom Tromey  <tom@tromey.com>
+
+       * dwarf2/read.c (dw2_get_file_names_reader)
+       (dwarf2_build_include_psymtabs, handle_DW_AT_stmt_list)
+       (dwarf2_cu::setup_type_unit_groups, fill_in_loclist_baton)
+       (dwarf2_symbol_mark_computed): Use as_unsigned.
+       * dwarf2/attribute.h (struct attribute) <as_unsigned>: New
+       method.
+       <form_is_section_offset>: Update comment.
+
+2020-09-29  Tom Tromey  <tom@tromey.com>
+
+       * dwarf2/read.c (dwarf2_access_attribute): Rename from
+       dwarf2_default_access_attribute.  Look up attribute.
+       (dwarf2_add_field, dwarf2_add_type_defn, dwarf2_add_member_fn):
+       Update.
+
+2020-09-29  Tom Tromey  <tom@tromey.com>
+
+       * dwarf2/read.c (skip_one_die): Update.
+       (read_full_die_1): Change how reprocessing is done.
+       (partial_die_info::read): Update.
+       (read_attribute_value): Remove need_reprocess parameter.
+       (read_attribute): Likewise.
+       * dwarf2/attribute.h (struct attribute) <requires_reprocessing_p>:
+       New method.
+
+2020-09-29  Tom Tromey  <tom@tromey.com>
+
+       * dwarf2/read.c (read_attribute_reprocess, read_attribute_value)
+       (dwarf2_const_value_attr, dump_die_shallow)
+       (dwarf2_fetch_constant_bytes): Update.
+       * dwarf2/attribute.h (struct attribute) <form_is_ref>: Update
+       comment.
+       <set_address>: New method.
+       (DW_ADDR): Remove.
+       * dwarf2/attribute.c (attribute::form_is_ref): Update comment.
+       (attribute::as_string, attribute::as_address): Add assert.
+
+2020-09-29  Tom Tromey  <tom@tromey.com>
+
+       * dwarf2/read.c (read_cutu_die_from_dwo): Use OBSTACK_ZALLOC.
+       (read_attribute_reprocess, read_attribute_value): Update.
+       (read_attribute): Clear requires_reprocessing.
+       * dwarf2/attribute.h (struct attribute) <as_unsigned_reprocess,
+       form_requires_reprocessing>: New methods.
+       <string_init>: Clear requires_reprocessing.
+       <set_unsigned_reprocess>: New method.
+       <name>: Shrink by one bit.
+       <requires_reprocessing>: New member.
+       * dwarf2/attribute.c (attribute::form_requires_reprocessing): New
+       method.
+
+2020-09-29  Tom Tromey  <tom@tromey.com>
+
+       * dwarf2/read.c (read_attribute_value): Update.
+       * dwarf2/attribute.h (struct attribute) <form_is_unsigned,
+       set_unsigned>: New methods.
+       * dwarf2/attribute.c (attribute::form_is_unsigned): New method.
+
+2020-09-29  Tom Tromey  <tom@tromey.com>
+
+       * dwarf2/read.c (get_alignment, read_array_order)
+       (read_attribute_value, dwarf2_const_value_attr)
+       (dump_die_shallow, dwarf2_fetch_constant_bytes): Update.
+       * dwarf2/attribute.h (struct attribute) <as_signed, set_signed>:
+       New methods.
+       (DW_SND): Remove.
+
+2020-09-29  Tom Tromey  <tom@tromey.com>
+
+       * dwarf2/read.c (read_attribute_value, lookup_die_type)
+       (dump_die_shallow, follow_die_sig, get_DW_AT_signature_type):
+       Update.
+       * dwarf2/attribute.h (struct attribute) <as_signature,
+       set_signature>: New methods.
+       (DW_SIGNATURE): Remove.
+
+2020-09-29  Tom Tromey  <tom@tromey.com>
+
+       * dwarf2/read.c (read_call_site_scope)
+       (handle_data_member_location, dwarf2_add_member_fn)
+       (mark_common_block_symbol_computed, attr_to_dynamic_prop)
+       (partial_die_info::read, read_attribute_value)
+       (var_decode_location, dwarf2_const_value_attr, dump_die_shallow)
+       (dwarf2_fetch_die_loc_sect_off, dwarf2_fetch_constant_bytes)
+       (dwarf2_symbol_mark_computed): Update.
+       * dwarf2/attribute.h (struct attribute) <as_block, set_block>: New
+       methods.
+       (DW_BLOCK): Remove.
+       * dwarf2/attribute.c (attribute::form_is_block): Add
+       DW_FORM_data16.
+
+2020-09-29  Tom Tromey  <tom@tromey.com>
+
+       * dwarf2/read.c (read_cutu_die_from_dwo)
+       (read_attribute_reprocess, read_attribute_value, read_attribute)
+       (dwarf2_const_value_attr, dwarf2_name, dump_die_shallow)
+       (dwarf2_fetch_constant_bytes): Update.
+       * dwarf2/attribute.h (struct attribute) <form_is_string>: Declare.
+       <set_string_noncanonical, set_string_canonical>: New methods.
+       <string_is_canonical>: Update comment.
+       <canonical_string_p>: Add assert.
+       (DW_STRING, DW_STRING_IS_CANONICAL): Remove.
+       * dwarf2/attribute.c (attribute::form_is_string): New method.
+       (attribute::string): Use it.
+
+2020-09-29  Tom Tromey  <tom@tromey.com>
+
+       * dwarf2/read.c (anonymous_struct_prefix, dwarf2_name)
+       (dump_die_shallow): Use canonical_string_p.
+       * dwarf2/attribute.h (struct attribute) <canonical_string_p>: New
+       method.
+
+2020-09-29  Tom Tromey  <tom@tromey.com>
+
+       * dwarf2/read.c (partial_die_info::read)
+       (dwarf2_const_value_attr, anonymous_struct_prefix, )
+       (dwarf2_name, dwarf2_fetch_constant_bytes): Use
+       attribute::as_string.
+
+2020-09-29  Tom Tromey  <tom@tromey.com>
+
+       * dwarf2/attribute.c (attribute::address): Don't use DW_UNSND or
+       DW_ADDR.
+       (attribute::string): Don't use DW_STRING.
+       (attribute::get_ref_die_offset): Don't use DW_UNSND.
+       (attribute::constant_value): Don't use DW_UNSND or DW_SND.
+
+2020-09-29  Tom Tromey  <tom@tromey.com>
+
+       * dwarf2/read.c (dwarf2_find_base_address, read_call_site_scope)
+       (dwarf2_get_pc_bounds, dwarf2_record_block_ranges)
+       (partial_die_info::read, dwarf2_string_attr, new_symbol): Update.
+       * dwarf2/attribute.h (struct attribute): Rename methods.
+       * dwarf2/attribute.c (attribute::as_address): Rename from
+       value_as_address.
+       (attribute::as_string): Rename from value_as_string.
+
+2020-09-29  Tom Tromey  <tom@tromey.com>
+
+       * dwarf2/read.c (partial_die_info::read) <case
+       DW_AT_linkage_name>: Use value_as_string.
+       (dwarf2_string_attr): Use value_as_string.
+       * dwarf2/attribute.h (struct attribute) <value_as_string>: Declare
+       method.
+       * dwarf2/attribute.c (attribute::value_as_string): New method.
+
+2020-09-29  Pedro Alves  <pedro@palves.net>
+
+       * unittests/enum-flags-selftests.c: Check whether __GNUC__ is
+       defined before using '#pragma GCC diagnostic' instead of checking
+       __clang__.
+
+2020-09-28  Tom Tromey  <tom@tromey.com>
+
+       * infrun.c (displaced_step_fixup, thread_still_needs_step_over)
+       (handle_signal_stop): Update.
+       * procfs.c (procfs_target::insert_watchpoint): Update.
+       * target.h (target_have_steppable_watchpoint): Now a function.
+
+2020-09-28  Tom Tromey  <tom@tromey.com>
+
+       * infrun.c (set_schedlock_func): Update.
+       * target.h (target_can_lock_scheduler): Now a function.
+
+2020-09-28  Tom Tromey  <tom@tromey.com>
+
+       * inferior.h (class inferior) <has_execution>: Update.
+       * windows-tdep.c (windows_solib_create_inferior_hook): Update.
+       * valops.c (find_function_in_inferior)
+       (value_allocate_space_in_inferior): Update.
+       * top.c (kill_or_detach): Update.
+       * target.c (target_preopen, set_target_permissions): Update.
+       (target_has_execution_current): Remove.
+       * sparc64-tdep.c (adi_examine_command, adi_assign_command):
+       Update.
+       * solib.c (update_solib_list, reload_shared_libraries): Update.
+       * solib-svr4.c (svr4_solib_create_inferior_hook): Update.
+       * solib-dsbt.c (enable_break): Update.
+       * score-tdep.c (score7_fetch_inst): Update.
+       * rs6000-nat.c (rs6000_nat_target::xfer_shared_libraries):
+       Update.
+       * remote.c (remote_target::start_remote)
+       (remote_target::remote_check_symbols, remote_target::open_1)
+       (remote_target::remote_detach_1, remote_target::verify_memory)
+       (remote_target::xfer_partial, remote_target::read_description)
+       (remote_target::get_min_fast_tracepoint_insn_len): Update.
+       * record-full.c (record_full_open_1): Update.
+       * record-btrace.c (record_btrace_target_open): Update.
+       * objc-lang.c (lookup_objc_class, lookup_child_selector)
+       (value_nsstring): Update.
+       * linux-thread-db.c (add_thread_db_info)
+       (thread_db_find_new_threads_silently, check_thread_db_callback)
+       (try_thread_db_load_1, record_thread): Update.
+       * linux-tdep.c (linux_info_proc, linux_vsyscall_range_raw):
+       Update.
+       * linux-fork.c (checkpoint_command): Update.
+       * infrun.c (set_non_stop, set_observer_mode)
+       (check_multi_target_resumption, for_each_just_stopped_thread)
+       (maybe_remove_breakpoints, normal_stop)
+       (class infcall_suspend_state): Update.
+       * infcmd.c (ERROR_NO_INFERIOR, kill_if_already_running)
+       (info_program_command, attach_command): Update.
+       * infcall.c (call_function_by_hand_dummy): Update.
+       * inf-loop.c (inferior_event_handler): Update.
+       * gcore.c (gcore_command, derive_heap_segment): Update.
+       * exec.c (exec_file_command): Update.
+       * eval.c (evaluate_subexp): Update.
+       * compile/compile.c (compile_to_object): Update.
+       * cli/cli-dump.c (restore_command): Update.
+       * breakpoint.c (update_watchpoint)
+       (update_inserted_breakpoint_locations)
+       (insert_breakpoint_locations, get_bpstat_thread): Update.
+       * target.h (target_has_execution): Remove macro.
+       (target_has_execution_current): Don't declare.
+       (target_has_execution): Rename from target_has_execution_1.  Add
+       argument default.
+
+2020-09-28  Tom Tromey  <tom@tromey.com>
+
+       * mi/mi-main.c (exec_reverse_continue)
+       (mi_cmd_list_target_features): Update.
+       * infrun.c (set_exec_direction_func): Update.
+       * target.c (default_execution_direction): Update.
+       * reverse.c (exec_reverse_once): Update.
+       * target.h (target_can_execute_reverse): Now a function.
+
+2020-09-28  Tom Tromey  <tom@tromey.com>
+
+       * tui/tui-regs.c (tui_get_register)
+       (tui_data_window::show_registers): Update.
+       * thread.c (scoped_restore_current_thread::restore)
+       (scoped_restore_current_thread::scoped_restore_current_thread):
+       Update.
+       * regcache-dump.c (regcache_print): Update.
+       * python/py-finishbreakpoint.c (bpfinishpy_detect_out_scope_cb):
+       Update.
+       * mi/mi-main.c (mi_cmd_data_write_register_values): Update.
+       * mep-tdep.c (current_me_module, current_options): Update.
+       * linux-thread-db.c (thread_db_load): Update.
+       * infcmd.c (registers_info, info_vector_command)
+       (info_float_command): Update.
+       * ia64-tdep.c (ia64_frame_prev_register)
+       (ia64_sigtramp_frame_prev_register): Update.
+       * ia64-libunwind-tdep.c (libunwind_frame_prev_register): Update.
+       * gcore.c (derive_stack_segment): Update.
+       * frame.c (get_current_frame, has_stack_frames): Update.
+       * findvar.c (language_defn::read_var_value): Update.
+       * arm-tdep.c (arm_pc_is_thumb): Update.
+       * target.c (target_has_registers): Rename from
+       target_has_registers_1.
+       * target.h (target_has_registers): Remove macro.
+       (target_has_registers): Rename from target_has_registers_1.
+
+2020-09-28  Tom Tromey  <tom@tromey.com>
+
+       * windows-tdep.c (tlb_make_value): Update.
+       * tui/tui-regs.c (tui_data_window::show_registers): Update.
+       * thread.c (scoped_restore_current_thread::restore)
+       (scoped_restore_current_thread::scoped_restore_current_thread)
+       (thread_command): Update.
+       * stack.c (backtrace_command_1, frame_apply_level_command)
+       (frame_apply_all_command, frame_apply_command): Update.
+       * infrun.c (siginfo_make_value, restore_infcall_control_state):
+       Update.
+       * gcore.c (derive_stack_segment): Update.
+       * frame.c (get_current_frame, has_stack_frames): Update.
+       * auxv.c (info_auxv_command): Update.
+       * ada-tasks.c (ada_build_task_list): Update.
+       * target.c (target_has_stack): Rename from target_has_stack_1.
+       * target.h (target_has_stack): Remove macro.
+       (target_has_stack): Rename from target_has_stack_1.
+
+2020-09-28  Tom Tromey  <tom@tromey.com>
+
+       * target.c (target_has_memory): Rename from target_has_memory_1.
+       * tui/tui-regs.c (tui_data_window::show_registers): Update.
+       * thread.c (scoped_restore_current_thread::restore)
+       (scoped_restore_current_thread::scoped_restore_current_thread):
+       Update.
+       * frame.c (get_current_frame, has_stack_frames): Update.
+       * target.h (target_has_memory): Remove macro.
+       (target_has_memory): Rename from target_has_memory_1.
+
+2020-09-28  Tom Tromey  <tom@tromey.com>
+
+       * target.c (target_has_all_memory_1): Remove.
+       * target.h (target_has_all_memory): Remove define.
+       (target_has_all_memory_1): Don't declare.
+
+2020-09-28  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * ser-base.c: Adjust comments formatting.
+
+2020-09-27  Tom Tromey  <tom@tromey.com>
+
+       PR tui/25342:
+       * tui/tui-io.c (tui_puts): Rewrite.  Move earlier.
+
+2020-09-27  Tom Tromey  <tom@tromey.com>
+
+       PR tui/25342:
+       * tui/tui-winsource.c (tui_copy_source_line): Use ISNCTRL.
+
+2020-09-27  Tom Tromey  <tom@tromey.com>
+
+       * unittests/tui-selftests.c: Update.
+       * tui/tui-winsource.h (struct tui_source_window_base)
+       <extra_margin, show_line_number, refresh_pad>: New methods.
+       <m_max_length, m_pad>: New members.
+       (tui_copy_source_line): Update.
+       * tui/tui-winsource.c (tui_copy_source_line): Remove line_no,
+       first_col, line_width, ndigits parameters.  Add length.
+       (tui_source_window_base::show_source_line): Write to pad.  Line
+       number now 0-based.
+       (tui_source_window_base::refresh_pad): New method.
+       (tui_source_window_base::show_source_content): Write to pad.  Call
+       refresh_pad.
+       (tui_source_window_base::do_scroll_horizontal): Call refresh_pad,
+       not refill.
+       (tui_source_window_base::update_exec_info): Call
+       show_line_number.
+       * tui/tui-source.h (struct tui_source_window) <extra_margin>: New
+       method.
+       <m_digits>: New member.
+       * tui/tui-source.c (tui_source_window::set_contents): Set m_digits
+       and m_max_length.
+       (tui_source_window::show_line_number): New method.
+       * tui/tui-io.h (tui_puts): Fix comment.
+       * tui/tui-disasm.c (tui_disasm_window::set_contents): Set
+       m_max_length.
+
+2020-09-27  Tom Tromey  <tom@tromey.com>
+
+       * tui/tui-winsource.c
+       (tui_source_window_base::set_is_exec_point_at): Don't call
+       show_source_line.
+
+2020-09-27  Tom Tromey  <tom@tromey.com>
+
+       * python/py-tui.c (class tui_py_window) <refresh_window>: New
+       method.
+       <erase>: Update.
+       <cursor_x, cursor_y>: Remove.
+       <m_inner_window>: New member.
+       (tui_py_window::rerender): Create inner window.
+       (tui_py_window::output): Write to inner window.
+
+2020-09-26  Gareth Rees <grees@undo.io>  (tiny change)
+
+       PR python/26586
+       * cli/cli-script.c (execute_control_commands): don't set
+       instream to nullptr here as this breaks the from_tty argument
+       to gdb.execute in Python.
+       (execute_user_command): set instream to nullptr here instead.
+
+2020-09-25  Simon Marchi  <simon.marchi@efficios.com>
+
+       * infrun.h (infrun_debug_printf): Fix formatting.
+       * linux-nat.c (linux_nat_debug_printf): Fix formatting.
+
+2020-09-25  Saagar Jha  <saagar@saagarjha.com>
+
+       * compile/compile-object-load.h (struct munmap_list): Add
+       explicitly-defined move constructor.
+
+2020-09-24  Tom Tromey  <tromey@adacore.com>
+
+       PR tui/26638:
+       * tui/tui-stack.h (struct tui_locator_window) <can_focus>: New
+       method.
+       * tui/tui-data.h (struct tui_win_info) <can_focus>: New method.
+       * tui/tui-data.c (tui_next_win): Exclude non-focusable windows.
+       (tui_prev_win): Rewrite.
+
+2020-09-23  Hannes Domani  <ssbssa@yahoo.de>
+
+       * nat/windows-nat.c (handle_exception): Handle 64bit breakpoints
+       in WOW64 processes as SIGINT.
+       * nat/windows-nat.h: Make wow64_process a shared variable.
+       * windows-nat.c: Remove static wow64_process variable.
+
+2020-09-23  Tom Tromey  <tom@tromey.com>
+
+       PR symtab/25470:
+       * value.c (unpack_long, pack_long, pack_unsigned_long): Handle bit
+       offset and bit size.
+       * printcmd.c (print_scalar_formatted): Handle zero-length
+       integer.
+       (print_scalar_formatted): Use bit_size_differs_p.
+       * gdbtypes.h (enum type_specific_kind) <TYPE_SPECIFIC_INT>: New
+       constant.
+       (union type_specific): <int_stuff>: New member.
+       (struct type) <bit_size_differs_p, bit_size, bit_offset>: New
+       methods.
+       * gdbtypes.c (init_integer_type, init_boolean_type): Initialize
+       TYPE_SPECIFIC_FIELD.
+       (recursive_dump_type, copy_type_recursive): Update.
+       * dwarf2/read.c (read_base_type): Handle DW_AT_bit_size and
+       DW_AT_data_bit_offset.
+
+2020-09-23  Tom Tromey  <tom@tromey.com>
+
+       * utils.h (class gdb_argv): Add move operators.
+       <append>: New methods.
+       * compile/compile.c (build_argc_argv): Remove.
+       (compile_args_argc): Remove.
+       (compile_args_argv): Change type.
+       (set_compile_args): Simplify.
+       (append_args): Remove.
+       (filter_args): Remove argcp parameter.
+       (get_args): Return gdb_argv.  Simplify.
+       (compile_to_object): Update.
+
+2020-09-23  Tom Tromey  <tom@tromey.com>
+
+       * compile/compile-object-run.c (do_module_cleanup)
+       <~do_module_cleanup> :Remove.
+       (do_module_cleanup): Update.
+       * compile/compile-object-load.h (struct munmap_list): Add move
+       assignment operator.
+       <source_file>: Now a std::string.
+       <munmap_list>: Rename.  No longer a pointer.
+       * compile/compile-object-load.c (struct setup_sections_data): Add
+       constructor.
+       <setup_one_section>: Declare.
+       <munmap_list>: Move earlier.
+       <m_bfd>: New member.
+       <m_last_size, m_last_section_first, m_last_prot,
+       m_last_max_alignment>: Rename, add initializers where needed.
+       (setup_sections_data::setup_one_section): Rename from
+       setup_sections.  Update.
+       (compile_object_load): Update.  Don't use bfd_map_over_sections.
+
+2020-09-23  Tom Tromey  <tom@tromey.com>
+
+       * compile/compile-object-run.c (struct do_module_cleanup): Add
+       parameters to constructor.  Update destructor.
+       <source_file, scope, scope_data, out_value_type, out_value_addr,
+       munmap_list_head, objfile_name_string>: Remove.
+       <module>: New member.
+       (do_module_cleanup): Update.
+       (compile_object_run): Update.
+
+2020-09-23  Tom Tromey  <tom@tromey.com>
+
+       * compile/compile.c (eval_compile_command): Update.
+       * compile/compile-object-run.h (compile_object_run): Take a
+       compile_module_up.
+       * compile/compile-object-run.c (compile_object_run): Take a
+       compile_module_up.
+       * compile/compile-object-load.h (struct compile_module): Add
+       constructor, destructor.
+       (compile_module_up): New typedef.
+       (compile_object_load): Return compile_object_up.
+       * compile/compile-object-load.c (compile_object_load): Return
+       compile_module_up.
+
+2020-09-23  Tom Tromey  <tom@tromey.com>
+
+       * compile/compile-object-run.c (struct do_module_cleanup): Add
+       constructor, destructor.
+       <objfile_name_string>: Don't use struct hack.
+       (do_module_cleanup): Use delete.
+       (compile_object_run): Use new.
+
+2020-09-23  Tom Tromey  <tom@tromey.com>
+
+       * compile/compile-cplus-types.c
+       (compile_cplus_convert_struct_or_union): Use std::vector.
+       (compile_cplus_convert_func): Likewise.
+       * compile/compile-c-types.c (convert_func): Use std::vector.
+
+2020-09-21  Tom Tromey  <tromey@adacore.com>
+
+       * sparc-tdep.c (sparc32_skip_prologue): Use
+       skip_prologue_using_sal.
+
+2020-09-19  Tom Tromey  <tom@tromey.com>
+
+       * symfile.c (add_section_size_callback): Remove.
+       (load_one_section): Rename from load_section_callback.  Change
+       parameters.
+       (generic_load): Use foreach.
+
+2020-09-19  Tom Tromey  <tom@tromey.com>
+
+       * exec.c (add_to_section_table): Remove.
+       (build_section_table): Use foreach.
+
+2020-09-19  Tom Tromey  <tom@tromey.com>
+
+       * elfread.c (elf_locate_sections): Change parameters.
+       (elf_symfile_read): Use foreach.
+
 2020-09-19  Tom Tromey  <tom@tromey.com>
 
        * cli/cli-dump.c (struct callback_data): Remove.
        sites to use type::set_is_unsigned.
 
 2020-09-14  Fredrik Hederstierna  <fredrik.hederstierna@verisure.com>
-            Adam Renquinha <arenquinha@cimeq.qc.ca>
+           Adam Renquinha <arenquinha@cimeq.qc.ca>
 
-        * arm-tdep.c (arm_m_exception_cache): Try use correct stack
-        pointer and stack frame offset when unwinding.
+       * arm-tdep.c (arm_m_exception_cache): Try use correct stack
+       pointer and stack frame offset when unwinding.
 
 2020-09-13  Pedro Alves  <pedro@palves.net>
 
This page took 0.031526 seconds and 4 git commands to generate.