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