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