gdb/23712: Remove dw2_add_symbol_to_list
[external/binutils.git] / gdb / ChangeLog
1 2019-01-10  Keith Seitz  <keiths@redhat.com>
2
3         PR gdb/23712
4         PR symtab/23010
5         * dwarf2read.c (dw2_add_symbol_to_list): Remove.
6         (fixup_go_packaging, new_symbol): Use add_symbol_to_list.
7
8 2019-01-10  Keith Seitz  <keiths@redhat.com>
9
10         PR gdb/23712
11         PR symtab/23010
12         * dictionary.c (pending_to_vector): Remove.
13         (dict_create_hashed_1, dict_create_linear_1, dict_add_pending_1):
14         Remove _1 suffix, replacing functions of the same name.  Update
15         all callers.
16         (dict_create_hashed, dict_create_hashed_expandable)
17         (dict_create_linear, dict_create_linear_expandable, dict_free)
18         (dict_add_symbol, dict_add_pending, dict_size, dict_empty):
19         Make functions static.
20
21 2019-01-10  Keith Seitz  <keiths@redhat.com>
22
23         PR gdb/23712
24         PR symtab/23010
25         * dictionary.h (struct dictionary): Replace declaration with
26         multidictionary.
27         (dict_create_hashed, dict_create_hashed_expandable)
28         (dict_create_linear, dict_create_linear_expandable)
29         (dict_free, dict_add_symbol, dict_add_pending, dict_empty)
30         (dict_iterator_first, dict_iterator_next, dict_iter_match_first)
31         (dict_iter_match_next, dict_size): Rename to "mdict_" versions
32         taking multidictionary argument.
33         [ALL_DICT_SYMBOLS]: Update for multidictionary.
34         * block.h (struct block) <dict>: Change to multidictionary
35         and rename `multidict'.
36         * block.c, buildsym.c, jit.c, mdebugread.c, objfiles.c,
37         symmisc.c: Update all dictionary references to multidictionary.
38
39 2019-01-10  Keith Seitz  <keiths@redhat.com>
40
41         PR gdb/23712
42         PR symtab/23010
43         * dictionary.c: Include unordered_map.
44         (pending_to_vector): New function.
45         (dict_create_hashed_1, dict_create_linear_1, dict_add_pending_1):
46         Rewrite the non-"_1" functions to take vector instead
47         of linked list.
48         (dict_create_hashed, dict_create_linear, dict_add_pending): Use the
49         "new" _1 versions of the same name.
50         (multidictionary): Define.
51         (std::hash<enum language): New definition.
52         (collate_pending_symbols_by_language, mdict_create_hashed)
53         (mdict_create_hashed_expandable, mdict_create_linear)
54         (mdict_create_linear_expandable, mdict_free)
55         (find_language_dictionary, create_new_language_dictionary)
56         (mdict_add_symbol, mdict_add_pending, mdict_iterator_first)
57         (mdict_iterator_next, mdict_iter_match_first, mdict_iter_match_next)
58         (mdict_size, mdict_empty): New functions.
59         * dictionary.h (mdict_iterator): Define.
60
61 2019-01-10  Pedro Alves  <palves@redhat.com>
62
63         * breakpoint.c (read_uploaded_action)
64         (create_tracepoint_from_upload): Adjust to use
65         gdb::unique_xmalloc_ptr.
66         * ctf.c (ctf_write_uploaded_tp):
67         (SET_ARRAY_FIELD): Use emplace_back.
68         (SET_STRING_FIELD): Adjust to use gdb::unique_xmalloc_ptr.
69         * tracefile-tfile.c (tfile_write_uploaded_tp):
70         * tracepoint.c (parse_tracepoint_definition): Adjust to use
71         gdb::unique_xmalloc_ptr.
72         * tracepoint.h (struct uploaded_tp) <cond, actions, step_actions,
73         at_string, cond_string, cmd_strings>: Replace char pointers
74         with gdb::unique_xmalloc_ptr.
75
76 2019-01-10  Pedro Alves  <palves@redhat.com>
77
78         * solib-target.c (library_list_start_library): Don't xstrdup name.
79
80 2019-01-10  Pedro Alves  <palves@redhat.com>
81
82         * mdebugread.c (parse_partial_symbols): Use
83         gdb::unique_xmalloc_ptr to manage heap-allocated 'stabsstring'.
84
85 2019-01-10  Andrew Burgess  <andrew.burgess@embecosm.com>
86
87         * linux-fork.c (scoped_switch_fork_info)
88         <~scoped_switch_fork_info>: Fix incorrect variable name.
89
90 2019-01-10  Andrew Burgess  <andrew.burgess@embecosm.com>
91
92         * linux-fork.c (scoped_switch_fork_info)
93         <scoped_switch_fork_info>: Make explicit.
94         <~scoped_switch_fork_info>: Wrap core in TRY/CATCH.
95
96 2019-01-10  Tom Tromey  <tom@tromey.com>
97
98         * objfiles.h (objfile::reset_psymtabs): Update.
99         * objfiles.c (objfile::objfile): Update.
100         * psymtab.h (psymtab_storage::obstack): Update.
101         (psymtab_storage::m_obstack): Use gdb::optional.
102         (class psymtab_storage): Update comment.  Remove objfile
103         parameter.
104         * psymtab.c (psymtab_storage::psymtab_storage): Update.
105
106 2019-01-10  Tom Tromey  <tom@tromey.com>
107
108         * psymtab.h (psymtab_storage::allocate_psymtab): New method.
109         <free_psymtabs>: Now private.
110         * psymtab.c (psymtab_storage::allocate_psymtab): Implement.
111         (allocate_psymtab): Use new method.
112
113 2019-01-10  Tom Tromey  <tom@tromey.com>
114
115         * xcoffread.c (xcoff_end_psymtab): Use allocate_dependencies.
116         * psymtab.h (psymtab_storage::allocate_dependencies): New method.
117         * mdebugread.c (parse_partial_symbols): Use
118         allocate_dependencies.
119         * dwarf2read.c (dwarf2_create_include_psymtab): Use
120         allocate_dependencies.
121         (process_psymtab_comp_unit_reader)
122         (build_type_psymtab_dependencies): Likewise.
123         * dbxread.c (dbx_end_psymtab): Use allocate_dependencies.
124
125 2019-01-10  Tom Tromey  <tom@tromey.com>
126
127         * psymtab.c (add_psymbol_to_bcache): Pass psymtab obstack to
128         PSYMBOL_SET_LANGUAGE.
129         (allocate_psymtab): Allocate psymtab on the psymtab obstack.
130
131 2019-01-10  Tom Tromey  <tom@tromey.com>
132
133         * psymtab.h (psymtab_storage::obstack): New method.
134         <m_obstack>: Rename from obstack; now private.
135         * psymtab.c (psymtab_storage): Update.
136         * dwarf2read.c (create_addrmap_from_index)
137         (create_addrmap_from_aranges, dwarf2_build_psymtabs_hard):
138         Update.
139
140 2019-01-10  Tom Tromey  <tom@tromey.com>
141
142         * symfile.c (reread_symbols): Call objfile->reset_psymtabs.
143         * objfiles.h (objfile::reset_psymtabs): New method.
144
145 2019-01-10  Tom Tromey  <tom@tromey.com>
146
147         * symmisc.c (print_symbol_bcache_statistics): Update.
148         (print_objfile_statistics): Update.
149         * symfile.c (reread_symbols): Update.
150         * psymtab.h (class psymtab_storage): New.
151         * psymtab.c (psymtab_storage): New constructor.
152         (~psymtab_storage): New destructor.
153         (require_partial_symbols): Update.
154         (ALL_OBJFILE_PSYMTABS_REQUIRED): Rewrite.
155         (find_pc_sect_psymtab, find_pc_sect_psymbol)
156         (match_partial_symbol, lookup_partial_symbol, dump_psymtab)
157         (psym_dump, recursively_search_psymtabs, psym_has_symbols)
158         (psym_find_compunit_symtab_by_address, sort_pst_symbols)
159         (start_psymtab_common, end_psymtab_common)
160         (add_psymbol_to_bcache, add_psymbol_to_list, init_psymbol_list)
161         (allocate_psymtab): Update.
162         (psymtab_storage::discard_psymtab): Rename from discard_psymtab.
163         Update.
164         (dump_psymtab_addrmap, maintenance_print_psymbols)
165         (maintenance_check_psymtabs): Update.
166         (class objfile_psymtabs): Move to objfiles.h.
167         * psympriv.h (discard_psymtab): Now inline.
168         (psymtab_discarder::psymtab_discarder): Update.
169         (psymtab_discarder::~psymtab_discarder): Update.
170         (ALL_OBJFILE_PSYMTABS): Rewrite.
171         * objfiles.h (struct objfile) <psymtabs, psymtabs_addrmap,
172         free_psymtabs, psymbol_cache, global_psymbols, static_psymbols>:
173         Remove fields.
174         <partial_symtabs>: New field.
175         (class objfile_psymtabs): Move from psymtab.h.  Update.
176         * objfiles.c (objfile::objfile): Initialize partial_symtabs, not
177         psymbol_cache.
178         (objfile::~objfile): Don't destroy psymbol_cache.
179         * mdebugread.c (parse_partial_symbols): Update.
180         * dwarf2read.c (create_addrmap_from_index)
181         (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
182         (process_psymtab_comp_unit_reader, dwarf2_build_psymtabs_hard)
183         (add_partial_subprogram, dwarf2_ranges_read): Update.
184         * dwarf-index-write.c (write_address_map)
185         (write_one_signatured_type, recursively_write_psymbols)
186         (class debug_names, class debug_names, write_psymtabs_to_index):
187         Update.
188
189 2019-01-10  Tom Tromey  <tom@tromey.com>
190
191         * symtab.h (SYMBOL_SET_NAMES): Update.
192         (symbol_set_names): Update.
193         (MSYMBOL_SET_NAMES): Update.
194         * symtab.c (symbol_set_names): Change argument to be an
195         objfile_per_bfd_storage.
196         * psymtab.c (add_psymbol_to_bcache): Update.
197         * psympriv.h (PSYMBOL_SET_NAMES): Take per_bfd argument.
198
199 2019-01-10  Tom Tromey  <tom@tromey.com>
200
201         * symtab.c (create_demangled_names_hash): Change argument to be an
202         objfile_per_bfd_storage.
203         (symbol_set_names): Update.
204
205 2019-01-10  Tom Tromey  <tom@tromey.com>
206
207         * xcoffread.c (xcoff_initial_scan): Unconditionally call
208         init_psymbol_list.
209         * psymtab.c (init_psymbol_list): Do nothing if already called.
210         * psympriv.h (init_psymbol_list): Add comment.
211         * dwarf2read.c (dwarf2_build_psymtabs): Unconditionally call
212         init_psymbol_list.
213         * dbxread.c (dbx_symfile_read): Unconditionally call
214         init_psymbol_list.
215
216 2019-01-10  Tom Tromey  <tom@tromey.com>
217
218         * xcoffread.c (scan_xcoff_symtab): Update.
219         * psymtab.c (add_psymbol_to_list): Replace "list" parameter with
220         "where".
221         * mdebugread.c (parse_partial_symbols)
222         (handle_psymbol_enumerators): Update.
223         * dwarf2read.c (add_partial_symbol, load_partial_dies): Update.
224         * dbxread.c (read_dbx_symtab): Update.
225         * psympriv.h (psymbol_placement): New enum.
226         (add_psymbol_to_list): Update.
227
228 2019-01-10  Tom Tromey  <tom@tromey.com>
229
230         * xcoffread.c (xcoff_start_psymtab): Remove global_psymbols and
231         static_psymbols parameters.
232         (scan_xcoff_symtab): Update.
233         * psymtab.c (start_psymtab_common): Remove global_psymbols and
234         static_psymbols parameters.
235         * psympriv.h (start_psymtab_common): Update.
236         * mdebugread.c (parse_partial_symbols): Update.
237         * dwarf2read.c (create_partial_symtab): Update.
238         * dbxread.c (read_dbx_symtab): Update.
239         (start_psymtab): Remove global_psymbols and static_psymbols
240         parameters.
241
242 2019-01-10  Tom Tromey  <tom@tromey.com>
243
244         * xcoffread.c (xcoff_end_psymtab): Remove some initializations.
245         * psymtab.c (allocate_psymtab): Add comment.
246         * psympriv.h (allocate_psymtab): Add comment.
247         * dwarf2read.c (dwarf2_create_include_psymtab): Remove some
248         initializations.
249         * dbxread.c (dbx_end_psymtab): Remove some initializations.
250
251 2019-01-10  Tom Tromey  <tom@tromey.com>
252
253         * symfile.h (mdebug_build_psymtabs, elfmdebug_build_psymtabs):
254         Don't declare.
255         * mipsread.c: Include mdebugread.h.
256         * mdebugread.h (mdebug_build_psymtabs, elfmdebug_build_psymtabs):
257         Declare.
258         * elfread.c: Include mdebugread.h.
259
260 2019-01-09  Tom Tromey  <tom@tromey.com>
261
262         * dbxread.c (dbx_end_psymtab): Use objfile_psymtabs.
263         * mdebugread.c (parse_partial_symbols): Use objfile_psymtabs.
264         * psymtab.c (ALL_OBJFILE_PSYMTABS_REQUIRED): Remove.
265         (psym_map_symtabs_matching_filename, find_pc_sect_psymtab)
266         (psym_lookup_symbol, psym_find_last_source_symtab)
267         (psym_forget_cached_source_info, psym_print_stats)
268         (psym_expand_symtabs_for_function, psym_expand_all_symtabs)
269         (psym_expand_symtabs_with_fullname, psym_map_symbol_filenames)
270         (psym_map_matching_symbols, psym_expand_symtabs_matching)
271         (psym_find_compunit_symtab_by_address)
272         (maintenance_print_psymbols, maintenance_info_psymtabs)
273         (maintenance_check_psymtabs): Use ranged for.
274         * psymtab.h (class objfile_psymtabs): New.
275         (require_partial_symbols): Return objfile_psymtabs.
276         * psympriv.h (ALL_OBJFILE_PSYMTABS): Remove.
277
278 2019-01-09  Tom Tromey  <tom@tromey.com>
279
280         * symfile.c (overlay_invalidate_all, find_pc_overlay)
281         (find_pc_mapped_section, list_overlays_command)
282         (map_overlay_command, unmap_overlay_command)
283         (simple_overlay_update): Use all_objfiles.
284         * spu-tdep.c (spu_overlay_update): Use all_objfiles.
285         * printcmd.c (info_symbol_command): Use all_objfiles.
286         * objfiles.h (ALL_OBJSECTIONS): Remove.
287         * maint.c (maintenance_translate_address): Use all_objfiles.
288         * gcore.c (gcore_create_callback): Use all_objfiles.
289         (objfile_find_memory_regions): Likewise.
290
291 2019-01-09  Tom Tromey  <tom@tromey.com>
292
293         * symtab.c (find_line_symtab, info_sources_command)
294         (make_source_files_completion_list): Use objfile_compunits.
295         * source.c (select_source_symtab): Use objfile_compunits.
296         * objfiles.h (struct objfile): Update comment.
297         (ALL_OBJFILES): Remove.
298         (ALL_FILETABS): Remove.
299         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Use
300         objfile_compunits.
301
302 2019-01-09  Tom Tromey  <tom@tromey.com>
303
304         * symmisc.c (print_objfile_statistics, dump_objfile)
305         (maintenance_print_symbols): Use compunit_filetabs.
306         * source.c (forget_cached_source_info_for_objfile): Use
307         compunit_filetabs.
308         * objfiles.h (ALL_OBJFILE_FILETABS): Remove.
309         (ALL_FILETABS): Use compunit_filetabs.
310         * objfiles.c (objfile_relocate1): Use compunit_filetabs.
311         * coffread.c (coff_symtab_read): Use compunit_filetabs.
312
313 2019-01-09  Tom Tromey  <tom@tromey.com>
314
315         * symtab.h (ALL_COMPUNIT_FILETABS): Remove.
316         (compunit_filetabs): New.
317         * symtab.c (iterate_over_some_symtabs, find_pc_sect_line): Use
318         compunit_filetabs.
319         (info_sources_command, make_source_files_completion_list): Remove
320         declaration.
321         * symmisc.c (print_objfile_statistics, dump_objfile)
322         (maintenance_print_symbols): Remove declaration.
323         (maintenance_info_symtabs): Use compunit_filetabs.
324         (maintenance_info_line_tables): Likewise.
325         * source.c (select_source_symtab): Change local variable name.
326         (forget_cached_source_info_for_objfile): Remove declaration.
327         * objfiles.h (ALL_OBJFILE_FILETABS): Use compunit_filetabs.
328         * objfiles.c (objfile_relocate1): Remove declaration.
329         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Remove
330         declaration.
331         * maint.c (count_symtabs_and_blocks): Use compunit_filetabs.
332         * coffread.c (coff_symtab_read): Remove declaration.
333         * buildsym.c (buildsym_compunit::end_symtab_with_blockvector): Use
334         compunit_filetabs.
335
336 2019-01-09  Tom Tromey  <tom@tromey.com>
337
338         * symtab.c (lookup_objfile_from_block)
339         (find_pc_sect_compunit_symtab, search_symbols)
340         (default_collect_symbol_completion_matches_break_on): Use
341         objfile_compunits.
342         * objfiles.h (ALL_COMPUNITS): Remove.
343         * maint.c (count_symtabs_and_blocks): Use objfile_compunits.
344         * cp-support.c (add_symbol_overload_list_qualified): Use
345         objfile_compunits.
346         * ada-lang.c (ada_collect_symbol_completion_matches)
347         (ada_add_global_exceptions): Use objfile_compunits.
348
349 2019-01-09  Tom Tromey  <tom@tromey.com>
350
351         * source.c (select_source_symtab)
352         (forget_cached_source_info_for_objfile): Remove declaration.
353         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Remove
354         declaration.
355         * maint.c (count_symtabs_and_blocks): Remove declaration.
356         * cp-support.c (add_symbol_overload_list_qualified): Remove
357         declaration.
358         * coffread.c (coff_symtab_read): Remove declaration.
359         * symtab.c (lookup_symbol_in_objfile_symtabs)
360         (basic_lookup_transparent_type_1): Use objfile_compunits.
361         (lookup_objfile_from_block, find_pc_sect_compunit_symtab)
362         (info_sources_command, search_symbols)
363         (default_collect_symbol_completion_matches_break_on)
364         (make_source_files_completion_list): Remove declaration.
365         * ada-lang.c (add_nonlocal_symbols): Use objfile_compunits.
366         (ada_collect_symbol_completion_matches)
367         (ada_add_global_exceptions): Remove declaration.
368         * linespec.c (iterate_over_all_matching_symtabs): Use
369         objfile_compunits.
370         * objfiles.h (ALL_OBJFILE_COMPUNITS): Remove.
371         (class objfile_compunits): New.
372         (ALL_COMPUNITS): Use objfile_compunits.
373         * symmisc.c (print_objfile_statistics, maintenance_info_symtabs)
374         (maintenance_check_symtabs, maintenance_info_line_tables): Use
375         objfile_compunits.
376         * objfiles.c (objfile_relocate1): Use objfile_compunits.
377
378 2019-01-09  Tom Tromey  <tom@tromey.com>
379
380         * symtab.c (search_symbols)
381         (default_collect_symbol_completion_matches_break_on): Use
382         objfile_msymbols.
383         * ada-lang.c (ada_lookup_simple_minsym)
384         (ada_collect_symbol_completion_matches): Use objfile_msymbols.
385         * minsyms.c (find_solib_trampoline_target): Use objfile_msymbols.
386         * hppa-tdep.c (hppa_lookup_stub_minimal_symbol): Use
387         objfile_msymbols.
388         * coffread.c (coff_symfile_read): Use objfile_msymbols.
389         * symmisc.c (dump_msymbols): Use objfile_msymbols.
390         * objc-lang.c (find_methods): Use objfile_msymbols.
391         (info_selectors_command, info_classes_command): Likewise.
392         * stabsread.c (scan_file_globals): Use objfile_msymbols.
393         * objfiles.h (class objfile_msymbols): New.
394         (ALL_OBJFILE_MSYMBOLS): Remove.
395         (ALL_MSYMBOLS): Remove.
396
397 2019-01-09  Tom Tromey  <tom@tromey.com>
398
399         * common/next-iterator.h (next_adapter): Add Iterator template
400         parameter.
401         * objfiles.h (ALL_OBJFILES_SAFE): Remove.
402         (class all_objfiles_safe): New.
403         * jit.c (jit_inferior_exit_hook): Use all_objfiles_safe.
404         * objfiles.c (put_objfile_before): Update comment.
405         (add_separate_debug_objfile): Likewise.
406         (free_all_objfiles): Use all_objfiles_safe.
407         (objfile_purge_solibs): Likewise.
408
409 2019-01-09  Tom Tromey  <tom@tromey.com>
410
411         * symtab.c (iterate_over_symtabs, matching_obj_sections)
412         (expand_symtab_containing_pc, lookup_static_symbol)
413         (basic_lookup_transparent_type, find_pc_sect_compunit_symtab)
414         (find_symbol_at_address, find_line_symtab, find_main_name): Use
415         all_objfiles.
416         * probe.c (find_probe_by_pc, collect_probes): Use all_objfiles.
417         * breakpoint.c (create_overlay_event_breakpoint)
418         (create_longjmp_master_breakpoint)
419         (create_std_terminate_master_breakpoint)
420         (create_exception_master_breakpoint): Use all_objfiles.
421         * linux-thread-db.c (try_thread_db_load_from_pdir)
422         (has_libpthread): Use all_objfiles.
423         * ada-lang.c (add_nonlocal_symbols): Use all_objfiles.
424         * linespec.c (iterate_over_all_matching_symtabs)
425         (search_minsyms_for_name): Use all_objfiles.
426         * maint.c (maintenance_info_sections): Use all_objfiles.
427         * main.c (captured_main_1): Use all_objfiles.
428         * spu-tdep.c (spu_objfile_from_frame): Use all_objfiles.
429         * guile/scm-objfile.c (gdbscm_objfiles): Use all_objfiles.
430         * guile/scm-pretty-print.c
431         (ppscm_find_pretty_printer_from_objfiles): Use all_objfiles.
432         * solib-spu.c (append_ocl_sos): Use all_objfiles.
433         * symmisc.c (maintenance_print_symbols): Use all_objfiles.
434         (maintenance_print_msymbols): Use all_objfiles.
435         * source.c (select_source_symtab): Use all_objfiles.
436         * jit.c (jit_find_objf_with_entry_addr): Use all_objfiles.
437         * symfile.c (remove_symbol_file_command)
438         (expand_symtabs_matching, map_symbol_filenames): Use
439         all_objfiles.
440         * ppc-linux-tdep.c (ppc_linux_spe_context_inferior_created): Use
441         all_objfiles.
442         * dwarf2-frame.c (dwarf2_frame_find_fde): Use all_objfiles.
443         * objc-lang.c (find_methods): Use all_objfiles.
444         * objfiles.c (have_partial_symbols, have_full_symbols)
445         (have_minimal_symbols, qsort_cmp)
446         (default_iterate_over_objfiles_in_search_order): Use
447         all_objfiles.
448         * hppa-tdep.c (find_unwind_entry): Use all_objfiles.
449         * psymtab.c (maintenance_print_psymbols): Use all_objfiles.
450         (maintenance_check_psymtabs): Use all_objfiles.
451         (ALL_PSYMTABS): Remove.
452         * compile/compile-object-run.c (do_module_cleanup): Use
453         all_objfiles.
454         * blockframe.c (find_pc_partial_function): Use all_objfiles.
455         * cp-support.c (add_symbol_overload_list_qualified): Use
456         all_objfiles.
457         * windows-tdep.c (windows_iterate_over_objfiles_in_search_order):
458         Use all_objfiles.
459         * dwarf-index-write.c (save_gdb_index_command): Use all_objfiles.
460         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): Use
461         all_objfiles.
462         * python/py-objfile.c (objfpy_lookup_objfile_by_name)
463         (objfpy_lookup_objfile_by_build_id): Use all_objfiles.
464         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
465         Uses all_objfiles.
466         * solib.c (solib_read_symbols): Use all_objfiles
467
468 2019-01-09  Tom Tromey  <tom@tromey.com>
469
470         * probe.c (parse_probes_in_pspace): Use all_objfiles.
471         * guile/scm-progspace.c (gdbscm_progspace_objfiles): Use
472         all_objfiles.
473         * objfiles.h (ALL_PSPACE_OBJFILES): Remove.
474         * symmisc.c (print_symbol_bcache_statistics)
475         (print_objfile_statistics, maintenance_print_objfiles)
476         (maintenance_info_symtabs, maintenance_check_symtabs)
477         (maintenance_expand_symtabs, maintenance_info_line_tables): Use
478         all_objfiles.
479         * source.c (forget_cached_source_info): Use all_objfiles.
480         * symfile-debug.c (set_debug_symfile): Use all_objfiles.
481         * elfread.c (elf_gnu_ifunc_resolve_by_cache)
482         (elf_gnu_ifunc_resolve_by_got): Use all_objfiles.
483         * objfiles.c (update_section_map): Use all_objfiles.
484         (shared_objfile_contains_address_p): Likewise.
485         * psymtab.c (maintenance_info_psymtabs): Use all_objfiles.
486         * python/py-progspace.c (pspy_get_objfiles): Use all_objfiles.
487
488 2019-01-09  Tom Tromey  <tom@tromey.com>
489
490         * common/next-iterator.h: New file.
491         * objfiles.h (class all_objfiles): New.
492         (struct objfile_iterator): New.
493
494 2019-01-09  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
495
496         * NEWS: Move the description of the changed "frame", "select-frame",
497          and "info frame" commands to the Changed commands section.
498
499 2019-01-09  Simon Marchi  <simon.marchi@ericsson.com>
500
501         * gdbtypes.c (check_stub_method_group): Remove handling of old
502         mangling schemes.
503         * linespec.c (find_methods): Likewise.
504         * stabsread.c (read_member_functions): Likewise.
505         * valops.c (search_struct_method): Likewise.
506         (value_struct_elt_for_reference): Likewise.
507         * NEWS: Mention this change.
508
509 2019-01-09  Andrew Burgess  <andrew.burgess@embecosm.com>
510
511         * cli/cli-cmds.c (list_command): Pass a source_lines_range to
512         print_source_lines.
513         * source.c (print_source_lines_base): Update line number check.
514         (print_source_lines): New function.
515         (source_lines_range::source_lines_range): New function.
516         * source.h (class source_lines_range): New class.
517         (print_source_lines): New declaration.
518
519 2019-01-09  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
520
521         * linespec.c (linespec_state_destructor): Free self->canonical_names.
522
523 2019-01-08  Tom Tromey  <tom@tromey.com>
524             Simon Marchi  <simon.marchi@ericsson.com>
525
526         PR gdb/24060
527         * ada-exp.y (DOLLAR_VARIABLE): Rename from SPECIAL_VARIABLE.
528         * ada-lex.l (DOLLAR_VARIABLE): Likewise.
529         * c-exp.y (DOLLAR_VARIABLE): Rename from VARIABLE.
530         * f-exp.y (DOLLAR_VARIABLE): Likewise.
531         * m2-exp.y (DOLLAR_VARIABLE): Rename from INTERNAL_VAR.
532         * p-exp.y (DOLLAR_VARIABLE): Rename from VARIABLE.
533
534 2019-01-08  Andrew Burgess  <andrew.burgess@embecosm.com>
535
536         * source.c (select_source_symtab): Move header comment to
537         declaration in source.h.
538         (forget_cached_source_info_for_objfile): Likewise.
539         (forget_cached_source_info): Likewise.
540         (identify_source_line): Likewise.
541         * source.h (identify_source_line): Move declaration from symtab.h
542         and add comment from source.c
543         (print_source_lines): Likewise.
544         (forget_cached_source_info_for_objfile): Likewise.
545         (forget_cached_source_info): Likewise.
546         (select_source_symtab): Likewise.
547         (enum print_source_lines_flag): Move definition from symtab.h.
548         * symtab.h (identify_source_line): Move declaration to source.h.
549         (print_source_lines): Likewise.
550         (forget_cached_source_info_for_objfile): Likewise.
551         (forget_cached_source_info): Likewise.
552         (select_source_symtab): Likewise.
553         (enum print_source_lines_flag): Move definition to source.h.
554         * tui/tui-hooks.c: Add 'source.h' include.
555
556 2019-01-08  Andrew Burgess  <andrew.burgess@embecosm.com>
557
558         * source.c (print_source_lines_base): Handle requests to print
559         reverse line number sequences, and guard against empty lines
560         string.
561
562 2019-01-08  Andrew Burgess  <andrew.burgess@embecosm.com>
563
564         * source.c (print_source_lines_base): Fix skip of '\r' if next
565         character is '\n'.
566
567 2019-01-06  Tom Tromey  <tom@tromey.com>
568
569         * c-exp.y (struct c_parse_state) <macro_original_text,
570         expansion_obstack>: New member.
571         (macro_original_text, expansion_obstack): Remove globals.
572         (scan_macro_expansion, scanning_macro_expansion)
573         (finished_macro_expansion): Update.
574         (scan_macro_cleanup): Remove.
575         (yylex, c_parse): Update.
576
577 2019-01-06  Tom Tromey  <tom@tromey.com>
578
579         * c-exp.y (struct c_parse_state) <strings>: New member.
580         (operator_stoken): Update.
581
582 2019-01-06  Tom Tromey  <tom@tromey.com>
583
584         * parser-defs.h (type_ptr): Remove typedef.  Don't declare VEC.
585         (union type_stack_elt) <typelist_val>: Now a pointer to
586         std::vector.
587         (type_stack_cleanup): Don't declare.
588         (push_typelist): Update.
589         * parse.c (pop_typelist): Return a std::vector.
590         (push_typelist): Take a std::vector.
591         (follow_types): Update.  Do not free args.
592         (type_stack_cleanup): Remove.
593         * c-exp.y (struct c_parse_state): New.
594         (cpstate): New global.
595         (type_aggregate_p, exp, ptr_operator, parameter_typelist)
596         (nonempty_typelist): Update.
597         (func_mod): Create a new vector.
598         (c_parse): Create a c_parse_state.
599         (check_parameter_typelist): Do not delete params.
600         (function_method): Update.  Do not delete type_list.
601
602 2019-01-06  Tom Tromey  <tom@tromey.com>
603
604         PR gdb/28155:
605         * python/py-finishbreakpoint.c (bpfinishpy_init): Use
606         check_typedef.
607         * infcmd.c (finish_command_fsm_should_stop): Use check_typedef.
608         (print_return_value): Likewise.
609
610 2019-01-05  Tom Tromey  <tom@tromey.com>
611
612         * contrib/cleanup_check.py: Remove.
613         * contrib/gcc-with-excheck: Remove.
614         * contrib/exsummary.py: Remove.
615         * contrib/excheck.py: Remove.
616
617 2019-01-05  Joel Brobecker  <brobecker@adacore.com>
618
619         * thread.c (delete_thread_1): Add gdb_assert that THR is not
620         NULL. Initialize tpprev to NULL instead of assigning it
621         to NULL on the next statement.
622         * windows-nat.c (windows_delete_thread): Remove check for
623         main_thread_id before printing thread exit notifications.
624         (get_windows_debug_event) <EXIT_THREAD_DEBUG_EVENT>:
625         Remove thread ID check against main_thread_id.
626         <CREATE_PROCESS_DEBUG_EVENT>: Remove call to
627         windows_delete_thread.
628         <EXIT_PROCESS_DEBUG_EVENT>: Add call to windows_delete_thread.
629
630 2019-01-04  Tom Tromey  <tom@tromey.com>
631
632         * compile/compile.c (_initialize_compile): Use upper case for
633         metasyntactic variables.
634         * symmisc.c (_initialize_symmisc): Use upper case for
635         metasyntactic variables.
636         * psymtab.c (_initialize_psymtab): Use upper case for
637         metasyntactic variables.
638         * demangle.c (demangle_command): Use upper case for metasyntactic
639         variables.
640         (_initialize_demangler): Likewise.
641         * ax-gdb.c (_initialize_ax_gdb): Use upper case for metasyntactic
642         variables.
643
644 2019-01-03  Tom Tromey  <tom@tromey.com>
645
646         * tui/tui-source.c (tui_set_source_content): Use xstrdup.
647
648 2019-01-03  Tom Tromey  <tom@tromey.com>
649
650         * python/py-symtab.c (salpy_str): Update.
651         (struct salpy_sal_object) <symtab>: Now a PyObject.
652         (salpy_dealloc): Update.
653         (del_objfile_sal): Use gdbpy_ref.
654
655 2019-01-03  Tom Tromey  <tom@tromey.com>
656
657         * python/py-type.c (convert_field): Use new_reference.  Return
658         gdbpy_ref.
659         (make_fielditem): Return gdbpy_ref.
660         (typy_fields): Update.
661         (typy_getitem): Update.
662         (field_name): Return gdbpy_ref.  Use new_reference.
663         (typy_iterator_iternext): Update.
664
665 2019-01-03  Tom Tromey  <tom@tromey.com>
666
667         * python/py-record.c (gdbpy_stop_recording): Use Py_RETURN_NONE.
668
669 2019-01-03  Tom Tromey  <tom@tromey.com>
670
671         * python/py-value.c (valpy_dealloc): Use Py_XDECREF.
672         * python/py-type.c (typy_fields_items): Use gdbpy_ref.
673         * python/py-progspace.c (pspy_set_printers): Use gdbpy_ref.
674         (pspy_set_frame_filters, pspy_set_frame_unwinders)
675         (pspy_set_type_printers): Likewise.
676         * python/py-function.c (fnpy_init): Use gdbpy_ref.
677         * python/py-cmd.c (cmdpy_init): Use gdbpy_ref.
678         * python/py-objfile.c (objfpy_set_printers): Use gdbpy_ref.
679         (objfpy_set_frame_filters, objfpy_set_frame_unwinders)
680         (objfpy_set_type_printers): Likewise.
681
682 2019-01-03  Tom Tromey  <tom@tromey.com>
683
684         * python/python.c (gdbpy_enter, ~gdbpy_enter): Update.
685         (gdbpy_print_stack): Use gdbpy_err_fetch.
686         * python/python-internal.h (class gdbpy_err_fetch): New class.
687         (class gdbpy_enter) <m_error_type, m_error_value,
688         m_error_traceback>: Remove.
689         <m_error>: New member.
690         (gdbpy_exception_to_string): Don't declare.
691         * python/py-varobj.c (py_varobj_iter_next): Use gdbpy_err_fetch.
692         * python/py-value.c (convert_value_from_python): Use
693         gdbpy_err_fetch.
694         * python/py-utils.c (gdbpy_err_fetch::to_string): Rename from
695         gdbpy_exception_to_string.
696         (gdbpy_handle_exception): Use gdbpy_err_fetch.
697         * python/py-prettyprint.c (print_stack_unless_memory_error): Use
698         gdbpy_err_fetch.
699
700 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
701
702         * linux-nat.c (delete_lwp_cleanup): Delete.
703         (struct lwp_deleter): New struct.
704         (lwp_info_up): New typedef.
705         (linux_nat_target::follow_fork): Delete cleanup, and make use of
706         lwp_info_up.
707
708 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
709
710         * linux-fork.c (class scoped_switch_fork_info): New class.
711         (inferior_call_waitpid): Update to use scoped_switch_fork_info.
712
713 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
714
715         * valops.c (find_overload_match): Remove use of null_cleanup, and
716         calls to do_cleanups.
717
718 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
719
720         * compile/compile-cplus-types.c
721         (compile_cplus_instance::decl_name): Handle changes to
722         cp_func_name.
723         * cp-support.c (cp_func_name): Update header comment, update
724         return type.
725         * cp-support.h (cp_func_name): Update return type in declaration.
726         * valops.c (find_overload_match): Move temp_func local to top
727         level of function and change its type.  Use temp_func to hold and
728         delete temporary string obtained from cp_func_name.
729
730 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
731
732         * remote.c (remote_target::remote_check_symbols): Convert `msg` to
733         gdb::char_vector, remove cleanup, and update uses of `msg`.
734
735 2019-01-03  Jim Wilson  <jimw@sifive.com>
736
737         * riscv-tdep.c (riscv_freg_feature): Drop s0 name from f8.
738
739 2019-01-02  Tom Tromey  <tom@tromey.com>
740
741         * xml-tdesc.c (xml_cache): Hold a target_desc_up.
742         (tdesc_parse_xml): Remove cleanups.
743         * target-descriptions.h (make_cleanup_free_target_description):
744         Don't declare.
745         (target_desc_deleter): New struct.
746         (target_desc_up): New typedef.
747         * target-descriptions.c (target_desc_deleter::operator()): Rename
748         from free_target_description.
749         (make_cleanup_free_target_description): Remove.
750
751 2019-01-02  Tom Tromey  <tom@tromey.com>
752
753         * linespec.c (struct linespec_parser): Rename from ls_parser.  Add
754         constructor, destructor.
755         (linespec_parser): Remove typedef.
756         (~linespec_parser): Rename from linespec_parser_delete.
757         (linespec_lex_to_end, linespec_complete_label)
758         (linespec_complete): Update.
759         (decode_line_full): Remove cleanups.
760         (decode_line_1): Update.
761
762 2019-01-02  Tom Tromey  <tom@tromey.com>
763
764         * python/python-internal.h (inferior_to_inferior_object): Change
765         return type.
766         * python/py-exitedevent.c (create_exited_event_object): Update.
767         * python/py-inferior.c (inferior_to_inferior_object): Return
768         gdbpy_ref.
769         (python_new_inferior, python_inferior_deleted)
770         (thread_to_thread_object, delete_thread_object)
771         (build_inferior_list, gdbpy_selected_inferior): Update.
772         * python/py-infthread.c (create_thread_object): Update.  Also fail
773         if inferior_to_inferior_object fails.
774
775 2019-01-02  Simon Marchi  <simon.marchi@ericsson.com>
776
777         * inferior.h (class inferior) <displaced_step_state>: New field.
778         * infrun.h (struct displaced_step_state): Move here from
779         infrun.c.  Initialize fields, add constructor.
780         <inf>: Remove field.
781         <reset>: New method.
782         * infrun.c (struct displaced_step_inferior_state): Move to
783         infrun.h.
784         (displaced_step_inferior_states): Remove.
785         (get_displaced_stepping_state): Adust.
786         (displaced_step_in_progress_any_inferior): Adjust.
787         (displaced_step_in_progress_thread): Adjust.
788         (displaced_step_in_progress): Adjust.
789         (add_displaced_stepping_state): Remove.
790         (get_displaced_step_closure_by_addr): Adjust.
791         (remove_displaced_stepping_state): Remove.
792         (infrun_inferior_exit): Call displaced_step_state.reset.
793         (use_displaced_stepping): Don't check for NULL.
794         (displaced_step_prepare_throw): Call
795         get_displaced_stepping_state.
796         (displaced_step_fixup): Don't check for NULL.
797         (prepare_for_detach): Don't check for NULL.
798
799 2019-01-02  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
800
801         * infcall.c (call_function_by_hand_dummy): cleanup/destroy sm
802          in case of call that did not complete.
803
804 2019-01-02  Andrey Utkin  <autkin@undo.io>
805
806         * symfile.c (find_separate_debug_file): Fix search of debug files for
807         remote debuggee.
808
809 2019-01-02  Tom Tromey  <tom@tromey.com>
810
811         * python/py-inferior.c (gdbpy_initialize_inferior): Fix
812         indentation.
813         * python/py-frame.c (frapy_older): Remove cast.
814         (frapy_newer): Likewise.
815         * python/py-breakpoint.c (local_setattro): Remove cast.
816         * python/py-arch.c (archpy_name): Remove local variable.
817         * python/py-type.c (gdbpy_lookup_type): Remove cast.
818
819 2019-01-02  Joel Brobecker  <brobecker@adacore.com>
820
821         * unittests/basic_string_view/element_access/char/empty.cc:
822         Fix year range in copyright header.
823
824 2019-01-01  Andrew Burgess  <andrew.burgess@embecosm.com>
825
826         * arch/riscv.h (struct riscv_gdbarch_features) <hw_float_abi>:
827         Delete.
828         <operator==>: Update with for removed field.
829         <hash>: Likewise.
830         * riscv-tdep.h (struct gdbarch_tdep) <features>: Renamed to...
831         <isa_features>: ...this.
832         <abi_features>: New field.
833         (riscv_isa_flen): Update comment.
834         (riscv_abi_xlen): New declaration.
835         (riscv_abi_flen): New declaration.
836         * riscv-tdep.c (riscv_isa_xlen): Update to get answer from
837         isa_features.
838         (riscv_abi_xlen): New function.
839         (riscv_isa_flen): Update to get answer from isa_features.
840         (riscv_abi_flen): New function.
841         (riscv_has_fp_abi): Update to get answer from abi_features.
842         (riscv_call_info::riscv_call_info): Use abi xlen and flen, not isa
843         xlen and flen.
844         (riscv_call_info) <xlen, flen>: Update comment.
845         (riscv_call_arg_struct): Remove invalid assertions
846         (riscv_features_from_gdbarch_info): Update now hw_float_abi field
847         is removed.
848         (riscv_gdbarch_init): Gather isa features and abi features
849         separately, ensure both match on the gdbarch when reusing an old
850         gdbarch.  Relax an error check to allow 32-bit abi float to run on
851         a target with 64-bit float hardware.
852
853 2019-01-01  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
854
855         * source.c (search_command_helper): Stop reverse search
856         when line 1 has been searched.
857
858 2019-01-01  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
859
860         * record-full.c (record_full_base_target::close): Rewrite
861         record_full_core_buf_list free logic.
862
863 2019-01-01  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
864
865         * break-catch-syscall.c (print_one_catch_syscall): xfree
866         the last text.
867
868 2019-01-01  Joel Brobecker  <brobecker@adacore.com>
869
870         * top.c (print_gdb_version): Update Copyright year in version
871         message.
872
873 2019-01-01  Joel Brobecker  <brobecker@adacore.com>
874
875         Update copyright year range in all GDB files.
876
877 2019-01-01  Joel Brobecker  <brobecker@adacore.com>
878
879         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2018.
880
881 For older changes see ChangeLog-2018.
882 \f
883 Local Variables:
884 mode: change-log
885 left-margin: 8
886 fill-column: 74
887 version-control: never
888 coding: utf-8
889 End:
890