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