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