c2dc2b6ba807ae91e039f9aaf6ae7aa0e5924fc5
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2020-04-24 Tom de Vries <tdevries@suse.de>
2
3 * contrib/cc-with-tweaks.sh: Remove <exec>.gdb-index file handling.
4 Run gdb-add-index inside temp dir.
5
6 2020-04-23 Tom Tromey <tromey@adacore.com>
7
8 * windows-tdep.c (is_linked_with_cygwin_dll): Always update "iter"
9 in loop.
10
11 2020-04-23 Luis Machado <luis.machado@linaro.org>
12
13 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Use
14 get_frame_register instead of gdbarch_unwind_pc.
15
16 2020-04-23 Tom de Vries <tdevries@suse.de>
17
18 * symtab.c (lookup_global_symbol): Prefer def over decl.
19
20 2020-04-23 Tom de Vries <tdevries@suse.de>
21
22 PR symtab/25807
23 * block.c (best_symbol, better_symbol): Promote to external.
24 * block.h (best_symbol, better_symbol): Declare.
25 * symtab.c (lookup_symbol_in_objfile_symtabs): Prefer def over
26 decl.
27
28 2020-04-23 Tom Tromey <tromey@adacore.com>
29
30 PR ada/25837:
31 * dwarf2/read.c (dw2_expand_symtabs_matching_symbol): Store a
32 "const char *", not a "const std::string &".
33 <name_and_matcher::operator==>: Update.
34 * unittests/lookup_name_info-selftests.c: Change type of
35 "result".
36
37 2020-04-23 Tom Tromey <tom@tromey.com>
38
39 * inferior.h (iterate_over_inferiors): Don't declare.
40 * inferior.c (iterate_over_inferiors): Remove.
41 * darwin-nat.c (find_inferior_task_it, find_inferior_pid_it):
42 Remove.
43 (darwin_find_inferior_by_task, darwin_find_inferior_by_pid): Don't
44 use iterate_over_inferiors.
45 (darwin_resume_inferior_it)
46 (struct resume_inferior_threads_param)
47 (darwin_resume_inferior_threads_it): Remove.
48 (darwin_nat_target::resume): Don't use iterate_over_inferiors.
49
50 2020-04-23 Tom de Vries <tdevries@suse.de>
51
52 * blockframe.c (find_pc_partial_function): Use
53 find_pc_sect_compunit_symtab rather than
54 objfile->sf->qf->find_pc_sect_compunit_symtab.
55
56 2020-04-22 Tom de Vries <tdevries@suse.de>
57
58 PR symtab/25764
59 * dwarf2/read.c (scan_partial_symbols): Allow external variable decls
60 in psymtabs.
61
62 2020-04-22 Tom de Vries <tdevries@suse.de>
63
64 PR symtab/25801
65 * psymtab.c (psym_map_symtabs_matching_filename): Don't skip shared
66 symtabs.
67
68 2020-04-22 Tom de Vries <tdevries@suse.de>
69
70 PR symtab/25700
71 * dwarf2/read.c (dwarf2_build_psymtabs_hard): Don't create psymtab for
72 CU if already created.
73
74 2020-04-21 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
75
76 * infrun.c (displaced_step_fixup): Switch to the event_thread
77 before calling displaced_step_restore, not after.
78
79 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
80
81 * record-btrace.c (record_btrace_enable_warn): Ignore thread if
82 its inferior is not recorded by us.
83 (record_btrace_target_open): Replace call to
84 all_non_exited_threads () with call to current_inferior
85 ()->non_exited_threads ().
86 (record_btrace_target::stop_recording): Likewise.
87 (record_btrace_target::close): Likewise.
88 (record_btrace_target::wait): Likewise.
89 (record_btrace_target::record_stop_replaying): Likewise.
90
91 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
92
93 * btrace.c (btrace_enable): Throw an error on double enables and
94 when enabling recording fails.
95 (btrace_disable): Throw an error if the thread is not recorded.
96
97 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
98
99 * record-btrace.c (record_btrace_target::fetch_registers): Forward
100 request if we do not have a thread_info.
101
102 2020-04-21 Tom de Vries <tdevries@suse.de>
103
104 PR gdb/25471
105 * thread.c
106 (scoped_restore_current_thread::scoped_restore_current_thread): Catch
107 exception in get_frame_id.
108
109 2020-04-20 Tom Tromey <tromey@adacore.com>
110
111 * python/python.c (struct gdbpy_event): Mark move constructor as
112 noexcept.
113 * python/py-tui.c (class gdbpy_tui_window_maker): Mark move
114 constructor as noexcept.
115 * completer.h (struct completion_result): Mark move constructor as
116 noexcept.
117 * completer.c (completion_result::completion_result): Use
118 initialization style. Don't call reset_match_list.
119
120 2020-04-20 Mihails Strasuns <mihails.strasuns@intel.com>
121
122 * MAINTAINERS (Write After Approval): Add myself.
123
124 2020-04-18 Tom Tromey <tom@tromey.com>
125
126 * windows-tdep.c (init_w32_command_list)
127 (w32_prefix_command_valid): Restore.
128 (_initialize_windows_tdep): Call init_w32_command_list.
129
130 2020-04-18 Tom Tromey <tom@tromey.com>
131
132 * xcoffread.c (enter_line_range, scan_xcoff_symtab): Update.
133 * value.c (value_fn_field): Update.
134 * valops.c (find_function_in_inferior)
135 (value_allocate_space_in_inferior): Update.
136 * tui/tui-winsource.c (tui_update_source_windows_with_line):
137 Update.
138 * tui/tui-source.c (tui_source_window::set_contents): Update.
139 * symtab.c (lookup_global_or_static_symbol)
140 (find_function_start_sal_1, skip_prologue_sal)
141 (print_msymbol_info, find_gnu_ifunc, symbol_arch): Update.
142 * symmisc.c (dump_msymbols, dump_symtab_1)
143 (maintenance_print_one_line_table): Update.
144 * symfile.c (init_entry_point_info, section_is_mapped)
145 (list_overlays_command, simple_read_overlay_table)
146 (simple_overlay_update_1): Update.
147 * stap-probe.c (handle_stap_probe): Update.
148 * stabsread.c (dbx_init_float_type, define_symbol)
149 (read_one_struct_field, read_enum_type, read_range_type): Update.
150 * source.c (info_line_command): Update.
151 * python/python.c (gdbpy_source_objfile_script)
152 (gdbpy_execute_objfile_script): Update.
153 * python/py-type.c (save_objfile_types): Update.
154 * python/py-objfile.c (py_free_objfile): Update.
155 * python/py-inferior.c (python_new_objfile): Update.
156 * psymtab.c (psym_find_pc_sect_compunit_symtab, dump_psymtab)
157 (dump_psymtab_addrmap_1, maintenance_info_psymtabs)
158 (maintenance_check_psymtabs): Update.
159 * printcmd.c (info_address_command): Update.
160 * objfiles.h (struct objfile) <arch>: New method, from
161 get_objfile_arch.
162 (get_objfile_arch): Don't declare.
163 * objfiles.c (get_objfile_arch): Remove.
164 (filter_overlapping_sections): Update.
165 * minsyms.c (msymbol_is_function): Update.
166 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines)
167 (output_nondebug_symbol): Update.
168 * mdebugread.c (parse_symbol, basic_type, parse_partial_symbols)
169 (mdebug_expand_psymtab): Update.
170 * machoread.c (macho_add_oso_symfile): Update.
171 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap):
172 Update.
173 * linux-fork.c (checkpoint_command): Update.
174 * linespec.c (convert_linespec_to_sals): Update.
175 * jit.c (finalize_symtab): Update.
176 * infrun.c (insert_exception_resume_from_probe): Update.
177 * ia64-tdep.c (ia64_find_unwind_table): Update.
178 * hppa-tdep.c (internalize_unwinds): Update.
179 * gdbtypes.c (get_type_arch, init_float_type, objfile_type):
180 Update.
181 * gcore.c (call_target_sbrk): Update.
182 * elfread.c (record_minimal_symbol, elf_symtab_read)
183 (elf_rel_plt_read, elf_gnu_ifunc_record_cache)
184 (elf_gnu_ifunc_resolve_by_got): Update.
185 * dwarf2/read.c (create_addrmap_from_index)
186 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
187 (read_debug_names_from_section)
188 (process_psymtab_comp_unit_reader, add_partial_symbol)
189 (add_partial_subprogram, process_full_comp_unit)
190 (read_file_scope, read_func_scope, read_lexical_block_scope)
191 (read_call_site_scope, dwarf2_ranges_read)
192 (dwarf2_record_block_ranges, dwarf2_add_field)
193 (mark_common_block_symbol_computed, read_tag_pointer_type)
194 (read_tag_string_type, dwarf2_init_float_type)
195 (dwarf2_init_complex_target_type, read_base_type)
196 (partial_die_info::read, partial_die_info::read)
197 (read_attribute_value, dwarf_decode_lines_1, new_symbol)
198 (dwarf2_fetch_die_loc_sect_off): Update.
199 * dwarf2/loc.c (dwarf2_find_location_expression)
200 (class dwarf_evaluate_loc_desc, rw_pieced_value)
201 (dwarf2_evaluate_loc_desc_full, dwarf2_locexpr_baton_eval)
202 (dwarf2_loc_desc_get_symbol_read_needs)
203 (locexpr_describe_location_piece, locexpr_describe_location_1)
204 (loclist_describe_location): Update.
205 * dwarf2/index-write.c (write_debug_names): Update.
206 * dwarf2/frame.c (dwarf2_build_frame_info): Update.
207 * dtrace-probe.c (dtrace_process_dof): Update.
208 * dbxread.c (read_dbx_symtab, dbx_end_psymtab)
209 (process_one_symbol): Update.
210 * ctfread.c (ctf_init_float_type, read_base_type): Update.
211 * coffread.c (coff_symtab_read, enter_linenos, decode_base_type)
212 (coff_read_enum_type): Update.
213 * cli/cli-cmds.c (edit_command, list_command): Update.
214 * buildsym.c (buildsym_compunit::finish_block_internal): Update.
215 * breakpoint.c (create_overlay_event_breakpoint)
216 (create_longjmp_master_breakpoint)
217 (create_std_terminate_master_breakpoint)
218 (create_exception_master_breakpoint, get_sal_arch): Update.
219 * block.c (block_gdbarch): Update.
220 * annotate.c (annotate_source_line): Update.
221
222 2020-04-17 Tom Tromey <tromey@adacore.com>
223
224 * auto-load.c (show_auto_load_cmd): Remove.
225 (auto_load_show_cmdlist_get): Use add_show_prefix_cmd.
226 * arc-tdep.c (_initialize_arc_tdep): Use add_show_prefix_cmd.
227 (maintenance_print_arc_command): Remove.
228 * tui/tui-win.c (tui_command): Remove.
229 (tui_get_cmd_list): Use add_basic_prefix_cmd.
230 * tui/tui-layout.c (tui_layout_command): Remove.
231 (_initialize_tui_layout): Use add_basic_prefix_cmd.
232 * python/python.c (user_set_python, user_show_python): Remove.
233 (_initialize_python): Use add_basic_prefix_cmd,
234 add_show_prefix_cmd.
235 * guile/guile.c (set_guile_command, show_guile_command): Remove.
236 (install_gdb_commands): Use add_basic_prefix_cmd,
237 add_show_prefix_cmd.
238 (info_guile_command): Remove.
239 * dwarf2/read.c (set_dwarf_cmd, show_dwarf_cmd): Remove.
240 (_initialize_dwarf2_read): Use add_basic_prefix_cmd,
241 add_show_prefix_cmd.
242 * cli/cli-style.h (class cli_style_option) <add_setshow_commands>:
243 Remove do_set and do_show parameters.
244 * cli/cli-style.c (set_style, show_style): Remove.
245 (_initialize_cli_style): Use add_basic_prefix_cmd,
246 add_show_prefix_cmd.
247 (cli_style_option::add_setshow_commands): Remove do_set and
248 do_show parameters.
249 (cli_style_option::add_setshow_commands): Use
250 add_basic_prefix_cmd, add_show_prefix_cmd.
251 (STYLE_ADD_SETSHOW_COMMANDS): Remove macro.
252 (set_style_name): Remove.
253 * cli/cli-dump.c (dump_command, append_command): Remove.
254 (srec_dump_command, ihex_dump_command, verilog_dump_command)
255 (tekhex_dump_command, binary_dump_command)
256 (binary_append_command): Remove.
257 (_initialize_cli_dump): Use add_basic_prefix_cmd.
258 * windows-tdep.c (w32_prefix_command_valid): Remove global.
259 (init_w32_command_list): Remove; move into ...
260 (_initialize_windows_tdep): ... here. Use add_basic_prefix_cmd.
261 * valprint.c (set_print, show_print, set_print_raw)
262 (show_print_raw): Remove.
263 (_initialize_valprint): Use add_basic_prefix_cmd,
264 add_show_prefix_cmd.
265 * typeprint.c (set_print_type, show_print_type): Remove.
266 (_initialize_typeprint): Use add_basic_prefix_cmd,
267 add_show_prefix_cmd.
268 * record.c (set_record_command, show_record_command): Remove.
269 (_initialize_record): Use add_basic_prefix_cmd,
270 add_show_prefix_cmd.
271 * cli/cli-cmds.c (_initialize_cli_cmds): Use add_basic_prefix_cmd,
272 add_show_prefix_cmd.
273 (info_command, show_command, set_debug, show_debug): Remove.
274 * top.h (set_history, show_history): Don't declare.
275 * top.c (set_history, show_history): Remove.
276 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
277 (unset_tdesc_cmd): Remove.
278 (_initialize_target_descriptions): Use add_basic_prefix_cmd,
279 add_show_prefix_cmd.
280 * symtab.c (info_module_command): Remove.
281 (_initialize_symtab): Use add_basic_prefix_cmd.
282 * symfile.c (overlay_command): Remove.
283 (_initialize_symfile): Use add_basic_prefix_cmd.
284 * sparc64-tdep.c (info_adi_command): Remove.
285 (_initialize_sparc64_adi_tdep): Use add_basic_prefix_cmd.
286 * sh-tdep.c (show_sh_command, set_sh_command): Remove.
287 (_initialize_sh_tdep): Use add_basic_prefix_cmd,
288 add_show_prefix_cmd.
289 * serial.c (serial_set_cmd, serial_show_cmd): Remove.
290 (_initialize_serial): Use add_basic_prefix_cmd,
291 add_show_prefix_cmd.
292 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Remove.
293 (_initialize_ser_tcp): Use add_basic_prefix_cmd,
294 add_show_prefix_cmd.
295 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command)
296 (_initialize_rs6000_tdep): Use add_basic_prefix_cmd,
297 add_show_prefix_cmd.
298 * riscv-tdep.c (show_riscv_command, set_riscv_command)
299 (show_debug_riscv_command, set_debug_riscv_command): Remove.
300 (_initialize_riscv_tdep): Use add_basic_prefix_cmd,
301 add_show_prefix_cmd.
302 * remote.c (remote_command, set_remote_cmd): Remove.
303 (_initialize_remote): Use add_basic_prefix_cmd.
304 * record-full.c (set_record_full_command)
305 (show_record_full_command): Remove.
306 (_initialize_record_full): Use add_basic_prefix_cmd,
307 add_show_prefix_cmd.
308 * record-btrace.c (cmd_set_record_btrace)
309 (cmd_show_record_btrace, cmd_set_record_btrace_bts)
310 (cmd_show_record_btrace_bts, cmd_set_record_btrace_pt)
311 (cmd_show_record_btrace_pt): Remove.
312 (_initialize_record_btrace): Use add_basic_prefix_cmd,
313 add_show_prefix_cmd.
314 * ravenscar-thread.c (set_ravenscar_command)
315 (show_ravenscar_command): Remove.
316 (_initialize_ravenscar): Use add_basic_prefix_cmd,
317 add_show_prefix_cmd.
318 * mips-tdep.c (show_mips_command, set_mips_command)
319 (_initialize_mips_tdep): Use add_basic_prefix_cmd,
320 add_show_prefix_cmd.
321 * maint.c (maintenance_command, maintenance_info_command)
322 (maintenance_check_command, maintenance_print_command)
323 (maintenance_set_cmd, maintenance_show_cmd): Remove.
324 (_initialize_maint_cmds): Use add_basic_prefix_cmd,
325 add_show_prefix_cmd.
326 (show_per_command_cmd): Remove.
327 * maint-test-settings.c (maintenance_set_test_settings_cmd):
328 Remove.
329 (maintenance_show_test_settings_cmd): Remove.
330 (_initialize_maint_test_settings): Use add_basic_prefix_cmd,
331 add_show_prefix_cmd.
332 * maint-test-options.c (maintenance_test_options_command):
333 Remove.
334 (_initialize_maint_test_options): Use add_basic_prefix_cmd.
335 * macrocmd.c (macro_command): Remove
336 (_initialize_macrocmd): Use add_basic_prefix_cmd.
337 * language.c (set_check, show_check): Remove.
338 (_initialize_language): Use add_basic_prefix_cmd,
339 add_show_prefix_cmd.
340 * infcmd.c (unset_command): Remove.
341 (_initialize_infcmd): Use add_basic_prefix_cmd.
342 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Remove.
343 (_initialize_i386_tdep): Use add_basic_prefix_cmd,
344 add_show_prefix_cmd.
345 * go32-nat.c (go32_info_dos_command): Remove.
346 (_initialize_go32_nat): Use add_basic_prefix_cmd.
347 * cli/cli-decode.c (do_prefix_cmd, add_basic_prefix_cmd)
348 (do_show_prefix_cmd, add_show_prefix_cmd): New functions.
349 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Remove.
350 (_initialize_frame): Use add_basic_prefix_cmd,
351 add_show_prefix_cmd.
352 * dcache.c (set_dcache_command, show_dcache_command): Remove.
353 (_initialize_dcache): Use add_basic_prefix_cmd,
354 add_show_prefix_cmd.
355 * cp-support.c (maint_cplus_command): Remove.
356 (_initialize_cp_support): Use add_basic_prefix_cmd.
357 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
358 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
359 (maint_btrace_pt_show_cmd, _initialize_btrace): Use
360 add_basic_prefix_cmd, add_show_prefix_cmd.
361 * breakpoint.c (save_command): Remove.
362 (_initialize_breakpoint): Use add_basic_prefix_cmd.
363 * arm-tdep.c (set_arm_command, show_arm_command): Remove.
364 (_initialize_arm_tdep): Use add_basic_prefix_cmd,
365 add_show_prefix_cmd.
366 * ada-lang.c (maint_set_ada_cmd, maint_show_ada_cmd)
367 (set_ada_command, show_ada_command): Remove.
368 (_initialize_ada_language): Use add_basic_prefix_cmd,
369 add_show_prefix_cmd.
370 * command.h (add_basic_prefix_cmd, add_show_prefix_cmd): Declare.
371
372 2020-04-16 Kamil Rytarowski <n54@gmx.com>
373
374 * nbsd-nat.c (inf_ptrace_target::auxv_parse): Remove.
375 * nbsd-nat.h (inf_ptrace_target::auxv_parse): Likewise.
376
377 2020-04-16 Simon Marchi <simon.marchi@polymtl.ca>
378
379 * windows-tdep.c (is_linked_with_cygwin_dll): Add filename to
380 warning messages.
381
382 2020-04-16 Simon Marchi <simon.marchi@polymtl.ca>
383
384 * windows-tdep.c (is_linked_with_cygwin_dll): Consider case where
385 import table is not at beginning of .idata section.
386
387 2020-04-16 Pedro Alves <palves@redhat.com>
388
389 * inferior.c (delete_inferior): Use delete operator directly
390 instead of delete_program_space.
391 * progspace.c (add_program_space): New, factored out from
392 program_space::program_space.
393 (remove_program_space): New, factored out from
394 delete_program_space.
395 (program_space::program_space): Remove intro comment. Rewrite.
396 (program_space::~program_space): Remove intro comment. Call
397 remove_program_space.
398 (delete_program_space): Delete.
399 * progspace.h (program_space::program_space): Make explicit. Move
400 intro comment here, adjusted.
401 (program_space::~program_space): Move intro comment here,
402 adjusted.
403 (delete_program_space): Remove.
404
405 2020-04-16 Tom Tromey <tromey@adacore.com>
406
407 * windows-nat.c (windows_nat::handle_access_violation): New
408 function.
409 * nat/windows-nat.h (handle_access_violation): Declare.
410 * nat/windows-nat.c (handle_exception): Move Cygwin code to
411 windows-nat.c. Call handle_access_violation.
412
413 2020-04-16 Tom de Vries <tdevries@suse.de>
414
415 PR symtab/25791
416 * dwarf2/index-write.c (write_gdbindex): Generate CU table entries for
417 CUs without psymtab.
418
419 2020-04-16 Kevin Buettner <kevinb@redhat.com>
420
421 * python/python.c (do_start_initialization): Don't call
422 PyEval_InitThreads for Python 3.9 and beyond.
423
424 2020-04-15 Kamil Rytarowski <n54@gmx.com>
425
426 * obsd-nat.c (obsd_nat_target::update_thread_list): Pass "this" to
427 thread functions.
428 (obsd_nat_target::wait): Likewise.
429
430 2020-04-15 Tom Tromey <tromey@adacore.com>
431
432 * windows-nat.c (DEBUG_EXEC, DEBUG_EVENTS, DEBUG_MEM)
433 (DEBUG_EXCEPT): Use debug_printf.
434
435 2020-04-15 Andrew Burgess <andrew.burgess@embecosm.com>
436
437 * completer.c (class completion_tracker::completion_hash_entry)
438 <hash_name>: New member function.
439 (completion_tracker::discard_completions): New callback to hash a
440 completion_hash_entry, pass this to htab_create_alloc.
441
442 2016-01-20 Jon Turney <jon.turney@dronecode.org.uk>
443
444 * windows-nat.c (windows_make_so): Warn rather than stopping with
445 an error if realpath() fails.
446
447 2020-04-14 Kamil Rytarowski <n54@gmx.com>
448
449 * nbsd-nat.c (nbsd_pid_to_kinfo_proc2): New.
450 (nbsd_nat_target::info_proc): Add do_status.
451
452 2020-04-14 Simon Marchi <simon.marchi@polymtl.ca>
453 Tom de Vries <tdevries@suse.de>
454
455 PR symtab/25718
456 * psympriv.h (struct partial_symtab::read_symtab)
457 (struct partial_symtab::expand_psymtab)
458 (struct partial_symtab::read_dependencies): Update comments.
459 * dwarf2/read.c (struct dwarf2_include_psymtab::read_symtab): Call
460 read_symtab for includer.
461 (struct dwarf2_include_psymtab::expand_psymtab): Assert false.
462 (struct dwarf2_include_psymtab::readin_p): Call readin_p () for includer.
463 (struct dwarf2_include_psymtab::m_readin): Remove.
464 (struct dwarf2_include_psymtab::includer): New member function.
465 (dwarf2_psymtab::expand_psymtab): Assert !readin.
466
467 2020-04-14 Tom de Vries <tdevries@suse.de>
468
469 PR symtab/25720
470 * symmisc.c (maintenance_expand_symtabs): Call expand_symtabs_matching
471 with NULL symbol_matcher and lookup_name.
472 * psymtab.c (psym_expand_symtabs_matching): Handle NULL symbol_matcher
473 and lookup_name.
474 * dwarf2/read.c (dw2_expand_symtabs_matching)
475 (dw2_debug_names_expand_symtabs_matching): Same.
476 * symfile.h (struct quick_symbol_functions::expand_symtabs_matching):
477 Make lookup_name a pointer. Update comment.
478 * symtab.c (global_symbol_searcher::expand_symtabs): Handle
479 lookup_name being a pointer.
480 * symfile.c (expand_symtabs_matching): Same.
481 * symfile-debug.c (debug_qf_expand_symtabs_matching): Same.
482 * linespec.c (iterate_over_all_matching_symtabs): Same.
483
484 2020-04-13 Tom Tromey <tom@tromey.com>
485
486 * run-on-main-thread.c: Update include.
487 * unittests/main-thread-selftests.c: Update include.
488 * tui/tui-win.c: Update include.
489 * tui/tui-io.c: Update include.
490 * tui/tui-interp.c: Update include.
491 * tui/tui-hooks.c: Update include.
492 * top.h: Update include.
493 * top.c: Update include.
494 * ser-base.c: Update include.
495 * remote.c: Update include.
496 * remote-notif.c: Update include.
497 * remote-fileio.c: Update include.
498 * record-full.c: Update include.
499 * record-btrace.c: Update include.
500 * python/python.c: Update include.
501 * posix-hdep.c: Update include.
502 * mingw-hdep.c: Update include.
503 * mi/mi-main.c: Update include.
504 * mi/mi-interp.c: Update include.
505 * main.c: Update include.
506 * linux-nat.c: Update include.
507 * interps.c: Update include.
508 * infrun.c: Update include.
509 * inf-loop.c: Update include.
510 * event-top.c: Update include.
511 * event-loop.c: Move to ../gdbsupport/.
512 * event-loop.h: Move to ../gdbsupport/.
513 * async-event.h: Update include.
514 * Makefile.in (COMMON_SFILES, HFILES_NO_SRCDIR): Update.
515
516 2020-04-13 Tom Tromey <tom@tromey.com>
517
518 * tui/tui-win.c: Include async-event.h.
519 * remote.c: Include async-event.h.
520 * remote-notif.c: Include async-event.h.
521 * record-full.c: Include async-event.h.
522 * record-btrace.c: Include async-event.h.
523 * infrun.c: Include async-event.h.
524 * event-top.c: Include async-event.h.
525 * event-loop.h: Move some declarations to async-event.h.
526 * event-loop.c: Don't include ser-event.h or top.h. Move some
527 code to async-event.c.
528 * async-event.h: New file.
529 * async-event.c: New file.
530 * Makefile.in (COMMON_SFILES): Add async-event.c.
531 (HFILES_NO_SRCDIR): Add async-event.h.
532
533 2020-04-13 Tom Tromey <tom@tromey.com>
534
535 * utils.c (flush_streams): New function.
536 * event-loop.c (gdb_wait_for_event): Call flush_streams.
537
538 2020-04-13 Tom Tromey <tom@tromey.com>
539
540 * event-loop.c (handle_file_event): Use warning, not
541 printf_unfiltered.
542
543 2020-04-13 Tom Tromey <tom@tromey.com>
544
545 * event-loop.c: Include <chrono>.
546
547 2020-04-13 Tom Tromey <tom@tromey.com>
548
549 * gdb_select.h: Move to ../gdbsupport/.
550 * event-loop.c: Update include path.
551 * top.c: Update include path.
552 * ser-base.c: Update include path.
553 * ui-file.c: Update include path.
554 * ser-tcp.c: Update include path.
555 * guile/scm-ports.c: Update include path.
556 * posix-hdep.c: Update include path.
557 * ser-unix.c: Update include path.
558 * gdb_usleep.c: Update include path.
559 * mingw-hdep.c: Update include path.
560 * inflow.c: Update include path.
561 * infrun.c: Update include path.
562 * event-top.c: Update include path.
563
564 2020-04-13 Tom Tromey <tom@tromey.com>
565
566 * configure: Rebuild.
567 * configure.ac: Remove checks that are now in GDB_AC_COMMON.
568
569 2020-04-13 Tom Tromey <tom@tromey.com>
570
571 * event-loop.h (start_event_loop): Don't declare.
572 * event-loop.c (start_event_loop): Move...
573 * main.c (start_event_loop): ...here. Now static.
574
575 2020-04-13 Sergio Durigan Junior <sergiodj@sergiodj.net>
576
577 * MAINTAINERS: Update my email address.
578
579 2020-04-12 Kamil Rytarowski <n54@gmx.com>
580
581 * nbsd-nat.c (nbsd_nat_target::info_proc): Add IP_MINIMAL and
582 IP_ALL.
583
584 2020-04-12 Kamil Rytarowski <n54@gmx.com>
585
586 * nbsd-nat.c (nbsd_pid_to_cmdline): Add.
587 (nbsd_nat_target::info_proc): Add do_cmdline.
588
589 2020-04-12 Kamil Rytarowski <n54@gmx.com>
590
591 * nbsd-nat.c (nbsd_pid_to_cwd): Add.
592 (nbsd_nat_target::info_proc): Add do_cwd.
593
594 2020-04-12 Kamil Rytarowski <n54@gmx.com>
595
596 * nbsd-nat.c (nbsd_nat_target::info_proc): Add do_exe.
597
598 2020-04-11 Kamil Rytarowski <n54@gmx.com>
599
600 * nbsd-nat.c; Include "nbsd-tdep.h" and "gdbarch.h".
601 * nbsd-nat.c (nbsd_nat_target::find_memory_regions)
602 (nbsd_nat_target::info_proc): New functions.
603 * nbsd-nat.c (kinfo_get_vmmap): New function.
604 * nbsd-nat.c (nbsd_nat_target::info_proc) Use
605 nbsd_info_proc_mappings_header and nbsd_info_proc_mappings_entry.
606 * nbsd-tdep.c (nbsd_info_proc_mappings_header)
607 (nbsd_info_proc_mappings_entry, nbsd_vm_map_entry_flags): New
608 functions.
609 * nbsd-tdep.c (KINFO_VME_PROT_READ, KINFO_VME_PROT_WRITE)
610 (KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
611 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
612 (KINFO_VME_FLAG_PAGEABLE, KINFO_VME_FLAG_GROWS_UP)
613 (KINFO_VME_FLAG_GROWS_DOWN): New.
614
615 2020-04-10 Artur Shepilko <nomadbyte@gmail.com>
616
617 * utils.c (copy_bitwise): Use unsigned 0 constant as operand of
618 bit shift.
619
620 2020-04-10 Tom Tromey <tromey@adacore.com>
621
622 * symfile.c (symbol_file_add_separate): Preserve OBJF_MAINLINE.
623
624 2020-04-10 Tom Tromey <tromey@adacore.com>
625
626 * symtab.c (get_symbol_address, get_msymbol_address): Skip
627 separate debug files.
628
629 2020-04-10 Hannes Domani <ssbssa@yahoo.de>
630
631 * nat/windows-nat.c (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP):
632 Move to...
633 * nat/windows-nat.h (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP):
634 ... here.
635 * windows-nat.c (windows_nat_target::get_windows_debug_event):
636 Check for STATUS_WX86_BREAKPOINT.
637 (windows_nat_target::wait): Same.
638
639 2020-04-10 Tom de Vries <tdevries@suse.de>
640
641 PR cli/25808
642 * python/lib/gdb/__init__.py: Initialize lexer with stripnl=False.
643
644 2020-04-09 Simon Marchi <simon.marchi@polymtl.ca>
645
646 * MAINTAINERS (Global Maintainers): Add Tom de Vries.
647 (Write After Approval): Remove Tom de Vries.
648
649 2020-04-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
650
651 revert partially:
652 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
653
654 * buildsym.c (record_line): Fix undefined behavior and preserve
655 lines at eof.
656
657 2020-04-09 Kamil Rytarowski <n54@gmx.com>
658
659 * auxv.h (svr4_auxv_parse): New.
660 * auxv.c (default_auxv_parse): Split into default_auxv_parse
661 and generic_auxv_parse.
662 (svr4_auxv_parse): Add.
663 * obsd-tdep.c: Include "auxv.h".
664 (obsd_auxv_parse): Remove.
665 (obsd_init_abi): Remove comment.
666 (obsd_init_abi): Change set_gdbarch_auxv_parse passed argument
667 from `obsd_auxv_parse' to `svr4_auxv_parse'.
668 * nbsd-tdep.c: Include "auxv.h".
669 (nbsd_init_abi): Call set_gdbarch_auxv_parse.
670
671 2020-04-08 Tom Tromey <tromey@adacore.com>
672
673 * nat/windows-nat.h (last_wait_event): Don't declare.
674 (wait_for_debug_event): Update comment.
675 * nat/windows-nat.c (last_wait_event): Now static.
676
677 2020-04-08 Tom Tromey <tromey@adacore.com>
678
679 * windows-nat.c (wait_for_debug_event): Move to
680 nat/windows-nat.c.
681 * nat/windows-nat.h (wait_for_debug_event): Declare.
682 * nat/windows-nat.c (wait_for_debug_event): Move from
683 windows-nat.c. No longer static.
684
685 2020-04-08 Tom Tromey <tromey@adacore.com>
686
687 * windows-nat.c (get_windows_debug_event): Use
688 fetch_pending_stop.
689 * nat/windows-nat.h (fetch_pending_stop): Declare.
690 * nat/windows-nat.c (fetch_pending_stop): New function.
691
692 2020-04-08 Tom Tromey <tromey@adacore.com>
693
694 * windows-nat.c (windows_continue): Use matching_pending_stop and
695 continue_last_debug_event.
696 * nat/windows-nat.h (matching_pending_stop)
697 (continue_last_debug_event): Declare.
698 * nat/windows-nat.c (DEBUG_EVENTS): New define.
699 (matching_pending_stop, continue_last_debug_event): New
700 functions.
701
702 2020-04-08 Tom Tromey <tromey@adacore.com>
703
704 * windows-nat.c (MS_VC_EXCEPTION): Move to nat/windows-nat.c.
705 (handle_exception_result): Move to nat/windows-nat.h.
706 (DEBUG_EXCEPTION_SIMPLE): Remove.
707 (windows_nat::handle_ms_vc_exception): New function.
708 (handle_exception): Move to nat/windows-nat.c.
709 (get_windows_debug_event): Update.
710 (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP): Move to
711 nat/windows-nat.c.
712 * nat/windows-nat.h (handle_ms_vc_exception): Declare.
713 (handle_exception_result): Move from windows-nat.c.
714 (handle_exception): Declare.
715 * nat/windows-nat.c (MS_VC_EXCEPTION, handle_exception)
716 (STATUS_WX86_SINGLE_STEP, STATUS_WX86_BREAKPOINT): Move from
717 windows-nat.c.
718
719 2020-04-08 Tom Tromey <tromey@adacore.com>
720
721 * windows-nat.c (exception_count, event_count): Remove.
722 (handle_exception, get_windows_debug_event)
723 (do_initial_windows_stuff): Update.
724
725 2020-04-08 Tom Tromey <tromey@adacore.com>
726
727 * windows-nat.c (windows_nat::handle_load_dll)
728 (windows_nat::handle_unload_dll): Rename. No longer static.
729 * nat/windows-nat.h (handle_load_dll, handle_unload_dll):
730 Declare.
731
732 2020-04-08 Tom Tromey <tromey@adacore.com>
733
734 * complaints.h (stop_whining): Declare at top-level.
735 (complaint): Don't declare stop_whining.
736
737 2020-04-08 Tom Tromey <tromey@adacore.com>
738
739 * windows-nat.c (windows_nat::handle_output_debug_string):
740 Rename. No longer static.
741 * nat/windows-nat.h (handle_output_debug_string): Declare.
742
743 2020-04-08 Tom Tromey <tromey@adacore.com>
744
745 * windows-nat.c (current_process_handle, current_process_id)
746 (main_thread_id, last_sig, current_event, last_wait_event)
747 (current_windows_thread, desired_stop_thread_id, pending_stops)
748 (struct pending_stop, siginfo_er): Move to nat/windows-nat.c.
749 (display_selectors, fake_create_process)
750 (get_windows_debug_event): Update.
751 * nat/windows-nat.h (current_process_handle, current_process_id)
752 (main_thread_id, last_sig, current_event, last_wait_event)
753 (current_windows_thread, desired_stop_thread_id, pending_stops)
754 (struct pending_stop, siginfo_er): Move from windows-nat.c.
755 * nat/windows-nat.c (current_process_handle, current_process_id)
756 (main_thread_id, last_sig, current_event, last_wait_event)
757 (current_windows_thread, desired_stop_thread_id, pending_stops)
758 (siginfo_er): New globals. Move from windows-nat.c.
759
760 2020-04-08 Tom Tromey <tromey@adacore.com>
761
762 * windows-nat.c (get_image_name): Move to nat/windows-nat.c.
763 (handle_load_dll): Update.
764 * nat/windows-nat.c (get_image_name): Move from windows-nat.c.
765
766 2020-04-08 Tom Tromey <tromey@adacore.com>
767
768 * windows-nat.c (enum thread_disposition_type): Move to
769 nat/windows-nat.h.
770 (windows_nat::thread_rec): Rename from thread_rec. No longer
771 static.
772 (windows_add_thread, windows_nat_target::fetch_registers)
773 (windows_nat_target::store_registers, handle_exception)
774 (windows_nat_target::resume, get_windows_debug_event)
775 (windows_nat_target::get_tib_address)
776 (windows_nat_target::thread_name)
777 (windows_nat_target::thread_alive): Update.
778 * nat/windows-nat.h (enum thread_disposition_type): Move from
779 windows-nat.c.
780 (thread_rec): Declare.
781
782 2020-04-08 Tom Tromey <tromey@adacore.com>
783
784 * windows-nat.c: Add "using namespace".
785 * nat/windows-nat.h: Wrap contents in windows_nat namespace.
786 * nat/windows-nat.c: Wrap contents in windows_nat namespace.
787
788 2020-04-08 Tom Tromey <tromey@adacore.com>
789
790 * nat/windows-nat.h (struct windows_thread_info): Declare
791 destructor.
792 * nat/windows-nat.c (~windows_thread_info): New.
793
794 2020-04-08 Tom Tromey <tromey@adacore.com>
795
796 PR gdb/22992
797 * windows-nat.c (current_event): Update comment.
798 (last_wait_event, desired_stop_thread_id): New globals.
799 (struct pending_stop): New.
800 (pending_stops): New global.
801 (windows_nat_target) <stopped_by_sw_breakpoint>
802 <supports_stopped_by_sw_breakpoint>: New methods.
803 (windows_fetch_one_register): Add assertions. Adjust PC.
804 (windows_continue): Handle pending stops. Suspend other threads
805 when stepping. Use last_wait_event
806 (wait_for_debug_event): New function.
807 (get_windows_debug_event): Use wait_for_debug_event. Handle
808 pending stops. Queue spurious stops.
809 (windows_nat_target::wait): Set stopped_at_software_breakpoint.
810 (windows_nat_target::kill): Use wait_for_debug_event.
811 * nat/windows-nat.h (struct windows_thread_info)
812 <stopped_at_software_breakpoint>: New field.
813 * nat/windows-nat.c (windows_thread_info::resume): Clear
814 stopped_at_software_breakpoint.
815
816 2020-04-08 Tom Tromey <tromey@adacore.com>
817
818 * windows-nat.c (enum thread_disposition_type): New.
819 (thread_rec): Replace "get_context" parameter with "disposition";
820 change type.
821 (windows_add_thread, windows_nat_target::fetch_registers)
822 (windows_nat_target::store_registers, handle_exception)
823 (windows_nat_target::resume, get_windows_debug_event)
824 (windows_nat_target::get_tib_address)
825 (windows_nat_target::thread_name)
826 (windows_nat_target::thread_alive): Update.
827
828 2020-04-08 Tom Tromey <tromey@adacore.com>
829
830 * windows-nat.c (thread_rec): Use windows_thread_info::suspend.
831 (windows_continue): Use windows_continue::resume.
832 * nat/windows-nat.h (struct windows_thread_info) <suspend,
833 resume>: Declare new methods.
834 * nat/windows-nat.c: New file.
835 * configure.nat (NATDEPFILES): Add nat/windows-nat.o when needed.
836
837 2020-04-08 Tom Tromey <tromey@adacore.com>
838
839 * windows-nat.c (windows_add_thread, windows_delete_thread)
840 (windows_nat_target::fetch_registers)
841 (windows_nat_target::store_registers, fake_create_process)
842 (windows_nat_target::resume, windows_nat_target::resume)
843 (get_windows_debug_event, windows_nat_target::wait)
844 (windows_nat_target::pid_to_str)
845 (windows_nat_target::get_tib_address)
846 (windows_nat_target::get_ada_task_ptid)
847 (windows_nat_target::thread_name)
848 (windows_nat_target::thread_alive): Use lwp, not tid.
849
850 2020-04-08 Tom Tromey <tromey@adacore.com>
851
852 * windows-nat.c (handle_exception)
853 (windows_nat_target::thread_name): Update.
854 * nat/windows-nat.h (windows_thread_info): Remove destructor.
855 <name>: Now unique_xmalloc_ptr.
856
857 2020-04-08 Tom Tromey <tromey@adacore.com>
858
859 * windows-nat.c (thread_rec)
860 (windows_nat_target::fetch_registers): Update.
861 * nat/windows-nat.h (struct windows_thread_info) <suspended>:
862 Update comment.
863 <debug_registers_changed, reload_context>: Now bool.
864
865 2020-04-08 Tom Tromey <tromey@adacore.com>
866
867 * windows-nat.c (windows_add_thread): Use new.
868 (windows_init_thread_list, windows_delete_thread): Use delete.
869 (get_windows_debug_event): Update.
870 * nat/windows-nat.h (struct windows_thread_info): Add constructor,
871 destructor, and initializers.
872
873 2020-04-08 Tom Tromey <tromey@adacore.com>
874
875 * windows-nat.c (struct windows_thread_info): Remove.
876 * nat/windows-nat.h: New file.
877
878 2020-04-08 Tom Tromey <tromey@adacore.com>
879
880 * windows-nat.c (struct windows_thread_info) <tid>: Rename from "id".
881 (thread_rec, windows_add_thread, windows_delete_thread)
882 (windows_continue): Update.
883
884 2020-04-08 Tom Tromey <tromey@adacore.com>
885
886 * windows-nat.c (struct windows_thread_info): Remove typedef.
887 (thread_head): Remove.
888 (thread_list): New global.
889 (thread_rec, windows_add_thread, windows_init_thread_list)
890 (windows_delete_thread, windows_continue): Update.
891
892 2020-04-08 Simon Marchi <simon.marchi@polymtl.ca>
893
894 * windows-tdep.h (windows_init_abi): Add comment.
895 (cygwin_init_abi): New declaration.
896 * windows-tdep.c: Split signal enumeration in two, one for
897 Windows and one for Cygwin.
898 (windows_gdb_signal_to_target): Only deal with signal of the
899 Windows OS ABI.
900 (cygwin_gdb_signal_to_target): New function.
901 (windows_init_abi): Rename to windows_init_abi_common, don't set
902 gdb_signal_to_target gdbarch method. Add new new function with
903 this name.
904 (cygwin_init_abi): New function.
905 * amd64-windows-tdep.c (amd64_windows_init_abi_common): Add
906 comment. Don't call windows_init_abi.
907 (amd64_windows_init_abi): Add comment, call windows_init_abi.
908 (amd64_cygwin_init_abi): Add comment, call cygwin_init_abi.
909 * i386-windows-tdep.c (i386_windows_init_abi): Rename to
910 i386_windows_init_abi_common, don't call windows_init_abi. Add
911 a new function of this name.
912 (i386_cygwin_init_abi): New function.
913 (_initialize_i386_windows_tdep): Bind i386_cygwin_init_abi to
914 OS ABI Cygwin.
915
916 2020-04-08 Simon Marchi <simon.marchi@polymtl.ca>
917
918 * dwarf2/read.c (read_gdb_index_from_buffer): Remove objfile
919 parameter.c.
920 (dwarf2_read_gdb_index): Update.
921
922 2020-04-07 Kamil Rytarowski <n54@gmx.com>
923
924 * nbsd-tdep.c: Include "objfiles.h".
925 (nbsd_skip_solib_resolver): New.
926 (nbsd_init_abi): Call set_gdbarch_skip_solib_resolver().
927
928 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
929
930 * dwarf2/loc.c (loclist_describe_location): Call the function decode_debug_loclists_
931 addresses if DWARF version is 5 or more because DW_LLE_start* or DW_LLE_offset_pair
932 with DW_LLE_base_addressx are being emitted in DWARFv5.
933 Add the newly added kind DW_LOC_OFFSET_PAIR also.
934 The length of location description is an unsigned ULEB integer in DWARFv5 instead of
935 unsigned integer.
936
937 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
938
939 * dwarf2/loc.c (enum debug_loc_kind): Add a new kind DEBUG_LOC_OFFSET_PAIR.
940 (dwarf2_find_location_expression): Call the function decode_debug_loclists_
941 addresses if DWARF version is 5 or more. DW_LLE_start* or DW_LLE_offset_pair
942 with DW_LLE_base_addressx are being emitted in DWARFv5 instead of DW_LLE_GNU*.
943 Add applicable base address if the entry is DW_LLE_offset_pair from DWO.
944 (decode_debug_loclists_addresses): Return DEBUG_LOC_OFFSET_PAIR instead of
945 DEBUG_LOC_START_END in case of DW_LLE_offset_pair.
946
947
948 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
949
950 * dwarf2/read.c (cu_debug_loc_section): Added the declaration for the function.
951 (read_loclist_index): New function definition.
952 (lookup_loclist_base): New function definition.
953 (read_loclist_header): New function definition.
954 (dwarf2_cu): Add loclist_base and loclist_header field.
955 (dwarf2_locate_dwo_sections): Handle .debug_loclists.dwo section.
956 (read_full_die_1): Read the value of DW_AT_loclists_base.
957 (read_attribute_reprocess): Handle DW_FORM_loclistx.
958 (read_attribute_value): Handle DW_FORM_loclistx.
959 (skip_one_die): Handle DW_FORM_loclistx.
960 (loclist_header): New structure declaration.
961 * dwarf2/attribute.c (form_is_section_offset): Handle DW_FORM_loclistx.
962
963 2020-04-07 Simon Marchi <simon.marchi@polymtl.ca>
964
965 * dwarf2/read.h (struct dwarf2_psymtab): Remove two-parameters
966 constructor. Remove `addr` parameter from other constructor and
967 add `per_cu` parameter.
968 * dwarf2/read.c (create_partial_symtab): Update.
969
970 2020-04-07 Tom de Vries <tdevries@suse.de>
971
972 PR symtab/25796
973 * dwarf2/read.c (can_have_DW_AT_const_value_p): New function.
974 (partial_die_info::fixup): Inherit has_const_value.
975
976 2020-04-07 Tom de Vries <tdevries@suse.de>
977
978 * psymtab.c (maintenance_check_psymtabs): Skip static LOC_BLOCK
979 symbols without address.
980
981 2020-04-06 Kamil Rytarowski <n54@gmx.com>
982
983 * nbsd-nat.h (struct thread_info): Add forward declaration.
984 (nbsd_nat_target::thread_alive): Add.
985 (nbsd_nat_target::thread_name): Likewise.
986 (nbsd_nat_target::update_thread_list): Likewise.
987 (update_thread_list::post_attach): Likewise.
988 (post_attach::pid_to_str): Likewise.
989 * nbsd-nat.c: Include "gdbthread.h" and "inferior.h".
990 (nbsd_thread_lister): Add.
991 (nbsd_nat_target::thread_alive): Likewise.
992 (nbsd_nat_target::thread_name): Likewise.
993 (nbsd_add_threads): Likewise.
994 (update_thread_list::post_attach): Likewise.
995 (nbsd_nat_target::update_thread_list): Likewise.
996 (post_attach::pid_to_str): Likewise.
997
998 2020-04-06 Tom Tromey <tromey@adacore.com>
999
1000 * ada-valprint.c (print_variant_part): Extract the variant field.
1001 (print_field_values): Use the field as the outer value when
1002 recursing.
1003
1004 2020-04-06 Tom Tromey <tromey@adacore.com>
1005
1006 * sh-nbsd-tdep.c: Include nbsd-tdep.h.
1007 * ppc-nbsd-tdep.c: Include nbsd-tdep.h.
1008 * mips-nbsd-tdep.c (mipsnbsd_init_abi): Add missing ";".
1009 * arm-nbsd-tdep.c: Include nbsd-tdep.h.
1010 * hppa-nbsd-tdep.c: Include nbsd-tdep.h.
1011
1012 2020-04-06 Tom Tromey <tromey@adacore.com>
1013
1014 * dwarf2/read.c (read_base_type) <DW_ATE_complex_float>: Handle
1015 TYPE_CODE_ERROR.
1016
1017 2020-04-06 Kamil Rytarowski <n54@gmx.com>
1018
1019 * nbsd-tdep.c: Include "gdbarch.h".
1020 Define enum with NetBSD signal numbers.
1021 (nbsd_gdb_signal_from_target, nbsd_gdb_signal_to_target): New.
1022 * alpha-nbsd-tdep.c (alphanbsd_init_abi): Call nbsd_init_abi().
1023 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1024 * arm-nbsd-tdep.c (arm_netbsd_elf_init_abi): Likewise.
1025 * hppa-nbsd-tdep.c (hppanbsd_init_abi): Likewise.
1026 * i386-nbsd-tdep.c (i386nbsd_init_abi): Likewise.
1027 * mips-nbsd-tdep.c (nbsd_init_abi): Likewise.
1028 * ppc-nbsd-tdep.c (ppcnbsd_init_abi): Likewise.
1029 * sh-nbsd-tdep.c (shnbsd_init_abi): Likewise.
1030 * sparc-nbsd-tdep.c (sparc32nbsd_init_abi): Likewise.
1031 * sparc64-nbsd-tdep.c (sparc64nbsd_init_abi): Likewise.
1032 * vax-nbsd-tdep.c (vaxnbsd_elf_init_abi): Likewise.
1033
1034 2020-04-03 Hannes Domani <ssbssa@yahoo.de>
1035
1036 PR gdb/25325
1037 * dwarf2/read.c (read_enumeration_type): Fix typed enum attributes.
1038
1039 2020-04-03 Tom Tromey <tromey@adacore.com>
1040
1041 * dwarf2/loc.c (disassemble_dwarf_expression) <DW_OP_const_type>:
1042 Read constant block.
1043
1044 2020-04-02 Simon Marchi <simon.marchi@polymtl.ca>
1045
1046 * gdb_bfd.h: Include gdbsupport/byte-vector.h.
1047 (gdb_bfd_get_full_section_contents): New declaration.
1048 * gdb_bfd.c (gdb_bfd_get_full_section_contents): New function.
1049 * windows-tdep.c (is_linked_with_cygwin_dll): Use
1050 gdb_bfd_get_full_section_contents.
1051
1052 2020-04-02 Simon Marchi <simon.marchi@polymtl.ca>
1053
1054 * exec.c (build_section_table): Replace internal_error with
1055 gdb_assert.
1056 (section_table_xfer_memory_partial): Likewise.
1057 * mdebugread.c (parse_partial_symbols): Likewise.
1058 * psymtab.c (lookup_partial_symbol): Likewise.
1059 * utils.c (wrap_here): Likewise.
1060
1061 2020-04-02 Tom Tromey <tromey@adacore.com>
1062
1063 * f-lang.c (build_fortran_types): Use arch_type to initialize
1064 builtin_complex_s32 in the TYPE_CODE_ERROR case.
1065
1066 2020-04-02 Tom Tromey <tromey@adacore.com>
1067
1068 * dwarf2/read.c (partial_die_info::read): Do not create a vector
1069 of attributes.
1070
1071 2020-04-02 Andrew Burgess <andrew.burgess@embecosm.com>
1072 Bernd Edlinger <bernd.edlinger@hotmail.de>
1073 Tom Tromey <tromey@adacore.com>
1074
1075 * buildsym.c (buildsym_compunit::record_line): Remove
1076 deduplication code.
1077
1078 2020-04-02 Tom de Vries <tdevries@suse.de>
1079
1080 PR ada/24671
1081 * dwarf2/read.c (dw2_map_matching_symbols): Handle -readnow.
1082
1083 2020-04-02 Tom de Vries <tdevries@suse.de>
1084
1085 * dwarf2/read.c (dwarf2_gdb_index_functions,
1086 dwarf2_debug_names_functions): Init lookup_global_symbol_language with
1087 NULL.
1088 * psymtab.c (psym_lookup_global_symbol_language): New function.
1089 (psym_functions): Init psym_lookup_global_symbol_language with
1090 psym_lookup_global_symbol_language.
1091 * symfile-debug.c (debug_sym_quick_functions): Init
1092 lookup_global_symbol_language with NULL.
1093 * symfile.c (set_initial_language): Remove fixme comment.
1094 * symfile.h (struct quick_symbol_functions): Add
1095 lookup_global_symbol_language.
1096 * symtab.c (find_quick_global_symbol_language): New function.
1097 (find_main_name): Use find_quick_global_symbol_language.
1098
1099 2020-04-01 Simon Marchi <simon.marchi@polymtl.ca>
1100
1101 * windows-tdep.c (is_linked_with_cygwin_dll): Fix style.
1102
1103 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
1104
1105 * buildsym.c (record_line): Fix undefined behavior and preserve
1106 lines at eof.
1107
1108 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
1109
1110 * buildsym.c (record_line): Fix the resizing condition.
1111
1112 2020-04-01 Tom Tromey <tom@tromey.com>
1113
1114 * value.h (value_literal_complex): Add comment.
1115 * valops.c (value_literal_complex): Refer to value.h.
1116
1117 2020-04-01 Tom Tromey <tom@tromey.com>
1118
1119 * c-exp.y (FLOAT_KEYWORD, COMPLEX): New tokens.
1120 (scalar_type): New rule, from typebase.
1121 (typebase): Use scalar_type. Recognize complex types.
1122 (field_name): Handle FLOAT_KEYWORD.
1123 (ident_tokens): Add _Complex and __complex__.
1124
1125 2020-04-01 Tom Tromey <tom@tromey.com>
1126
1127 PR exp/25299:
1128 * valarith.c (promotion_type, complex_binop): New functions.
1129 (scalar_binop): Handle complex numbers. Use promotion_type.
1130 (value_pos, value_neg, value_complement): Handle complex numbers.
1131
1132 2020-04-01 Tom Tromey <tom@tromey.com>
1133
1134 * c-exp.y (COMPLEX_INT, COMPLEX_FLOAT): New tokens.
1135 (exp) <COMPLEX_INT, COMPLEX_FLOAT>: New rules.
1136 (parse_number): Handle complex numbers.
1137
1138 2020-04-01 Tom Tromey <tom@tromey.com>
1139
1140 * c-valprint.c (c_decorations): Change complex suffix to "i".
1141
1142 2020-04-01 Tom Tromey <tom@tromey.com>
1143
1144 * valprint.c (generic_value_print_complex): Use accessors.
1145 * value.h (value_real_part, value_imaginary_part): Declare.
1146 * valops.c (value_real_part, value_imaginary_part): New
1147 functions.
1148 * value.c (creal_internal_fn, cimag_internal_fn): Use accessors.
1149
1150 2020-04-01 Tom Tromey <tom@tromey.com>
1151
1152 * stabsread.c (rs6000_builtin_type, read_sun_floating_type)
1153 (read_range_type): Update.
1154 * mdebugread.c (basic_type): Update.
1155 * go-lang.c (build_go_types): Use init_complex_type.
1156 * gdbtypes.h (struct main_type) <complex_type>: New member.
1157 (init_complex_type): Update.
1158 (arch_complex_type): Don't declare.
1159 * gdbtypes.c (init_complex_type): Remove "objfile" parameter.
1160 Make name if none given. Use alloc_type_copy. Look for cached
1161 complex type.
1162 (arch_complex_type): Remove.
1163 (gdbtypes_post_init): Use init_complex_type.
1164 * f-lang.c (build_fortran_types): Use init_complex_type.
1165 * dwarf2/read.c (read_base_type): Update.
1166 * d-lang.c (build_d_types): Use init_complex_type.
1167 * ctfread.c (read_base_type): Update.
1168
1169 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1170
1171 * infrun.c (stop_all_threads): Update assertion, plus when
1172 stopping threads, take into account that we might be trying
1173 to stop an all-stop target.
1174 (stop_waiting): Call 'stop_all_threads' if there exists a
1175 non-stop target.
1176
1177 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1178
1179 * target.h (exists_non_stop_target): New function declaration.
1180 * target.c (exists_non_stop_target): New function.
1181
1182 2020-04-01 Hannes Domani <ssbssa@yahoo.de>
1183
1184 PR gdb/24789
1185 * eval.c (is_integral_or_integral_reference): New function.
1186 (evaluate_subexp_standard): Allow integer references in
1187 pointer arithmetic.
1188
1189 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1190
1191 * remote.c (remote_target::remote_parse_stop_reply): Remove the
1192 check for no ptid in the stop reply when the target is non-stop.
1193
1194 2020-04-01 Tom Tromey <tromey@adacore.com>
1195
1196 * symtab.h (class lookup_name_info) <lookup_name_info>: Change
1197 "name" parameter to rvalue reference. Initialize m_name_holder.
1198 <lookup_name_info>: New overloads.
1199 <name>: Return gdb::string_view.
1200 <c_str>: New method.
1201 <make_ignore_params>: Update.
1202 <search_name_hash>: Update.
1203 <language_lookup_name>: Return const char *.
1204 <m_name>: Change type.
1205 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info)
1206 (demangle_for_lookup_info::demangle_for_lookup_info): Update.
1207 (lookup_name_info::match_any): Update.
1208 * psymtab.c (match_partial_symbol, lookup_partial_symbol):
1209 Update.
1210 * minsyms.c (linkage_name_str): Update.
1211 * language.c (default_symbol_name_matcher): Update.
1212 * dwarf2/read.c (mapped_index_base::find_name_components_bounds):
1213 Update.
1214 * ada-lang.c (ada_fold_name): Change parameter to string_view.
1215 (ada_lookup_name_info::ada_lookup_name_info): Update.
1216 (literal_symbol_name_matcher): Update.
1217
1218 2020-04-01 Tom Tromey <tromey@adacore.com>
1219
1220 * psymtab.c (psymtab_search_name): Remove function.
1221 (psym_lookup_symbol): Create search name and lookup name here.
1222 (lookup_partial_symbol): Remove "name" parameter; add
1223 lookup_name.
1224 (psym_expand_symtabs_for_function): Update.
1225
1226 2020-03-31 Joel Jones <joelkevinjones@gmail.com>
1227
1228 PR tui/25597:
1229 * python/py-tui.c: Include gdb_curses.h inside of #ifdef TUI.
1230
1231 2020-03-31 Tom Tromey <tromey@adacore.com>
1232
1233 * dwarf2/abbrev.c (abbrev_table::read): Conditionally call
1234 memcpy.
1235
1236 2020-03-30 Nelson Chu <nelson.chu@sifive.com>
1237
1238 * features/riscv/32bit-csr.xml: Regenerated.
1239 * features/riscv/64bit-csr.xml: Regenerated.
1240
1241 2020-03-30 Tom Tromey <tromey@adacore.com>
1242
1243 * ada-valprint.c (print_variant_part): Update.
1244 * ada-lang.h (ada_which_variant_applies): Update.
1245 * ada-lang.c (ada_which_variant_applies): Remove outer_type and
1246 outer_valaddr parameters; replace with "outer" value parameter.
1247 (to_fixed_variant_branch_type): Update.
1248
1249 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1250
1251 * ppc-linux-nat.c: Include <algorithm>, <unordered_map>, and
1252 <list>. Remove inclusion of observable.h.
1253 (PPC_DEBUG_CURRENT_VERSION): Move up define.
1254 (struct arch_lwp_info): New struct.
1255 (class ppc_linux_dreg_interface): New class.
1256 (struct ppc_linux_process_info): New struct.
1257 (struct ppc_linux_nat_target) <low_delete_thread, low_new_fork>
1258 <low_new_clone, low_forget_process, low_prepare_to_resume>
1259 <copy_thread_dreg_state, mark_thread_stale>
1260 <mark_debug_registers_changed, register_hw_breakpoint>
1261 <clear_hw_breakpoint, register_wp, clear_wp>
1262 <can_use_watchpoint_cond_accel, calculate_dvc, check_condition>
1263 <num_memory_accesses, get_trigger_type>
1264 <create_watchpoint_request, hwdebug_point_cmp>
1265 <init_arch_lwp_info, get_arch_lwp_info>
1266 <low_stopped_by_watchpoint, low_stopped_data_address>: Declare as
1267 methods.
1268 <struct ptid_hash>: New inner struct.
1269 <m_dreg_interface, m_process_info, m_installed_hw_bps>: Declare
1270 members.
1271 (saved_dabr_value, hwdebug_info, max_slots_number)
1272 (struct hw_break_tuple, struct thread_points, ppc_threads)
1273 (have_ptrace_hwdebug_interface)
1274 (hwdebug_find_thread_points_by_tid)
1275 (hwdebug_insert_point, hwdebug_remove_point): Remove.
1276 (ppc_linux_nat_target::can_use_hw_breakpoint): Use
1277 m_dreg_interface, remove call to PTRACE_SET_DEBUGREG.
1278 (ppc_linux_nat_target::region_ok_for_hw_watchpoint): Add comment,
1279 use m_dreg_interface.
1280 (hwdebug_point_cmp): Change to...
1281 (ppc_linux_nat_target::hwdebug_point_cmp): ...this method. Use
1282 reference arguments instead of pointers.
1283 (ppc_linux_nat_target::ranged_break_num_registers): Use
1284 m_dreg_interface.
1285 (ppc_linux_nat_target::insert_hw_breakpoint): Add comment, use
1286 m_dreg_interface. Call register_hw_breakpoint.
1287 (ppc_linux_nat_target::remove_hw_breakpoint): Add comment, use
1288 m_dreg_interface. Call clear_hw_breakpoint.
1289 (get_trigger_type): Change to...
1290 (ppc_linux_nat_target::get_trigger_type): ...this method. Add
1291 comment.
1292 (ppc_linux_nat_target::insert_mask_watchpoint): Update comment,
1293 use m_dreg_interface. Call register_hw_breakpoint.
1294 (ppc_linux_nat_target::remove_mask_watchpoint): Update comment,
1295 use m_dreg_interface. Call clear_hw_breakpoint.
1296 (can_use_watchpoint_cond_accel): Change to...
1297 (ppc_linux_nat_target::can_use_watchpoint_cond_accel): ...this
1298 method. Update comment, use m_dreg_interface and
1299 m_process_info.
1300 (calculate_dvc): Change to...
1301 (ppc_linux_nat_target::calculate_dvc): ...this method. Use
1302 m_dreg_interface.
1303 (num_memory_accesses): Change to...
1304 (ppc_linux_nat_target::num_memory_accesses): ...this method.
1305 (check_condition): Change to...
1306 (ppc_linux_nat_target::check_condition): ...this method.
1307 (ppc_linux_nat_target::can_accel_watchpoint_condition): Update
1308 comment, use m_dreg_interface.
1309 (create_watchpoint_request): Change to...
1310 (ppc_linux_nat_target::create_watchpoint_request): ...this
1311 method. Use m_dreg_interface.
1312 (ppc_linux_nat_target::insert_watchpoint): Add comment, use
1313 m_dreg_interface. Call register_hw_breakpoint or register_wp.
1314 (ppc_linux_nat_target::remove_watchpoint): Add comment, use
1315 m_dreg_interface. Call clear_hw_breakpoint or clear_wp.
1316 (ppc_linux_nat_target::low_forget_process)
1317 (ppc_linux_nat_target::low_new_fork)
1318 (ppc_linux_nat_target::low_new_clone)
1319 (ppc_linux_nat_target::low_delete_thread)
1320 (ppc_linux_nat_target::low_prepare_to_resume): New methods.
1321 (ppc_linux_nat_target::low_new_thread): Remove previous logic,
1322 only call mark_thread_stale.
1323 (ppc_linux_thread_exit): Remove.
1324 (ppc_linux_nat_target::stopped_data_address): Change to...
1325 (ppc_linux_nat_target::low_stopped_data_address): This. Add
1326 comment, use m_dreg_interface and m_thread_hw_breakpoints.
1327 (ppc_linux_nat_target::stopped_by_watchpoint): Change to...
1328 (ppc_linux_nat_target::stopped_by_watchpoint): This. Add
1329 comment. Call low_stopped_data_address.
1330 (ppc_linux_nat_target::watchpoint_addr_within_range): Use
1331 m_dreg_interface.
1332 (ppc_linux_nat_target::masked_watch_num_registers): Use
1333 m_dreg_interface.
1334 (ppc_linux_nat_target::copy_thread_dreg_state)
1335 (ppc_linux_nat_target::mark_thread_stale)
1336 (ppc_linux_nat_target::mark_debug_registers_changed)
1337 (ppc_linux_nat_target::register_hw_breakpoint)
1338 (ppc_linux_nat_target::clear_hw_breakpoint)
1339 (ppc_linux_nat_target::register_wp)
1340 (ppc_linux_nat_target::clear_wp)
1341 (ppc_linux_nat_target::init_arch_lwp_info)
1342 (ppc_linux_nat_target::get_arch_lwp_info): New methods.
1343 (_initialize_ppc_linux_nat): Remove observer callback.
1344
1345 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1346
1347 * ppc-linux-nat.c (ppc_linux_nat_target::store_registers)
1348 (ppc_linux_nat_target::auxv_parse)
1349 (ppc_linux_nat_target::read_description)
1350 (supply_gregset, fill_gregset, supply_fpregset, fill_fpregset):
1351 Move up.
1352
1353 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1354
1355 * linux-nat.h (low_new_clone): New method.
1356 * linux-nat.c (linux_handle_extended_wait): Call low_new_clone.
1357
1358 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
1359
1360 * dbxread.c (dbx_psymtab_to_symtab_1): Rename to...
1361 (dbx_expand_psymtab): ... this.
1362 (start_psymtab): Update.
1363 * mdebugread.c (psymtab_to_symtab_1): Rename to...
1364 (mdebug_expand_psymtab): ... this.
1365 (parse_partial_symbols): Update.
1366 (new_psymtab): Update.
1367 * xcoffread.c (xcoff_psymtab_to_symtab_1): Rename to...
1368 (xcoff_expand_psymtab): ... this.
1369 (xcoff_start_psymtab): Update.
1370
1371 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
1372
1373 * psympriv.h (partial_symtab) <read_dependencies>: Rename to...
1374 <expand_dependencies>: ... this.
1375 * psymtab.c (partial_symtab::read_dependencies): Rename to...
1376 (partial_symtab::expand_dependencies): ... this.
1377 * dwarf2/read.c (dwarf2_include_psymtab) <expand_psymtab>:
1378 Update.
1379 (dwarf2_psymtab::expand_psymtab): Update.
1380 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
1381 * mdebugread.c (psymtab_to_symtab_1): Update.
1382 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1383
1384 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
1385
1386 * psympriv.h (discard_psymtab): Remove.
1387 * dbxread.c (dbx_end_psymtab): Update.
1388 * xcoffread.c (xcoff_end_psymtab): Update.
1389
1390 2020-03-28 Tom Tromey <tom@tromey.com>
1391
1392 * dwarf2/attribute.h (struct attribute) <form_is_constant>: Update
1393 comment.
1394
1395 2020-03-28 Tom Tromey <tom@tromey.com>
1396
1397 * dwarf2/read.c (read_attribute_reprocess): Fix formatting.
1398
1399 2020-03-27 Hannes Domani <ssbssa@yahoo.de>
1400
1401 * windows-nat.c (windows_add_all_dlls): Fix system dll paths.
1402
1403 2020-03-26 John Baldwin <jhb@FreeBSD.org>
1404
1405 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_BSDFLAGS.
1406
1407 2020-03-26 Tom Tromey <tom@tromey.com>
1408
1409 * dwarf2/read.c (handle_data_member_location, dwarf2_add_field)
1410 (mark_common_block_symbol_computed, read_tag_string_type)
1411 (attr_to_dynamic_prop, read_subrange_type): Update.
1412 (dwarf2_get_ref_die_offset, dwarf2_get_attr_constant_value): Move
1413 to be methods on struct attribute.
1414 (skip_one_die, process_imported_unit_die, read_namespace_alias)
1415 (read_call_site_scope, partial_die_info::read)
1416 (partial_die_info::read, lookup_die_type, follow_die_ref):
1417 Update.
1418 * dwarf2/attribute.c (attribute::get_ref_die_offset): New method,
1419 from dwarf2_get_ref_die_offset.
1420 (attribute::constant_value): New method, from
1421 dwarf2_get_attr_constant_value.
1422 * dwarf2/attribute.h (struct attribute) <get_ref_die_offset>:
1423 Declare method.
1424 <constant_value>: New method.
1425
1426 2020-03-26 Tom Tromey <tom@tromey.com>
1427
1428 * dwarf2/read.c (dwarf_unit_type_name, dwarf_tag_name)
1429 (dwarf_attr_name, dwarf_form_name, dwarf_bool_name)
1430 (dwarf_type_encoding_name): Move to stringify.c.
1431 * Makefile.in (COMMON_SFILES): Add dwarf2/stringify.c.
1432 * dwarf2/stringify.c: New file.
1433 * dwarf2/stringify.h: New file.
1434
1435 2020-03-26 Tom Tromey <tom@tromey.com>
1436
1437 * dwarf2/die.h (struct die_info) <addr_base, ranges_base>:
1438 Rewrite.
1439
1440 2020-03-26 Tom Tromey <tom@tromey.com>
1441
1442 * dwarf2/die.h (struct die_info) <addr_base, ranges_base>: New
1443 methods.
1444 * dwarf2/read.c (lookup_addr_base): Move to die.h.
1445 (lookup_ranges_base): Likewise.
1446 (read_cutu_die_from_dwo, read_full_die_1): Update.
1447
1448 2020-03-26 Tom Tromey <tom@tromey.com>
1449
1450 * dwarf2/read.c (read_import_statement, read_file_scope)
1451 (read_type_unit_scope, inherit_abstract_dies, read_func_scope)
1452 (read_lexical_block_scope, read_call_site_scope)
1453 (dwarf2_get_subprogram_pc_bounds, get_scope_pc_bounds)
1454 (handle_struct_member_die, process_structure_scope)
1455 (update_enumeration_type_from_children)
1456 (process_enumeration_scope, read_array_type, read_common_block)
1457 (read_namespace, read_module, read_subroutine_type): Update.
1458 (sibling_die): Remove.
1459
1460 2020-03-26 Tom Tromey <tom@tromey.com>
1461
1462 * dwarf2/read.c (lookup_addr_base, lookup_ranges_base)
1463 (build_type_psymtabs_reader, read_structure_type)
1464 (read_enumeration_type, read_full_die_1): Update.
1465 (dwarf2_attr_no_follow): Move to die.h.
1466 * dwarf2/die.h (struct die_info) <attr>: New method.
1467
1468 2020-03-26 Tom Tromey <tom@tromey.com>
1469
1470 * dwarf2/read.c (struct dwarf2_cu) <base_known>: Remove.
1471 <base_address>: Now an optional.
1472 (dwarf2_find_base_address, dwarf2_rnglists_process)
1473 (dwarf2_ranges_process, fill_in_loclist_baton)
1474 (dwarf2_symbol_mark_computed): Update.
1475
1476 2020-03-26 Tom Tromey <tom@tromey.com>
1477
1478 * dwarf2/read.c (struct die_info): Move to die.h.
1479 * dwarf2/die.h: New file.
1480
1481 2020-03-26 Tom Tromey <tom@tromey.com>
1482
1483 * dwarf2/line-header.h (dwarf_decode_line_header): Declare.
1484 * dwarf2/read.c
1485 (dwarf2_statement_list_fits_in_line_number_section_complaint):
1486 Move to line-header.c.
1487 (read_checked_initial_length_and_offset, read_formatted_entries):
1488 Likewise.
1489 (dwarf_decode_line_header): Split into two.
1490 * dwarf2/line-header.c
1491 (dwarf2_statement_list_fits_in_line_number_section_complaint):
1492 Move from read.c.
1493 (read_checked_initial_length_and_offset, read_formatted_entries):
1494 Likewise.
1495 (dwarf_decode_line_header): New function, split from read.c.
1496
1497 2020-03-26 Tom Tromey <tom@tromey.com>
1498
1499 * dwarf2/read.h (struct dwarf2_per_objfile) <read_line_string>:
1500 Declare method.
1501 * dwarf2/read.c (read_attribute_value): Update.
1502 (dwarf2_per_objfile::read_line_string): Rename from
1503 read_indirect_line_string.
1504 (read_formatted_entries): Update.
1505
1506 2020-03-26 Tom Tromey <tom@tromey.com>
1507
1508 * dwarf2/macro.c (dwarf_decode_macro_bytes): Use objfile local
1509 variable.
1510
1511 2020-03-26 Tom Tromey <tom@tromey.com>
1512
1513 * dwarf2/macro.h (dwarf_decode_macros): Make section parameter
1514 const.
1515 * dwarf2/macro.c (skip_form_bytes, skip_unknown_opcode)
1516 (dwarf_decode_macro_bytes, dwarf_decode_macros): Make section
1517 parameter const.
1518
1519 2020-03-26 Tom Tromey <tom@tromey.com>
1520
1521 * dwarf2/read.c (dwarf_decode_macros): Make "lh" const.
1522 * dwarf2/macro.h (dwarf_decode_macros): Constify "lh" parameter.
1523 * dwarf2/macro.c (macro_start_file): Constify "lh" parameter.
1524 (dwarf_decode_macro_bytes, dwarf_decode_macros): Likewise.
1525
1526 2020-03-26 Tom Tromey <tom@tromey.com>
1527
1528 * dwarf2/line-header.h (struct line_header) <is_valid_file_index,
1529 file_names_size, file_full_name, file_file_name>: Use const.
1530 <file_name_at, file_names>: Add const overload.
1531 * dwarf2/line-header.c (line_header::file_file_name)
1532 (line_header::file_full_name): Update.
1533
1534 2020-03-26 Tom Tromey <tom@tromey.com>
1535
1536 * dwarf2/read.c (dwarf2_macro_malformed_definition_complaint)
1537 (macro_start_file, consume_improper_spaces)
1538 (parse_macro_definition, skip_form_bytes, skip_unknown_opcode)
1539 (dwarf_parse_macro_header, dwarf_decode_macro_bytes)
1540 (dwarf_decode_macros): Move to macro.c.
1541 * dwarf2/macro.c: New file.
1542 * dwarf2/macro.h: New file.
1543 * Makefile.in (COMMON_SFILES): Add dwarf2/macro.c.
1544
1545 2020-03-26 Tom Tromey <tom@tromey.com>
1546
1547 * dwarf2/section.h (struct dwarf2_section_info) <read_string>: New
1548 method.
1549 * dwarf2/section.c: New method. From
1550 read_indirect_string_at_offset_from.
1551 * dwarf2/read.c (mapped_debug_names::namei_to_name): Update.
1552 (read_indirect_string_at_offset_from): Move to section.c.
1553 (read_indirect_string_at_offset): Rewrite.
1554 (read_indirect_line_string_at_offset): Remove.
1555 (read_indirect_string, read_indirect_line_string)
1556 (dwarf_decode_macro_bytes): Update.
1557
1558 2020-03-26 Tom Tromey <tom@tromey.com>
1559
1560 * dwarf2/section.h (struct dwarf2_section_info)
1561 <overload_complaint>: Declare.
1562 (dwarf2_section_buffer_overflow_complaint): Don't declare.
1563 * dwarf2/section.c (dwarf2_section_info::overflow_complaint):
1564 Rename from dwarf2_section_buffer_overflow_complaint.
1565 * dwarf2/read.c (skip_one_die, partial_die_info::read)
1566 (skip_form_bytes, dwarf_decode_macro_bytes): Update.
1567
1568 2020-03-26 Tom Tromey <tom@tromey.com>
1569
1570 * dwarf2/section.h (dwarf2_section_buffer_overflow_complaint):
1571 Declare.
1572 * dwarf2/section.c (dwarf2_section_buffer_overflow_complaint):
1573 Move from read.c.
1574 * dwarf2/read.c (dwarf2_section_buffer_overflow_complaint): Move
1575 to section.c.
1576
1577 2020-03-26 Tom Tromey <tom@tromey.com>
1578
1579 * dwarf2/read.c (dwarf_decode_macros): Split into two overloads.
1580
1581 2020-03-26 Tom Tromey <tom@tromey.com>
1582
1583 * dwarf2/read.c (macro_start_file): Change "cu" parameter to
1584 "builder".
1585 (dwarf_decode_macro_bytes): Likewise. Add dwarf2_per_objfile
1586 parameter.
1587 (dwarf_decode_macros): Update.
1588
1589 2020-03-26 Tom Tromey <tom@tromey.com>
1590
1591 * dwarf2/read.c (read_attribute_value): Update.
1592 (read_indirect_string_from_dwz): Move to dwz.c; change into
1593 method.
1594 (dwarf_decode_macro_bytes): Update.
1595 * dwarf2/dwz.h (struct dwz_file) <read_string>: Declare method.
1596 * dwarf2/dwz.c: New file.
1597 * Makefile.in (COMMON_SFILES): Add dwz.c.
1598
1599 2020-03-26 Tom Tromey <tom@tromey.com>
1600
1601 * dwarf2/read.h (struct dwz_file): Move to dwz.h.
1602 * dwarf2/read.c: Add include.
1603 * dwarf2/index-write.c: Add include.
1604 * dwarf2/index-cache.c: Add include.
1605 * dwarf2/dwz.h: New file.
1606
1607 2020-03-25 Tom Tromey <tom@tromey.com>
1608
1609 * compile/compile-object-load.c (get_out_value_type): Mention
1610 correct symbol name in error message.
1611
1612 2020-03-25 Hannes Domani <ssbssa@yahoo.de>
1613
1614 * windows-nat.c (windows_add_all_dlls): Fix system dll paths.
1615
1616 2020-03-25 Tom de Vries <tdevries@suse.de>
1617
1618 * symtab.h (is_main_symtab_of_compunit_symtab): New function.
1619 * symmisc.c (dump_symtab_1): Print user and includes fields.
1620 (maintenance_info_symtabs): Same.
1621
1622 2020-03-25 Andrew Burgess <andrew.burgess@embecosm.com>
1623
1624 PR gdb/25534
1625 * riscv-tdep.c (riscv_arg_info::c_offset): Update comment.
1626 (riscv_regcache_cooked_write): New function.
1627 (riscv_push_dummy_call): Use new function.
1628 (riscv_return_value): Likewise.
1629
1630 2020-03-24 Simon Marchi <simon.marchi@polymtl.ca>
1631
1632 * fbsd-nat.c (fbsd_nat_target::follow_fork): Change bool to int.
1633 * fbsd-nat.h (class fbsd_nat_target) <follow_fork>: Likewise.
1634 * inf-ptrace.c (inf_ptrace_target::follow_fork): Likewise.
1635 * inf-ptrace.h (struct inf_ptrace_target) <follow_fork>: Likewise.
1636 * infrun.c (follow_fork): Likewise.
1637 (follow_fork_inferior): Likewise.
1638 * linux-nat.c (linux_nat_target::follow_fork): Likewise.
1639 * linux-nat.h (class linux_nat_target): Likewise.
1640 * remote.c (class remote_target) <follow_fork>: Likewise.
1641 (remote_target::follow_fork): Likewise.
1642 * target-delegates.c: Re-generate.
1643 * target.c (default_follow_fork): Likewise.
1644 (target_follow_fork): Likewise.
1645 * target.h (struct target_ops) <follow_fork>: Likewise.
1646 (target_follow_fork): Likewise.
1647
1648 2020-03-24 Tom de Vries <tdevries@suse.de>
1649
1650 * psymtab.c (maintenance_info_psymtabs): Print user field.
1651
1652 2020-03-20 Tom Tromey <tromey@adacore.com>
1653
1654 * dwarf2/loc.h (dwarf2_evaluate_property): Make "addr_stack"
1655 const.
1656 * dwarf2/loc.c (dwarf2_evaluate_property): Make "addr_stack"
1657 const.
1658
1659 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
1660
1661 * ptrace.m4: Don't check for ptrace declaration.
1662 * config.in: Re-generate.
1663 * configure: Re-generate.
1664 * nat/gdb_ptrace.h: Don't declare ptrace if HAVE_DECL_PTRACE is
1665 not defined.
1666
1667 2020-03-20 Kamil Rytarowski <n54@gmx.com>
1668
1669 * amd64-bsd-nat.c (gdb_ptrace): Change return type from `int' to
1670 `PTRACE_TYPE_RET'.
1671 * i386-bsd-nat.c (gdb_ptrace): Likewise.
1672 * sparc-nat.c (gdb_ptrace): Likewise.
1673 * x86-bsd-nat.c (gdb_ptrace): Likewise.
1674
1675 2020-03-20 Tom Tromey <tromey@adacore.com>
1676
1677 * c-exp.y (lex_one_token): Fix assert.
1678
1679 2020-03-20 Tom Tromey <tromey@adacore.com>
1680
1681 * ada-tasks.c (read_atcb): Use smaller length in strncpy call.
1682 * linux-tdep.c (linux_fill_prpsinfo): Use smaller length in
1683 strncpy call.
1684
1685 2020-03-20 Tom Tromey <tromey@adacore.com>
1686
1687 * symmisc.c (maintenance_print_one_line_table): Use ui_out.
1688
1689 2020-03-20 Tom Tromey <tromey@adacore.com>
1690
1691 * ada-valprint.c (print_variant_part): Remove parameters; switch
1692 to value-based API.
1693 (print_field_values): Likewise.
1694 (ada_val_print_struct_union): Likewise.
1695 (ada_value_print_1): Update.
1696
1697 2020-03-20 Kamil Rytarowski <n54@gmx.com>
1698
1699 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): Inherit from
1700 nbsd_nat_target instead of inf_ptrace_target.
1701 * ppc-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
1702 nbsd_nat_target.
1703
1704 2020-03-20 Kamil Rytarowski <n54@gmx.com>
1705
1706 * hppa-nbsd-nat.c (fetch_registers): New variable lwp and pass
1707 it to the ptrace call.
1708 * (store_registers): Likewise.
1709
1710 2020-03-20 Kamil Rytarowski <n54@gmx.com>
1711
1712 * ppc-nbsd-nat.c (fetch_registers): New variable lwp and pass
1713 it to the ptrace call.
1714 * (store_registers): Likewise.
1715
1716 2020-03-19 Luis Machado <luis.machado@linaro.org>
1717
1718 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_set_vq): If vg is not
1719 valid, fetch vg value from ptrace.
1720
1721 2020-03-19 Kamil Rytarowski <n54@gmx.com>
1722 * inf-ptrace.h: Disable get_ptrace_pid on NetBSD.
1723 * inf-ptrace.c: Likewise.
1724 * (gdb_ptrace): Add.
1725 * (inf_ptrace_target::resume): Update.
1726 * (inf_ptrace_target::xfer_partial): Likewise.
1727 * (inf_ptrace_peek_poke): Change argument `pid' to `ptid'.
1728 * (inf_ptrace_peek_poke): Update.
1729
1730 2020-03-19 Kamil Rytarowski <n54@gmx.com>
1731
1732 * x86-bsd-nat.c (gdb_ptrace): New.
1733 * (x86bsd_dr_set): Add new argument `ptid'.
1734 * (x86bsd_dr_get, x86bsd_dr_set, x86bsd_dr_set_control,
1735 x86bsd_dr_set_addr): Update.
1736
1737 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
1738
1739 * remote.c (remote_target::process_stop_reply): Handle events for
1740 all threads differently.
1741
1742 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
1743
1744 * completer.c (completion_tracker::remove_completion): Define new
1745 function.
1746 * completer.h (completion_tracker::remove_completion): Declare new
1747 function.
1748 * symtab.c (completion_list_add_symbol): Remove aliasing msymbols
1749 when adding a C++ function symbol.
1750
1751 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
1752
1753 * completer.c (completion_tracker::completion_hash_entry): Define
1754 new class.
1755 (advance_to_filename_complete_word_point): Call
1756 recompute_lowest_common_denominator.
1757 (completion_tracker::completion_tracker): Call discard_completions
1758 to setup the hash table.
1759 (completion_tracker::discard_completions): Allow for being called
1760 from the constructor, pass new equal function, and element deleter
1761 when constructing the hash table. Initialise new class member
1762 variables.
1763 (completion_tracker::maybe_add_completion): Remove use of
1764 m_entries_vec, and store more information into m_entries_hash.
1765 (completion_tracker::recompute_lcd_visitor): New function, most
1766 content taken from...
1767 (completion_tracker::recompute_lowest_common_denominator):
1768 ...here, this now just visits each item in the hash calling the
1769 above visitor.
1770 (completion_tracker::build_completion_result): Remove use of
1771 m_entries_vec, call recompute_lowest_common_denominator.
1772 * completer.h (completion_tracker::have_completions): Remove use
1773 of m_entries_vec.
1774 (completion_tracker::completion_hash_entry): Declare new class.
1775 (completion_tracker::recompute_lowest_common_denominator): Change
1776 function signature.
1777 (completion_tracker::recompute_lcd_visitor): Declare new function.
1778 (completion_tracker::m_entries_vec): Delete.
1779 (completion_tracker::m_entries_hash): Initialize to NULL.
1780 (completion_tracker::m_lowest_common_denominator_valid): New
1781 member variable.
1782 (completion_tracker::m_lowest_common_denominator_max_length): New
1783 member variable.
1784
1785 2020-03-17 Kamil Rytarowski <n54@gmx.com>
1786
1787 * regformats/regdef.h: Put reg in gdb namespace.
1788
1789 2020-03-17 Kamil Rytarowski <n54@gmx.com>
1790
1791 * i386-bsd-nat.c (gdb_ptrace): New.
1792 * (i386bsd_fetch_inferior_registers,
1793 i386bsd_store_inferior_registers) Switch from pid_t to ptid_t.
1794 * (i386bsd_fetch_inferior_registers,
1795 i386bsd_store_inferior_registers) Use gdb_ptrace.
1796
1797 2020-03-17 Kamil Rytarowski <n54@gmx.com>
1798
1799 * amd64-bsd-nat.c (gdb_ptrace): New.
1800 * (amd64bsd_fetch_inferior_registers,
1801 amd64bsd_store_inferior_registers) Switch from pid_t to ptid_t.
1802 * (amd64bsd_fetch_inferior_registers,
1803 amd64bsd_store_inferior_registers) Use gdb_ptrace.
1804
1805 2020-03-17 Kamil Rytarowski <n54@gmx.com>
1806
1807 * user-regs.c (user_reg::read): Rename to...
1808 (user_reg::xread): ...this.
1809 * (append_user_reg): Rename argument `read' to `xread'.
1810 * (user_reg_add_builtin): Likewise.
1811 * (user_reg_add): Likewise.
1812 * (value_of_user_reg): Likewise.
1813
1814 2020-03-17 Kamil Rytarowski <n54@gmx.com>
1815
1816 * sparc-nat.c (gdb_ptrace): New.
1817 * sparc-nat.c (sparc_fetch_inferior_registers)
1818 (sparc_store_inferior_registers) Remove obsolete comment.
1819 * sparc-nat.c (sparc_fetch_inferior_registers)
1820 (sparc_store_inferior_registers) Switch from pid_t to ptid_t.
1821 * sparc-nat.c (sparc_fetch_inferior_registers)
1822 (sparc_store_inferior_registers) Use gdb_ptrace.
1823
1824 2020-03-17 Kamil Rytarowski <n54@gmx.com>
1825
1826 * sh-nbsd-nat.c (fetch_registers): New variable lwp and pass
1827 it to the ptrace call.
1828 * sh-nbsd-nat.c (store_registers): Likewise.
1829
1830 2020-03-17 Kamil Rytarowski <n54@gmx.com>
1831
1832 * sh-nbsd-nat.c (sh_nbsd_nat_target): Inherit from
1833 nbsd_nat_target instead of inf_ptrace_target.
1834 * sh-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
1835 nbsd_nat_target.
1836
1837 2020-03-17 Kamil Rytarowski <n54@gmx.com>
1838
1839 * amd64-bsd-nat.c: Include amd64-bsd-nat.h".
1840
1841 2020-03-17 Kamil Rytarowski <n54@gmx.com>
1842
1843 * nbsd-nat.c: Include <sys/types.h>, <sys/ptrace.h> and
1844 <sys/sysctl.h>.
1845 * nbsd-nat.c (nbsd_nat_target::pid_to_exec_file): Rewrite.
1846
1847 2020-03-17 Tom de Vries <tdevries@suse.de>
1848
1849 PR gdb/23710
1850 * dwarf2/read.h (struct dwarf2_per_cu_data): Add unit_type and lang
1851 fields.
1852 * dwarf2/read.c (process_psymtab_comp_unit): Initialize unit_type and lang
1853 fields.
1854 (process_imported_unit_die): Skip import of c++ CUs.
1855
1856 2020-03-16 Tom Tromey <tom@tromey.com>
1857
1858 * p-valprint.c (pascal_object_print_value): Initialize
1859 base_value.
1860
1861 2020-03-16 Anton Kolesov <anton.kolesov@synopsys.com>
1862 Shahab Vahedi <shahab@synopsys.com>
1863
1864 * Makefile.in: Add arch/arc.o
1865 * configure.tgt: Likewise.
1866 * arc-tdep.c (arc_tdesc_init): Use arc_read_description.
1867 (_initialize_arc_tdep): Don't initialize old target descriptions.
1868 (arc_read_description): New function to cache target descriptions.
1869 * arc-tdep.h (arc_read_description): Add proto type.
1870 * arch/arc.c: New file.
1871 * arch/arc.h: Likewise.
1872 * features/Makefile: Replace old target descriptions with new.
1873 * features/arc-arcompact.c: Remove.
1874 * features/arc-arcompact.xml: Likewise.
1875 * features/arc-v2.c: Likewise
1876 * features/arc-v2.xml: Likewise
1877 * features/arc/aux-arcompact.xml: New file.
1878 * features/arc/aux-v2.xml: Likewise.
1879 * features/arc/core-arcompact.xml: Likewise.
1880 * features/arc/core-v2.xml: Likewise.
1881 * features/arc/aux-arcompact.c: Generate.
1882 * features/arc/aux-v2.c: Likewise.
1883 * features/arc/core-arcompact.c: Likewise.
1884 * features/arc/core-v2.c: Likewise.
1885 * target-descriptions (maint_print_c_tdesc_cmd): Support ARC features.
1886
1887 2020-03-16 Tom Tromey <tromey@adacore.com>
1888
1889 PR gdb/25663:
1890 * dwarf2/read.c (dwarf2_name): Strip leading namespaces after
1891 putting value into bcache.
1892
1893 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
1894
1895 PR gdb/21500
1896 * amd64-windows-tdep.c (amd64_windows_init_abi): Rename
1897 to...
1898 (amd64_windows_init_abi_common): ... this. Don't set size of
1899 long type.
1900 (amd64_windows_init_abi): New function.
1901 (amd64_cygwin_init_abi): New function.
1902 (_initialize_amd64_windows_tdep): Use amd64_cygwin_init_abi for
1903 the Cygwin OS ABI.
1904 * i386-windows-tdep.c (_initialize_i386_windows_tdep): Clarify
1905 comment.
1906
1907 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
1908
1909 * windows-tdep.h (is_linked_with_cygwin_dll): New declaration.
1910 * windows-tdep.c (CYGWIN_DLL_NAME): New.
1911 (pe_import_directory_entry): New struct type.
1912 (is_linked_with_cygwin_dll): New function.
1913 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Select
1914 GDB_OSABI_CYGWIN if the BFD is linked with the Cygwin DLL.
1915 * i386-windows-tdep.c (i386_windows_osabi_sniffer): Likewise.
1916
1917 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
1918
1919 * i386-windows-tdep.c: Mass-rename "cygwin" to "windows", except
1920 i386_cygwin_core_osabi_sniffer.
1921
1922 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
1923
1924 * i386-cygwin-tdep.c: Rename to...
1925 * i386-windows-tdep.c: ... this.
1926 * Makefile.in (ALL_TARGET_OBS): Rename i386-cygwin-tdep.c to
1927 i386-windows-tdep.c.
1928 * configure.tgt: Likewise.
1929
1930 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
1931
1932 * osabi.h (enum gdb_osabi): Add GDB_OSABI_WINDOWS.
1933 * osabi.c (gdb_osabi_names): Add "Windows".
1934 * i386-cygwin-tdep.c (i386_cygwin_osabi_sniffer): Return
1935 GDB_OSABI_WINDOWS when the binary's target is "pei-i386".
1936 (i386_cygwin_core_osabi_sniffer): New function, extracted from
1937 i386_cygwin_osabi_sniffer.
1938 (_initialize_i386_cygwin_tdep): Register OS ABI
1939 GDB_OSABI_WINDOWS for i386.
1940 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Return
1941 GDB_OSABI_WINDOWS when the binary's target is "pei-x86-64".
1942 (_initialize_amd64_windows_tdep): Register OS ABI GDB_OSABI_WINDOWS
1943 for x86-64.
1944 * configure.tgt: Use GDB_OSABI_WINDOWS as the default OS ABI
1945 when the target matches '*-*-mingw*'.
1946
1947 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
1948
1949 * defs.h (enum gdb_osabi): Move to...
1950 * osabi.h (enum gdb_osabi): ... here.
1951 * gdbarch.sh: Include osabi.h in gdbarch.h.
1952 * gdbarch.h: Re-generate.
1953
1954 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
1955
1956 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): New
1957 function.
1958 (_initialize_amd64_windows_tdep): Register osabi sniffer.
1959
1960 2020-03-14 Tom Tromey <tom@tromey.com>
1961
1962 * c-typeprint.c (cp_type_print_method_args): Print "__restrict__"
1963 for C++.
1964 (c_type_print_modifier): Likewise. Add "language" parameter.
1965 (c_type_print_varspec_prefix, c_type_print_base_struct_union)
1966 (c_type_print_base_1): Update.
1967 * type-stack.h (enum type_pieces) <tp_atomic, tp_restrict>: New
1968 constants.
1969 * type-stack.c (type_stack::insert): Handle tp_atomic and
1970 tp_restrict.
1971 (type_stack::follow_type_instance_flags): Likewise.
1972 (type_stack::follow_types): Likewise. Merge type-following code.
1973 * c-exp.y (RESTRICT, ATOMIC): New tokens.
1974 (space_identifier, cv_with_space_id)
1975 (const_or_volatile_or_space_identifier_noopt)
1976 (const_or_volatile_or_space_identifier): Remove.
1977 (single_qualifier, qualifier_seq_noopt, qualifier_seq): New
1978 rules.
1979 (ptr_operator, typebase): Update.
1980 (enum token_flag) <FLAG_C>: New constant.
1981 (ident_tokens): Add "restrict", "__restrict__", "__restrict", and
1982 "_Atomic".
1983 (lex_one_token): Handle FLAG_C.
1984
1985 2020-03-14 Kamil Rytarowski <n54@gmx.com>
1986
1987 * m68k-bsd-nat.c (fetch_registers): New variable lwp and pass
1988 it to the ptrace call.
1989 * m68k-bsd-nat.c (store_registers): Likewise.
1990
1991 2020-03-14 Kamil Rytarowski <n54@gmx.com>
1992
1993 * m68k-bsd-nat.c (m68kbsd_supply_gregset): Change type of regs to
1994 gdb_byte *.
1995 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1996 * m68k-bsd-nat.c (m68kbsd_collect_gregset): Likewise.
1997 * m68k-bsd-nat.c (m68kbsd_supply_pcb): Cast &tmp to gdb_byte *.
1998
1999 2020-03-14 Kamil Rytarowski <n54@gmx.com>
2000
2001 * m68k-bsd-nat.c (m68k_bsd_nat_target): Inherit from
2002 nbsd_nat_target instead of inf_ptrace_target.
2003 * m68k-bsd-nat.c: Include "nbsd-nat.h", as we are now using
2004 nbsd_nat_target.
2005
2006 2020-03-14 Kamil Rytarowski <n54@gmx.com>
2007
2008 * m68k-bsd-nat.c: Define _KERNTYPES to get the declaration of
2009 register_t.
2010
2011 2020-03-14 Kamil Rytarowski <n54@gmx.com>
2012
2013 * alpha-bsd-nat.c (fetch_registers): New variable lwp and pass
2014 it to the ptrace call.
2015 * alpha-bsd-nat.c (store_registers): Likewise.
2016
2017 2020-03-14 Kamil Rytarowski <n54@gmx.com>
2018
2019 * alpha-bsd-nat.c: Remove <sys/procfs.h> and "gregset.h" from
2020 includes.
2021 * alpha-bsd-nat.c (gregset_t, fpregset_t): Remove.
2022 * alpha-bsd-nat.c (supply_gregset, fill_gregset, supply_fpregset,
2023 fill_fpregset): Likewise.
2024
2025 2020-03-14 Kamil Rytarowski <n54@gmx.com>
2026
2027 * alpha-bsd-nat.c (alpha_netbsd_nat_target): Inherit from
2028 nbsd_nat_target instead of inf_ptrace_target.
2029 * alpha-bsd-nat.c: Include "nbsd-nat.h", as we are now using
2030 nbsd_nat_target.
2031
2032 2020-03-14 Kamil Rytarowski <n54@gmx.com>
2033
2034 * alpha-bsd-nat.c: Define _KERNTYPES to get the declaration of
2035 register_t.
2036
2037 2020-03-14 Kamil Rytarowski <n54@gmx.com>
2038
2039 * arm-nbsd-nat.c (fetch_register): New variable lwp and pass
2040 it to the ptrace call.
2041 * arm-nbsd-nat.c (fetch_fp_register): Likewise.
2042 * arm-nbsd-nat.c (fetch_fp_regs): Likewise.
2043 * arm-nbsd-nat.c (store_register): Likewise.
2044 * arm-nbsd-nat.c (store_regs): Likewise.
2045 * arm-nbsd-nat.c (store_fp_register): Likewise.
2046 * arm-nbsd-nat.c (store_fp_regs): Likewise.
2047
2048 2020-03-14 Kamil Rytarowski <n54@gmx.com>
2049
2050 * arm-nbsd-nat.c (arm_netbsd_nat_target): Inherit from
2051 nbsd_nat_target instead of inf_ptrace_target.
2052 * arm-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
2053 nbsd_nat_target.
2054
2055 2020-03-14 Kamil Rytarowski <n54@gmx.com>
2056
2057 * x86-bsd-nat.c (x86bsd_dr_get): New variable lwp and pass
2058 it to the ptrace call.
2059 * x86-bsd-nat.c (x86bsd_dr_set): Likewise.
2060
2061 2020-03-14 Kamil Rytarowski <n54@gmx.com>
2062
2063 * vax-bsd-nat.c (vaxbsd_supply_gregset): New variable lwp and pass
2064 it to the ptrace call.
2065 * vax-bsd-nat.c (vaxbsd_collect_gregset): Likewise.
2066
2067 2020-03-14 Kamil Rytarowski <n54@gmx.com>
2068
2069 * vax-bsd-nat.c (vaxbsd_supply_gregset): Cast gregs to const
2070 gdb_byte *.
2071 * vax-bsd-nat.c (vaxbsd_collect_gregset): Cast gregs to void *.
2072
2073 2020-03-14 Kamil Rytarowski <n54@gmx.com>
2074
2075 * vax-bsd-nat.c (vax_bsd_nat_target): Inherit from nbsd_nat_target
2076 instead of inf_ptrace_target.
2077 * vax-bsd-nat.c: Include "nbsd-nat.h", as we are now using
2078 nbsd_nat_target.
2079
2080 2020-03-14 Kamil Rytarowski <n54@gmx.com>
2081
2082 * mips-nbsd-nat.c: Define _KERNTYPES to get the declaration of
2083 register_t.
2084
2085 2020-03-14 Kamil Rytarowski <n54@gmx.com>
2086
2087 * ppc-nbsd-nat.c: Define _KERNTYPES to get the declaration of
2088 register_t.
2089
2090 2020-03-14 Kamil Rytarowski <n54@gmx.com>
2091
2092 * vax-bsd-nat.c: Define _KERNTYPES to get the declaration of
2093 register_t.
2094
2095 2020-03-13 Tom Tromey <tom@tromey.com>
2096
2097 * value.h (val_print): Don't declare.
2098 * valprint.h (val_print_array_elements)
2099 (val_print_scalar_formatted, generic_val_print): Don't declare.
2100 * valprint.c (generic_val_print_array): Take a struct value.
2101 (generic_val_print_ptr, generic_val_print_memberptr)
2102 (generic_val_print_bool, generic_val_print_int)
2103 (generic_val_print_char, generic_val_print_complex)
2104 (generic_val_print): Remove.
2105 (generic_value_print): Update.
2106 (do_val_print): Remove unused parameters. Don't call
2107 la_val_print.
2108 (val_print): Remove.
2109 (common_val_print): Update. Don't call value_check_printable.
2110 (val_print_scalar_formatted, val_print_array_elements): Remove.
2111 * rust-lang.c (rust_val_print): Remove.
2112 (rust_language_defn): Update.
2113 * p-valprint.c (pascal_val_print): Remove.
2114 (pascal_value_print_inner): Update.
2115 (pascal_object_print_val_fields, pascal_object_print_val):
2116 Remove.
2117 (pascal_object_print_static_field): Update.
2118 * p-lang.h (pascal_val_print): Don't declare.
2119 * p-lang.c (pascal_language_defn): Update.
2120 * opencl-lang.c (opencl_language_defn): Update.
2121 * objc-lang.c (objc_language_defn): Update.
2122 * m2-valprint.c (m2_print_unbounded_array, m2_val_print): Remove.
2123 * m2-lang.h (m2_val_print): Don't declare.
2124 * m2-lang.c (m2_language_defn): Update.
2125 * language.h (struct language_defn) <la_val_print>: Remove.
2126 * language.c (unk_lang_value_print_inner): Rename. Change
2127 argument types.
2128 (unknown_language_defn, auto_language_defn): Update.
2129 * go-valprint.c (go_val_print): Remove.
2130 * go-lang.h (go_val_print): Don't declare.
2131 * go-lang.c (go_language_defn): Update.
2132 * f-valprint.c (f_val_print): Remove.
2133 * f-lang.h (f_value_print): Don't declare.
2134 * f-lang.c (f_language_defn): Update.
2135 * d-valprint.c (d_val_print): Remove.
2136 * d-lang.h (d_value_print): Don't declare.
2137 * d-lang.c (d_language_defn): Update.
2138 * cp-valprint.c (cp_print_value_fields)
2139 (cp_print_value_fields_rtti, cp_print_value): Remove.
2140 (cp_print_static_field): Update.
2141 * c-valprint.c (c_val_print_array, c_val_print_ptr)
2142 (c_val_print_struct, c_val_print_union, c_val_print_int)
2143 (c_val_print_memberptr, c_val_print): Remove.
2144 * c-lang.h (c_val_print_array, cp_print_value_fields)
2145 (cp_print_value_fields_rtti): Don't declare.
2146 * c-lang.c (c_language_defn, cplus_language_defn)
2147 (asm_language_defn, minimal_language_defn): Update.
2148 * ada-valprint.c (ada_val_print_ptr, ada_val_print_num): Remove.
2149 (ada_val_print_enum): Take a struct value.
2150 (ada_val_print_flt, ada_val_print_array, ada_val_print_1)
2151 (ada_val_print): Remove.
2152 (ada_value_print_1): Update.
2153 (printable_val_type): Remove.
2154 * ada-lang.h (ada_val_print): Don't declare.
2155 * ada-lang.c (ada_language_defn): Update.
2156
2157 2020-03-13 Tom Tromey <tom@tromey.com>
2158
2159 * valprint.c (do_val_print): Update.
2160 * python/python-internal.h (gdbpy_apply_val_pretty_printer): Take
2161 a struct value.
2162 (value_to_value_object_no_release): Declare.
2163 * python/py-value.c (value_to_value_object_no_release): New
2164 function.
2165 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Take a
2166 struct value.
2167 * guile/scm-value.c (vlscm_scm_from_value_no_release): New
2168 function.
2169 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer): Take
2170 a struct value.
2171 * guile/guile-internal.h (vlscm_scm_from_value_no_release):
2172 Declare.
2173 (gdbscm_apply_val_pretty_printer): Take a struct value.
2174 * extension.h (apply_ext_lang_val_pretty_printer): Take a struct
2175 value.
2176 * extension.c (apply_ext_lang_val_pretty_printer): Take a struct
2177 value.
2178 * extension-priv.h (struct extension_language_ops)
2179 <apply_val_pretty_printer>: Take a struct value.
2180 * cp-valprint.c (cp_print_value): Create a struct value.
2181 (cp_print_value): Update.
2182
2183 2020-03-13 Tom Tromey <tom@tromey.com>
2184
2185 * ada-valprint.c (print_field_values): Call common_val_print.
2186
2187 2020-03-13 Tom Tromey <tom@tromey.com>
2188
2189 * ada-valprint.c (val_print_packed_array_elements): Remove
2190 bitoffset and val parameters. Call common_val_print.
2191 (ada_val_print_string): Remove offset, address, and original_value
2192 parameters.
2193 (ada_val_print_array): Update.
2194 (ada_value_print_array): New function.
2195 (ada_value_print_1): Call it.
2196
2197 2020-03-13 Tom Tromey <tom@tromey.com>
2198
2199 * ada-valprint.c (ada_value_print): Use common_val_print.
2200
2201 2020-03-13 Tom Tromey <tom@tromey.com>
2202
2203 * ada-valprint.c (ada_val_print_ref): Use common_val_print.
2204
2205 2020-03-13 Tom Tromey <tom@tromey.com>
2206
2207 * ada-valprint.c (ada_value_print_num): New function.
2208 (ada_value_print_1): Use it.
2209
2210 2020-03-13 Tom Tromey <tom@tromey.com>
2211
2212 * ada-valprint.c (ada_value_print_1) <TYPE_CODE_FLT>: Rewrite.
2213
2214 2020-03-13 Tom Tromey <tom@tromey.com>
2215
2216 * ada-valprint.c (ada_value_print_ptr): New function.
2217 (ada_value_print_1): Use it.
2218
2219 2020-03-13 Tom Tromey <tom@tromey.com>
2220
2221 * ada-valprint.c (ada_val_print_gnat_array): Take a struct value;
2222 call common_val_print.
2223 (ada_val_print_1): Update.
2224 (ada_value_print_1): New function.
2225 (ada_value_print_inner): Rewrite.
2226
2227 2020-03-13 Tom Tromey <tom@tromey.com>
2228
2229 * cp-valprint.c (cp_print_value_fields): Update.
2230 (cp_print_value): New function.
2231
2232 2020-03-13 Tom Tromey <tom@tromey.com>
2233
2234 * m2-valprint.c (m2_value_print_inner): Use
2235 cp_print_value_fields.
2236 * cp-valprint.c (cp_print_value_fields): New function.
2237 * c-valprint.c (c_value_print_struct): New function.
2238 (c_value_print_inner): Use c_value_print_struct.
2239 * c-lang.h (cp_print_value_fields): Declare.
2240
2241 2020-03-13 Tom Tromey <tom@tromey.com>
2242
2243 * c-valprint.c (c_value_print_array): New function.
2244 (c_value_print_inner): Use it.
2245
2246 2020-03-13 Tom Tromey <tom@tromey.com>
2247
2248 * c-valprint.c (c_value_print_memberptr): New function.
2249 (c_value_print_inner): Use it.
2250
2251 2020-03-13 Tom Tromey <tom@tromey.com>
2252
2253 * c-valprint.c (c_value_print_int): New function.
2254 (c_value_print_inner): Use it.
2255
2256 2020-03-13 Tom Tromey <tom@tromey.com>
2257
2258 * c-valprint.c (c_value_print_ptr): New function.
2259 (c_value_print_inner): Use it.
2260
2261 2020-03-13 Tom Tromey <tom@tromey.com>
2262
2263 * c-valprint.c (c_value_print_inner): Rewrite.
2264
2265 2020-03-13 Tom Tromey <tom@tromey.com>
2266
2267 * valprint.c (generic_value_print_complex): New function.
2268 (generic_value_print): Use it.
2269
2270 2020-03-13 Tom Tromey <tom@tromey.com>
2271
2272 * valprint.c (generic_val_print_float): Don't call
2273 val_print_scalar_formatted.
2274 (generic_val_print, generic_value_print): Update.
2275
2276 2020-03-13 Tom Tromey <tom@tromey.com>
2277
2278 * valprint.c (generic_value_print_char): New function
2279 (generic_value_print): Use it.
2280
2281 2020-03-13 Tom Tromey <tom@tromey.com>
2282
2283 * valprint.c (generic_value_print_int): New function.
2284 (generic_value_print): Use it.
2285
2286 2020-03-13 Tom Tromey <tom@tromey.com>
2287
2288 * valprint.c (generic_value_print_bool): New function.
2289 (generic_value_print): Use it.
2290
2291 2020-03-13 Tom Tromey <tom@tromey.com>
2292
2293 * valprint.c (generic_val_print_func): Simplify.
2294 (generic_val_print, generic_value_print): Update.
2295
2296 2020-03-13 Tom Tromey <tom@tromey.com>
2297
2298 * valprint.c (generic_val_print_flags): Remove.
2299 (generic_val_print, generic_value_print): Update.
2300 (val_print_type_code_flags): Add original_value parameter.
2301
2302 2020-03-13 Tom Tromey <tom@tromey.com>
2303
2304 * valprint.c (generic_val_print): Update.
2305 (generic_value_print): Update.
2306 * valprint.c (generic_val_print_enum): Don't call
2307 val_print_scalar_formatted.
2308
2309 2020-03-13 Tom Tromey <tom@tromey.com>
2310
2311 * valprint.c (generic_value_print): Call generic_value_print_ptr.
2312 * valprint.c (generic_value_print_ptr): New function.
2313
2314 2020-03-13 Tom Tromey <tom@tromey.com>
2315
2316 * valprint.c (generic_value_print): Rewrite.
2317
2318 2020-03-13 Tom Tromey <tom@tromey.com>
2319
2320 * p-valprint.c (pascal_object_print_value_fields)
2321 (pascal_object_print_value): New functions.
2322
2323 2020-03-13 Tom Tromey <tom@tromey.com>
2324
2325 * p-valprint.c (pascal_value_print_inner): Rewrite.
2326
2327 2020-03-13 Tom Tromey <tom@tromey.com>
2328
2329 * f-valprint.c (f_value_print_innner): Rewrite.
2330
2331 2020-03-13 Tom Tromey <tom@tromey.com>
2332
2333 * m2-valprint.c (m2_print_unbounded_array): New overload.
2334 (m2_print_unbounded_array): Update.
2335 (m2_print_array_contents): Take a struct value.
2336 (m2_value_print_inner): Rewrite.
2337
2338 2020-03-13 Tom Tromey <tom@tromey.com>
2339
2340 * d-valprint.c (dynamic_array_type): Call d_value_print_inner.
2341 (d_value_print_inner): New function.
2342 * d-lang.h (d_value_print_inner): Declare.
2343 * d-lang.c (d_language_defn): Use d_value_print_inner.
2344
2345 2020-03-13 Tom Tromey <tom@tromey.com>
2346
2347 * go-valprint.c (go_value_print_inner): New function.
2348 * go-lang.h (go_value_print_inner): Declare.
2349 * go-lang.c (go_language_defn): Use go_value_print_inner.
2350
2351 2020-03-13 Tom Tromey <tom@tromey.com>
2352
2353 * rust-lang.c (val_print_struct, rust_print_enum): Use the value
2354 API.
2355 (rust_val_print): Rewrite.
2356 (rust_value_print_inner): New function, from rust_val_print.
2357 (rust_language_defn): Use rust_value_print_inner.
2358
2359 2020-03-13 Tom Tromey <tom@tromey.com>
2360
2361 * ada-valprint.c (ada_value_print_inner): New function.
2362 * ada-lang.h (ada_value_print_inner): Declare.
2363 * ada-lang.c (ada_language_defn): Use ada_value_print_inner.
2364
2365 2020-03-13 Tom Tromey <tom@tromey.com>
2366
2367 * f-valprint.c (f_value_print_innner): New function.
2368 * f-lang.h (f_value_print_innner): Declare.
2369 * f-lang.c (f_language_defn): Use f_value_print_innner.
2370
2371 2020-03-13 Tom Tromey <tom@tromey.com>
2372
2373 * p-valprint.c (pascal_value_print_inner): New function.
2374 * p-lang.h (pascal_value_print_inner): Declare.
2375 * p-lang.c (pascal_language_defn): Use pascal_value_print_inner.
2376
2377 2020-03-13 Tom Tromey <tom@tromey.com>
2378
2379 * m2-valprint.c (m2_value_print_inner): New function.
2380 * m2-lang.h (m2_value_print_inner): Declare.
2381 * m2-lang.c (m2_language_defn): Use m2_value_print_inner.
2382
2383 2020-03-13 Tom Tromey <tom@tromey.com>
2384
2385 * opencl-lang.c (opencl_language_defn): Use c_value_print_inner.
2386 * objc-lang.c (objc_language_defn): Use c_value_print_inner.
2387 * c-valprint.c (c_value_print_inner): New function.
2388 * c-lang.h (c_value_print_inner): Declare.
2389 * c-lang.c (c_language_defn, cplus_language_defn)
2390 (asm_language_defn, minimal_language_defn): Use
2391 c_value_print_inner.
2392
2393 2020-03-13 Tom Tromey <tom@tromey.com>
2394
2395 * p-valprint.c (pascal_object_print_value_fields): Now static.
2396 * p-lang.h (pascal_object_print_value_fields): Don't declare.
2397
2398 2020-03-13 Tom Tromey <tom@tromey.com>
2399
2400 * c-valprint.c (c_val_print_array): Simplify.
2401
2402 2020-03-13 Tom Tromey <tom@tromey.com>
2403
2404 * valprint.c (value_print_array_elements): New function.
2405 * valprint.h (value_print_array_elements): Declare.
2406
2407 2020-03-13 Tom Tromey <tom@tromey.com>
2408
2409 * printcmd.c (print_formatted): Use value_print_scalar_formatted.
2410 * mips-tdep.c (mips_print_register): Use
2411 value_print_scalar_formatted.
2412
2413 2020-03-13 Tom Tromey <tom@tromey.com>
2414
2415 * valprint.h (value_print_scalar_formatted): Declare.
2416 * valprint.c (value_print_scalar_formatted): New function.
2417
2418 2020-03-13 Tom Tromey <tom@tromey.com>
2419
2420 * valprint.h (generic_value_print): Declare.
2421 * valprint.c (generic_value_print): New function.
2422
2423 2020-03-13 Tom Tromey <tom@tromey.com>
2424
2425 * valprint.c (do_val_print): Call la_value_print_inner, if
2426 available.
2427 * rust-lang.c (rust_language_defn): Update.
2428 * p-lang.c (pascal_language_defn): Update.
2429 * opencl-lang.c (opencl_language_defn): Update.
2430 * objc-lang.c (objc_language_defn): Update.
2431 * m2-lang.c (m2_language_defn): Update.
2432 * language.h (struct language_defn) <la_value_print_inner>: New
2433 member.
2434 * language.c (unknown_language_defn, auto_language_defn): Update.
2435 * go-lang.c (go_language_defn): Update.
2436 * f-lang.c (f_language_defn): Update.
2437 * d-lang.c (d_language_defn): Update.
2438 * c-lang.c (c_language_defn, cplus_language_defn)
2439 (asm_language_defn, minimal_language_defn): Update.
2440 * ada-lang.c (ada_language_defn): Update.
2441
2442 2020-03-13 Tom Tromey <tom@tromey.com>
2443
2444 * c-valprint.c (c_value_print): Use common_val_print.
2445
2446 2020-03-13 Tom Tromey <tom@tromey.com>
2447
2448 * cp-valprint.c (cp_print_static_field): Use common_val_print.
2449
2450 2020-03-13 Tom Tromey <tom@tromey.com>
2451
2452 * f-valprint.c (f77_print_array_1, f_val_print): Use
2453 common_val_print.
2454
2455 2020-03-13 Tom Tromey <tom@tromey.com>
2456
2457 * riscv-tdep.c (riscv_print_one_register_info): Use
2458 common_val_print.
2459
2460 2020-03-13 Tom Tromey <tom@tromey.com>
2461
2462 * mi/mi-main.c (output_register): Use common_val_print.
2463
2464 2020-03-13 Tom Tromey <tom@tromey.com>
2465
2466 * infcmd.c (default_print_one_register_info): Use
2467 common_val_print.
2468
2469 2020-03-13 Tom Tromey <tom@tromey.com>
2470
2471 * valprint.h (common_val_print_checked): Declare.
2472 * valprint.c (common_val_print_checked): New function.
2473 * stack.c (print_frame_arg): Use common_val_print_checked.
2474
2475 2020-03-13 Tom Tromey <tom@tromey.com>
2476
2477 * valprint.c (do_val_print): New function, from val_print.
2478 (val_print): Use do_val_print.
2479 (common_val_print): Use do_val_print.
2480
2481 2020-03-13 Tom Tromey <tom@tromey.com>
2482
2483 * valprint.c (value_print): Use scoped_value_mark.
2484
2485 2020-03-13 Tom de Vries <tdevries@suse.de>
2486
2487 PR symtab/25646
2488 * psymtab.c (partial_symtab::partial_symtab): Don't set
2489 globals_offset and statics_offset. Push element onto
2490 current_global_psymbols and current_static_psymbols stacks.
2491 (concat): New function.
2492 (end_psymtab_common): Set globals_offset and statics_offset. Pop
2493 element from current_global_psymbols and current_static_psymbols
2494 stacks. Concat popped elements to global_psymbols and
2495 static_symbols.
2496 (add_psymbol_to_list): Use current_global_psymbols and
2497 current_static_psymbols stacks.
2498 * psymtab.h (class psymtab_storage): Add current_global_psymbols and
2499 current_static_psymbols fields.
2500
2501 2020-03-12 Christian Biesinger <cbiesinger@google.com>
2502
2503 * corelow.c (sniff_core_bfd): Remove.
2504 (class core_target) <m_core_vec>: Remove.
2505 (core_target::core_target): Update.
2506 (core_file_fns): Remove.
2507 (deprecated_add_core_fns): Remove.
2508 (default_core_sniffer): Remove.
2509 (sniff_core_bfd): Remove.
2510 (default_check_format): Remove.
2511 (gdb_check_format): Remove.
2512 (core_target_open): Update.
2513 (core_target::get_core_register_section): Update.
2514 (get_core_registers_cb): Update.
2515 (core_target::fetch_registers): Update.
2516 * gdbcore.h (struct core_fns): Remove.
2517 (deprecated_add_core_fns): Remove.
2518 (default_core_sniffer): Remove.
2519 (default_check_format): Remove.
2520
2521 2020-03-12 Tom Tromey <tom@tromey.com>
2522
2523 * arm-tdep.c (struct arm_mapping_symbol) <value>: Now a
2524 CORE_ADDR.
2525 (struct arm_exidx_entry) <addr>: Now a CORE_ADDR.
2526
2527 2020-03-12 Tom Tromey <tom@tromey.com>
2528
2529 * remote.c (remote_target::download_tracepoint)
2530 (remote_target::enable_tracepoint)
2531 (remote_target::disable_tracepoint): Use phex, not sprintf_vma.
2532 * breakpoint.c (print_recreate_masked_watchpoint): Use phex, not
2533 sprintf_vma.
2534
2535 2020-03-12 Tom Tromey <tom@tromey.com>
2536
2537 * symfile-mem.c: Update CORE_ADDR size assert.
2538
2539 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2540
2541 * selftest.m4: Move to gdbsupport/.
2542 * acinclude.m4: Update path to selftest.m4.
2543
2544 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2545
2546 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Rename to...
2547 (SELFTESTS_SRCS): ... this. Add disasm-selftests.c,
2548 gdbarch-selfselftests.c and selftest-arch.c.
2549 (SUBDIR_UNITTESTS_OBS): Rename to...
2550 (SELFTESTS_OBS): ... this.
2551 (COMMON_SFILES): Remove disasm-selftests.c and
2552 gdbarch-selftests.c.
2553 * configure.ac: Don't add selftest-arch.{c,o} to
2554 CONFIG_{SRCS,OBS}.
2555 * disasm-selftests.c, gdbarch-selftests.c: Remove GDB_SELF_TEST
2556 preprocessor conditions.
2557
2558 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2559
2560 * configure.ac: Don't source bfd/development.sh.
2561 * selftest.m4: Modify comment.
2562 * configure: Re-generate.
2563
2564 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2565
2566 * selftest.m4 (GDB_AC_SELFTEST): Error out if $development is
2567 not "true" or "false".
2568 * configure: Re-generate.
2569
2570 2020-03-12 Christian Biesinger <cbiesinger@google.com>
2571
2572 * Makefile.in (HFILES_NO_SRCDIR): Add new arm-nbsd-tdep.h file.
2573 * arm-nbsd-nat.c (arm_supply_gregset): Moved to arm-nbsd-tdep and
2574 renamed to arm_nbsd_supply_gregset.
2575 (fetch_register): Update to call arm_nbsd_supply_gregset.
2576 (fetch_regs): Remove in favor of fetch_register with a -1 regno.
2577 (arm_netbsd_nat_target::fetch_registers): Update.
2578 (fetch_elfcore_registers): Removed.
2579 (_initialize_arm_netbsd_nat): Removed call to deprecated_add_core_fns.
2580 * arm-nbsd-tdep.c (struct arm_nbsd_reg): New struct.
2581 (arm_nbsd_supply_gregset): Moved from arm-nbsd-nat.c and updated to
2582 not require NetBSD system headers.
2583 (arm_nbsd_regset): New struct.
2584 (arm_nbsd_iterate_over_regset_sections): New function.
2585 (arm_netbsd_init_abi_common): Updated to call
2586 set_gdbarch_iterate_over_regset_sections.
2587 * arm-nbsd-tdep.h: New file.
2588
2589 2020-03-11 Kevin Buettner <kevinb@redhat.com>
2590
2591 * symtab.c (find_pc_sect_line): Add check which prevents infinite
2592 recursion.
2593
2594 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
2595
2596 * configure: Re-generate.
2597
2598 2020-03-11 Tom Tromey <tromey@adacore.com>
2599
2600 * ada-typeprint.c (print_choices): Fix comment.
2601
2602 2020-03-11 Andrew Burgess <andrew.burgess@embecosm.com>
2603
2604 * buildsyms.c (buildsym_compunit::record_line): Avoid accessing
2605 previous item in the list, when the list has no items.
2606
2607 2020-03-11 Tom de Vries <tdevries@suse.de>
2608
2609 * dwarf2/loc.c (dwarf2_evaluate_property): Handle NULL frame in
2610 PROP_LOCLIST handling code.
2611
2612 2020-03-10 Andrew Burgess <andrew.burgess@embecosm.com>
2613
2614 * buildsym-legacy.c (record_line): Pass extra parameter to
2615 record_line.
2616 * buildsym.c (buildsym_compunit::record_line): Take an extra
2617 parameter, reduce duplication in the line table, and record the
2618 is_stmt flag in the line table.
2619 * buildsym.h (buildsym_compunit::record_line): Add extra
2620 parameter.
2621 * disasm.c (do_mixed_source_and_assembly_deprecated): Ignore
2622 non-statement lines.
2623 * dwarf2/read.c (dwarf_record_line_1): Add extra parameter, pass
2624 this to the symtab builder.
2625 (dwarf_finish_line): Pass extra parameter to dwarf_record_line_1.
2626 (lnp_state_machine::record_line): Pass a suitable is_stmt flag
2627 through to dwarf_record_line_1.
2628 * infrun.c (process_event_stop_test): When stepping, don't stop at
2629 a non-statement instruction, and only refresh the step info when
2630 we land in the middle of a line's range. Also add an extra
2631 comment.
2632 * jit.c (jit_symtab_line_mapping_add_impl): Initialise is_stmt
2633 field.
2634 * record-btrace.c (btrace_find_line_range): Only record lines
2635 marked as is-statement.
2636 * stack.c (frame_show_address): Show the frame address if we are
2637 in a non-statement sal.
2638 * symmisc.c (dump_symtab_1): Print the is_stmt flag.
2639 (maintenance_print_one_line_table): Print a header for the is_stmt
2640 column, and include is_stmt information in the output.
2641 * symtab.c (find_pc_sect_line): Find lines marked as statements in
2642 preference to non-statements.
2643 (find_pcs_for_symtab_line): Prefer is-statement entries.
2644 (find_line_common): Likewise.
2645 * symtab.h (struct linetable_entry): Add is_stmt field.
2646 (struct symtab_and_line): Likewise.
2647 * xcoffread.c (arrange_linetable): Initialise is_stmt field when
2648 arranging the line table.
2649
2650 2020-03-07 Tom de Vries <tdevries@suse.de>
2651
2652 * dwarf2/read.c (read_typedef): Treat anonymous typedef as forwarder
2653 DIE.
2654
2655 2020-03-07 Tom Tromey <tom@tromey.com>
2656
2657 * valops.c (value_literal_complex): Remove obsolete comment.
2658 * gdbtypes.h (enum type_code) <TYPE_CODE_FLT>: Remove obsolete
2659 comment.
2660
2661 2020-03-06 Simon Marchi <simon.marchi@polymtl.ca>
2662
2663 * infrun.h: Forward-declare thread_info.
2664 (set_step_info): Add thread_info parameter, add doc.
2665 * infrun.c (set_step_info): Add thread_info parameter, move doc
2666 to header.
2667 * infrun.c (process_event_stop_test): Pass thread to
2668 set_step_info call.
2669 * infcmd.c (set_step_frame): Add thread_info pointer, pass it to
2670 set_step_info.
2671 (prepare_one_step): Add thread_info parameter, pass it to
2672 set_step_frame and prepare_one_step (recursive) call.
2673 (step_1): Pass thread to prepare_one_step call.
2674 (step_command_fsm::should_stop): Pass thread to
2675 prepare_one_step.
2676 (until_next_fsm): Pass thread to set_step_frame call.
2677 (finish_command): Pass thread to set_step_info call.
2678
2679 2020-03-06 Hannes Domani <ssbssa@yahoo.de>
2680
2681 * windows-tdep.c (windows_solib_create_inferior_hook):
2682 Check if inferior is running.
2683
2684 2020-03-06 Tom de Vries <tdevries@suse.de>
2685
2686 * NEWS: Fix "the the".
2687 * ctfread.c: Same.
2688
2689 2020-03-06 Tom de Vries <tdevries@suse.de>
2690
2691 * psymtab.c (psymtab_to_symtab): Don't print "done.".
2692
2693 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2694
2695 * .dir-locals.el: Add a comment referencing the other copies of
2696 this file.
2697
2698 2020-03-05 John Baldwin <jhb@FreeBSD.org>
2699
2700 * fbsd-tdep.c (fbsd_make_corefile_notes): Use std::string for
2701 psargs.
2702
2703 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2704
2705 * .gitattributes: New file.
2706
2707 2020-03-04 Tom Tromey <tom@tromey.com>
2708
2709 * symmisc.c (print_symbol_bcache_statistics)
2710 (print_objfile_statistics): Update.
2711 * symfile.c (allocate_symtab): Use intern.
2712 * psymtab.c (partial_symtab::partial_symtab): Use intern.
2713 * objfiles.h (struct objfile_per_bfd_storage) <filename_cache,
2714 macro_cache>: Remove.
2715 <string_cache>: New member.
2716 (struct objfile) <intern>: New methods.
2717 * elfread.c (elf_symtab_read): Use intern.
2718 * dwarf2/read.c (fixup_go_packaging): Intern package name.
2719 (dwarf2_compute_name, dwarf2_physname)
2720 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2): Intern
2721 names.
2722 (guess_partial_die_structure_name): Update.
2723 (partial_die_info::fixup): Intern name.
2724 (dwarf2_canonicalize_name): Change parameter to objfile. Intern
2725 name.
2726 (dwarf2_name): Intern name. Update.
2727 * buildsym.c (buildsym_compunit::get_macro_table): Use
2728 string_cache.
2729
2730 2020-03-04 Tom Tromey <tom@tromey.com>
2731
2732 * jit.c (bfd_open_from_target_memory): Make "target" const.
2733 * corefile.c (gnutarget): Now const.
2734 * gdbcore.h (gnutarget): Now const.
2735
2736 2020-03-04 Hannes Domani <ssbssa@yahoo.de>
2737
2738 * NEWS: Mention support for WOW64 processes.
2739 * amd64-windows-nat.c (amd64_mappings): Rename and remove static.
2740 (amd64_windows_segment_register_p): Remove static.
2741 (_initialize_amd64_windows_nat): Update.
2742 * configure.nat <windows> (NATDEPFILES): Add i386-windows-nat.o.
2743 * i386-windows-nat.c (context_offset): Update.
2744 (i386_mappings): Rename and remove static.
2745 (i386_windows_segment_register_p): Remove static.
2746 (_initialize_i386_windows_nat): Update.
2747 * windows-nat.c (STATUS_WX86_BREAKPOINT): New macro.
2748 (STATUS_WX86_SINGLE_STEP): New macro.
2749 (EnumProcessModulesEx): New macro.
2750 (Wow64SuspendThread): New macro.
2751 (Wow64GetThreadContext): New macro.
2752 (Wow64SetThreadContext): New macro.
2753 (Wow64GetThreadSelectorEntry): New macro.
2754 (windows_set_context_register_offsets): Add static.
2755 (windows_set_segment_register_p): Likewise.
2756 (windows_add_thread): Adapt for WOW64 processes.
2757 (windows_fetch_one_register): Likewise.
2758 (windows_nat_target::fetch_registers): Likewise.
2759 (windows_store_one_register): Likewise.
2760 (display_selector): Likewise.
2761 (display_selectors): Likewise.
2762 (handle_exception): Likewise.
2763 (windows_continue): Likewise.
2764 (windows_nat_target::resume): Likewise.
2765 (windows_add_all_dlls): Likewise.
2766 (do_initial_windows_stuff): Likewise.
2767 (windows_nat_target::attach): Likewise.
2768 (windows_get_exec_module_filename): Likewise.
2769 (windows_nat_target::create_inferior): Likewise.
2770 (windows_xfer_siginfo): Likewise.
2771 (_initialize_loadable): Initialize Wow64SuspendThread,
2772 Wow64GetThreadContext, Wow64SetThreadContext,
2773 Wow64GetThreadSelectorEntry and EnumProcessModulesEx.
2774 * windows-nat.h (windows_set_context_register_offsets):
2775 Remove declaration.
2776 (windows_set_segment_register_p): Likewise.
2777 (i386_windows_segment_register_p): Add declaration.
2778 (amd64_windows_segment_register_p): Likewise.
2779
2780 2020-03-04 Luis Machado <luis.machado@linaro.org>
2781
2782 Revert aa66aac47b4dd38f9524ddb5546c08cc09930d37 due to regressions
2783 in "info registers" for AArch64/ARM.
2784
2785 The change caused "info registers" to not print GPR's.
2786
2787 gdb/ChangeLog:
2788
2789 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
2790
2791 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
2792 when reg->group is empty and reggroup is not.
2793
2794 2020-03-03 Tom Tromey <tromey@adacore.com>
2795
2796 * dwarf2/frame.c (struct dwarf2_frame_cache)
2797 <checked_tailcall_bottom, entry_cfa_sp_offset,
2798 entry_cfa_sp_offset_p>: Remove members.
2799 (dwarf2_frame_cache): Call dwarf2_tailcall_sniffer_first.
2800 (dwarf2_frame_prev_register): Don't call
2801 dwarf2_tailcall_sniffer_first.
2802 (dwarf2_append_unwinders): Don't append tailcall unwinder.
2803 * frame-unwind.c (add_unwinder): New fuction.
2804 (frame_unwind_init): Use it. Add tailcall unwinder.
2805
2806 2020-03-03 Andrew Burgess <andrew.burgess@embecosm.com>
2807 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
2808
2809 * f-valprint.c (f_val_print): Handle TYPE_CODE_BOOL, any non-zero
2810 value should be printed as true.
2811
2812 2020-03-03 Hannes Domani <ssbssa@yahoo.de>
2813
2814 * windows-tdep.c (windows_solib_create_inferior_hook): New function.
2815 (windows_init_abi): Set and use windows_so_ops.
2816
2817 2020-03-03 Sergio Durigan Junior <sergiodj@redhat.com>
2818
2819 * printcmd.c (print_c_string): Check also for TYPE_CODE_PTR
2820 when verifying if dealing with a convenience variable.
2821
2822 2020-03-03 Luis Machado <luis.machado@linaro.org>
2823
2824 * auxv.c (default_print_auxv_entry): Add new AUXV entries.
2825
2826 2020-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2827
2828 * infrun.c (gdbarch_supports_displaced_stepping): New.
2829 (use_displaced_stepping): Break up conditions in smaller pieces.
2830 Use gdbarch_supports_displaced_stepping.
2831 (displaced_step_prepare_throw): Use
2832 gdbarch_supports_displaced_stepping.
2833
2834 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2835
2836 * NEWS: Mention new behaviour of the history filename.
2837 * top.c (write_history_p): Add comment.
2838 (show_write_history_p): Add header comment, give a different
2839 message when history writing is on, but the history filename is
2840 empty.
2841 (history_filename): Add comment.
2842 (history_filename_empty): New function.
2843 (show_history_filename): Add header comment, give a different
2844 message when the filename is empty.
2845 (init_history): Compare history_filename against nullptr, and only
2846 read history if the filename is not empty.
2847 (set_history_filename): Add header comment, and only make
2848 non-empty filenames absolute.
2849 (init_main): Make the filename argument to 'set history filename'
2850 optional.
2851
2852 2020-03-02 Christian Biesinger <cbiesinger@google.com>
2853
2854 * arm-nbsd-nat.c (arm_supply_fparegset): Rename to...
2855 (arm_supply_vfpregset): ...this, and update to use VFP registers.
2856 (fetch_fp_register): Update.
2857 (fetch_fp_regs): Update.
2858 (store_fp_register): Update.
2859 (store_fp_regs): Update.
2860 (arm_netbsd_nat_target::read_description): New function.
2861 (fetch_elfcore_registers): Update.
2862
2863 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2864
2865 * remote.c (remote_target::remote_parse_stop_reply): Don't use the
2866 general_thread if the stop reply is missing a thread-id.
2867 (remote_target::process_stop_reply): Use the first non-exited
2868 thread if the target didn't pass a thread-id.
2869 * infrun.c (do_target_wait): Move call to
2870 switch_to_inferior_no_thread to ....
2871 (do_target_wait_1): ... here.
2872
2873 2020-02-29 Jon Turney <jon.turney@dronecode.org.uk>
2874
2875 * debuginfod-support.c: Include defs.h first.
2876
2877 2020-02-28 Tom de Vries <tdevries@suse.de>
2878
2879 * symfile.c (set_initial_language): Use default language for lookup.
2880
2881 2020-02-28 Simon Marchi <simon.marchi@efficios.com>
2882
2883 * dwarf2/read.c (cutu_reader::init_tu_and_read_dwo_dies): Remove
2884 reader variable, pass `this` to read_cutu_die_from_dwo.
2885
2886 2020-02-27 Aaron Merey <amerey@redhat.com>
2887
2888 * source.c (open_source_file): Check for nullptr when computing
2889 srcpath.
2890
2891 2020-02-27 Tom Tromey <tromey@adacore.com>
2892
2893 * dwarf2/read.c (struct field_info) <nfields>: Now a method, not a
2894 member.
2895 (dwarf2_add_field): Don't update nfields.
2896 (dwarf2_attach_fields_to_type, process_structure_scope): Update.
2897
2898 2020-02-27 Andrew Burgess <andrew.burgess@embecosm.com>
2899
2900 * gdbtypes.c (create_array_type_with_stride): Use std::abs not
2901 abs.
2902
2903 2020-02-26 Tom Tromey <tom@tromey.com>
2904
2905 * dwarf2/read.c (struct dwarf2_include_psymtab): New.
2906 (dwarf2_create_include_psymtab): Use dwarf2_include_psymtab.
2907 (dwarf2_psymtab::expand_psymtab, dwarf2_psymtab::readin_p)
2908 (dwarf2_psymtab::get_compunit_symtab): Remove null checks for
2909 per_cu_data.
2910
2911 2020-02-26 Tom Tromey <tom@tromey.com>
2912
2913 * dwarf2/index-write.c (psym_index_map): Change type.
2914 (add_address_entry_worker, write_one_signatured_type)
2915 (recursively_count_psymbols, recursively_write_psymbols)
2916 (class debug_names, psyms_seen_size, write_gdbindex)
2917 (write_debug_names): Use partial_symtab, not dwarf2_psymtab.
2918
2919 2020-02-26 Aaron Merey <amerey@redhat.com>
2920
2921 * Makefile.in: Handle optional debuginfod support.
2922 * NEWS: Update.
2923 * README: Add --with-debuginfod summary.
2924 * config.in: Regenerate.
2925 * configure: Regenerate.
2926 * configure.ac: Handle optional debuginfod support.
2927 * debuginfod-support.c: debuginfod helper functions.
2928 * debuginfod-support.h: Ditto.
2929 * doc/gdb.texinfo: Add --with-debuginfod to configure options
2930 summary.
2931 * dwarf2/read.c (dwarf2_get_dwz_file): Query debuginfod servers
2932 when a dwz file cannot be found.
2933 * elfread.c (elf_symfile_read): Query debuginfod servers when a
2934 debuginfo file cannot be found.
2935 * source.c (open_source_file): Query debuginfod servers when a
2936 source file cannot be found.
2937 * top.c (print_gdb_configuration): Include
2938 --{with,without}-debuginfod in the output.
2939
2940 2020-02-26 Jérémie Galarneau <jeremie.galarneau@efficios.com>
2941
2942 * thread.c (thr_try_catch_cmd): Print thread name.
2943
2944 2020-02-26 Simon Marchi <simon.marchi@efficios.com>
2945
2946 * dwarf2/loc.h (dwarf2_fetch_die_loc_sect_off,
2947 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
2948 dwarf2_fetch_die_type_sect_off): Move to...
2949 * dwarf2/read.h (dwarf2_fetch_die_loc_sect_off,
2950 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
2951 dwarf2_fetch_die_type_sect_off): ... here.
2952 * dwarf2/read.c (dwarf2_fetch_die_loc_sect_off,
2953 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
2954 dwarf2_fetch_die_type_sect_off): Move doc to header file.
2955
2956 2020-02-26 Tom de Vries <tdevries@suse.de>
2957
2958 PR gdb/25603
2959 * symfile.c (set_initial_language): Exit-early if
2960 language_mode == language_mode_manual.
2961
2962 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
2963
2964 * dwarf2/loc.h (dwarf2_read_addr_index): Move...
2965 * dwarf2/read.h (dwarf2_read_addr_index): ... here.
2966 * dwarf2/read.c (dwarf2_read_addr_index): Move doc to header.
2967
2968 2020-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
2969
2970 * gdbtypes.c (create_array_type_with_stride): Handle negative
2971 array strides.
2972 * valarith.c (value_subscripted_rvalue): Likewise.
2973
2974 2020-02-25 Luis Machado <luis.machado@linaro.org>
2975
2976 * aarch64-tdep.c (aarch64_vnv_type): Fix comment typo.
2977
2978 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
2979
2980 * loc.h (dwarf2_get_die_type): Move to...
2981 * read.h (dwarf2_get_die_type): ... here.
2982 * read.c (dwarf2_get_die_type): Move doc to header.
2983
2984 2020-02-25 Joel Brobecker <brobecker@adacore.com>
2985
2986 * copypright.py (EXCLUDE_LIST): Add 'gnulib/config.in' and
2987 'gnulib/Makefile.in' to the list.
2988
2989 2020-02-24 Tom Tromey <tom@tromey.com>
2990
2991 * dwarf2/read.h (struct type_unit_unshareable) <num_symtabs>:
2992 Remove.
2993 * dwarf2/read.c (dwarf2_cu::setup_type_unit_groups): Use
2994 XOBNEWVEC.
2995
2996 2020-02-24 Tom Tromey <tom@tromey.com>
2997
2998 * dwarf2/read.h (struct dwarf2_per_cu_data) <type_unit_group_p>:
2999 New method.
3000 * dwarf2/read.c (IS_TYPE_UNIT_GROUP): Remove.
3001 (dw2_do_instantiate_symtab, dw2_get_file_names)
3002 (build_type_psymtab_dependencies, load_full_type_unit): Update.
3003
3004 2020-02-24 Tom Tromey <tom@tromey.com>
3005
3006 * dwarf2read.c (dwarf2_build_psymtabs_hard): Use
3007 make_scoped_restore.
3008 (dwarf2_psymtab::read_symtab): Don't clear
3009 reading_partial_symbols.
3010
3011 2020-02-24 Tom de Vries <tdevries@suse.de>
3012
3013 PR gdb/25592
3014 * stack.c (iterate_over_block_locals): Handle LOC_CONST.
3015
3016 2020-02-24 Tom de Vries <tdevries@suse.de>
3017
3018 * tui/tui-layout.c (_initialize_tui_layout): Fix help messages for
3019 commands layout next/prev/regs.
3020
3021 2020-02-22 Tom Tromey <tom@tromey.com>
3022
3023 * dwarf2/loc.h (dwarf2_compile_expr_to_ax): Don't declare.
3024 * dwarf2/loc.c (dwarf2_compile_expr_to_ax): Now static.
3025
3026 2020-02-22 Tom Tromey <tom@tromey.com>
3027
3028 * tui/tui-data.h (TUI_DISASM_WIN): Cast to tui_disasm_window.
3029
3030 2020-02-22 Tom Tromey <tom@tromey.com>
3031
3032 * tui/tui-win.c (_initialize_tui_win): Add usage text.
3033 * tui/tui-stack.c (_initialize_tui_stack): Add usage text.
3034 * tui/tui-regs.c (_initialize_tui_regs): Add usage text.
3035 * tui/tui.c (_initialize_tui): Add usage text.
3036
3037 2020-02-22 Tom Tromey <tom@tromey.com>
3038
3039 * tui/tui-win.c (tui_set_focus_command)
3040 (tui_set_win_height_command): Use error_no_arg.
3041 (_initialize_tui_win): Update help text.
3042 (FOCUS_USAGE, WIN_HEIGHT_USAGE): Don't define.
3043
3044 2020-02-22 Tom Tromey <tom@tromey.com>
3045
3046 * tui/tui-layout.c (extract_display_start_addr): Rewrite.
3047 * tui/tui-disasm.h (struct tui_disasm_window)
3048 <display_start_addr>: Declare.
3049 * tui/tui-source.h (struct tui_source_window)
3050 <display_start_addr>: Declare.
3051 * tui/tui-winsource.h (struct tui_source_window_base)
3052 <show_source_line, display_start_addr>: New methods.
3053 <m_horizontal_offset, m_start_line_or_addr, m_gdbarch, m_content>:
3054 Rename and move to protected section.
3055 * tui/tui-winsource.c (tui_source_window_base::update_source_window)
3056 (tui_source_window_base::do_erase_source_content): Update.
3057 (tui_source_window_base::show_source_line): Now a method.
3058 (tui_source_window_base::show_source_content)
3059 (tui_source_window_base::tui_source_window_base)
3060 (tui_source_window_base::rerender)
3061 (tui_source_window_base::refill)
3062 (tui_source_window_base::do_scroll_horizontal)
3063 (tui_source_window_base::set_is_exec_point_at)
3064 (tui_source_window_base::update_breakpoint_info)
3065 (tui_source_window_base::update_exec_info): Update.
3066 * tui/tui-source.c (tui_source_window::set_contents)
3067 (tui_source_window::showing_source_p)
3068 (tui_source_window::do_scroll_vertical)
3069 (tui_source_window::location_matches_p)
3070 (tui_source_window::line_is_displayed): Update.
3071 (tui_source_window::display_start_addr): New method.
3072 * tui/tui-disasm.c (tui_disasm_window::set_contents)
3073 (tui_disasm_window::do_scroll_vertical)
3074 (tui_disasm_window::location_matches_p): Update.
3075 (tui_disasm_window::display_start_addr): New method.
3076
3077 2020-02-22 Tom Tromey <tom@tromey.com>
3078
3079 * NEWS: Add entry for gdb.register_window_type.
3080 * tui/tui-layout.h (window_factory): New typedef.
3081 (tui_register_window): Declare.
3082 * tui/tui-layout.c (saved_tui_windows): New global.
3083 (tui_apply_current_layout): Use it.
3084 (tui_register_window): New function.
3085 * python/python.c (do_start_initialization): Call
3086 gdbpy_initialize_tui.
3087 (python_GdbMethods): Add "register_window_type" function.
3088 * python/python-internal.h (gdbpy_register_tui_window)
3089 (gdbpy_initialize_tui): Declare.
3090 * python/py-tui.c: New file.
3091 * Makefile.in (SUBDIR_PYTHON_SRCS): Add py-tui.c.
3092
3093 2020-02-22 Tom Tromey <tom@tromey.com>
3094
3095 * tui/tui-io.c (do_tui_putc): Don't omit annotations.
3096
3097 2020-02-22 Tom Tromey <tom@tromey.com>
3098
3099 * tui/tui-win.c (tui_set_win_focus_to): Move to tui-data.c.
3100 * tui/tui-data.h (tui_set_win_with_focus): Don't declare.
3101 * tui/tui-data.c (tui_set_win_with_focus): Remove.
3102 (tui_set_win_focus_to): Move from tui-win.c.
3103
3104 2020-02-22 Tom Tromey <tom@tromey.com>
3105
3106 * tui/tui-layout.c (make_standard_window, get_locator_window): New
3107 functions.
3108 (known_window_types): New global.
3109 (tui_get_window_by_name): Reimplement.
3110 (initialize_known_windows): New function.
3111 (validate_window_name): Rewrite.
3112 (_initialize_tui_layout): Call initialize_known_windows.
3113
3114 2020-02-22 Tom Tromey <tom@tromey.com>
3115
3116 * tui/tui.h (enum tui_win_type) <LOCATOR_WIN, DATA_ITEM_WIN>:
3117 Remove constants.
3118 * tui/tui-winsource.h (struct tui_source_window_base)
3119 <tui_source_window_base>: Remove parameter.
3120 * tui/tui-winsource.c
3121 (tui_source_window_base::tui_source_window_base): Remove
3122 parameter.
3123 (tui_source_window_base::refill): Update.
3124 * tui/tui-stack.h (struct tui_locator_window)
3125 <tui_locator_window>: Update.
3126 * tui/tui-source.h (struct tui_source_window) <tui_source_window>:
3127 Default the constructor.
3128 * tui/tui-regs.h (struct tui_data_item_window)
3129 <tui_data_item_window>: Default the constructor.
3130 (struct tui_data_window) <tui_data_window>: Likewise.
3131 * tui/tui-disasm.h (struct tui_disasm_window) <tui_disasm_window>:
3132 Default the constructor.
3133 * tui/tui-data.h (struct tui_gen_win_info) <tui_gen_win_info>:
3134 Default the constructor.
3135 <type>: Remove.
3136 (struct tui_win_info) <tui_win_info>: Default the constructor.
3137 * tui/tui-data.c (tui_win_info::tui_win_info): Remove.
3138 * tui/tui-command.h (struct tui_cmd_window) <tui_cmd_window>:
3139 Default the constructor.
3140
3141 2020-02-22 Tom Tromey <tom@tromey.com>
3142
3143 * tui/tui-wingeneral.h (tui_make_all_invisible): Don't declare.
3144 * tui/tui-wingeneral.c (tui_make_all_invisible): Remove.
3145 * tui/tui-win.c (tui_resize_all): Don't call
3146 tui_delete_invisible_windows.
3147 * tui/tui-layout.c (tui_apply_current_layout): Delete windows when
3148 done.
3149 (tui_set_layout): Update.
3150 (tui_add_win_to_layout): Don't call tui_delete_invisible_windows.
3151 * tui/tui-data.h (tui_delete_invisible_windows): Don't declare.
3152 * tui/tui-data.c (tui_delete_invisible_windows): Remove.
3153
3154 2020-02-22 Tom Tromey <tom@tromey.com>
3155
3156 * tui/tui-win.c (tui_partial_win_by_name): Handle ambiguity
3157 correctly.
3158
3159 2020-02-22 Tom Tromey <tom@tromey.com>
3160
3161 * tui/tui-data.c (tui_next_win, tui_prev_win): Reimplement.
3162
3163 2020-02-22 Tom Tromey <tom@tromey.com>
3164
3165 * tui/tui-winsource.h (struct tui_source_window_iterator)
3166 <inner_iterator>: New etytypedef.
3167 <tui_source_window_iterator>: Take "end" parameter.
3168 <tui_source_window_iterator>: Take iterator.
3169 <operator*, advance>: Update.
3170 <m_iter>: Change type.
3171 <m_end>: New field.
3172 (struct tui_source_windows) <begin, end>: Update.
3173 * tui/tui-layout.c (tui_windows): New global.
3174 (tui_apply_current_layout): Clear tui_windows.
3175 (tui_layout_window::apply): Update tui_windows.
3176 * tui/tui-data.h (tui_windows): Declare.
3177 (all_tui_windows): Now inline function.
3178 (class tui_window_iterator, struct all_tui_windows): Remove.
3179
3180 2020-02-22 Tom Tromey <tom@tromey.com>
3181
3182 PR tui/17850:
3183 * tui/tui-win.c (tui_gen_win_info::max_width): New method.
3184 * tui/tui-layout.h (class tui_layout_base) <get_sizes>: Add
3185 "height" argument.
3186 (class tui_layout_window) <get_sizes>: Likewise.
3187 (class tui_layout_split) <tui_layout_split>: Add "vertical"
3188 argument.
3189 <get_sizes>: Add "height" argument.
3190 <m_vertical>: New field.
3191 * tui/tui-layout.c (tui_layout_split::clone): Update.
3192 (tui_layout_split::get_sizes): Add "height" argument.
3193 (tui_layout_split::adjust_size, tui_layout_split::apply): Update.
3194 (tui_new_layout_command): Parse "-horizontal".
3195 (_initialize_tui_layout): Update help string.
3196 (tui_layout_split::specification): Add "-horizontal" when needed.
3197 * tui/tui-layout.c (tui_layout_window::get_sizes): Add "height"
3198 argument.
3199 * tui/tui-data.h (struct tui_gen_win_info) <max_width, min_width>:
3200 New methods.
3201
3202 2020-02-22 Tom Tromey <tom@tromey.com>
3203
3204 * tui/tui-layout.h (enum tui_adjust_result): New.
3205 (class tui_layout_base) <adjust_size>: Return tui_adjust_result.
3206 (class tui_layout_window) <adjust_size>: Return
3207 tui_adjust_result. Rewrite.
3208 (class tui_layout_split) <adjust_size>: Return tui_adjust_result.
3209 * tui/tui-layout.c (tui_layout_split::adjust_size): Update.
3210
3211 2020-02-22 Tom Tromey <tom@tromey.com>
3212
3213 * tui/tui-layout.h (class tui_layout_split) <add_split>: Change
3214 parameter and return types.
3215 (class tui_layout_base) <specification>: Add "depth".
3216 (class tui_layout_window) <specification>: Add "depth".
3217 (class tui_layout_split) <specification>: Add "depth".
3218 * tui/tui-layout.c (tui_layout_split::add_split): Change parameter
3219 and return types.
3220 (tui_new_layout_command): Parse sub-layouts.
3221 (_initialize_tui_layout): Update help string.
3222 (tui_layout_window::specification): Add "depth".
3223 (add_layout_command): Update.
3224
3225 2020-02-22 Tom Tromey <tom@tromey.com>
3226
3227 * NEWS: Add "tui new-layout" item.
3228 * tui/tui-layout.c (add_layout_command): Return cmd_list_element.
3229 Add new-layout command to help text.
3230 (validate_window_name): New function.
3231 (tui_new_layout_command): New function.
3232 (_initialize_tui_layout): Register "new-layout".
3233 (tui_layout_window::specification): New method.
3234 (tui_layout_window::specification): New method.
3235 * tui/tui-layout.h (class tui_layout_base) <specification>: New
3236 method.
3237 (class tui_layout_window) <specification>: New method.
3238 (class tui_layout_split) <specification>: New method.
3239
3240 2020-02-22 Tom Tromey <tom@tromey.com>
3241
3242 * tui/tui.c (tui_enable): Call tui_set_initial_layout.
3243 * tui/tui-win.c (window_name_completer): Update comment.
3244 * tui/tui-layout.h (class tui_layout_base) <replace_window>:
3245 Declare method.
3246 (class tui_layout_window) <replace_window>: Likewise.
3247 (class tui_layout_split) <replace_window>: Likewise.
3248 (tui_set_layout): Don't declare.
3249 (tui_set_initial_layout): Declare function.
3250 * tui/tui-layout.c (layouts, applied_skeleton, src_regs_layout)
3251 (asm_regs_layout): New globals.
3252 (tui_current_layout, show_layout): Remove.
3253 (tui_set_layout, tui_add_win_to_layout): Rewrite.
3254 (find_layout, tui_apply_layout): New function.
3255 (layout_completer): Remove.
3256 (tui_next_layout): Reimplement.
3257 (tui_next_layout_command): New function.
3258 (tui_set_initial_layout, tui_prev_layout_command): New functions.
3259 (tui_regs_layout): Reimplement.
3260 (tui_regs_layout_command): New function.
3261 (extract_display_start_addr): Rewrite.
3262 (next_layout, prev_layout): Remove.
3263 (tui_layout_window::replace_window): New method.
3264 (tui_layout_split::replace_window): New method.
3265 (destroy_layout): New function.
3266 (layout_list): New global.
3267 (add_layout_command): New function.
3268 (initialize_layouts): Update.
3269 (tui_layout_command): New function.
3270 (_initialize_tui_layout): Install "layout" commands.
3271 * tui/tui-data.h (enum tui_layout_type): Remove.
3272 (tui_current_layout): Don't declare.
3273
3274 2020-02-22 Tom Tromey <tom@tromey.com>
3275
3276 * tui/tui-regs.c (tui_reg_layout): Remove.
3277 (tui_reg_command): Use tui_regs_layout.
3278 * tui/tui-layout.h (tui_reg_command): Declare.
3279 * tui/tui-layout.c (tui_reg_command): New function.
3280
3281 2020-02-22 Tom Tromey <tom@tromey.com>
3282
3283 * tui/tui.c (tui_rl_delete_other_windows): Call
3284 tui_remove_some_windows.
3285 * tui/tui-layout.h (class tui_layout_base) <remove_windows>:
3286 Declare method.
3287 (class tui_layout_window) <remove_windows>: New method.
3288 (class tui_layout_split) <remove_windows>: Declare.
3289 (tui_remove_some_windows): Declare.
3290 * tui/tui-layout.c (tui_remove_some_windows): New function.
3291 (tui_layout_split::remove_windows): New method.
3292
3293 2020-02-22 Tom Tromey <tom@tromey.com>
3294
3295 * tui/tui.c (tui_rl_change_windows): Call tui_next_layout.
3296 * tui/tui-layout.h (tui_next_layout): Declare.
3297 * tui/tui-layout.c (tui_next_layout): New function.
3298
3299 2020-02-22 Tom Tromey <tom@tromey.com>
3300
3301 * tui/tui-regs.c (tui_data_window::display_registers_from): Use
3302 correct coordinates.
3303
3304 2020-02-22 Tom Tromey <tom@tromey.com>
3305
3306 * tui/tui-layout.h (tui_add_win_to_layout): Add comment.
3307 * tui/tui-layout.c (tui_add_win_to_layout): Add assert. Remove
3308 DATA_WIN case.
3309
3310 2020-02-22 Tom Tromey <tom@tromey.com>
3311
3312 * tui/tui-disasm.c (tui_get_low_disassembly_address): Use
3313 TUI_DISASM_WIN, not tui_win_list.
3314
3315 2020-02-22 Tom Tromey <tom@tromey.com>
3316
3317 * valprint.c (generic_val_print_enum_1)
3318 (val_print_type_code_flags): Style member names.
3319 * rust-lang.c (val_print_struct, rust_print_enum)
3320 (rust_print_struct_def, rust_internal_print_type): Style member
3321 names.
3322 * p-valprint.c (pascal_object_print_value_fields): Style member
3323 names. Only call fprintf_symbol_filtered for static members.
3324 * m2-typeprint.c (m2_record_fields, m2_enum): Style member names.
3325 * f-valprint.c (f_val_print): Style member names.
3326 * f-typeprint.c (f_type_print_base): Style member names.
3327 * cp-valprint.c (cp_print_value_fields): Style member names. Only
3328 call fprintf_symbol_filtered for static members.
3329 (cp_print_class_member): Style member names.
3330 * c-typeprint.c (c_print_type_1, c_type_print_base_1): Style
3331 member names.
3332 * ada-valprint.c (ada_print_scalar): Style enum names.
3333 (ada_val_print_enum): Likewise.
3334 * ada-typeprint.c (print_enum_type): Style enum names.
3335
3336 2020-02-21 Tom Tromey <tom@tromey.com>
3337
3338 * psympriv.h (struct partial_symtab): Update comment.
3339
3340 2020-02-21 Tom Tromey <tromey@adacore.com>
3341
3342 * mips-tdep.h (mips_pc_is_mips16, mips_pc_is_micromips): Parameter
3343 type is CORE_ADDR.
3344
3345 2020-02-21 Tom de Vries <tdevries@suse.de>
3346
3347 PR gdb/25534
3348 * psymtab.c (partial_symtab::read_dependencies): Don't read dependency
3349 if dependencies[i]->user != NULL.
3350
3351 2020-02-21 Ali Tamur <tamur@google.com>
3352
3353 * dwarf2/read.c (dwarf2_name): Add null check.
3354
3355 2020-02-20 Tom Tromey <tom@tromey.com>
3356
3357 * dwarf2/read.c (dwarf2_find_containing_comp_unit): Use ">", not
3358 ">=", in binary search.
3359 (dwarf2_find_containing_comp_unit): New overload.
3360 (run_test): New self-test.
3361 (_initialize_dwarf2_read): Register new test.
3362
3363 2020-02-20 Nelson Chu <nelson.chu@sifive.com>
3364
3365 * riscv-tdep.c: Updated since the DECLARE_CSR is changed.
3366 * riscv-tdep.h: Likewise.
3367 * features/riscv/rebuild-csr-xml.sh: Generate the 64bit-csr.xml without
3368 rv32-only CSR.
3369 * features/riscv/64bit-csr.xml: Regenerated.
3370
3371 2020-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
3372 Tom Tromey <tom@tromey.com>
3373
3374 * utils.c (fputs_maybe_filtered): Call 'stream->puts' instead
3375 of 'fputc_unfiltered'.
3376 (putchar_unfiltered): Call 'fputc_unfiltered'.
3377 (fputc_unfiltered): Call 'fputs_unfiltered'.
3378
3379 2020-02-20 Andrew Burgess <andrew.burgess@embecosm.com>
3380
3381 * config.in: Regenerate.
3382 * configure: Regenerate.
3383 * configure.ac: Add --with-python-libdir option.
3384 * main.c: Use WITH_PYTHON_LIBDIR.
3385
3386 2020-02-19 Tom Tromey <tom@tromey.com>
3387
3388 * symtab.c (general_symbol_info::compute_and_set_names): Use
3389 obstack_strndup. Simplify call to symbol_set_demangled_name.
3390
3391 2020-02-19 Simon Marchi <simon.marchi@efficios.com>
3392
3393 * dwarf2/read.c (allocate_signatured_type_table,
3394 allocate_dwo_unit_table, allocate_type_unit_groups_table,
3395 allocate_dwo_file_hash_table, allocate_dwp_loaded_cutus_table):
3396 Remove objfile parameter, update all callers.
3397
3398 2020-02-19 Doug Evans <dje@google.com>
3399
3400 PR rust/25535
3401 * rust-lang.c (rust_print_enum): Apply embedded_offset to
3402 rust_enum_variant calculation.
3403
3404 2020-02-19 Tom Tromey <tromey@adacore.com>
3405
3406 * mips-tdep.h (mips_pc_is_mips): Parameter type is CORE_ADDR.
3407
3408 2020-02-19 Tom Tromey <tromey@adacore.com>
3409
3410 * ada-lang.c (cache_symbol): Use obstack_strdup.
3411
3412 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
3413
3414 * configure: Regenerate.
3415
3416 2020-02-19 Tom Tromey <tromey@adacore.com>
3417
3418 * python/python.c (do_start_initialization): Use XNEWVEC. Remove
3419 NULL check.
3420
3421 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
3422
3423 * NEWS: Mention RISC-V GNU/Linux GDBserver support.
3424
3425 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
3426
3427 * arch/riscv.c (struct riscv_gdbarch_features_hasher): Only define
3428 if GDBSERVER is not defined.
3429 (riscv_tdesc_cache): Likewise, also store const target_desc.
3430 (STATIC_IN_GDB): Define.
3431 (riscv_create_target_description): Update declaration with
3432 STATIC_IN_GDB.
3433 (riscv_lookup_target_description): New function, only define if
3434 GDBSERVER is not defined.
3435 * arch/riscv.h (riscv_create_target_description): Declare only
3436 when GDBSERVER is defined.
3437 (riscv_lookup_target_description): New declaration when GDBSERVER
3438 is not defined.
3439 * nat/riscv-linux-tdesc.c (riscv_linux_read_description): Rename to...
3440 (riscv_linux_read_features): ...this, and return
3441 riscv_gdbarch_features instead of target_desc.
3442 * nat/riscv-linux-tdesc.h: Include 'arch/riscv.h'.
3443 (riscv_linux_read_description): Rename to...
3444 (riscv_linux_read_features): ...this.
3445 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
3446 Update to use riscv_gdbarch_features and
3447 riscv_lookup_target_description.
3448 * riscv-tdep.c (riscv_find_default_target_description): Use
3449 riscv_lookup_target_description instead of
3450 riscv_create_target_description.
3451
3452 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
3453
3454 * valprint.c (generic_val_print_enum_1): When printing a flag
3455 enum with value 0 and there is no enumerator with value 0, print
3456 just "0" instead of "(unknown: 0x0)".
3457
3458 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
3459
3460 * valprint.c (generic_val_print_enum_1): Print unknown part of
3461 flag enum in hex.
3462
3463 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
3464
3465 * dwarf2/read.c (update_enumeration_type_from_children): Allow
3466 flag enums to contain duplicate enumerators.
3467 * valprint.c (generic_val_print_enum_1): Update comment.
3468
3469 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
3470
3471 * dwarf2/read.c: Include "count-one-bits.h".
3472 (update_enumeration_type_from_children): If an enumerator has
3473 multiple bits set, don't treat the enumeration as a "flag enum".
3474 * valprint.c (generic_val_print_enum_1): Assert that enumerators
3475 of flag enums have 0 or 1 bit set.
3476
3477 2020-02-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3478
3479 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use an explicit
3480 conversion.
3481 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
3482 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
3483 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
3484 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
3485 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
3486
3487 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
3488
3489 * MAINTAINERS: Change palmer@sifive.com to palmer@dabbelt.com.
3490
3491 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
3492
3493 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use
3494 displaced_step_closure_up.
3495 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
3496 (struct displaced_step_closure_up):
3497 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
3498 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
3499 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn):
3500 Likewise.
3501 * gdbarch.sh (displaced_step_copy_insn): Likewise.
3502 * gdbarch.c, gdbarch.h: Re-generate.
3503 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Use
3504 displaced_step_closure_up.
3505 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
3506 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
3507 * infrun.h (displaced_step_closure_up): New type alias.
3508 (struct displaced_step_inferior_state) <step_closure>: Change
3509 type to displaced_step_closure_up.
3510 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Use
3511 displaced_step_closure_up.
3512 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
3513
3514 2020-02-14 Tom Tromey <tom@tromey.com>
3515
3516 * minidebug.c (gnu_debug_key): New global.
3517 (find_separate_debug_file_in_section): Use it.
3518
3519 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
3520
3521 * gdbarch.sh (displaced_step_copy_insn): Change return type to an
3522 std::unique_ptr.
3523 * gdbarch.c: Re-generate.
3524 * gdbarch.h: Re-generate.
3525 * infrun.c (displaced_step_prepare_throw): Adjust to std::unique_ptr
3526 change.
3527 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Change return
3528 type to std::unique_ptr.
3529 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
3530 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
3531 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
3532 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
3533 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Likewise.
3534 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
3535 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
3536 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
3537 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
3538
3539 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
3540
3541 * infrun.c (get_displaced_step_closure_by_addr): Adjust to
3542 std::unique_ptr.
3543 (displaced_step_clear): Rename to...
3544 (displaced_step_reset): ... this. Just call displaced->reset ().
3545 (displaced_step_clear_cleanup): Rename to...
3546 (displaced_step_reset_cleanup): ... this.
3547 (displaced_step_prepare_throw): Adjust to std::unique_ptr.
3548 (displaced_step_fixup): Likewise.
3549 (resume_1): Likewise.
3550 (handle_inferior_event): Restore child's memory before calling
3551 displaced_step_fixup on the parent.
3552 * infrun.h (displaced_step_inferior_state) <reset>: Adjust
3553 to std::unique_ptr.
3554 <step_closure>: Change type to std::unique_ptr.
3555
3556 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
3557
3558 * arm-tdep.c: Include count-one-bits.h.
3559 (cleanup_block_store_pc): Use count_one_bits.
3560 (cleanup_block_load_pc): Use count_one_bits.
3561 (arm_copy_block_xfer): Use count_one_bits.
3562 (thumb2_copy_block_xfer): Use count_one_bits.
3563 (thumb_copy_pop_pc_16bit): Use count_one_bits.
3564 * arch/arm-get-next-pcs.c: Include count-one-bits.h.
3565 (thumb_get_next_pcs_raw): Use count_one_bits.
3566 (arm_get_next_pcs_raw): Use count_one_bits_l.
3567 * arch/arm.c (bitcount): Remove.
3568 * arch/arm.h (bitcount): Remove.
3569
3570 2020-02-14 Tom Tromey <tromey@adacore.com>
3571
3572 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first):
3573 Update.
3574 * dwarf2/loc.h (call_site_find_chain): Return unique_xmalloc_ptr.
3575 * dwarf2/loc.c (call_site_find_chain_1): Return
3576 unique_xmalloc_ptr.
3577 (call_site_find_chain): Likewise.
3578
3579 2020-02-14 Richard Biener <rguenther@suse.de>
3580
3581 * dwarf2/read.c (lnp_state_machine::handle_special_opcode): Apply CSE
3582 on expression with division operators.
3583
3584 2020-02-13 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
3585
3586 * MAINTAINERS (Write After Approval): Adding myself.
3587
3588 2020-02-12 Tom Tromey <tom@tromey.com>
3589
3590 * event-loop.c (event_data, gdb_event, event_handler_func):
3591 Remove.
3592
3593 2020-02-12 Tom Tromey <tom@tromey.com>
3594
3595 * dwarf2/frame.c (dwarf2_frame_bfd_data): New global.
3596 (dwarf2_frame_objfile_data): Add comment.
3597 (find_comp_unit, set_comp_unit): New functions.
3598 (dwarf2_frame_find_fde): Use find_comp_unit.
3599 (dwarf2_build_frame_info): Use set_comp_unit.
3600
3601 2020-02-12 Tom Tromey <tom@tromey.com>
3602
3603 * dwarf2/frame.c (struct comp_unit) <objfile>: Remove.
3604 (comp_unit): Don't initialize objfile.
3605 (execute_cfa_program): Add text_offset parameter.
3606 (execute_cfa_program_test, dwarf2_fetch_cfa_info)
3607 (dwarf2_frame_cache): Update.
3608 (dwarf2_build_frame_info): Don't set "objfile" member.
3609
3610 2020-02-12 Tom Tromey <tom@tromey.com>
3611
3612 * dwarf2/frame.c (decode_frame_entry_1): Add gdbarch parameter.
3613 (decode_frame_entry): Likewise.
3614 (dwarf2_build_frame_info): Update.
3615
3616 2020-02-12 Tom Tromey <tom@tromey.com>
3617
3618 * dwarf2/frame.c (struct comp_unit) <obstack>: New member.
3619 (decode_frame_entry_1): Use the comp_unit obstack.
3620
3621 2020-02-12 Tom Tromey <tom@tromey.com>
3622
3623 * dwarf2/frame.c (struct comp_unit): Add initializers and
3624 constructor.
3625 (dwarf2_frame_objfile_data): Store a comp_unit.
3626 (dwarf2_frame_find_fde): Update.
3627 (dwarf2_build_frame_info): Use "new".
3628
3629 2020-02-12 Tom Tromey <tom@tromey.com>
3630
3631 * dwarf2/frame.c (struct dwarf2_fde_table): Remove.
3632 (dwarf2_fde_table): Typedef for std::vector.
3633 (dwarf2_frame_objfile_data): Remove the deleter. Now static.
3634 (dwarf2_frame_find_fde, add_fde, decode_frame_entry_1)
3635 (decode_frame_entry): Update.
3636 (dwarf2_build_frame_info): Use "new".
3637
3638 2020-02-12 Christian Biesinger <cbiesinger@google.com>
3639
3640 * arm-tdep.c (arm_gdbarch_init): Update.
3641 * arm-tdep.h (struct gdbarch_tdep) <have_fpa_registers,
3642 have_wmmx_registers, have_vfp_pseudos, have_neon_pseudos,
3643 have_neon, is_m>: Change to bool.
3644
3645 2020-02-12 Christian Biesinger <cbiesinger@google.com>
3646
3647 * arm-tdep.c (arm_dump_tdep): Print more fields of tdep.
3648
3649 2020-02-12 Tom Tromey <tom@tromey.com>
3650
3651 * dwarf2/loc.c (struct dwarf_expr_baton): Remove.
3652
3653 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
3654
3655 * windows-tdep.c (struct windows_gdbarch_data): Add tib_ptr_type.
3656 (windows_get_tlb_type): Use windows_gdbarch_data->tib_ptr_type.
3657
3658 2020-02-11 Tom Tromey <tom@tromey.com>
3659
3660 * psymtab.h: Update comment.
3661
3662 2020-02-11 Tom Tromey <tom@tromey.com>
3663
3664 * gdb_obstack.h (struct auto_obstack): Use
3665 DISABLE_COPY_AND_ASSIGN.
3666
3667 2020-02-11 Tom Tromey <tom@tromey.com>
3668
3669 * dwarf2/frame.h (struct objfile): Don't forward declare.
3670
3671 2020-02-11 Christian Biesinger <cbiesinger@google.com>
3672
3673 * cris-tdep.c (cris_supply_gregset): Change signature to match
3674 what struct regset expects.
3675 (cris_regset): New struct.
3676 (fetch_core_registers): Remove.
3677 (cris_iterate_over_regset_sections): New function.
3678 (_initialize_cris_tdep): Don't call deprecated_add_core_fns.
3679 (cris_gdbarch_init): Call set_gdbarch_iterate_over_regset_sections.
3680
3681 2020-02-11 Christian Biesinger <cbiesinger@google.com>
3682
3683 * arch/arm.h (enum gdb_regnum): Add comment for the FP0..7
3684 registers.
3685
3686 2020-02-11 Christian Biesinger <cbiesinger@google.com>
3687
3688 * arm-tdep.c (arm_dump_tdep): Add \n in fprintf.
3689
3690 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3691
3692 * configure: Re-generate.
3693
3694 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3695
3696 * configure: Re-generate.
3697
3698 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3699
3700 * acinclude: Update warning.m4 path.
3701 * warning.m4: Move to gdbsupport.
3702
3703 2020-02-11 Tom Tromey <tromey@adacore.com>
3704
3705 * remote.c (remote_console_output): Update.
3706 * printcmd.c (printf_command): Update.
3707 * event-loop.c (gdb_wait_for_event): Update.
3708 * linux-nat.c (sigchld_handler): Update.
3709 * remote-sim.c (gdb_os_write_stdout): Update.
3710 (gdb_os_flush_stdout): Update.
3711 (gdb_os_flush_stderr): Update.
3712 (gdb_os_write_stderr): Update.
3713 * exceptions.c (print_exception): Update.
3714 * remote-fileio.c (remote_fileio_func_read): Update.
3715 (remote_fileio_func_write): Update.
3716 * tui/tui.c (tui_enable): Update.
3717 * tui/tui-interp.c (tui_interp::init): Update.
3718 * utils.c (init_page_info): Update.
3719 (putchar_unfiltered, fputc_unfiltered): Update.
3720 (gdb_flush): Update.
3721 (emit_style_escape): Update.
3722 (flush_wrap_buffer, fputs_maybe_filtered): Update.
3723 * ui-file.c (ui_file_isatty, ui_file_read, ui_file_write)
3724 (ui_file_write_async_safe, ui_file_flush, ui_file_puts): Remove.
3725 (stderr_file::write): Update.
3726 (stderr_file::puts): Update.
3727 * ui-file.h (ui_file_isatty, ui_file_write)
3728 (ui_file_write_async_safe, ui_file_read, ui_file_flush)
3729 (ui_file_puts): Don't declare.
3730
3731 2020-02-10 Tom de Vries <tdevries@suse.de>
3732
3733 * dwarf2/read.c (process_psymtab_comp_unit_reader): Cast concat NULL
3734 sentinel to char *.
3735
3736 2020-02-09 Tom de Vries <tdevries@suse.de>
3737
3738 * dwarf2read.c (process_psymtab_comp_unit_reader): Append CU offset to
3739 filename if it matches "<artificial>".
3740
3741 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
3742
3743 * windows-tdep.c (struct enum_value_name): New struct.
3744 (create_enum): New function.
3745 (windows_get_siginfo_type): Create and use enum types.
3746
3747 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
3748
3749 * NEWS: Mention $_siginfo support for Windows.
3750 * windows-nat.c (handle_exception): Set siginfo_er.
3751 (windows_nat_target::mourn_inferior): Reset siginfo_er.
3752 (windows_xfer_siginfo): New function.
3753 (windows_nat_target::xfer_partial): Call windows_xfer_siginfo.
3754 * windows-tdep.c (struct windows_gdbarch_data): New struct.
3755 (init_windows_gdbarch_data): New function.
3756 (get_windows_gdbarch_data): New function.
3757 (windows_get_siginfo_type): New function.
3758 (windows_init_abi): Register windows_get_siginfo_type.
3759 (_initialize_windows_tdep): Register init_windows_gdbarch_data.
3760
3761 2020-02-08 Tom Tromey <tom@tromey.com>
3762
3763 * dwarf2/read.c (class cutu_reader) <cutu_reader,
3764 init_tu_and_read_dwo_dies>: Remove "keep" parameter.
3765 <keep>: Declare method.
3766 <m_keep>: Remove member.
3767 <~cutu_reader>: Remove.
3768 (cutu_reader::init_tu_and_read_dwo_dies): Update.
3769 (cutu_reader::cutu_reader): Update.
3770 (cutu_reader::keep): Rename from ~cutu_reader.
3771 (process_psymtab_comp_unit, build_type_psymtabs_1)
3772 (process_skeletonless_type_unit, load_partial_comp_unit)
3773 (load_full_comp_unit, dwarf2_read_addr_index)
3774 (read_signatured_type): Update.
3775
3776 2020-02-08 Tom Tromey <tom@tromey.com>
3777
3778 * dwarf2/read.c (process_psymtab_comp_unit_reader): Remove
3779 "want_partial_unit" parameter.
3780 (process_psymtab_comp_unit): Change want_partial_unit to bool.
3781 Inline check for DW_TAG_partial_unit.
3782 (dwarf2_build_psymtabs_hard, scan_partial_symbols): Update.
3783
3784 2020-02-08 Tom Tromey <tom@tromey.com>
3785
3786 * dwarf2/read.c (read_n_bytes, read_direct_string): Move to
3787 read.c.
3788 * dwarf2/leb.h (read_n_bytes, read_direct_string): Move from
3789 read.c.
3790
3791 2020-02-08 Tom Tromey <tom@tromey.com>
3792
3793 * dwarf2/read.c (read_address): Move to comp-unit.c.
3794 (dwarf2_rnglists_process, dwarf2_ranges_process)
3795 (read_attribute_value, dwarf_decode_lines_1)
3796 (var_decode_location, decode_locdesc): Update.
3797 * dwarf2/comp-unit.c (comp_unit_head::read_address): Move from
3798 read.c. Remove "cu" parameter.
3799 * dwarf2/comp-unit.h (struct comp_unit_head) <read_address>: New
3800 method.
3801
3802 2020-02-08 Tom Tromey <tom@tromey.com>
3803
3804 * dwarf2/read.c (read_attribute_value, read_indirect_string)
3805 (read_indirect_line_string): Update.
3806 * dwarf2/comp-unit.c (read_offset): Remove.
3807 (read_comp_unit_head): Update.
3808 * dwarf2/comp-unit.h (struct comp_unit_head) <read_offset>: New
3809 method.
3810 (read_offset): Don't declare.
3811
3812 2020-02-08 Tom Tromey <tom@tromey.com>
3813
3814 * Makefile.in (COMMON_SFILES): Add dwarf2/comp-unit.c.
3815 * dwarf2/read.c (struct comp_unit_head): Move to
3816 dwarf2/comp-unit.h.
3817 (enum class rcuh_kind): Move to comp-unit.h.
3818 (get_cu_length, offset_in_cu_p): Now methods on comp_unit_head.
3819 (read_comp_unit_head, error_check_comp_unit_head)
3820 (read_and_check_comp_unit_head): Move to comp-unit.c.
3821 (read_offset, dwarf_unit_type_name): Likewise.
3822 (create_debug_type_hash_table, read_cutu_die_from_dwo)
3823 (cutu_reader::cutu_reader, read_call_site_scope)
3824 (find_partial_die, follow_die_offset): Update.
3825 * dwarf2/comp-unit.h: New file, from dwarf2read.c.
3826
3827 2020-02-08 Tom Tromey <tom@tromey.com>
3828
3829 * dwarf2/read.c (read_offset_1): Move to leb.c.
3830 (read_abbrev_offset, read_offset, dwarf_decode_line_header)
3831 (dwarf_decode_macro_bytes): Update.
3832 * dwarf2/leb.c (read_offset): Rename; move from read.c.
3833 * dwarf2/leb.h (read_offset): Declare.
3834
3835 2020-02-08 Tom Tromey <tom@tromey.com>
3836
3837 * dwarf2/read.c (dwarf2_section_size): Remove.
3838 (error_check_comp_unit_head, dwarf2_symbol_mark_computed):
3839 Update.
3840 * dwarf2/section.h (struct dwarf2_section_info) <get_size>: New method.
3841
3842 2020-02-08 Tom Tromey <tom@tromey.com>
3843
3844 * dwarf2/read.c (read_initial_length): Move to leb.c.
3845 * dwarf2/leb.h (read_initial_length): Declare.
3846 * dwarf2/leb.c (read_initial_length): Move from read.c. Add
3847 handle_nonstd parameter.
3848 * dwarf2/frame.c (read_initial_length): Remove.
3849 (decode_frame_entry_1): Update.
3850
3851 2020-02-08 Tom Tromey <tom@tromey.com>
3852
3853 * dwarf2/loc.c (dwarf2_find_location_expression)
3854 (dwarf_evaluate_loc_desc::get_tls_address)
3855 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
3856 (rw_pieced_value, dwarf2_evaluate_loc_desc_full)
3857 (dwarf2_locexpr_baton_eval, dwarf2_evaluate_property)
3858 (dwarf2_compile_property_to_c)
3859 (dwarf2_loc_desc_get_symbol_read_needs)
3860 (dwarf2_compile_expr_to_ax, locexpr_describe_location)
3861 (locexpr_tracepoint_var_ref, locexpr_generate_c_location)
3862 (loclist_describe_location, loclist_tracepoint_var_ref)
3863 (loclist_generate_c_location): Update.
3864 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Update.
3865 * dwarf2/loc.h (dwarf2_per_cu_objfile, dwarf2_per_cu_addr_size)
3866 (dwarf2_per_cu_ref_addr_size, dwarf2_per_cu_offset_size)
3867 (dwarf2_per_cu_text_offset, dwarf2_version): Don't declare.
3868 * dwarf2/read.c (dwarf2_per_cu_data::objfile)
3869 (dwarf2_per_cu_data::addr_size)
3870 (dwarf2_per_cu_data::ref_addr_size)
3871 (dwarf2_per_cu_data::text_offset)
3872 (dwarf2_per_cu_data::addr_type): Now methods.
3873 (per_cu_header_read_in): Make per_cu "const".
3874 (dwarf2_version): Remove.
3875 (dwarf2_per_cu_data::int_type): Now a method.
3876 (dwarf2_per_cu_data::_addr_sized_int_type): Likewise.
3877 (set_die_type, read_array_type, read_subrange_index_type)
3878 (read_tag_string_type, read_subrange_type): Update.
3879 * dwarf2/read.h (struct dwarf2_per_cu_data) <addr_size,
3880 offset_size, ref_addr_size, text_offset, addr_type, version,
3881 objfile, int_type, addr_sized_int_type>: Declare methods.
3882
3883 2020-02-08 Tom Tromey <tom@tromey.com>
3884
3885 * dwarf2/read.h (struct dwarf2_per_cu_data) <imported_symtabs>:
3886 Move earlier.
3887
3888 2020-02-08 Tom Tromey <tom@tromey.com>
3889
3890 * dwarf2/read.h (dwarf_line_debug): Declare.
3891 * Makefile.in (COMMON_SFILES): Add dwarf2/line-header.c.
3892 * dwarf2/read.c: Move line_header code to new files.
3893 (dwarf_line_debug): No longer static.
3894 * dwarf2/line-header.c: New file.
3895 * dwarf2/line-header.h: New file.
3896
3897 2020-02-08 Tom Tromey <tom@tromey.com>
3898
3899 * dwarf2/read.c (struct line_header) <file_full_name,
3900 file_file_name>: Return unique_xmalloc_ptr.
3901 (line_header::file_file_name): Update.
3902 (line_header::file_full_name): Update.
3903 (dw2_get_file_names_reader): Update.
3904 (macro_start_file): Update.
3905
3906 2020-02-08 Tom Tromey <tom@tromey.com>
3907
3908 * dwarf2/read.c (struct line_header) <file_full_name,
3909 file_file_name>: Declare methods.
3910 (dw2_get_file_names_reader): Update.
3911 (file_file_name): Now a method.
3912 (file_full_name): Likewise.
3913 (macro_start_file): Update.
3914
3915 2020-02-08 Tom Tromey <tom@tromey.com>
3916
3917 * dwarf2/read.c (dwarf_always_disassemble)
3918 (show_dwarf_always_disassemble): Move to loc.c.
3919 (_initialize_dwarf2_read): Move "always-disassemble" registration
3920 to loc.c.
3921 * dwarf2/read.h (dwarf_always_disassemble): Don't declare.
3922 * dwarf2/loc.c (dwarf_always_disassemble): Move from read.c. Now
3923 static.
3924 (show_dwarf_always_disassemble): Move from read.c.
3925 (_initialize_dwarf2loc): Move always-disassemble from read.c.
3926
3927 2020-02-08 Tom Tromey <tom@tromey.com>
3928
3929 * dwarf2/read.c (~dwarf2_per_objfile): Update.
3930 (create_quick_file_names_table): Return htab_up.
3931 (dw2_get_file_names_reader, dw2_forget_cached_source_info):
3932 Update.
3933 * dwarf2/read.h (struct dwarf2_per_objfile)
3934 <quick_file_names_table>: Now htab_up.
3935
3936 2020-02-08 Tom Tromey <tom@tromey.com>
3937
3938 * dwarf2/abbrev.c (abbrev_table::read): Simplify.
3939
3940 2020-02-08 Tom Tromey <tom@tromey.com>
3941
3942 * dwarf2/abbrev.c (abbrev_table): Move constructor from header.
3943 Rewrite.
3944 (abbrev_table::add_abbrev, abbrev_table::lookup_abbrev): Rewrite.
3945 * dwarf2/abbrev.h (struct abbrev_info) <next>: Remove.
3946 (abbrev_table::abbrev_table): No longer inline.
3947 (ABBREV_HASH_SIZE): Remove.
3948 (abbrev_table::m_abbrevs): Now an htab_up.
3949
3950 2020-02-08 Tom Tromey <tom@tromey.com>
3951
3952 * dwarf2/read.c (read_cutu_die_from_dwo): Update.
3953 (cutu_reader): Update.
3954 (build_type_psymtabs_1): Update.
3955 * dwarf2/abbrev.c (abbrev_table::read): Rename.
3956 (abbrev_table::alloc_abbrev): Update.
3957 * dwarf2/abbrev.h (abbrev_table_up): Move earlier.
3958 (abbrev_table::read): New static method, renamed from
3959 abbrev_table_read_table.
3960 (abbrev_table::alloc_abbrev)
3961 (abbrev_table::add_abbrev): Now private.
3962 (abbrev_table::abbrev_table): Now private.
3963 (abbrev_table::m_abbrev_obstack): Now private. Rename.
3964
3965 2020-02-08 Tom Tromey <tom@tromey.com>
3966
3967 * dwarf2/read.c (set_die_type, get_die_type_at_offset): Update.
3968 * dwarf2/read.h (struct dwarf2_per_objfile) <die_type_hash>: Now
3969 htab_up.
3970
3971 2020-02-08 Tom Tromey <tom@tromey.com>
3972
3973 * dwarf2/read.c (struct dwp_file) <loaded_cus, loaded_tus>: Now
3974 htab_up.
3975 (lookup_dwo_unit_in_dwp): Update.
3976 (allocate_dwp_loaded_cutus_table): Return htab_up. Don't allocate
3977 on obstack.
3978
3979 2020-02-08 Tom Tromey <tom@tromey.com>
3980
3981 * dwarf2/read.c (allocate_dwo_file_hash_table): Don't allocate on
3982 obstack.
3983
3984 2020-02-08 Tom Tromey <tom@tromey.com>
3985
3986 * dwarf2/read.c (~dwarf2_per_objfile): Don't delete
3987 line_header_hash.
3988 (handle_DW_AT_stmt_list): Update. Don't allocate on obstack.
3989 * dwarf2/read.h (struct dwarf2_per_objfile) <line_header_hash>:
3990 Change type to htab_up.
3991
3992 2020-02-08 Tom Tromey <tom@tromey.com>
3993
3994 * dwarf2/read.c (allocate_type_unit_groups_table): Return
3995 htab_up. Don't allocate on obstack.
3996 (get_type_unit_group, dwarf2_build_psymtabs_hard): Update.
3997 * dwarf2/read.h (struct dwarf2_per_objfile) <type_unit_groups>:
3998 Change type to htab_up.
3999
4000 2020-02-08 Tom Tromey <tom@tromey.com>
4001
4002 * dwarf2/read.h (struct dwarf2_per_objfile) <signatured_types>:
4003 Change type to htab_up.
4004 * dwarf2/read.c (create_signatured_type_table_from_index)
4005 (create_signatured_type_table_from_debug_names)
4006 (create_all_type_units, add_type_unit)
4007 (lookup_dwo_signatured_type, lookup_signatured_type)
4008 (process_skeletonless_type_unit): Update.
4009 (create_debug_type_hash_table, create_debug_types_hash_table):
4010 Change type of types_htab.
4011 (allocate_signatured_type_table, allocate_dwo_unit_table): Return
4012 htab_up. Don't allocate on obstack.
4013 (create_cus_hash_table): Change type of cus_htab parameter.
4014 (struct dwo_file) <cus, tus>: Now htab_up.
4015 (lookup_dwo_signatured_type, lookup_dwo_cutu)
4016 (process_dwo_file_for_skeletonless_type_units, lookup_dwo_cutu)
4017 (queue_and_load_all_dwo_tus): Update.
4018 * dwarf2/index-write.c (write_gdbindex): Update.
4019 (write_debug_names): Update.
4020
4021 2020-02-08 Tom Tromey <tom@tromey.com>
4022
4023 * dwarf2/read.h (struct dwarf2_queue_item): Move from
4024 dwarf2/read.c. Remove "next" member. Add constructor ntad
4025 destructor.
4026 (struct dwarf2_per_objfile) <queue>: New member.
4027 * dwarf2/read.c (struct dwarf2_queue_item): Move to
4028 dwarf2/read.h.
4029 (dwarf2_queue, dwarf2_queue_tail): Remove.
4030 (class dwarf2_queue_guard): Add parameter to constructor. Use
4031 DISABLE_COPY_AND_ASSIGN.
4032 <m_per_objfile>: New member.
4033 <~dwarf2_queue_guard>: Rewrite.
4034 (dw2_do_instantiate_symtab, queue_comp_unit, process_queue):
4035 Update.
4036 (~dwarf2_queue_item): New.
4037
4038 2020-02-08 Tom Tromey <tom@tromey.com>
4039
4040 * dwarf2/read.c (struct die_info) <has_children>: New member.
4041 (dw2_get_file_names_reader): Remove has_children.
4042 (dw2_get_file_names): Update.
4043 (read_cutu_die_from_dwo): Remove has_children.
4044 (cutu_reader::init_tu_and_read_dwo_dies)
4045 (cutu_reader::cutu_reader): Update.
4046 (process_psymtab_comp_unit_reader, build_type_psymtabs_reader):
4047 Remove has_children.
4048 (build_type_psymtabs_1, process_skeletonless_type_unit)
4049 (load_partial_comp_unit, load_full_comp_unit): Update.
4050 (create_dwo_cu_reader): Remove has_children.
4051 (create_cus_hash_table, read_die_and_children): Update.
4052 (read_full_die_1,read_full_die): Remove has_children.
4053 (read_signatured_type): Update.
4054 (class cutu_reader) <has_children>: Remove.
4055
4056 2020-02-08 Tom Tromey <tom@tromey.com>
4057
4058 * dwarf2/expr.c: Rename from dwarf2expr.c.
4059 * dwarf2/expr.h: Rename from dwarf2expr.h.
4060 * dwarf2/frame-tailcall.c: Rename from dwarf2-frame-tailcall.c.
4061 * dwarf2/frame-tailcall.h: Rename from dwarf2-frame-tailcall.h.
4062 * dwarf2/frame.c: Rename from dwarf2-frame.c.
4063 * dwarf2/frame.h: Rename from dwarf2-frame.h.
4064 * dwarf2/index-cache.c: Rename from dwarf-index-cache.c.
4065 * dwarf2/index-cache.h: Rename from dwarf-index-cache.h.
4066 * dwarf2/index-common.c: Rename from dwarf-index-common.c.
4067 * dwarf2/index-common.h: Rename from dwarf-index-common.h.
4068 * dwarf2/index-write.c: Rename from dwarf-index-write.c.
4069 * dwarf2/index-write.h: Rename from dwarf-index-write.h.
4070 * dwarf2/loc.c: Rename from dwarf2loc.c.
4071 * dwarf2/loc.h: Rename from dwarf2loc.h.
4072 * dwarf2/read.c: Rename from dwarf2read.c.
4073 * dwarf2/read.h: Rename from dwarf2read.h.
4074 * dwarf2/abbrev.c, aarch64-tdep.c, alpha-tdep.c,
4075 amd64-darwin-tdep.c, arc-tdep.c, arm-tdep.c, bfin-tdep.c,
4076 compile/compile-c-symbols.c, compile/compile-cplus-symbols.c,
4077 compile/compile-loc2c.c, cris-tdep.c, csky-tdep.c, findvar.c,
4078 gdbtypes.c, guile/scm-type.c, h8300-tdep.c, hppa-bsd-tdep.c,
4079 hppa-linux-tdep.c, i386-darwin-tdep.c, i386-linux-tdep.c,
4080 i386-tdep.c, iq2000-tdep.c, m32c-tdep.c, m68hc11-tdep.c,
4081 m68k-tdep.c, microblaze-tdep.c, mips-tdep.c, mn10300-tdep.c,
4082 msp430-tdep.c, nds32-tdep.c, nios2-tdep.c, or1k-tdep.c,
4083 riscv-tdep.c, rl78-tdep.c, rs6000-tdep.c, rx-tdep.c, s12z-tdep.c,
4084 s390-tdep.c, score-tdep.c, sh-tdep.c, sparc-linux-tdep.c,
4085 sparc-tdep.c, sparc64-linux-tdep.c, sparc64-tdep.c, tic6x-tdep.c,
4086 tilegx-tdep.c, v850-tdep.c, xstormy16-tdep.c, xtensa-tdep.c:
4087 Update.
4088 * Makefile.in (COMMON_SFILES): Update.
4089 (HFILES_NO_SRCDIR): Update.
4090
4091 2020-02-08 Tom Tromey <tom@tromey.com>
4092
4093 * dwarf2read.c (struct die_reader_specs) <comp_dir>: Remove.
4094 (init_cu_die_reader, read_cutu_die_from_dwo): Update.
4095
4096 2020-02-08 Tom Tromey <tom@tromey.com>
4097
4098 * dwarf2read.h (struct die_info): Don't declare.
4099
4100 2020-02-08 Tom Tromey <tom@tromey.com>
4101
4102 * dwarf2read.h (die_info_ptr): Remove typedef.
4103
4104 2020-02-08 Tom Tromey <tom@tromey.com>
4105
4106 * dwarf2read.c (read_call_site_scope)
4107 (handle_data_member_location, dwarf2_add_member_fn)
4108 (mark_common_block_symbol_computed, read_common_block)
4109 (attr_to_dynamic_prop, partial_die_info::read)
4110 (var_decode_location, dwarf2_fetch_die_loc_sect_off)
4111 (dwarf2_symbol_mark_computed, set_die_type): Update.
4112 * dwarf2/attribute.h (struct attribute) <form_is_block>: Declare
4113 method.
4114 (attr_form_is_block): Don't declare.
4115 * dwarf2/attribute.c (attribute::form_is_block): Now a method.
4116
4117 2020-02-08 Tom Tromey <tom@tromey.com>
4118
4119 * dwarf2read.c (dwarf2_find_base_address, )
4120 (read_call_site_scope, rust_containing_type)
4121 (dwarf2_get_pc_bounds, dwarf2_record_block_ranges)
4122 (handle_data_member_location, dwarf2_add_member_fn)
4123 (get_alignment, read_structure_type, process_structure_scope)
4124 (mark_common_block_symbol_computed, read_common_block)
4125 (read_tag_string_type, attr_to_dynamic_prop, read_subrange_type)
4126 (partial_die_info::read, read_attribute_value, new_symbol)
4127 (lookup_die_type, dwarf2_get_ref_die_offset)
4128 (dwarf2_get_attr_constant_value, follow_die_ref_or_sig)
4129 (dwarf2_fetch_die_loc_sect_off, get_DW_AT_signature_type)
4130 (dwarf2_symbol_mark_computed): Update.
4131 * dwarf2/attribute.h (struct attribute) <value_as_address,
4132 form_is_section_offset, form_is_constant, form_is_ref>: Declare
4133 methods.
4134 (value_as_address, attr_form_is_section_offset)
4135 (attr_form_is_constant, attr_form_is_ref): Don't declare.
4136 * dwarf2/attribute.c (attribute::value_as_address)
4137 (attribute::form_is_section_offset, attribute::form_is_constant)
4138 (attribute::form_is_ref): Now methods.
4139
4140 2020-02-08 Tom Tromey <tom@tromey.com>
4141
4142 * dwarf2read.c (struct attribute, DW_STRING)
4143 (DW_STRING_IS_CANONICAL, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR)
4144 (DW_SIGNATURE, struct dwarf_block, attr_value_as_address)
4145 (attr_form_is_block, attr_form_is_section_offset)
4146 (attr_form_is_constant, attr_form_is_ref): Move.
4147 * dwarf2/attribute.h: New file.
4148 * dwarf2/attribute.c: New file, from dwarf2read.c.
4149 * Makefile.in (COMMON_SFILES): Add dwarf2/attribute.c.
4150
4151 2020-02-08 Tom Tromey <tom@tromey.com>
4152
4153 * dwarf2read.c (abbrev_table_up, struct abbrev_info)
4154 (struct attr_abbrev, ABBREV_HASH_SIZE, struct abbrev_table):
4155 Move.
4156 (read_cutu_die_from_dwo, build_type_psymtabs_1): Update.
4157 (abbrev_table::alloc_abbrev, abbrev_table::add_abbrev)
4158 (abbrev_table::lookup_abbrev, abbrev_table_read_table): Move to
4159 abbrev.c.
4160 * dwarf2/abbrev.h: New file.
4161 * dwarf2/abbrev.c: New file, from dwarf2read.c.
4162 * Makefile.in (COMMON_SFILES): Add dwarf2/abbrev.c.
4163
4164 2020-02-08 Tom Tromey <tom@tromey.com>
4165
4166 * dwarf2read.c (dwarf2_section_buffer_overflow_complaint)
4167 (dwarf2_section_size, dwarf2_get_section_info)
4168 (create_signatured_type_table_from_debug_names)
4169 (create_addrmap_from_aranges, read_debug_names_from_section)
4170 (get_gdb_index_contents_from_section, read_comp_unit_head)
4171 (error_check_comp_unit_head, read_abbrev_offset)
4172 (create_debug_type_hash_table, init_cu_die_reader)
4173 (read_cutu_die_from_dwo, dwarf2_build_psymtabs_hard)
4174 (read_comp_units_from_section, create_cus_hash_table)
4175 (create_dwp_hash_table, create_dwo_unit_in_dwp_v1)
4176 (create_dwp_v2_section, dwarf2_rnglists_process)
4177 (dwarf2_ranges_process, read_die_and_siblings, read_full_die)
4178 (abbrev_table_read_table, read_indirect_string_at_offset_from)
4179 (read_indirect_string_from_dwz, read_addr_index_1)
4180 (read_str_index, dwarf_decode_line_header, skip_form_bytes)
4181 (dwarf_decode_macro_bytes, dwarf_decode_macros)
4182 (fill_in_loclist_baton): Update.
4183 * dwarf2/section.h (struct dwarf2_section_info) <get_name,
4184 get_containing_section, get_bfd_owner, get_bfd_section,
4185 get_file_name, get_id, get_flags, empty, read>: Declare methods.
4186 (dwarf2_read_section, get_section_name, get_section_file_name)
4187 (get_containing_section, get_section_bfd_owner)
4188 (get_section_bfd_section, get_section_name, get_section_file_name)
4189 (get_section_id, get_section_flags, dwarf2_section_empty_p): Don't
4190 declare.
4191 * dwarf2/section.c (dwarf2_section_info::get_containing_section)
4192 (dwarf2_section_info::get_bfd_owner)
4193 (dwarf2_section_info::get_bfd_section)
4194 (dwarf2_section_info::get_name)
4195 (dwarf2_section_info::get_file_name, dwarf2_section_info::get_id)
4196 (dwarf2_section_info::get_flags, dwarf2_section_info::empty)
4197 (dwarf2_section_info::read): Now methods.
4198 * dwarf-index-write.c (class debug_names): Update.
4199
4200 2020-02-08 Tom Tromey <tom@tromey.com>
4201
4202 * dwarf2read.h (struct dwarf2_section_info, dwarf2_read_section):
4203 Move to dwarf2/section.h.
4204 * dwarf2read.c (get_containing_section, get_section_bfd_owner)
4205 (get_section_bfd_section, get_section_name)
4206 (get_section_file_name, get_section_id, get_section_flags)
4207 (dwarf2_section_empty_p, dwarf2_read_section): Moe to
4208 dwarf2/section.c.
4209 * dwarf2/section.h: New file.
4210 * dwarf2/section.c: New file, from dwarf2read.c.
4211 * Makefile.in (COMMON_SFILES): Add dwarf2/section.c.
4212
4213 2020-02-08 Tom Tromey <tom@tromey.com>
4214
4215 * dwarf2read.h (read_unsigned_leb128): Don't declare.
4216 * dwarf2read.c (read_1_byte, read_1_signed_byte, read_2_bytes)
4217 (read_2_signed_bytes, read_3_bytes, read_4_bytes)
4218 (read_4_signed_bytes, read_8_bytes): Move to dwarf2/leb.h.
4219 (read_unsigned_leb128, read_signed_leb128): Move to dwarf2/leb.c.
4220 * dwarf2/leb.h: New file, from dwarf2read.c.
4221 * dwarf2/leb.c: New file, from dwarf2read.c.
4222 * dwarf2-frame.c (read_1_byte, read_4_bytes, read_8_bytes):
4223 Remove.
4224 * Makefile.in (CONFIG_SRC_SUBDIR): Add dwarf2.
4225 (COMMON_SFILES): Add dwarf2/leb.c.
4226
4227 2020-02-08 Joel Brobecker <brobecker@adacore.com>
4228
4229 GDB 9.1 released.
4230
4231 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
4232
4233 PR gdb/25190:
4234 * gdb/remote-sim.c (gdb_os_write_stderr): Update.
4235 * gdb/remote.c (remote_console_output): Update.
4236 * gdb/ui-file.c (fputs_unfiltered): Rename to...
4237 (ui_file_puts): ...this.
4238 * gdb/ui-file.h (ui_file_puts): Add declaration.
4239 * gdb/utils.c (emit_style_escape): Update.
4240 (flush_wrap_buffer): Update.
4241 (fputs_maybe_filtered): Update.
4242 (fputs_unfiltered): Add function.
4243
4244 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
4245
4246 * gdb/event-loop.c (gdb_wait_for_event): Update.
4247 * gdb/printcmd.c (printf_command): Update.
4248 * gdb/remote-fileio.c (remote_fileio_func_write): Update.
4249 * gdb/remote-sim.c (gdb_os_flush_stdout): Update.
4250 (gdb_os_flush_stderr): Update.
4251 * gdb/remote.c (remote_console_output): Update.
4252 * gdb/ui-file.c (gdb_flush): Rename to...
4253 (ui_file_flush): ...this.
4254 (stderr_file::write): Update.
4255 (stderr_file::puts): Update.
4256 * gdb/ui-file.h (gdb_flush): Rename to...
4257 (ui_file_flush): ...this.
4258 * gdb/utils.c (gdb_flush): Add function.
4259 * gdb/utils.h (gdb_flush): Add declaration.
4260
4261 2020-02-07 Tom Tromey <tromey@adacore.com>
4262
4263 PR breakpoints/24915:
4264 * source.c (find_and_open_source): Do not check basenames_may_differ.
4265
4266 2020-02-07 Tom Tromey <tom@tromey.com>
4267
4268 * README: Update gdbserver documentation.
4269 * gdbserver: Move to top level.
4270 * configure.tgt (build_gdbserver): Remove.
4271 * configure.ac: Remove --enable-gdbserver.
4272 * configure: Rebuild.
4273 * Makefile.in (distclean): Don't mention gdbserver.
4274
4275 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
4276
4277 * source-cache.c (source_cache::ensure): Surround
4278 get_plain_source_lines with a try/catch.
4279 (source_cache::get_line_charpos): Get rid of try/catch
4280 and only check for the return value of "ensure".
4281 * tui/tui-source.c (tui_source_window::set_contents):
4282 Simplify "nlines" calculation.
4283
4284 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
4285
4286 * MAINTAINERS (Write After Approval): Add myself.
4287
4288 2020-02-05 Christian Biesinger <cbiesinger@google.com>
4289
4290 * sparc-nat.h (struct sparc_target) <xfer_partial>: Fix base class
4291 function call.
4292
4293 2020-02-05 Christian Biesinger <cbiesinger@google.com>
4294
4295 * ppc-nbsd-tdep.h: Fix macro name in #endif comment.
4296
4297 2020-02-05 Maciej W. Rozycki <macro@wdc.com>
4298
4299 * nat/riscv-linux-tdesc.h: New file.
4300 * nat/riscv-linux-tdesc.c: New file, taking code from...
4301 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
4302 ... here.
4303 * configure.nat <linux> <riscv*>: Add nat/riscv-linux-tdesc.o to
4304 NATDEPFILES.
4305
4306 2020-02-04 Andrew Burgess <andrew.burgess@embecosm.com>
4307
4308 * remote-sim.c (sim_inferior_data::sim_inferior_data): Assert that
4309 we don't set the fake simulator ptid to the null_ptid.
4310
4311 2020-02-03 Simon Marchi <simon.marchi@efficios.com>
4312
4313 * fork-child.c (gdb_startup_inferior): Use bool instead of int.
4314 * gdbthread.h (class thread_info) <resumed>: Likewise.
4315 * infrun.c (resume_1): Likewise.
4316 (proceed): Likewise.
4317 (infrun_thread_stop_requested): Likewise.
4318 (stop_all_threads): Likewise.
4319 (handle_inferior_event): Likewise.
4320 (restart_threads): Likewise.
4321 (finish_step_over): Likewise.
4322 (keep_going_stepped_thread): Likewise.
4323 * linux-nat.c (attach_proc_task_lwp_callback): Likewise.
4324 (linux_handle_extended_wait): Likewise.
4325 * record-btrace.c (get_thread_current_frame_id): Likewise.
4326 * record-full.c (record_full_wait_1): Likewise.
4327 * remote.c (remote_target::process_initial_stop_replies): Likewise.
4328 * target.c (target_resume): Likewise.
4329 * thread.c (set_running_thread): Likewise.
4330
4331 2020-02-03 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
4332
4333 * f-valprint.c (f77_print_array_1): Changed datatype of index
4334 variable to LONGEST from int to enable it to contain bound
4335 values correctly.
4336
4337 2020-02-03 Maciej W. Rozycki <macro@wdc.com>
4338
4339 * riscv-linux-nat.c [!NFPREG] (NFPREG): New macro.
4340 (supply_fpregset_regnum, fill_fpregset): Handle regset buffer
4341 offsets according to FLEN determined.
4342 (riscv_linux_nat_target::read_description): Determine FLEN
4343 dynamically.
4344 (riscv_linux_nat_target::fetch_registers): Size regset buffer
4345 according to FLEN determined.
4346 (riscv_linux_nat_target::store_registers): Likewise.
4347
4348 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
4349
4350 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
4351 when reg->group is empty and reggroup is not.
4352
4353 2020-01-31 Tom Tromey <tromey@adacore.com>
4354
4355 * ravenscar-thread.c (ravenscar_thread_target::mourn_inferior):
4356 Call beneath target's mourn_inferior after unpushing.
4357
4358 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
4359
4360 PR tui/9765
4361 * tui/tui-disasm.c (tui_find_disassembly_address): If we don't
4362 have enough lines to fill the screen, still return the lowest
4363 address we found.
4364
4365 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
4366
4367 * tui/tui-win.c (_initialize_tui_win): Update help text for '+',
4368 '-', '<', and '>' commands.
4369
4370 2020-01-29 Pedro Alves <palves@redhat.com>
4371 Sergio Durigan Junior <sergiodj@redhat.com>
4372
4373 * infcmd.c (construct_inferior_arguments): Assert that
4374 'argc' is greater than 0.
4375
4376 2020-01-29 Luis Machado <luis.machado@linaro.org>
4377
4378 * aarch64-tdep.c (BRK_INSN_MASK): Define to 0xffe0001f.
4379 (BRK_INSN_MASK): Define to 0xd4200000.
4380 (aarch64_program_breakpoint_here_p): New function.
4381 (aarch64_gdbarch_init): Set gdbarch_program_breakpoint_here_p hook.
4382 * arch-utils.c (default_program_breakpoint_here_p): Moved from
4383 breakpoint.c.
4384 * arch-utils.h (default_program_breakpoint_here_p): Moved from
4385 breakpoint.h
4386 * breakpoint.c (bp_loc_is_permanent): Changed return type to bool and
4387 call gdbarch_program_breakpoint_here_p.
4388 (program_breakpoint_here): Moved to arch-utils.c, renamed to
4389 default_program_breakpoint_here_p, changed return type to bool and
4390 simplified.
4391 * breakpoint.h (program_breakpoint_here): Moved prototype to
4392 arch-utils.h, renamed to default_program_breakpoint_here_p and changed
4393 return type to bool.
4394 * gdbarch.c: Regenerate.
4395 * gdbarch.h: Regenerate.
4396 * gdbarch.sh (program_breakpoint_here_p): New method.
4397 * infrun.c (handle_signal_stop): Call
4398 gdbarch_program_breakpoint_here_p.
4399
4400 2020-01-26 Tom Tromey <tom@tromey.com>
4401
4402 * ctfread.c (struct ctf_fp_info): Reindent.
4403 (_initialize_ctfread): Remove.
4404
4405 2020-01-26 Tom Tromey <tom@tromey.com>
4406
4407 * psymtab.c (partial_map_expand_apply)
4408 (psym_find_pc_sect_compunit_symtab, psym_lookup_symbol)
4409 (psymtab_to_symtab, psym_find_last_source_symtab, dump_psymtab)
4410 (psym_print_stats, psym_expand_symtabs_for_function)
4411 (psym_map_symbol_filenames, psym_map_matching_symbols)
4412 (psym_expand_symtabs_matching)
4413 (partial_symtab::read_dependencies, maintenance_info_psymtabs)
4414 (maintenance_check_psymtabs): Use new methods.
4415 * psympriv.h (struct partial_symtab) <readin_p,
4416 get_compunit_symtab>: New methods.
4417 <readin, compunit_symtab>: Remove members.
4418 (struct standard_psymtab): New.
4419 (struct legacy_psymtab): Derive from standard_psymtab.
4420 * dwarf2read.h (struct dwarf2_psymtab): Derive from
4421 standard_psymtab.
4422 * ctfread.c (struct ctf_psymtab): Derive from standard_psymtab.
4423
4424 2020-01-26 Tom Tromey <tom@tromey.com>
4425
4426 * xcoffread.c (xcoff_psymtab_to_symtab_1): Call
4427 read_dependencies. Add assert.
4428 * psymtab.c (partial_symtab::read_dependencies): New method.
4429 * psympriv.h (struct partial_symtab) <read_dependencies>: New
4430 method.
4431 * mdebugread.c (psymtab_to_symtab_1): Call read_dependencies.
4432 * dwarf2read.c (dwarf2_psymtab::expand_psymtab): Call
4433 read_dependencies.
4434 * dbxread.c (dbx_psymtab_to_symtab_1): Call read_dependencies.
4435 Add assert.
4436
4437 2020-01-26 Tom Tromey <tom@tromey.com>
4438
4439 * xcoffread.c (xcoff_psymtab_to_symtab_1): Change argument order.
4440 Call expand_psymtab.
4441 (xcoff_read_symtab): Call expand_psymtab.
4442 (xcoff_start_psymtab, xcoff_end_psymtab): Set
4443 legacy_expand_psymtab.
4444 * psympriv.h (struct partial_symtab) <expand_psymtab>: New
4445 method.
4446 (struct legacy_psymtab) <expand_psymtab>: Implement.
4447 <legacy_expand_psymtab>: New member.
4448 * mdebugread.c (mdebug_read_symtab): Call expand_psymtab.
4449 (parse_partial_symbols): Set legacy_expand_psymtab.
4450 (psymtab_to_symtab_1): Change argument order. Call
4451 expand_psymtab.
4452 (new_psymtab): Set legacy_expand_psymtab.
4453 * dwarf2read.h (struct dwarf2_psymtab) <expand_psymtab>: Declare.
4454 * dwarf2read.c (dwarf2_psymtab::read_symtab): Call
4455 expand_psymtab.
4456 (dwarf2_psymtab::expand_psymtab): Rename from
4457 psymtab_to_symtab_1. Call expand_psymtab.
4458 * dbxread.c (start_psymtab): Set legacy_expand_psymtab.
4459 (dbx_end_psymtab): Likewise.
4460 (dbx_psymtab_to_symtab_1): Change argument order. Call
4461 expand_psymtab.
4462 (dbx_read_symtab): Call expand_psymtab.
4463 * ctfread.c (struct ctf_psymtab) <expand_psymtab>: Declare.
4464 (ctf_psymtab::expand_psymtab): Rename from psymtab_to_symtab.
4465 (ctf_psymtab::read_symtab): Call expand_psymtab.
4466
4467 2020-01-26 Tom Tromey <tom@tromey.com>
4468
4469 * xcoffread.c (xcoff_read_symtab): Remove prints. Add assert.
4470 * psymtab.c (psymtab_to_symtab): Print verbose "Reading"
4471 messages.
4472 * mdebugread.c (mdebug_read_symtab): Remove prints.
4473 * dwarf2read.c (dwarf2_psymtab::read_symtab): Remove prints. Add
4474 assert.
4475 * dbxread.c (dbx_read_symtab): Remove prints. Add assert.
4476
4477 2020-01-26 Tom Tromey <tom@tromey.com>
4478
4479 * xcoffread.c (this_symtab_psymtab, read_xcoff_symtab)
4480 (xcoff_psymtab_to_symtab_1, xcoff_read_symtab)
4481 (xcoff_start_psymtab, xcoff_end_psymtab, scan_xcoff_symtab): Use
4482 legacy_symtab.
4483 * stabsread.h (dbx_end_psymtab): Use legacy_symtab.
4484 * psymtab.c (psymtab_to_symtab): Call method.
4485 (dump_psymtab): Update.
4486 * psympriv.h (struct partial_symtab): Add virtual destructor.
4487 <read_symtab>: New method.
4488 (struct legacy_symtab): New.
4489 * mdebugread.c (mdebug_read_symtab): Use legacy_psymtab.
4490 (struct pst_map) <pst>: Now a legacy_psymtab.
4491 (parse_procedure, parse_partial_symbols, psymtab_to_symtab_1)
4492 (new_psymtab): Use legacy_psymtab.
4493 * dwarf2read.h (struct dwarf2_psymtab): New.
4494 (struct dwarf2_per_cu_data) <psymtab>: Use it.
4495 * dwarf2read.c (dwarf2_create_include_psymtab)
4496 (dwarf2_build_include_psymtabs, create_type_unit_group)
4497 (create_partial_symtab, process_psymtab_comp_unit_reader)
4498 (build_type_psymtabs_reader, build_type_psymtab_dependencies)
4499 (set_partial_user): Use dwarf2_psymtab.
4500 (dwarf2_psymtab::read_symtab): Rename from dwarf2_read_symtab.
4501 (psymtab_to_symtab_1, process_full_comp_unit)
4502 (process_full_type_unit, dwarf2_ranges_read)
4503 (dwarf2_get_pc_bounds, psymtab_include_file_name)
4504 (dwarf_decode_lines): Use dwarf2_psymtab.
4505 * dwarf-index-write.c (psym_index_map): Use dwarf2_psymtab.
4506 (add_address_entry_worker, write_one_signatured_type)
4507 (recursively_count_psymbols, recursively_write_psymbols)
4508 (write_one_signatured_type, psyms_seen_size, write_gdbindex)
4509 (write_debug_names): Likewise.
4510 * dbxread.c (struct header_file_location): Take a legacy_psymtab.
4511 <pst>: Now a legacy_psymtab.
4512 (find_corresponding_bincl_psymtab): Return a legacy_psymtab.
4513 (read_dbx_symtab, start_psymtab, dbx_end_psymtab)
4514 (dbx_psymtab_to_symtab_1, read_ofile_symtab): Use legacy_psymtab.
4515 * ctfread.c (struct ctf_psymtab): New.
4516 (ctf_start_symtab, ctf_end_symtab, psymtab_to_symtab): Take a
4517 ctf_psymtab.
4518 (ctf_psymtab::read_symtab): Rename from ctf_read_symtab.
4519 (create_partial_symtab): Return a ctf_psymtab.
4520 (scan_partial_symbols): Update.
4521
4522 2020-01-26 Tom Tromey <tom@tromey.com>
4523
4524 * xcoffread.c (xcoff_start_psymtab): Use new.
4525 * psymtab.c (partial_symtab::partial_symtab): New constructor,
4526 renamed from start_psymtab_common.
4527 * psympriv.h (struct partial_symtab): Add new constructor.
4528 (start_psymtab_common): Don't declare.
4529 * mdebugread.c (parse_partial_symbols): Use new.
4530 * dwarf2read.c (create_partial_symtab): Use new.
4531 * dbxread.c (start_psymtab): Use new.
4532 * ctfread.c (create_partial_symtab): Use new.
4533
4534 2020-01-26 Tom Tromey <tom@tromey.com>
4535
4536 * xcoffread.c (xcoff_end_psymtab): Use new.
4537 * psymtab.c (start_psymtab_common): Use new.
4538 (partial_symtab::partial_symtab): Rename from allocate_psymtab.
4539 Update.
4540 * psympriv.h (struct partial_symtab): Add parameters to
4541 constructor. Don't inline.
4542 (allocate_psymtab): Don't declare.
4543 * mdebugread.c (new_psymtab): Use new.
4544 * dwarf2read.c (dwarf2_create_include_psymtab): Use new.
4545 * dbxread.c (dbx_end_psymtab): Use new.
4546
4547 2020-01-26 Tom Tromey <tom@tromey.com>
4548
4549 * psymtab.h (class psymtab_storage) <install_psymtab>: Rename from
4550 allocate_psymtab. Update documentation.
4551 * psymtab.c (psymtab_storage::install_psymtab): Rename from
4552 allocate_psymtab. Do not use new.
4553 (allocate_psymtab): Use new. Update.
4554
4555 2020-01-26 Tom Tromey <tom@tromey.com>
4556
4557 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4558 * psymtab.c (psym_print_stats): Update.
4559 * psympriv.h (struct partial_symtab) <readin,
4560 psymtabs_addrmap_supported, anonymous>: Now bool.
4561 * mdebugread.c (psymtab_to_symtab_1): Update.
4562 * dwarf2read.c (create_type_unit_group, create_partial_symtab)
4563 (build_type_psymtabs_reader, psymtab_to_symtab_1)
4564 (process_full_comp_unit, process_full_type_unit): Update.
4565 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
4566 * ctfread.c (psymtab_to_symtab): Update.
4567
4568 2020-01-26 Tom Tromey <tom@tromey.com>
4569
4570 * mdebugread.c (parse_partial_symbols): Use discard_psymtab.
4571 * psymtab.h (class psymtab_storage) <free_psymtabs>: Remove.
4572 * psymtab.c (psymtab_storage): Delete psymtabs.
4573 (psymtab_storage::allocate_psymtab): Use new.
4574 (psymtab_storage::discard_psymtab): Use delete.
4575 * psympriv.h (struct partial_symtab): Add constructor and
4576 initializers.
4577
4578 2020-01-26 Tom Tromey <tom@tromey.com>
4579
4580 * machoread.c: Do not include psympriv.h.
4581
4582 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4583
4584 * NEWS: Mention the new option and the set/show commands.
4585
4586 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4587
4588 * exec.c (exec_file_mismatch_names, exec_file_mismatch_mode)
4589 (show_exec_file_mismatch_command, set_exec_file_mismatch_command)
4590 (validate_exec_file): New variables, enums, functions.
4591 (exec_file_locate_attach, print_section_info): Style the filenames.
4592 (_initialize_exec): Install show_exec_file_mismatch_command and
4593 set_exec_file_mismatch_command.
4594 * gdbcore.h (validate_exec_file): Declare.
4595 * infcmd.c (attach_command): Call validate_exec_file.
4596 * remote.c ( remote_target::remote_add_inferior): Likewise.
4597
4598 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
4599
4600 * frame.c (find_frame_sal): Move call to get_next_frame into more
4601 inner scope.
4602 * inline-frame.c (inilne_state) <inline_state>: Update argument
4603 types.
4604 (inilne_state) <skipped_symbol>: Rename to...
4605 (inilne_state) <skipped_symbols>: ...this, and change to a vector.
4606 (skip_inline_frames): Build vector of skipped symbols and use this
4607 to reate the inline_state.
4608 (inline_skipped_symbol): Add a comment and some assertions, fetch
4609 skipped symbol from the list.
4610
4611 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
4612
4613 * buildsym.c (lte_is_less_than): Delete.
4614 (buildsym_compunit::end_symtab_with_blockvector): Create local
4615 lambda function to sort line table entries, and use
4616 std::stable_sort instead of std::sort.
4617 * symtab.c (find_pc_sect_line): Skip backward over end of sequence
4618 markers when looking for a previous line.
4619
4620 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
4621
4622 * dwarf2read.c (lnp_state_machine::record_line): Include
4623 end_sequence parameter in debug print out. Record the line if we
4624 are at an end_sequence marker even if it's not the start of a
4625 statement.
4626 * symmisc.c (maintenance_print_one_line_table): Print end of
4627 sequence markers with 'END' not '0'.
4628
4629 2020-01-24 Pedro Alves <palves@redhat.com>
4630
4631 PR gdb/25410
4632 * thread.c (scoped_restore_current_thread::restore): Use
4633 switch_to_inferior_no_thread.
4634 * exec.c: Include "progspace-and-thread.h".
4635 (add_target_sections, remove_target_sections):
4636 scoped_restore_current_pspace_and_thread instead of
4637 scoped_restore_current_thread.
4638 * infrun.c (handle_vfork_child_exec_or_exit): Assign the pspace
4639 and aspace to the inferior before calling clone_program_space.
4640 Remove stale comment.
4641
4642 2020-01-24 Christian Biesinger <cbiesinger@google.com>
4643
4644 * arm-nbsd-nat.c (arm_nbsd_nat_target::fetch_registers): Rename to...
4645 (arm_netbsd_nat_target::fetch_registers): ...this.
4646 (arm_nbsd_nat_target::store_registers): Rename to...
4647 (arm_netbsd_nat_target::store_registers): ...this.
4648
4649 2020-01-24 Christian Biesinger <cbiesinger@google.com>
4650
4651 * arm-nbsd-nat.c: Define _KERNTYPES to get the declaration of
4652 register_t.
4653
4654 2020-01-24 Christian Biesinger <cbiesinger@google.com>
4655
4656 * aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections):
4657 Update comment.
4658 * aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections):
4659 Likewise.
4660 * arm-fbsd-tdep.c (arm_fbsd_iterate_over_regset_sections): Likewise.
4661 * gdbcore.h (deprecated_add_core_fns): Update comment to point to
4662 the correct replacement (iterate_over_regset_sections).
4663 * riscv-fbsd-tdep.c (riscv_fbsd_iterate_over_regset_sections):
4664 Update comment.
4665
4666 2020-01-24 Graham Markall <graham.markall@embecosm.com>
4667
4668 PR gdb/23718
4669 * gdb/python/python.c (execute_gdb_command): Call
4670 async_enable_stdin in catch block.
4671
4672 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
4673
4674 * event-loop.c (start_event_loop): Wrap async_enable_stdin with
4675 SWITCH_THRU_ALL_UIS.
4676
4677 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
4678
4679 PR tui/9765
4680 * minsyms.c (lookup_minimal_symbol_by_pc_section): Update header
4681 comment, add extra parameter, and update to store previous symbol
4682 when appropriate.
4683 * minsyms.h (lookup_minimal_symbol_by_pc_section): Update comment,
4684 add extra parameter.
4685 * tui/tui-disasm.c (tui_disassemble): Update header comment,
4686 remove unneeded parameter, add try/catch around gdb_print_insn,
4687 rewrite to add items to asm_lines vector.
4688 (tui_find_backward_disassembly_start_address): New function.
4689 (tui_find_disassembly_address): Updated throughout.
4690 (tui_disasm_window::set_contents): Update for changes to
4691 tui_disassemble.
4692 (tui_disasm_window::do_scroll_vertical): No need to adjust the
4693 number of lines to scroll.
4694
4695 2020-01-23 Simon Marchi <simon.marchi@polymtl.ca>
4696
4697 * objfiles.h (ALL_OBJFILE_OSECTIONS): Move up.
4698 (SECT_OFF_DATA): Likewise.
4699 (SECT_OFF_RODATA): Likewise.
4700 (SECT_OFF_TEXT): Likewise.
4701 (SECT_OFF_BSS): Likewise.
4702 (struct objfile) <text_section_offset, data_section_offset>: New
4703 methods.
4704 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Use
4705 objfile::text_section_offset.
4706 * coff-pe-read.c (add_pe_forwarded_sym): Likewise.
4707 * coffread.c (coff_symtab_read): Likewise.
4708 (enter_linenos): Likewise.
4709 (process_coff_symbol): Likewise.
4710 * ctfread.c (get_objfile_text_range): Likewise.
4711 * dtrace-probe.c (dtrace_probe::get_relocated_address):
4712 Use objfile::data_section_offset.
4713 * dwarf2-frame.c (execute_cfa_program): Use
4714 objfile::text_section_offset.
4715 (dwarf2_frame_find_fde): Likewise.
4716 * dwarf2read.c (create_addrmap_from_index): Likewise.
4717 (create_addrmap_from_aranges): Likewise.
4718 (dw2_find_pc_sect_compunit_symtab): Likewise.
4719 (process_psymtab_comp_unit_reader): Likewise.
4720 (add_partial_symbol): Likewise.
4721 (add_partial_subprogram): Likewise.
4722 (process_full_comp_unit): Likewise.
4723 (read_file_scope): Likewise.
4724 (read_func_scope): Likewise.
4725 (read_lexical_block_scope): Likewise.
4726 (read_call_site_scope): Likewise.
4727 (dwarf2_rnglists_process): Likewise.
4728 (dwarf2_ranges_process): Likewise.
4729 (dwarf2_ranges_read): Likewise.
4730 (dwarf_decode_lines_1): Likewise.
4731 (new_symbol): Likewise.
4732 (dwarf2_fetch_die_loc_sect_off): Likewise.
4733 (dwarf2_per_cu_text_offset): Likewise.
4734 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Likewise.
4735 * hppa-tdep.c (read_unwind_info): Likewise.
4736 * ia64-tdep.c (ia64_find_unwind_table): Likewise.
4737 * psympriv.h (struct partial_symtab): Likewise.
4738 * psymtab.c (find_pc_sect_psymtab): Likewise.
4739 * solib-svr4.c (enable_break): Likewise.
4740 * stap-probe.c (relocate_address): Use
4741 objfile::data_section_offset.
4742 * xcoffread.c (enter_line_range): Use
4743 objfile::text_section_offset.
4744 (read_xcoff_symtab): Likewise.
4745
4746 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
4747
4748 * darwin-nat.c (darwin_nat_target::wait_1): Move `inf`
4749 declaration to narrower scopes.
4750
4751 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
4752
4753 * darwin-nat.h (struct darwin_exception_msg, enum
4754 darwin_msg_state, struct darwin_thread_info, darwin_thread_t):
4755 Move up.
4756 (class darwin_nat_target) <wait_1, check_new_threads,
4757 decode_exception_message, decode_message, stop_inferior,
4758 init_thread_list, ptrace_him, cancel_breakpoint>: Declare.
4759 * darwin-nat.c (darwin_check_new_threads): Rename to...
4760 (darwin_nat_target::check_new_threads): ... this.
4761 (darwin_suspend_inferior_it): Remove.
4762 (darwin_decode_exception_message): Rename to...
4763 (darwin_nat_target::decode_exception_message): ... this.
4764 (darwin_nat_target::resume): Pass target to find_inferior_ptid.
4765 (darwin_decode_message): Rename to...
4766 (darwin_nat_target::decode_message): ... this.
4767 (cancel_breakpoint): Rename to...
4768 (darwin_nat_target::cancel_breakpoint): ... this.
4769 (darwin_wait): Rename to...
4770 (darwin_nat_target::wait_1): ... this. Use range-based for loop
4771 instead of iterate_over_inferiors.
4772 (darwin_nat_target::wait): Call wait_1 instead of darwin_wait.
4773 (darwin_stop_inferior): Rename to...
4774 (darwin_nat_target::stop_inferior): ... this.
4775 (darwin_nat_target::kill): Call wait_1 instead of darwin_wait.
4776 (darwin_init_thread_list): Rename to...
4777 (darwin_nat_target::init_thread_list): ... this.
4778 (darwin_ptrace_him): Rename to...
4779 (darwin_nat_target::ptrace_him): ... this.
4780 (darwin_nat_target::create_inferior): Pass lambda function to
4781 fork_inferior.
4782 (darwin_nat_target::detach): Call stop_inferior instead of
4783 darwin_stop_inferior.
4784 * fork-inferior.h (fork_inferior): Change init_trace_fun
4785 parameter to gdb::function_view.
4786 * fork-inferior.c (fork_inferior): Likewise.
4787
4788 2020-01-23 Hannes Domani <ssbssa@yahoo.de>
4789
4790 * i386-cygwin-tdep.c (core_process_module_section): Update.
4791 * windows-nat.c (struct lm_info_windows): Add text_offset.
4792 (windows_xfer_shared_libraries): Update.
4793 * windows-tdep.c (windows_xfer_shared_library):
4794 Add text_offset_cached argument.
4795 * windows-tdep.h (windows_xfer_shared_library): Update.
4796
4797 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
4798
4799 * gdbarch.sh: Add declaration for _initialize_gdbarch.
4800
4801 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
4802
4803 * remote-sim.c (check_for_duplicate_sim_descriptor): Remove.
4804 (get_sim_inferior_data): Remove use of iterate_over_inferiors,
4805 replace with range-based for.
4806 (gdbsim_interrupt_inferior): Remove.
4807 (gdbsim_target::interrupt): Replace iterate_over_inferiors use
4808 with a range-based for. Inline code from
4809 gdbsim_interrupt_inferior.
4810
4811 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
4812
4813 * infrun.c (proceed): Fix indentation.
4814
4815 2020-01-21 Tom Tromey <tromey@adacore.com>
4816
4817 * source-cache.c (source_cache::ensure): Call ext_lang_colorize.
4818 * python/python.c (python_extension_ops): Update.
4819 (gdbpy_colorize): New function.
4820 * python/lib/gdb/__init__.py (colorize): New function.
4821 * extension.h (ext_lang_colorize): Declare.
4822 * extension.c (ext_lang_colorize): New function.
4823 * extension-priv.h (struct extension_language_ops) <colorize>: New
4824 member.
4825 * cli/cli-style.c (_initialize_cli_style): Update help text.
4826
4827 2020-01-21 Luis Machado <luis.machado@linaro.org>
4828
4829 * aarch64-tdep.c (struct aarch64_displaced_step_closure)
4830 <cond>: Change type to bool.
4831 (aarch64_displaced_step_b_cond): Update cond to use bool type.
4832 (aarch64_displaced_step_cb): Likewise.
4833 (aarch64_displaced_step_tb): Likewise.
4834
4835 2020-01-21 Luis Machado <luis.machado@linaro.org>
4836
4837 * aarch64-tdep.c (aarch64_displaced_step_fixup): Add more debugging
4838 output.
4839
4840 2020-01-21 Luis Machado <luis.machado@linaro.org>
4841
4842 * aarch64-tdep.c (struct aarch64_displaced_step_closure )
4843 <pc_adjust>: Adjust the documentation.
4844 (aarch64_displaced_step_fixup): Check if PC really moved before
4845 adjusting it.
4846
4847 2020-01-19 Tom Tromey <tom@tromey.com>
4848
4849 * disasm.c (~gdb_disassembler): New destructor.
4850 (gdb_buffered_insn_length): Call disassemble_free_target.
4851 * disasm.h (class gdb_disassembler): Declare destructor. Use
4852 DISABLE_COPY_AND_ASSIGN.
4853
4854 2020-01-19 Tom Tromey <tom@tromey.com>
4855
4856 * dwarf2read.c (abbrev_table_up): Move typedef earlier.
4857 (die_reader_func_ftype): Remove.
4858 (cutu_reader): New class.
4859 (dw2_get_file_names_reader): Remove "data" parameter.
4860 (dw2_get_file_names): Use cutu_reader.
4861 (create_debug_type_hash_table): Update.
4862 (read_cutu_die_from_dwo): Update comment.
4863 (lookup_dwo_unit): Add dwo_name parameter.
4864 (cutu_reader::init_tu_and_read_dwo_dies): Now a method. Remove
4865 die_reader_func_ftype and data parameters.
4866 (cutu_reader::cutu_reader): Rename from init_cutu_and_read_dies.
4867 Remove die_reader_func_ftype and data parameters.
4868 (~cutu_reader): New; from init_cutu_and_read_dies.
4869 (cutu_reader::cutu_reader): Rename from
4870 init_cutu_and_read_dies_no_follow. Remove die_reader_func_ftype
4871 and data parameters.
4872 (init_cutu_and_read_dies_simple): Remove.
4873 (struct process_psymtab_comp_unit_data): Remove.
4874 (process_psymtab_comp_unit_reader): Remove data parameter; add
4875 want_partial_unit and pretend_language parameters.
4876 (process_psymtab_comp_unit): Use cutu_reader.
4877 (build_type_psymtabs_reader): Remove data parameter.
4878 (build_type_psymtabs_1): Use cutu_reader.
4879 (process_skeletonless_type_unit): Likewise.
4880 (load_partial_comp_unit_reader): Remove.
4881 (load_partial_comp_unit): Use cutu_reader.
4882 (load_full_comp_unit_reader): Remove.
4883 (load_full_comp_unit): Use cutu_reader.
4884 (struct create_dwo_cu_data): Remove.
4885 (create_dwo_cu_reader): Remove datap parameter; add dwo_file and
4886 dwo_unit parameters.
4887 (create_cus_hash_table): Use cutu_reader.
4888 (struct dwarf2_read_addr_index_data): Remove.
4889 (dwarf2_read_addr_index_reader): Remove.
4890 (dwarf2_read_addr_index): Use cutu_reader.
4891 (read_signatured_type_reader): Remove.
4892 (read_signatured_type): Use cutu_reader.
4893
4894 2020-01-19 Tom Tromey <tom@tromey.com>
4895
4896 * tui/tui.c (tui_show_assembly): Use tui_suppress_output.
4897 * tui/tui-wingeneral.h (class tui_suppress_output): New.
4898 (tui_wrefresh): Declare.
4899 * tui/tui-wingeneral.c (suppress_output): New global.
4900 (tui_suppress_output, ~tui_suppress_output): New constructor and
4901 destructor.
4902 (tui_wrefresh): New function.
4903 (tui_gen_win_info::refresh_window): Use tui_wrefresh.
4904 (tui_gen_win_info::make_window): Call wnoutrefresh when needed.
4905 * tui/tui-regs.h (struct tui_data_window) <no_refresh>: Declare
4906 method.
4907 * tui/tui-regs.c (tui_data_window::erase_data_content): Call
4908 tui_wrefresh.
4909 (tui_data_window::no_refresh): New method.
4910 (tui_data_item_window::refresh_window): Call tui_wrefresh.
4911 (tui_reg_command): Use tui_suppress_output
4912 * tui/tui-layout.c (tui_set_layout): Use tui_suppress_output.
4913 * tui/tui-data.h (struct tui_gen_win_info) <no_refresh>: New
4914 method.
4915 * tui/tui-command.c (tui_refresh_cmd_win): Call tui_wrefresh.
4916
4917 2020-01-19 Tom Tromey <tom@tromey.com>
4918
4919 * tui/tui-winsource.c (tui_update_source_windows_with_line):
4920 Handle case where symtab is null.
4921
4922 2020-01-19 Simon Marchi <simon.marchi@polymtl.ca>
4923
4924 * linux-fork.c (one_fork_p): Simplify.
4925
4926 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
4927
4928 * top.c (struct qt_args): Remove.
4929 (kill_or_detach): Change return type to void, replace `void *`
4930 parameter with a proper one.
4931 (print_inferior_quit_action): Likewise.
4932 (quit_confirm): Use range-based for loop to iterate over inferiors.
4933 (quit_force): Likewise.
4934
4935 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
4936
4937 * mi/mi-main.c (run_one_inferior): Change return type to void, replace
4938 `void *` parameter with proper parameters.
4939 (mi_cmd_exec_run): Use range-based loop to iterate over inferiors.
4940 (print_one_inferior): Change return type to void, replace `void *`
4941 parameter with proper parameters.
4942 (mi_cmd_list_thread_groups): Use range-based loop to iterate over
4943 inferiors.
4944 (get_other_inferior): Remove.
4945 (mi_cmd_remove_inferior): Use range-based loop to iterate over
4946 inferiors.
4947
4948 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
4949
4950 * mi/mi-interp.c (report_initial_inferior): Remove.
4951 (mi_interp::init): Use range-based for to iterate over inferiors.
4952
4953 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
4954
4955 * python/py-inferior.c (build_inferior_list): Remove.
4956 (gdbpy_ref): Use range-based for loop to iterate over inferiors.
4957
4958 2020-01-16 Christian Biesinger <cbiesinger@google.com>
4959
4960 * btrace.c (btrace_compute_ftrace_1): Fix spelling error (Unkown).
4961 (btrace_stitch_trace): Likewise.
4962 * charset.c (intermediate_encoding): Likewise (vaild).
4963 * nat/linux-btrace.c (linux_read_pt): Likewise (Unkown).
4964 * python/py-record-btrace.c (struct PyMethodDef): Likewise (occurences).
4965 * record-btrace.c (record_btrace_print_conf): Likewise (unkown).
4966
4967 2020-01-16 Hannes Domani <ssbssa@yahoo.de>
4968
4969 * windows-tdep.c (windows_get_tlb_type):
4970 Add rtl_user_process_parameters type.
4971
4972 2020-01-16 Pedro Alves <palves@redhat.com>
4973 Norbert Lange <nolange79@gmail.com>
4974
4975 PR build/24805
4976 * gdbsupport/gdb_proc_service.h (PS_EXPORT): New.
4977 (ps_get_thread_area, ps_getpid, ps_lcontinue, ps_lgetfpregs)
4978 (ps_lgetregs, ps_lsetfpregs, ps_lsetregs, ps_lstop, ps_pcontinue)
4979 (ps_pdread, ps_pdwrite, ps_pglobal_lookup, ps_pstop, ps_ptread)
4980 (ps_ptwrite, ps_lgetxregs, ps_lgetxregsize, ps_lsetxregs)
4981 (ps_plog): Redeclare exported functions with default visibility.
4982
4983 2020-01-16 Nitika Achra <Nitika.Achra@amd.com>
4984
4985 * dwarf2loc.c (decode_debug_loclists_addresses): Handle
4986 DW_LLE_base_addressx, DW_LLE_startx_length, DW_LLE_start_length.
4987
4988 2020-01-15 Simon Marchi <simon.marchi@efficios.com>
4989
4990 * infcmd.c (post_create_inferior): Use get_thread_regcache
4991 instead of get_current_regcache.
4992
4993 2020-01-14 Tom Tromey <tom@tromey.com>
4994
4995 PR symtab/12535:
4996 * python/python.c (gdbpy_decode_line): Treat empty string the same
4997 as no argument.
4998
4999 2020-01-14 Tom Tromey <tom@tromey.com>
5000
5001 * Makefile.in (CLIBS): Remove second use of $(LIBIBERTY).
5002
5003 2020-01-14 Tom Tromey <tom@tromey.com>
5004
5005 * nat/linux-btrace.c: Don't include <config.h>.
5006 * nat/linux-ptrace.c: Don't include <config.h>.
5007 * nat/x86-linux-dregs.c: Don't include <config.h>.
5008
5009 2020-01-14 Tom Tromey <tom@tromey.com>
5010
5011 * configure: Rebuild.
5012 * configure.ac: Move many checks to ../gdbsupport/common.m4.
5013
5014 2020-01-14 Tom Tromey <tom@tromey.com>
5015
5016 * nat/x86-linux-dregs.c: Include configh.h.
5017 * nat/linux-ptrace.c: Include configh.h.
5018 * nat/linux-btrace.c: Include configh.h.
5019 * defs.h: Include config.h, bfd.h.
5020 * configure.ac: Don't source common.host.
5021 (CONFIG_OBS, CONFIG_SRCS): Remove gdbsupport files.
5022 * configure: Rebuild.
5023 * acinclude.m4: Update path.
5024 * Makefile.in (SUPPORT, LIBSUPPORT, INCSUPPORT): New variables.
5025 (CONFIG_SRC_SUBDIR): Remove gdbsupport.
5026 (INTERNAL_CFLAGS_BASE): Add INCSUPPORT.
5027 (CLIBS): Add LIBSUPPORT.
5028 (CDEPS): Likewise.
5029 (COMMON_SFILES): Remove gdbsupport files.
5030 (HFILES_NO_SRCDIR): Likewise.
5031 (stamp-version): Update path to create-version.sh.
5032 (ALLDEPFILES): Remove gdbsupport files.
5033
5034 2020-01-14 Tom Tromey <tom@tromey.com>
5035
5036 * gdbsupport/common.m4 (GDB_AC_COMMON): Define WIN32APILIBS and
5037 USE_WIN32API when needed.
5038 * configure.ac (USE_WIN32API): Don't define.
5039 (WIN32LIBS): Use WIN32APILIBS.
5040 * configure: Rebuild.
5041
5042 2020-01-14 Tom Tromey <tom@tromey.com>
5043
5044 * configure: Rebuild.
5045 * gdbsupport/common.m4 (GDB_AC_COMMON): Fix indentation.
5046
5047 2020-01-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5048
5049 * skip.c (skip_function_command): Make skip w/o arguments use the
5050 name of the inlined function if pc is inside any inlined function.
5051
5052 2020-01-14 Luis Machado <luis.machado@linaro.org>
5053
5054 * inf-ptrace.c (inf_ptrace_target::resume): Update comments.
5055 * infrun.c (resume_1): Likewise.
5056 (handle_inferior_event): Remove stale comment.
5057 * linux-nat.c (linux_nat_target::resume): Update comments.
5058 (save_stop_reason): Likewise.
5059 (linux_nat_filter_event): Likewise.
5060 * linux-nat.h (struct lwp_info) <stop_pc>, <stop_reason>: Likewise.
5061
5062 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
5063
5064 * elfread.c (record_minimal_symbol): Set section index to 0 for
5065 non-allocatable sections.
5066
5067
5068 2020-01-13 Ali Tamur <tamur@google.com>
5069
5070 * dwarf2read.c (dwarf2_debug_sections): Add debug_str_offsets sections.
5071 (dwarf2_cu): Add str_offsets_base field. Change the type of addr_base
5072 to gdb::optional. Update comments.
5073 (dwo_file): Update comments.
5074 (read_attribute): Update API to take an additional out parameter,
5075 need_reprocess. This is used to mark attributes that need other
5076 attributes (e.g. str_offsets_base) for correct computation which may not
5077 have been read yet.
5078 (read_attribute_reprocess): New function declaration.
5079 (read_addr_index): Likewise.
5080 (read_dwo_str_index): Likewise.
5081 (read_stub_str_index): Likewise.
5082 (dwarf2_per_objfile::locate_sections): Handle debug_str_offsets section.
5083 (lookup_addr_base): New function definition.
5084 (lookup_ranges_base): Likewise.
5085 (read_cutu_die_from_dwo): Use the new functions: lookup_addr_base,
5086 lookup_ranges_base.
5087 (init_cutu_and_read_dies): Update comments.
5088 (init_cutu_and_read_dies_no_follow): Change API to take parent compile
5089 unit. This is used to inherit parent's str_offsets_base and addr_base.
5090 Update comments.
5091 (init_cutu_and_read_dies_simple): Reflect API changes.
5092 (skip_one_die): Reflect API changes. Handle DW_FORM_rnglistx.
5093 (create_cus_hash_table): Change API to take parent compile unit.
5094 Reflect API changes.
5095 (open_and_init_dwo_file): Reflect API changes.
5096 (dwarf2_get_pc_bounds): Update comments.
5097 (dwarf2_record_block_ranges): Likewise.
5098 (read_full_die_1): Change implementation to reprocess attributes that
5099 need str_offsets_base and addr_base.
5100 (partial_die_info::read): Likewise.
5101 (read_attribute_reprocess): New function definition.
5102 (read_attribute_value): Change API to take an additional out parameter,
5103 need_reprocess. Handle DW_FORM_rnglistx. No longer trigger an error
5104 when a non-dwo compile unit has index based attributes.
5105 (read_attribute): Reflect API changes.
5106 (read_addr_index_1): Reflect API changes. Update comments.
5107 (dwarf2_read_addr_index_data): Reflect API changes.
5108 (dwarf2_read_addr_index): Likewise.
5109 (read_str_index): Change API and implementation. This becomes a helper
5110 to be used by the new string index related methods. Update error
5111 message and comments.
5112 (read_dwo_str_index): New function definition.
5113 (read_stub_str_index): Likewise.
5114 * dwarf2read.h (dwarf2_per_objfile): Add str_offsets field.
5115 * symfile.h (dwarf2_debug_sections): Likewise.
5116 * xcoffread.c (dwarf2_debug_sections): Likewise.
5117
5118 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
5119
5120 * gdbcore.h (struct core_fns) <core_read_registers>: Change
5121 core_reg_sect type to gdb_byte *.
5122 * arm-nbsd-nat.c (fetch_elfcore_registers): Likewise.
5123 * cris-tdep.c (fetch_core_registers): Likewise.
5124 * corelow.c (core_target::get_core_register_section): Change
5125 type of `contents` to gdb::byte_vector.
5126
5127 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
5128
5129 * tui/tui-wingeneral.c (box_win): Position the title in the center
5130 of the border.
5131
5132 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
5133
5134 * corelow.c (core_target::get_core_register_section): Use
5135 std::vector instead of alloca.
5136
5137 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
5138
5139 * warning.m4: Add -Wmissing-declarations to build_warnings.
5140 * configure: Re-generate.
5141
5142 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
5143
5144 * python/python.c (init__gdb_module): Add declaration.
5145
5146 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
5147
5148 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Add declaration.
5149 * aarch64-fbsd-tdep.c (_initialize_aarch64_fbsd_tdep): Add declaration.
5150 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Add declaration.
5151 * aarch64-linux-tdep.c (_initialize_aarch64_linux_tdep): Add declaration.
5152 * aarch64-newlib-tdep.c (_initialize_aarch64_newlib_tdep): Add declaration.
5153 * aarch64-tdep.c (_initialize_aarch64_tdep): Add declaration.
5154 * ada-exp.y (_initialize_ada_exp): Add declaration.
5155 * ada-lang.c (_initialize_ada_language): Add declaration.
5156 * ada-tasks.c (_initialize_tasks): Add declaration.
5157 * agent.c (_initialize_agent): Add declaration.
5158 * aix-thread.c (_initialize_aix_thread): Add declaration.
5159 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Add declaration.
5160 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Add declaration.
5161 * alpha-linux-tdep.c (_initialize_alpha_linux_tdep): Add declaration.
5162 * alpha-nbsd-tdep.c (_initialize_alphanbsd_tdep): Add declaration.
5163 * alpha-obsd-tdep.c (_initialize_alphaobsd_tdep): Add declaration.
5164 * alpha-tdep.c (_initialize_alpha_tdep): Add declaration.
5165 * amd64-darwin-tdep.c (_initialize_amd64_darwin_tdep): Add declaration.
5166 * amd64-dicos-tdep.c (_initialize_amd64_dicos_tdep): Add declaration.
5167 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Add declaration.
5168 * amd64-fbsd-tdep.c (_initialize_amd64fbsd_tdep): Add declaration.
5169 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Add declaration.
5170 * amd64-linux-tdep.c (_initialize_amd64_linux_tdep): Add declaration.
5171 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Add declaration.
5172 * amd64-nbsd-tdep.c (_initialize_amd64nbsd_tdep): Add declaration.
5173 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Add declaration.
5174 * amd64-obsd-tdep.c (_initialize_amd64obsd_tdep): Add declaration.
5175 * amd64-sol2-tdep.c (_initialize_amd64_sol2_tdep): Add declaration.
5176 * amd64-tdep.c (_initialize_amd64_tdep): Add declaration.
5177 * amd64-windows-nat.c (_initialize_amd64_windows_nat): Add declaration.
5178 * amd64-windows-tdep.c (_initialize_amd64_windows_tdep): Add declaration.
5179 * annotate.c (_initialize_annotate): Add declaration.
5180 * arc-newlib-tdep.c (_initialize_arc_newlib_tdep): Add declaration.
5181 * arc-tdep.c (_initialize_arc_tdep): Add declaration.
5182 * arch-utils.c (_initialize_gdbarch_utils): Add declaration.
5183 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Add declaration.
5184 * arm-fbsd-tdep.c (_initialize_arm_fbsd_tdep): Add declaration.
5185 * arm-linux-nat.c (_initialize_arm_linux_nat): Add declaration.
5186 * arm-linux-tdep.c (_initialize_arm_linux_tdep): Add declaration.
5187 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Add declaration.
5188 * arm-nbsd-tdep.c (_initialize_arm_netbsd_tdep): Add declaration.
5189 * arm-obsd-tdep.c (_initialize_armobsd_tdep): Add declaration.
5190 * arm-pikeos-tdep.c (_initialize_arm_pikeos_tdep): Add declaration.
5191 * arm-symbian-tdep.c (_initialize_arm_symbian_tdep): Add declaration.
5192 * arm-tdep.c (_initialize_arm_tdep): Add declaration.
5193 * arm-wince-tdep.c (_initialize_arm_wince_tdep): Add declaration.
5194 * auto-load.c (_initialize_auto_load): Add declaration.
5195 * auxv.c (_initialize_auxv): Add declaration.
5196 * avr-tdep.c (_initialize_avr_tdep): Add declaration.
5197 * ax-gdb.c (_initialize_ax_gdb): Add declaration.
5198 * bfin-linux-tdep.c (_initialize_bfin_linux_tdep): Add declaration.
5199 * bfin-tdep.c (_initialize_bfin_tdep): Add declaration.
5200 * break-catch-sig.c (_initialize_break_catch_sig): Add declaration.
5201 * break-catch-syscall.c (_initialize_break_catch_syscall): Add declaration.
5202 * break-catch-throw.c (_initialize_break_catch_throw): Add declaration.
5203 * breakpoint.c (_initialize_breakpoint): Add declaration.
5204 * bsd-uthread.c (_initialize_bsd_uthread): Add declaration.
5205 * btrace.c (_initialize_btrace): Add declaration.
5206 * charset.c (_initialize_charset): Add declaration.
5207 * cli/cli-cmds.c (_initialize_cli_cmds): Add declaration.
5208 * cli/cli-dump.c (_initialize_cli_dump): Add declaration.
5209 * cli/cli-interp.c (_initialize_cli_interp): Add declaration.
5210 * cli/cli-logging.c (_initialize_cli_logging): Add declaration.
5211 * cli/cli-script.c (_initialize_cli_script): Add declaration.
5212 * cli/cli-style.c (_initialize_cli_style): Add declaration.
5213 * coff-pe-read.c (_initialize_coff_pe_read): Add declaration.
5214 * coffread.c (_initialize_coffread): Add declaration.
5215 * compile/compile-cplus-types.c (_initialize_compile_cplus_types): Add declaration.
5216 * compile/compile.c (_initialize_compile): Add declaration.
5217 * complaints.c (_initialize_complaints): Add declaration.
5218 * completer.c (_initialize_completer): Add declaration.
5219 * copying.c (_initialize_copying): Add declaration.
5220 * corefile.c (_initialize_core): Add declaration.
5221 * corelow.c (_initialize_corelow): Add declaration.
5222 * cp-abi.c (_initialize_cp_abi): Add declaration.
5223 * cp-namespace.c (_initialize_cp_namespace): Add declaration.
5224 * cp-support.c (_initialize_cp_support): Add declaration.
5225 * cp-valprint.c (_initialize_cp_valprint): Add declaration.
5226 * cris-linux-tdep.c (_initialize_cris_linux_tdep): Add declaration.
5227 * cris-tdep.c (_initialize_cris_tdep): Add declaration.
5228 * csky-linux-tdep.c (_initialize_csky_linux_tdep): Add declaration.
5229 * csky-tdep.c (_initialize_csky_tdep): Add declaration.
5230 * ctfread.c (_initialize_ctfread): Add declaration.
5231 * d-lang.c (_initialize_d_language): Add declaration.
5232 * darwin-nat-info.c (_initialize_darwin_info_commands): Add declaration.
5233 * darwin-nat.c (_initialize_darwin_nat): Add declaration.
5234 * dbxread.c (_initialize_dbxread): Add declaration.
5235 * dcache.c (_initialize_dcache): Add declaration.
5236 * disasm-selftests.c (_initialize_disasm_selftests): Add declaration.
5237 * disasm.c (_initialize_disasm): Add declaration.
5238 * dtrace-probe.c (_initialize_dtrace_probe): Add declaration.
5239 * dummy-frame.c (_initialize_dummy_frame): Add declaration.
5240 * dwarf-index-cache.c (_initialize_index_cache): Add declaration.
5241 * dwarf-index-write.c (_initialize_dwarf_index_write): Add declaration.
5242 * dwarf2-frame-tailcall.c (_initialize_tailcall_frame): Add declaration.
5243 * dwarf2-frame.c (_initialize_dwarf2_frame): Add declaration.
5244 * dwarf2expr.c (_initialize_dwarf2expr): Add declaration.
5245 * dwarf2loc.c (_initialize_dwarf2loc): Add declaration.
5246 * dwarf2read.c (_initialize_dwarf2_read): Add declaration.
5247 * elfread.c (_initialize_elfread): Add declaration.
5248 * exec.c (_initialize_exec): Add declaration.
5249 * extension.c (_initialize_extension): Add declaration.
5250 * f-lang.c (_initialize_f_language): Add declaration.
5251 * f-valprint.c (_initialize_f_valprint): Add declaration.
5252 * fbsd-nat.c (_initialize_fbsd_nat): Add declaration.
5253 * fbsd-tdep.c (_initialize_fbsd_tdep): Add declaration.
5254 * filesystem.c (_initialize_filesystem): Add declaration.
5255 * findcmd.c (_initialize_mem_search): Add declaration.
5256 * findvar.c (_initialize_findvar): Add declaration.
5257 * fork-child.c (_initialize_fork_child): Add declaration.
5258 * frame-base.c (_initialize_frame_base): Add declaration.
5259 * frame-unwind.c (_initialize_frame_unwind): Add declaration.
5260 * frame.c (_initialize_frame): Add declaration.
5261 * frv-linux-tdep.c (_initialize_frv_linux_tdep): Add declaration.
5262 * frv-tdep.c (_initialize_frv_tdep): Add declaration.
5263 * ft32-tdep.c (_initialize_ft32_tdep): Add declaration.
5264 * gcore.c (_initialize_gcore): Add declaration.
5265 * gdb-demangle.c (_initialize_gdb_demangle): Add declaration.
5266 * gdb_bfd.c (_initialize_gdb_bfd): Add declaration.
5267 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Add declaration.
5268 * gdbarch.c (_initialize_gdbarch): Add declaration.
5269 * gdbtypes.c (_initialize_gdbtypes): Add declaration.
5270 * gnu-nat.c (_initialize_gnu_nat): Add declaration.
5271 * gnu-v2-abi.c (_initialize_gnu_v2_abi): Add declaration.
5272 * gnu-v3-abi.c (_initialize_gnu_v3_abi): Add declaration.
5273 * go-lang.c (_initialize_go_language): Add declaration.
5274 * go32-nat.c (_initialize_go32_nat): Add declaration.
5275 * guile/guile.c (_initialize_guile): Add declaration.
5276 * h8300-tdep.c (_initialize_h8300_tdep): Add declaration.
5277 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Add declaration.
5278 * hppa-linux-tdep.c (_initialize_hppa_linux_tdep): Add declaration.
5279 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Add declaration.
5280 * hppa-nbsd-tdep.c (_initialize_hppanbsd_tdep): Add declaration.
5281 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Add declaration.
5282 * hppa-obsd-tdep.c (_initialize_hppabsd_tdep): Add declaration.
5283 * hppa-tdep.c (_initialize_hppa_tdep): Add declaration.
5284 * i386-bsd-nat.c (_initialize_i386bsd_nat): Add declaration.
5285 * i386-cygwin-tdep.c (_initialize_i386_cygwin_tdep): Add declaration.
5286 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Add declaration.
5287 * i386-darwin-tdep.c (_initialize_i386_darwin_tdep): Add declaration.
5288 * i386-dicos-tdep.c (_initialize_i386_dicos_tdep): Add declaration.
5289 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Add declaration.
5290 * i386-fbsd-tdep.c (_initialize_i386fbsd_tdep): Add declaration.
5291 * i386-gnu-nat.c (_initialize_i386gnu_nat): Add declaration.
5292 * i386-gnu-tdep.c (_initialize_i386gnu_tdep): Add declaration.
5293 * i386-go32-tdep.c (_initialize_i386_go32_tdep): Add declaration.
5294 * i386-linux-nat.c (_initialize_i386_linux_nat): Add declaration.
5295 * i386-linux-tdep.c (_initialize_i386_linux_tdep): Add declaration.
5296 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Add declaration.
5297 * i386-nbsd-tdep.c (_initialize_i386nbsd_tdep): Add declaration.
5298 * i386-nto-tdep.c (_initialize_i386nto_tdep): Add declaration.
5299 * i386-obsd-nat.c (_initialize_i386obsd_nat): Add declaration.
5300 * i386-obsd-tdep.c (_initialize_i386obsd_tdep): Add declaration.
5301 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Add declaration.
5302 * i386-sol2-tdep.c (_initialize_i386_sol2_tdep): Add declaration.
5303 * i386-tdep.c (_initialize_i386_tdep): Add declaration.
5304 * i386-windows-nat.c (_initialize_i386_windows_nat): Add declaration.
5305 * ia64-libunwind-tdep.c (_initialize_libunwind_frame): Add declaration.
5306 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Add declaration.
5307 * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Add declaration.
5308 * ia64-tdep.c (_initialize_ia64_tdep): Add declaration.
5309 * ia64-vms-tdep.c (_initialize_ia64_vms_tdep): Add declaration.
5310 * infcall.c (_initialize_infcall): Add declaration.
5311 * infcmd.c (_initialize_infcmd): Add declaration.
5312 * inflow.c (_initialize_inflow): Add declaration.
5313 * infrun.c (_initialize_infrun): Add declaration.
5314 * interps.c (_initialize_interpreter): Add declaration.
5315 * iq2000-tdep.c (_initialize_iq2000_tdep): Add declaration.
5316 * jit.c (_initialize_jit): Add declaration.
5317 * language.c (_initialize_language): Add declaration.
5318 * linux-fork.c (_initialize_linux_fork): Add declaration.
5319 * linux-nat.c (_initialize_linux_nat): Add declaration.
5320 * linux-tdep.c (_initialize_linux_tdep): Add declaration.
5321 * linux-thread-db.c (_initialize_thread_db): Add declaration.
5322 * lm32-tdep.c (_initialize_lm32_tdep): Add declaration.
5323 * m2-lang.c (_initialize_m2_language): Add declaration.
5324 * m32c-tdep.c (_initialize_m32c_tdep): Add declaration.
5325 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Add declaration.
5326 * m32r-linux-tdep.c (_initialize_m32r_linux_tdep): Add declaration.
5327 * m32r-tdep.c (_initialize_m32r_tdep): Add declaration.
5328 * m68hc11-tdep.c (_initialize_m68hc11_tdep): Add declaration.
5329 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Add declaration.
5330 * m68k-bsd-tdep.c (_initialize_m68kbsd_tdep): Add declaration.
5331 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Add declaration.
5332 * m68k-linux-tdep.c (_initialize_m68k_linux_tdep): Add declaration.
5333 * m68k-tdep.c (_initialize_m68k_tdep): Add declaration.
5334 * machoread.c (_initialize_machoread): Add declaration.
5335 * macrocmd.c (_initialize_macrocmd): Add declaration.
5336 * macroscope.c (_initialize_macroscope): Add declaration.
5337 * maint-test-options.c (_initialize_maint_test_options): Add declaration.
5338 * maint-test-settings.c (_initialize_maint_test_settings): Add declaration.
5339 * maint.c (_initialize_maint_cmds): Add declaration.
5340 * mdebugread.c (_initialize_mdebugread): Add declaration.
5341 * memattr.c (_initialize_mem): Add declaration.
5342 * mep-tdep.c (_initialize_mep_tdep): Add declaration.
5343 * mi/mi-cmd-env.c (_initialize_mi_cmd_env): Add declaration.
5344 * mi/mi-cmds.c (_initialize_mi_cmds): Add declaration.
5345 * mi/mi-interp.c (_initialize_mi_interp): Add declaration.
5346 * mi/mi-main.c (_initialize_mi_main): Add declaration.
5347 * microblaze-linux-tdep.c (_initialize_microblaze_linux_tdep): Add declaration.
5348 * microblaze-tdep.c (_initialize_microblaze_tdep): Add declaration.
5349 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Add declaration.
5350 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Add declaration.
5351 * mips-linux-nat.c (_initialize_mips_linux_nat): Add declaration.
5352 * mips-linux-tdep.c (_initialize_mips_linux_tdep): Add declaration.
5353 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Add declaration.
5354 * mips-nbsd-tdep.c (_initialize_mipsnbsd_tdep): Add declaration.
5355 * mips-sde-tdep.c (_initialize_mips_sde_tdep): Add declaration.
5356 * mips-tdep.c (_initialize_mips_tdep): Add declaration.
5357 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Add declaration.
5358 * mips64-obsd-tdep.c (_initialize_mips64obsd_tdep): Add declaration.
5359 * mipsread.c (_initialize_mipsread): Add declaration.
5360 * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Add declaration.
5361 * mn10300-tdep.c (_initialize_mn10300_tdep): Add declaration.
5362 * moxie-tdep.c (_initialize_moxie_tdep): Add declaration.
5363 * msp430-tdep.c (_initialize_msp430_tdep): Add declaration.
5364 * nds32-tdep.c (_initialize_nds32_tdep): Add declaration.
5365 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Add declaration.
5366 * nios2-tdep.c (_initialize_nios2_tdep): Add declaration.
5367 * nto-procfs.c (_initialize_procfs): Add declaration.
5368 * objc-lang.c (_initialize_objc_language): Add declaration.
5369 * observable.c (_initialize_observer): Add declaration.
5370 * opencl-lang.c (_initialize_opencl_language): Add declaration.
5371 * or1k-linux-tdep.c (_initialize_or1k_linux_tdep): Add declaration.
5372 * or1k-tdep.c (_initialize_or1k_tdep): Add declaration.
5373 * osabi.c (_initialize_gdb_osabi): Add declaration.
5374 * osdata.c (_initialize_osdata): Add declaration.
5375 * p-valprint.c (_initialize_pascal_valprint): Add declaration.
5376 * parse.c (_initialize_parse): Add declaration.
5377 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Add declaration.
5378 * ppc-fbsd-tdep.c (_initialize_ppcfbsd_tdep): Add declaration.
5379 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Add declaration.
5380 * ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Add declaration.
5381 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Add declaration.
5382 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Add declaration.
5383 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Add declaration.
5384 * ppc-obsd-tdep.c (_initialize_ppcobsd_tdep): Add declaration.
5385 * printcmd.c (_initialize_printcmd): Add declaration.
5386 * probe.c (_initialize_probe): Add declaration.
5387 * proc-api.c (_initialize_proc_api): Add declaration.
5388 * proc-events.c (_initialize_proc_events): Add declaration.
5389 * proc-service.c (_initialize_proc_service): Add declaration.
5390 * procfs.c (_initialize_procfs): Add declaration.
5391 * producer.c (_initialize_producer): Add declaration.
5392 * psymtab.c (_initialize_psymtab): Add declaration.
5393 * python/python.c (_initialize_python): Add declaration.
5394 * ravenscar-thread.c (_initialize_ravenscar): Add declaration.
5395 * record-btrace.c (_initialize_record_btrace): Add declaration.
5396 * record-full.c (_initialize_record_full): Add declaration.
5397 * record.c (_initialize_record): Add declaration.
5398 * regcache-dump.c (_initialize_regcache_dump): Add declaration.
5399 * regcache.c (_initialize_regcache): Add declaration.
5400 * reggroups.c (_initialize_reggroup): Add declaration.
5401 * remote-notif.c (_initialize_notif): Add declaration.
5402 * remote-sim.c (_initialize_remote_sim): Add declaration.
5403 * remote.c (_initialize_remote): Add declaration.
5404 * reverse.c (_initialize_reverse): Add declaration.
5405 * riscv-fbsd-nat.c (_initialize_riscv_fbsd_nat): Add declaration.
5406 * riscv-fbsd-tdep.c (_initialize_riscv_fbsd_tdep): Add declaration.
5407 * riscv-linux-nat.c (_initialize_riscv_linux_nat): Add declaration.
5408 * riscv-linux-tdep.c (_initialize_riscv_linux_tdep): Add declaration.
5409 * riscv-tdep.c (_initialize_riscv_tdep): Add declaration.
5410 * rl78-tdep.c (_initialize_rl78_tdep): Add declaration.
5411 * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Add declaration.
5412 * rs6000-lynx178-tdep.c (_initialize_rs6000_lynx178_tdep):
5413 Add declaration.
5414 * rs6000-nat.c (_initialize_rs6000_nat): Add declaration.
5415 * rs6000-tdep.c (_initialize_rs6000_tdep): Add declaration.
5416 * run-on-main-thread.c (_initialize_run_on_main_thread): Add declaration.
5417 * rust-exp.y (_initialize_rust_exp): Add declaration.
5418 * rx-tdep.c (_initialize_rx_tdep): Add declaration.
5419 * s12z-tdep.c (_initialize_s12z_tdep): Add declaration.
5420 * s390-linux-nat.c (_initialize_s390_nat): Add declaration.
5421 * s390-linux-tdep.c (_initialize_s390_linux_tdep): Add declaration.
5422 * s390-tdep.c (_initialize_s390_tdep): Add declaration.
5423 * score-tdep.c (_initialize_score_tdep): Add declaration.
5424 * ser-go32.c (_initialize_ser_dos): Add declaration.
5425 * ser-mingw.c (_initialize_ser_windows): Add declaration.
5426 * ser-pipe.c (_initialize_ser_pipe): Add declaration.
5427 * ser-tcp.c (_initialize_ser_tcp): Add declaration.
5428 * ser-uds.c (_initialize_ser_socket): Add declaration.
5429 * ser-unix.c (_initialize_ser_hardwire): Add declaration.
5430 * serial.c (_initialize_serial): Add declaration.
5431 * sh-linux-tdep.c (_initialize_sh_linux_tdep): Add declaration.
5432 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Add declaration.
5433 * sh-nbsd-tdep.c (_initialize_shnbsd_tdep): Add declaration.
5434 * sh-tdep.c (_initialize_sh_tdep): Add declaration.
5435 * skip.c (_initialize_step_skip): Add declaration.
5436 * sol-thread.c (_initialize_sol_thread): Add declaration.
5437 * solib-aix.c (_initialize_solib_aix): Add declaration.
5438 * solib-darwin.c (_initialize_darwin_solib): Add declaration.
5439 * solib-dsbt.c (_initialize_dsbt_solib): Add declaration.
5440 * solib-frv.c (_initialize_frv_solib): Add declaration.
5441 * solib-svr4.c (_initialize_svr4_solib): Add declaration.
5442 * solib-target.c (_initialize_solib_target): Add declaration.
5443 * solib.c (_initialize_solib): Add declaration.
5444 * source-cache.c (_initialize_source_cache): Add declaration.
5445 * source.c (_initialize_source): Add declaration.
5446 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Add declaration.
5447 * sparc-linux-tdep.c (_initialize_sparc_linux_tdep): Add declaration.
5448 * sparc-nat.c (_initialize_sparc_nat): Add declaration.
5449 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Add declaration.
5450 * sparc-nbsd-tdep.c (_initialize_sparcnbsd_tdep): Add declaration.
5451 * sparc-obsd-tdep.c (_initialize_sparc32obsd_tdep): Add declaration.
5452 * sparc-sol2-tdep.c (_initialize_sparc_sol2_tdep): Add declaration.
5453 * sparc-tdep.c (_initialize_sparc_tdep): Add declaration.
5454 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Add declaration.
5455 * sparc64-fbsd-tdep.c (_initialize_sparc64fbsd_tdep): Add declaration.
5456 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Add declaration.
5457 * sparc64-linux-tdep.c (_initialize_sparc64_linux_tdep): Add declaration.
5458 * sparc64-nat.c (_initialize_sparc64_nat): Add declaration.
5459 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Add declaration.
5460 * sparc64-nbsd-tdep.c (_initialize_sparc64nbsd_tdep): Add declaration.
5461 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Add declaration.
5462 * sparc64-obsd-tdep.c (_initialize_sparc64obsd_tdep): Add declaration.
5463 * sparc64-sol2-tdep.c (_initialize_sparc64_sol2_tdep): Add declaration.
5464 * sparc64-tdep.c (_initialize_sparc64_adi_tdep): Add declaration.
5465 * stabsread.c (_initialize_stabsread): Add declaration.
5466 * stack.c (_initialize_stack): Add declaration.
5467 * stap-probe.c (_initialize_stap_probe): Add declaration.
5468 * std-regs.c (_initialize_frame_reg): Add declaration.
5469 * symfile-debug.c (_initialize_symfile_debug): Add declaration.
5470 * symfile-mem.c (_initialize_symfile_mem): Add declaration.
5471 * symfile.c (_initialize_symfile): Add declaration.
5472 * symmisc.c (_initialize_symmisc): Add declaration.
5473 * symtab.c (_initialize_symtab): Add declaration.
5474 * target.c (_initialize_target): Add declaration.
5475 * target-connection.c (_initialize_target_connection): Add
5476 declaration.
5477 * target-dcache.c (_initialize_target_dcache): Add declaration.
5478 * target-descriptions.c (_initialize_target_descriptions): Add declaration.
5479 * thread.c (_initialize_thread): Add declaration.
5480 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Add declaration.
5481 * tic6x-tdep.c (_initialize_tic6x_tdep): Add declaration.
5482 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Add declaration.
5483 * tilegx-linux-tdep.c (_initialize_tilegx_linux_tdep): Add declaration.
5484 * tilegx-tdep.c (_initialize_tilegx_tdep): Add declaration.
5485 * tracectf.c (_initialize_ctf): Add declaration.
5486 * tracefile-tfile.c (_initialize_tracefile_tfile): Add declaration.
5487 * tracefile.c (_initialize_tracefile): Add declaration.
5488 * tracepoint.c (_initialize_tracepoint): Add declaration.
5489 * tui/tui-hooks.c (_initialize_tui_hooks): Add declaration.
5490 * tui/tui-interp.c (_initialize_tui_interp): Add declaration.
5491 * tui/tui-layout.c (_initialize_tui_layout): Add declaration.
5492 * tui/tui-regs.c (_initialize_tui_regs): Add declaration.
5493 * tui/tui-stack.c (_initialize_tui_stack): Add declaration.
5494 * tui/tui-win.c (_initialize_tui_win): Add declaration.
5495 * tui/tui.c (_initialize_tui): Add declaration.
5496 * typeprint.c (_initialize_typeprint): Add declaration.
5497 * ui-style.c (_initialize_ui_style): Add declaration.
5498 * unittests/array-view-selftests.c (_initialize_array_view_selftests): Add declaration.
5499 * unittests/child-path-selftests.c (_initialize_child_path_selftests): Add declaration.
5500 * unittests/cli-utils-selftests.c (_initialize_cli_utils_selftests): Add declaration.
5501 * unittests/common-utils-selftests.c (_initialize_common_utils_selftests): Add declaration.
5502 * unittests/copy_bitwise-selftests.c (_initialize_copy_bitwise_utils_selftests): Add declaration.
5503 * unittests/environ-selftests.c (_initialize_environ_selftests): Add declaration.
5504 * unittests/filtered_iterator-selftests.c
5505 (_initialize_filtered_iterator_selftests): Add declaration.
5506 * unittests/format_pieces-selftests.c (_initialize_format_pieces_selftests): Add declaration.
5507 * unittests/function-view-selftests.c (_initialize_function_view_selftests): Add declaration.
5508 * unittests/help-doc-selftests.c (_initialize_help_doc_selftests): Add declaration.
5509 * unittests/lookup_name_info-selftests.c (_initialize_lookup_name_info_selftests): Add declaration.
5510 * unittests/main-thread-selftests.c
5511 (_initialize_main_thread_selftests): Add declaration.
5512 * unittests/memory-map-selftests.c (_initialize_memory_map_selftests): Add declaration.
5513 * unittests/memrange-selftests.c (_initialize_memrange_selftests): Add declaration.
5514 * unittests/mkdir-recursive-selftests.c (_initialize_mkdir_recursive_selftests): Add declaration.
5515 * unittests/observable-selftests.c (_initialize_observer_selftest): Add declaration.
5516 * unittests/offset-type-selftests.c (_initialize_offset_type_selftests): Add declaration.
5517 * unittests/optional-selftests.c (_initialize_optional_selftests): Add declaration.
5518 * unittests/parse-connection-spec-selftests.c (_initialize_parse_connection_spec_selftests): Add declaration.
5519 * unittests/rsp-low-selftests.c (_initialize_rsp_low_selftests): Add declaration.
5520 * unittests/scoped_fd-selftests.c (_initialize_scoped_fd_selftests): Add declaration.
5521 * unittests/scoped_mmap-selftests.c (_initialize_scoped_mmap_selftests): Add declaration.
5522 * unittests/scoped_restore-selftests.c (_initialize_scoped_restore_selftests): Add declaration.
5523 * unittests/string_view-selftests.c (_initialize_string_view_selftests): Add declaration.
5524 * unittests/style-selftests.c (_initialize_style_selftest): Add declaration.
5525 * unittests/tracepoint-selftests.c (_initialize_tracepoint_selftests): Add declaration.
5526 * unittests/tui-selftests.c (_initialize_tui_selftest): Add
5527 declaration.
5528 * unittests/unpack-selftests.c (_initialize_unpack_selftests): Add declaration.
5529 * unittests/utils-selftests.c (_initialize_utils_selftests): Add declaration.
5530 * unittests/vec-utils-selftests.c (_initialize_vec_utils_selftests): Add declaration.
5531 * unittests/xml-utils-selftests.c (_initialize_xml_utils): Add declaration.
5532 * user-regs.c (_initialize_user_regs): Add declaration.
5533 * utils.c (_initialize_utils): Add declaration.
5534 * v850-tdep.c (_initialize_v850_tdep): Add declaration.
5535 * valops.c (_initialize_valops): Add declaration.
5536 * valprint.c (_initialize_valprint): Add declaration.
5537 * value.c (_initialize_values): Add declaration.
5538 * varobj.c (_initialize_varobj): Add declaration.
5539 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Add declaration.
5540 * vax-nbsd-tdep.c (_initialize_vaxnbsd_tdep): Add declaration.
5541 * vax-tdep.c (_initialize_vax_tdep): Add declaration.
5542 * windows-nat.c (_initialize_windows_nat): Add declaration.
5543 (_initialize_check_for_gdb_ini): Add declaration.
5544 (_initialize_loadable): Add declaration.
5545 * windows-tdep.c (_initialize_windows_tdep): Add declaration.
5546 * x86-bsd-nat.c (_initialize_x86_bsd_nat): Add declaration.
5547 * x86-linux-nat.c (_initialize_x86_linux_nat): Add declaration.
5548 * xcoffread.c (_initialize_xcoffread): Add declaration.
5549 * xml-support.c (_initialize_xml_support): Add declaration.
5550 * xstormy16-tdep.c (_initialize_xstormy16_tdep): Add declaration.
5551 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Add declaration.
5552 * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Add declaration.
5553 * xtensa-tdep.c (_initialize_xtensa_tdep): Add declaration.
5554
5555 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
5556
5557 * regformats/regdat.sh: Generate declaration for init function.
5558
5559 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
5560
5561 * remote-sim.c (next_pid, INITIAL_PID, sim_inferior_data): Move
5562 up.
5563 (gdbsim_target) <get_inferior_data_by_ptid, resume_one_inferior,
5564 close_one_inferior>: New methods.
5565 (get_sim_inferior_data_by_ptid): Move to gdbsim_target,
5566 pass down target to find_inferior_pid.
5567 (gdbsim_target::fetch_registers, gdbsim_target::store_registers):
5568 Pass down target to find_inferior_ptid.
5569 (gdbsim_target::create_inferior): Pass down target to
5570 add_thread_silent.
5571 (gdbsim_close_inferior): Move to gdbsim_close_inferior, pass
5572 target down to find_inferior_ptid and switch_to_thread.
5573 (gdbsim_target::close): Update to call close_one_inferior.
5574 (struct resume_data): Remove.
5575 (gdbsim_resume_inferior): Move to gdbsim_target. Take arguments
5576 directly, rather than through a void pointer.
5577 (gdbsim_target::resume): Update to call resume_one_inferior.
5578
5579 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
5580
5581 * gdbsupport/gdb_wait.c: Include gdb_wait.h.
5582
5583 2020-01-12 Pedro Alves <palves@redhat.com>
5584
5585 * bsd-kvm.c (bsd_kvm_target::close): Call exit_inferior_silent
5586 directly for the current inferior instead of
5587 discard_all_inferiors.
5588 (discard_all_inferiors): Delete.
5589
5590 2020-01-11 Tom Tromey <tom@tromey.com>
5591
5592 * tui/tui-wingeneral.c (box_win): Check cli_styling.
5593 * tui/tui-winsource.c (tui_source_window_base::refill): Use
5594 deprecated_safe_get_selected_frame.
5595
5596 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5597
5598 * inferior.c (print_inferior): Switch inferior before printing it.
5599
5600 2020-01-10 Aleksandar Paunovic <aleksandar.paunovic@intel.com>
5601 Pedro Alves <palves@redhat.com>
5602
5603 * progspace-and-thread.c (switch_to_program_space_and_thread):
5604 Assert there's an inferior for PSPACE. Use
5605 switch_to_inferior_no_thread to switch the inferior too.
5606 * progspace.c (program_space::~program_space): Call
5607 clear_symtab_users here, with SYMFILE_DEFER_BP_RESET.
5608 (program_space::free_all_objfiles): Don't call clear_symtab_users
5609 here.
5610 * symfile.c (symbol_file_clear): Call clear_symtab_users here.
5611
5612 2020-01-10 Pedro Alves <palves@redhat.com>
5613
5614 * NEWS: Mention multi-target debugging, "info connections", and
5615 "add-inferior -no-connection".
5616
5617 2020-01-10 Pedro Alves <palves@redhat.com>
5618
5619 * infrun.c: Include "target-connection.h".
5620 (check_multi_target_resumption): New.
5621 (proceed): Call it.
5622 * target-connection.c (make_target_connection_string): Make
5623 extern.
5624 * target-connection.h (make_target_connection_string): Declare.
5625
5626 2020-01-10 Pedro Alves <palves@redhat.com>
5627
5628 * Makefile.in (COMMON_SFILES): Add target-connection.c.
5629 * inferior.c (uiout_field_connection): New function.
5630 (print_inferior): Add new "connection-id" column.
5631 (add_inferior_command): Show connection number/string of added
5632 inferior.
5633 * process-stratum-target.h
5634 (process_stratum_target::connection_string): New virtual method.
5635 (process_stratum_target::connection_number): New field.
5636 * remote.c (remote_target::connection_string): New override.
5637 * target-connection.c: New file.
5638 * target-connection.h: New file.
5639 * target.c (decref_target): Remove process_stratum targets from
5640 the connection list.
5641 (target_stack::push): Add process_stratum targets to the
5642 connection list.
5643
5644 2020-01-10 Pedro Alves <palves@redhat.com>
5645
5646 Revert:
5647 2016-04-12 Pedro Alves <palves@redhat.com>
5648 * serial.c (serial_open, serial_fdopen_ops, do_serial_close):
5649 Remove references to name.
5650 * serial.h (struct serial) <name>: Delete.
5651
5652 2020-01-10 Pedro Alves <palves@redhat.com>
5653
5654 * gdbarch-selftests.c (register_to_value_test): Remove "target
5655 already pushed" check.
5656
5657 2020-01-10 Pedro Alves <palves@redhat.com>
5658 John Baldwin <jhb@FreeBSD.org>
5659
5660 * aarch64-linux-nat.c
5661 (aarch64_linux_nat_target::thread_architecture): Adjust.
5662 * ada-tasks.c (print_ada_task_info): Adjust find_thread_ptid call.
5663 (task_command_1): Likewise.
5664 * aix-thread.c (sync_threadlists, aix_thread_target::resume)
5665 (aix_thread_target::wait, aix_thread_target::fetch_registers)
5666 (aix_thread_target::store_registers)
5667 (aix_thread_target::thread_alive): Adjust.
5668 * amd64-fbsd-tdep.c: Include "inferior.h".
5669 (amd64fbsd_get_thread_local_address): Pass down target.
5670 * amd64-linux-nat.c (ps_get_thread_area): Use ps_prochandle
5671 thread's gdbarch instead of target_gdbarch.
5672 * break-catch-sig.c (signal_catchpoint_print_it): Adjust call to
5673 get_last_target_status.
5674 * break-catch-syscall.c (print_it_catch_syscall): Likewise.
5675 * breakpoint.c (breakpoints_should_be_inserted_now): Consider all
5676 inferiors.
5677 (update_inserted_breakpoint_locations): Skip if inferiors with no
5678 execution.
5679 (update_global_location_list): When handling moribund locations,
5680 find representative inferior for location's pspace, and use thread
5681 count of its process_stratum target.
5682 * bsd-kvm.c (bsd_kvm_target_open): Pass target down.
5683 * bsd-uthread.c (bsd_uthread_target::wait): Use
5684 as_process_stratum_target and adjust thread_change_ptid and
5685 add_thread calls.
5686 (bsd_uthread_target::update_thread_list): Use
5687 as_process_stratum_target and adjust find_thread_ptid,
5688 thread_change_ptid and add_thread calls.
5689 * btrace.c (maint_btrace_packet_history_cmd): Adjust
5690 find_thread_ptid call.
5691 * corelow.c (add_to_thread_list): Adjust add_thread call.
5692 (core_target_open): Adjust add_thread_silent and thread_count
5693 calls.
5694 (core_target::pid_to_str): Adjust find_inferior_ptid call.
5695 * ctf.c (ctf_target_open): Adjust add_thread_silent call.
5696 * event-top.c (async_disconnect): Pop targets from all inferiors.
5697 * exec.c (add_target_sections): Push exec target on all inferiors
5698 sharing the program space.
5699 (remove_target_sections): Remove the exec target from all
5700 inferiors sharing the program space.
5701 (exec_on_vfork): New.
5702 * exec.h (exec_on_vfork): Declare.
5703 * fbsd-nat.c (fbsd_add_threads): Add fbsd_nat_target parameter.
5704 Pass it down.
5705 (fbsd_nat_target::update_thread_list): Adjust.
5706 (fbsd_nat_target::resume): Adjust.
5707 (fbsd_handle_debug_trap): Add fbsd_nat_target parameter. Pass it
5708 down.
5709 (fbsd_nat_target::wait, fbsd_nat_target::post_attach): Adjust.
5710 * fbsd-tdep.c (fbsd_corefile_thread): Adjust
5711 get_thread_arch_regcache call.
5712 * fork-child.c (gdb_startup_inferior): Pass target down to
5713 startup_inferior and set_executing.
5714 * gdbthread.h (struct process_stratum_target): Forward declare.
5715 (add_thread, add_thread_silent, add_thread_with_info)
5716 (in_thread_list): Add process_stratum_target parameter.
5717 (find_thread_ptid(inferior*, ptid_t)): New overload.
5718 (find_thread_ptid, thread_change_ptid): Add process_stratum_target
5719 parameter.
5720 (all_threads()): Delete overload.
5721 (all_threads, all_non_exited_threads): Add process_stratum_target
5722 parameter.
5723 (all_threads_safe): Use brace initialization.
5724 (thread_count): Add process_stratum_target parameter.
5725 (set_resumed, set_running, set_stop_requested, set_executing)
5726 (threads_are_executing, finish_thread_state): Add
5727 process_stratum_target parameter.
5728 (switch_to_thread): Use is_current_thread.
5729 * i386-fbsd-tdep.c: Include "inferior.h".
5730 (i386fbsd_get_thread_local_address): Pass down target.
5731 * i386-linux-nat.c (i386_linux_nat_target::low_resume): Adjust.
5732 * inf-child.c (inf_child_target::maybe_unpush_target): Remove
5733 have_inferiors check.
5734 * inf-ptrace.c (inf_ptrace_target::create_inferior)
5735 (inf_ptrace_target::attach): Adjust.
5736 * infcall.c (run_inferior_call): Adjust.
5737 * infcmd.c (run_command_1): Pass target to
5738 scoped_finish_thread_state.
5739 (proceed_thread_callback): Skip inferiors with no execution.
5740 (continue_command): Rename 'all_threads' local to avoid hiding
5741 'all_threads' function. Adjust get_last_target_status call.
5742 (prepare_one_step): Adjust set_running call.
5743 (signal_command): Use user_visible_resume_target. Compare thread
5744 pointers instead of inferior_ptid.
5745 (info_program_command): Adjust to pass down target.
5746 (attach_command): Mark target's 'thread_executing' flag.
5747 (stop_current_target_threads_ns): New, factored out from ...
5748 (interrupt_target_1): ... this. Switch inferior before making
5749 target calls.
5750 * inferior-iter.h
5751 (struct all_inferiors_iterator, struct all_inferiors_range)
5752 (struct all_inferiors_safe_range)
5753 (struct all_non_exited_inferiors_range): Filter on
5754 process_stratum_target too. Remove explicit.
5755 * inferior.c (inferior::inferior): Push dummy target on target
5756 stack.
5757 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors):
5758 Add process_stratum_target parameter, and pass it down.
5759 (have_live_inferiors): Adjust.
5760 (switch_to_inferior_and_push_target): New.
5761 (add_inferior_command, clone_inferior_command): Handle
5762 "-no-connection" parameter. Use
5763 switch_to_inferior_and_push_target.
5764 (_initialize_inferior): Mention "-no-connection" option in
5765 the help of "add-inferior" and "clone-inferior" commands.
5766 * inferior.h: Include "process-stratum-target.h".
5767 (interrupt_target_1): Use bool.
5768 (struct inferior) <push_target, unpush_target, target_is_pushed,
5769 find_target_beneath, top_target, process_target, target_at,
5770 m_stack>: New.
5771 (discard_all_inferiors): Delete.
5772 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors)
5773 (all_inferiors, all_non_exited_inferiors): Add
5774 process_stratum_target parameter.
5775 * infrun.c: Include "gdb_select.h" and <unordered_map>.
5776 (target_last_proc_target): New global.
5777 (follow_fork_inferior): Push target on new inferior. Pass target
5778 to add_thread_silent. Call exec_on_vfork. Handle target's
5779 reference count.
5780 (follow_fork): Adjust get_last_target_status call. Also consider
5781 target.
5782 (follow_exec): Push target on new inferior.
5783 (struct execution_control_state) <target>: New field.
5784 (user_visible_resume_target): New.
5785 (do_target_resume): Call target_async.
5786 (resume_1): Set target's threads_executing flag. Consider resume
5787 target.
5788 (commit_resume_all_targets): New.
5789 (proceed): Also consider resume target. Skip threads of inferiors
5790 with no execution. Commit resumtion in all targets.
5791 (start_remote): Pass current inferior to wait_for_inferior.
5792 (infrun_thread_stop_requested): Consider target as well. Pass
5793 thread_info pointer to clear_inline_frame_state instead of ptid.
5794 (infrun_thread_thread_exit): Consider target as well.
5795 (random_pending_event_thread): New inferior parameter. Use it.
5796 (do_target_wait): Rename to ...
5797 (do_target_wait_1): ... this. Add inferior parameter, and pass it
5798 down.
5799 (threads_are_resumed_pending_p, do_target_wait): New.
5800 (prepare_for_detach): Adjust calls.
5801 (wait_for_inferior): New inferior parameter. Handle it. Use
5802 do_target_wait_1 instead of do_target_wait.
5803 (fetch_inferior_event): Adjust. Switch to representative
5804 inferior. Pass target down.
5805 (set_last_target_status): Add process_stratum_target parameter.
5806 Save target in global.
5807 (get_last_target_status): Add process_stratum_target parameter and
5808 handle it.
5809 (nullify_last_target_wait_ptid): Clear 'target_last_proc_target'.
5810 (context_switch): Check inferior_ptid == null_ptid before calling
5811 inferior_thread().
5812 (get_inferior_stop_soon): Pass down target.
5813 (wait_one): Rename to ...
5814 (poll_one_curr_target): ... this.
5815 (struct wait_one_event): New.
5816 (wait_one): New.
5817 (stop_all_threads): Adjust.
5818 (handle_no_resumed, handle_inferior_event): Adjust to consider the
5819 event's target.
5820 (switch_back_to_stepped_thread): Also consider target.
5821 (print_stop_event): Update.
5822 (normal_stop): Update. Also consider the resume target.
5823 * infrun.h (wait_for_inferior): Remove declaration.
5824 (user_visible_resume_target): New declaration.
5825 (get_last_target_status, set_last_target_status): New
5826 process_stratum_target parameter.
5827 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
5828 process_stratum_target parameter, and use it.
5829 (clear_inline_frame_state (thread_info*)): New.
5830 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
5831 process_stratum_target parameter.
5832 (clear_inline_frame_state (thread_info*)): Declare.
5833 * linux-fork.c (delete_checkpoint_command): Pass target down to
5834 find_thread_ptid.
5835 (checkpoint_command): Adjust.
5836 * linux-nat.c (linux_nat_target::follow_fork): Switch to thread
5837 instead of just tweaking inferior_ptid.
5838 (linux_nat_switch_fork): Pass target down to thread_change_ptid.
5839 (exit_lwp): Pass target down to find_thread_ptid.
5840 (attach_proc_task_lwp_callback): Pass target down to
5841 add_thread/set_running/set_executing.
5842 (linux_nat_target::attach): Pass target down to
5843 thread_change_ptid.
5844 (get_detach_signal): Pass target down to find_thread_ptid.
5845 Consider last target status's target.
5846 (linux_resume_one_lwp_throw, resume_lwp)
5847 (linux_handle_syscall_trap, linux_handle_extended_wait, wait_lwp)
5848 (stop_wait_callback, save_stop_reason, linux_nat_filter_event)
5849 (linux_nat_wait_1, resume_stopped_resumed_lwps): Pass target down.
5850 (linux_nat_target::async_wait_fd): New.
5851 (linux_nat_stop_lwp, linux_nat_target::thread_address_space): Pass
5852 target down.
5853 * linux-nat.h (linux_nat_target::async_wait_fd): Declare.
5854 * linux-tdep.c (get_thread_arch_regcache): Pass target down.
5855 * linux-thread-db.c (struct thread_db_info::process_target): New
5856 field.
5857 (add_thread_db_info): Save target.
5858 (get_thread_db_info): New process_stratum_target parameter. Also
5859 match target.
5860 (delete_thread_db_info): New process_stratum_target parameter.
5861 Also match target.
5862 (thread_from_lwp): Adjust to pass down target.
5863 (thread_db_notice_clone): Pass down target.
5864 (check_thread_db_callback): Pass down target.
5865 (try_thread_db_load_1): Always push the thread_db target.
5866 (try_thread_db_load, record_thread): Pass target down.
5867 (thread_db_target::detach): Pass target down. Always unpush the
5868 thread_db target.
5869 (thread_db_target::wait, thread_db_target::mourn_inferior): Pass
5870 target down. Always unpush the thread_db target.
5871 (find_new_threads_callback, thread_db_find_new_threads_2)
5872 (thread_db_target::update_thread_list): Pass target down.
5873 (thread_db_target::pid_to_str): Pass current inferior down.
5874 (thread_db_target::get_thread_local_address): Pass target down.
5875 (thread_db_target::resume, maintenance_check_libthread_db): Pass
5876 target down.
5877 * nto-procfs.c (nto_procfs_target::update_thread_list): Adjust.
5878 * procfs.c (procfs_target::procfs_init_inferior): Declare.
5879 (proc_set_current_signal, do_attach, procfs_target::wait): Adjust.
5880 (procfs_init_inferior): Rename to ...
5881 (procfs_target::procfs_init_inferior): ... this and adjust.
5882 (procfs_target::create_inferior, procfs_notice_thread)
5883 (procfs_do_thread_registers): Adjust.
5884 * ppc-fbsd-tdep.c: Include "inferior.h".
5885 (ppcfbsd_get_thread_local_address): Pass down target.
5886 * proc-service.c (ps_xfer_memory): Switch current inferior and
5887 program space as well.
5888 (get_ps_regcache): Pass target down.
5889 * process-stratum-target.c
5890 (process_stratum_target::thread_address_space)
5891 (process_stratum_target::thread_architecture): Pass target down.
5892 * process-stratum-target.h
5893 (process_stratum_target::threads_executing): New field.
5894 (as_process_stratum_target): New.
5895 * ravenscar-thread.c
5896 (ravenscar_thread_target::update_inferior_ptid): Pass target down.
5897 (ravenscar_thread_target::wait, ravenscar_add_thread): Pass target
5898 down.
5899 * record-btrace.c (record_btrace_target::info_record): Adjust.
5900 (record_btrace_target::record_method)
5901 (record_btrace_target::record_is_replaying)
5902 (record_btrace_target::fetch_registers)
5903 (get_thread_current_frame_id, record_btrace_target::resume)
5904 (record_btrace_target::wait, record_btrace_target::stop): Pass
5905 target down.
5906 * record-full.c (record_full_wait_1): Switch to event thread.
5907 Pass target down.
5908 * regcache.c (regcache::regcache)
5909 (get_thread_arch_aspace_regcache, get_thread_arch_regcache): Add
5910 process_stratum_target parameter and handle it.
5911 (current_thread_target): New global.
5912 (get_thread_regcache): Add process_stratum_target parameter and
5913 handle it. Switch inferior before calling target method.
5914 (get_thread_regcache): Pass target down.
5915 (get_thread_regcache_for_ptid): Pass target down.
5916 (registers_changed_ptid): Add process_stratum_target parameter and
5917 handle it.
5918 (registers_changed_thread, registers_changed): Pass target down.
5919 (test_get_thread_arch_aspace_regcache): New.
5920 (current_regcache_test): Define a couple local test_target_ops
5921 instances and use them for testing.
5922 (readwrite_regcache): Pass process_stratum_target parameter.
5923 (cooked_read_test, cooked_write_test): Pass mock_target down.
5924 * regcache.h (get_thread_regcache, get_thread_arch_regcache)
5925 (get_thread_arch_aspace_regcache): Add process_stratum_target
5926 parameter.
5927 (regcache::target): New method.
5928 (regcache::regcache, regcache::get_thread_arch_aspace_regcache)
5929 (regcache::registers_changed_ptid): Add process_stratum_target
5930 parameter.
5931 (regcache::m_target): New field.
5932 (registers_changed_ptid): Add process_stratum_target parameter.
5933 * remote.c (remote_state::supports_vCont_probed): New field.
5934 (remote_target::async_wait_fd): New method.
5935 (remote_unpush_and_throw): Add remote_target parameter.
5936 (get_current_remote_target): Adjust.
5937 (remote_target::remote_add_inferior): Push target.
5938 (remote_target::remote_add_thread)
5939 (remote_target::remote_notice_new_inferior)
5940 (get_remote_thread_info): Pass target down.
5941 (remote_target::update_thread_list): Skip threads of inferiors
5942 bound to other targets. (remote_target::close): Don't discard
5943 inferiors. (remote_target::add_current_inferior_and_thread)
5944 (remote_target::process_initial_stop_replies)
5945 (remote_target::start_remote)
5946 (remote_target::remote_serial_quit_handler): Pass down target.
5947 (remote_target::remote_unpush_target): New remote_target
5948 parameter. Unpush the target from all inferiors.
5949 (remote_target::remote_unpush_and_throw): New remote_target
5950 parameter. Pass it down.
5951 (remote_target::open_1): Check whether the current inferior has
5952 execution instead of checking whether any inferior is live. Pass
5953 target down.
5954 (remote_target::remote_detach_1): Pass down target. Use
5955 remote_unpush_target.
5956 (extended_remote_target::attach): Pass down target.
5957 (remote_target::remote_vcont_probe): Set supports_vCont_probed.
5958 (remote_target::append_resumption): Pass down target.
5959 (remote_target::append_pending_thread_resumptions)
5960 (remote_target::remote_resume_with_hc, remote_target::resume)
5961 (remote_target::commit_resume): Pass down target.
5962 (remote_target::remote_stop_ns): Check supports_vCont_probed.
5963 (remote_target::interrupt_query)
5964 (remote_target::remove_new_fork_children)
5965 (remote_target::check_pending_events_prevent_wildcard_vcont)
5966 (remote_target::remote_parse_stop_reply)
5967 (remote_target::process_stop_reply): Pass down target.
5968 (first_remote_resumed_thread): New remote_target parameter. Pass
5969 it down.
5970 (remote_target::wait_as): Pass down target.
5971 (unpush_and_perror): New remote_target parameter. Pass it down.
5972 (remote_target::readchar, remote_target::remote_serial_write)
5973 (remote_target::getpkt_or_notif_sane_1)
5974 (remote_target::kill_new_fork_children, remote_target::kill): Pass
5975 down target.
5976 (remote_target::mourn_inferior): Pass down target. Use
5977 remote_unpush_target.
5978 (remote_target::core_of_thread)
5979 (remote_target::remote_btrace_maybe_reopen): Pass down target.
5980 (remote_target::pid_to_exec_file)
5981 (remote_target::thread_handle_to_thread_info): Pass down target.
5982 (remote_target::async_wait_fd): New.
5983 * riscv-fbsd-tdep.c: Include "inferior.h".
5984 (riscv_fbsd_get_thread_local_address): Pass down target.
5985 * sol2-tdep.c (sol2_core_pid_to_str): Pass down target.
5986 * sol-thread.c (sol_thread_target::wait, ps_lgetregs, ps_lsetregs)
5987 (ps_lgetfpregs, ps_lsetfpregs, sol_update_thread_list_callback):
5988 Adjust.
5989 * solib-spu.c (spu_skip_standalone_loader): Pass down target.
5990 * solib-svr4.c (enable_break): Pass down target.
5991 * spu-multiarch.c (parse_spufs_run): Pass down target.
5992 * spu-tdep.c (spu2ppu_sniffer): Pass down target.
5993 * target-delegates.c: Regenerate.
5994 * target.c (g_target_stack): Delete.
5995 (current_top_target): Return the current inferior's top target.
5996 (target_has_execution_1): Refer to the passed-in inferior's top
5997 target.
5998 (target_supports_terminal_ours): Check whether the initial
5999 inferior was already created.
6000 (decref_target): New.
6001 (target_stack::push): Incref/decref the target.
6002 (push_target, push_target, unpush_target): Adjust.
6003 (target_stack::unpush): Defref target.
6004 (target_is_pushed): Return bool. Adjust to refer to the current
6005 inferior's target stack.
6006 (dispose_inferior): Delete, and inline parts ...
6007 (target_preopen): ... here. Only dispose of the current inferior.
6008 (target_detach): Hold strong target reference while detaching.
6009 Pass target down.
6010 (target_thread_name): Add assertion.
6011 (target_resume): Pass down target.
6012 (target_ops::beneath, find_target_at): Adjust to refer to the
6013 current inferior's target stack.
6014 (get_dummy_target): New.
6015 (target_pass_ctrlc): Pass the Ctrl-C to the first inferior that
6016 has a thread running.
6017 (initialize_targets): Rename to ...
6018 (_initialize_target): ... this.
6019 * target.h: Include "gdbsupport/refcounted-object.h".
6020 (struct target_ops): Inherit refcounted_object.
6021 (target_ops::shortname, target_ops::longname): Make const.
6022 (target_ops::async_wait_fd): New method.
6023 (decref_target): Declare.
6024 (struct target_ops_ref_policy): New.
6025 (target_ops_ref): New typedef.
6026 (get_dummy_target): Declare function.
6027 (target_is_pushed): Return bool.
6028 * thread-iter.c (all_matching_threads_iterator::m_inf_matches)
6029 (all_matching_threads_iterator::all_matching_threads_iterator):
6030 Handle filter target.
6031 * thread-iter.h (struct all_matching_threads_iterator, struct
6032 all_matching_threads_range, class all_non_exited_threads_range):
6033 Filter by target too. Remove explicit.
6034 * thread.c (threads_executing): Delete.
6035 (inferior_thread): Pass down current inferior.
6036 (clear_thread_inferior_resources): Pass down thread pointer
6037 instead of ptid_t.
6038 (add_thread_silent, add_thread_with_info, add_thread): Add
6039 process_stratum_target parameter. Use it for thread and inferior
6040 searches.
6041 (is_current_thread): New.
6042 (thread_info::deletable): Use it.
6043 (find_thread_ptid, thread_count, in_thread_list)
6044 (thread_change_ptid, set_resumed, set_running): New
6045 process_stratum_target parameter. Pass it down.
6046 (set_executing): New process_stratum_target parameter. Pass it
6047 down. Adjust reference to 'threads_executing'.
6048 (threads_are_executing): New process_stratum_target parameter.
6049 Adjust reference to 'threads_executing'.
6050 (set_stop_requested, finish_thread_state): New
6051 process_stratum_target parameter. Pass it down.
6052 (switch_to_thread): Also match inferior.
6053 (switch_to_thread): New process_stratum_target parameter. Pass it
6054 down.
6055 (update_threads_executing): Reimplement.
6056 * top.c (quit_force): Pop targets from all inferior.
6057 (gdb_init): Don't call initialize_targets.
6058 * windows-nat.c (windows_nat_target) <get_windows_debug_event>:
6059 Declare.
6060 (windows_add_thread, windows_delete_thread): Adjust.
6061 (get_windows_debug_event): Rename to ...
6062 (windows_nat_target::get_windows_debug_event): ... this. Adjust.
6063 * tracefile-tfile.c (tfile_target_open): Pass down target.
6064 * gdbsupport/common-gdbthread.h (struct process_stratum_target):
6065 Forward declare.
6066 (switch_to_thread): Add process_stratum_target parameter.
6067 * mi/mi-interp.c (mi_on_resume_1): Add process_stratum_target
6068 parameter. Use it.
6069 (mi_on_resume): Pass target down.
6070 * nat/fork-inferior.c (startup_inferior): Add
6071 process_stratum_target parameter. Pass it down.
6072 * nat/fork-inferior.h (startup_inferior): Add
6073 process_stratum_target parameter.
6074 * python/py-threadevent.c (py_get_event_thread): Pass target down.
6075
6076 2020-01-10 Pedro Alves <palves@redhat.com>
6077
6078 * remote.c (remote_target::start_remote): Don't set inferior_ptid
6079 directly. Instead find the first thread in the thread list and
6080 use switch_to_thread.
6081
6082 2020-01-10 Pedro Alves <palves@redhat.com>
6083
6084 * remote.c (remote_target::remote_add_inferior): Don't bind a
6085 process to the current inferior if the current inferior is already
6086 bound to a process.
6087
6088 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
6089 Pedro Alves <palves@redhat.com>
6090
6091 * remote.c (remote_target::remote_parse_stop_reply) <W/X packets>:
6092 If no process is specified, return null_ptid instead of
6093 inferior_ptid.
6094 (remote_target::wait_as): Handle TARGET_WAITKIND_EXITED /
6095 TARGET_WAITKIND_SIGNALLED with no pid.
6096
6097 2020-01-10 Pedro Alves <palves@redhat.com>
6098
6099 * remote.c (first_remote_resumed_thread): New.
6100 (remote_target::wait_as): Use it as default event_ptid instead of
6101 inferior_ptid.
6102
6103 2020-01-10 Pedro Alves <palves@redhat.com>
6104
6105 * infrun.c (handle_no_resumed): Use all_non_exited_inferiors.
6106
6107 2020-01-10 Pedro Alves <palves@redhat.com>
6108
6109 * tracefile-tfile.c (tfile_target::close): Assert that trace_fd is
6110 not -1.
6111
6112 2020-01-10 Pedro Alves <palves@redhat.com>
6113
6114 * break-catch-sig.c (signal_catchpoint_print_it): Don't pass a
6115 ptid to get_last_target_status.
6116 * break-catch-syscall.c (print_it_catch_syscall): Don't pass a
6117 ptid to get_last_target_status.
6118 * infcmd.c (continue_command): Don't pass a target_waitstatus to
6119 get_last_target_status.
6120 (info_program_command): Don't pass a target_waitstatus to
6121 get_last_target_status.
6122 * infrun.c (init_wait_for_inferior): Use
6123 nullify_last_target_wait_ptid.
6124 (get_last_target_status): Handle nullptr arguments.
6125 (nullify_last_target_wait_ptid): Clear target_last_waitstatus.
6126 (print_stop_event): Don't pass a ptid to get_last_target_status.
6127 (normal_stop): Don't pass a ptid to get_last_target_status.
6128 * infrun.h (get_last_target_status, set_last_target_status): Move
6129 comments here and update.
6130 (nullify_last_target_wait_ptid): Declare.
6131 * linux-fork.c (fork_load_infrun_state): Remove local extern
6132 declaration of nullify_last_target_wait_ptid.
6133 * linux-nat.c (get_detach_signal): Don't pass a target_waitstatus
6134 to get_last_target_status.
6135
6136 2020-01-10 Pedro Alves <palves@redhat.com>
6137
6138 * gdbthread.h (scoped_restore_current_thread)
6139 <dont_restore, restore, m_dont_restore>: Declare.
6140 * thread.c (thread_alive): Add assertion. Return bool.
6141 (switch_to_thread_if_alive): New.
6142 (prune_threads): Switch inferior/thread.
6143 (print_thread_info_1): Switch thread before calling target methods.
6144 (scoped_restore_current_thread::restore): New, factored out from
6145 ...
6146 (scoped_restore_current_thread::~scoped_restore_current_thread):
6147 ... this.
6148 (scoped_restore_current_thread::scoped_restore_current_thread):
6149 Add assertion.
6150 (thread_apply_all_command, thread_select): Use
6151 switch_to_thread_if_alive.
6152 * infrun.c (proceed, restart_threads, handle_signal_stop)
6153 (switch_back_to_stepped_thread): Switch current thread before
6154 calling target methods.
6155
6156 2020-01-10 Pedro Alves <palves@redhat.com>
6157
6158 * inferior.c (switch_to_inferior_no_thread): New function,
6159 factored out from ...
6160 (inferior_command): ... here.
6161 * inferior.h (switch_to_inferior_no_thread): Declare.
6162 * mi/mi-main.c (run_one_inferior): Use
6163 switch_to_inferior_no_thread.
6164
6165 2020-01-10 Pedro Alves <palves@redhat.com>
6166
6167 * infcmd.c (kill_command): Remove dead code.
6168
6169 2020-01-10 Pedro Alves <palves@redhat.com>
6170
6171 * remote.c (remote_target::mourn_inferior): No longer check
6172 whether the target is running.
6173
6174 2020-01-10 Pedro Alves <palves@redhat.com>
6175
6176 * corelow.c (core_target::has_execution): Change parameter type to
6177 inferior pointer.
6178 * inferior.c (number_of_live_inferiors): Use
6179 inferior::has_execution instead of target_has_execution_1.
6180 * inferior.h (inferior::has_execution): New.
6181 * linux-thread-db.c (thread_db_target::update_thread_list): Use
6182 inferior::has_execution instead of target_has_execution_1.
6183 * process-stratum-target.c
6184 (process_stratum_target::has_execution): Change parameter type to
6185 inferior pointer. Check the inferior's PID instead of
6186 inferior_ptid.
6187 * process-stratum-target.h
6188 (process_stratum_target::has_execution): Change parameter type to
6189 inferior pointer.
6190 * record-full.c (record_full_core_target::has_execution): Change
6191 parameter type to inferior pointer.
6192 * target.c (target_has_execution_1): Change parameter type to
6193 inferior pointer.
6194 (target_has_execution_current): Adjust.
6195 * target.h (target_ops::has_execution): Change parameter type to
6196 inferior pointer.
6197 (target_has_execution_1): Change parameter type to inferior
6198 pointer. Change return type to bool.
6199 * tracefile.h (tracefile_target::has_execution): Change parameter
6200 type to inferior pointer.
6201
6202 2020-01-10 Pedro Alves <palves@redhat.com>
6203
6204 * exceptions.c (print_flush): Remove current_top_target() check.
6205
6206 2020-01-10 Pedro Alves <palves@redhat.com>
6207
6208 * remote.c (show_remote_exec_file): Show the current inferior's
6209 exec-file instead of the command variable's value.
6210
6211 2020-01-10 Pedro Alves <palves@redhat.com>
6212
6213 * record-full.c (record_full_resume_ptid): New global.
6214 (record_full_target::resume): Set it.
6215 (record_full_wait_1): Use record_full_resume_ptid instead of
6216 inferior_ptid.
6217
6218 2020-01-10 Pedro Alves <palves@redhat.com>
6219
6220 * gdbthread.h (scoped_restore_current_thread)
6221 <dont_restore, restore, m_dont_restore>: Declare.
6222 * thread.c (thread_alive): Add assertion. Return bool.
6223 (switch_to_thread_if_alive): New.
6224 (prune_threads): Switch inferior/thread.
6225 (print_thread_info_1): Switch thread before calling target methods.
6226 (scoped_restore_current_thread::restore): New, factored out from
6227 ...
6228 (scoped_restore_current_thread::~scoped_restore_current_thread):
6229 ... this.
6230 (scoped_restore_current_thread::scoped_restore_current_thread):
6231 Add assertion.
6232 (thread_apply_all_command, thread_select): Use
6233 switch_to_thread_if_alive.
6234
6235 2020-01-10 George Barrett <bob@bob131.so>
6236
6237 * stap-probe.c (stap_modify_semaphore): Don't check for null
6238 semaphores.
6239 (stap_probe::set_semaphore, stap_probe::clear_semaphore): Check
6240 for null semaphores.
6241
6242 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
6243
6244 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Update
6245 all source windows, and maintain horizontal scroll status while
6246 doing so.
6247
6248 2020-01-09 Tom Tromey <tom@tromey.com>
6249
6250 PR tui/18932:
6251 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Call
6252 update_source_window, not print_source_lines.
6253
6254 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
6255
6256 * tui/tui.c (tui_enable): Register tui hooks after calling
6257 tui_display_main.
6258
6259 2020-01-09 Christian Biesinger <cbiesinger@google.com>
6260
6261 * gdbsupport/common-defs.h: Don't define _FORTIFY_SOURCE on MinGW.
6262
6263 2020-01-08 Simon Marchi <simon.marchi@efficios.com>
6264
6265 * thread.c (print_thread_info_1): Fix indentation.
6266
6267 2020-01-09 Christian Biesinger <cbiesinger@google.com>
6268
6269 * symtab.c (general_symbol_info::compute_and_set_names): Move the
6270 unique_xmalloc_ptr outside the if to always free the demangled name.
6271
6272 2020-01-08 Tom Tromey <tromey@adacore.com>
6273
6274 * xcoffread.c (enter_line_range, read_xcoff_symtab)
6275 (process_xcoff_symbol, xcoff_symfile_offsets): Update.
6276 * symtab.h (MSYMBOL_VALUE_ADDRESS): Update.
6277 (struct section_offsets, ANOFFSET, SIZEOF_N_SECTION_OFFSETS):
6278 Remove.
6279 (section_offsets): New typedef.
6280 * symtab.c (fixup_section, get_msymbol_address): Update.
6281 * symmisc.c (dump_msymbols): Update.
6282 * symfile.h (relative_addr_info_to_section_offsets)
6283 (symfile_map_offsets_to_segments): Update.
6284 * symfile.c (build_section_addr_info_from_objfile)
6285 (init_objfile_sect_indices): Update.
6286 (struct place_section_arg): Change type of "offsets".
6287 (place_section): Update.
6288 (relative_addr_info_to_section_offsets): Change type of
6289 "section_offsets". Remove "num_sections" parameter.
6290 (default_symfile_offsets, syms_from_objfile_1)
6291 (set_objfile_default_section_offset): Update.
6292 (reread_symbols): No need to preserve section offsets by hand.
6293 (symfile_map_offsets_to_segments): Change type of "offsets".
6294 * stap-probe.c (relocate_address): Update.
6295 * stabsread.h (process_one_symbol): Update.
6296 * solib-target.c (struct lm_info_target) <offsets>: Change type.
6297 (solib_target_relocate_section_addresses): Update.
6298 * solib-svr4.c (enable_break, svr4_relocate_main_executable):
6299 Update.
6300 * solib-frv.c (frv_relocate_main_executable): Update.
6301 * solib-dsbt.c (dsbt_relocate_main_executable): Update.
6302 * solib-aix.c (solib_aix_get_section_offsets): Change return
6303 type.
6304 (solib_aix_solib_create_inferior_hook): Update.
6305 * remote.c (remote_target::get_offsets): Update.
6306 * psymtab.c (find_pc_sect_psymtab): Update.
6307 * psympriv.h (struct partial_symbol) <address, text_low,
6308 text_high>: Update.
6309 * objfiles.h (obj_section_offset): Update.
6310 (struct objfile) <section_offsets>: Change type.
6311 <num_sections>: Remove.
6312 (objfile_relocate): Update.
6313 * objfiles.c (entry_point_address_query): Update
6314 (relocate_one_symbol): Change type of "section_offsets".
6315 (objfile_relocate1, objfile_relocate1): Change type of
6316 "new_offsets".
6317 (objfile_rebase1): Update.
6318 * mipsread.c (mipscoff_symfile_read): Update.
6319 (read_alphacoff_dynamic_symtab): Remove "section_offsets"
6320 parameter.
6321 * mdebugread.c (parse_symbol): Change type of "section_offsets".
6322 (parse_external, psymtab_to_symtab_1): Update.
6323 * machoread.c (macho_symfile_offsets): Update.
6324 * ia64-tdep.c (ia64_find_unwind_table): Update.
6325 * hppa-tdep.c (read_unwind_info): Update.
6326 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Update.
6327 * dwarf2read.c (create_addrmap_from_index)
6328 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
6329 (process_psymtab_comp_unit_reader, add_partial_symbol)
6330 (add_partial_subprogram, process_full_comp_unit)
6331 (read_file_scope, read_func_scope, read_lexical_block_scope)
6332 (read_call_site_scope, dwarf2_rnglists_process)
6333 (dwarf2_ranges_process, dwarf2_ranges_read)
6334 (dwarf_decode_lines_1, var_decode_location, new_symbol)
6335 (dwarf2_fetch_die_loc_sect_off, dwarf2_per_cu_text_offset):
6336 Update.
6337 * dwarf2-frame.c (execute_cfa_program, dwarf2_frame_find_fde):
6338 Update.
6339 * dtrace-probe.c (dtrace_probe::get_relocated_address): Update.
6340 * dbxread.c (read_dbx_symtab, read_ofile_symtab): Update.
6341 (process_one_symbol): Change type of "section_offsets".
6342 * ctfread.c (get_objfile_text_range): Update.
6343 * coffread.c (coff_symtab_read, enter_linenos)
6344 (process_coff_symbol): Update.
6345 * coff-pe-read.c (add_pe_forwarded_sym): Update.
6346 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Update.
6347
6348 2020-01-08 Tom Tromey <tromey@adacore.com>
6349
6350 * dwarf2read.c (parse_macro_definition): Use std::string.
6351 (parse_macro_definition): Likewise.
6352
6353 2020-01-08 Tom Tromey <tromey@adacore.com>
6354
6355 * dwarf2read.c (abbrev_table_read_table): Use std::vector.
6356 (ATTR_ALLOC_CHUNK): Remove.
6357
6358 2020-01-08 Tom Tromey <tromey@adacore.com>
6359
6360 * dwarf2read.c (fixup_go_packaging): Use unique_xmalloc_ptr.
6361
6362 2020-01-08 Tom Tromey <tromey@adacore.com>
6363
6364 * dwarf2read.c (add_partial_symbol): Use unique_xmalloc_ptr.
6365 (dwarf2_compute_name, open_dwo_file): Likewise.
6366 (process_enumeration_scope): Use std::vector.
6367 (guess_partial_die_structure_name): Use unique_xmalloc_ptr.
6368 (partial_die_info::fixup, dwarf2_start_subfile)
6369 (guess_full_die_structure_name, dwarf2_name): Likewise.
6370 (determine_prefix): Update.
6371 (guess_full_die_structure_name): Make return type const.
6372 (partial_die_full_name): Return unique_xmalloc_ptr.
6373 (DW_FIELD_ALLOC_CHUNK): Remove.
6374
6375 2020-01-07 Tom Tromey <tromey@adacore.com>
6376
6377 PR build/24937:
6378 * stap-probe.c (class stap_static_probe_ops): Add constructor.
6379
6380 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
6381
6382 * cli/cli-style.c: Set cli_styling to 'true' in the Cygwin build.
6383
6384 2020-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
6385
6386 * stack.c (print_frame_info): Move disassemble_next_line code
6387 inside source_print block.
6388
6389 2020-01-06 Eli Zaretskii <eliz@gnu.org>
6390
6391 * gdbsupport/gdb_wait.c: Include <signal.h> instead of
6392 gdb/signals.h, as we are now using native signal symbols.
6393
6394 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
6395
6396 * tui/tui-disasm.c (tui_disasm_window::addr_is_displayed): Avoid
6397 overflow by an early check of content vs threshold.
6398 * tui/tui-source.c (tui_source_window::line_is_displayed):
6399 Likewise.
6400
6401 2020-01-06 Eli Zaretskii <eliz@gnu.org>
6402
6403 * NEWS: Mention the recent fix of $_exitsignal on MS-Windows.
6404
6405 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
6406
6407 * coff-pe-read.c (read_pe_exported_syms): Don't try to read the
6408 export table if no section contains it's RVA.
6409
6410 2020-01-06 Eli Zaretskii <eliz@gnu.org>
6411
6412 * windows-tdep.c: Fix a typo in WINDOWS_SIGABRT.
6413
6414 2020-01-06 Hannes Domani <ssbssa@yahoo.de>
6415
6416 * source.c (print_source_lines_base): Set last_line_listed.
6417
6418 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
6419
6420 * tui/tui-disasm.c: Remove trailing spaces.
6421
6422 2020-01-06 Eli Zaretskii <eliz@gnu.org>
6423 Pedro Alves <palves@redhat.com>
6424
6425 * Makefile.in (COMMON_SFILES): Add gdbsupport/gdb_wait.c.
6426 * windows-tdep.c: New enumeration of WINDOWS_SIG* signals.
6427 (windows_gdb_signal_to_target): New function, uses the above
6428 enumeration to convert GDB internal signal codes to equivalent
6429 Windows codes.
6430 (windows_init_abi): Call set_gdbarch_gdb_signal_to_target.
6431 * windows-nat.c: Include "gdb_wait.h".
6432 (get_windows_debug_event): Extract the fatal exception from the
6433 exit status and convert to the equivalent Posix signal number.
6434 * cli/cli-cmds.c (exit_status_set_internal_vars): Account for the
6435 possibility that WTERMSIG returns GDB_SIGNAL_UNKNOWN.
6436 * gdbsupport/gdb_wait.c: New file, implements
6437 windows_status_to_termsig.
6438 * gdbsupport/gdb_wait.h (WIFEXITED, WIFSIGNALED, WEXITSTATUS)
6439 (WTERMSIG) [__MINGW32__]: Separate definitions for MinGW.
6440
6441 2020-01-05 Andrew Burgess <andrew.burgess@embecosm.com>
6442
6443 * tui/tui-layout.c (tui_add_win_to_layout): Use tui_set_layout not
6444 show_layout.
6445
6446 2020-01-05 Luis Machado <luis.machado@linaro.org>
6447
6448 * aarch64-linux-nat.c
6449 (aarch64_linux_nat_target::thread_architecture): Use bfd_arch_aarch64
6450 and bfd_mach_aarch64.
6451
6452 2020-01-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6453
6454 * ui-file.c (stdio_file::can_emit_style_escape)
6455 (tee_file::can_emit_style_escape): Ensure style is used also on
6456 gdb_stderr when gdb_stderr is a tty supporting styling, similarly
6457 to gdb_stdout.
6458 * main.c (set_gdb_data_directory): Use file style to output the
6459 warning that the given pathname is not a directory.
6460 * top.c (show_history_filename, gdb_safe_append_history)
6461 (show_gdb_datadir): Use file style.
6462
6463 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
6464
6465 * solib-target.c (struct lm_info_target):
6466 Change offsets to be a unique_xmalloc_ptr.
6467 (solib_target_relocate_section_addresses): Update.
6468
6469 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
6470
6471 * windows-nat.c (windows_clear_solib): Free so_list linked list.
6472
6473 2020-01-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
6474
6475 * MAINTAINERS (Write After Approval): Add myself.
6476
6477 2020-01-02 Luis Machado <luis.machado@linaro.org>
6478
6479 * proc-service.c (get_ps_regcache): Remove reference to obsolete
6480 Cell BE architecture.
6481 * target.h (struct target_ops) <thread_architecture>: Likewise.
6482
6483 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
6484
6485 * Makefile.in: Use INSTALL_PROGRAM_ENV.
6486
6487 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
6488
6489 * MAINTAINERS (Write After Approval): Add myself.
6490
6491 2020-01-01 Joel Brobecker <brobecker@adacore.com>
6492
6493 * gdbarch.sh: Update copyright year range of generated files.
6494
6495 2020-01-01 Joel Brobecker <brobecker@adacore.com>
6496
6497 Update copyright year range in all GDB files.
6498
6499 2020-01-01 Joel Brobecker <brobecker@adacore.com>
6500
6501 * copyright.py: Convert to Python 3.
6502
6503 2020-01-01 Joel Brobecker <brobecker@adacore.com>
6504
6505 * copyright.py: Adapt after move of gnulib directory from gdb
6506 directory to toplevel directory.
6507
6508 2020-01-01 Joel Brobecker <brobecker@adacore.com>
6509
6510 * copyright.py (main): Exit if run from the wrong directory.
6511
6512 2020-01-01 Joel Brobecker <brobecker@adacore.com>
6513
6514 * top.c (print_gdb_version): Change copyright year to 2020.
6515
6516 2020-01-01 Joel Brobecker <brobecker@adacore.com>
6517
6518 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2019.
6519
6520 For older changes see ChangeLog-2019.
6521 \f
6522 Local Variables:
6523 mode: change-log
6524 left-margin: 8
6525 fill-column: 74
6526 version-control: never
6527 coding: utf-8
6528 End:
This page took 0.160164 seconds and 3 git commands to generate.