Fix double-free when creating more than one block in JIT debug info reader
[deliverable/binutils-gdb.git] / gdb / ChangeLog
index 165ffda25109dadc809754104f22655565ebd2a5..c30b60efbfd29577448c8bf8a4e5a2173addca6e 100644 (file)
@@ -1,3 +1,321 @@
+2019-12-16  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * jit.c (finalize_symtab): Set gdb_block_iter_tmp in loop.
+
+2019-12-16  Tom Tromey  <tromey@adacore.com>
+
+       * windows-nat.c (windows_nat_target::attach): Update.
+       * remote.c (extended_remote_target::attach): Update.
+       * procfs.c (procfs_target::attach): Update.
+       * nto-procfs.c (nto_procfs_target::attach): Update.
+       (nto_procfs_target::create_inferior): Update.
+       * inf-ptrace.c (inf_ptrace_target::attach): Update.
+       * gnu-nat.c (gnu_nat_target::attach): Update.
+       (gnu_nat_target::detach): Update.
+       * darwin-nat.c (darwin_nat_target::attach): Update.
+       * corefile.c (get_exec_file): Constify result.  Remove extraneous
+       return.
+       * bsd-kvm.c (bsd_kvm_target_open): Update.
+       * gdbsupport/common-inferior.h (get_exec_file): Constify result.
+
+2019-12-16  Christian Biesinger  <cbiesinger@google.com>
+
+       * gdbsupport/common-defs.h: Remove workaround for a gnulib bug
+       (we no longer need to include time.h before pathmax.h)
+
+2019-12-15  Christian Biesinger  <cbiesinger@google.com>
+
+       * ada-exp.y (write_ambiguous_var): Update.
+       * coffread.c (process_coff_symbol): Update.
+       * ctfread.c (ctf_add_enum_member_cb): Update.
+       (new_symbol): Update.
+       * dwarf2read.c (fixup_go_packaging): Update.
+       (new_symbol): Update.
+       * language.c (language_alloc_type_symbol): Update.
+       * mdebugread.c (new_symbol): Update.
+       * minsyms.c (minimal_symbol_reader::record_full): Update.
+       * psymtab.c (add_psymbol_to_bcache): Update.
+       * stabsread.c (define_symbol): Update.
+       (read_enum_type): Update.
+       * symtab.c (symbol_set_language): Make this a member function...
+       (general_symbol_info::set_language): ... here.
+       * symtab.h (struct general_symbol_info) <set_language>: New function.
+       (SYMBOL_SET_LANGUAGE): Remove.
+       (symbol_set_language): Remove.
+
+2019-12-15  Christian Biesinger  <cbiesinger@google.com>
+
+       * ada-lang.c (ada_add_block_symbols): Update.
+       (ada_collect_symbol_completion_matches): Update.
+       * ax-gdb.c (gen_expr): Update.
+       * block.c (block_lookup_symbol): Update.
+       (block_lookup_symbol_primary): Update.
+       (block_find_symbol): Update.
+       * cp-namespace.c (cp_lookup_symbol_imports_or_template): Update.
+       * dbxread.c (process_one_symbol): Update.
+       * dictionary.c (insert_symbol_hashed): Update.
+       (collate_pending_symbols_by_language): Update.
+       (mdict_add_symbol): Update.
+       * dwarf-index-write.c (write_psymbols): Update.
+       * dwarf2read.c (fixup_go_packaging): Update.
+       * findvar.c (read_var_value): Update.
+       * ft32-tdep.c (ft32_skip_prologue): Update.
+       * go-lang.c (go_symbol_package_name): Update.
+       * language.h (scoped_switch_to_sym_language_if_auto::
+       scoped_switch_to_sym_language_if_auto): Update.
+       * linespec.c (find_method): Update.
+       (find_label_symbols_in_block): Update.
+       * mdebugread.c (parse_symbol): Update.
+       * mi/mi-cmd-stack.c (list_arg_or_local): Update.
+       * minsyms.c (add_minsym_to_demangled_hash_table): Update.
+       (minimal_symbol_reader::install): Update.
+       * moxie-tdep.c (moxie_skip_prologue): Update.
+       * parse.c (parse_exp_in_context): Update.
+       * psymtab.c (psymbol_name_matches): Update.
+       (match_partial_symbol): Update.
+       (lookup_partial_symbol): Update.
+       (psymbol_hash): Update.
+       (psymbol_compare): Update.
+       * python/py-framefilter.c (extract_sym): Update.
+       (py_print_single_arg): Update.
+       * stabsread.c (define_symbol): Update.
+       * stack.c (print_frame_arg): Update.
+       (find_frame_funname): Update.
+       (info_frame_command_core): Update.
+       * symfile.c (set_initial_language): Update.
+       * symtab.c (symbol_set_demangled_name): Update.
+       (symbol_get_demangled_name): Update.
+       (symbol_set_language): Update.
+       (symbol_find_demangled_name): Update.
+       (symbol_set_names): Update.
+       (general_symbol_info::natural_name): Update.
+       (general_symbol_info::demangled_name): Update.
+       (general_symbol_info::search_name): Update.
+       (symbol_matches_search_name): Update.
+       (eq_symbol_entry): Update.
+       (iterate_over_symbols): Update.
+       (completion_list_add_symbol): Update.
+       (completion_list_add_msymbol): Update.
+       (completion_list_add_fields): Update.
+       * symtab.h (struct general_symbol_info) <language>: New function.
+       <language>: Rename to...
+       <m_language>: ...this.
+       (SYMBOL_LANGUAGE): Remove.
+       (MSYMBOL_LANGUAGE): Remove.
+       (struct symbol) <ctor>: Update.
+       * xstormy16-tdep.c (xstormy16_skip_prologue): Update.
+
+2019-12-15  Christian Biesinger  <cbiesinger@google.com>
+
+       * ada-exp.y (write_ambiguous_var): Call symbol_set_language to
+       set the language of sym.
+       * language.c (language_alloc_type_symbol): Likewise.
+
+2019-12-14  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+       https://bugzilla.redhat.com/show_bug.cgi?id=1728147
+       PR gdb/23613
+       * bsd-kvm.c (bsd_kvm_target_open): Use 'gdb_abspath'.
+       * corelow.c: Include 'gdbsupport/pathstuff.h'.
+       (core_target_open): Use 'gdb_abspath'.
+       * gdbsupport/pathstuff.c (gdb_abspath): Guard against
+       'current_directory == NULL' case.
+       * gdbsupport/pathstuff.h (gdb_abspath): Expand comment and
+       explain what happens when 'current_directory' is NULL.
+       * go32-nat.c (go32_nat_target::wait): Check if
+       'current_directory' is NULL before call to 'chdir'.
+       * source.c (add_path): Use 'gdb_abspath'.
+       * top.c: Include 'gdbsupport/pathstuff.h'.
+       (init_history): Use 'gdb_abspath'.
+       (set_history_filename): Likewise.
+       * tracefile-tfile.c: Include 'gdbsupport/pathstuff.h'.
+       (tfile_target_open): Use 'gdb_abspath'.
+
+2019-12-13  Tom Tromey  <tromey@adacore.com>
+
+       * contrib/ari/gdb_ari.sh: Remove check for multiple calls to
+       warning or error.
+
+2019-12-13  Tom Tromey  <tromey@adacore.com>
+
+       * contrib/ari/gdb_ari.sh: Remove call to "fix" for "long long".
+
+2019-12-13  Tom Tromey  <tromey@adacore.com>
+
+       * contrib/ari/gdb_ari.sh: Handle -Wno- prefix.
+
+2019-12-13  Tom Tromey  <tromey@adacore.com>
+
+       * contrib/ari/gdb_ari.sh (usage): Use GNU style.
+
+2019-12-13  Tom Tromey  <tromey@adacore.com>
+
+       * gdbsupport/common-utils.c (string_printf, string_vprintf)
+       (string_vappendf): Add ARI comment.
+
+2019-12-13  Tom Tromey  <tromey@adacore.com>
+
+       * contrib/ari/gdb_ari.sh: Remove "fix" call for
+       floatformat_to_double.
+       * target-float.c (host_float_ops<T>::from_target): Add ARI
+       comment.
+
+2019-12-13  Tom Tromey  <tromey@adacore.com>
+
+       * contrib/ari/gdb_ari.sh: Remove "fix" call for abort.
+       * utils.c (abort_with_message, dump_core, internal_vproblem): Add
+       ARI marker to abort.
+       * event-top.c (handle_sigsegv): Add ARI marker to abort.
+
+2019-12-13  Tom Tromey  <tromey@adacore.com>
+
+       * contrib/ari/gdb_ari.sh: Fix floatformat_from_double text.
+
+2019-12-13  Tom Tromey  <tromey@adacore.com>
+
+       * contrib/ari/gdb_ari.sh: Remove ATTRIBUTE_UNUSED check.
+
+2019-12-13  Tom Tromey  <tromey@adacore.com>
+
+       * contrib/ari/gdb_ari.sh: Remove "boolean" and "var_boolean"
+       checks.
+
+2019-12-13  Tom Tromey  <tromey@adacore.com>
+
+       * gdbsupport/safe-iterator.h (class basic_safe_range) <begin,
+       end>: No longer "const".
+
+2019-12-13  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * jit.c: Fix indentation, replace spaces with tabs where
+       applicable.
+
+2019-12-13  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
+
+       * configure.tgt: Match msp430-*-elf* targets when configuring GDB.
+
+2019-12-12  Tom Tromey  <tom@tromey.com>
+
+       * objfiles.h (struct objfile) <partial_symtabs>: Now a
+       unique_ptr.
+
+2019-12-12  Tom Tromey  <tom@tromey.com>
+
+       * progspace.h (objfile_list): New typedef.
+       (class unwrapping_objfile_iterator)
+       (struct unwrapping_objfile_range): Newl
+       (struct program_space) <objfiles_range>: Change type.
+       <objfiles>: Change return type.
+       <add_objfile>: Change type of "objfile" parameter.
+       <objfiles_list>: Now a list of shared_ptr.
+       * progspace.c (program_space::add_objfile): Change type of
+       "objfile".  Update.
+       (program_space::remove_objfile): Update.
+       * objfiles.h (struct objfile) <~objfile>: Make public.
+       * objfiles.c (objfile::make): Update.
+       (objfile::unlink): Don't call delete.
+
+2019-12-12  Tom Tromey  <tom@tromey.com>
+
+       * symfile.c (symbol_file_clear): Update.
+       * progspace.h (struct program_space) <free_all_objfiles>: Declare
+       method.
+       * progspace.c (program_space::free_all_objfiles): New method.
+       * objfiles.h (free_all_objfiles): Don't declare.
+       * objfiles.c (free_all_objfiles): Move to program_space.
+
+2019-12-12  Tom Tromey  <tom@tromey.com>
+
+       * progspace.c (program_space::add_objfile)
+       (program_space::remove_objfile): Update.
+       (program_space::multi_objfile_p): Remove.
+       * objfiles.h (struct objfile) <next>: Remove.
+       * objfiles.c (objfile::objfile): Update.
+       (put_objfile_before): Update.
+       (unlink_objfile): Update.
+       * progspace.h (object_files): Remove.
+       (struct program_space) <objfiles_head>: Remove.
+       <objfiles_list>: New member.
+       <objfiles_range, objfiles_safe_range>: Change type.
+       (objfiles): Change return type.
+       (objfiles_safe): Update.
+       (multi_objfile_p): Rewrite and inline.
+       (object_files): Remove macro.
+
+2019-12-12  Tom Tromey  <tom@tromey.com>
+
+       * gdbsupport/safe-iterator.h (basic_safe_iterator): Simplify.  Add
+       second constructor.
+       (basic_safe_range): New class.
+
+2019-12-12  Tom Tromey  <tom@tromey.com>
+
+       * progspace.c (program_space::multi_objfile_p): New method.
+       * printcmd.c (info_symbol_command): Update.
+       * maint.c (maintenance_translate_address): Update.
+       * objfiles.h (MULTI_OBJFILE_P): Remove.
+       * progspace.h (struct program_space) <multi_objfile_p>: New
+       method.
+
+2019-12-12  Tom Tromey  <tom@tromey.com>
+
+       * progspace.h (struct program_space) <remove_objfile>: Declare.
+       * progspace.c (program_space::remove_objfile): New method.
+       * objfiles.c (unlink_objfile): Remove.
+       (objfile::unlink): Call remove_objfile.
+       (objfile): Don't call unlink_objfile.
+
+2019-12-12  Tom Tromey  <tom@tromey.com>
+
+       * progspace.h (struct program_space) <add_objfile>: Declare
+       method.
+       * progspace.c (program_space::add_objfile): New method.
+       * objfiles.c (~objfile): Don't unlink objfile.
+       (put_objfile_before): Remove.
+       (add_separate_debug_objfile): Don't call put_objfile_before.
+       (objfile::make): Call add_objfile.  Set new_objfiles_available on
+       the per-program-space data.
+
+2019-12-12  Tom Tromey  <tom@tromey.com>
+
+       * symfile.c (syms_from_objfile_1): Use objfile_up.
+       (syms_from_objfile_1, remove_symbol_file_command): Call unlink
+       method.
+       (reread_symbols): Use objfile_up.
+       * solib.c (update_solib_list, reload_shared_libraries_1): Call
+       unlink method.
+       * objfiles.h (struct objfile) <~objfile>: Now private.
+       <unlink>: New method.
+       (struct objfile_deleter): New.
+       (objfile_up): New typedef.
+       * objfiles.c (objfile::unlink): New method.
+       (free_objfile_separate_debug, free_all_objfiles)
+       (objfile_purge_solibs): Use it.
+       * jit.c (jit_unregister_code): Remove.
+       (jit_inferior_exit_hook, jit_event_handler): Call unlink on
+       objfile.
+       * compile/compile-object-run.c (do_module_cleanup): Call unlink on
+       objfile.
+       * compile/compile-object-load.c (compile_object_load): Use
+       objfile_up.
+
+2019-12-12  Tom Tromey  <tom@tromey.com>
+
+       * symfile.c (symbol_file_add_with_addrs): Pass "parent" to
+       objfile::make.
+       * objfiles.h (struct objjfile) <make>: No longer inline.
+       (add_separate_debug_objfile): Don't declare.
+       * objfiles.c (add_separate_debug_objfile): Now static.
+       (objfile::make): Move from objfiles.h.  Call
+       add_separate_debug_objfile.  Add "parent" parameter.
+
+2019-12-12  Tom Tromey  <tom@tromey.com>
+
+       * symfile.c (symbol_file_add_with_addrs): Use objfile::make.
+       * objfiles.h (struct objfile): Make constructor private.
+       <make>: New static method.
+       * jit.c (jit_object_close_impl): Update.
+
 2019-12-12  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * jit.c (jit_reader_try_read_symtab): Replace xmalloc/xfree with
This page took 0.027186 seconds and 4 git commands to generate.