Fix tracepoint.c:parse_tracepoint_definition leak (and one more)
[external/binutils.git] / gdb / ChangeLog
1 2019-01-10  Pedro Alves  <palves@redhat.com>
2
3         * breakpoint.c (read_uploaded_action)
4         (create_tracepoint_from_upload): Adjust to use
5         gdb::unique_xmalloc_ptr.
6         * ctf.c (ctf_write_uploaded_tp):
7         (SET_ARRAY_FIELD): Use emplace_back.
8         (SET_STRING_FIELD): Adjust to use gdb::unique_xmalloc_ptr.
9         * tracefile-tfile.c (tfile_write_uploaded_tp):
10         * tracepoint.c (parse_tracepoint_definition): Adjust to use
11         gdb::unique_xmalloc_ptr.
12         * tracepoint.h (struct uploaded_tp) <cond, actions, step_actions,
13         at_string, cond_string, cmd_strings>: Replace char pointers
14         with gdb::unique_xmalloc_ptr.
15
16 2019-01-10  Pedro Alves  <palves@redhat.com>
17
18         * solib-target.c (library_list_start_library): Don't xstrdup name.
19
20 2019-01-10  Pedro Alves  <palves@redhat.com>
21
22         * mdebugread.c (parse_partial_symbols): Use
23         gdb::unique_xmalloc_ptr to manage heap-allocated 'stabsstring'.
24
25 2019-01-10  Andrew Burgess  <andrew.burgess@embecosm.com>
26
27         * linux-fork.c (scoped_switch_fork_info)
28         <~scoped_switch_fork_info>: Fix incorrect variable name.
29
30 2019-01-10  Andrew Burgess  <andrew.burgess@embecosm.com>
31
32         * linux-fork.c (scoped_switch_fork_info)
33         <scoped_switch_fork_info>: Make explicit.
34         <~scoped_switch_fork_info>: Wrap core in TRY/CATCH.
35
36 2019-01-10  Tom Tromey  <tom@tromey.com>
37
38         * objfiles.h (objfile::reset_psymtabs): Update.
39         * objfiles.c (objfile::objfile): Update.
40         * psymtab.h (psymtab_storage::obstack): Update.
41         (psymtab_storage::m_obstack): Use gdb::optional.
42         (class psymtab_storage): Update comment.  Remove objfile
43         parameter.
44         * psymtab.c (psymtab_storage::psymtab_storage): Update.
45
46 2019-01-10  Tom Tromey  <tom@tromey.com>
47
48         * psymtab.h (psymtab_storage::allocate_psymtab): New method.
49         <free_psymtabs>: Now private.
50         * psymtab.c (psymtab_storage::allocate_psymtab): Implement.
51         (allocate_psymtab): Use new method.
52
53 2019-01-10  Tom Tromey  <tom@tromey.com>
54
55         * xcoffread.c (xcoff_end_psymtab): Use allocate_dependencies.
56         * psymtab.h (psymtab_storage::allocate_dependencies): New method.
57         * mdebugread.c (parse_partial_symbols): Use
58         allocate_dependencies.
59         * dwarf2read.c (dwarf2_create_include_psymtab): Use
60         allocate_dependencies.
61         (process_psymtab_comp_unit_reader)
62         (build_type_psymtab_dependencies): Likewise.
63         * dbxread.c (dbx_end_psymtab): Use allocate_dependencies.
64
65 2019-01-10  Tom Tromey  <tom@tromey.com>
66
67         * psymtab.c (add_psymbol_to_bcache): Pass psymtab obstack to
68         PSYMBOL_SET_LANGUAGE.
69         (allocate_psymtab): Allocate psymtab on the psymtab obstack.
70
71 2019-01-10  Tom Tromey  <tom@tromey.com>
72
73         * psymtab.h (psymtab_storage::obstack): New method.
74         <m_obstack>: Rename from obstack; now private.
75         * psymtab.c (psymtab_storage): Update.
76         * dwarf2read.c (create_addrmap_from_index)
77         (create_addrmap_from_aranges, dwarf2_build_psymtabs_hard):
78         Update.
79
80 2019-01-10  Tom Tromey  <tom@tromey.com>
81
82         * symfile.c (reread_symbols): Call objfile->reset_psymtabs.
83         * objfiles.h (objfile::reset_psymtabs): New method.
84
85 2019-01-10  Tom Tromey  <tom@tromey.com>
86
87         * symmisc.c (print_symbol_bcache_statistics): Update.
88         (print_objfile_statistics): Update.
89         * symfile.c (reread_symbols): Update.
90         * psymtab.h (class psymtab_storage): New.
91         * psymtab.c (psymtab_storage): New constructor.
92         (~psymtab_storage): New destructor.
93         (require_partial_symbols): Update.
94         (ALL_OBJFILE_PSYMTABS_REQUIRED): Rewrite.
95         (find_pc_sect_psymtab, find_pc_sect_psymbol)
96         (match_partial_symbol, lookup_partial_symbol, dump_psymtab)
97         (psym_dump, recursively_search_psymtabs, psym_has_symbols)
98         (psym_find_compunit_symtab_by_address, sort_pst_symbols)
99         (start_psymtab_common, end_psymtab_common)
100         (add_psymbol_to_bcache, add_psymbol_to_list, init_psymbol_list)
101         (allocate_psymtab): Update.
102         (psymtab_storage::discard_psymtab): Rename from discard_psymtab.
103         Update.
104         (dump_psymtab_addrmap, maintenance_print_psymbols)
105         (maintenance_check_psymtabs): Update.
106         (class objfile_psymtabs): Move to objfiles.h.
107         * psympriv.h (discard_psymtab): Now inline.
108         (psymtab_discarder::psymtab_discarder): Update.
109         (psymtab_discarder::~psymtab_discarder): Update.
110         (ALL_OBJFILE_PSYMTABS): Rewrite.
111         * objfiles.h (struct objfile) <psymtabs, psymtabs_addrmap,
112         free_psymtabs, psymbol_cache, global_psymbols, static_psymbols>:
113         Remove fields.
114         <partial_symtabs>: New field.
115         (class objfile_psymtabs): Move from psymtab.h.  Update.
116         * objfiles.c (objfile::objfile): Initialize partial_symtabs, not
117         psymbol_cache.
118         (objfile::~objfile): Don't destroy psymbol_cache.
119         * mdebugread.c (parse_partial_symbols): Update.
120         * dwarf2read.c (create_addrmap_from_index)
121         (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
122         (process_psymtab_comp_unit_reader, dwarf2_build_psymtabs_hard)
123         (add_partial_subprogram, dwarf2_ranges_read): Update.
124         * dwarf-index-write.c (write_address_map)
125         (write_one_signatured_type, recursively_write_psymbols)
126         (class debug_names, class debug_names, write_psymtabs_to_index):
127         Update.
128
129 2019-01-10  Tom Tromey  <tom@tromey.com>
130
131         * symtab.h (SYMBOL_SET_NAMES): Update.
132         (symbol_set_names): Update.
133         (MSYMBOL_SET_NAMES): Update.
134         * symtab.c (symbol_set_names): Change argument to be an
135         objfile_per_bfd_storage.
136         * psymtab.c (add_psymbol_to_bcache): Update.
137         * psympriv.h (PSYMBOL_SET_NAMES): Take per_bfd argument.
138
139 2019-01-10  Tom Tromey  <tom@tromey.com>
140
141         * symtab.c (create_demangled_names_hash): Change argument to be an
142         objfile_per_bfd_storage.
143         (symbol_set_names): Update.
144
145 2019-01-10  Tom Tromey  <tom@tromey.com>
146
147         * xcoffread.c (xcoff_initial_scan): Unconditionally call
148         init_psymbol_list.
149         * psymtab.c (init_psymbol_list): Do nothing if already called.
150         * psympriv.h (init_psymbol_list): Add comment.
151         * dwarf2read.c (dwarf2_build_psymtabs): Unconditionally call
152         init_psymbol_list.
153         * dbxread.c (dbx_symfile_read): Unconditionally call
154         init_psymbol_list.
155
156 2019-01-10  Tom Tromey  <tom@tromey.com>
157
158         * xcoffread.c (scan_xcoff_symtab): Update.
159         * psymtab.c (add_psymbol_to_list): Replace "list" parameter with
160         "where".
161         * mdebugread.c (parse_partial_symbols)
162         (handle_psymbol_enumerators): Update.
163         * dwarf2read.c (add_partial_symbol, load_partial_dies): Update.
164         * dbxread.c (read_dbx_symtab): Update.
165         * psympriv.h (psymbol_placement): New enum.
166         (add_psymbol_to_list): Update.
167
168 2019-01-10  Tom Tromey  <tom@tromey.com>
169
170         * xcoffread.c (xcoff_start_psymtab): Remove global_psymbols and
171         static_psymbols parameters.
172         (scan_xcoff_symtab): Update.
173         * psymtab.c (start_psymtab_common): Remove global_psymbols and
174         static_psymbols parameters.
175         * psympriv.h (start_psymtab_common): Update.
176         * mdebugread.c (parse_partial_symbols): Update.
177         * dwarf2read.c (create_partial_symtab): Update.
178         * dbxread.c (read_dbx_symtab): Update.
179         (start_psymtab): Remove global_psymbols and static_psymbols
180         parameters.
181
182 2019-01-10  Tom Tromey  <tom@tromey.com>
183
184         * xcoffread.c (xcoff_end_psymtab): Remove some initializations.
185         * psymtab.c (allocate_psymtab): Add comment.
186         * psympriv.h (allocate_psymtab): Add comment.
187         * dwarf2read.c (dwarf2_create_include_psymtab): Remove some
188         initializations.
189         * dbxread.c (dbx_end_psymtab): Remove some initializations.
190
191 2019-01-10  Tom Tromey  <tom@tromey.com>
192
193         * symfile.h (mdebug_build_psymtabs, elfmdebug_build_psymtabs):
194         Don't declare.
195         * mipsread.c: Include mdebugread.h.
196         * mdebugread.h (mdebug_build_psymtabs, elfmdebug_build_psymtabs):
197         Declare.
198         * elfread.c: Include mdebugread.h.
199
200 2019-01-09  Tom Tromey  <tom@tromey.com>
201
202         * dbxread.c (dbx_end_psymtab): Use objfile_psymtabs.
203         * mdebugread.c (parse_partial_symbols): Use objfile_psymtabs.
204         * psymtab.c (ALL_OBJFILE_PSYMTABS_REQUIRED): Remove.
205         (psym_map_symtabs_matching_filename, find_pc_sect_psymtab)
206         (psym_lookup_symbol, psym_find_last_source_symtab)
207         (psym_forget_cached_source_info, psym_print_stats)
208         (psym_expand_symtabs_for_function, psym_expand_all_symtabs)
209         (psym_expand_symtabs_with_fullname, psym_map_symbol_filenames)
210         (psym_map_matching_symbols, psym_expand_symtabs_matching)
211         (psym_find_compunit_symtab_by_address)
212         (maintenance_print_psymbols, maintenance_info_psymtabs)
213         (maintenance_check_psymtabs): Use ranged for.
214         * psymtab.h (class objfile_psymtabs): New.
215         (require_partial_symbols): Return objfile_psymtabs.
216         * psympriv.h (ALL_OBJFILE_PSYMTABS): Remove.
217
218 2019-01-09  Tom Tromey  <tom@tromey.com>
219
220         * symfile.c (overlay_invalidate_all, find_pc_overlay)
221         (find_pc_mapped_section, list_overlays_command)
222         (map_overlay_command, unmap_overlay_command)
223         (simple_overlay_update): Use all_objfiles.
224         * spu-tdep.c (spu_overlay_update): Use all_objfiles.
225         * printcmd.c (info_symbol_command): Use all_objfiles.
226         * objfiles.h (ALL_OBJSECTIONS): Remove.
227         * maint.c (maintenance_translate_address): Use all_objfiles.
228         * gcore.c (gcore_create_callback): Use all_objfiles.
229         (objfile_find_memory_regions): Likewise.
230
231 2019-01-09  Tom Tromey  <tom@tromey.com>
232
233         * symtab.c (find_line_symtab, info_sources_command)
234         (make_source_files_completion_list): Use objfile_compunits.
235         * source.c (select_source_symtab): Use objfile_compunits.
236         * objfiles.h (struct objfile): Update comment.
237         (ALL_OBJFILES): Remove.
238         (ALL_FILETABS): Remove.
239         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Use
240         objfile_compunits.
241
242 2019-01-09  Tom Tromey  <tom@tromey.com>
243
244         * symmisc.c (print_objfile_statistics, dump_objfile)
245         (maintenance_print_symbols): Use compunit_filetabs.
246         * source.c (forget_cached_source_info_for_objfile): Use
247         compunit_filetabs.
248         * objfiles.h (ALL_OBJFILE_FILETABS): Remove.
249         (ALL_FILETABS): Use compunit_filetabs.
250         * objfiles.c (objfile_relocate1): Use compunit_filetabs.
251         * coffread.c (coff_symtab_read): Use compunit_filetabs.
252
253 2019-01-09  Tom Tromey  <tom@tromey.com>
254
255         * symtab.h (ALL_COMPUNIT_FILETABS): Remove.
256         (compunit_filetabs): New.
257         * symtab.c (iterate_over_some_symtabs, find_pc_sect_line): Use
258         compunit_filetabs.
259         (info_sources_command, make_source_files_completion_list): Remove
260         declaration.
261         * symmisc.c (print_objfile_statistics, dump_objfile)
262         (maintenance_print_symbols): Remove declaration.
263         (maintenance_info_symtabs): Use compunit_filetabs.
264         (maintenance_info_line_tables): Likewise.
265         * source.c (select_source_symtab): Change local variable name.
266         (forget_cached_source_info_for_objfile): Remove declaration.
267         * objfiles.h (ALL_OBJFILE_FILETABS): Use compunit_filetabs.
268         * objfiles.c (objfile_relocate1): Remove declaration.
269         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Remove
270         declaration.
271         * maint.c (count_symtabs_and_blocks): Use compunit_filetabs.
272         * coffread.c (coff_symtab_read): Remove declaration.
273         * buildsym.c (buildsym_compunit::end_symtab_with_blockvector): Use
274         compunit_filetabs.
275
276 2019-01-09  Tom Tromey  <tom@tromey.com>
277
278         * symtab.c (lookup_objfile_from_block)
279         (find_pc_sect_compunit_symtab, search_symbols)
280         (default_collect_symbol_completion_matches_break_on): Use
281         objfile_compunits.
282         * objfiles.h (ALL_COMPUNITS): Remove.
283         * maint.c (count_symtabs_and_blocks): Use objfile_compunits.
284         * cp-support.c (add_symbol_overload_list_qualified): Use
285         objfile_compunits.
286         * ada-lang.c (ada_collect_symbol_completion_matches)
287         (ada_add_global_exceptions): Use objfile_compunits.
288
289 2019-01-09  Tom Tromey  <tom@tromey.com>
290
291         * source.c (select_source_symtab)
292         (forget_cached_source_info_for_objfile): Remove declaration.
293         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Remove
294         declaration.
295         * maint.c (count_symtabs_and_blocks): Remove declaration.
296         * cp-support.c (add_symbol_overload_list_qualified): Remove
297         declaration.
298         * coffread.c (coff_symtab_read): Remove declaration.
299         * symtab.c (lookup_symbol_in_objfile_symtabs)
300         (basic_lookup_transparent_type_1): Use objfile_compunits.
301         (lookup_objfile_from_block, find_pc_sect_compunit_symtab)
302         (info_sources_command, search_symbols)
303         (default_collect_symbol_completion_matches_break_on)
304         (make_source_files_completion_list): Remove declaration.
305         * ada-lang.c (add_nonlocal_symbols): Use objfile_compunits.
306         (ada_collect_symbol_completion_matches)
307         (ada_add_global_exceptions): Remove declaration.
308         * linespec.c (iterate_over_all_matching_symtabs): Use
309         objfile_compunits.
310         * objfiles.h (ALL_OBJFILE_COMPUNITS): Remove.
311         (class objfile_compunits): New.
312         (ALL_COMPUNITS): Use objfile_compunits.
313         * symmisc.c (print_objfile_statistics, maintenance_info_symtabs)
314         (maintenance_check_symtabs, maintenance_info_line_tables): Use
315         objfile_compunits.
316         * objfiles.c (objfile_relocate1): Use objfile_compunits.
317
318 2019-01-09  Tom Tromey  <tom@tromey.com>
319
320         * symtab.c (search_symbols)
321         (default_collect_symbol_completion_matches_break_on): Use
322         objfile_msymbols.
323         * ada-lang.c (ada_lookup_simple_minsym)
324         (ada_collect_symbol_completion_matches): Use objfile_msymbols.
325         * minsyms.c (find_solib_trampoline_target): Use objfile_msymbols.
326         * hppa-tdep.c (hppa_lookup_stub_minimal_symbol): Use
327         objfile_msymbols.
328         * coffread.c (coff_symfile_read): Use objfile_msymbols.
329         * symmisc.c (dump_msymbols): Use objfile_msymbols.
330         * objc-lang.c (find_methods): Use objfile_msymbols.
331         (info_selectors_command, info_classes_command): Likewise.
332         * stabsread.c (scan_file_globals): Use objfile_msymbols.
333         * objfiles.h (class objfile_msymbols): New.
334         (ALL_OBJFILE_MSYMBOLS): Remove.
335         (ALL_MSYMBOLS): Remove.
336
337 2019-01-09  Tom Tromey  <tom@tromey.com>
338
339         * common/next-iterator.h (next_adapter): Add Iterator template
340         parameter.
341         * objfiles.h (ALL_OBJFILES_SAFE): Remove.
342         (class all_objfiles_safe): New.
343         * jit.c (jit_inferior_exit_hook): Use all_objfiles_safe.
344         * objfiles.c (put_objfile_before): Update comment.
345         (add_separate_debug_objfile): Likewise.
346         (free_all_objfiles): Use all_objfiles_safe.
347         (objfile_purge_solibs): Likewise.
348
349 2019-01-09  Tom Tromey  <tom@tromey.com>
350
351         * symtab.c (iterate_over_symtabs, matching_obj_sections)
352         (expand_symtab_containing_pc, lookup_static_symbol)
353         (basic_lookup_transparent_type, find_pc_sect_compunit_symtab)
354         (find_symbol_at_address, find_line_symtab, find_main_name): Use
355         all_objfiles.
356         * probe.c (find_probe_by_pc, collect_probes): Use all_objfiles.
357         * breakpoint.c (create_overlay_event_breakpoint)
358         (create_longjmp_master_breakpoint)
359         (create_std_terminate_master_breakpoint)
360         (create_exception_master_breakpoint): Use all_objfiles.
361         * linux-thread-db.c (try_thread_db_load_from_pdir)
362         (has_libpthread): Use all_objfiles.
363         * ada-lang.c (add_nonlocal_symbols): Use all_objfiles.
364         * linespec.c (iterate_over_all_matching_symtabs)
365         (search_minsyms_for_name): Use all_objfiles.
366         * maint.c (maintenance_info_sections): Use all_objfiles.
367         * main.c (captured_main_1): Use all_objfiles.
368         * spu-tdep.c (spu_objfile_from_frame): Use all_objfiles.
369         * guile/scm-objfile.c (gdbscm_objfiles): Use all_objfiles.
370         * guile/scm-pretty-print.c
371         (ppscm_find_pretty_printer_from_objfiles): Use all_objfiles.
372         * solib-spu.c (append_ocl_sos): Use all_objfiles.
373         * symmisc.c (maintenance_print_symbols): Use all_objfiles.
374         (maintenance_print_msymbols): Use all_objfiles.
375         * source.c (select_source_symtab): Use all_objfiles.
376         * jit.c (jit_find_objf_with_entry_addr): Use all_objfiles.
377         * symfile.c (remove_symbol_file_command)
378         (expand_symtabs_matching, map_symbol_filenames): Use
379         all_objfiles.
380         * ppc-linux-tdep.c (ppc_linux_spe_context_inferior_created): Use
381         all_objfiles.
382         * dwarf2-frame.c (dwarf2_frame_find_fde): Use all_objfiles.
383         * objc-lang.c (find_methods): Use all_objfiles.
384         * objfiles.c (have_partial_symbols, have_full_symbols)
385         (have_minimal_symbols, qsort_cmp)
386         (default_iterate_over_objfiles_in_search_order): Use
387         all_objfiles.
388         * hppa-tdep.c (find_unwind_entry): Use all_objfiles.
389         * psymtab.c (maintenance_print_psymbols): Use all_objfiles.
390         (maintenance_check_psymtabs): Use all_objfiles.
391         (ALL_PSYMTABS): Remove.
392         * compile/compile-object-run.c (do_module_cleanup): Use
393         all_objfiles.
394         * blockframe.c (find_pc_partial_function): Use all_objfiles.
395         * cp-support.c (add_symbol_overload_list_qualified): Use
396         all_objfiles.
397         * windows-tdep.c (windows_iterate_over_objfiles_in_search_order):
398         Use all_objfiles.
399         * dwarf-index-write.c (save_gdb_index_command): Use all_objfiles.
400         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): Use
401         all_objfiles.
402         * python/py-objfile.c (objfpy_lookup_objfile_by_name)
403         (objfpy_lookup_objfile_by_build_id): Use all_objfiles.
404         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
405         Uses all_objfiles.
406         * solib.c (solib_read_symbols): Use all_objfiles
407
408 2019-01-09  Tom Tromey  <tom@tromey.com>
409
410         * probe.c (parse_probes_in_pspace): Use all_objfiles.
411         * guile/scm-progspace.c (gdbscm_progspace_objfiles): Use
412         all_objfiles.
413         * objfiles.h (ALL_PSPACE_OBJFILES): Remove.
414         * symmisc.c (print_symbol_bcache_statistics)
415         (print_objfile_statistics, maintenance_print_objfiles)
416         (maintenance_info_symtabs, maintenance_check_symtabs)
417         (maintenance_expand_symtabs, maintenance_info_line_tables): Use
418         all_objfiles.
419         * source.c (forget_cached_source_info): Use all_objfiles.
420         * symfile-debug.c (set_debug_symfile): Use all_objfiles.
421         * elfread.c (elf_gnu_ifunc_resolve_by_cache)
422         (elf_gnu_ifunc_resolve_by_got): Use all_objfiles.
423         * objfiles.c (update_section_map): Use all_objfiles.
424         (shared_objfile_contains_address_p): Likewise.
425         * psymtab.c (maintenance_info_psymtabs): Use all_objfiles.
426         * python/py-progspace.c (pspy_get_objfiles): Use all_objfiles.
427
428 2019-01-09  Tom Tromey  <tom@tromey.com>
429
430         * common/next-iterator.h: New file.
431         * objfiles.h (class all_objfiles): New.
432         (struct objfile_iterator): New.
433
434 2019-01-09  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
435
436         * NEWS: Move the description of the changed "frame", "select-frame",
437          and "info frame" commands to the Changed commands section.
438
439 2019-01-09  Simon Marchi  <simon.marchi@ericsson.com>
440
441         * gdbtypes.c (check_stub_method_group): Remove handling of old
442         mangling schemes.
443         * linespec.c (find_methods): Likewise.
444         * stabsread.c (read_member_functions): Likewise.
445         * valops.c (search_struct_method): Likewise.
446         (value_struct_elt_for_reference): Likewise.
447         * NEWS: Mention this change.
448
449 2019-01-09  Andrew Burgess  <andrew.burgess@embecosm.com>
450
451         * cli/cli-cmds.c (list_command): Pass a source_lines_range to
452         print_source_lines.
453         * source.c (print_source_lines_base): Update line number check.
454         (print_source_lines): New function.
455         (source_lines_range::source_lines_range): New function.
456         * source.h (class source_lines_range): New class.
457         (print_source_lines): New declaration.
458
459 2019-01-09  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
460
461         * linespec.c (linespec_state_destructor): Free self->canonical_names.
462
463 2019-01-08  Tom Tromey  <tom@tromey.com>
464             Simon Marchi  <simon.marchi@ericsson.com>
465
466         PR gdb/24060
467         * ada-exp.y (DOLLAR_VARIABLE): Rename from SPECIAL_VARIABLE.
468         * ada-lex.l (DOLLAR_VARIABLE): Likewise.
469         * c-exp.y (DOLLAR_VARIABLE): Rename from VARIABLE.
470         * f-exp.y (DOLLAR_VARIABLE): Likewise.
471         * m2-exp.y (DOLLAR_VARIABLE): Rename from INTERNAL_VAR.
472         * p-exp.y (DOLLAR_VARIABLE): Rename from VARIABLE.
473
474 2019-01-08  Andrew Burgess  <andrew.burgess@embecosm.com>
475
476         * source.c (select_source_symtab): Move header comment to
477         declaration in source.h.
478         (forget_cached_source_info_for_objfile): Likewise.
479         (forget_cached_source_info): Likewise.
480         (identify_source_line): Likewise.
481         * source.h (identify_source_line): Move declaration from symtab.h
482         and add comment from source.c
483         (print_source_lines): Likewise.
484         (forget_cached_source_info_for_objfile): Likewise.
485         (forget_cached_source_info): Likewise.
486         (select_source_symtab): Likewise.
487         (enum print_source_lines_flag): Move definition from symtab.h.
488         * symtab.h (identify_source_line): Move declaration to source.h.
489         (print_source_lines): Likewise.
490         (forget_cached_source_info_for_objfile): Likewise.
491         (forget_cached_source_info): Likewise.
492         (select_source_symtab): Likewise.
493         (enum print_source_lines_flag): Move definition to source.h.
494         * tui/tui-hooks.c: Add 'source.h' include.
495
496 2019-01-08  Andrew Burgess  <andrew.burgess@embecosm.com>
497
498         * source.c (print_source_lines_base): Handle requests to print
499         reverse line number sequences, and guard against empty lines
500         string.
501
502 2019-01-08  Andrew Burgess  <andrew.burgess@embecosm.com>
503
504         * source.c (print_source_lines_base): Fix skip of '\r' if next
505         character is '\n'.
506
507 2019-01-06  Tom Tromey  <tom@tromey.com>
508
509         * c-exp.y (struct c_parse_state) <macro_original_text,
510         expansion_obstack>: New member.
511         (macro_original_text, expansion_obstack): Remove globals.
512         (scan_macro_expansion, scanning_macro_expansion)
513         (finished_macro_expansion): Update.
514         (scan_macro_cleanup): Remove.
515         (yylex, c_parse): Update.
516
517 2019-01-06  Tom Tromey  <tom@tromey.com>
518
519         * c-exp.y (struct c_parse_state) <strings>: New member.
520         (operator_stoken): Update.
521
522 2019-01-06  Tom Tromey  <tom@tromey.com>
523
524         * parser-defs.h (type_ptr): Remove typedef.  Don't declare VEC.
525         (union type_stack_elt) <typelist_val>: Now a pointer to
526         std::vector.
527         (type_stack_cleanup): Don't declare.
528         (push_typelist): Update.
529         * parse.c (pop_typelist): Return a std::vector.
530         (push_typelist): Take a std::vector.
531         (follow_types): Update.  Do not free args.
532         (type_stack_cleanup): Remove.
533         * c-exp.y (struct c_parse_state): New.
534         (cpstate): New global.
535         (type_aggregate_p, exp, ptr_operator, parameter_typelist)
536         (nonempty_typelist): Update.
537         (func_mod): Create a new vector.
538         (c_parse): Create a c_parse_state.
539         (check_parameter_typelist): Do not delete params.
540         (function_method): Update.  Do not delete type_list.
541
542 2019-01-06  Tom Tromey  <tom@tromey.com>
543
544         PR gdb/28155:
545         * python/py-finishbreakpoint.c (bpfinishpy_init): Use
546         check_typedef.
547         * infcmd.c (finish_command_fsm_should_stop): Use check_typedef.
548         (print_return_value): Likewise.
549
550 2019-01-05  Tom Tromey  <tom@tromey.com>
551
552         * contrib/cleanup_check.py: Remove.
553         * contrib/gcc-with-excheck: Remove.
554         * contrib/exsummary.py: Remove.
555         * contrib/excheck.py: Remove.
556
557 2019-01-05  Joel Brobecker  <brobecker@adacore.com>
558
559         * thread.c (delete_thread_1): Add gdb_assert that THR is not
560         NULL. Initialize tpprev to NULL instead of assigning it
561         to NULL on the next statement.
562         * windows-nat.c (windows_delete_thread): Remove check for
563         main_thread_id before printing thread exit notifications.
564         (get_windows_debug_event) <EXIT_THREAD_DEBUG_EVENT>:
565         Remove thread ID check against main_thread_id.
566         <CREATE_PROCESS_DEBUG_EVENT>: Remove call to
567         windows_delete_thread.
568         <EXIT_PROCESS_DEBUG_EVENT>: Add call to windows_delete_thread.
569
570 2019-01-04  Tom Tromey  <tom@tromey.com>
571
572         * compile/compile.c (_initialize_compile): Use upper case for
573         metasyntactic variables.
574         * symmisc.c (_initialize_symmisc): Use upper case for
575         metasyntactic variables.
576         * psymtab.c (_initialize_psymtab): Use upper case for
577         metasyntactic variables.
578         * demangle.c (demangle_command): Use upper case for metasyntactic
579         variables.
580         (_initialize_demangler): Likewise.
581         * ax-gdb.c (_initialize_ax_gdb): Use upper case for metasyntactic
582         variables.
583
584 2019-01-03  Tom Tromey  <tom@tromey.com>
585
586         * tui/tui-source.c (tui_set_source_content): Use xstrdup.
587
588 2019-01-03  Tom Tromey  <tom@tromey.com>
589
590         * python/py-symtab.c (salpy_str): Update.
591         (struct salpy_sal_object) <symtab>: Now a PyObject.
592         (salpy_dealloc): Update.
593         (del_objfile_sal): Use gdbpy_ref.
594
595 2019-01-03  Tom Tromey  <tom@tromey.com>
596
597         * python/py-type.c (convert_field): Use new_reference.  Return
598         gdbpy_ref.
599         (make_fielditem): Return gdbpy_ref.
600         (typy_fields): Update.
601         (typy_getitem): Update.
602         (field_name): Return gdbpy_ref.  Use new_reference.
603         (typy_iterator_iternext): Update.
604
605 2019-01-03  Tom Tromey  <tom@tromey.com>
606
607         * python/py-record.c (gdbpy_stop_recording): Use Py_RETURN_NONE.
608
609 2019-01-03  Tom Tromey  <tom@tromey.com>
610
611         * python/py-value.c (valpy_dealloc): Use Py_XDECREF.
612         * python/py-type.c (typy_fields_items): Use gdbpy_ref.
613         * python/py-progspace.c (pspy_set_printers): Use gdbpy_ref.
614         (pspy_set_frame_filters, pspy_set_frame_unwinders)
615         (pspy_set_type_printers): Likewise.
616         * python/py-function.c (fnpy_init): Use gdbpy_ref.
617         * python/py-cmd.c (cmdpy_init): Use gdbpy_ref.
618         * python/py-objfile.c (objfpy_set_printers): Use gdbpy_ref.
619         (objfpy_set_frame_filters, objfpy_set_frame_unwinders)
620         (objfpy_set_type_printers): Likewise.
621
622 2019-01-03  Tom Tromey  <tom@tromey.com>
623
624         * python/python.c (gdbpy_enter, ~gdbpy_enter): Update.
625         (gdbpy_print_stack): Use gdbpy_err_fetch.
626         * python/python-internal.h (class gdbpy_err_fetch): New class.
627         (class gdbpy_enter) <m_error_type, m_error_value,
628         m_error_traceback>: Remove.
629         <m_error>: New member.
630         (gdbpy_exception_to_string): Don't declare.
631         * python/py-varobj.c (py_varobj_iter_next): Use gdbpy_err_fetch.
632         * python/py-value.c (convert_value_from_python): Use
633         gdbpy_err_fetch.
634         * python/py-utils.c (gdbpy_err_fetch::to_string): Rename from
635         gdbpy_exception_to_string.
636         (gdbpy_handle_exception): Use gdbpy_err_fetch.
637         * python/py-prettyprint.c (print_stack_unless_memory_error): Use
638         gdbpy_err_fetch.
639
640 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
641
642         * linux-nat.c (delete_lwp_cleanup): Delete.
643         (struct lwp_deleter): New struct.
644         (lwp_info_up): New typedef.
645         (linux_nat_target::follow_fork): Delete cleanup, and make use of
646         lwp_info_up.
647
648 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
649
650         * linux-fork.c (class scoped_switch_fork_info): New class.
651         (inferior_call_waitpid): Update to use scoped_switch_fork_info.
652
653 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
654
655         * valops.c (find_overload_match): Remove use of null_cleanup, and
656         calls to do_cleanups.
657
658 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
659
660         * compile/compile-cplus-types.c
661         (compile_cplus_instance::decl_name): Handle changes to
662         cp_func_name.
663         * cp-support.c (cp_func_name): Update header comment, update
664         return type.
665         * cp-support.h (cp_func_name): Update return type in declaration.
666         * valops.c (find_overload_match): Move temp_func local to top
667         level of function and change its type.  Use temp_func to hold and
668         delete temporary string obtained from cp_func_name.
669
670 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
671
672         * remote.c (remote_target::remote_check_symbols): Convert `msg` to
673         gdb::char_vector, remove cleanup, and update uses of `msg`.
674
675 2019-01-03  Jim Wilson  <jimw@sifive.com>
676
677         * riscv-tdep.c (riscv_freg_feature): Drop s0 name from f8.
678
679 2019-01-02  Tom Tromey  <tom@tromey.com>
680
681         * xml-tdesc.c (xml_cache): Hold a target_desc_up.
682         (tdesc_parse_xml): Remove cleanups.
683         * target-descriptions.h (make_cleanup_free_target_description):
684         Don't declare.
685         (target_desc_deleter): New struct.
686         (target_desc_up): New typedef.
687         * target-descriptions.c (target_desc_deleter::operator()): Rename
688         from free_target_description.
689         (make_cleanup_free_target_description): Remove.
690
691 2019-01-02  Tom Tromey  <tom@tromey.com>
692
693         * linespec.c (struct linespec_parser): Rename from ls_parser.  Add
694         constructor, destructor.
695         (linespec_parser): Remove typedef.
696         (~linespec_parser): Rename from linespec_parser_delete.
697         (linespec_lex_to_end, linespec_complete_label)
698         (linespec_complete): Update.
699         (decode_line_full): Remove cleanups.
700         (decode_line_1): Update.
701
702 2019-01-02  Tom Tromey  <tom@tromey.com>
703
704         * python/python-internal.h (inferior_to_inferior_object): Change
705         return type.
706         * python/py-exitedevent.c (create_exited_event_object): Update.
707         * python/py-inferior.c (inferior_to_inferior_object): Return
708         gdbpy_ref.
709         (python_new_inferior, python_inferior_deleted)
710         (thread_to_thread_object, delete_thread_object)
711         (build_inferior_list, gdbpy_selected_inferior): Update.
712         * python/py-infthread.c (create_thread_object): Update.  Also fail
713         if inferior_to_inferior_object fails.
714
715 2019-01-02  Simon Marchi  <simon.marchi@ericsson.com>
716
717         * inferior.h (class inferior) <displaced_step_state>: New field.
718         * infrun.h (struct displaced_step_state): Move here from
719         infrun.c.  Initialize fields, add constructor.
720         <inf>: Remove field.
721         <reset>: New method.
722         * infrun.c (struct displaced_step_inferior_state): Move to
723         infrun.h.
724         (displaced_step_inferior_states): Remove.
725         (get_displaced_stepping_state): Adust.
726         (displaced_step_in_progress_any_inferior): Adjust.
727         (displaced_step_in_progress_thread): Adjust.
728         (displaced_step_in_progress): Adjust.
729         (add_displaced_stepping_state): Remove.
730         (get_displaced_step_closure_by_addr): Adjust.
731         (remove_displaced_stepping_state): Remove.
732         (infrun_inferior_exit): Call displaced_step_state.reset.
733         (use_displaced_stepping): Don't check for NULL.
734         (displaced_step_prepare_throw): Call
735         get_displaced_stepping_state.
736         (displaced_step_fixup): Don't check for NULL.
737         (prepare_for_detach): Don't check for NULL.
738
739 2019-01-02  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
740
741         * infcall.c (call_function_by_hand_dummy): cleanup/destroy sm
742          in case of call that did not complete.
743
744 2019-01-02  Andrey Utkin  <autkin@undo.io>
745
746         * symfile.c (find_separate_debug_file): Fix search of debug files for
747         remote debuggee.
748
749 2019-01-02  Tom Tromey  <tom@tromey.com>
750
751         * python/py-inferior.c (gdbpy_initialize_inferior): Fix
752         indentation.
753         * python/py-frame.c (frapy_older): Remove cast.
754         (frapy_newer): Likewise.
755         * python/py-breakpoint.c (local_setattro): Remove cast.
756         * python/py-arch.c (archpy_name): Remove local variable.
757         * python/py-type.c (gdbpy_lookup_type): Remove cast.
758
759 2019-01-02  Joel Brobecker  <brobecker@adacore.com>
760
761         * unittests/basic_string_view/element_access/char/empty.cc:
762         Fix year range in copyright header.
763
764 2019-01-01  Andrew Burgess  <andrew.burgess@embecosm.com>
765
766         * arch/riscv.h (struct riscv_gdbarch_features) <hw_float_abi>:
767         Delete.
768         <operator==>: Update with for removed field.
769         <hash>: Likewise.
770         * riscv-tdep.h (struct gdbarch_tdep) <features>: Renamed to...
771         <isa_features>: ...this.
772         <abi_features>: New field.
773         (riscv_isa_flen): Update comment.
774         (riscv_abi_xlen): New declaration.
775         (riscv_abi_flen): New declaration.
776         * riscv-tdep.c (riscv_isa_xlen): Update to get answer from
777         isa_features.
778         (riscv_abi_xlen): New function.
779         (riscv_isa_flen): Update to get answer from isa_features.
780         (riscv_abi_flen): New function.
781         (riscv_has_fp_abi): Update to get answer from abi_features.
782         (riscv_call_info::riscv_call_info): Use abi xlen and flen, not isa
783         xlen and flen.
784         (riscv_call_info) <xlen, flen>: Update comment.
785         (riscv_call_arg_struct): Remove invalid assertions
786         (riscv_features_from_gdbarch_info): Update now hw_float_abi field
787         is removed.
788         (riscv_gdbarch_init): Gather isa features and abi features
789         separately, ensure both match on the gdbarch when reusing an old
790         gdbarch.  Relax an error check to allow 32-bit abi float to run on
791         a target with 64-bit float hardware.
792
793 2019-01-01  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
794
795         * source.c (search_command_helper): Stop reverse search
796         when line 1 has been searched.
797
798 2019-01-01  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
799
800         * record-full.c (record_full_base_target::close): Rewrite
801         record_full_core_buf_list free logic.
802
803 2019-01-01  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
804
805         * break-catch-syscall.c (print_one_catch_syscall): xfree
806         the last text.
807
808 2019-01-01  Joel Brobecker  <brobecker@adacore.com>
809
810         * top.c (print_gdb_version): Update Copyright year in version
811         message.
812
813 2019-01-01  Joel Brobecker  <brobecker@adacore.com>
814
815         Update copyright year range in all GDB files.
816
817 2019-01-01  Joel Brobecker  <brobecker@adacore.com>
818
819         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2018.
820
821 For older changes see ChangeLog-2018.
822 \f
823 Local Variables:
824 mode: change-log
825 left-margin: 8
826 fill-column: 74
827 version-control: never
828 coding: utf-8
829 End:
830