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