Remove clear_symtab_users_cleanup
[external/binutils.git] / gdb / ChangeLog
1 2019-01-23  Tom Tromey  <tom@tromey.com>
2             Pedro Alves  <palves@redhat.com>
3
4         * symfile.c: Include forward-scope-exit.h.
5         (clear_symtab_users_cleanup): Replace forward declaration with
6         a FORWARD_SCOPE_EXIT.
7         (syms_from_objfile_1): Use the forward_scope_exit and
8         gdb::optional instead of cleanup_function.
9         (reread_symbols): Use the forward_scope_exit instead of
10         cleanup_function.
11         (clear_symtab_users_cleanup): Remove function.
12
13 2019-01-23  Tom Tromey  <tom@tromey.com>
14             Pedro Alves  <palves@redhat.com>
15
16         * linux-nat.c: Include scope-exit.h.
17         (cleanup_target_stop): Remove.
18         (linux_nat_target::static_tracepoint_markers_by_strid): Use
19         SCOPE_EXIT.
20
21 2019-01-23  Tom Tromey  <tom@tromey.com>
22             Pedro Alves  <palves@redhat.com>
23
24         * infcall.c (cleanup_delete_std_terminate_breakpoint): Remove.
25         (call_function_by_hand_dummy): Use SCOPE_EXIT.
26
27 2019-01-23  Tom Tromey  <tom@tromey.com>
28             Andrew Burgess  <andrew.burgess@embecosm.com>
29             Pedro Alves  <palves@redhat.com>
30
31         * infrun.c (fetch_inferior_event): Use scope_exit.
32         * utils.h (make_bpstat_clear_actions_cleanup): Don't declare.
33         * top.c (execute_command): Use scope_exit.
34         * breakpoint.c (bpstat_do_actions): Use scope_exit.
35         * utils.c (do_bpstat_clear_actions_cleanup)
36         (make_bpstat_clear_actions_cleanup): Remove.
37
38 2019-01-23  Tom Tromey  <tom@tromey.com>
39             Pedro Alves  <palves@redhat.com>
40
41         * infrun.c: Include "common/scope-exit.h"
42         (delete_just_stopped_threads_infrun_breakpoints_cleanup): Remove.
43         (wait_for_inferior): Use SCOPE_EXIT.
44         (fetch_inferior_event): Use scope_exit.
45
46 2019-01-23  Tom Tromey  <tom@tromey.com>
47             Pedro Alves  <palves@redhat.com>
48
49         * breakpoint.c (create_breakpoint): Remove cleanup.
50
51 2019-01-23  Tom Tromey  <tom@tromey.com>
52             Andrew Burgess  <andrew.burgess@embecosm.com>
53             Pedro Alves  <palves@redhat.com>
54
55 2019-01-23  Pedro Alves  <palves@redhat.com>
56
57         * gdbarch-selftests.c (struct on_exit): Use SCOPE_EXIT.
58
59 2019-01-23  Pedro Alves  <palves@redhat.com>
60             Andrew Burgess  <andrew.burgess@embecosm.com>
61
62         * gdbthread.h: Include "common/forward-scope-exit.h".
63         (scoped_finish_thread_state): Redefine custom class in terms of
64         forward_scope_exit.
65
66 2019-01-23  Pedro Alves  <palves@redhat.com>
67             Andrew Burgess  <andrew.burgess@embecosm.com>
68
69         * common/forward-scope-exit.h: New file.
70
71 2019-01-23  Pedro Alves  <palves@redhat.com>
72             Andrew Burgess  <andrew.burgess@embecosm.com>
73             Tom Tromey  <tom@tromey.com>
74
75         * common/scope-exit.h: New file.
76
77 2019-01-23  Pedro Alves  <palves@redhat.com>
78
79         * common/preprocessor.h (ESC): Rename to ...
80         (ESC_PARENS): ... this.
81         * common/valid-expr.h (CHECK_VALID_EXPR_1, CHECK_VALID_EXPR_2)
82         (CHECK_VALID_EXPR_3, CHECK_VALID_EXPR_4): Adjust.
83
84 2019-01-23  Tom Tromey  <tom@tromey.com>
85
86         * language.h (class scoped_switch_to_sym_language_if_auto):
87         Initialize m_lang in both cases.
88
89 2019-01-23  Alan Hayward  <alan.hayward@arm.com>
90
91         * nat/aarch64-linux.c (aarch64_linux_new_thread): Replace XNEW
92         with XCNEW.
93
94 2019-01-22  Tom Tromey  <tom@tromey.com>
95
96         * corelow.c: Do not include sys/file.h.
97
98 2019-01-22  Tom Tromey  <tom@tromey.com>
99
100         * tui/tui-wingeneral.h: Include gdb_curses.h.
101
102 2019-01-22  Tom Tromey  <tom@tromey.com>
103
104         * source-cache.h (class source_cache) <get_source_lines,
105         get_plain_source_lines, extract_lines>: Rename "lines" parameter.
106
107 2019-01-22  Tom Tromey  <tom@tromey.com>
108
109         * remote-fileio.h (struct remote_target): Declare.
110
111 2019-01-22  Tom Tromey  <tom@tromey.com>
112
113         * python/py-arch.c: Do not include py-ref.h.
114         * python/py-bpevent.c: Do not include py-ref.h.
115         * python/py-cmd.c: Do not include py-ref.h.
116         * python/py-continueevent.c: Do not include py-ref.h.
117         * python/py-event.h: Do not include py-ref.h.
118         * python/py-evtregistry.c: Do not include py-ref.h.
119         * python/py-finishbreakpoint.c: Do not include py-ref.h.
120         * python/py-frame.c: Do not include py-ref.h.
121         * python/py-framefilter.c: Do not include py-ref.h.
122         * python/py-function.c: Do not include py-ref.h.
123         * python/py-infevents.c: Do not include py-ref.h.
124         * python/py-linetable.c: Do not include py-ref.h.
125         * python/py-objfile.c: Do not include py-ref.h.
126         * python/py-param.c: Do not include py-ref.h.
127         * python/py-prettyprint.c: Do not include py-ref.h.
128         * python/py-progspace.c: Do not include py-ref.h.
129         * python/py-symbol.c: Do not include py-ref.h.
130         * python/py-symtab.c: Do not include py-ref.h.
131         * python/py-type.c: Do not include py-ref.h.
132         * python/py-unwind.c: Do not include py-ref.h.
133         * python/py-utils.c: Do not include py-ref.h.
134         * python/py-value.c: Do not include py-ref.h.
135         * python/py-varobj.c: Do not include py-ref.h.
136         * python/py-xmethods.c: Do not include py-ref.h.
137         * python/python.c: Do not include py-ref.h.
138         * varobj.c: Do not include py-ref.h.
139
140 2019-01-22  Tom Tromey  <tom@tromey.com>
141
142         * objfiles.h (struct objfile_per_bfd_storage): Use "struct"
143         keyword for bcache.
144
145 2019-01-22  Tom Tromey  <tom@tromey.com>
146
147         * compile/compile-cplus-types.c: Remove a comment by #include.
148
149 2019-01-22  Tom Tromey  <tom@tromey.com>
150
151         * compile/gcc-c-plugin.h: Include compile-internal.h.
152
153 2019-01-22  Tom Tromey  <tom@tromey.com>
154
155         * stabsread.c (EXTERN): Do not define.
156         (symnum, next_symbol_text_func, processing_gcc_compilation)
157         (within_function, global_sym_chain, global_stabs)
158         (previous_stab_code, this_object_header_files)
159         (n_this_object_header_files)
160         (n_allocated_this_object_header_files): Define.
161         * stabsread.h (EXTERN): Never define.  Use "extern".
162
163 2019-01-22  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
164
165         * event-top.c (handle_line_of_input): use unique_xmalloc_ptr for
166         history_value.
167
168 2019-01-21  Tom Tromey  <tom@tromey.com>
169
170         * ui-out.c: Fix includes.
171         * tui/tui-source.c: Fix includes.
172         * target.c: Fix includes.
173         * remote.c: Fix includes.
174         * regcache.c: Fix includes.
175         * python/py-block.c: Fix includes.
176         * printcmd.c: Fix includes.
177         * or1k-tdep.c: Fix includes.
178         * mi/mi-main.c: Fix includes.
179         * m32r-tdep.c: Fix includes.
180         * csky-tdep.c: Fix includes.
181         * compile/compile-cplus-types.c: Fix includes.
182         * cli/cli-interp.c: Fix includes.
183
184 2019-01-21  Alan Hayward  <alan.hayward@arm.com>
185
186         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1): Check
187         for padding.
188
189 2019-01-16  Tom Tromey  <tom@tromey.com>
190
191         * objfiles.h (struct minimal_symbol_iterator): Rename.  Move
192         earlier.
193         (struct objfile) <msymbols_range>: Move from top level.
194         <msymbols>: New method.
195         (class objfile_msymbols): Remove.
196         * symtab.c (default_collect_symbol_completion_matches_break_on):
197         Update.
198         * symmisc.c (dump_msymbols): Update.
199         * stabsread.c (scan_file_globals): Update.
200         * objc-lang.c (info_selectors_command, info_classes_command)
201         (find_methods): Update.
202         * minsyms.c (find_solib_trampoline_target): Update.
203         * hppa-tdep.c (hppa_lookup_stub_minimal_symbol): Update.
204         * coffread.c (coff_symfile_read): Update.
205         * ada-lang.c (ada_lookup_simple_minsym)
206         (ada_collect_symbol_completion_matches): Update.
207
208 2019-01-16  Tom Tromey  <tom@tromey.com>
209
210         * objfiles.h (class objfile_msymbols) <iterator>: Change argument
211         type.  Remove no-argument constructor.
212         <iterator::operator++>: Simplify.
213         <begin>: Update.
214         <end>: Use minimal_symbol_count.
215
216 2019-01-16  Tom Tromey  <tom@tromey.com>
217
218         * objfiles.h (struct objfile) <psymtabs>: New method.
219         (class objfile_psymtabs): Remove.
220         * psymtab.h (class psymtab_storage) <partial_symtab_range>: New
221         typedef.
222         <range>: New method.
223         (require_partial_symbols): Change return type.
224         * psymtab.c (require_partial_symbols)
225         (psym_expand_symtabs_matching): Update.
226         * mdebugread.c (parse_partial_symbols): Update.
227         * dbxread.c (dbx_end_psymtab): Update.
228
229 2019-01-15  Tom Tromey  <tom@tromey.com>
230
231         * symtab.c (lookup_objfile_from_block)
232         (lookup_symbol_in_objfile_symtabs)
233         (basic_lookup_transparent_type_1, find_pc_sect_compunit_symtab)
234         (find_line_symtab, info_sources_command)
235         (default_collect_symbol_completion_matches_break_on)
236         (make_source_files_completion_list): Update.
237         * symmisc.c (print_objfile_statistics, dump_objfile)
238         (maintenance_print_symbols, maintenance_info_symtabs)
239         (maintenance_check_symtabs, maintenance_info_line_tables):
240         Update.
241         * source.c (select_source_symtab)
242         (forget_cached_source_info_for_objfile): Update.
243         * objfiles.h (class objfile_compunits): Remove.
244         (struct objfile) <compunits_range>: New typedef.
245         (compunits): New method.
246         * objfiles.c (objfile_relocate1): Update.
247         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Update.
248         * maint.c (count_symtabs_and_blocks): Update.
249         * linespec.c (iterate_over_all_matching_symtabs): Update.
250         * cp-support.c (add_symbol_overload_list_qualified): Update.
251         * coffread.c (coff_symtab_read): Update.
252         * ada-lang.c (add_nonlocal_symbols)
253         (ada_collect_symbol_completion_matches)
254         (ada_add_global_exceptions): Update.
255
256 2019-01-15  Tom Tromey  <tom@tromey.com>
257
258         * progspace.h (program_space) <objfiles_safe_range>: New
259         typedef.
260         <objfiles_safe>: New method.
261         * objfiles.h (class all_objfiles_safe): Remove.
262         * objfiles.c (free_all_objfiles, objfile_purge_solibs): Update.
263         * jit.c (jit_inferior_exit_hook): Update.
264
265 2019-01-17  Tom Tromey  <tom@tromey.com>
266
267         * progspace.h (program_space) <objfiles_range>: New typedef.
268         <objfiles>: New method.
269         <objfiles_head>: Rename from objfiles.
270         (object_files): Update.
271         * guile/scm-progspace.c (gdbscm_progspace_objfiles): Update.
272         * guile/scm-pretty-print.c
273         (ppscm_find_pretty_printer_from_objfiles): Update.
274         * guile/scm-objfile.c (gdbscm_objfiles): Update.
275         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
276         Update.
277         * python/py-progspace.c (pspy_get_objfiles): Update.
278         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
279         Update.
280         * python/py-objfile.c (objfpy_lookup_objfile_by_name)
281         (objfpy_lookup_objfile_by_build_id): Update.
282         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Update.
283         * windows-tdep.c (windows_iterate_over_objfiles_in_search_order):
284         Update.
285         * symtab.c (iterate_over_symtabs, matching_obj_sections)
286         (expand_symtab_containing_pc, lookup_objfile_from_block)
287         (lookup_static_symbol, basic_lookup_transparent_type)
288         (find_pc_sect_compunit_symtab, find_symbol_at_address)
289         (find_line_symtab, info_sources_command)
290         (default_collect_symbol_completion_matches_break_on)
291         (make_source_files_completion_list, find_main_name): Update.
292         * symmisc.c (print_symbol_bcache_statistics)
293         (print_objfile_statistics, maintenance_print_symbols)
294         (maintenance_print_msymbols, maintenance_print_objfiles)
295         (maintenance_info_symtabs, maintenance_check_symtabs)
296         (maintenance_expand_symtabs, maintenance_info_line_tables):
297         Update.
298         * symfile.c (remove_symbol_file_command, overlay_invalidate_all)
299         (find_pc_overlay, find_pc_mapped_section, list_overlays_command)
300         (map_overlay_command, unmap_overlay_command)
301         (simple_overlay_update, expand_symtabs_matching)
302         (map_symbol_filenames): Update.
303         * symfile-debug.c (set_debug_symfile): Update.
304         * spu-tdep.c (spu_overlay_update, spu_objfile_from_frame):
305         Update.
306         * source.c (select_source_symtab, forget_cached_source_info):
307         Update.
308         * solib.c (solib_read_symbols): Update.
309         * solib-spu.c (append_ocl_sos): Update.
310         * psymtab.c (maintenance_print_psymbols)
311         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
312         * probe.c (parse_probes_in_pspace, find_probe_by_pc): Update.
313         * printcmd.c (info_symbol_command): Update.
314         * ppc-linux-tdep.c (ppc_linux_spe_context_inferior_created):
315         Update.
316         * objfiles.h (class all_objfiles): Remove.
317         * objfiles.c (have_partial_symbols, have_full_symbols)
318         (have_minimal_symbols, qsort_cmp, update_section_map)
319         (shared_objfile_contains_address_p)
320         (default_iterate_over_objfiles_in_search_order): Update.
321         * objc-lang.c (info_selectors_command, info_classes_command)
322         (find_methods): Update.
323         * minsyms.c (find_solib_trampoline_target): Update.
324         * maint.c (maintenance_info_sections)
325         (maintenance_translate_address, count_symtabs_and_blocks):
326         Update.
327         * main.c (captured_main_1): Update.
328         * linux-thread-db.c (try_thread_db_load_from_pdir)
329         (has_libpthread): Update.
330         * linespec.c (iterate_over_all_matching_symtabs)
331         (search_minsyms_for_name): Update.
332         * jit.c (jit_find_objf_with_entry_addr): Update.
333         * hppa-tdep.c (find_unwind_entry)
334         (hppa_lookup_stub_minimal_symbol): Update.
335         * gcore.c (gcore_create_callback, objfile_find_memory_regions):
336         Update.
337         * elfread.c (elf_gnu_ifunc_resolve_by_cache)
338         (elf_gnu_ifunc_resolve_by_got): Update.
339         * dwarf2-frame.c (dwarf2_frame_find_fde): Update.
340         * dwarf-index-write.c (save_gdb_index_command): Update.
341         * cp-support.c (add_symbol_overload_list_qualified): Update.
342         * breakpoint.c (create_overlay_event_breakpoint)
343         (create_longjmp_master_breakpoint)
344         (create_std_terminate_master_breakpoint)
345         (create_exception_master_breakpoint): Update.
346         * blockframe.c (find_pc_partial_function): Update.
347         * ada-lang.c (ada_lookup_simple_minsym, add_nonlocal_symbols)
348         (ada_collect_symbol_completion_matches)
349         (ada_add_global_exceptions): Update.
350
351 2019-01-17  Tom Tromey  <tom@tromey.com>
352
353         * solib-target.c (lm_info_target_p): Remove typedef.  Don't
354         declare VEC.
355         (solib_target_parse_libraries): Change return type.
356         (library_list_start_segment, library_list_start_section)
357         (library_list_end_library, library_list_start_library); Update.
358         (solib_target_free_library_list): Remove.
359         (solib_target_parse_libraries): Remove cleanup.  Change return
360         type.
361         (solib_target_current_sos): Update.
362
363 2019-01-17  Tom Tromey  <tromey@bapiya>
364
365         * valprint.c: Replace "the the" with "the".
366         * symtab.c: Replace "the the" with "the".
367         * solib.c: Replace "the the" with "the".
368         * solib-dsbt.c: Replace "the the" with "the".
369         * linespec.c: Replace "the the" with "the".
370         * dwarf2loc.h: Replace "the the" with "the".
371         * amd64-windows-tdep.c: Replace "the the" with "the".
372         * aarch64-tdep.c: Replace "the the" with "the".
373
374 2019-01-16  Keith Seitz  <keiths@redhat.com>
375
376         PR gdb/23773
377         * dwarf2read.c (dwarf2_cu) <ancestor>: New field.
378         <builder>: Rename to ..
379         <m_builder>: ... this and make private.
380         (dwarf2_cu::get_builder): New method.  Change all users of
381         `builder' to use this method.
382         (dwarf2_start_symtab): Move to ...
383         (dwarf2_cu::start_symtab): ... here.  Update all callers
384         (setup_type_unit_groups): Move to ...
385         (dwarf2_cu::setup_type_unit_groups): ... here.  Update all
386         callers.
387         (dwarf2_cu::reset_builder): New method.
388         (process_full_compunit, process_full_type_unit): Use
389         dwarf2_cu::reset_builder.
390         (follow_die_offset): Record the ancestor CU if it is different
391         from the followed DIE's CU.
392         (follow_die_sig_1): Likewise.
393
394 2019-01-15  Tom Tromey  <tom@tromey.com>
395
396         * remote.c (class remote_state) <buf>: Now a char_vector.
397         <buf_size>: Remove.
398         (remote_target::getpkt): Change type of buf.  Remove sizeof_buf
399         parameter.
400         (remote_target::getpkt_or_notif_sane_1)
401         (remote_target::getpkt_sane)
402         (remote_target::getpkt_or_notif_sane): Likewise.
403         (class remote_target) <putpkt>: New overload.
404         (remote_target::read_frame): Change type of "buf_p".  Remove
405         sizeof_p parameter.
406         (packet_ok): New overload.
407         (packet_check_result): New overload.
408         Update all uses.
409
410 2019-01-14  Tom Tromey  <tom@tromey.com>
411
412         * remote-notif.c (handle_notification, remote_notif_ack)
413         (remote_notif_parse): Make "buf" const.
414         * remote-notif.h (struct notif_client) <parse, ack>: Make "buf"
415         const.
416         (remote_notif_parse, remote_notif_ack, handle_notification):
417         Likewise.
418         * remote.c (remote_notif_stop_parse): Make "buf" const.
419         (remote_target::remote_parse_stop_reply): Make "buf" const.
420         (remote_notif_stop_ack): Make "buf" const.
421
422 2019-01-14  Tom Tromey  <tom@tromey.com>
423
424         * remote.c (remote_console_output): Make parameter const.
425
426 2019-01-14  Tom Tromey  <tom@tromey.com>
427
428         * target-debug.h (target_debug_print_signals): Constify.
429         * nto-procfs.c (nto_procfs_target::pass_signals): Update.
430         * procfs.c (procfs_target::pass_signals): Update.
431         * linux-nat.c (linux_nat_target::pass_signals): Update.
432         * linux-nat.h (class linux_nat_target) <pass_signals>: Update.
433         * target-delegates.c: Rebuild.
434         * remote.c (remote_target::program_signals): Update.
435         (remote_target::pass_signals): Update.
436         * target.c (target_pass_signals): Constify argument.
437         (target_program_signals): Likewise.
438         * target.h (struct target_ops) <pass_signals, program_signals>:
439         Constify argument.
440         (target_pass_signals, target_program_signals): Constify argument.
441
442 2019-01-14  Tom Tromey  <tom@tromey.com>
443
444         PR tui/28819:
445         * tui/tui-io.c (gdb_wgetch): Print \r when needed.
446
447 2019-01-14  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
448
449         * ppc-tdep.h (struct gdbarch_tdep) <ppc_v0_alias_regnum>: New
450         field.
451         * rs6000-tdep.c: Include reggroups.h.
452         (IS_V_ALIAS_PSEUDOREG): Define.
453         (rs6000_register_name): Return names for the "vX" aliases.
454         (rs6000_pseudo_register_type): Return type for the "vX" aliases.
455         (rs6000_pseudo_register_reggroup_p): Restore.  Handle "vX"
456         aliases.  Call default_register_reggroup_p for all other
457         pseudo-registers.
458         (v_alias_pseudo_register_read, v_alias_pseudo_register_write):
459         New functions.
460         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
461         Handle "vX" aliases.
462         (v_alias_pseudo_register_collect): New function.
463         (rs6000_ax_pseudo_register_collect): Handle "vX" aliases.
464         (rs6000_gdbarch_init): Initialize "vX" aliases as
465         pseudo-registers.  Restore registration of
466         rs6000_pseudo_register_reggroup_p with
467         set_tdesc_pseudo_register_reggroup_p.
468
469 2019-01-13  Max Filippov  <jcmvbkbc@gmail.com>
470
471         * xtensa-linux-tdep.c (xtensa_linux_init_abi): Update
472         tdep->num_pseudo_regs. Add calls to set_gdbarch_num_regs and
473         set_gdbarch_num_pseudo_regs.
474
475 2019-01-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
476
477         * cli/cli-style.h (class cli_style_option): <add_setshow_commands>
478         Remove arg prefixname, add do_set and do_show.
479         Add member functions set_list and show_list.
480         * cli/cli-style.c (class cli_style_option): Update accordingly.
481         (style_set_list): Move to file scope.
482         (style_show_list): Likewise.
483         (set_style): Call help_list.
484         (show_style): Call cmd_show_list.
485         (_initialize_cli_style): New macro STYLE_ADD_SETSHOW_COMMANDS.
486         Update to use the new macro.
487
488 2019-10-12  Joel Brobecker  <brobecker@adacore.com>
489
490         * ada-lang.c (_initialize_ada_language): Expand the help text
491         for the "catch exception" command.
492
493 2019-01-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
494
495         * symtab.c (matching_obj_sections): Initialize obj,
496         declare it closer to its usage.
497
498 2019-01-10  Tom Tromey  <tom@tromey.com>
499
500         * thread-iter.h (inf_threads_iterator): Use next_iterator.
501         (basic_inf_threads_range): Remove.
502         (inf_threads_range, inf_non_exited_threads_range)
503         (safe_inf_threads_range): Use next_adapter.
504
505 2019-01-10  Keith Seitz  <keiths@redhat.com>
506
507         PR gdb/23712
508         PR symtab/23010
509         * dwarf2read.c (dw2_add_symbol_to_list): Remove.
510         (fixup_go_packaging, new_symbol): Use add_symbol_to_list.
511
512 2019-01-10  Keith Seitz  <keiths@redhat.com>
513
514         PR gdb/23712
515         PR symtab/23010
516         * dictionary.c (pending_to_vector): Remove.
517         (dict_create_hashed_1, dict_create_linear_1, dict_add_pending_1):
518         Remove _1 suffix, replacing functions of the same name.  Update
519         all callers.
520         (dict_create_hashed, dict_create_hashed_expandable)
521         (dict_create_linear, dict_create_linear_expandable, dict_free)
522         (dict_add_symbol, dict_add_pending, dict_size, dict_empty):
523         Make functions static.
524
525 2019-01-10  Keith Seitz  <keiths@redhat.com>
526
527         PR gdb/23712
528         PR symtab/23010
529         * dictionary.h (struct dictionary): Replace declaration with
530         multidictionary.
531         (dict_create_hashed, dict_create_hashed_expandable)
532         (dict_create_linear, dict_create_linear_expandable)
533         (dict_free, dict_add_symbol, dict_add_pending, dict_empty)
534         (dict_iterator_first, dict_iterator_next, dict_iter_match_first)
535         (dict_iter_match_next, dict_size): Rename to "mdict_" versions
536         taking multidictionary argument.
537         [ALL_DICT_SYMBOLS]: Update for multidictionary.
538         * block.h (struct block) <dict>: Change to multidictionary
539         and rename `multidict'.
540         * block.c, buildsym.c, jit.c, mdebugread.c, objfiles.c,
541         symmisc.c: Update all dictionary references to multidictionary.
542
543 2019-01-10  Keith Seitz  <keiths@redhat.com>
544
545         PR gdb/23712
546         PR symtab/23010
547         * dictionary.c: Include unordered_map.
548         (pending_to_vector): New function.
549         (dict_create_hashed_1, dict_create_linear_1, dict_add_pending_1):
550         Rewrite the non-"_1" functions to take vector instead
551         of linked list.
552         (dict_create_hashed, dict_create_linear, dict_add_pending): Use the
553         "new" _1 versions of the same name.
554         (multidictionary): Define.
555         (std::hash<enum language): New definition.
556         (collate_pending_symbols_by_language, mdict_create_hashed)
557         (mdict_create_hashed_expandable, mdict_create_linear)
558         (mdict_create_linear_expandable, mdict_free)
559         (find_language_dictionary, create_new_language_dictionary)
560         (mdict_add_symbol, mdict_add_pending, mdict_iterator_first)
561         (mdict_iterator_next, mdict_iter_match_first, mdict_iter_match_next)
562         (mdict_size, mdict_empty): New functions.
563         * dictionary.h (mdict_iterator): Define.
564
565 2019-01-10  Pedro Alves  <palves@redhat.com>
566
567         * breakpoint.c (read_uploaded_action)
568         (create_tracepoint_from_upload): Adjust to use
569         gdb::unique_xmalloc_ptr.
570         * ctf.c (ctf_write_uploaded_tp):
571         (SET_ARRAY_FIELD): Use emplace_back.
572         (SET_STRING_FIELD): Adjust to use gdb::unique_xmalloc_ptr.
573         * tracefile-tfile.c (tfile_write_uploaded_tp):
574         * tracepoint.c (parse_tracepoint_definition): Adjust to use
575         gdb::unique_xmalloc_ptr.
576         * tracepoint.h (struct uploaded_tp) <cond, actions, step_actions,
577         at_string, cond_string, cmd_strings>: Replace char pointers
578         with gdb::unique_xmalloc_ptr.
579
580 2019-01-10  Pedro Alves  <palves@redhat.com>
581
582         * solib-target.c (library_list_start_library): Don't xstrdup name.
583
584 2019-01-10  Pedro Alves  <palves@redhat.com>
585
586         * mdebugread.c (parse_partial_symbols): Use
587         gdb::unique_xmalloc_ptr to manage heap-allocated 'stabsstring'.
588
589 2019-01-10  Andrew Burgess  <andrew.burgess@embecosm.com>
590
591         * linux-fork.c (scoped_switch_fork_info)
592         <~scoped_switch_fork_info>: Fix incorrect variable name.
593
594 2019-01-10  Andrew Burgess  <andrew.burgess@embecosm.com>
595
596         * linux-fork.c (scoped_switch_fork_info)
597         <scoped_switch_fork_info>: Make explicit.
598         <~scoped_switch_fork_info>: Wrap core in TRY/CATCH.
599
600 2019-01-10  Tom Tromey  <tom@tromey.com>
601
602         * objfiles.h (objfile::reset_psymtabs): Update.
603         * objfiles.c (objfile::objfile): Update.
604         * psymtab.h (psymtab_storage::obstack): Update.
605         (psymtab_storage::m_obstack): Use gdb::optional.
606         (class psymtab_storage): Update comment.  Remove objfile
607         parameter.
608         * psymtab.c (psymtab_storage::psymtab_storage): Update.
609
610 2019-01-10  Tom Tromey  <tom@tromey.com>
611
612         * psymtab.h (psymtab_storage::allocate_psymtab): New method.
613         <free_psymtabs>: Now private.
614         * psymtab.c (psymtab_storage::allocate_psymtab): Implement.
615         (allocate_psymtab): Use new method.
616
617 2019-01-10  Tom Tromey  <tom@tromey.com>
618
619         * xcoffread.c (xcoff_end_psymtab): Use allocate_dependencies.
620         * psymtab.h (psymtab_storage::allocate_dependencies): New method.
621         * mdebugread.c (parse_partial_symbols): Use
622         allocate_dependencies.
623         * dwarf2read.c (dwarf2_create_include_psymtab): Use
624         allocate_dependencies.
625         (process_psymtab_comp_unit_reader)
626         (build_type_psymtab_dependencies): Likewise.
627         * dbxread.c (dbx_end_psymtab): Use allocate_dependencies.
628
629 2019-01-10  Tom Tromey  <tom@tromey.com>
630
631         * psymtab.c (add_psymbol_to_bcache): Pass psymtab obstack to
632         PSYMBOL_SET_LANGUAGE.
633         (allocate_psymtab): Allocate psymtab on the psymtab obstack.
634
635 2019-01-10  Tom Tromey  <tom@tromey.com>
636
637         * psymtab.h (psymtab_storage::obstack): New method.
638         <m_obstack>: Rename from obstack; now private.
639         * psymtab.c (psymtab_storage): Update.
640         * dwarf2read.c (create_addrmap_from_index)
641         (create_addrmap_from_aranges, dwarf2_build_psymtabs_hard):
642         Update.
643
644 2019-01-10  Tom Tromey  <tom@tromey.com>
645
646         * symfile.c (reread_symbols): Call objfile->reset_psymtabs.
647         * objfiles.h (objfile::reset_psymtabs): New method.
648
649 2019-01-10  Tom Tromey  <tom@tromey.com>
650
651         * symmisc.c (print_symbol_bcache_statistics): Update.
652         (print_objfile_statistics): Update.
653         * symfile.c (reread_symbols): Update.
654         * psymtab.h (class psymtab_storage): New.
655         * psymtab.c (psymtab_storage): New constructor.
656         (~psymtab_storage): New destructor.
657         (require_partial_symbols): Update.
658         (ALL_OBJFILE_PSYMTABS_REQUIRED): Rewrite.
659         (find_pc_sect_psymtab, find_pc_sect_psymbol)
660         (match_partial_symbol, lookup_partial_symbol, dump_psymtab)
661         (psym_dump, recursively_search_psymtabs, psym_has_symbols)
662         (psym_find_compunit_symtab_by_address, sort_pst_symbols)
663         (start_psymtab_common, end_psymtab_common)
664         (add_psymbol_to_bcache, add_psymbol_to_list, init_psymbol_list)
665         (allocate_psymtab): Update.
666         (psymtab_storage::discard_psymtab): Rename from discard_psymtab.
667         Update.
668         (dump_psymtab_addrmap, maintenance_print_psymbols)
669         (maintenance_check_psymtabs): Update.
670         (class objfile_psymtabs): Move to objfiles.h.
671         * psympriv.h (discard_psymtab): Now inline.
672         (psymtab_discarder::psymtab_discarder): Update.
673         (psymtab_discarder::~psymtab_discarder): Update.
674         (ALL_OBJFILE_PSYMTABS): Rewrite.
675         * objfiles.h (struct objfile) <psymtabs, psymtabs_addrmap,
676         free_psymtabs, psymbol_cache, global_psymbols, static_psymbols>:
677         Remove fields.
678         <partial_symtabs>: New field.
679         (class objfile_psymtabs): Move from psymtab.h.  Update.
680         * objfiles.c (objfile::objfile): Initialize partial_symtabs, not
681         psymbol_cache.
682         (objfile::~objfile): Don't destroy psymbol_cache.
683         * mdebugread.c (parse_partial_symbols): Update.
684         * dwarf2read.c (create_addrmap_from_index)
685         (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
686         (process_psymtab_comp_unit_reader, dwarf2_build_psymtabs_hard)
687         (add_partial_subprogram, dwarf2_ranges_read): Update.
688         * dwarf-index-write.c (write_address_map)
689         (write_one_signatured_type, recursively_write_psymbols)
690         (class debug_names, class debug_names, write_psymtabs_to_index):
691         Update.
692
693 2019-01-10  Tom Tromey  <tom@tromey.com>
694
695         * symtab.h (SYMBOL_SET_NAMES): Update.
696         (symbol_set_names): Update.
697         (MSYMBOL_SET_NAMES): Update.
698         * symtab.c (symbol_set_names): Change argument to be an
699         objfile_per_bfd_storage.
700         * psymtab.c (add_psymbol_to_bcache): Update.
701         * psympriv.h (PSYMBOL_SET_NAMES): Take per_bfd argument.
702
703 2019-01-10  Tom Tromey  <tom@tromey.com>
704
705         * symtab.c (create_demangled_names_hash): Change argument to be an
706         objfile_per_bfd_storage.
707         (symbol_set_names): Update.
708
709 2019-01-10  Tom Tromey  <tom@tromey.com>
710
711         * xcoffread.c (xcoff_initial_scan): Unconditionally call
712         init_psymbol_list.
713         * psymtab.c (init_psymbol_list): Do nothing if already called.
714         * psympriv.h (init_psymbol_list): Add comment.
715         * dwarf2read.c (dwarf2_build_psymtabs): Unconditionally call
716         init_psymbol_list.
717         * dbxread.c (dbx_symfile_read): Unconditionally call
718         init_psymbol_list.
719
720 2019-01-10  Tom Tromey  <tom@tromey.com>
721
722         * xcoffread.c (scan_xcoff_symtab): Update.
723         * psymtab.c (add_psymbol_to_list): Replace "list" parameter with
724         "where".
725         * mdebugread.c (parse_partial_symbols)
726         (handle_psymbol_enumerators): Update.
727         * dwarf2read.c (add_partial_symbol, load_partial_dies): Update.
728         * dbxread.c (read_dbx_symtab): Update.
729         * psympriv.h (psymbol_placement): New enum.
730         (add_psymbol_to_list): Update.
731
732 2019-01-10  Tom Tromey  <tom@tromey.com>
733
734         * xcoffread.c (xcoff_start_psymtab): Remove global_psymbols and
735         static_psymbols parameters.
736         (scan_xcoff_symtab): Update.
737         * psymtab.c (start_psymtab_common): Remove global_psymbols and
738         static_psymbols parameters.
739         * psympriv.h (start_psymtab_common): Update.
740         * mdebugread.c (parse_partial_symbols): Update.
741         * dwarf2read.c (create_partial_symtab): Update.
742         * dbxread.c (read_dbx_symtab): Update.
743         (start_psymtab): Remove global_psymbols and static_psymbols
744         parameters.
745
746 2019-01-10  Tom Tromey  <tom@tromey.com>
747
748         * xcoffread.c (xcoff_end_psymtab): Remove some initializations.
749         * psymtab.c (allocate_psymtab): Add comment.
750         * psympriv.h (allocate_psymtab): Add comment.
751         * dwarf2read.c (dwarf2_create_include_psymtab): Remove some
752         initializations.
753         * dbxread.c (dbx_end_psymtab): Remove some initializations.
754
755 2019-01-10  Tom Tromey  <tom@tromey.com>
756
757         * symfile.h (mdebug_build_psymtabs, elfmdebug_build_psymtabs):
758         Don't declare.
759         * mipsread.c: Include mdebugread.h.
760         * mdebugread.h (mdebug_build_psymtabs, elfmdebug_build_psymtabs):
761         Declare.
762         * elfread.c: Include mdebugread.h.
763
764 2019-01-09  Tom Tromey  <tom@tromey.com>
765
766         * dbxread.c (dbx_end_psymtab): Use objfile_psymtabs.
767         * mdebugread.c (parse_partial_symbols): Use objfile_psymtabs.
768         * psymtab.c (ALL_OBJFILE_PSYMTABS_REQUIRED): Remove.
769         (psym_map_symtabs_matching_filename, find_pc_sect_psymtab)
770         (psym_lookup_symbol, psym_find_last_source_symtab)
771         (psym_forget_cached_source_info, psym_print_stats)
772         (psym_expand_symtabs_for_function, psym_expand_all_symtabs)
773         (psym_expand_symtabs_with_fullname, psym_map_symbol_filenames)
774         (psym_map_matching_symbols, psym_expand_symtabs_matching)
775         (psym_find_compunit_symtab_by_address)
776         (maintenance_print_psymbols, maintenance_info_psymtabs)
777         (maintenance_check_psymtabs): Use ranged for.
778         * psymtab.h (class objfile_psymtabs): New.
779         (require_partial_symbols): Return objfile_psymtabs.
780         * psympriv.h (ALL_OBJFILE_PSYMTABS): Remove.
781
782 2019-01-09  Tom Tromey  <tom@tromey.com>
783
784         * symfile.c (overlay_invalidate_all, find_pc_overlay)
785         (find_pc_mapped_section, list_overlays_command)
786         (map_overlay_command, unmap_overlay_command)
787         (simple_overlay_update): Use all_objfiles.
788         * spu-tdep.c (spu_overlay_update): Use all_objfiles.
789         * printcmd.c (info_symbol_command): Use all_objfiles.
790         * objfiles.h (ALL_OBJSECTIONS): Remove.
791         * maint.c (maintenance_translate_address): Use all_objfiles.
792         * gcore.c (gcore_create_callback): Use all_objfiles.
793         (objfile_find_memory_regions): Likewise.
794
795 2019-01-09  Tom Tromey  <tom@tromey.com>
796
797         * symtab.c (find_line_symtab, info_sources_command)
798         (make_source_files_completion_list): Use objfile_compunits.
799         * source.c (select_source_symtab): Use objfile_compunits.
800         * objfiles.h (struct objfile): Update comment.
801         (ALL_OBJFILES): Remove.
802         (ALL_FILETABS): Remove.
803         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Use
804         objfile_compunits.
805
806 2019-01-09  Tom Tromey  <tom@tromey.com>
807
808         * symmisc.c (print_objfile_statistics, dump_objfile)
809         (maintenance_print_symbols): Use compunit_filetabs.
810         * source.c (forget_cached_source_info_for_objfile): Use
811         compunit_filetabs.
812         * objfiles.h (ALL_OBJFILE_FILETABS): Remove.
813         (ALL_FILETABS): Use compunit_filetabs.
814         * objfiles.c (objfile_relocate1): Use compunit_filetabs.
815         * coffread.c (coff_symtab_read): Use compunit_filetabs.
816
817 2019-01-09  Tom Tromey  <tom@tromey.com>
818
819         * symtab.h (ALL_COMPUNIT_FILETABS): Remove.
820         (compunit_filetabs): New.
821         * symtab.c (iterate_over_some_symtabs, find_pc_sect_line): Use
822         compunit_filetabs.
823         (info_sources_command, make_source_files_completion_list): Remove
824         declaration.
825         * symmisc.c (print_objfile_statistics, dump_objfile)
826         (maintenance_print_symbols): Remove declaration.
827         (maintenance_info_symtabs): Use compunit_filetabs.
828         (maintenance_info_line_tables): Likewise.
829         * source.c (select_source_symtab): Change local variable name.
830         (forget_cached_source_info_for_objfile): Remove declaration.
831         * objfiles.h (ALL_OBJFILE_FILETABS): Use compunit_filetabs.
832         * objfiles.c (objfile_relocate1): Remove declaration.
833         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Remove
834         declaration.
835         * maint.c (count_symtabs_and_blocks): Use compunit_filetabs.
836         * coffread.c (coff_symtab_read): Remove declaration.
837         * buildsym.c (buildsym_compunit::end_symtab_with_blockvector): Use
838         compunit_filetabs.
839
840 2019-01-09  Tom Tromey  <tom@tromey.com>
841
842         * symtab.c (lookup_objfile_from_block)
843         (find_pc_sect_compunit_symtab, search_symbols)
844         (default_collect_symbol_completion_matches_break_on): Use
845         objfile_compunits.
846         * objfiles.h (ALL_COMPUNITS): Remove.
847         * maint.c (count_symtabs_and_blocks): Use objfile_compunits.
848         * cp-support.c (add_symbol_overload_list_qualified): Use
849         objfile_compunits.
850         * ada-lang.c (ada_collect_symbol_completion_matches)
851         (ada_add_global_exceptions): Use objfile_compunits.
852
853 2019-01-09  Tom Tromey  <tom@tromey.com>
854
855         * source.c (select_source_symtab)
856         (forget_cached_source_info_for_objfile): Remove declaration.
857         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Remove
858         declaration.
859         * maint.c (count_symtabs_and_blocks): Remove declaration.
860         * cp-support.c (add_symbol_overload_list_qualified): Remove
861         declaration.
862         * coffread.c (coff_symtab_read): Remove declaration.
863         * symtab.c (lookup_symbol_in_objfile_symtabs)
864         (basic_lookup_transparent_type_1): Use objfile_compunits.
865         (lookup_objfile_from_block, find_pc_sect_compunit_symtab)
866         (info_sources_command, search_symbols)
867         (default_collect_symbol_completion_matches_break_on)
868         (make_source_files_completion_list): Remove declaration.
869         * ada-lang.c (add_nonlocal_symbols): Use objfile_compunits.
870         (ada_collect_symbol_completion_matches)
871         (ada_add_global_exceptions): Remove declaration.
872         * linespec.c (iterate_over_all_matching_symtabs): Use
873         objfile_compunits.
874         * objfiles.h (ALL_OBJFILE_COMPUNITS): Remove.
875         (class objfile_compunits): New.
876         (ALL_COMPUNITS): Use objfile_compunits.
877         * symmisc.c (print_objfile_statistics, maintenance_info_symtabs)
878         (maintenance_check_symtabs, maintenance_info_line_tables): Use
879         objfile_compunits.
880         * objfiles.c (objfile_relocate1): Use objfile_compunits.
881
882 2019-01-09  Tom Tromey  <tom@tromey.com>
883
884         * symtab.c (search_symbols)
885         (default_collect_symbol_completion_matches_break_on): Use
886         objfile_msymbols.
887         * ada-lang.c (ada_lookup_simple_minsym)
888         (ada_collect_symbol_completion_matches): Use objfile_msymbols.
889         * minsyms.c (find_solib_trampoline_target): Use objfile_msymbols.
890         * hppa-tdep.c (hppa_lookup_stub_minimal_symbol): Use
891         objfile_msymbols.
892         * coffread.c (coff_symfile_read): Use objfile_msymbols.
893         * symmisc.c (dump_msymbols): Use objfile_msymbols.
894         * objc-lang.c (find_methods): Use objfile_msymbols.
895         (info_selectors_command, info_classes_command): Likewise.
896         * stabsread.c (scan_file_globals): Use objfile_msymbols.
897         * objfiles.h (class objfile_msymbols): New.
898         (ALL_OBJFILE_MSYMBOLS): Remove.
899         (ALL_MSYMBOLS): Remove.
900
901 2019-01-09  Tom Tromey  <tom@tromey.com>
902
903         * common/next-iterator.h (next_adapter): Add Iterator template
904         parameter.
905         * objfiles.h (ALL_OBJFILES_SAFE): Remove.
906         (class all_objfiles_safe): New.
907         * jit.c (jit_inferior_exit_hook): Use all_objfiles_safe.
908         * objfiles.c (put_objfile_before): Update comment.
909         (add_separate_debug_objfile): Likewise.
910         (free_all_objfiles): Use all_objfiles_safe.
911         (objfile_purge_solibs): Likewise.
912
913 2019-01-09  Tom Tromey  <tom@tromey.com>
914
915         * symtab.c (iterate_over_symtabs, matching_obj_sections)
916         (expand_symtab_containing_pc, lookup_static_symbol)
917         (basic_lookup_transparent_type, find_pc_sect_compunit_symtab)
918         (find_symbol_at_address, find_line_symtab, find_main_name): Use
919         all_objfiles.
920         * probe.c (find_probe_by_pc, collect_probes): Use all_objfiles.
921         * breakpoint.c (create_overlay_event_breakpoint)
922         (create_longjmp_master_breakpoint)
923         (create_std_terminate_master_breakpoint)
924         (create_exception_master_breakpoint): Use all_objfiles.
925         * linux-thread-db.c (try_thread_db_load_from_pdir)
926         (has_libpthread): Use all_objfiles.
927         * ada-lang.c (add_nonlocal_symbols): Use all_objfiles.
928         * linespec.c (iterate_over_all_matching_symtabs)
929         (search_minsyms_for_name): Use all_objfiles.
930         * maint.c (maintenance_info_sections): Use all_objfiles.
931         * main.c (captured_main_1): Use all_objfiles.
932         * spu-tdep.c (spu_objfile_from_frame): Use all_objfiles.
933         * guile/scm-objfile.c (gdbscm_objfiles): Use all_objfiles.
934         * guile/scm-pretty-print.c
935         (ppscm_find_pretty_printer_from_objfiles): Use all_objfiles.
936         * solib-spu.c (append_ocl_sos): Use all_objfiles.
937         * symmisc.c (maintenance_print_symbols): Use all_objfiles.
938         (maintenance_print_msymbols): Use all_objfiles.
939         * source.c (select_source_symtab): Use all_objfiles.
940         * jit.c (jit_find_objf_with_entry_addr): Use all_objfiles.
941         * symfile.c (remove_symbol_file_command)
942         (expand_symtabs_matching, map_symbol_filenames): Use
943         all_objfiles.
944         * ppc-linux-tdep.c (ppc_linux_spe_context_inferior_created): Use
945         all_objfiles.
946         * dwarf2-frame.c (dwarf2_frame_find_fde): Use all_objfiles.
947         * objc-lang.c (find_methods): Use all_objfiles.
948         * objfiles.c (have_partial_symbols, have_full_symbols)
949         (have_minimal_symbols, qsort_cmp)
950         (default_iterate_over_objfiles_in_search_order): Use
951         all_objfiles.
952         * hppa-tdep.c (find_unwind_entry): Use all_objfiles.
953         * psymtab.c (maintenance_print_psymbols): Use all_objfiles.
954         (maintenance_check_psymtabs): Use all_objfiles.
955         (ALL_PSYMTABS): Remove.
956         * compile/compile-object-run.c (do_module_cleanup): Use
957         all_objfiles.
958         * blockframe.c (find_pc_partial_function): Use all_objfiles.
959         * cp-support.c (add_symbol_overload_list_qualified): Use
960         all_objfiles.
961         * windows-tdep.c (windows_iterate_over_objfiles_in_search_order):
962         Use all_objfiles.
963         * dwarf-index-write.c (save_gdb_index_command): Use all_objfiles.
964         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): Use
965         all_objfiles.
966         * python/py-objfile.c (objfpy_lookup_objfile_by_name)
967         (objfpy_lookup_objfile_by_build_id): Use all_objfiles.
968         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
969         Uses all_objfiles.
970         * solib.c (solib_read_symbols): Use all_objfiles
971
972 2019-01-09  Tom Tromey  <tom@tromey.com>
973
974         * probe.c (parse_probes_in_pspace): Use all_objfiles.
975         * guile/scm-progspace.c (gdbscm_progspace_objfiles): Use
976         all_objfiles.
977         * objfiles.h (ALL_PSPACE_OBJFILES): Remove.
978         * symmisc.c (print_symbol_bcache_statistics)
979         (print_objfile_statistics, maintenance_print_objfiles)
980         (maintenance_info_symtabs, maintenance_check_symtabs)
981         (maintenance_expand_symtabs, maintenance_info_line_tables): Use
982         all_objfiles.
983         * source.c (forget_cached_source_info): Use all_objfiles.
984         * symfile-debug.c (set_debug_symfile): Use all_objfiles.
985         * elfread.c (elf_gnu_ifunc_resolve_by_cache)
986         (elf_gnu_ifunc_resolve_by_got): Use all_objfiles.
987         * objfiles.c (update_section_map): Use all_objfiles.
988         (shared_objfile_contains_address_p): Likewise.
989         * psymtab.c (maintenance_info_psymtabs): Use all_objfiles.
990         * python/py-progspace.c (pspy_get_objfiles): Use all_objfiles.
991
992 2019-01-09  Tom Tromey  <tom@tromey.com>
993
994         * common/next-iterator.h: New file.
995         * objfiles.h (class all_objfiles): New.
996         (struct objfile_iterator): New.
997
998 2019-01-09  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
999
1000         * NEWS: Move the description of the changed "frame", "select-frame",
1001          and "info frame" commands to the Changed commands section.
1002
1003 2019-01-09  Simon Marchi  <simon.marchi@ericsson.com>
1004
1005         * gdbtypes.c (check_stub_method_group): Remove handling of old
1006         mangling schemes.
1007         * linespec.c (find_methods): Likewise.
1008         * stabsread.c (read_member_functions): Likewise.
1009         * valops.c (search_struct_method): Likewise.
1010         (value_struct_elt_for_reference): Likewise.
1011         * NEWS: Mention this change.
1012
1013 2019-01-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1014
1015         * cli/cli-cmds.c (list_command): Pass a source_lines_range to
1016         print_source_lines.
1017         * source.c (print_source_lines_base): Update line number check.
1018         (print_source_lines): New function.
1019         (source_lines_range::source_lines_range): New function.
1020         * source.h (class source_lines_range): New class.
1021         (print_source_lines): New declaration.
1022
1023 2019-01-09  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1024
1025         * linespec.c (linespec_state_destructor): Free self->canonical_names.
1026
1027 2019-01-08  Tom Tromey  <tom@tromey.com>
1028             Simon Marchi  <simon.marchi@ericsson.com>
1029
1030         PR gdb/24060
1031         * ada-exp.y (DOLLAR_VARIABLE): Rename from SPECIAL_VARIABLE.
1032         * ada-lex.l (DOLLAR_VARIABLE): Likewise.
1033         * c-exp.y (DOLLAR_VARIABLE): Rename from VARIABLE.
1034         * f-exp.y (DOLLAR_VARIABLE): Likewise.
1035         * m2-exp.y (DOLLAR_VARIABLE): Rename from INTERNAL_VAR.
1036         * p-exp.y (DOLLAR_VARIABLE): Rename from VARIABLE.
1037
1038 2019-01-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1039
1040         * source.c (select_source_symtab): Move header comment to
1041         declaration in source.h.
1042         (forget_cached_source_info_for_objfile): Likewise.
1043         (forget_cached_source_info): Likewise.
1044         (identify_source_line): Likewise.
1045         * source.h (identify_source_line): Move declaration from symtab.h
1046         and add comment from source.c
1047         (print_source_lines): Likewise.
1048         (forget_cached_source_info_for_objfile): Likewise.
1049         (forget_cached_source_info): Likewise.
1050         (select_source_symtab): Likewise.
1051         (enum print_source_lines_flag): Move definition from symtab.h.
1052         * symtab.h (identify_source_line): Move declaration to source.h.
1053         (print_source_lines): Likewise.
1054         (forget_cached_source_info_for_objfile): Likewise.
1055         (forget_cached_source_info): Likewise.
1056         (select_source_symtab): Likewise.
1057         (enum print_source_lines_flag): Move definition to source.h.
1058         * tui/tui-hooks.c: Add 'source.h' include.
1059
1060 2019-01-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1061
1062         * source.c (print_source_lines_base): Handle requests to print
1063         reverse line number sequences, and guard against empty lines
1064         string.
1065
1066 2019-01-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1067
1068         * source.c (print_source_lines_base): Fix skip of '\r' if next
1069         character is '\n'.
1070
1071 2019-01-06  Tom Tromey  <tom@tromey.com>
1072
1073         * c-exp.y (struct c_parse_state) <macro_original_text,
1074         expansion_obstack>: New member.
1075         (macro_original_text, expansion_obstack): Remove globals.
1076         (scan_macro_expansion, scanning_macro_expansion)
1077         (finished_macro_expansion): Update.
1078         (scan_macro_cleanup): Remove.
1079         (yylex, c_parse): Update.
1080
1081 2019-01-06  Tom Tromey  <tom@tromey.com>
1082
1083         * c-exp.y (struct c_parse_state) <strings>: New member.
1084         (operator_stoken): Update.
1085
1086 2019-01-06  Tom Tromey  <tom@tromey.com>
1087
1088         * parser-defs.h (type_ptr): Remove typedef.  Don't declare VEC.
1089         (union type_stack_elt) <typelist_val>: Now a pointer to
1090         std::vector.
1091         (type_stack_cleanup): Don't declare.
1092         (push_typelist): Update.
1093         * parse.c (pop_typelist): Return a std::vector.
1094         (push_typelist): Take a std::vector.
1095         (follow_types): Update.  Do not free args.
1096         (type_stack_cleanup): Remove.
1097         * c-exp.y (struct c_parse_state): New.
1098         (cpstate): New global.
1099         (type_aggregate_p, exp, ptr_operator, parameter_typelist)
1100         (nonempty_typelist): Update.
1101         (func_mod): Create a new vector.
1102         (c_parse): Create a c_parse_state.
1103         (check_parameter_typelist): Do not delete params.
1104         (function_method): Update.  Do not delete type_list.
1105
1106 2019-01-06  Tom Tromey  <tom@tromey.com>
1107
1108         PR gdb/28155:
1109         * python/py-finishbreakpoint.c (bpfinishpy_init): Use
1110         check_typedef.
1111         * infcmd.c (finish_command_fsm_should_stop): Use check_typedef.
1112         (print_return_value): Likewise.
1113
1114 2019-01-05  Tom Tromey  <tom@tromey.com>
1115
1116         * contrib/cleanup_check.py: Remove.
1117         * contrib/gcc-with-excheck: Remove.
1118         * contrib/exsummary.py: Remove.
1119         * contrib/excheck.py: Remove.
1120
1121 2019-01-05  Joel Brobecker  <brobecker@adacore.com>
1122
1123         * thread.c (delete_thread_1): Add gdb_assert that THR is not
1124         NULL. Initialize tpprev to NULL instead of assigning it
1125         to NULL on the next statement.
1126         * windows-nat.c (windows_delete_thread): Remove check for
1127         main_thread_id before printing thread exit notifications.
1128         (get_windows_debug_event) <EXIT_THREAD_DEBUG_EVENT>:
1129         Remove thread ID check against main_thread_id.
1130         <CREATE_PROCESS_DEBUG_EVENT>: Remove call to
1131         windows_delete_thread.
1132         <EXIT_PROCESS_DEBUG_EVENT>: Add call to windows_delete_thread.
1133
1134 2019-01-04  Tom Tromey  <tom@tromey.com>
1135
1136         * compile/compile.c (_initialize_compile): Use upper case for
1137         metasyntactic variables.
1138         * symmisc.c (_initialize_symmisc): Use upper case for
1139         metasyntactic variables.
1140         * psymtab.c (_initialize_psymtab): Use upper case for
1141         metasyntactic variables.
1142         * demangle.c (demangle_command): Use upper case for metasyntactic
1143         variables.
1144         (_initialize_demangler): Likewise.
1145         * ax-gdb.c (_initialize_ax_gdb): Use upper case for metasyntactic
1146         variables.
1147
1148 2019-01-03  Tom Tromey  <tom@tromey.com>
1149
1150         * tui/tui-source.c (tui_set_source_content): Use xstrdup.
1151
1152 2019-01-03  Tom Tromey  <tom@tromey.com>
1153
1154         * python/py-symtab.c (salpy_str): Update.
1155         (struct salpy_sal_object) <symtab>: Now a PyObject.
1156         (salpy_dealloc): Update.
1157         (del_objfile_sal): Use gdbpy_ref.
1158
1159 2019-01-03  Tom Tromey  <tom@tromey.com>
1160
1161         * python/py-type.c (convert_field): Use new_reference.  Return
1162         gdbpy_ref.
1163         (make_fielditem): Return gdbpy_ref.
1164         (typy_fields): Update.
1165         (typy_getitem): Update.
1166         (field_name): Return gdbpy_ref.  Use new_reference.
1167         (typy_iterator_iternext): Update.
1168
1169 2019-01-03  Tom Tromey  <tom@tromey.com>
1170
1171         * python/py-record.c (gdbpy_stop_recording): Use Py_RETURN_NONE.
1172
1173 2019-01-03  Tom Tromey  <tom@tromey.com>
1174
1175         * python/py-value.c (valpy_dealloc): Use Py_XDECREF.
1176         * python/py-type.c (typy_fields_items): Use gdbpy_ref.
1177         * python/py-progspace.c (pspy_set_printers): Use gdbpy_ref.
1178         (pspy_set_frame_filters, pspy_set_frame_unwinders)
1179         (pspy_set_type_printers): Likewise.
1180         * python/py-function.c (fnpy_init): Use gdbpy_ref.
1181         * python/py-cmd.c (cmdpy_init): Use gdbpy_ref.
1182         * python/py-objfile.c (objfpy_set_printers): Use gdbpy_ref.
1183         (objfpy_set_frame_filters, objfpy_set_frame_unwinders)
1184         (objfpy_set_type_printers): Likewise.
1185
1186 2019-01-03  Tom Tromey  <tom@tromey.com>
1187
1188         * python/python.c (gdbpy_enter, ~gdbpy_enter): Update.
1189         (gdbpy_print_stack): Use gdbpy_err_fetch.
1190         * python/python-internal.h (class gdbpy_err_fetch): New class.
1191         (class gdbpy_enter) <m_error_type, m_error_value,
1192         m_error_traceback>: Remove.
1193         <m_error>: New member.
1194         (gdbpy_exception_to_string): Don't declare.
1195         * python/py-varobj.c (py_varobj_iter_next): Use gdbpy_err_fetch.
1196         * python/py-value.c (convert_value_from_python): Use
1197         gdbpy_err_fetch.
1198         * python/py-utils.c (gdbpy_err_fetch::to_string): Rename from
1199         gdbpy_exception_to_string.
1200         (gdbpy_handle_exception): Use gdbpy_err_fetch.
1201         * python/py-prettyprint.c (print_stack_unless_memory_error): Use
1202         gdbpy_err_fetch.
1203
1204 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1205
1206         * linux-nat.c (delete_lwp_cleanup): Delete.
1207         (struct lwp_deleter): New struct.
1208         (lwp_info_up): New typedef.
1209         (linux_nat_target::follow_fork): Delete cleanup, and make use of
1210         lwp_info_up.
1211
1212 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1213
1214         * linux-fork.c (class scoped_switch_fork_info): New class.
1215         (inferior_call_waitpid): Update to use scoped_switch_fork_info.
1216
1217 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1218
1219         * valops.c (find_overload_match): Remove use of null_cleanup, and
1220         calls to do_cleanups.
1221
1222 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1223
1224         * compile/compile-cplus-types.c
1225         (compile_cplus_instance::decl_name): Handle changes to
1226         cp_func_name.
1227         * cp-support.c (cp_func_name): Update header comment, update
1228         return type.
1229         * cp-support.h (cp_func_name): Update return type in declaration.
1230         * valops.c (find_overload_match): Move temp_func local to top
1231         level of function and change its type.  Use temp_func to hold and
1232         delete temporary string obtained from cp_func_name.
1233
1234 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1235
1236         * remote.c (remote_target::remote_check_symbols): Convert `msg` to
1237         gdb::char_vector, remove cleanup, and update uses of `msg`.
1238
1239 2019-01-03  Jim Wilson  <jimw@sifive.com>
1240
1241         * riscv-tdep.c (riscv_freg_feature): Drop s0 name from f8.
1242
1243 2019-01-02  Tom Tromey  <tom@tromey.com>
1244
1245         * xml-tdesc.c (xml_cache): Hold a target_desc_up.
1246         (tdesc_parse_xml): Remove cleanups.
1247         * target-descriptions.h (make_cleanup_free_target_description):
1248         Don't declare.
1249         (target_desc_deleter): New struct.
1250         (target_desc_up): New typedef.
1251         * target-descriptions.c (target_desc_deleter::operator()): Rename
1252         from free_target_description.
1253         (make_cleanup_free_target_description): Remove.
1254
1255 2019-01-02  Tom Tromey  <tom@tromey.com>
1256
1257         * linespec.c (struct linespec_parser): Rename from ls_parser.  Add
1258         constructor, destructor.
1259         (linespec_parser): Remove typedef.
1260         (~linespec_parser): Rename from linespec_parser_delete.
1261         (linespec_lex_to_end, linespec_complete_label)
1262         (linespec_complete): Update.
1263         (decode_line_full): Remove cleanups.
1264         (decode_line_1): Update.
1265
1266 2019-01-02  Tom Tromey  <tom@tromey.com>
1267
1268         * python/python-internal.h (inferior_to_inferior_object): Change
1269         return type.
1270         * python/py-exitedevent.c (create_exited_event_object): Update.
1271         * python/py-inferior.c (inferior_to_inferior_object): Return
1272         gdbpy_ref.
1273         (python_new_inferior, python_inferior_deleted)
1274         (thread_to_thread_object, delete_thread_object)
1275         (build_inferior_list, gdbpy_selected_inferior): Update.
1276         * python/py-infthread.c (create_thread_object): Update.  Also fail
1277         if inferior_to_inferior_object fails.
1278
1279 2019-01-02  Simon Marchi  <simon.marchi@ericsson.com>
1280
1281         * inferior.h (class inferior) <displaced_step_state>: New field.
1282         * infrun.h (struct displaced_step_state): Move here from
1283         infrun.c.  Initialize fields, add constructor.
1284         <inf>: Remove field.
1285         <reset>: New method.
1286         * infrun.c (struct displaced_step_inferior_state): Move to
1287         infrun.h.
1288         (displaced_step_inferior_states): Remove.
1289         (get_displaced_stepping_state): Adust.
1290         (displaced_step_in_progress_any_inferior): Adjust.
1291         (displaced_step_in_progress_thread): Adjust.
1292         (displaced_step_in_progress): Adjust.
1293         (add_displaced_stepping_state): Remove.
1294         (get_displaced_step_closure_by_addr): Adjust.
1295         (remove_displaced_stepping_state): Remove.
1296         (infrun_inferior_exit): Call displaced_step_state.reset.
1297         (use_displaced_stepping): Don't check for NULL.
1298         (displaced_step_prepare_throw): Call
1299         get_displaced_stepping_state.
1300         (displaced_step_fixup): Don't check for NULL.
1301         (prepare_for_detach): Don't check for NULL.
1302
1303 2019-01-02  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1304
1305         * infcall.c (call_function_by_hand_dummy): cleanup/destroy sm
1306          in case of call that did not complete.
1307
1308 2019-01-02  Andrey Utkin  <autkin@undo.io>
1309
1310         * symfile.c (find_separate_debug_file): Fix search of debug files for
1311         remote debuggee.
1312
1313 2019-01-02  Tom Tromey  <tom@tromey.com>
1314
1315         * python/py-inferior.c (gdbpy_initialize_inferior): Fix
1316         indentation.
1317         * python/py-frame.c (frapy_older): Remove cast.
1318         (frapy_newer): Likewise.
1319         * python/py-breakpoint.c (local_setattro): Remove cast.
1320         * python/py-arch.c (archpy_name): Remove local variable.
1321         * python/py-type.c (gdbpy_lookup_type): Remove cast.
1322
1323 2019-01-02  Joel Brobecker  <brobecker@adacore.com>
1324
1325         * unittests/basic_string_view/element_access/char/empty.cc:
1326         Fix year range in copyright header.
1327
1328 2019-01-01  Andrew Burgess  <andrew.burgess@embecosm.com>
1329
1330         * arch/riscv.h (struct riscv_gdbarch_features) <hw_float_abi>:
1331         Delete.
1332         <operator==>: Update with for removed field.
1333         <hash>: Likewise.
1334         * riscv-tdep.h (struct gdbarch_tdep) <features>: Renamed to...
1335         <isa_features>: ...this.
1336         <abi_features>: New field.
1337         (riscv_isa_flen): Update comment.
1338         (riscv_abi_xlen): New declaration.
1339         (riscv_abi_flen): New declaration.
1340         * riscv-tdep.c (riscv_isa_xlen): Update to get answer from
1341         isa_features.
1342         (riscv_abi_xlen): New function.
1343         (riscv_isa_flen): Update to get answer from isa_features.
1344         (riscv_abi_flen): New function.
1345         (riscv_has_fp_abi): Update to get answer from abi_features.
1346         (riscv_call_info::riscv_call_info): Use abi xlen and flen, not isa
1347         xlen and flen.
1348         (riscv_call_info) <xlen, flen>: Update comment.
1349         (riscv_call_arg_struct): Remove invalid assertions
1350         (riscv_features_from_gdbarch_info): Update now hw_float_abi field
1351         is removed.
1352         (riscv_gdbarch_init): Gather isa features and abi features
1353         separately, ensure both match on the gdbarch when reusing an old
1354         gdbarch.  Relax an error check to allow 32-bit abi float to run on
1355         a target with 64-bit float hardware.
1356
1357 2019-01-01  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1358
1359         * source.c (search_command_helper): Stop reverse search
1360         when line 1 has been searched.
1361
1362 2019-01-01  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1363
1364         * record-full.c (record_full_base_target::close): Rewrite
1365         record_full_core_buf_list free logic.
1366
1367 2019-01-01  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1368
1369         * break-catch-syscall.c (print_one_catch_syscall): xfree
1370         the last text.
1371
1372 2019-01-01  Joel Brobecker  <brobecker@adacore.com>
1373
1374         * top.c (print_gdb_version): Update Copyright year in version
1375         message.
1376
1377 2019-01-01  Joel Brobecker  <brobecker@adacore.com>
1378
1379         Update copyright year range in all GDB files.
1380
1381 2019-01-01, 19  Joel Brobecker  <brobecker@adacore.com>
1382
1383         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2018.
1384
1385 For older changes see ChangeLog-2018.
1386 \f
1387 Local Variables:
1388 mode: change-log
1389 left-margin: 8
1390 fill-column: 74
1391 version-control: never
1392 coding: utf-8
1393 End:
1394