Replace VEC(converted_character_d) with std::vector
[binutils-gdb.git] / gdb / ChangeLog
index 3efb697f719a0e2e450b9c1be98765ba4dd18299..825d9ce048200ce0dd7adb03aaeda48947140850 100644 (file)
@@ -1,3 +1,227 @@
+2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
+
+       * valprint.c (converted_character_d): Remove typedef.
+       (DEF_VEC_O (converted_character_d)): Remove.
+       (count_next_character): Use std::vector.
+       (print_converted_chars_to_obstack): Likewise.
+       (generic_printstr): Likewise.
+
+2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * xml-support.h (struct gdb_xml_value): Add constructor.
+       <value>: Change type to unique_xmalloc_ptr.
+       (gdb_xml_value_s): Remove typedef.
+       (DEF_VEC_O (gdb_xml_value_s)): Remove.
+       (gdb_xml_element_start_handler): Change parameter type to
+       std::vector.
+       (xml_find_attribute): Likewise.
+       * xml-support.c (xml_find_attribute): Change parameter type to
+       std::vector and adjust.
+       (gdb_xml_values_cleanup): Remove.
+       (gdb_xml_parser::start_element): Adjust to std::vector.
+       (xinclude_start_include): Change paraeter type to std::vector
+       and adjust.
+       * btrace.c (check_xml_btrace_version): Likewise.
+       (parse_xml_btrace_block): Likewise.
+       (parse_xml_btrace_pt_config_cpu): Likewise.
+       (parse_xml_btrace_pt): Likewise.
+       (parse_xml_btrace_conf_bts): Likewise.
+       (parse_xml_btrace_conf_pt): Likewise.
+       * memory-map.c (memory_map_start_memory): Likewise.
+       (memory_map_start_property): Likewise.
+       * osdata.c (osdata_start_osdata): Likewise.
+       (osdata_start_item): Likewise.
+       (osdata_start_column): Likewise.
+       * remote.c (start_thread): Likewise.
+       * solib-aix.c (library_list_start_library): Likewise.
+       (library_list_start_list): Likewise.
+       * solib-svr4.c (library_list_start_library): Likewise.
+       (svr4_library_list_start_list): Likewise.
+       * solib-target.c (library_list_start_segment): Likewise.
+       (library_list_start_section): Likewise.
+       (library_list_start_library): Likewise.
+       (library_list_start_list): Likewise.
+       * tracepoint.c (traceframe_info_start_memory): Likewise.
+       (traceframe_info_start_tvar): Likewise.
+       * xml-syscall.c (syscall_start_syscall): Likewise.
+       * xml-tdesc.c (tdesc_start_target): Likewise.
+       (tdesc_start_feature): Likewise.
+       (tdesc_start_reg): Likewise.
+       (tdesc_start_union): Likewise.
+       (tdesc_start_struct): Likewise.
+       (tdesc_start_flags): Likewise.
+       (tdesc_start_enum): Likewise.
+       (tdesc_start_field): Likewise.
+       (tdesc_start_enum_value): Likewise.
+       (tdesc_start_vector): Likewise.
+
+2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * extension.h (struct xmethod_worker) <clone>: Remove.
+       * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
+       Remove.
+       (python_xmethod_worker::clone): Remove.
+       * valops.c (find_overload_match): Use std::move instead of
+       clone.
+
+2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
+       (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
+       <free_xmethod_worker_data>: Remove.
+       <get_matching_xmethod_workers>: Chance VEC to std::vector.
+       <get_xmethod_arg_types>: Remove.
+       <get_xmethod_result_type>: Remove.
+       <invoke_xmethod>: Remove.
+       * extension.c (new_xmethod_worker): Remove.
+       (clone_xmethod_worker): Remove.
+       (get_matching_xmethod_workers): Return void, pass std::vector by
+       pointer.
+       (get_xmethod_arg_types): Rename to...
+       (xmethod_worker::get_arg_types): ... this, and adjust.
+       (get_xmethod_result_type): Rename to...
+       (xmethod_worker::get_result_type): ... this, and adjust.
+       (invoke_xmethod): Remove.
+       (free_xmethod_worker): Remove.
+       (free_xmethod_worker_vec): Remove.
+       * extension.h (enum ext_lang_rc): Move here from
+       extension-priv.h.
+       (struct xmethod_worker): Add constructor and destructor.
+       <data>: Remove.
+       <value>: Remove.
+       <invoke, clone, do_get_result_type, do_get_arg_types>: New
+       virtual pure methods.
+       <get_arg_types, get_result_type>: New methods.
+       (xmethod_worker_ptr): Remove typedef.
+       (DEF_VEC_P (xmethod_worker_ptr)): Remove.
+       (xmethod_worker_vec): Remove typedef.
+       (xmethod_worker_up): New typedef.
+       (invoke_xmethod): Remove.
+       (clone_xmethod_worker): Remove.
+       (free_xmethod_worker): Remove.
+       (free_xmethod_worker_vec): Remove.
+       (get_xmethod_arg_types): Remove.
+       (get_xmethod_result_type): Remove.
+       * valops.c (find_method_list): Use std::vector, don't use
+       intermediate vector.
+       (value_find_oload_method_list): Use std::vector.
+       (find_overload_match): Use std::vector.
+       (find_oload_champ): Use std::vector.
+       * value.c (value_free): Use operator delete.
+       (value_of_xmethod): Rename to...
+       (value_from_xmethod): ... this.  Don't assign
+       xmethod_worker::value, take rvalue-reference.
+       (result_type_of_xmethod): Adjust.
+       (call_xmethod): Adjust.
+       * value.h: Include extension.h.
+       (struct xmethod_worker): Don't forward-declare.
+       (value_of_xmethod): Rename to...
+       (value_from_xmethod): ... this, take rvalue-reference.
+       * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
+       (struct python_xmethod_worker): ... this, add constructor and
+       destructor.
+       <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
+       (gdbpy_free_xmethod_worker_data): Rename to...
+       (python_xmethod_worker::~python_xmethod_worker): ... this and
+       adjust.
+       (gdbpy_clone_xmethod_worker_data): Rename to...
+       (python_xmethod_worker::clone): ... this and adjust.
+       (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
+       temporary vector.
+       (gdbpy_get_xmethod_arg_types): Rename to...
+       (python_xmethod_worker::do_get_arg_types): ... this and adjust.
+       (gdbpy_get_xmethod_result_type): Rename to...
+       (python_xmethod_worker::do_get_result_type): ... this and
+       adjust.
+       (gdbpy_invoke_xmethod): Rename to...
+       (python_xmethod_worker::invoke): ... this and adjust.
+       (new_python_xmethod_worker): Rename to...
+       (python_xmethod_worker::python_xmethod_worker): ... this and
+       adjust.
+       * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
+       Remove.
+       (gdbpy_free_xmethod_worker_data): Remove.
+       (gdbpy_get_matching_xmethod_workers): Use std::vector.
+       (gdbpy_get_xmethod_arg_types): Remove.
+       (gdbpy_get_xmethod_result_type): Remove.
+       (gdbpy_invoke_xmethod): Remove.
+       * python/python.c (python_extension_ops): Remove obsolete
+       callbacks.
+
+2018-01-05  Pedro Alves  <palves@redhat.com>
+
+       PR gdb/18653
+       * common/signals-state-save-restore.c
+       (save_original_signals_state): New parameter 'quiet'.  Warn if we
+       find a custom handler preinstalled, instead of internal erroring.
+       But only warn if !quiet.
+       * common/signals-state-save-restore.h
+       (save_original_signals_state): New parameter 'quiet'.
+       * main.c (captured_main_1): Move save_original_signals_state call
+       after option handling, and pass QUIET.
+
+2018-01-05  Pedro Alves  <palves@redhat.com>
+
+       * spu-tdep.c (spu_catch_start): Pass
+       symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
+
+2018-01-05  Pedro Alves  <palves@redhat.com>
+
+       PR gdb/22670
+       * ada-lang.c (literal_symbol_name_matcher): New function.
+       (ada_get_symbol_name_matcher): Use it for
+       symbol_name_match_type::SEARCH_NAME.
+       * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
+       it down instead of assuming symbol_name_match_type::FULL.
+       * block.h (block_lookup_symbol): New parameter 'match_type'.
+       * c-valprint.c (print_unpacked_pointer): Use
+       lookup_symbol_search_name instead of lookup_symbol.
+       * compile/compile-object-load.c (get_out_value_type): Pass down
+       symbol_name_match_type::SEARCH_NAME.
+       * cp-namespace.c (cp_basic_lookup_symbol): Pass down
+       symbol_name_match_type::FULL.
+       * cp-support.c (cp_get_symbol_name_matcher): Handle
+       symbol_name_match_type::SEARCH_NAME.
+       * infrun.c (insert_exception_resume_breakpoint): Use
+       lookup_symbol_search_name.
+       * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
+       * psymtab.c (maintenance_check_psymtabs): Use
+       symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
+       * stack.c (print_frame_args): Use lookup_symbol_search_name and
+       SYMBOL_SEARCH_NAME.
+       * symtab.c (lookup_local_symbol): Don't demangle the lookup name
+       if symbol_name_match_type::SEARCH_NAME.
+       (lookup_symbol_in_language): Pass down
+       symbol_name_match_type::FULL.
+       (lookup_symbol_search_name): New.
+       (lookup_language_this): Pass down
+       symbol_name_match_type::SEARCH_NAME.
+       (lookup_symbol_aux, lookup_local_symbol): New parameter
+       'match_type'.  Pass it down.
+       * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
+       (lookup_symbol_search_name): New declaration.
+       (lookup_symbol_in_block): New 'match_type' parameter.
+
+2018-01-05  Pedro Alves  <palves@redhat.com>
+
+       PR gdb/22670
+       * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
+       ada_lookup_symbol.
+       (ada_lookup_symbol): Reimplement in terms of
+       ada_lookup_symbol_list, bits factored out from
+       ada_lookup_encoded_symbol.
+
+2018-01-05  Joel Brobecker  <brobecker@adacore.com>
+
+       * ada-exp.y (write_object_renaming): When subscripting an array
+       using a symbol as the index, pass the block in call to
+       ada_lookup_encoded_symbol when looking that symbol up.
+
+2018-01-05  Jerome Guitton  <guitton@adacore.com>
+
+       * ada-lang.c (ada_array_length): Use ada_index_type instead of
+       TYPE_INDEX_TYPE.
+
 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
 
        * ada-lang.c (ada_to_fixed_value_create): Add handling of