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