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