Replace objfile field in dwarf2_cu and dwarf2_per_cu_data with dwarf2_per_objfile
[external/binutils.git] / gdb / ChangeLog
1 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
2
3         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
4         <dwarf2_per_objfile>: New field.
5         (struct dwarf2_per_cu_data) <objfile>: Remove.
6         <dwarf2_per_objfile>: New field.
7         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
8         of objfile.
9         (create_signatured_type_table_from_index): Likewise.
10         (create_debug_type_hash_table): Likewise.
11         (fill_in_sig_entry_from_dwo_entry): Likewise.
12         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13         (create_type_unit_group): Assign dwarf2_per_objfile instead of
14         objfile.
15         (create_partial_symtab): Access objfile through
16         dwarf2_per_objfile.
17         (process_psymtab_comp_unit_reader): Likewise.
18         (read_comp_units_from_section): Likewise.
19         (scan_partial_symbols): Likewise.
20         (add_partial_symbol): Likewise.
21         (add_partial_subprogram): Likewise.
22         (peek_die_abbrev): Likewise.
23         (fixup_go_packaging): Likewise.
24         (process_full_comp_unit): Likewise.
25         (process_full_type_unit): Likewise.
26         (process_imported_unit_die): Likewise.
27         (dwarf2_compute_name): Likewise.
28         (dwarf2_physname): Likewise.
29         (read_import_statement): Likewise.
30         (create_cus_hash_table): Assign dwarf2_physname instead of
31         objfile.
32         (read_func_scope): Access objfile through dwarf2_per_objfile.
33         (read_lexical_block_scope): Likewise.
34         (read_call_site_scope): Likewise.
35         (read_variable): Likewise.
36         (dwarf2_rnglists_process): Likewise.
37         (dwarf2_ranges_process): Likewise.
38         (dwarf2_ranges_read): Likewise.
39         (dwarf2_record_block_ranges): Likewise.
40         (dwarf2_add_field): Likewise.
41         (dwarf2_add_member_fn): Likewise.
42         (read_structure_type): Likewise.
43         (process_structure_scope): Likewise.
44         (read_enumeration_type): Likewise.
45         (read_array_type): Likewise.
46         (read_common_block): Likewise.
47         (read_namespace_type): Likewise.
48         (read_namespace): Likewise.
49         (read_module_type): Likewise.
50         (read_tag_pointer_type): Likewise.
51         (read_tag_ptr_to_member_type): Likewise.
52         (read_tag_string_type): Likewise.
53         (read_subroutine_type): Likewise.
54         (read_typedef): Likewise.
55         (read_base_type): Likewise.
56         (attr_to_dynamic_prop): Likewise.
57         (read_subrange_type): Likewise.
58         (read_unspecified_type): Likewise.
59         (load_partial_dies): Likewise.
60         (read_partial_die): Likewise.
61         (find_partial_die): Likewise.
62         (guess_partial_die_structure_name): Likewise.
63         (fixup_partial_die): Likewise.
64         (read_attribute_value): Likewise.
65         (read_addr_index_from_leb128): Likewise.
66         (dwarf2_read_addr_index): Likewise.
67         (dwarf2_string_attr): Likewise.
68         (lnp_state_machine::check_line_address): Likewise.
69         (dwarf_decode_lines_1): Likewise.
70         (dwarf_decode_lines): Likewise.
71         (dwarf2_start_symtab): Likewise.
72         (var_decode_location): Likewise.
73         (new_symbol_full): Likewise.
74         (dwarf2_const_value_data): Likewise.
75         (dwarf2_const_value_attr): Likewise.
76         (dwarf2_const_value): Likewise.
77         (die_type): Likewise.
78         (die_containing_type): Likewise.
79         (lookup_die_type): Likewise.
80         (guess_full_die_structure_name): Likewise.
81         (anonymous_struct_prefix): Likewise.
82         (dwarf2_name): Likewise.
83         (follow_die_ref_or_sig): Likewise.
84         (follow_die_offset): Likewise.
85         (follow_die_ref): Likewise.
86         (dwarf2_fetch_die_loc_sect_off): Likewise.
87         (dwarf2_fetch_constant_bytes): Likewise.
88         (dwarf2_fetch_die_type_sect_off): Likewise.
89         (dwarf2_get_die_type): Likewise.
90         (follow_die_sig): Likewise.
91         (decode_locdesc): Likewise.
92         (dwarf2_per_cu_objfile): Likewise.
93         (dwarf2_per_cu_text_offset): Likewise.
94         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
95         objfile.
96         (set_die_type): Access objfile through
97         dwarf2_per_objfile.
98
99 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
100
101         * valprint.c (converted_character_d): Remove typedef.
102         (DEF_VEC_O (converted_character_d)): Remove.
103         (count_next_character): Use std::vector.
104         (print_converted_chars_to_obstack): Likewise.
105         (generic_printstr): Likewise.
106
107 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
108
109         * xml-support.h (struct gdb_xml_value): Add constructor.
110         <value>: Change type to unique_xmalloc_ptr.
111         (gdb_xml_value_s): Remove typedef.
112         (DEF_VEC_O (gdb_xml_value_s)): Remove.
113         (gdb_xml_element_start_handler): Change parameter type to
114         std::vector.
115         (xml_find_attribute): Likewise.
116         * xml-support.c (xml_find_attribute): Change parameter type to
117         std::vector and adjust.
118         (gdb_xml_values_cleanup): Remove.
119         (gdb_xml_parser::start_element): Adjust to std::vector.
120         (xinclude_start_include): Change paraeter type to std::vector
121         and adjust.
122         * btrace.c (check_xml_btrace_version): Likewise.
123         (parse_xml_btrace_block): Likewise.
124         (parse_xml_btrace_pt_config_cpu): Likewise.
125         (parse_xml_btrace_pt): Likewise.
126         (parse_xml_btrace_conf_bts): Likewise.
127         (parse_xml_btrace_conf_pt): Likewise.
128         * memory-map.c (memory_map_start_memory): Likewise.
129         (memory_map_start_property): Likewise.
130         * osdata.c (osdata_start_osdata): Likewise.
131         (osdata_start_item): Likewise.
132         (osdata_start_column): Likewise.
133         * remote.c (start_thread): Likewise.
134         * solib-aix.c (library_list_start_library): Likewise.
135         (library_list_start_list): Likewise.
136         * solib-svr4.c (library_list_start_library): Likewise.
137         (svr4_library_list_start_list): Likewise.
138         * solib-target.c (library_list_start_segment): Likewise.
139         (library_list_start_section): Likewise.
140         (library_list_start_library): Likewise.
141         (library_list_start_list): Likewise.
142         * tracepoint.c (traceframe_info_start_memory): Likewise.
143         (traceframe_info_start_tvar): Likewise.
144         * xml-syscall.c (syscall_start_syscall): Likewise.
145         * xml-tdesc.c (tdesc_start_target): Likewise.
146         (tdesc_start_feature): Likewise.
147         (tdesc_start_reg): Likewise.
148         (tdesc_start_union): Likewise.
149         (tdesc_start_struct): Likewise.
150         (tdesc_start_flags): Likewise.
151         (tdesc_start_enum): Likewise.
152         (tdesc_start_field): Likewise.
153         (tdesc_start_enum_value): Likewise.
154         (tdesc_start_vector): Likewise.
155
156 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
157
158         * extension.h (struct xmethod_worker) <clone>: Remove.
159         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
160         Remove.
161         (python_xmethod_worker::clone): Remove.
162         * valops.c (find_overload_match): Use std::move instead of
163         clone.
164
165 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
166
167         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
168         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
169         <free_xmethod_worker_data>: Remove.
170         <get_matching_xmethod_workers>: Chance VEC to std::vector.
171         <get_xmethod_arg_types>: Remove.
172         <get_xmethod_result_type>: Remove.
173         <invoke_xmethod>: Remove.
174         * extension.c (new_xmethod_worker): Remove.
175         (clone_xmethod_worker): Remove.
176         (get_matching_xmethod_workers): Return void, pass std::vector by
177         pointer.
178         (get_xmethod_arg_types): Rename to...
179         (xmethod_worker::get_arg_types): ... this, and adjust.
180         (get_xmethod_result_type): Rename to...
181         (xmethod_worker::get_result_type): ... this, and adjust.
182         (invoke_xmethod): Remove.
183         (free_xmethod_worker): Remove.
184         (free_xmethod_worker_vec): Remove.
185         * extension.h (enum ext_lang_rc): Move here from
186         extension-priv.h.
187         (struct xmethod_worker): Add constructor and destructor.
188         <data>: Remove.
189         <value>: Remove.
190         <invoke, clone, do_get_result_type, do_get_arg_types>: New
191         virtual pure methods.
192         <get_arg_types, get_result_type>: New methods.
193         (xmethod_worker_ptr): Remove typedef.
194         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
195         (xmethod_worker_vec): Remove typedef.
196         (xmethod_worker_up): New typedef.
197         (invoke_xmethod): Remove.
198         (clone_xmethod_worker): Remove.
199         (free_xmethod_worker): Remove.
200         (free_xmethod_worker_vec): Remove.
201         (get_xmethod_arg_types): Remove.
202         (get_xmethod_result_type): Remove.
203         * valops.c (find_method_list): Use std::vector, don't use
204         intermediate vector.
205         (value_find_oload_method_list): Use std::vector.
206         (find_overload_match): Use std::vector.
207         (find_oload_champ): Use std::vector.
208         * value.c (value_free): Use operator delete.
209         (value_of_xmethod): Rename to...
210         (value_from_xmethod): ... this.  Don't assign
211         xmethod_worker::value, take rvalue-reference.
212         (result_type_of_xmethod): Adjust.
213         (call_xmethod): Adjust.
214         * value.h: Include extension.h.
215         (struct xmethod_worker): Don't forward-declare.
216         (value_of_xmethod): Rename to...
217         (value_from_xmethod): ... this, take rvalue-reference.
218         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
219         (struct python_xmethod_worker): ... this, add constructor and
220         destructor.
221         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
222         (gdbpy_free_xmethod_worker_data): Rename to...
223         (python_xmethod_worker::~python_xmethod_worker): ... this and
224         adjust.
225         (gdbpy_clone_xmethod_worker_data): Rename to...
226         (python_xmethod_worker::clone): ... this and adjust.
227         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
228         temporary vector.
229         (gdbpy_get_xmethod_arg_types): Rename to...
230         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
231         (gdbpy_get_xmethod_result_type): Rename to...
232         (python_xmethod_worker::do_get_result_type): ... this and
233         adjust.
234         (gdbpy_invoke_xmethod): Rename to...
235         (python_xmethod_worker::invoke): ... this and adjust.
236         (new_python_xmethod_worker): Rename to...
237         (python_xmethod_worker::python_xmethod_worker): ... this and
238         adjust.
239         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
240         Remove.
241         (gdbpy_free_xmethod_worker_data): Remove.
242         (gdbpy_get_matching_xmethod_workers): Use std::vector.
243         (gdbpy_get_xmethod_arg_types): Remove.
244         (gdbpy_get_xmethod_result_type): Remove.
245         (gdbpy_invoke_xmethod): Remove.
246         * python/python.c (python_extension_ops): Remove obsolete
247         callbacks.
248
249 2018-01-05  Pedro Alves  <palves@redhat.com>
250
251         PR gdb/18653
252         * common/signals-state-save-restore.c
253         (save_original_signals_state): New parameter 'quiet'.  Warn if we
254         find a custom handler preinstalled, instead of internal erroring.
255         But only warn if !quiet.
256         * common/signals-state-save-restore.h
257         (save_original_signals_state): New parameter 'quiet'.
258         * main.c (captured_main_1): Move save_original_signals_state call
259         after option handling, and pass QUIET.
260
261 2018-01-05  Pedro Alves  <palves@redhat.com>
262
263         * spu-tdep.c (spu_catch_start): Pass
264         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
265
266 2018-01-05  Pedro Alves  <palves@redhat.com>
267
268         PR gdb/22670
269         * ada-lang.c (literal_symbol_name_matcher): New function.
270         (ada_get_symbol_name_matcher): Use it for
271         symbol_name_match_type::SEARCH_NAME.
272         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
273         it down instead of assuming symbol_name_match_type::FULL.
274         * block.h (block_lookup_symbol): New parameter 'match_type'.
275         * c-valprint.c (print_unpacked_pointer): Use
276         lookup_symbol_search_name instead of lookup_symbol.
277         * compile/compile-object-load.c (get_out_value_type): Pass down
278         symbol_name_match_type::SEARCH_NAME.
279         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
280         symbol_name_match_type::FULL.
281         * cp-support.c (cp_get_symbol_name_matcher): Handle
282         symbol_name_match_type::SEARCH_NAME.
283         * infrun.c (insert_exception_resume_breakpoint): Use
284         lookup_symbol_search_name.
285         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
286         * psymtab.c (maintenance_check_psymtabs): Use
287         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
288         * stack.c (print_frame_args): Use lookup_symbol_search_name and
289         SYMBOL_SEARCH_NAME.
290         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
291         if symbol_name_match_type::SEARCH_NAME.
292         (lookup_symbol_in_language): Pass down
293         symbol_name_match_type::FULL.
294         (lookup_symbol_search_name): New.
295         (lookup_language_this): Pass down
296         symbol_name_match_type::SEARCH_NAME.
297         (lookup_symbol_aux, lookup_local_symbol): New parameter
298         'match_type'.  Pass it down.
299         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
300         (lookup_symbol_search_name): New declaration.
301         (lookup_symbol_in_block): New 'match_type' parameter.
302
303 2018-01-05  Pedro Alves  <palves@redhat.com>
304
305         PR gdb/22670
306         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
307         ada_lookup_symbol.
308         (ada_lookup_symbol): Reimplement in terms of
309         ada_lookup_symbol_list, bits factored out from
310         ada_lookup_encoded_symbol.
311
312 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
313
314         * ada-exp.y (write_object_renaming): When subscripting an array
315         using a symbol as the index, pass the block in call to
316         ada_lookup_encoded_symbol when looking that symbol up.
317
318 2018-01-05  Jerome Guitton  <guitton@adacore.com>
319
320         * ada-lang.c (ada_array_length): Use ada_index_type instead of
321         TYPE_INDEX_TYPE.
322
323 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
324
325         * ada-lang.c (ada_to_fixed_value_create): Add handling of
326         the case where VALUE_LVAL (val0) is not lval_memory.
327
328 2018-01-05  Xavier Roirand  <roirand@adacore.com>
329
330         * ada-valprint.c (print_optional_low_bound): Handle
331         character-indexed array printing like boolean-indexed array
332         printing.
333
334 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
335
336         * NEWS: Create a new section for the next release branch.
337         Rename the section of the current branch, now that it has
338         been cut.
339
340 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
341
342         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
343         * version.in: Bump version to 8.1.50.DATE-git.
344
345 2018-01-03  Xavier Roirand  <roirand@adacore.com>
346
347         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
348         Add field.
349         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
350         Add field.
351         (default_exception_support_info) <catch_handlers_sym>: Add field.
352         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
353         (ada_exception_name_addr_1): Add "catch handlers" handling.
354         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
355         Update all callers.
356         (create_excep_cond_exprs) <ex>: Add parameter.
357         (re_set_exception): Update create_excep_cond_exprs call.
358         (print_it_exception, print_one_exception, print_mention_exception)
359         (print_recreate_exception): Add "catch handler" handling.
360         (allocate_location_catch_handlers, re_set_catch_handlers)
361         (check_status_catch_handlers, print_it_catch_handlers)
362         (print_one_catch_handlers, print_mention_catch_handlers)
363         (print_recreate_catch_handlers): New function.
364         (catch_handlers_breakpoint_ops): New variable.
365         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
366         Add parameter.  Add "catch handler" handling.
367         (ada_exception_sym_name, ada_exception_breakpoint_ops):
368         Add "catch handler" handling.
369         (ada_exception_catchpoint_cond_string): Add "catch handler"
370         handling.
371         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
372         call.
373         (catch_ada_handlers_command): New function.
374         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
375         operations structure.
376         (_initialize_ada_language): Add "catch handlers" command entry.
377         * NEWS: Document "catch handlers" feature.
378
379 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
380
381         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
382         account when creating the array type of the slice.
383         (ada_value_slice): Likewise.
384
385 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
386
387         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
388         New enum value.
389         (create_array_type_with_stride): Add byte_stride_prop parameter.
390         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
391         New parameter.  Update all callers in this file.
392         (array_type_has_dynamic_stride): New function.
393         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
394         of arrays with dynamic byte strides.
395         * dwarf2read.c (read_array_type): Add support for dynamic
396         DW_AT_byte_stride attributes.
397
398 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
399
400         * dwarf2read.c (read_unspecified_type): Treat
401         DW_TAG_enumeration_type DIEs from Ada units as stubs.
402
403 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
404
405         Update copyright year range in all GDB files.
406
407 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
408
409         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
410         and gdb/testsuite/gdb.base/step-line.c.
411
412 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
413
414         * copyright.py (main): Dump the contents of
415         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
416         even if BY_HAND is empty.
417
418 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
419
420         * top.c (print_gdb_version): Update Copyright year in version
421         message.
422
423 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
424
425         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
426
427 For older changes see ChangeLog-2017.
428 \f
429 Local Variables:
430 mode: change-log
431 left-margin: 8
432 fill-column: 74
433 version-control: never
434 coding: utf-8
435 End: