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