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