Convert the DWARF reader to new-style buildysm
[deliverable/binutils-gdb.git] / gdb / ChangeLog
index 7e7f88a12b93eb39b026ae7924dfa20579b55971..80d15bd1482e0b6d26299ea13abb1d3c327e988e 100644 (file)
@@ -1,3 +1,380 @@
+2018-07-20  Tom Tromey  <tom@tromey.com>
+
+       * dwarf2read.c: Include buildsym.h.
+       (struct dwarf2_cu) <builder>: New method.
+       (fixup_go_packaging): Update.
+       (process_full_comp_unit, process_full_type_unit): Update.  Don't
+       use scoped_free_pendings.
+       (using_directives): Add "cu" parameter, remove "language".
+       (read_import_statement, setup_type_unit_groups, )
+       (read_func_scope, read_lexical_block_scope)
+       (dwarf2_record_block_ranges, read_namespace): Update.
+       (lnp_state_machine::lnp_state_machine): Add cu parameter.
+       (lnp_state_machine::handle_end_sequence): Update.
+       (class lnp_state_machine) <m_cu>: New member.
+       <m_record_line_callback>: Remove.
+       <m_currently_recording_lines>: New member.
+       (lnp_state_machine::handle_set_file): Update.
+       (noop_record_line): Remove.
+       (dwarf_record_line_p): Add cu parameter.
+       (dwarf_record_line_1, dwarf_finish_line): Likewise.
+       (lnp_state_machine::record_line)
+       (lnp_state_machine::lnp_state_machine)
+       (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
+       (dwarf_decode_lines): Update.
+       (dwarf2_start_subfile): Add cu parameter.
+       (dwarf2_start_symtab, new_symbol): Update.
+       (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
+       Remove dwarf2_per_objfile parameter.
+       (dwarf_decode_macros): Update.
+
+2018-07-20  Tom Tromey  <tom@tromey.com>
+
+       * stabsread.c (define_symbol): Update.
+       * buildsym-legacy.h (get_buildsym_compunit): Declare.
+       * dwarf2read.c (new_symbol): Update.
+       * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
+       * cp-namespace.c: Include buildsym.h.
+       (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
+       * buildsym-legacy.c (get_buildsym_compunit): New function.
+
+2018-07-20  Tom Tromey  <tom@tromey.com>
+
+       * xcoffread.c: Include buildsym-legacy.h.
+       * windows-nat.c: Include buildsym-legacy.h.
+       * stabsread.c: Include buildsym-legacy.h.
+       * mdebugread.c: Include buildsym-legacy.h.
+       * buildsym-legacy.h: New file.
+       * buildsym-legacy.c: New file, from buildsym.c.
+       * go32-nat.c: Include buildsym-legacy.h.
+       * dwarf2read.c: Include buildsym-legacy.h.
+       * dbxread.c: Include buildsym-legacy.h.
+       * cp-namespace.c: Include buildsym-legacy.h.
+       * coffread.c: Include buildsym-legacy.h.
+       * buildsym.h: Move some contents to buildsym-legacy.h.
+       * buildsym.c: Include buildsym-legacy.h.  Move many functions to
+       buildsym-legacy.c.
+       * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
+
+2018-07-20  Tom Tromey  <tom@tromey.com>
+
+       * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
+       * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
+       (buildsym_compunit::buildsym_compunit)
+       (buildsym_compunit::~buildsym_compunit)
+       (buildsym_compunit::get_macro_table): Define.
+
+2018-07-20  Tom Tromey  <tom@tromey.com>
+
+       * buildsym.c (reset_symtab_globals): Remove.
+       (buildsym_compunit::end_symtab_from_static_block): Update.
+       (buildsym_compunit::augment_type_symtab): Update.
+       (end_symtab_from_static_block): Call free_buildsym_compunit.
+       (augment_type_symtab, end_symtab, end_expandable_symtab):
+       Likewise.
+
+2018-07-20  Tom Tromey  <tom@tromey.com>
+
+       * arch-utils.c: Do not include buildsym.h.
+       * mipsread.c: Do not include buildsym.h.
+       * machoread.c: Do not include buildsym.h.
+       * elfread.c: Do not include buildsym.h.
+
+2018-07-20  Tom Tromey  <tom@tromey.com>
+
+       * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
+       initialization.
+       (buildsym_compunit): Add new constructor.
+       (struct buildsym_compunit) <get_last_source_file, finish_block,
+       record_block_range, start_subfile, patch_subfile_names,
+       push_subfile, pop_subfile, record_line, get_compunit_symtab,
+       set_last_source_start_addr, get_last_source_start_addr,
+       get_local_using_directives, set_local_using_directives,
+       get_global_using_directives, outermost_context_p,
+       get_current_context_stack, get_context_stack_depth,
+       get_current_subfile, get_local_symbols, get_file_symbols,
+       get_global_symbols, record_debugformat, record_producer,
+       push_context, pop_context, end_symtab_get_static_block,
+       end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
+       New public methods.
+       <record_pending_block, finish_block_internal, make_blockvector,
+       watch_main_source_file_lossage, end_symtab_with_blockvector>: New
+       private methods.
+       Update all users.
+
+2018-05-22  Tom Tromey  <tom@tromey.com>
+
+       * buildsym.c (record_pending_block): Move earlier.  Remove objfile
+       parameter.
+       (finish_block_internal): Update.
+
+2018-07-20  Tom Tromey  <tom@tromey.com>
+
+       * buildsym.c (record_pending_block): Move earlier.  Remove objfile
+       parameter.
+       (finish_block_internal): Update.
+
+2018-07-20  Tom Tromey  <tom@tromey.com>
+
+       * buildsym.h (EXTERN): Don't define or undef.
+       * buildsym.c (EXTERN): Don't define.
+
+2018-07-20  Tom Tromey  <tom@tromey.com>
+
+       * buildsym.c: Remove TODO comment.
+
+2018-07-20  Tom Tromey  <tom@tromey.com>
+
+       * coffread.c (coff_symtab_read): Update.
+       * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
+       (xcoff_new_init): Update.
+       * mipsread.c (mipscoff_new_init): Update.
+       * mdebugread.c (mdebug_build_psymtabs): Update.
+       * elfread.c (elf_new_init): Update.
+       * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
+       Update.
+       * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
+       (coffstab_build_psymtabs, elfstab_build_psymtabs)
+       (stabsect_build_psymtabs): Update.
+       * buildsym.h (buildsym_init): Don't declare.
+       * buildsym.c: Update comment.
+       (prepare_for_building): Remove.
+       (start_symtab, restart_symtab): Update.
+       (reset_symtab_globals): Update comment.
+       (buildsym_init): Remove.
+
+2018-07-20  Tom Tromey  <tom@tromey.com>
+
+       * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
+       * stabsread.c (patch_block_stabs, define_symbol, read_type)
+       (read_enum_type, common_block_start, common_block_end)
+       (cleanup_undefined_types_1, finish_global_stabs): Update.
+       * mdebugread.c (psymtab_to_symtab_1): Update.
+       * dwarf2read.c (fixup_go_packaging, read_func_scope)
+       (read_lexical_block_scope, new_symbol): Update.
+       * dbxread.c (process_one_symbol): Update.
+       * coffread.c (coff_symtab_read, process_coff_symbol)
+       (coff_read_enum_type): Update.
+       * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
+       declare.
+       (get_local_symbols, get_file_symbols, get_global_symbols): New
+       functions.
+       * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
+       m_global_symbols.
+       <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
+       (~scoped_free_pendings): Update.
+       (finish_block, prepare_for_building, reset_symtab_globals)
+       (end_symtab_get_static_block, end_symtab_with_blockvector)
+       (augment_type_symtab, push_context): Update.
+       (get_local_symbols, get_file_symbols, get_global_symbols): New
+       functions.
+       (buildsym_init): Update.
+
+2018-07-20  Tom Tromey  <tom@tromey.com>
+
+       * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
+       (process_full_type_unit): Likewise.
+       (dwarf2_start_symtab): Set list_in_scope.
+
+2018-07-20  Tom Tromey  <tom@tromey.com>
+
+       * dwarf2read.c (process_psymtab_comp_unit_reader)
+       (build_type_psymtabs_reader): Do not set list_in_scope.
+
+2018-07-20  Tom Tromey  <tom@tromey.com>
+
+       * buildsym.c (free_pendings): Remove.
+       (add_symbol_to_list, scoped_free_pendings)
+       (finish_block_internal, buildsym_init): Update.
+
+2018-07-20  Tom Tromey  <tom@tromey.com>
+
+       * xcoffread.c (read_xcoff_symtab): Update.
+       * dwarf2read.c (read_func_scope, read_lexical_block_scope):
+       Update.
+       * dbxread.c (process_one_symbol): Update.
+       * coffread.c (coff_symtab_read): Update.
+       * buildsym.h (finish_block): Update.
+       * buildsym.c (finish_block): Remove "listhead" argument.
+       (end_symtab_get_static_block): Update.
+
+2018-07-20  Tom Tromey  <tom@tromey.com>
+
+       * buildsym.h (class scoped_free_pendings): Remove constructor.
+       * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
+       method.
+       <m_pending_block_obstack, m_pending_blocks>: New members.
+       (pending_block_obstack, pending_blocks): Remove.
+       (scoped_free_pendings::scoped_free_pendings): Default.
+       (~scoped_free_pendings): Update.
+       (free_pending_blocks): Remove.
+       (finish_block_internal, record_pending_block, make_blockvector)
+       (end_symtab_get_static_block, augment_type_symtab, push_context)
+       (buildsym_init): Update.
+
+2018-07-20  Tom Tromey  <tom@tromey.com>
+
+       * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
+       m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
+       members.
+       (pending_addrmap, pending_addrmap_obstack)
+       (pending_addrmap_interesting): Remove.
+       (scoped_free_pendings, record_block_range, make_blockvector)
+       (prepare_for_building, reset_symtab_globals, buildsym_init):
+       Update.
+
+2018-07-20  Tom Tromey  <tom@tromey.com>
+
+       * xcoffread.c (process_linenos): Update.
+       * stabsread.c (define_symbol, read_type, read_enum_type): Update.
+       * mdebugread.c (psymtab_to_symtab_1): Update.
+       * dwarf2read.c (setup_type_unit_groups)
+       (lnp_state_machine::handle_set_file, dwarf_record_line_p)
+       (lnp_state_machine::record_line, dwarf_decode_lines): Update.
+       * dbxread.c (process_one_symbol): Update.
+       * coffread.c (coff_symtab_read, enter_linenos)
+       (process_coff_symbol): Update.
+       * buildsym.h (current_subfile): Don't declare.
+       (get_current_subfile): Declare.
+       * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
+       member.
+       (start_subfile, free_buildsym_compunit, push_subfile)
+       (prepare_for_building, start_symtab): Update.
+       (get_current_subfile): New function.
+
+2018-07-20  Tom Tromey  <tom@tromey.com>
+
+       * coffread.c (coff_symtab_read): Update.
+       * xcoffread.c (read_xcoff_symtab): Update.
+       * dwarf2read.c (new_symbol): Update.
+       (read_func_scope, read_lexical_block_scope): Update.
+       * dbxread.c (process_one_symbol): Update.
+       * buildsym.h (context_stack, context_stack_depth): Don't declare.
+       (outermost_context_p): Remove macro.
+       (outermost_context_p, get_current_context_stack)
+       (get_context_stack_depth): Declare.
+       (pop_context): Return struct context_stack.
+       * buildsym.c (struct buildsym_compunit) <m_context_stack: New
+       member.
+       (context_stack_size): Remove.
+       (INITIAL_CONTEXT_STACK_SIZE): Remove.
+       (prepare_for_building, end_symtab_get_static_block)
+       (augment_type_symtab, push_context): Update.
+       (pop_context): Return struct context_stack.
+       (outermost_context_p, get_current_context_stack)
+       (get_context_stack_depth): New functions.
+       (buildsym_init): Update.
+
+2018-07-20  Tom Tromey  <tom@tromey.com>
+
+       * rust-exp.y: Now a pure parser.  Update all rules.
+       (%union): Move earlier.
+       (current_parser, work_obstack): Remove globals.
+       (rust_parser, ~rust_parser): Update.
+       (class rust_parser) <copy_name, concat3, crate_name, super_name,
+       lex_character, lex_number, lex_string, lex_identifier,
+       rust_lookup_type, convert_params_to_types, convert_ast_to_type,
+       convert_name, convert_params_to_expression,
+       convert_ast_to_expression, ast_basic_type, ast_operation,
+       ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
+       ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
+       ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
+       ast_array_type, ast_slice_type, ast_reference_type,
+       ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
+       (rust_parse): Update.
+       (rustyyerror, rustyylex): Add parser parameter.
+       (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
+       (rust_lex_stringish_test, rust_lex_test_sequence)
+       (rust_lex_test_trailing_dot, rust_lex_test_completion)
+       (rust_lex_test_push_back, rust_lex_tests): Update.
+
+2018-07-19  Pedro Alves  <palves@redhat.com>
+
+       * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
+       gdb::unique_xmalloc_ptr.
+       * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
+       Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
+       * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
+       copy-initialization.
+       * guile/scm-pretty-print.c (ppscm_print_children): Use
+       gdb::unique_xmalloc_ptr instead of cleanups.
+       (gdbscm_apply_val_pretty_printer): Remove cleanups.
+       * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
+       gdb::unique_xmalloc_ptr.
+       * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
+       Adjust to use gdb::unique_xmalloc_ptr.
+       * guile/scm-utils.c (extract_arg): Adjust.
+       * guile/scm-value.c (gdbscm_value_field): Adjust to use
+       gdb::unique_xmalloc_ptr instead of a cleanup.
+
+2018-07-19  Tom Tromey  <tom@tromey.com>
+
+       * utils.c (do_value_free_to_mark)
+       (make_cleanup_value_free_to_mark): Remove.
+       * utils.h (make_cleanup_value_free_to_mark): Remove.
+
+2018-07-19  Pedro Alves  <palves@redhat.com>
+
+       * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
+       forwarding reference.
+
+2018-07-18  Pedro Alves  <palves@redhat.com>
+
+       * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
+       gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
+       cleanup.
+
+2018-07-18  Pedro Alves  <palves@redhat.com>
+
+       * guile/guile-internal.h: Add comment about mixing GDB and Scheme
+       exceptions.
+       (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
+       (gdbscm_wrap): New.
+       * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
+       directly instead of a cleanup.
+       * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
+       (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
+       (vlscm_binop_gdbthrow): New, factored out from ...
+       (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
+       (vlscm_rich_compare): Use gdbscm_wrap.
+       * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
+       instead of a cleanup.
+       (gdbscm_lookup_global_symbol): Use xfree directly instead of a
+       cleanup.
+       * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
+       Use xfree directly instead of a cleanup.
+       * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
+       Adjust to use gdbscm_wrap and scoped_value_mark.
+       (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
+       (gdbscm_value_address, gdbscm_value_dereference)
+       (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
+       scoped_value_mark.
+       (gdbscm_value_dynamic_type): Use scoped_value_mark.
+       (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
+       scoped_value_mark.
+       (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
+       gdbscm_wrap and scoped_value_mark.
+       (gdbscm_value_to_string): Use xfree directly instead of a
+       cleanup.  Move 'buffer' unique_ptr to TRY scope.
+       (gdbscm_value_to_lazy_string): Use xfree directly instead of a
+       cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
+       scoped_value_mark.
+       (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
+       (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
+       scoped_value_mark.
+       (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
+       gdbscm_wrap.
+
+2018-07-18  Tom de Vries  <tdevries@suse.de>
+
+       * findvar.c (default_read_var_value): Also resolve dynamic type for
+       LOC_OPTIMIZED_OUT vars.
+
+2018-07-18  Maciej W. Rozycki  <macro@mips.com>
+
+       * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
+       decoding.
+
 2018-07-17  Tom Tromey  <tom@tromey.com>
 
        * guile/scm-param.c (pascm_set_func, pascm_show_func)
This page took 0.031831 seconds and 4 git commands to generate.