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