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