1 2019-01-23 Tom Tromey <tom@tromey.com>
2 Pedro Alves <palves@redhat.com>
4 * infrun.c (disable_thread_events): Delete.
5 (stop_all_threads): Use SCOPE_EXIT.
7 2019-01-23 Tom Tromey <tom@tromey.com>
8 Pedro Alves <palves@redhat.com>
10 * symfile.c: Include forward-scope-exit.h.
11 (clear_symtab_users_cleanup): Replace forward declaration with
13 (syms_from_objfile_1): Use the forward_scope_exit and
14 gdb::optional instead of cleanup_function.
15 (reread_symbols): Use the forward_scope_exit instead of
17 (clear_symtab_users_cleanup): Remove function.
19 2019-01-23 Tom Tromey <tom@tromey.com>
20 Pedro Alves <palves@redhat.com>
22 * linux-nat.c: Include scope-exit.h.
23 (cleanup_target_stop): Remove.
24 (linux_nat_target::static_tracepoint_markers_by_strid): Use
27 2019-01-23 Tom Tromey <tom@tromey.com>
28 Pedro Alves <palves@redhat.com>
30 * infcall.c (cleanup_delete_std_terminate_breakpoint): Remove.
31 (call_function_by_hand_dummy): Use SCOPE_EXIT.
33 2019-01-23 Tom Tromey <tom@tromey.com>
34 Andrew Burgess <andrew.burgess@embecosm.com>
35 Pedro Alves <palves@redhat.com>
37 * infrun.c (fetch_inferior_event): Use scope_exit.
38 * utils.h (make_bpstat_clear_actions_cleanup): Don't declare.
39 * top.c (execute_command): Use scope_exit.
40 * breakpoint.c (bpstat_do_actions): Use scope_exit.
41 * utils.c (do_bpstat_clear_actions_cleanup)
42 (make_bpstat_clear_actions_cleanup): Remove.
44 2019-01-23 Tom Tromey <tom@tromey.com>
45 Pedro Alves <palves@redhat.com>
47 * infrun.c: Include "common/scope-exit.h"
48 (delete_just_stopped_threads_infrun_breakpoints_cleanup): Remove.
49 (wait_for_inferior): Use SCOPE_EXIT.
50 (fetch_inferior_event): Use scope_exit.
52 2019-01-23 Tom Tromey <tom@tromey.com>
53 Pedro Alves <palves@redhat.com>
55 * breakpoint.c (create_breakpoint): Remove cleanup.
57 2019-01-23 Tom Tromey <tom@tromey.com>
58 Andrew Burgess <andrew.burgess@embecosm.com>
59 Pedro Alves <palves@redhat.com>
61 2019-01-23 Pedro Alves <palves@redhat.com>
63 * gdbarch-selftests.c (struct on_exit): Use SCOPE_EXIT.
65 2019-01-23 Pedro Alves <palves@redhat.com>
66 Andrew Burgess <andrew.burgess@embecosm.com>
68 * gdbthread.h: Include "common/forward-scope-exit.h".
69 (scoped_finish_thread_state): Redefine custom class in terms of
72 2019-01-23 Pedro Alves <palves@redhat.com>
73 Andrew Burgess <andrew.burgess@embecosm.com>
75 * common/forward-scope-exit.h: New file.
77 2019-01-23 Pedro Alves <palves@redhat.com>
78 Andrew Burgess <andrew.burgess@embecosm.com>
79 Tom Tromey <tom@tromey.com>
81 * common/scope-exit.h: New file.
83 2019-01-23 Pedro Alves <palves@redhat.com>
85 * common/preprocessor.h (ESC): Rename to ...
86 (ESC_PARENS): ... this.
87 * common/valid-expr.h (CHECK_VALID_EXPR_1, CHECK_VALID_EXPR_2)
88 (CHECK_VALID_EXPR_3, CHECK_VALID_EXPR_4): Adjust.
90 2019-01-23 Tom Tromey <tom@tromey.com>
92 * language.h (class scoped_switch_to_sym_language_if_auto):
93 Initialize m_lang in both cases.
95 2019-01-23 Alan Hayward <alan.hayward@arm.com>
97 * nat/aarch64-linux.c (aarch64_linux_new_thread): Replace XNEW
100 2019-01-22 Tom Tromey <tom@tromey.com>
102 * corelow.c: Do not include sys/file.h.
104 2019-01-22 Tom Tromey <tom@tromey.com>
106 * tui/tui-wingeneral.h: Include gdb_curses.h.
108 2019-01-22 Tom Tromey <tom@tromey.com>
110 * source-cache.h (class source_cache) <get_source_lines,
111 get_plain_source_lines, extract_lines>: Rename "lines" parameter.
113 2019-01-22 Tom Tromey <tom@tromey.com>
115 * remote-fileio.h (struct remote_target): Declare.
117 2019-01-22 Tom Tromey <tom@tromey.com>
119 * python/py-arch.c: Do not include py-ref.h.
120 * python/py-bpevent.c: Do not include py-ref.h.
121 * python/py-cmd.c: Do not include py-ref.h.
122 * python/py-continueevent.c: Do not include py-ref.h.
123 * python/py-event.h: Do not include py-ref.h.
124 * python/py-evtregistry.c: Do not include py-ref.h.
125 * python/py-finishbreakpoint.c: Do not include py-ref.h.
126 * python/py-frame.c: Do not include py-ref.h.
127 * python/py-framefilter.c: Do not include py-ref.h.
128 * python/py-function.c: Do not include py-ref.h.
129 * python/py-infevents.c: Do not include py-ref.h.
130 * python/py-linetable.c: Do not include py-ref.h.
131 * python/py-objfile.c: Do not include py-ref.h.
132 * python/py-param.c: Do not include py-ref.h.
133 * python/py-prettyprint.c: Do not include py-ref.h.
134 * python/py-progspace.c: Do not include py-ref.h.
135 * python/py-symbol.c: Do not include py-ref.h.
136 * python/py-symtab.c: Do not include py-ref.h.
137 * python/py-type.c: Do not include py-ref.h.
138 * python/py-unwind.c: Do not include py-ref.h.
139 * python/py-utils.c: Do not include py-ref.h.
140 * python/py-value.c: Do not include py-ref.h.
141 * python/py-varobj.c: Do not include py-ref.h.
142 * python/py-xmethods.c: Do not include py-ref.h.
143 * python/python.c: Do not include py-ref.h.
144 * varobj.c: Do not include py-ref.h.
146 2019-01-22 Tom Tromey <tom@tromey.com>
148 * objfiles.h (struct objfile_per_bfd_storage): Use "struct"
151 2019-01-22 Tom Tromey <tom@tromey.com>
153 * compile/compile-cplus-types.c: Remove a comment by #include.
155 2019-01-22 Tom Tromey <tom@tromey.com>
157 * compile/gcc-c-plugin.h: Include compile-internal.h.
159 2019-01-22 Tom Tromey <tom@tromey.com>
161 * stabsread.c (EXTERN): Do not define.
162 (symnum, next_symbol_text_func, processing_gcc_compilation)
163 (within_function, global_sym_chain, global_stabs)
164 (previous_stab_code, this_object_header_files)
165 (n_this_object_header_files)
166 (n_allocated_this_object_header_files): Define.
167 * stabsread.h (EXTERN): Never define. Use "extern".
169 2019-01-22 Philippe Waroquiers <philippe.waroquiers@skynet.be>
171 * event-top.c (handle_line_of_input): use unique_xmalloc_ptr for
174 2019-01-21 Tom Tromey <tom@tromey.com>
176 * ui-out.c: Fix includes.
177 * tui/tui-source.c: Fix includes.
178 * target.c: Fix includes.
179 * remote.c: Fix includes.
180 * regcache.c: Fix includes.
181 * python/py-block.c: Fix includes.
182 * printcmd.c: Fix includes.
183 * or1k-tdep.c: Fix includes.
184 * mi/mi-main.c: Fix includes.
185 * m32r-tdep.c: Fix includes.
186 * csky-tdep.c: Fix includes.
187 * compile/compile-cplus-types.c: Fix includes.
188 * cli/cli-interp.c: Fix includes.
190 2019-01-21 Alan Hayward <alan.hayward@arm.com>
192 * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1): Check
195 2019-01-16 Tom Tromey <tom@tromey.com>
197 * objfiles.h (struct minimal_symbol_iterator): Rename. Move
199 (struct objfile) <msymbols_range>: Move from top level.
200 <msymbols>: New method.
201 (class objfile_msymbols): Remove.
202 * symtab.c (default_collect_symbol_completion_matches_break_on):
204 * symmisc.c (dump_msymbols): Update.
205 * stabsread.c (scan_file_globals): Update.
206 * objc-lang.c (info_selectors_command, info_classes_command)
207 (find_methods): Update.
208 * minsyms.c (find_solib_trampoline_target): Update.
209 * hppa-tdep.c (hppa_lookup_stub_minimal_symbol): Update.
210 * coffread.c (coff_symfile_read): Update.
211 * ada-lang.c (ada_lookup_simple_minsym)
212 (ada_collect_symbol_completion_matches): Update.
214 2019-01-16 Tom Tromey <tom@tromey.com>
216 * objfiles.h (class objfile_msymbols) <iterator>: Change argument
217 type. Remove no-argument constructor.
218 <iterator::operator++>: Simplify.
220 <end>: Use minimal_symbol_count.
222 2019-01-16 Tom Tromey <tom@tromey.com>
224 * objfiles.h (struct objfile) <psymtabs>: New method.
225 (class objfile_psymtabs): Remove.
226 * psymtab.h (class psymtab_storage) <partial_symtab_range>: New
229 (require_partial_symbols): Change return type.
230 * psymtab.c (require_partial_symbols)
231 (psym_expand_symtabs_matching): Update.
232 * mdebugread.c (parse_partial_symbols): Update.
233 * dbxread.c (dbx_end_psymtab): Update.
235 2019-01-15 Tom Tromey <tom@tromey.com>
237 * symtab.c (lookup_objfile_from_block)
238 (lookup_symbol_in_objfile_symtabs)
239 (basic_lookup_transparent_type_1, find_pc_sect_compunit_symtab)
240 (find_line_symtab, info_sources_command)
241 (default_collect_symbol_completion_matches_break_on)
242 (make_source_files_completion_list): Update.
243 * symmisc.c (print_objfile_statistics, dump_objfile)
244 (maintenance_print_symbols, maintenance_info_symtabs)
245 (maintenance_check_symtabs, maintenance_info_line_tables):
247 * source.c (select_source_symtab)
248 (forget_cached_source_info_for_objfile): Update.
249 * objfiles.h (class objfile_compunits): Remove.
250 (struct objfile) <compunits_range>: New typedef.
251 (compunits): New method.
252 * objfiles.c (objfile_relocate1): Update.
253 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Update.
254 * maint.c (count_symtabs_and_blocks): Update.
255 * linespec.c (iterate_over_all_matching_symtabs): Update.
256 * cp-support.c (add_symbol_overload_list_qualified): Update.
257 * coffread.c (coff_symtab_read): Update.
258 * ada-lang.c (add_nonlocal_symbols)
259 (ada_collect_symbol_completion_matches)
260 (ada_add_global_exceptions): Update.
262 2019-01-15 Tom Tromey <tom@tromey.com>
264 * progspace.h (program_space) <objfiles_safe_range>: New
266 <objfiles_safe>: New method.
267 * objfiles.h (class all_objfiles_safe): Remove.
268 * objfiles.c (free_all_objfiles, objfile_purge_solibs): Update.
269 * jit.c (jit_inferior_exit_hook): Update.
271 2019-01-17 Tom Tromey <tom@tromey.com>
273 * progspace.h (program_space) <objfiles_range>: New typedef.
274 <objfiles>: New method.
275 <objfiles_head>: Rename from objfiles.
276 (object_files): Update.
277 * guile/scm-progspace.c (gdbscm_progspace_objfiles): Update.
278 * guile/scm-pretty-print.c
279 (ppscm_find_pretty_printer_from_objfiles): Update.
280 * guile/scm-objfile.c (gdbscm_objfiles): Update.
281 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
283 * python/py-progspace.c (pspy_get_objfiles): Update.
284 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
286 * python/py-objfile.c (objfpy_lookup_objfile_by_name)
287 (objfpy_lookup_objfile_by_build_id): Update.
288 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Update.
289 * windows-tdep.c (windows_iterate_over_objfiles_in_search_order):
291 * symtab.c (iterate_over_symtabs, matching_obj_sections)
292 (expand_symtab_containing_pc, lookup_objfile_from_block)
293 (lookup_static_symbol, basic_lookup_transparent_type)
294 (find_pc_sect_compunit_symtab, find_symbol_at_address)
295 (find_line_symtab, info_sources_command)
296 (default_collect_symbol_completion_matches_break_on)
297 (make_source_files_completion_list, find_main_name): Update.
298 * symmisc.c (print_symbol_bcache_statistics)
299 (print_objfile_statistics, maintenance_print_symbols)
300 (maintenance_print_msymbols, maintenance_print_objfiles)
301 (maintenance_info_symtabs, maintenance_check_symtabs)
302 (maintenance_expand_symtabs, maintenance_info_line_tables):
304 * symfile.c (remove_symbol_file_command, overlay_invalidate_all)
305 (find_pc_overlay, find_pc_mapped_section, list_overlays_command)
306 (map_overlay_command, unmap_overlay_command)
307 (simple_overlay_update, expand_symtabs_matching)
308 (map_symbol_filenames): Update.
309 * symfile-debug.c (set_debug_symfile): Update.
310 * spu-tdep.c (spu_overlay_update, spu_objfile_from_frame):
312 * source.c (select_source_symtab, forget_cached_source_info):
314 * solib.c (solib_read_symbols): Update.
315 * solib-spu.c (append_ocl_sos): Update.
316 * psymtab.c (maintenance_print_psymbols)
317 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
318 * probe.c (parse_probes_in_pspace, find_probe_by_pc): Update.
319 * printcmd.c (info_symbol_command): Update.
320 * ppc-linux-tdep.c (ppc_linux_spe_context_inferior_created):
322 * objfiles.h (class all_objfiles): Remove.
323 * objfiles.c (have_partial_symbols, have_full_symbols)
324 (have_minimal_symbols, qsort_cmp, update_section_map)
325 (shared_objfile_contains_address_p)
326 (default_iterate_over_objfiles_in_search_order): Update.
327 * objc-lang.c (info_selectors_command, info_classes_command)
328 (find_methods): Update.
329 * minsyms.c (find_solib_trampoline_target): Update.
330 * maint.c (maintenance_info_sections)
331 (maintenance_translate_address, count_symtabs_and_blocks):
333 * main.c (captured_main_1): Update.
334 * linux-thread-db.c (try_thread_db_load_from_pdir)
335 (has_libpthread): Update.
336 * linespec.c (iterate_over_all_matching_symtabs)
337 (search_minsyms_for_name): Update.
338 * jit.c (jit_find_objf_with_entry_addr): Update.
339 * hppa-tdep.c (find_unwind_entry)
340 (hppa_lookup_stub_minimal_symbol): Update.
341 * gcore.c (gcore_create_callback, objfile_find_memory_regions):
343 * elfread.c (elf_gnu_ifunc_resolve_by_cache)
344 (elf_gnu_ifunc_resolve_by_got): Update.
345 * dwarf2-frame.c (dwarf2_frame_find_fde): Update.
346 * dwarf-index-write.c (save_gdb_index_command): Update.
347 * cp-support.c (add_symbol_overload_list_qualified): Update.
348 * breakpoint.c (create_overlay_event_breakpoint)
349 (create_longjmp_master_breakpoint)
350 (create_std_terminate_master_breakpoint)
351 (create_exception_master_breakpoint): Update.
352 * blockframe.c (find_pc_partial_function): Update.
353 * ada-lang.c (ada_lookup_simple_minsym, add_nonlocal_symbols)
354 (ada_collect_symbol_completion_matches)
355 (ada_add_global_exceptions): Update.
357 2019-01-17 Tom Tromey <tom@tromey.com>
359 * solib-target.c (lm_info_target_p): Remove typedef. Don't
361 (solib_target_parse_libraries): Change return type.
362 (library_list_start_segment, library_list_start_section)
363 (library_list_end_library, library_list_start_library); Update.
364 (solib_target_free_library_list): Remove.
365 (solib_target_parse_libraries): Remove cleanup. Change return
367 (solib_target_current_sos): Update.
369 2019-01-17 Tom Tromey <tromey@bapiya>
371 * valprint.c: Replace "the the" with "the".
372 * symtab.c: Replace "the the" with "the".
373 * solib.c: Replace "the the" with "the".
374 * solib-dsbt.c: Replace "the the" with "the".
375 * linespec.c: Replace "the the" with "the".
376 * dwarf2loc.h: Replace "the the" with "the".
377 * amd64-windows-tdep.c: Replace "the the" with "the".
378 * aarch64-tdep.c: Replace "the the" with "the".
380 2019-01-16 Keith Seitz <keiths@redhat.com>
383 * dwarf2read.c (dwarf2_cu) <ancestor>: New field.
384 <builder>: Rename to ..
385 <m_builder>: ... this and make private.
386 (dwarf2_cu::get_builder): New method. Change all users of
387 `builder' to use this method.
388 (dwarf2_start_symtab): Move to ...
389 (dwarf2_cu::start_symtab): ... here. Update all callers
390 (setup_type_unit_groups): Move to ...
391 (dwarf2_cu::setup_type_unit_groups): ... here. Update all
393 (dwarf2_cu::reset_builder): New method.
394 (process_full_compunit, process_full_type_unit): Use
395 dwarf2_cu::reset_builder.
396 (follow_die_offset): Record the ancestor CU if it is different
397 from the followed DIE's CU.
398 (follow_die_sig_1): Likewise.
400 2019-01-15 Tom Tromey <tom@tromey.com>
402 * remote.c (class remote_state) <buf>: Now a char_vector.
404 (remote_target::getpkt): Change type of buf. Remove sizeof_buf
406 (remote_target::getpkt_or_notif_sane_1)
407 (remote_target::getpkt_sane)
408 (remote_target::getpkt_or_notif_sane): Likewise.
409 (class remote_target) <putpkt>: New overload.
410 (remote_target::read_frame): Change type of "buf_p". Remove
412 (packet_ok): New overload.
413 (packet_check_result): New overload.
416 2019-01-14 Tom Tromey <tom@tromey.com>
418 * remote-notif.c (handle_notification, remote_notif_ack)
419 (remote_notif_parse): Make "buf" const.
420 * remote-notif.h (struct notif_client) <parse, ack>: Make "buf"
422 (remote_notif_parse, remote_notif_ack, handle_notification):
424 * remote.c (remote_notif_stop_parse): Make "buf" const.
425 (remote_target::remote_parse_stop_reply): Make "buf" const.
426 (remote_notif_stop_ack): Make "buf" const.
428 2019-01-14 Tom Tromey <tom@tromey.com>
430 * remote.c (remote_console_output): Make parameter const.
432 2019-01-14 Tom Tromey <tom@tromey.com>
434 * target-debug.h (target_debug_print_signals): Constify.
435 * nto-procfs.c (nto_procfs_target::pass_signals): Update.
436 * procfs.c (procfs_target::pass_signals): Update.
437 * linux-nat.c (linux_nat_target::pass_signals): Update.
438 * linux-nat.h (class linux_nat_target) <pass_signals>: Update.
439 * target-delegates.c: Rebuild.
440 * remote.c (remote_target::program_signals): Update.
441 (remote_target::pass_signals): Update.
442 * target.c (target_pass_signals): Constify argument.
443 (target_program_signals): Likewise.
444 * target.h (struct target_ops) <pass_signals, program_signals>:
446 (target_pass_signals, target_program_signals): Constify argument.
448 2019-01-14 Tom Tromey <tom@tromey.com>
451 * tui/tui-io.c (gdb_wgetch): Print \r when needed.
453 2019-01-14 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
455 * ppc-tdep.h (struct gdbarch_tdep) <ppc_v0_alias_regnum>: New
457 * rs6000-tdep.c: Include reggroups.h.
458 (IS_V_ALIAS_PSEUDOREG): Define.
459 (rs6000_register_name): Return names for the "vX" aliases.
460 (rs6000_pseudo_register_type): Return type for the "vX" aliases.
461 (rs6000_pseudo_register_reggroup_p): Restore. Handle "vX"
462 aliases. Call default_register_reggroup_p for all other
464 (v_alias_pseudo_register_read, v_alias_pseudo_register_write):
466 (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
468 (v_alias_pseudo_register_collect): New function.
469 (rs6000_ax_pseudo_register_collect): Handle "vX" aliases.
470 (rs6000_gdbarch_init): Initialize "vX" aliases as
471 pseudo-registers. Restore registration of
472 rs6000_pseudo_register_reggroup_p with
473 set_tdesc_pseudo_register_reggroup_p.
475 2019-01-13 Max Filippov <jcmvbkbc@gmail.com>
477 * xtensa-linux-tdep.c (xtensa_linux_init_abi): Update
478 tdep->num_pseudo_regs. Add calls to set_gdbarch_num_regs and
479 set_gdbarch_num_pseudo_regs.
481 2019-01-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
483 * cli/cli-style.h (class cli_style_option): <add_setshow_commands>
484 Remove arg prefixname, add do_set and do_show.
485 Add member functions set_list and show_list.
486 * cli/cli-style.c (class cli_style_option): Update accordingly.
487 (style_set_list): Move to file scope.
488 (style_show_list): Likewise.
489 (set_style): Call help_list.
490 (show_style): Call cmd_show_list.
491 (_initialize_cli_style): New macro STYLE_ADD_SETSHOW_COMMANDS.
492 Update to use the new macro.
494 2019-10-12 Joel Brobecker <brobecker@adacore.com>
496 * ada-lang.c (_initialize_ada_language): Expand the help text
497 for the "catch exception" command.
499 2019-01-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
501 * symtab.c (matching_obj_sections): Initialize obj,
502 declare it closer to its usage.
504 2019-01-10 Tom Tromey <tom@tromey.com>
506 * thread-iter.h (inf_threads_iterator): Use next_iterator.
507 (basic_inf_threads_range): Remove.
508 (inf_threads_range, inf_non_exited_threads_range)
509 (safe_inf_threads_range): Use next_adapter.
511 2019-01-10 Keith Seitz <keiths@redhat.com>
515 * dwarf2read.c (dw2_add_symbol_to_list): Remove.
516 (fixup_go_packaging, new_symbol): Use add_symbol_to_list.
518 2019-01-10 Keith Seitz <keiths@redhat.com>
522 * dictionary.c (pending_to_vector): Remove.
523 (dict_create_hashed_1, dict_create_linear_1, dict_add_pending_1):
524 Remove _1 suffix, replacing functions of the same name. Update
526 (dict_create_hashed, dict_create_hashed_expandable)
527 (dict_create_linear, dict_create_linear_expandable, dict_free)
528 (dict_add_symbol, dict_add_pending, dict_size, dict_empty):
529 Make functions static.
531 2019-01-10 Keith Seitz <keiths@redhat.com>
535 * dictionary.h (struct dictionary): Replace declaration with
537 (dict_create_hashed, dict_create_hashed_expandable)
538 (dict_create_linear, dict_create_linear_expandable)
539 (dict_free, dict_add_symbol, dict_add_pending, dict_empty)
540 (dict_iterator_first, dict_iterator_next, dict_iter_match_first)
541 (dict_iter_match_next, dict_size): Rename to "mdict_" versions
542 taking multidictionary argument.
543 [ALL_DICT_SYMBOLS]: Update for multidictionary.
544 * block.h (struct block) <dict>: Change to multidictionary
545 and rename `multidict'.
546 * block.c, buildsym.c, jit.c, mdebugread.c, objfiles.c,
547 symmisc.c: Update all dictionary references to multidictionary.
549 2019-01-10 Keith Seitz <keiths@redhat.com>
553 * dictionary.c: Include unordered_map.
554 (pending_to_vector): New function.
555 (dict_create_hashed_1, dict_create_linear_1, dict_add_pending_1):
556 Rewrite the non-"_1" functions to take vector instead
558 (dict_create_hashed, dict_create_linear, dict_add_pending): Use the
559 "new" _1 versions of the same name.
560 (multidictionary): Define.
561 (std::hash<enum language): New definition.
562 (collate_pending_symbols_by_language, mdict_create_hashed)
563 (mdict_create_hashed_expandable, mdict_create_linear)
564 (mdict_create_linear_expandable, mdict_free)
565 (find_language_dictionary, create_new_language_dictionary)
566 (mdict_add_symbol, mdict_add_pending, mdict_iterator_first)
567 (mdict_iterator_next, mdict_iter_match_first, mdict_iter_match_next)
568 (mdict_size, mdict_empty): New functions.
569 * dictionary.h (mdict_iterator): Define.
571 2019-01-10 Pedro Alves <palves@redhat.com>
573 * breakpoint.c (read_uploaded_action)
574 (create_tracepoint_from_upload): Adjust to use
575 gdb::unique_xmalloc_ptr.
576 * ctf.c (ctf_write_uploaded_tp):
577 (SET_ARRAY_FIELD): Use emplace_back.
578 (SET_STRING_FIELD): Adjust to use gdb::unique_xmalloc_ptr.
579 * tracefile-tfile.c (tfile_write_uploaded_tp):
580 * tracepoint.c (parse_tracepoint_definition): Adjust to use
581 gdb::unique_xmalloc_ptr.
582 * tracepoint.h (struct uploaded_tp) <cond, actions, step_actions,
583 at_string, cond_string, cmd_strings>: Replace char pointers
584 with gdb::unique_xmalloc_ptr.
586 2019-01-10 Pedro Alves <palves@redhat.com>
588 * solib-target.c (library_list_start_library): Don't xstrdup name.
590 2019-01-10 Pedro Alves <palves@redhat.com>
592 * mdebugread.c (parse_partial_symbols): Use
593 gdb::unique_xmalloc_ptr to manage heap-allocated 'stabsstring'.
595 2019-01-10 Andrew Burgess <andrew.burgess@embecosm.com>
597 * linux-fork.c (scoped_switch_fork_info)
598 <~scoped_switch_fork_info>: Fix incorrect variable name.
600 2019-01-10 Andrew Burgess <andrew.burgess@embecosm.com>
602 * linux-fork.c (scoped_switch_fork_info)
603 <scoped_switch_fork_info>: Make explicit.
604 <~scoped_switch_fork_info>: Wrap core in TRY/CATCH.
606 2019-01-10 Tom Tromey <tom@tromey.com>
608 * objfiles.h (objfile::reset_psymtabs): Update.
609 * objfiles.c (objfile::objfile): Update.
610 * psymtab.h (psymtab_storage::obstack): Update.
611 (psymtab_storage::m_obstack): Use gdb::optional.
612 (class psymtab_storage): Update comment. Remove objfile
614 * psymtab.c (psymtab_storage::psymtab_storage): Update.
616 2019-01-10 Tom Tromey <tom@tromey.com>
618 * psymtab.h (psymtab_storage::allocate_psymtab): New method.
619 <free_psymtabs>: Now private.
620 * psymtab.c (psymtab_storage::allocate_psymtab): Implement.
621 (allocate_psymtab): Use new method.
623 2019-01-10 Tom Tromey <tom@tromey.com>
625 * xcoffread.c (xcoff_end_psymtab): Use allocate_dependencies.
626 * psymtab.h (psymtab_storage::allocate_dependencies): New method.
627 * mdebugread.c (parse_partial_symbols): Use
628 allocate_dependencies.
629 * dwarf2read.c (dwarf2_create_include_psymtab): Use
630 allocate_dependencies.
631 (process_psymtab_comp_unit_reader)
632 (build_type_psymtab_dependencies): Likewise.
633 * dbxread.c (dbx_end_psymtab): Use allocate_dependencies.
635 2019-01-10 Tom Tromey <tom@tromey.com>
637 * psymtab.c (add_psymbol_to_bcache): Pass psymtab obstack to
638 PSYMBOL_SET_LANGUAGE.
639 (allocate_psymtab): Allocate psymtab on the psymtab obstack.
641 2019-01-10 Tom Tromey <tom@tromey.com>
643 * psymtab.h (psymtab_storage::obstack): New method.
644 <m_obstack>: Rename from obstack; now private.
645 * psymtab.c (psymtab_storage): Update.
646 * dwarf2read.c (create_addrmap_from_index)
647 (create_addrmap_from_aranges, dwarf2_build_psymtabs_hard):
650 2019-01-10 Tom Tromey <tom@tromey.com>
652 * symfile.c (reread_symbols): Call objfile->reset_psymtabs.
653 * objfiles.h (objfile::reset_psymtabs): New method.
655 2019-01-10 Tom Tromey <tom@tromey.com>
657 * symmisc.c (print_symbol_bcache_statistics): Update.
658 (print_objfile_statistics): Update.
659 * symfile.c (reread_symbols): Update.
660 * psymtab.h (class psymtab_storage): New.
661 * psymtab.c (psymtab_storage): New constructor.
662 (~psymtab_storage): New destructor.
663 (require_partial_symbols): Update.
664 (ALL_OBJFILE_PSYMTABS_REQUIRED): Rewrite.
665 (find_pc_sect_psymtab, find_pc_sect_psymbol)
666 (match_partial_symbol, lookup_partial_symbol, dump_psymtab)
667 (psym_dump, recursively_search_psymtabs, psym_has_symbols)
668 (psym_find_compunit_symtab_by_address, sort_pst_symbols)
669 (start_psymtab_common, end_psymtab_common)
670 (add_psymbol_to_bcache, add_psymbol_to_list, init_psymbol_list)
671 (allocate_psymtab): Update.
672 (psymtab_storage::discard_psymtab): Rename from discard_psymtab.
674 (dump_psymtab_addrmap, maintenance_print_psymbols)
675 (maintenance_check_psymtabs): Update.
676 (class objfile_psymtabs): Move to objfiles.h.
677 * psympriv.h (discard_psymtab): Now inline.
678 (psymtab_discarder::psymtab_discarder): Update.
679 (psymtab_discarder::~psymtab_discarder): Update.
680 (ALL_OBJFILE_PSYMTABS): Rewrite.
681 * objfiles.h (struct objfile) <psymtabs, psymtabs_addrmap,
682 free_psymtabs, psymbol_cache, global_psymbols, static_psymbols>:
684 <partial_symtabs>: New field.
685 (class objfile_psymtabs): Move from psymtab.h. Update.
686 * objfiles.c (objfile::objfile): Initialize partial_symtabs, not
688 (objfile::~objfile): Don't destroy psymbol_cache.
689 * mdebugread.c (parse_partial_symbols): Update.
690 * dwarf2read.c (create_addrmap_from_index)
691 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
692 (process_psymtab_comp_unit_reader, dwarf2_build_psymtabs_hard)
693 (add_partial_subprogram, dwarf2_ranges_read): Update.
694 * dwarf-index-write.c (write_address_map)
695 (write_one_signatured_type, recursively_write_psymbols)
696 (class debug_names, class debug_names, write_psymtabs_to_index):
699 2019-01-10 Tom Tromey <tom@tromey.com>
701 * symtab.h (SYMBOL_SET_NAMES): Update.
702 (symbol_set_names): Update.
703 (MSYMBOL_SET_NAMES): Update.
704 * symtab.c (symbol_set_names): Change argument to be an
705 objfile_per_bfd_storage.
706 * psymtab.c (add_psymbol_to_bcache): Update.
707 * psympriv.h (PSYMBOL_SET_NAMES): Take per_bfd argument.
709 2019-01-10 Tom Tromey <tom@tromey.com>
711 * symtab.c (create_demangled_names_hash): Change argument to be an
712 objfile_per_bfd_storage.
713 (symbol_set_names): Update.
715 2019-01-10 Tom Tromey <tom@tromey.com>
717 * xcoffread.c (xcoff_initial_scan): Unconditionally call
719 * psymtab.c (init_psymbol_list): Do nothing if already called.
720 * psympriv.h (init_psymbol_list): Add comment.
721 * dwarf2read.c (dwarf2_build_psymtabs): Unconditionally call
723 * dbxread.c (dbx_symfile_read): Unconditionally call
726 2019-01-10 Tom Tromey <tom@tromey.com>
728 * xcoffread.c (scan_xcoff_symtab): Update.
729 * psymtab.c (add_psymbol_to_list): Replace "list" parameter with
731 * mdebugread.c (parse_partial_symbols)
732 (handle_psymbol_enumerators): Update.
733 * dwarf2read.c (add_partial_symbol, load_partial_dies): Update.
734 * dbxread.c (read_dbx_symtab): Update.
735 * psympriv.h (psymbol_placement): New enum.
736 (add_psymbol_to_list): Update.
738 2019-01-10 Tom Tromey <tom@tromey.com>
740 * xcoffread.c (xcoff_start_psymtab): Remove global_psymbols and
741 static_psymbols parameters.
742 (scan_xcoff_symtab): Update.
743 * psymtab.c (start_psymtab_common): Remove global_psymbols and
744 static_psymbols parameters.
745 * psympriv.h (start_psymtab_common): Update.
746 * mdebugread.c (parse_partial_symbols): Update.
747 * dwarf2read.c (create_partial_symtab): Update.
748 * dbxread.c (read_dbx_symtab): Update.
749 (start_psymtab): Remove global_psymbols and static_psymbols
752 2019-01-10 Tom Tromey <tom@tromey.com>
754 * xcoffread.c (xcoff_end_psymtab): Remove some initializations.
755 * psymtab.c (allocate_psymtab): Add comment.
756 * psympriv.h (allocate_psymtab): Add comment.
757 * dwarf2read.c (dwarf2_create_include_psymtab): Remove some
759 * dbxread.c (dbx_end_psymtab): Remove some initializations.
761 2019-01-10 Tom Tromey <tom@tromey.com>
763 * symfile.h (mdebug_build_psymtabs, elfmdebug_build_psymtabs):
765 * mipsread.c: Include mdebugread.h.
766 * mdebugread.h (mdebug_build_psymtabs, elfmdebug_build_psymtabs):
768 * elfread.c: Include mdebugread.h.
770 2019-01-09 Tom Tromey <tom@tromey.com>
772 * dbxread.c (dbx_end_psymtab): Use objfile_psymtabs.
773 * mdebugread.c (parse_partial_symbols): Use objfile_psymtabs.
774 * psymtab.c (ALL_OBJFILE_PSYMTABS_REQUIRED): Remove.
775 (psym_map_symtabs_matching_filename, find_pc_sect_psymtab)
776 (psym_lookup_symbol, psym_find_last_source_symtab)
777 (psym_forget_cached_source_info, psym_print_stats)
778 (psym_expand_symtabs_for_function, psym_expand_all_symtabs)
779 (psym_expand_symtabs_with_fullname, psym_map_symbol_filenames)
780 (psym_map_matching_symbols, psym_expand_symtabs_matching)
781 (psym_find_compunit_symtab_by_address)
782 (maintenance_print_psymbols, maintenance_info_psymtabs)
783 (maintenance_check_psymtabs): Use ranged for.
784 * psymtab.h (class objfile_psymtabs): New.
785 (require_partial_symbols): Return objfile_psymtabs.
786 * psympriv.h (ALL_OBJFILE_PSYMTABS): Remove.
788 2019-01-09 Tom Tromey <tom@tromey.com>
790 * symfile.c (overlay_invalidate_all, find_pc_overlay)
791 (find_pc_mapped_section, list_overlays_command)
792 (map_overlay_command, unmap_overlay_command)
793 (simple_overlay_update): Use all_objfiles.
794 * spu-tdep.c (spu_overlay_update): Use all_objfiles.
795 * printcmd.c (info_symbol_command): Use all_objfiles.
796 * objfiles.h (ALL_OBJSECTIONS): Remove.
797 * maint.c (maintenance_translate_address): Use all_objfiles.
798 * gcore.c (gcore_create_callback): Use all_objfiles.
799 (objfile_find_memory_regions): Likewise.
801 2019-01-09 Tom Tromey <tom@tromey.com>
803 * symtab.c (find_line_symtab, info_sources_command)
804 (make_source_files_completion_list): Use objfile_compunits.
805 * source.c (select_source_symtab): Use objfile_compunits.
806 * objfiles.h (struct objfile): Update comment.
807 (ALL_OBJFILES): Remove.
808 (ALL_FILETABS): Remove.
809 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Use
812 2019-01-09 Tom Tromey <tom@tromey.com>
814 * symmisc.c (print_objfile_statistics, dump_objfile)
815 (maintenance_print_symbols): Use compunit_filetabs.
816 * source.c (forget_cached_source_info_for_objfile): Use
818 * objfiles.h (ALL_OBJFILE_FILETABS): Remove.
819 (ALL_FILETABS): Use compunit_filetabs.
820 * objfiles.c (objfile_relocate1): Use compunit_filetabs.
821 * coffread.c (coff_symtab_read): Use compunit_filetabs.
823 2019-01-09 Tom Tromey <tom@tromey.com>
825 * symtab.h (ALL_COMPUNIT_FILETABS): Remove.
826 (compunit_filetabs): New.
827 * symtab.c (iterate_over_some_symtabs, find_pc_sect_line): Use
829 (info_sources_command, make_source_files_completion_list): Remove
831 * symmisc.c (print_objfile_statistics, dump_objfile)
832 (maintenance_print_symbols): Remove declaration.
833 (maintenance_info_symtabs): Use compunit_filetabs.
834 (maintenance_info_line_tables): Likewise.
835 * source.c (select_source_symtab): Change local variable name.
836 (forget_cached_source_info_for_objfile): Remove declaration.
837 * objfiles.h (ALL_OBJFILE_FILETABS): Use compunit_filetabs.
838 * objfiles.c (objfile_relocate1): Remove declaration.
839 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Remove
841 * maint.c (count_symtabs_and_blocks): Use compunit_filetabs.
842 * coffread.c (coff_symtab_read): Remove declaration.
843 * buildsym.c (buildsym_compunit::end_symtab_with_blockvector): Use
846 2019-01-09 Tom Tromey <tom@tromey.com>
848 * symtab.c (lookup_objfile_from_block)
849 (find_pc_sect_compunit_symtab, search_symbols)
850 (default_collect_symbol_completion_matches_break_on): Use
852 * objfiles.h (ALL_COMPUNITS): Remove.
853 * maint.c (count_symtabs_and_blocks): Use objfile_compunits.
854 * cp-support.c (add_symbol_overload_list_qualified): Use
856 * ada-lang.c (ada_collect_symbol_completion_matches)
857 (ada_add_global_exceptions): Use objfile_compunits.
859 2019-01-09 Tom Tromey <tom@tromey.com>
861 * source.c (select_source_symtab)
862 (forget_cached_source_info_for_objfile): Remove declaration.
863 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Remove
865 * maint.c (count_symtabs_and_blocks): Remove declaration.
866 * cp-support.c (add_symbol_overload_list_qualified): Remove
868 * coffread.c (coff_symtab_read): Remove declaration.
869 * symtab.c (lookup_symbol_in_objfile_symtabs)
870 (basic_lookup_transparent_type_1): Use objfile_compunits.
871 (lookup_objfile_from_block, find_pc_sect_compunit_symtab)
872 (info_sources_command, search_symbols)
873 (default_collect_symbol_completion_matches_break_on)
874 (make_source_files_completion_list): Remove declaration.
875 * ada-lang.c (add_nonlocal_symbols): Use objfile_compunits.
876 (ada_collect_symbol_completion_matches)
877 (ada_add_global_exceptions): Remove declaration.
878 * linespec.c (iterate_over_all_matching_symtabs): Use
880 * objfiles.h (ALL_OBJFILE_COMPUNITS): Remove.
881 (class objfile_compunits): New.
882 (ALL_COMPUNITS): Use objfile_compunits.
883 * symmisc.c (print_objfile_statistics, maintenance_info_symtabs)
884 (maintenance_check_symtabs, maintenance_info_line_tables): Use
886 * objfiles.c (objfile_relocate1): Use objfile_compunits.
888 2019-01-09 Tom Tromey <tom@tromey.com>
890 * symtab.c (search_symbols)
891 (default_collect_symbol_completion_matches_break_on): Use
893 * ada-lang.c (ada_lookup_simple_minsym)
894 (ada_collect_symbol_completion_matches): Use objfile_msymbols.
895 * minsyms.c (find_solib_trampoline_target): Use objfile_msymbols.
896 * hppa-tdep.c (hppa_lookup_stub_minimal_symbol): Use
898 * coffread.c (coff_symfile_read): Use objfile_msymbols.
899 * symmisc.c (dump_msymbols): Use objfile_msymbols.
900 * objc-lang.c (find_methods): Use objfile_msymbols.
901 (info_selectors_command, info_classes_command): Likewise.
902 * stabsread.c (scan_file_globals): Use objfile_msymbols.
903 * objfiles.h (class objfile_msymbols): New.
904 (ALL_OBJFILE_MSYMBOLS): Remove.
905 (ALL_MSYMBOLS): Remove.
907 2019-01-09 Tom Tromey <tom@tromey.com>
909 * common/next-iterator.h (next_adapter): Add Iterator template
911 * objfiles.h (ALL_OBJFILES_SAFE): Remove.
912 (class all_objfiles_safe): New.
913 * jit.c (jit_inferior_exit_hook): Use all_objfiles_safe.
914 * objfiles.c (put_objfile_before): Update comment.
915 (add_separate_debug_objfile): Likewise.
916 (free_all_objfiles): Use all_objfiles_safe.
917 (objfile_purge_solibs): Likewise.
919 2019-01-09 Tom Tromey <tom@tromey.com>
921 * symtab.c (iterate_over_symtabs, matching_obj_sections)
922 (expand_symtab_containing_pc, lookup_static_symbol)
923 (basic_lookup_transparent_type, find_pc_sect_compunit_symtab)
924 (find_symbol_at_address, find_line_symtab, find_main_name): Use
926 * probe.c (find_probe_by_pc, collect_probes): Use all_objfiles.
927 * breakpoint.c (create_overlay_event_breakpoint)
928 (create_longjmp_master_breakpoint)
929 (create_std_terminate_master_breakpoint)
930 (create_exception_master_breakpoint): Use all_objfiles.
931 * linux-thread-db.c (try_thread_db_load_from_pdir)
932 (has_libpthread): Use all_objfiles.
933 * ada-lang.c (add_nonlocal_symbols): Use all_objfiles.
934 * linespec.c (iterate_over_all_matching_symtabs)
935 (search_minsyms_for_name): Use all_objfiles.
936 * maint.c (maintenance_info_sections): Use all_objfiles.
937 * main.c (captured_main_1): Use all_objfiles.
938 * spu-tdep.c (spu_objfile_from_frame): Use all_objfiles.
939 * guile/scm-objfile.c (gdbscm_objfiles): Use all_objfiles.
940 * guile/scm-pretty-print.c
941 (ppscm_find_pretty_printer_from_objfiles): Use all_objfiles.
942 * solib-spu.c (append_ocl_sos): Use all_objfiles.
943 * symmisc.c (maintenance_print_symbols): Use all_objfiles.
944 (maintenance_print_msymbols): Use all_objfiles.
945 * source.c (select_source_symtab): Use all_objfiles.
946 * jit.c (jit_find_objf_with_entry_addr): Use all_objfiles.
947 * symfile.c (remove_symbol_file_command)
948 (expand_symtabs_matching, map_symbol_filenames): Use
950 * ppc-linux-tdep.c (ppc_linux_spe_context_inferior_created): Use
952 * dwarf2-frame.c (dwarf2_frame_find_fde): Use all_objfiles.
953 * objc-lang.c (find_methods): Use all_objfiles.
954 * objfiles.c (have_partial_symbols, have_full_symbols)
955 (have_minimal_symbols, qsort_cmp)
956 (default_iterate_over_objfiles_in_search_order): Use
958 * hppa-tdep.c (find_unwind_entry): Use all_objfiles.
959 * psymtab.c (maintenance_print_psymbols): Use all_objfiles.
960 (maintenance_check_psymtabs): Use all_objfiles.
961 (ALL_PSYMTABS): Remove.
962 * compile/compile-object-run.c (do_module_cleanup): Use
964 * blockframe.c (find_pc_partial_function): Use all_objfiles.
965 * cp-support.c (add_symbol_overload_list_qualified): Use
967 * windows-tdep.c (windows_iterate_over_objfiles_in_search_order):
969 * dwarf-index-write.c (save_gdb_index_command): Use all_objfiles.
970 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): Use
972 * python/py-objfile.c (objfpy_lookup_objfile_by_name)
973 (objfpy_lookup_objfile_by_build_id): Use all_objfiles.
974 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
976 * solib.c (solib_read_symbols): Use all_objfiles
978 2019-01-09 Tom Tromey <tom@tromey.com>
980 * probe.c (parse_probes_in_pspace): Use all_objfiles.
981 * guile/scm-progspace.c (gdbscm_progspace_objfiles): Use
983 * objfiles.h (ALL_PSPACE_OBJFILES): Remove.
984 * symmisc.c (print_symbol_bcache_statistics)
985 (print_objfile_statistics, maintenance_print_objfiles)
986 (maintenance_info_symtabs, maintenance_check_symtabs)
987 (maintenance_expand_symtabs, maintenance_info_line_tables): Use
989 * source.c (forget_cached_source_info): Use all_objfiles.
990 * symfile-debug.c (set_debug_symfile): Use all_objfiles.
991 * elfread.c (elf_gnu_ifunc_resolve_by_cache)
992 (elf_gnu_ifunc_resolve_by_got): Use all_objfiles.
993 * objfiles.c (update_section_map): Use all_objfiles.
994 (shared_objfile_contains_address_p): Likewise.
995 * psymtab.c (maintenance_info_psymtabs): Use all_objfiles.
996 * python/py-progspace.c (pspy_get_objfiles): Use all_objfiles.
998 2019-01-09 Tom Tromey <tom@tromey.com>
1000 * common/next-iterator.h: New file.
1001 * objfiles.h (class all_objfiles): New.
1002 (struct objfile_iterator): New.
1004 2019-01-09 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1006 * NEWS: Move the description of the changed "frame", "select-frame",
1007 and "info frame" commands to the Changed commands section.
1009 2019-01-09 Simon Marchi <simon.marchi@ericsson.com>
1011 * gdbtypes.c (check_stub_method_group): Remove handling of old
1013 * linespec.c (find_methods): Likewise.
1014 * stabsread.c (read_member_functions): Likewise.
1015 * valops.c (search_struct_method): Likewise.
1016 (value_struct_elt_for_reference): Likewise.
1017 * NEWS: Mention this change.
1019 2019-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
1021 * cli/cli-cmds.c (list_command): Pass a source_lines_range to
1023 * source.c (print_source_lines_base): Update line number check.
1024 (print_source_lines): New function.
1025 (source_lines_range::source_lines_range): New function.
1026 * source.h (class source_lines_range): New class.
1027 (print_source_lines): New declaration.
1029 2019-01-09 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1031 * linespec.c (linespec_state_destructor): Free self->canonical_names.
1033 2019-01-08 Tom Tromey <tom@tromey.com>
1034 Simon Marchi <simon.marchi@ericsson.com>
1037 * ada-exp.y (DOLLAR_VARIABLE): Rename from SPECIAL_VARIABLE.
1038 * ada-lex.l (DOLLAR_VARIABLE): Likewise.
1039 * c-exp.y (DOLLAR_VARIABLE): Rename from VARIABLE.
1040 * f-exp.y (DOLLAR_VARIABLE): Likewise.
1041 * m2-exp.y (DOLLAR_VARIABLE): Rename from INTERNAL_VAR.
1042 * p-exp.y (DOLLAR_VARIABLE): Rename from VARIABLE.
1044 2019-01-08 Andrew Burgess <andrew.burgess@embecosm.com>
1046 * source.c (select_source_symtab): Move header comment to
1047 declaration in source.h.
1048 (forget_cached_source_info_for_objfile): Likewise.
1049 (forget_cached_source_info): Likewise.
1050 (identify_source_line): Likewise.
1051 * source.h (identify_source_line): Move declaration from symtab.h
1052 and add comment from source.c
1053 (print_source_lines): Likewise.
1054 (forget_cached_source_info_for_objfile): Likewise.
1055 (forget_cached_source_info): Likewise.
1056 (select_source_symtab): Likewise.
1057 (enum print_source_lines_flag): Move definition from symtab.h.
1058 * symtab.h (identify_source_line): Move declaration to source.h.
1059 (print_source_lines): Likewise.
1060 (forget_cached_source_info_for_objfile): Likewise.
1061 (forget_cached_source_info): Likewise.
1062 (select_source_symtab): Likewise.
1063 (enum print_source_lines_flag): Move definition to source.h.
1064 * tui/tui-hooks.c: Add 'source.h' include.
1066 2019-01-08 Andrew Burgess <andrew.burgess@embecosm.com>
1068 * source.c (print_source_lines_base): Handle requests to print
1069 reverse line number sequences, and guard against empty lines
1072 2019-01-08 Andrew Burgess <andrew.burgess@embecosm.com>
1074 * source.c (print_source_lines_base): Fix skip of '\r' if next
1077 2019-01-06 Tom Tromey <tom@tromey.com>
1079 * c-exp.y (struct c_parse_state) <macro_original_text,
1080 expansion_obstack>: New member.
1081 (macro_original_text, expansion_obstack): Remove globals.
1082 (scan_macro_expansion, scanning_macro_expansion)
1083 (finished_macro_expansion): Update.
1084 (scan_macro_cleanup): Remove.
1085 (yylex, c_parse): Update.
1087 2019-01-06 Tom Tromey <tom@tromey.com>
1089 * c-exp.y (struct c_parse_state) <strings>: New member.
1090 (operator_stoken): Update.
1092 2019-01-06 Tom Tromey <tom@tromey.com>
1094 * parser-defs.h (type_ptr): Remove typedef. Don't declare VEC.
1095 (union type_stack_elt) <typelist_val>: Now a pointer to
1097 (type_stack_cleanup): Don't declare.
1098 (push_typelist): Update.
1099 * parse.c (pop_typelist): Return a std::vector.
1100 (push_typelist): Take a std::vector.
1101 (follow_types): Update. Do not free args.
1102 (type_stack_cleanup): Remove.
1103 * c-exp.y (struct c_parse_state): New.
1104 (cpstate): New global.
1105 (type_aggregate_p, exp, ptr_operator, parameter_typelist)
1106 (nonempty_typelist): Update.
1107 (func_mod): Create a new vector.
1108 (c_parse): Create a c_parse_state.
1109 (check_parameter_typelist): Do not delete params.
1110 (function_method): Update. Do not delete type_list.
1112 2019-01-06 Tom Tromey <tom@tromey.com>
1115 * python/py-finishbreakpoint.c (bpfinishpy_init): Use
1117 * infcmd.c (finish_command_fsm_should_stop): Use check_typedef.
1118 (print_return_value): Likewise.
1120 2019-01-05 Tom Tromey <tom@tromey.com>
1122 * contrib/cleanup_check.py: Remove.
1123 * contrib/gcc-with-excheck: Remove.
1124 * contrib/exsummary.py: Remove.
1125 * contrib/excheck.py: Remove.
1127 2019-01-05 Joel Brobecker <brobecker@adacore.com>
1129 * thread.c (delete_thread_1): Add gdb_assert that THR is not
1130 NULL. Initialize tpprev to NULL instead of assigning it
1131 to NULL on the next statement.
1132 * windows-nat.c (windows_delete_thread): Remove check for
1133 main_thread_id before printing thread exit notifications.
1134 (get_windows_debug_event) <EXIT_THREAD_DEBUG_EVENT>:
1135 Remove thread ID check against main_thread_id.
1136 <CREATE_PROCESS_DEBUG_EVENT>: Remove call to
1137 windows_delete_thread.
1138 <EXIT_PROCESS_DEBUG_EVENT>: Add call to windows_delete_thread.
1140 2019-01-04 Tom Tromey <tom@tromey.com>
1142 * compile/compile.c (_initialize_compile): Use upper case for
1143 metasyntactic variables.
1144 * symmisc.c (_initialize_symmisc): Use upper case for
1145 metasyntactic variables.
1146 * psymtab.c (_initialize_psymtab): Use upper case for
1147 metasyntactic variables.
1148 * demangle.c (demangle_command): Use upper case for metasyntactic
1150 (_initialize_demangler): Likewise.
1151 * ax-gdb.c (_initialize_ax_gdb): Use upper case for metasyntactic
1154 2019-01-03 Tom Tromey <tom@tromey.com>
1156 * tui/tui-source.c (tui_set_source_content): Use xstrdup.
1158 2019-01-03 Tom Tromey <tom@tromey.com>
1160 * python/py-symtab.c (salpy_str): Update.
1161 (struct salpy_sal_object) <symtab>: Now a PyObject.
1162 (salpy_dealloc): Update.
1163 (del_objfile_sal): Use gdbpy_ref.
1165 2019-01-03 Tom Tromey <tom@tromey.com>
1167 * python/py-type.c (convert_field): Use new_reference. Return
1169 (make_fielditem): Return gdbpy_ref.
1170 (typy_fields): Update.
1171 (typy_getitem): Update.
1172 (field_name): Return gdbpy_ref. Use new_reference.
1173 (typy_iterator_iternext): Update.
1175 2019-01-03 Tom Tromey <tom@tromey.com>
1177 * python/py-record.c (gdbpy_stop_recording): Use Py_RETURN_NONE.
1179 2019-01-03 Tom Tromey <tom@tromey.com>
1181 * python/py-value.c (valpy_dealloc): Use Py_XDECREF.
1182 * python/py-type.c (typy_fields_items): Use gdbpy_ref.
1183 * python/py-progspace.c (pspy_set_printers): Use gdbpy_ref.
1184 (pspy_set_frame_filters, pspy_set_frame_unwinders)
1185 (pspy_set_type_printers): Likewise.
1186 * python/py-function.c (fnpy_init): Use gdbpy_ref.
1187 * python/py-cmd.c (cmdpy_init): Use gdbpy_ref.
1188 * python/py-objfile.c (objfpy_set_printers): Use gdbpy_ref.
1189 (objfpy_set_frame_filters, objfpy_set_frame_unwinders)
1190 (objfpy_set_type_printers): Likewise.
1192 2019-01-03 Tom Tromey <tom@tromey.com>
1194 * python/python.c (gdbpy_enter, ~gdbpy_enter): Update.
1195 (gdbpy_print_stack): Use gdbpy_err_fetch.
1196 * python/python-internal.h (class gdbpy_err_fetch): New class.
1197 (class gdbpy_enter) <m_error_type, m_error_value,
1198 m_error_traceback>: Remove.
1199 <m_error>: New member.
1200 (gdbpy_exception_to_string): Don't declare.
1201 * python/py-varobj.c (py_varobj_iter_next): Use gdbpy_err_fetch.
1202 * python/py-value.c (convert_value_from_python): Use
1204 * python/py-utils.c (gdbpy_err_fetch::to_string): Rename from
1205 gdbpy_exception_to_string.
1206 (gdbpy_handle_exception): Use gdbpy_err_fetch.
1207 * python/py-prettyprint.c (print_stack_unless_memory_error): Use
1210 2019-01-03 Andrew Burgess <andrew.burgess@embecosm.com>
1212 * linux-nat.c (delete_lwp_cleanup): Delete.
1213 (struct lwp_deleter): New struct.
1214 (lwp_info_up): New typedef.
1215 (linux_nat_target::follow_fork): Delete cleanup, and make use of
1218 2019-01-03 Andrew Burgess <andrew.burgess@embecosm.com>
1220 * linux-fork.c (class scoped_switch_fork_info): New class.
1221 (inferior_call_waitpid): Update to use scoped_switch_fork_info.
1223 2019-01-03 Andrew Burgess <andrew.burgess@embecosm.com>
1225 * valops.c (find_overload_match): Remove use of null_cleanup, and
1226 calls to do_cleanups.
1228 2019-01-03 Andrew Burgess <andrew.burgess@embecosm.com>
1230 * compile/compile-cplus-types.c
1231 (compile_cplus_instance::decl_name): Handle changes to
1233 * cp-support.c (cp_func_name): Update header comment, update
1235 * cp-support.h (cp_func_name): Update return type in declaration.
1236 * valops.c (find_overload_match): Move temp_func local to top
1237 level of function and change its type. Use temp_func to hold and
1238 delete temporary string obtained from cp_func_name.
1240 2019-01-03 Andrew Burgess <andrew.burgess@embecosm.com>
1242 * remote.c (remote_target::remote_check_symbols): Convert `msg` to
1243 gdb::char_vector, remove cleanup, and update uses of `msg`.
1245 2019-01-03 Jim Wilson <jimw@sifive.com>
1247 * riscv-tdep.c (riscv_freg_feature): Drop s0 name from f8.
1249 2019-01-02 Tom Tromey <tom@tromey.com>
1251 * xml-tdesc.c (xml_cache): Hold a target_desc_up.
1252 (tdesc_parse_xml): Remove cleanups.
1253 * target-descriptions.h (make_cleanup_free_target_description):
1255 (target_desc_deleter): New struct.
1256 (target_desc_up): New typedef.
1257 * target-descriptions.c (target_desc_deleter::operator()): Rename
1258 from free_target_description.
1259 (make_cleanup_free_target_description): Remove.
1261 2019-01-02 Tom Tromey <tom@tromey.com>
1263 * linespec.c (struct linespec_parser): Rename from ls_parser. Add
1264 constructor, destructor.
1265 (linespec_parser): Remove typedef.
1266 (~linespec_parser): Rename from linespec_parser_delete.
1267 (linespec_lex_to_end, linespec_complete_label)
1268 (linespec_complete): Update.
1269 (decode_line_full): Remove cleanups.
1270 (decode_line_1): Update.
1272 2019-01-02 Tom Tromey <tom@tromey.com>
1274 * python/python-internal.h (inferior_to_inferior_object): Change
1276 * python/py-exitedevent.c (create_exited_event_object): Update.
1277 * python/py-inferior.c (inferior_to_inferior_object): Return
1279 (python_new_inferior, python_inferior_deleted)
1280 (thread_to_thread_object, delete_thread_object)
1281 (build_inferior_list, gdbpy_selected_inferior): Update.
1282 * python/py-infthread.c (create_thread_object): Update. Also fail
1283 if inferior_to_inferior_object fails.
1285 2019-01-02 Simon Marchi <simon.marchi@ericsson.com>
1287 * inferior.h (class inferior) <displaced_step_state>: New field.
1288 * infrun.h (struct displaced_step_state): Move here from
1289 infrun.c. Initialize fields, add constructor.
1290 <inf>: Remove field.
1291 <reset>: New method.
1292 * infrun.c (struct displaced_step_inferior_state): Move to
1294 (displaced_step_inferior_states): Remove.
1295 (get_displaced_stepping_state): Adust.
1296 (displaced_step_in_progress_any_inferior): Adjust.
1297 (displaced_step_in_progress_thread): Adjust.
1298 (displaced_step_in_progress): Adjust.
1299 (add_displaced_stepping_state): Remove.
1300 (get_displaced_step_closure_by_addr): Adjust.
1301 (remove_displaced_stepping_state): Remove.
1302 (infrun_inferior_exit): Call displaced_step_state.reset.
1303 (use_displaced_stepping): Don't check for NULL.
1304 (displaced_step_prepare_throw): Call
1305 get_displaced_stepping_state.
1306 (displaced_step_fixup): Don't check for NULL.
1307 (prepare_for_detach): Don't check for NULL.
1309 2019-01-02 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1311 * infcall.c (call_function_by_hand_dummy): cleanup/destroy sm
1312 in case of call that did not complete.
1314 2019-01-02 Andrey Utkin <autkin@undo.io>
1316 * symfile.c (find_separate_debug_file): Fix search of debug files for
1319 2019-01-02 Tom Tromey <tom@tromey.com>
1321 * python/py-inferior.c (gdbpy_initialize_inferior): Fix
1323 * python/py-frame.c (frapy_older): Remove cast.
1324 (frapy_newer): Likewise.
1325 * python/py-breakpoint.c (local_setattro): Remove cast.
1326 * python/py-arch.c (archpy_name): Remove local variable.
1327 * python/py-type.c (gdbpy_lookup_type): Remove cast.
1329 2019-01-02 Joel Brobecker <brobecker@adacore.com>
1331 * unittests/basic_string_view/element_access/char/empty.cc:
1332 Fix year range in copyright header.
1334 2019-01-01 Andrew Burgess <andrew.burgess@embecosm.com>
1336 * arch/riscv.h (struct riscv_gdbarch_features) <hw_float_abi>:
1338 <operator==>: Update with for removed field.
1340 * riscv-tdep.h (struct gdbarch_tdep) <features>: Renamed to...
1341 <isa_features>: ...this.
1342 <abi_features>: New field.
1343 (riscv_isa_flen): Update comment.
1344 (riscv_abi_xlen): New declaration.
1345 (riscv_abi_flen): New declaration.
1346 * riscv-tdep.c (riscv_isa_xlen): Update to get answer from
1348 (riscv_abi_xlen): New function.
1349 (riscv_isa_flen): Update to get answer from isa_features.
1350 (riscv_abi_flen): New function.
1351 (riscv_has_fp_abi): Update to get answer from abi_features.
1352 (riscv_call_info::riscv_call_info): Use abi xlen and flen, not isa
1354 (riscv_call_info) <xlen, flen>: Update comment.
1355 (riscv_call_arg_struct): Remove invalid assertions
1356 (riscv_features_from_gdbarch_info): Update now hw_float_abi field
1358 (riscv_gdbarch_init): Gather isa features and abi features
1359 separately, ensure both match on the gdbarch when reusing an old
1360 gdbarch. Relax an error check to allow 32-bit abi float to run on
1361 a target with 64-bit float hardware.
1363 2019-01-01 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1365 * source.c (search_command_helper): Stop reverse search
1366 when line 1 has been searched.
1368 2019-01-01 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1370 * record-full.c (record_full_base_target::close): Rewrite
1371 record_full_core_buf_list free logic.
1373 2019-01-01 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1375 * break-catch-syscall.c (print_one_catch_syscall): xfree
1378 2019-01-01 Joel Brobecker <brobecker@adacore.com>
1380 * top.c (print_gdb_version): Update Copyright year in version
1383 2019-01-01 Joel Brobecker <brobecker@adacore.com>
1385 Update copyright year range in all GDB files.
1387 2019-01-01, 19 Joel Brobecker <brobecker@adacore.com>
1389 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2018.
1391 For older changes see ChangeLog-2018.
1397 version-control: never