]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/ChangeLog
Don't use sprintf_vma for CORE_ADDR
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
1 2020-03-12 Tom Tromey <tom@tromey.com>
2
3 * remote.c (remote_target::download_tracepoint)
4 (remote_target::enable_tracepoint)
5 (remote_target::disable_tracepoint): Use phex, not sprintf_vma.
6 * breakpoint.c (print_recreate_masked_watchpoint): Use phex, not
7 sprintf_vma.
8
9 2020-03-12 Tom Tromey <tom@tromey.com>
10
11 * symfile-mem.c: Update CORE_ADDR size assert.
12
13 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
14
15 * selftest.m4: Move to gdbsupport/.
16 * acinclude.m4: Update path to selftest.m4.
17
18 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
19
20 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Rename to...
21 (SELFTESTS_SRCS): ... this. Add disasm-selftests.c,
22 gdbarch-selfselftests.c and selftest-arch.c.
23 (SUBDIR_UNITTESTS_OBS): Rename to...
24 (SELFTESTS_OBS): ... this.
25 (COMMON_SFILES): Remove disasm-selftests.c and
26 gdbarch-selftests.c.
27 * configure.ac: Don't add selftest-arch.{c,o} to
28 CONFIG_{SRCS,OBS}.
29 * disasm-selftests.c, gdbarch-selftests.c: Remove GDB_SELF_TEST
30 preprocessor conditions.
31
32 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
33
34 * configure.ac: Don't source bfd/development.sh.
35 * selftest.m4: Modify comment.
36 * configure: Re-generate.
37
38 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
39
40 * selftest.m4 (GDB_AC_SELFTEST): Error out if $development is
41 not "true" or "false".
42 * configure: Re-generate.
43
44 2020-03-12 Christian Biesinger <cbiesinger@google.com>
45
46 * Makefile.in (HFILES_NO_SRCDIR): Add new arm-nbsd-tdep.h file.
47 * arm-nbsd-nat.c (arm_supply_gregset): Moved to arm-nbsd-tdep and
48 renamed to arm_nbsd_supply_gregset.
49 (fetch_register): Update to call arm_nbsd_supply_gregset.
50 (fetch_regs): Remove in favor of fetch_register with a -1 regno.
51 (arm_netbsd_nat_target::fetch_registers): Update.
52 (fetch_elfcore_registers): Removed.
53 (_initialize_arm_netbsd_nat): Removed call to deprecated_add_core_fns.
54 * arm-nbsd-tdep.c (struct arm_nbsd_reg): New struct.
55 (arm_nbsd_supply_gregset): Moved from arm-nbsd-nat.c and updated to
56 not require NetBSD system headers.
57 (arm_nbsd_regset): New struct.
58 (arm_nbsd_iterate_over_regset_sections): New function.
59 (arm_netbsd_init_abi_common): Updated to call
60 set_gdbarch_iterate_over_regset_sections.
61 * arm-nbsd-tdep.h: New file.
62
63 2020-03-11 Kevin Buettner <kevinb@redhat.com>
64
65 * symtab.c (find_pc_sect_line): Add check which prevents infinite
66 recursion.
67
68 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
69
70 * configure: Re-generate.
71
72 2020-03-11 Tom Tromey <tromey@adacore.com>
73
74 * ada-typeprint.c (print_choices): Fix comment.
75
76 2020-03-11 Andrew Burgess <andrew.burgess@embecosm.com>
77
78 * buildsyms.c (buildsym_compunit::record_line): Avoid accessing
79 previous item in the list, when the list has no items.
80
81 2020-03-11 Tom de Vries <tdevries@suse.de>
82
83 * dwarf2/loc.c (dwarf2_evaluate_property): Handle NULL frame in
84 PROP_LOCLIST handling code.
85
86 2020-03-10 Andrew Burgess <andrew.burgess@embecosm.com>
87
88 * buildsym-legacy.c (record_line): Pass extra parameter to
89 record_line.
90 * buildsym.c (buildsym_compunit::record_line): Take an extra
91 parameter, reduce duplication in the line table, and record the
92 is_stmt flag in the line table.
93 * buildsym.h (buildsym_compunit::record_line): Add extra
94 parameter.
95 * disasm.c (do_mixed_source_and_assembly_deprecated): Ignore
96 non-statement lines.
97 * dwarf2/read.c (dwarf_record_line_1): Add extra parameter, pass
98 this to the symtab builder.
99 (dwarf_finish_line): Pass extra parameter to dwarf_record_line_1.
100 (lnp_state_machine::record_line): Pass a suitable is_stmt flag
101 through to dwarf_record_line_1.
102 * infrun.c (process_event_stop_test): When stepping, don't stop at
103 a non-statement instruction, and only refresh the step info when
104 we land in the middle of a line's range. Also add an extra
105 comment.
106 * jit.c (jit_symtab_line_mapping_add_impl): Initialise is_stmt
107 field.
108 * record-btrace.c (btrace_find_line_range): Only record lines
109 marked as is-statement.
110 * stack.c (frame_show_address): Show the frame address if we are
111 in a non-statement sal.
112 * symmisc.c (dump_symtab_1): Print the is_stmt flag.
113 (maintenance_print_one_line_table): Print a header for the is_stmt
114 column, and include is_stmt information in the output.
115 * symtab.c (find_pc_sect_line): Find lines marked as statements in
116 preference to non-statements.
117 (find_pcs_for_symtab_line): Prefer is-statement entries.
118 (find_line_common): Likewise.
119 * symtab.h (struct linetable_entry): Add is_stmt field.
120 (struct symtab_and_line): Likewise.
121 * xcoffread.c (arrange_linetable): Initialise is_stmt field when
122 arranging the line table.
123
124 2020-03-07 Tom de Vries <tdevries@suse.de>
125
126 * dwarf2/read.c (read_typedef): Treat anonymous typedef as forwarder
127 DIE.
128
129 2020-03-07 Tom Tromey <tom@tromey.com>
130
131 * valops.c (value_literal_complex): Remove obsolete comment.
132 * gdbtypes.h (enum type_code) <TYPE_CODE_FLT>: Remove obsolete
133 comment.
134
135 2020-03-06 Simon Marchi <simon.marchi@polymtl.ca>
136
137 * infrun.h: Forward-declare thread_info.
138 (set_step_info): Add thread_info parameter, add doc.
139 * infrun.c (set_step_info): Add thread_info parameter, move doc
140 to header.
141 * infrun.c (process_event_stop_test): Pass thread to
142 set_step_info call.
143 * infcmd.c (set_step_frame): Add thread_info pointer, pass it to
144 set_step_info.
145 (prepare_one_step): Add thread_info parameter, pass it to
146 set_step_frame and prepare_one_step (recursive) call.
147 (step_1): Pass thread to prepare_one_step call.
148 (step_command_fsm::should_stop): Pass thread to
149 prepare_one_step.
150 (until_next_fsm): Pass thread to set_step_frame call.
151 (finish_command): Pass thread to set_step_info call.
152
153 2020-03-06 Hannes Domani <ssbssa@yahoo.de>
154
155 * windows-tdep.c (windows_solib_create_inferior_hook):
156 Check if inferior is running.
157
158 2020-03-06 Tom de Vries <tdevries@suse.de>
159
160 * NEWS: Fix "the the".
161 * ctfread.c: Same.
162
163 2020-03-06 Tom de Vries <tdevries@suse.de>
164
165 * psymtab.c (psymtab_to_symtab): Don't print "done.".
166
167 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
168
169 * .dir-locals.el: Add a comment referencing the other copies of
170 this file.
171
172 2020-03-05 John Baldwin <jhb@FreeBSD.org>
173
174 * fbsd-tdep.c (fbsd_make_corefile_notes): Use std::string for
175 psargs.
176
177 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
178
179 * .gitattributes: New file.
180
181 2020-03-04 Tom Tromey <tom@tromey.com>
182
183 * symmisc.c (print_symbol_bcache_statistics)
184 (print_objfile_statistics): Update.
185 * symfile.c (allocate_symtab): Use intern.
186 * psymtab.c (partial_symtab::partial_symtab): Use intern.
187 * objfiles.h (struct objfile_per_bfd_storage) <filename_cache,
188 macro_cache>: Remove.
189 <string_cache>: New member.
190 (struct objfile) <intern>: New methods.
191 * elfread.c (elf_symtab_read): Use intern.
192 * dwarf2/read.c (fixup_go_packaging): Intern package name.
193 (dwarf2_compute_name, dwarf2_physname)
194 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2): Intern
195 names.
196 (guess_partial_die_structure_name): Update.
197 (partial_die_info::fixup): Intern name.
198 (dwarf2_canonicalize_name): Change parameter to objfile. Intern
199 name.
200 (dwarf2_name): Intern name. Update.
201 * buildsym.c (buildsym_compunit::get_macro_table): Use
202 string_cache.
203
204 2020-03-04 Tom Tromey <tom@tromey.com>
205
206 * jit.c (bfd_open_from_target_memory): Make "target" const.
207 * corefile.c (gnutarget): Now const.
208 * gdbcore.h (gnutarget): Now const.
209
210 2020-03-04 Hannes Domani <ssbssa@yahoo.de>
211
212 * NEWS: Mention support for WOW64 processes.
213 * amd64-windows-nat.c (amd64_mappings): Rename and remove static.
214 (amd64_windows_segment_register_p): Remove static.
215 (_initialize_amd64_windows_nat): Update.
216 * configure.nat <windows> (NATDEPFILES): Add i386-windows-nat.o.
217 * i386-windows-nat.c (context_offset): Update.
218 (i386_mappings): Rename and remove static.
219 (i386_windows_segment_register_p): Remove static.
220 (_initialize_i386_windows_nat): Update.
221 * windows-nat.c (STATUS_WX86_BREAKPOINT): New macro.
222 (STATUS_WX86_SINGLE_STEP): New macro.
223 (EnumProcessModulesEx): New macro.
224 (Wow64SuspendThread): New macro.
225 (Wow64GetThreadContext): New macro.
226 (Wow64SetThreadContext): New macro.
227 (Wow64GetThreadSelectorEntry): New macro.
228 (windows_set_context_register_offsets): Add static.
229 (windows_set_segment_register_p): Likewise.
230 (windows_add_thread): Adapt for WOW64 processes.
231 (windows_fetch_one_register): Likewise.
232 (windows_nat_target::fetch_registers): Likewise.
233 (windows_store_one_register): Likewise.
234 (display_selector): Likewise.
235 (display_selectors): Likewise.
236 (handle_exception): Likewise.
237 (windows_continue): Likewise.
238 (windows_nat_target::resume): Likewise.
239 (windows_add_all_dlls): Likewise.
240 (do_initial_windows_stuff): Likewise.
241 (windows_nat_target::attach): Likewise.
242 (windows_get_exec_module_filename): Likewise.
243 (windows_nat_target::create_inferior): Likewise.
244 (windows_xfer_siginfo): Likewise.
245 (_initialize_loadable): Initialize Wow64SuspendThread,
246 Wow64GetThreadContext, Wow64SetThreadContext,
247 Wow64GetThreadSelectorEntry and EnumProcessModulesEx.
248 * windows-nat.h (windows_set_context_register_offsets):
249 Remove declaration.
250 (windows_set_segment_register_p): Likewise.
251 (i386_windows_segment_register_p): Add declaration.
252 (amd64_windows_segment_register_p): Likewise.
253
254 2020-03-04 Luis Machado <luis.machado@linaro.org>
255
256 Revert aa66aac47b4dd38f9524ddb5546c08cc09930d37 due to regressions
257 in "info registers" for AArch64/ARM.
258
259 The change caused "info registers" to not print GPR's.
260
261 gdb/ChangeLog:
262
263 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
264
265 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
266 when reg->group is empty and reggroup is not.
267
268 2020-03-03 Tom Tromey <tromey@adacore.com>
269
270 * dwarf2/frame.c (struct dwarf2_frame_cache)
271 <checked_tailcall_bottom, entry_cfa_sp_offset,
272 entry_cfa_sp_offset_p>: Remove members.
273 (dwarf2_frame_cache): Call dwarf2_tailcall_sniffer_first.
274 (dwarf2_frame_prev_register): Don't call
275 dwarf2_tailcall_sniffer_first.
276 (dwarf2_append_unwinders): Don't append tailcall unwinder.
277 * frame-unwind.c (add_unwinder): New fuction.
278 (frame_unwind_init): Use it. Add tailcall unwinder.
279
280 2020-03-03 Andrew Burgess <andrew.burgess@embecosm.com>
281 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
282
283 * f-valprint.c (f_val_print): Handle TYPE_CODE_BOOL, any non-zero
284 value should be printed as true.
285
286 2020-03-03 Hannes Domani <ssbssa@yahoo.de>
287
288 * windows-tdep.c (windows_solib_create_inferior_hook): New function.
289 (windows_init_abi): Set and use windows_so_ops.
290
291 2020-03-03 Sergio Durigan Junior <sergiodj@redhat.com>
292
293 * printcmd.c (print_c_string): Check also for TYPE_CODE_PTR
294 when verifying if dealing with a convenience variable.
295
296 2020-03-03 Luis Machado <luis.machado@linaro.org>
297
298 * auxv.c (default_print_auxv_entry): Add new AUXV entries.
299
300 2020-03-02 Simon Marchi <simon.marchi@polymtl.ca>
301
302 * infrun.c (gdbarch_supports_displaced_stepping): New.
303 (use_displaced_stepping): Break up conditions in smaller pieces.
304 Use gdbarch_supports_displaced_stepping.
305 (displaced_step_prepare_throw): Use
306 gdbarch_supports_displaced_stepping.
307
308 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
309
310 * NEWS: Mention new behaviour of the history filename.
311 * top.c (write_history_p): Add comment.
312 (show_write_history_p): Add header comment, give a different
313 message when history writing is on, but the history filename is
314 empty.
315 (history_filename): Add comment.
316 (history_filename_empty): New function.
317 (show_history_filename): Add header comment, give a different
318 message when the filename is empty.
319 (init_history): Compare history_filename against nullptr, and only
320 read history if the filename is not empty.
321 (set_history_filename): Add header comment, and only make
322 non-empty filenames absolute.
323 (init_main): Make the filename argument to 'set history filename'
324 optional.
325
326 2020-03-02 Christian Biesinger <cbiesinger@google.com>
327
328 * arm-nbsd-nat.c (arm_supply_fparegset): Rename to...
329 (arm_supply_vfpregset): ...this, and update to use VFP registers.
330 (fetch_fp_register): Update.
331 (fetch_fp_regs): Update.
332 (store_fp_register): Update.
333 (store_fp_regs): Update.
334 (arm_netbsd_nat_target::read_description): New function.
335 (fetch_elfcore_registers): Update.
336
337 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
338
339 * remote.c (remote_target::remote_parse_stop_reply): Don't use the
340 general_thread if the stop reply is missing a thread-id.
341 (remote_target::process_stop_reply): Use the first non-exited
342 thread if the target didn't pass a thread-id.
343 * infrun.c (do_target_wait): Move call to
344 switch_to_inferior_no_thread to ....
345 (do_target_wait_1): ... here.
346
347 2020-02-29 Jon Turney <jon.turney@dronecode.org.uk>
348
349 * debuginfod-support.c: Include defs.h first.
350
351 2020-02-28 Tom de Vries <tdevries@suse.de>
352
353 * symfile.c (set_initial_language): Use default language for lookup.
354
355 2020-02-28 Simon Marchi <simon.marchi@efficios.com>
356
357 * dwarf2/read.c (cutu_reader::init_tu_and_read_dwo_dies): Remove
358 reader variable, pass `this` to read_cutu_die_from_dwo.
359
360 2020-02-27 Aaron Merey <amerey@redhat.com>
361
362 * source.c (open_source_file): Check for nullptr when computing
363 srcpath.
364
365 2020-02-27 Tom Tromey <tromey@adacore.com>
366
367 * dwarf2/read.c (struct field_info) <nfields>: Now a method, not a
368 member.
369 (dwarf2_add_field): Don't update nfields.
370 (dwarf2_attach_fields_to_type, process_structure_scope): Update.
371
372 2020-02-27 Andrew Burgess <andrew.burgess@embecosm.com>
373
374 * gdbtypes.c (create_array_type_with_stride): Use std::abs not
375 abs.
376
377 2020-02-26 Tom Tromey <tom@tromey.com>
378
379 * dwarf2/read.c (struct dwarf2_include_psymtab): New.
380 (dwarf2_create_include_psymtab): Use dwarf2_include_psymtab.
381 (dwarf2_psymtab::expand_psymtab, dwarf2_psymtab::readin_p)
382 (dwarf2_psymtab::get_compunit_symtab): Remove null checks for
383 per_cu_data.
384
385 2020-02-26 Tom Tromey <tom@tromey.com>
386
387 * dwarf2/index-write.c (psym_index_map): Change type.
388 (add_address_entry_worker, write_one_signatured_type)
389 (recursively_count_psymbols, recursively_write_psymbols)
390 (class debug_names, psyms_seen_size, write_gdbindex)
391 (write_debug_names): Use partial_symtab, not dwarf2_psymtab.
392
393 2020-02-26 Aaron Merey <amerey@redhat.com>
394
395 * Makefile.in: Handle optional debuginfod support.
396 * NEWS: Update.
397 * README: Add --with-debuginfod summary.
398 * config.in: Regenerate.
399 * configure: Regenerate.
400 * configure.ac: Handle optional debuginfod support.
401 * debuginfod-support.c: debuginfod helper functions.
402 * debuginfod-support.h: Ditto.
403 * doc/gdb.texinfo: Add --with-debuginfod to configure options
404 summary.
405 * dwarf2/read.c (dwarf2_get_dwz_file): Query debuginfod servers
406 when a dwz file cannot be found.
407 * elfread.c (elf_symfile_read): Query debuginfod servers when a
408 debuginfo file cannot be found.
409 * source.c (open_source_file): Query debuginfod servers when a
410 source file cannot be found.
411 * top.c (print_gdb_configuration): Include
412 --{with,without}-debuginfod in the output.
413
414 2020-02-26 Jérémie Galarneau <jeremie.galarneau@efficios.com>
415
416 * thread.c (thr_try_catch_cmd): Print thread name.
417
418 2020-02-26 Simon Marchi <simon.marchi@efficios.com>
419
420 * dwarf2/loc.h (dwarf2_fetch_die_loc_sect_off,
421 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
422 dwarf2_fetch_die_type_sect_off): Move to...
423 * dwarf2/read.h (dwarf2_fetch_die_loc_sect_off,
424 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
425 dwarf2_fetch_die_type_sect_off): ... here.
426 * dwarf2/read.c (dwarf2_fetch_die_loc_sect_off,
427 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
428 dwarf2_fetch_die_type_sect_off): Move doc to header file.
429
430 2020-02-26 Tom de Vries <tdevries@suse.de>
431
432 PR gdb/25603
433 * symfile.c (set_initial_language): Exit-early if
434 language_mode == language_mode_manual.
435
436 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
437
438 * dwarf2/loc.h (dwarf2_read_addr_index): Move...
439 * dwarf2/read.h (dwarf2_read_addr_index): ... here.
440 * dwarf2/read.c (dwarf2_read_addr_index): Move doc to header.
441
442 2020-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
443
444 * gdbtypes.c (create_array_type_with_stride): Handle negative
445 array strides.
446 * valarith.c (value_subscripted_rvalue): Likewise.
447
448 2020-02-25 Luis Machado <luis.machado@linaro.org>
449
450 * aarch64-tdep.c (aarch64_vnv_type): Fix comment typo.
451
452 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
453
454 * loc.h (dwarf2_get_die_type): Move to...
455 * read.h (dwarf2_get_die_type): ... here.
456 * read.c (dwarf2_get_die_type): Move doc to header.
457
458 2020-02-25 Joel Brobecker <brobecker@adacore.com>
459
460 * copypright.py (EXCLUDE_LIST): Add 'gnulib/config.in' and
461 'gnulib/Makefile.in' to the list.
462
463 2020-02-24 Tom Tromey <tom@tromey.com>
464
465 * dwarf2/read.h (struct type_unit_unshareable) <num_symtabs>:
466 Remove.
467 * dwarf2/read.c (dwarf2_cu::setup_type_unit_groups): Use
468 XOBNEWVEC.
469
470 2020-02-24 Tom Tromey <tom@tromey.com>
471
472 * dwarf2/read.h (struct dwarf2_per_cu_data) <type_unit_group_p>:
473 New method.
474 * dwarf2/read.c (IS_TYPE_UNIT_GROUP): Remove.
475 (dw2_do_instantiate_symtab, dw2_get_file_names)
476 (build_type_psymtab_dependencies, load_full_type_unit): Update.
477
478 2020-02-24 Tom Tromey <tom@tromey.com>
479
480 * dwarf2read.c (dwarf2_build_psymtabs_hard): Use
481 make_scoped_restore.
482 (dwarf2_psymtab::read_symtab): Don't clear
483 reading_partial_symbols.
484
485 2020-02-24 Tom de Vries <tdevries@suse.de>
486
487 PR gdb/25592
488 * stack.c (iterate_over_block_locals): Handle LOC_CONST.
489
490 2020-02-24 Tom de Vries <tdevries@suse.de>
491
492 * tui/tui-layout.c (_initialize_tui_layout): Fix help messages for
493 commands layout next/prev/regs.
494
495 2020-02-22 Tom Tromey <tom@tromey.com>
496
497 * dwarf2/loc.h (dwarf2_compile_expr_to_ax): Don't declare.
498 * dwarf2/loc.c (dwarf2_compile_expr_to_ax): Now static.
499
500 2020-02-22 Tom Tromey <tom@tromey.com>
501
502 * tui/tui-data.h (TUI_DISASM_WIN): Cast to tui_disasm_window.
503
504 2020-02-22 Tom Tromey <tom@tromey.com>
505
506 * tui/tui-win.c (_initialize_tui_win): Add usage text.
507 * tui/tui-stack.c (_initialize_tui_stack): Add usage text.
508 * tui/tui-regs.c (_initialize_tui_regs): Add usage text.
509 * tui/tui.c (_initialize_tui): Add usage text.
510
511 2020-02-22 Tom Tromey <tom@tromey.com>
512
513 * tui/tui-win.c (tui_set_focus_command)
514 (tui_set_win_height_command): Use error_no_arg.
515 (_initialize_tui_win): Update help text.
516 (FOCUS_USAGE, WIN_HEIGHT_USAGE): Don't define.
517
518 2020-02-22 Tom Tromey <tom@tromey.com>
519
520 * tui/tui-layout.c (extract_display_start_addr): Rewrite.
521 * tui/tui-disasm.h (struct tui_disasm_window)
522 <display_start_addr>: Declare.
523 * tui/tui-source.h (struct tui_source_window)
524 <display_start_addr>: Declare.
525 * tui/tui-winsource.h (struct tui_source_window_base)
526 <show_source_line, display_start_addr>: New methods.
527 <m_horizontal_offset, m_start_line_or_addr, m_gdbarch, m_content>:
528 Rename and move to protected section.
529 * tui/tui-winsource.c (tui_source_window_base::update_source_window)
530 (tui_source_window_base::do_erase_source_content): Update.
531 (tui_source_window_base::show_source_line): Now a method.
532 (tui_source_window_base::show_source_content)
533 (tui_source_window_base::tui_source_window_base)
534 (tui_source_window_base::rerender)
535 (tui_source_window_base::refill)
536 (tui_source_window_base::do_scroll_horizontal)
537 (tui_source_window_base::set_is_exec_point_at)
538 (tui_source_window_base::update_breakpoint_info)
539 (tui_source_window_base::update_exec_info): Update.
540 * tui/tui-source.c (tui_source_window::set_contents)
541 (tui_source_window::showing_source_p)
542 (tui_source_window::do_scroll_vertical)
543 (tui_source_window::location_matches_p)
544 (tui_source_window::line_is_displayed): Update.
545 (tui_source_window::display_start_addr): New method.
546 * tui/tui-disasm.c (tui_disasm_window::set_contents)
547 (tui_disasm_window::do_scroll_vertical)
548 (tui_disasm_window::location_matches_p): Update.
549 (tui_disasm_window::display_start_addr): New method.
550
551 2020-02-22 Tom Tromey <tom@tromey.com>
552
553 * NEWS: Add entry for gdb.register_window_type.
554 * tui/tui-layout.h (window_factory): New typedef.
555 (tui_register_window): Declare.
556 * tui/tui-layout.c (saved_tui_windows): New global.
557 (tui_apply_current_layout): Use it.
558 (tui_register_window): New function.
559 * python/python.c (do_start_initialization): Call
560 gdbpy_initialize_tui.
561 (python_GdbMethods): Add "register_window_type" function.
562 * python/python-internal.h (gdbpy_register_tui_window)
563 (gdbpy_initialize_tui): Declare.
564 * python/py-tui.c: New file.
565 * Makefile.in (SUBDIR_PYTHON_SRCS): Add py-tui.c.
566
567 2020-02-22 Tom Tromey <tom@tromey.com>
568
569 * tui/tui-io.c (do_tui_putc): Don't omit annotations.
570
571 2020-02-22 Tom Tromey <tom@tromey.com>
572
573 * tui/tui-win.c (tui_set_win_focus_to): Move to tui-data.c.
574 * tui/tui-data.h (tui_set_win_with_focus): Don't declare.
575 * tui/tui-data.c (tui_set_win_with_focus): Remove.
576 (tui_set_win_focus_to): Move from tui-win.c.
577
578 2020-02-22 Tom Tromey <tom@tromey.com>
579
580 * tui/tui-layout.c (make_standard_window, get_locator_window): New
581 functions.
582 (known_window_types): New global.
583 (tui_get_window_by_name): Reimplement.
584 (initialize_known_windows): New function.
585 (validate_window_name): Rewrite.
586 (_initialize_tui_layout): Call initialize_known_windows.
587
588 2020-02-22 Tom Tromey <tom@tromey.com>
589
590 * tui/tui.h (enum tui_win_type) <LOCATOR_WIN, DATA_ITEM_WIN>:
591 Remove constants.
592 * tui/tui-winsource.h (struct tui_source_window_base)
593 <tui_source_window_base>: Remove parameter.
594 * tui/tui-winsource.c
595 (tui_source_window_base::tui_source_window_base): Remove
596 parameter.
597 (tui_source_window_base::refill): Update.
598 * tui/tui-stack.h (struct tui_locator_window)
599 <tui_locator_window>: Update.
600 * tui/tui-source.h (struct tui_source_window) <tui_source_window>:
601 Default the constructor.
602 * tui/tui-regs.h (struct tui_data_item_window)
603 <tui_data_item_window>: Default the constructor.
604 (struct tui_data_window) <tui_data_window>: Likewise.
605 * tui/tui-disasm.h (struct tui_disasm_window) <tui_disasm_window>:
606 Default the constructor.
607 * tui/tui-data.h (struct tui_gen_win_info) <tui_gen_win_info>:
608 Default the constructor.
609 <type>: Remove.
610 (struct tui_win_info) <tui_win_info>: Default the constructor.
611 * tui/tui-data.c (tui_win_info::tui_win_info): Remove.
612 * tui/tui-command.h (struct tui_cmd_window) <tui_cmd_window>:
613 Default the constructor.
614
615 2020-02-22 Tom Tromey <tom@tromey.com>
616
617 * tui/tui-wingeneral.h (tui_make_all_invisible): Don't declare.
618 * tui/tui-wingeneral.c (tui_make_all_invisible): Remove.
619 * tui/tui-win.c (tui_resize_all): Don't call
620 tui_delete_invisible_windows.
621 * tui/tui-layout.c (tui_apply_current_layout): Delete windows when
622 done.
623 (tui_set_layout): Update.
624 (tui_add_win_to_layout): Don't call tui_delete_invisible_windows.
625 * tui/tui-data.h (tui_delete_invisible_windows): Don't declare.
626 * tui/tui-data.c (tui_delete_invisible_windows): Remove.
627
628 2020-02-22 Tom Tromey <tom@tromey.com>
629
630 * tui/tui-win.c (tui_partial_win_by_name): Handle ambiguity
631 correctly.
632
633 2020-02-22 Tom Tromey <tom@tromey.com>
634
635 * tui/tui-data.c (tui_next_win, tui_prev_win): Reimplement.
636
637 2020-02-22 Tom Tromey <tom@tromey.com>
638
639 * tui/tui-winsource.h (struct tui_source_window_iterator)
640 <inner_iterator>: New etytypedef.
641 <tui_source_window_iterator>: Take "end" parameter.
642 <tui_source_window_iterator>: Take iterator.
643 <operator*, advance>: Update.
644 <m_iter>: Change type.
645 <m_end>: New field.
646 (struct tui_source_windows) <begin, end>: Update.
647 * tui/tui-layout.c (tui_windows): New global.
648 (tui_apply_current_layout): Clear tui_windows.
649 (tui_layout_window::apply): Update tui_windows.
650 * tui/tui-data.h (tui_windows): Declare.
651 (all_tui_windows): Now inline function.
652 (class tui_window_iterator, struct all_tui_windows): Remove.
653
654 2020-02-22 Tom Tromey <tom@tromey.com>
655
656 PR tui/17850:
657 * tui/tui-win.c (tui_gen_win_info::max_width): New method.
658 * tui/tui-layout.h (class tui_layout_base) <get_sizes>: Add
659 "height" argument.
660 (class tui_layout_window) <get_sizes>: Likewise.
661 (class tui_layout_split) <tui_layout_split>: Add "vertical"
662 argument.
663 <get_sizes>: Add "height" argument.
664 <m_vertical>: New field.
665 * tui/tui-layout.c (tui_layout_split::clone): Update.
666 (tui_layout_split::get_sizes): Add "height" argument.
667 (tui_layout_split::adjust_size, tui_layout_split::apply): Update.
668 (tui_new_layout_command): Parse "-horizontal".
669 (_initialize_tui_layout): Update help string.
670 (tui_layout_split::specification): Add "-horizontal" when needed.
671 * tui/tui-layout.c (tui_layout_window::get_sizes): Add "height"
672 argument.
673 * tui/tui-data.h (struct tui_gen_win_info) <max_width, min_width>:
674 New methods.
675
676 2020-02-22 Tom Tromey <tom@tromey.com>
677
678 * tui/tui-layout.h (enum tui_adjust_result): New.
679 (class tui_layout_base) <adjust_size>: Return tui_adjust_result.
680 (class tui_layout_window) <adjust_size>: Return
681 tui_adjust_result. Rewrite.
682 (class tui_layout_split) <adjust_size>: Return tui_adjust_result.
683 * tui/tui-layout.c (tui_layout_split::adjust_size): Update.
684
685 2020-02-22 Tom Tromey <tom@tromey.com>
686
687 * tui/tui-layout.h (class tui_layout_split) <add_split>: Change
688 parameter and return types.
689 (class tui_layout_base) <specification>: Add "depth".
690 (class tui_layout_window) <specification>: Add "depth".
691 (class tui_layout_split) <specification>: Add "depth".
692 * tui/tui-layout.c (tui_layout_split::add_split): Change parameter
693 and return types.
694 (tui_new_layout_command): Parse sub-layouts.
695 (_initialize_tui_layout): Update help string.
696 (tui_layout_window::specification): Add "depth".
697 (add_layout_command): Update.
698
699 2020-02-22 Tom Tromey <tom@tromey.com>
700
701 * NEWS: Add "tui new-layout" item.
702 * tui/tui-layout.c (add_layout_command): Return cmd_list_element.
703 Add new-layout command to help text.
704 (validate_window_name): New function.
705 (tui_new_layout_command): New function.
706 (_initialize_tui_layout): Register "new-layout".
707 (tui_layout_window::specification): New method.
708 (tui_layout_window::specification): New method.
709 * tui/tui-layout.h (class tui_layout_base) <specification>: New
710 method.
711 (class tui_layout_window) <specification>: New method.
712 (class tui_layout_split) <specification>: New method.
713
714 2020-02-22 Tom Tromey <tom@tromey.com>
715
716 * tui/tui.c (tui_enable): Call tui_set_initial_layout.
717 * tui/tui-win.c (window_name_completer): Update comment.
718 * tui/tui-layout.h (class tui_layout_base) <replace_window>:
719 Declare method.
720 (class tui_layout_window) <replace_window>: Likewise.
721 (class tui_layout_split) <replace_window>: Likewise.
722 (tui_set_layout): Don't declare.
723 (tui_set_initial_layout): Declare function.
724 * tui/tui-layout.c (layouts, applied_skeleton, src_regs_layout)
725 (asm_regs_layout): New globals.
726 (tui_current_layout, show_layout): Remove.
727 (tui_set_layout, tui_add_win_to_layout): Rewrite.
728 (find_layout, tui_apply_layout): New function.
729 (layout_completer): Remove.
730 (tui_next_layout): Reimplement.
731 (tui_next_layout_command): New function.
732 (tui_set_initial_layout, tui_prev_layout_command): New functions.
733 (tui_regs_layout): Reimplement.
734 (tui_regs_layout_command): New function.
735 (extract_display_start_addr): Rewrite.
736 (next_layout, prev_layout): Remove.
737 (tui_layout_window::replace_window): New method.
738 (tui_layout_split::replace_window): New method.
739 (destroy_layout): New function.
740 (layout_list): New global.
741 (add_layout_command): New function.
742 (initialize_layouts): Update.
743 (tui_layout_command): New function.
744 (_initialize_tui_layout): Install "layout" commands.
745 * tui/tui-data.h (enum tui_layout_type): Remove.
746 (tui_current_layout): Don't declare.
747
748 2020-02-22 Tom Tromey <tom@tromey.com>
749
750 * tui/tui-regs.c (tui_reg_layout): Remove.
751 (tui_reg_command): Use tui_regs_layout.
752 * tui/tui-layout.h (tui_reg_command): Declare.
753 * tui/tui-layout.c (tui_reg_command): New function.
754
755 2020-02-22 Tom Tromey <tom@tromey.com>
756
757 * tui/tui.c (tui_rl_delete_other_windows): Call
758 tui_remove_some_windows.
759 * tui/tui-layout.h (class tui_layout_base) <remove_windows>:
760 Declare method.
761 (class tui_layout_window) <remove_windows>: New method.
762 (class tui_layout_split) <remove_windows>: Declare.
763 (tui_remove_some_windows): Declare.
764 * tui/tui-layout.c (tui_remove_some_windows): New function.
765 (tui_layout_split::remove_windows): New method.
766
767 2020-02-22 Tom Tromey <tom@tromey.com>
768
769 * tui/tui.c (tui_rl_change_windows): Call tui_next_layout.
770 * tui/tui-layout.h (tui_next_layout): Declare.
771 * tui/tui-layout.c (tui_next_layout): New function.
772
773 2020-02-22 Tom Tromey <tom@tromey.com>
774
775 * tui/tui-regs.c (tui_data_window::display_registers_from): Use
776 correct coordinates.
777
778 2020-02-22 Tom Tromey <tom@tromey.com>
779
780 * tui/tui-layout.h (tui_add_win_to_layout): Add comment.
781 * tui/tui-layout.c (tui_add_win_to_layout): Add assert. Remove
782 DATA_WIN case.
783
784 2020-02-22 Tom Tromey <tom@tromey.com>
785
786 * tui/tui-disasm.c (tui_get_low_disassembly_address): Use
787 TUI_DISASM_WIN, not tui_win_list.
788
789 2020-02-22 Tom Tromey <tom@tromey.com>
790
791 * valprint.c (generic_val_print_enum_1)
792 (val_print_type_code_flags): Style member names.
793 * rust-lang.c (val_print_struct, rust_print_enum)
794 (rust_print_struct_def, rust_internal_print_type): Style member
795 names.
796 * p-valprint.c (pascal_object_print_value_fields): Style member
797 names. Only call fprintf_symbol_filtered for static members.
798 * m2-typeprint.c (m2_record_fields, m2_enum): Style member names.
799 * f-valprint.c (f_val_print): Style member names.
800 * f-typeprint.c (f_type_print_base): Style member names.
801 * cp-valprint.c (cp_print_value_fields): Style member names. Only
802 call fprintf_symbol_filtered for static members.
803 (cp_print_class_member): Style member names.
804 * c-typeprint.c (c_print_type_1, c_type_print_base_1): Style
805 member names.
806 * ada-valprint.c (ada_print_scalar): Style enum names.
807 (ada_val_print_enum): Likewise.
808 * ada-typeprint.c (print_enum_type): Style enum names.
809
810 2020-02-21 Tom Tromey <tom@tromey.com>
811
812 * psympriv.h (struct partial_symtab): Update comment.
813
814 2020-02-21 Tom Tromey <tromey@adacore.com>
815
816 * mips-tdep.h (mips_pc_is_mips16, mips_pc_is_micromips): Parameter
817 type is CORE_ADDR.
818
819 2020-02-21 Tom de Vries <tdevries@suse.de>
820
821 PR gdb/25534
822 * psymtab.c (partial_symtab::read_dependencies): Don't read dependency
823 if dependencies[i]->user != NULL.
824
825 2020-02-21 Ali Tamur <tamur@google.com>
826
827 * dwarf2/read.c (dwarf2_name): Add null check.
828
829 2020-02-20 Tom Tromey <tom@tromey.com>
830
831 * dwarf2/read.c (dwarf2_find_containing_comp_unit): Use ">", not
832 ">=", in binary search.
833 (dwarf2_find_containing_comp_unit): New overload.
834 (run_test): New self-test.
835 (_initialize_dwarf2_read): Register new test.
836
837 2020-02-20 Nelson Chu <nelson.chu@sifive.com>
838
839 * riscv-tdep.c: Updated since the DECLARE_CSR is changed.
840 * riscv-tdep.h: Likewise.
841 * features/riscv/rebuild-csr-xml.sh: Generate the 64bit-csr.xml without
842 rv32-only CSR.
843 * features/riscv/64bit-csr.xml: Regenerated.
844
845 2020-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
846 Tom Tromey <tom@tromey.com>
847
848 * utils.c (fputs_maybe_filtered): Call 'stream->puts' instead
849 of 'fputc_unfiltered'.
850 (putchar_unfiltered): Call 'fputc_unfiltered'.
851 (fputc_unfiltered): Call 'fputs_unfiltered'.
852
853 2020-02-20 Andrew Burgess <andrew.burgess@embecosm.com>
854
855 * config.in: Regenerate.
856 * configure: Regenerate.
857 * configure.ac: Add --with-python-libdir option.
858 * main.c: Use WITH_PYTHON_LIBDIR.
859
860 2020-02-19 Tom Tromey <tom@tromey.com>
861
862 * symtab.c (general_symbol_info::compute_and_set_names): Use
863 obstack_strndup. Simplify call to symbol_set_demangled_name.
864
865 2020-02-19 Simon Marchi <simon.marchi@efficios.com>
866
867 * dwarf2/read.c (allocate_signatured_type_table,
868 allocate_dwo_unit_table, allocate_type_unit_groups_table,
869 allocate_dwo_file_hash_table, allocate_dwp_loaded_cutus_table):
870 Remove objfile parameter, update all callers.
871
872 2020-02-19 Doug Evans <dje@google.com>
873
874 PR rust/25535
875 * rust-lang.c (rust_print_enum): Apply embedded_offset to
876 rust_enum_variant calculation.
877
878 2020-02-19 Tom Tromey <tromey@adacore.com>
879
880 * mips-tdep.h (mips_pc_is_mips): Parameter type is CORE_ADDR.
881
882 2020-02-19 Tom Tromey <tromey@adacore.com>
883
884 * ada-lang.c (cache_symbol): Use obstack_strdup.
885
886 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
887
888 * configure: Regenerate.
889
890 2020-02-19 Tom Tromey <tromey@adacore.com>
891
892 * python/python.c (do_start_initialization): Use XNEWVEC. Remove
893 NULL check.
894
895 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
896
897 * NEWS: Mention RISC-V GNU/Linux GDBserver support.
898
899 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
900
901 * arch/riscv.c (struct riscv_gdbarch_features_hasher): Only define
902 if GDBSERVER is not defined.
903 (riscv_tdesc_cache): Likewise, also store const target_desc.
904 (STATIC_IN_GDB): Define.
905 (riscv_create_target_description): Update declaration with
906 STATIC_IN_GDB.
907 (riscv_lookup_target_description): New function, only define if
908 GDBSERVER is not defined.
909 * arch/riscv.h (riscv_create_target_description): Declare only
910 when GDBSERVER is defined.
911 (riscv_lookup_target_description): New declaration when GDBSERVER
912 is not defined.
913 * nat/riscv-linux-tdesc.c (riscv_linux_read_description): Rename to...
914 (riscv_linux_read_features): ...this, and return
915 riscv_gdbarch_features instead of target_desc.
916 * nat/riscv-linux-tdesc.h: Include 'arch/riscv.h'.
917 (riscv_linux_read_description): Rename to...
918 (riscv_linux_read_features): ...this.
919 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
920 Update to use riscv_gdbarch_features and
921 riscv_lookup_target_description.
922 * riscv-tdep.c (riscv_find_default_target_description): Use
923 riscv_lookup_target_description instead of
924 riscv_create_target_description.
925
926 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
927
928 * valprint.c (generic_val_print_enum_1): When printing a flag
929 enum with value 0 and there is no enumerator with value 0, print
930 just "0" instead of "(unknown: 0x0)".
931
932 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
933
934 * valprint.c (generic_val_print_enum_1): Print unknown part of
935 flag enum in hex.
936
937 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
938
939 * dwarf2/read.c (update_enumeration_type_from_children): Allow
940 flag enums to contain duplicate enumerators.
941 * valprint.c (generic_val_print_enum_1): Update comment.
942
943 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
944
945 * dwarf2/read.c: Include "count-one-bits.h".
946 (update_enumeration_type_from_children): If an enumerator has
947 multiple bits set, don't treat the enumeration as a "flag enum".
948 * valprint.c (generic_val_print_enum_1): Assert that enumerators
949 of flag enums have 0 or 1 bit set.
950
951 2020-02-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
952
953 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use an explicit
954 conversion.
955 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
956 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
957 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
958 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
959 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
960
961 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
962
963 * MAINTAINERS: Change palmer@sifive.com to palmer@dabbelt.com.
964
965 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
966
967 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use
968 displaced_step_closure_up.
969 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
970 (struct displaced_step_closure_up):
971 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
972 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
973 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn):
974 Likewise.
975 * gdbarch.sh (displaced_step_copy_insn): Likewise.
976 * gdbarch.c, gdbarch.h: Re-generate.
977 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Use
978 displaced_step_closure_up.
979 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
980 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
981 * infrun.h (displaced_step_closure_up): New type alias.
982 (struct displaced_step_inferior_state) <step_closure>: Change
983 type to displaced_step_closure_up.
984 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Use
985 displaced_step_closure_up.
986 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
987
988 2020-02-14 Tom Tromey <tom@tromey.com>
989
990 * minidebug.c (gnu_debug_key): New global.
991 (find_separate_debug_file_in_section): Use it.
992
993 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
994
995 * gdbarch.sh (displaced_step_copy_insn): Change return type to an
996 std::unique_ptr.
997 * gdbarch.c: Re-generate.
998 * gdbarch.h: Re-generate.
999 * infrun.c (displaced_step_prepare_throw): Adjust to std::unique_ptr
1000 change.
1001 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Change return
1002 type to std::unique_ptr.
1003 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
1004 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
1005 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
1006 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
1007 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Likewise.
1008 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
1009 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
1010 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
1011 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
1012
1013 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
1014
1015 * infrun.c (get_displaced_step_closure_by_addr): Adjust to
1016 std::unique_ptr.
1017 (displaced_step_clear): Rename to...
1018 (displaced_step_reset): ... this. Just call displaced->reset ().
1019 (displaced_step_clear_cleanup): Rename to...
1020 (displaced_step_reset_cleanup): ... this.
1021 (displaced_step_prepare_throw): Adjust to std::unique_ptr.
1022 (displaced_step_fixup): Likewise.
1023 (resume_1): Likewise.
1024 (handle_inferior_event): Restore child's memory before calling
1025 displaced_step_fixup on the parent.
1026 * infrun.h (displaced_step_inferior_state) <reset>: Adjust
1027 to std::unique_ptr.
1028 <step_closure>: Change type to std::unique_ptr.
1029
1030 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
1031
1032 * arm-tdep.c: Include count-one-bits.h.
1033 (cleanup_block_store_pc): Use count_one_bits.
1034 (cleanup_block_load_pc): Use count_one_bits.
1035 (arm_copy_block_xfer): Use count_one_bits.
1036 (thumb2_copy_block_xfer): Use count_one_bits.
1037 (thumb_copy_pop_pc_16bit): Use count_one_bits.
1038 * arch/arm-get-next-pcs.c: Include count-one-bits.h.
1039 (thumb_get_next_pcs_raw): Use count_one_bits.
1040 (arm_get_next_pcs_raw): Use count_one_bits_l.
1041 * arch/arm.c (bitcount): Remove.
1042 * arch/arm.h (bitcount): Remove.
1043
1044 2020-02-14 Tom Tromey <tromey@adacore.com>
1045
1046 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first):
1047 Update.
1048 * dwarf2/loc.h (call_site_find_chain): Return unique_xmalloc_ptr.
1049 * dwarf2/loc.c (call_site_find_chain_1): Return
1050 unique_xmalloc_ptr.
1051 (call_site_find_chain): Likewise.
1052
1053 2020-02-14 Richard Biener <rguenther@suse.de>
1054
1055 * dwarf2/read.c (lnp_state_machine::handle_special_opcode): Apply CSE
1056 on expression with division operators.
1057
1058 2020-02-13 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
1059
1060 * MAINTAINERS (Write After Approval): Adding myself.
1061
1062 2020-02-12 Tom Tromey <tom@tromey.com>
1063
1064 * event-loop.c (event_data, gdb_event, event_handler_func):
1065 Remove.
1066
1067 2020-02-12 Tom Tromey <tom@tromey.com>
1068
1069 * dwarf2/frame.c (dwarf2_frame_bfd_data): New global.
1070 (dwarf2_frame_objfile_data): Add comment.
1071 (find_comp_unit, set_comp_unit): New functions.
1072 (dwarf2_frame_find_fde): Use find_comp_unit.
1073 (dwarf2_build_frame_info): Use set_comp_unit.
1074
1075 2020-02-12 Tom Tromey <tom@tromey.com>
1076
1077 * dwarf2/frame.c (struct comp_unit) <objfile>: Remove.
1078 (comp_unit): Don't initialize objfile.
1079 (execute_cfa_program): Add text_offset parameter.
1080 (execute_cfa_program_test, dwarf2_fetch_cfa_info)
1081 (dwarf2_frame_cache): Update.
1082 (dwarf2_build_frame_info): Don't set "objfile" member.
1083
1084 2020-02-12 Tom Tromey <tom@tromey.com>
1085
1086 * dwarf2/frame.c (decode_frame_entry_1): Add gdbarch parameter.
1087 (decode_frame_entry): Likewise.
1088 (dwarf2_build_frame_info): Update.
1089
1090 2020-02-12 Tom Tromey <tom@tromey.com>
1091
1092 * dwarf2/frame.c (struct comp_unit) <obstack>: New member.
1093 (decode_frame_entry_1): Use the comp_unit obstack.
1094
1095 2020-02-12 Tom Tromey <tom@tromey.com>
1096
1097 * dwarf2/frame.c (struct comp_unit): Add initializers and
1098 constructor.
1099 (dwarf2_frame_objfile_data): Store a comp_unit.
1100 (dwarf2_frame_find_fde): Update.
1101 (dwarf2_build_frame_info): Use "new".
1102
1103 2020-02-12 Tom Tromey <tom@tromey.com>
1104
1105 * dwarf2/frame.c (struct dwarf2_fde_table): Remove.
1106 (dwarf2_fde_table): Typedef for std::vector.
1107 (dwarf2_frame_objfile_data): Remove the deleter. Now static.
1108 (dwarf2_frame_find_fde, add_fde, decode_frame_entry_1)
1109 (decode_frame_entry): Update.
1110 (dwarf2_build_frame_info): Use "new".
1111
1112 2020-02-12 Christian Biesinger <cbiesinger@google.com>
1113
1114 * arm-tdep.c (arm_gdbarch_init): Update.
1115 * arm-tdep.h (struct gdbarch_tdep) <have_fpa_registers,
1116 have_wmmx_registers, have_vfp_pseudos, have_neon_pseudos,
1117 have_neon, is_m>: Change to bool.
1118
1119 2020-02-12 Christian Biesinger <cbiesinger@google.com>
1120
1121 * arm-tdep.c (arm_dump_tdep): Print more fields of tdep.
1122
1123 2020-02-12 Tom Tromey <tom@tromey.com>
1124
1125 * dwarf2/loc.c (struct dwarf_expr_baton): Remove.
1126
1127 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
1128
1129 * windows-tdep.c (struct windows_gdbarch_data): Add tib_ptr_type.
1130 (windows_get_tlb_type): Use windows_gdbarch_data->tib_ptr_type.
1131
1132 2020-02-11 Tom Tromey <tom@tromey.com>
1133
1134 * psymtab.h: Update comment.
1135
1136 2020-02-11 Tom Tromey <tom@tromey.com>
1137
1138 * gdb_obstack.h (struct auto_obstack): Use
1139 DISABLE_COPY_AND_ASSIGN.
1140
1141 2020-02-11 Tom Tromey <tom@tromey.com>
1142
1143 * dwarf2/frame.h (struct objfile): Don't forward declare.
1144
1145 2020-02-11 Christian Biesinger <cbiesinger@google.com>
1146
1147 * cris-tdep.c (cris_supply_gregset): Change signature to match
1148 what struct regset expects.
1149 (cris_regset): New struct.
1150 (fetch_core_registers): Remove.
1151 (cris_iterate_over_regset_sections): New function.
1152 (_initialize_cris_tdep): Don't call deprecated_add_core_fns.
1153 (cris_gdbarch_init): Call set_gdbarch_iterate_over_regset_sections.
1154
1155 2020-02-11 Christian Biesinger <cbiesinger@google.com>
1156
1157 * arch/arm.h (enum gdb_regnum): Add comment for the FP0..7
1158 registers.
1159
1160 2020-02-11 Christian Biesinger <cbiesinger@google.com>
1161
1162 * arm-tdep.c (arm_dump_tdep): Add \n in fprintf.
1163
1164 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1165
1166 * configure: Re-generate.
1167
1168 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1169
1170 * configure: Re-generate.
1171
1172 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1173
1174 * acinclude: Update warning.m4 path.
1175 * warning.m4: Move to gdbsupport.
1176
1177 2020-02-11 Tom Tromey <tromey@adacore.com>
1178
1179 * remote.c (remote_console_output): Update.
1180 * printcmd.c (printf_command): Update.
1181 * event-loop.c (gdb_wait_for_event): Update.
1182 * linux-nat.c (sigchld_handler): Update.
1183 * remote-sim.c (gdb_os_write_stdout): Update.
1184 (gdb_os_flush_stdout): Update.
1185 (gdb_os_flush_stderr): Update.
1186 (gdb_os_write_stderr): Update.
1187 * exceptions.c (print_exception): Update.
1188 * remote-fileio.c (remote_fileio_func_read): Update.
1189 (remote_fileio_func_write): Update.
1190 * tui/tui.c (tui_enable): Update.
1191 * tui/tui-interp.c (tui_interp::init): Update.
1192 * utils.c (init_page_info): Update.
1193 (putchar_unfiltered, fputc_unfiltered): Update.
1194 (gdb_flush): Update.
1195 (emit_style_escape): Update.
1196 (flush_wrap_buffer, fputs_maybe_filtered): Update.
1197 * ui-file.c (ui_file_isatty, ui_file_read, ui_file_write)
1198 (ui_file_write_async_safe, ui_file_flush, ui_file_puts): Remove.
1199 (stderr_file::write): Update.
1200 (stderr_file::puts): Update.
1201 * ui-file.h (ui_file_isatty, ui_file_write)
1202 (ui_file_write_async_safe, ui_file_read, ui_file_flush)
1203 (ui_file_puts): Don't declare.
1204
1205 2020-02-10 Tom de Vries <tdevries@suse.de>
1206
1207 * dwarf2/read.c (process_psymtab_comp_unit_reader): Cast concat NULL
1208 sentinel to char *.
1209
1210 2020-02-09 Tom de Vries <tdevries@suse.de>
1211
1212 * dwarf2read.c (process_psymtab_comp_unit_reader): Append CU offset to
1213 filename if it matches "<artificial>".
1214
1215 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1216
1217 * windows-tdep.c (struct enum_value_name): New struct.
1218 (create_enum): New function.
1219 (windows_get_siginfo_type): Create and use enum types.
1220
1221 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1222
1223 * NEWS: Mention $_siginfo support for Windows.
1224 * windows-nat.c (handle_exception): Set siginfo_er.
1225 (windows_nat_target::mourn_inferior): Reset siginfo_er.
1226 (windows_xfer_siginfo): New function.
1227 (windows_nat_target::xfer_partial): Call windows_xfer_siginfo.
1228 * windows-tdep.c (struct windows_gdbarch_data): New struct.
1229 (init_windows_gdbarch_data): New function.
1230 (get_windows_gdbarch_data): New function.
1231 (windows_get_siginfo_type): New function.
1232 (windows_init_abi): Register windows_get_siginfo_type.
1233 (_initialize_windows_tdep): Register init_windows_gdbarch_data.
1234
1235 2020-02-08 Tom Tromey <tom@tromey.com>
1236
1237 * dwarf2/read.c (class cutu_reader) <cutu_reader,
1238 init_tu_and_read_dwo_dies>: Remove "keep" parameter.
1239 <keep>: Declare method.
1240 <m_keep>: Remove member.
1241 <~cutu_reader>: Remove.
1242 (cutu_reader::init_tu_and_read_dwo_dies): Update.
1243 (cutu_reader::cutu_reader): Update.
1244 (cutu_reader::keep): Rename from ~cutu_reader.
1245 (process_psymtab_comp_unit, build_type_psymtabs_1)
1246 (process_skeletonless_type_unit, load_partial_comp_unit)
1247 (load_full_comp_unit, dwarf2_read_addr_index)
1248 (read_signatured_type): Update.
1249
1250 2020-02-08 Tom Tromey <tom@tromey.com>
1251
1252 * dwarf2/read.c (process_psymtab_comp_unit_reader): Remove
1253 "want_partial_unit" parameter.
1254 (process_psymtab_comp_unit): Change want_partial_unit to bool.
1255 Inline check for DW_TAG_partial_unit.
1256 (dwarf2_build_psymtabs_hard, scan_partial_symbols): Update.
1257
1258 2020-02-08 Tom Tromey <tom@tromey.com>
1259
1260 * dwarf2/read.c (read_n_bytes, read_direct_string): Move to
1261 read.c.
1262 * dwarf2/leb.h (read_n_bytes, read_direct_string): Move from
1263 read.c.
1264
1265 2020-02-08 Tom Tromey <tom@tromey.com>
1266
1267 * dwarf2/read.c (read_address): Move to comp-unit.c.
1268 (dwarf2_rnglists_process, dwarf2_ranges_process)
1269 (read_attribute_value, dwarf_decode_lines_1)
1270 (var_decode_location, decode_locdesc): Update.
1271 * dwarf2/comp-unit.c (comp_unit_head::read_address): Move from
1272 read.c. Remove "cu" parameter.
1273 * dwarf2/comp-unit.h (struct comp_unit_head) <read_address>: New
1274 method.
1275
1276 2020-02-08 Tom Tromey <tom@tromey.com>
1277
1278 * dwarf2/read.c (read_attribute_value, read_indirect_string)
1279 (read_indirect_line_string): Update.
1280 * dwarf2/comp-unit.c (read_offset): Remove.
1281 (read_comp_unit_head): Update.
1282 * dwarf2/comp-unit.h (struct comp_unit_head) <read_offset>: New
1283 method.
1284 (read_offset): Don't declare.
1285
1286 2020-02-08 Tom Tromey <tom@tromey.com>
1287
1288 * Makefile.in (COMMON_SFILES): Add dwarf2/comp-unit.c.
1289 * dwarf2/read.c (struct comp_unit_head): Move to
1290 dwarf2/comp-unit.h.
1291 (enum class rcuh_kind): Move to comp-unit.h.
1292 (get_cu_length, offset_in_cu_p): Now methods on comp_unit_head.
1293 (read_comp_unit_head, error_check_comp_unit_head)
1294 (read_and_check_comp_unit_head): Move to comp-unit.c.
1295 (read_offset, dwarf_unit_type_name): Likewise.
1296 (create_debug_type_hash_table, read_cutu_die_from_dwo)
1297 (cutu_reader::cutu_reader, read_call_site_scope)
1298 (find_partial_die, follow_die_offset): Update.
1299 * dwarf2/comp-unit.h: New file, from dwarf2read.c.
1300
1301 2020-02-08 Tom Tromey <tom@tromey.com>
1302
1303 * dwarf2/read.c (read_offset_1): Move to leb.c.
1304 (read_abbrev_offset, read_offset, dwarf_decode_line_header)
1305 (dwarf_decode_macro_bytes): Update.
1306 * dwarf2/leb.c (read_offset): Rename; move from read.c.
1307 * dwarf2/leb.h (read_offset): Declare.
1308
1309 2020-02-08 Tom Tromey <tom@tromey.com>
1310
1311 * dwarf2/read.c (dwarf2_section_size): Remove.
1312 (error_check_comp_unit_head, dwarf2_symbol_mark_computed):
1313 Update.
1314 * dwarf2/section.h (struct dwarf2_section_info) <get_size>: New method.
1315
1316 2020-02-08 Tom Tromey <tom@tromey.com>
1317
1318 * dwarf2/read.c (read_initial_length): Move to leb.c.
1319 * dwarf2/leb.h (read_initial_length): Declare.
1320 * dwarf2/leb.c (read_initial_length): Move from read.c. Add
1321 handle_nonstd parameter.
1322 * dwarf2/frame.c (read_initial_length): Remove.
1323 (decode_frame_entry_1): Update.
1324
1325 2020-02-08 Tom Tromey <tom@tromey.com>
1326
1327 * dwarf2/loc.c (dwarf2_find_location_expression)
1328 (dwarf_evaluate_loc_desc::get_tls_address)
1329 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
1330 (rw_pieced_value, dwarf2_evaluate_loc_desc_full)
1331 (dwarf2_locexpr_baton_eval, dwarf2_evaluate_property)
1332 (dwarf2_compile_property_to_c)
1333 (dwarf2_loc_desc_get_symbol_read_needs)
1334 (dwarf2_compile_expr_to_ax, locexpr_describe_location)
1335 (locexpr_tracepoint_var_ref, locexpr_generate_c_location)
1336 (loclist_describe_location, loclist_tracepoint_var_ref)
1337 (loclist_generate_c_location): Update.
1338 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Update.
1339 * dwarf2/loc.h (dwarf2_per_cu_objfile, dwarf2_per_cu_addr_size)
1340 (dwarf2_per_cu_ref_addr_size, dwarf2_per_cu_offset_size)
1341 (dwarf2_per_cu_text_offset, dwarf2_version): Don't declare.
1342 * dwarf2/read.c (dwarf2_per_cu_data::objfile)
1343 (dwarf2_per_cu_data::addr_size)
1344 (dwarf2_per_cu_data::ref_addr_size)
1345 (dwarf2_per_cu_data::text_offset)
1346 (dwarf2_per_cu_data::addr_type): Now methods.
1347 (per_cu_header_read_in): Make per_cu "const".
1348 (dwarf2_version): Remove.
1349 (dwarf2_per_cu_data::int_type): Now a method.
1350 (dwarf2_per_cu_data::_addr_sized_int_type): Likewise.
1351 (set_die_type, read_array_type, read_subrange_index_type)
1352 (read_tag_string_type, read_subrange_type): Update.
1353 * dwarf2/read.h (struct dwarf2_per_cu_data) <addr_size,
1354 offset_size, ref_addr_size, text_offset, addr_type, version,
1355 objfile, int_type, addr_sized_int_type>: Declare methods.
1356
1357 2020-02-08 Tom Tromey <tom@tromey.com>
1358
1359 * dwarf2/read.h (struct dwarf2_per_cu_data) <imported_symtabs>:
1360 Move earlier.
1361
1362 2020-02-08 Tom Tromey <tom@tromey.com>
1363
1364 * dwarf2/read.h (dwarf_line_debug): Declare.
1365 * Makefile.in (COMMON_SFILES): Add dwarf2/line-header.c.
1366 * dwarf2/read.c: Move line_header code to new files.
1367 (dwarf_line_debug): No longer static.
1368 * dwarf2/line-header.c: New file.
1369 * dwarf2/line-header.h: New file.
1370
1371 2020-02-08 Tom Tromey <tom@tromey.com>
1372
1373 * dwarf2/read.c (struct line_header) <file_full_name,
1374 file_file_name>: Return unique_xmalloc_ptr.
1375 (line_header::file_file_name): Update.
1376 (line_header::file_full_name): Update.
1377 (dw2_get_file_names_reader): Update.
1378 (macro_start_file): Update.
1379
1380 2020-02-08 Tom Tromey <tom@tromey.com>
1381
1382 * dwarf2/read.c (struct line_header) <file_full_name,
1383 file_file_name>: Declare methods.
1384 (dw2_get_file_names_reader): Update.
1385 (file_file_name): Now a method.
1386 (file_full_name): Likewise.
1387 (macro_start_file): Update.
1388
1389 2020-02-08 Tom Tromey <tom@tromey.com>
1390
1391 * dwarf2/read.c (dwarf_always_disassemble)
1392 (show_dwarf_always_disassemble): Move to loc.c.
1393 (_initialize_dwarf2_read): Move "always-disassemble" registration
1394 to loc.c.
1395 * dwarf2/read.h (dwarf_always_disassemble): Don't declare.
1396 * dwarf2/loc.c (dwarf_always_disassemble): Move from read.c. Now
1397 static.
1398 (show_dwarf_always_disassemble): Move from read.c.
1399 (_initialize_dwarf2loc): Move always-disassemble from read.c.
1400
1401 2020-02-08 Tom Tromey <tom@tromey.com>
1402
1403 * dwarf2/read.c (~dwarf2_per_objfile): Update.
1404 (create_quick_file_names_table): Return htab_up.
1405 (dw2_get_file_names_reader, dw2_forget_cached_source_info):
1406 Update.
1407 * dwarf2/read.h (struct dwarf2_per_objfile)
1408 <quick_file_names_table>: Now htab_up.
1409
1410 2020-02-08 Tom Tromey <tom@tromey.com>
1411
1412 * dwarf2/abbrev.c (abbrev_table::read): Simplify.
1413
1414 2020-02-08 Tom Tromey <tom@tromey.com>
1415
1416 * dwarf2/abbrev.c (abbrev_table): Move constructor from header.
1417 Rewrite.
1418 (abbrev_table::add_abbrev, abbrev_table::lookup_abbrev): Rewrite.
1419 * dwarf2/abbrev.h (struct abbrev_info) <next>: Remove.
1420 (abbrev_table::abbrev_table): No longer inline.
1421 (ABBREV_HASH_SIZE): Remove.
1422 (abbrev_table::m_abbrevs): Now an htab_up.
1423
1424 2020-02-08 Tom Tromey <tom@tromey.com>
1425
1426 * dwarf2/read.c (read_cutu_die_from_dwo): Update.
1427 (cutu_reader): Update.
1428 (build_type_psymtabs_1): Update.
1429 * dwarf2/abbrev.c (abbrev_table::read): Rename.
1430 (abbrev_table::alloc_abbrev): Update.
1431 * dwarf2/abbrev.h (abbrev_table_up): Move earlier.
1432 (abbrev_table::read): New static method, renamed from
1433 abbrev_table_read_table.
1434 (abbrev_table::alloc_abbrev)
1435 (abbrev_table::add_abbrev): Now private.
1436 (abbrev_table::abbrev_table): Now private.
1437 (abbrev_table::m_abbrev_obstack): Now private. Rename.
1438
1439 2020-02-08 Tom Tromey <tom@tromey.com>
1440
1441 * dwarf2/read.c (set_die_type, get_die_type_at_offset): Update.
1442 * dwarf2/read.h (struct dwarf2_per_objfile) <die_type_hash>: Now
1443 htab_up.
1444
1445 2020-02-08 Tom Tromey <tom@tromey.com>
1446
1447 * dwarf2/read.c (struct dwp_file) <loaded_cus, loaded_tus>: Now
1448 htab_up.
1449 (lookup_dwo_unit_in_dwp): Update.
1450 (allocate_dwp_loaded_cutus_table): Return htab_up. Don't allocate
1451 on obstack.
1452
1453 2020-02-08 Tom Tromey <tom@tromey.com>
1454
1455 * dwarf2/read.c (allocate_dwo_file_hash_table): Don't allocate on
1456 obstack.
1457
1458 2020-02-08 Tom Tromey <tom@tromey.com>
1459
1460 * dwarf2/read.c (~dwarf2_per_objfile): Don't delete
1461 line_header_hash.
1462 (handle_DW_AT_stmt_list): Update. Don't allocate on obstack.
1463 * dwarf2/read.h (struct dwarf2_per_objfile) <line_header_hash>:
1464 Change type to htab_up.
1465
1466 2020-02-08 Tom Tromey <tom@tromey.com>
1467
1468 * dwarf2/read.c (allocate_type_unit_groups_table): Return
1469 htab_up. Don't allocate on obstack.
1470 (get_type_unit_group, dwarf2_build_psymtabs_hard): Update.
1471 * dwarf2/read.h (struct dwarf2_per_objfile) <type_unit_groups>:
1472 Change type to htab_up.
1473
1474 2020-02-08 Tom Tromey <tom@tromey.com>
1475
1476 * dwarf2/read.h (struct dwarf2_per_objfile) <signatured_types>:
1477 Change type to htab_up.
1478 * dwarf2/read.c (create_signatured_type_table_from_index)
1479 (create_signatured_type_table_from_debug_names)
1480 (create_all_type_units, add_type_unit)
1481 (lookup_dwo_signatured_type, lookup_signatured_type)
1482 (process_skeletonless_type_unit): Update.
1483 (create_debug_type_hash_table, create_debug_types_hash_table):
1484 Change type of types_htab.
1485 (allocate_signatured_type_table, allocate_dwo_unit_table): Return
1486 htab_up. Don't allocate on obstack.
1487 (create_cus_hash_table): Change type of cus_htab parameter.
1488 (struct dwo_file) <cus, tus>: Now htab_up.
1489 (lookup_dwo_signatured_type, lookup_dwo_cutu)
1490 (process_dwo_file_for_skeletonless_type_units, lookup_dwo_cutu)
1491 (queue_and_load_all_dwo_tus): Update.
1492 * dwarf2/index-write.c (write_gdbindex): Update.
1493 (write_debug_names): Update.
1494
1495 2020-02-08 Tom Tromey <tom@tromey.com>
1496
1497 * dwarf2/read.h (struct dwarf2_queue_item): Move from
1498 dwarf2/read.c. Remove "next" member. Add constructor ntad
1499 destructor.
1500 (struct dwarf2_per_objfile) <queue>: New member.
1501 * dwarf2/read.c (struct dwarf2_queue_item): Move to
1502 dwarf2/read.h.
1503 (dwarf2_queue, dwarf2_queue_tail): Remove.
1504 (class dwarf2_queue_guard): Add parameter to constructor. Use
1505 DISABLE_COPY_AND_ASSIGN.
1506 <m_per_objfile>: New member.
1507 <~dwarf2_queue_guard>: Rewrite.
1508 (dw2_do_instantiate_symtab, queue_comp_unit, process_queue):
1509 Update.
1510 (~dwarf2_queue_item): New.
1511
1512 2020-02-08 Tom Tromey <tom@tromey.com>
1513
1514 * dwarf2/read.c (struct die_info) <has_children>: New member.
1515 (dw2_get_file_names_reader): Remove has_children.
1516 (dw2_get_file_names): Update.
1517 (read_cutu_die_from_dwo): Remove has_children.
1518 (cutu_reader::init_tu_and_read_dwo_dies)
1519 (cutu_reader::cutu_reader): Update.
1520 (process_psymtab_comp_unit_reader, build_type_psymtabs_reader):
1521 Remove has_children.
1522 (build_type_psymtabs_1, process_skeletonless_type_unit)
1523 (load_partial_comp_unit, load_full_comp_unit): Update.
1524 (create_dwo_cu_reader): Remove has_children.
1525 (create_cus_hash_table, read_die_and_children): Update.
1526 (read_full_die_1,read_full_die): Remove has_children.
1527 (read_signatured_type): Update.
1528 (class cutu_reader) <has_children>: Remove.
1529
1530 2020-02-08 Tom Tromey <tom@tromey.com>
1531
1532 * dwarf2/expr.c: Rename from dwarf2expr.c.
1533 * dwarf2/expr.h: Rename from dwarf2expr.h.
1534 * dwarf2/frame-tailcall.c: Rename from dwarf2-frame-tailcall.c.
1535 * dwarf2/frame-tailcall.h: Rename from dwarf2-frame-tailcall.h.
1536 * dwarf2/frame.c: Rename from dwarf2-frame.c.
1537 * dwarf2/frame.h: Rename from dwarf2-frame.h.
1538 * dwarf2/index-cache.c: Rename from dwarf-index-cache.c.
1539 * dwarf2/index-cache.h: Rename from dwarf-index-cache.h.
1540 * dwarf2/index-common.c: Rename from dwarf-index-common.c.
1541 * dwarf2/index-common.h: Rename from dwarf-index-common.h.
1542 * dwarf2/index-write.c: Rename from dwarf-index-write.c.
1543 * dwarf2/index-write.h: Rename from dwarf-index-write.h.
1544 * dwarf2/loc.c: Rename from dwarf2loc.c.
1545 * dwarf2/loc.h: Rename from dwarf2loc.h.
1546 * dwarf2/read.c: Rename from dwarf2read.c.
1547 * dwarf2/read.h: Rename from dwarf2read.h.
1548 * dwarf2/abbrev.c, aarch64-tdep.c, alpha-tdep.c,
1549 amd64-darwin-tdep.c, arc-tdep.c, arm-tdep.c, bfin-tdep.c,
1550 compile/compile-c-symbols.c, compile/compile-cplus-symbols.c,
1551 compile/compile-loc2c.c, cris-tdep.c, csky-tdep.c, findvar.c,
1552 gdbtypes.c, guile/scm-type.c, h8300-tdep.c, hppa-bsd-tdep.c,
1553 hppa-linux-tdep.c, i386-darwin-tdep.c, i386-linux-tdep.c,
1554 i386-tdep.c, iq2000-tdep.c, m32c-tdep.c, m68hc11-tdep.c,
1555 m68k-tdep.c, microblaze-tdep.c, mips-tdep.c, mn10300-tdep.c,
1556 msp430-tdep.c, nds32-tdep.c, nios2-tdep.c, or1k-tdep.c,
1557 riscv-tdep.c, rl78-tdep.c, rs6000-tdep.c, rx-tdep.c, s12z-tdep.c,
1558 s390-tdep.c, score-tdep.c, sh-tdep.c, sparc-linux-tdep.c,
1559 sparc-tdep.c, sparc64-linux-tdep.c, sparc64-tdep.c, tic6x-tdep.c,
1560 tilegx-tdep.c, v850-tdep.c, xstormy16-tdep.c, xtensa-tdep.c:
1561 Update.
1562 * Makefile.in (COMMON_SFILES): Update.
1563 (HFILES_NO_SRCDIR): Update.
1564
1565 2020-02-08 Tom Tromey <tom@tromey.com>
1566
1567 * dwarf2read.c (struct die_reader_specs) <comp_dir>: Remove.
1568 (init_cu_die_reader, read_cutu_die_from_dwo): Update.
1569
1570 2020-02-08 Tom Tromey <tom@tromey.com>
1571
1572 * dwarf2read.h (struct die_info): Don't declare.
1573
1574 2020-02-08 Tom Tromey <tom@tromey.com>
1575
1576 * dwarf2read.h (die_info_ptr): Remove typedef.
1577
1578 2020-02-08 Tom Tromey <tom@tromey.com>
1579
1580 * dwarf2read.c (read_call_site_scope)
1581 (handle_data_member_location, dwarf2_add_member_fn)
1582 (mark_common_block_symbol_computed, read_common_block)
1583 (attr_to_dynamic_prop, partial_die_info::read)
1584 (var_decode_location, dwarf2_fetch_die_loc_sect_off)
1585 (dwarf2_symbol_mark_computed, set_die_type): Update.
1586 * dwarf2/attribute.h (struct attribute) <form_is_block>: Declare
1587 method.
1588 (attr_form_is_block): Don't declare.
1589 * dwarf2/attribute.c (attribute::form_is_block): Now a method.
1590
1591 2020-02-08 Tom Tromey <tom@tromey.com>
1592
1593 * dwarf2read.c (dwarf2_find_base_address, )
1594 (read_call_site_scope, rust_containing_type)
1595 (dwarf2_get_pc_bounds, dwarf2_record_block_ranges)
1596 (handle_data_member_location, dwarf2_add_member_fn)
1597 (get_alignment, read_structure_type, process_structure_scope)
1598 (mark_common_block_symbol_computed, read_common_block)
1599 (read_tag_string_type, attr_to_dynamic_prop, read_subrange_type)
1600 (partial_die_info::read, read_attribute_value, new_symbol)
1601 (lookup_die_type, dwarf2_get_ref_die_offset)
1602 (dwarf2_get_attr_constant_value, follow_die_ref_or_sig)
1603 (dwarf2_fetch_die_loc_sect_off, get_DW_AT_signature_type)
1604 (dwarf2_symbol_mark_computed): Update.
1605 * dwarf2/attribute.h (struct attribute) <value_as_address,
1606 form_is_section_offset, form_is_constant, form_is_ref>: Declare
1607 methods.
1608 (value_as_address, attr_form_is_section_offset)
1609 (attr_form_is_constant, attr_form_is_ref): Don't declare.
1610 * dwarf2/attribute.c (attribute::value_as_address)
1611 (attribute::form_is_section_offset, attribute::form_is_constant)
1612 (attribute::form_is_ref): Now methods.
1613
1614 2020-02-08 Tom Tromey <tom@tromey.com>
1615
1616 * dwarf2read.c (struct attribute, DW_STRING)
1617 (DW_STRING_IS_CANONICAL, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR)
1618 (DW_SIGNATURE, struct dwarf_block, attr_value_as_address)
1619 (attr_form_is_block, attr_form_is_section_offset)
1620 (attr_form_is_constant, attr_form_is_ref): Move.
1621 * dwarf2/attribute.h: New file.
1622 * dwarf2/attribute.c: New file, from dwarf2read.c.
1623 * Makefile.in (COMMON_SFILES): Add dwarf2/attribute.c.
1624
1625 2020-02-08 Tom Tromey <tom@tromey.com>
1626
1627 * dwarf2read.c (abbrev_table_up, struct abbrev_info)
1628 (struct attr_abbrev, ABBREV_HASH_SIZE, struct abbrev_table):
1629 Move.
1630 (read_cutu_die_from_dwo, build_type_psymtabs_1): Update.
1631 (abbrev_table::alloc_abbrev, abbrev_table::add_abbrev)
1632 (abbrev_table::lookup_abbrev, abbrev_table_read_table): Move to
1633 abbrev.c.
1634 * dwarf2/abbrev.h: New file.
1635 * dwarf2/abbrev.c: New file, from dwarf2read.c.
1636 * Makefile.in (COMMON_SFILES): Add dwarf2/abbrev.c.
1637
1638 2020-02-08 Tom Tromey <tom@tromey.com>
1639
1640 * dwarf2read.c (dwarf2_section_buffer_overflow_complaint)
1641 (dwarf2_section_size, dwarf2_get_section_info)
1642 (create_signatured_type_table_from_debug_names)
1643 (create_addrmap_from_aranges, read_debug_names_from_section)
1644 (get_gdb_index_contents_from_section, read_comp_unit_head)
1645 (error_check_comp_unit_head, read_abbrev_offset)
1646 (create_debug_type_hash_table, init_cu_die_reader)
1647 (read_cutu_die_from_dwo, dwarf2_build_psymtabs_hard)
1648 (read_comp_units_from_section, create_cus_hash_table)
1649 (create_dwp_hash_table, create_dwo_unit_in_dwp_v1)
1650 (create_dwp_v2_section, dwarf2_rnglists_process)
1651 (dwarf2_ranges_process, read_die_and_siblings, read_full_die)
1652 (abbrev_table_read_table, read_indirect_string_at_offset_from)
1653 (read_indirect_string_from_dwz, read_addr_index_1)
1654 (read_str_index, dwarf_decode_line_header, skip_form_bytes)
1655 (dwarf_decode_macro_bytes, dwarf_decode_macros)
1656 (fill_in_loclist_baton): Update.
1657 * dwarf2/section.h (struct dwarf2_section_info) <get_name,
1658 get_containing_section, get_bfd_owner, get_bfd_section,
1659 get_file_name, get_id, get_flags, empty, read>: Declare methods.
1660 (dwarf2_read_section, get_section_name, get_section_file_name)
1661 (get_containing_section, get_section_bfd_owner)
1662 (get_section_bfd_section, get_section_name, get_section_file_name)
1663 (get_section_id, get_section_flags, dwarf2_section_empty_p): Don't
1664 declare.
1665 * dwarf2/section.c (dwarf2_section_info::get_containing_section)
1666 (dwarf2_section_info::get_bfd_owner)
1667 (dwarf2_section_info::get_bfd_section)
1668 (dwarf2_section_info::get_name)
1669 (dwarf2_section_info::get_file_name, dwarf2_section_info::get_id)
1670 (dwarf2_section_info::get_flags, dwarf2_section_info::empty)
1671 (dwarf2_section_info::read): Now methods.
1672 * dwarf-index-write.c (class debug_names): Update.
1673
1674 2020-02-08 Tom Tromey <tom@tromey.com>
1675
1676 * dwarf2read.h (struct dwarf2_section_info, dwarf2_read_section):
1677 Move to dwarf2/section.h.
1678 * dwarf2read.c (get_containing_section, get_section_bfd_owner)
1679 (get_section_bfd_section, get_section_name)
1680 (get_section_file_name, get_section_id, get_section_flags)
1681 (dwarf2_section_empty_p, dwarf2_read_section): Moe to
1682 dwarf2/section.c.
1683 * dwarf2/section.h: New file.
1684 * dwarf2/section.c: New file, from dwarf2read.c.
1685 * Makefile.in (COMMON_SFILES): Add dwarf2/section.c.
1686
1687 2020-02-08 Tom Tromey <tom@tromey.com>
1688
1689 * dwarf2read.h (read_unsigned_leb128): Don't declare.
1690 * dwarf2read.c (read_1_byte, read_1_signed_byte, read_2_bytes)
1691 (read_2_signed_bytes, read_3_bytes, read_4_bytes)
1692 (read_4_signed_bytes, read_8_bytes): Move to dwarf2/leb.h.
1693 (read_unsigned_leb128, read_signed_leb128): Move to dwarf2/leb.c.
1694 * dwarf2/leb.h: New file, from dwarf2read.c.
1695 * dwarf2/leb.c: New file, from dwarf2read.c.
1696 * dwarf2-frame.c (read_1_byte, read_4_bytes, read_8_bytes):
1697 Remove.
1698 * Makefile.in (CONFIG_SRC_SUBDIR): Add dwarf2.
1699 (COMMON_SFILES): Add dwarf2/leb.c.
1700
1701 2020-02-08 Joel Brobecker <brobecker@adacore.com>
1702
1703 GDB 9.1 released.
1704
1705 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
1706
1707 PR gdb/25190:
1708 * gdb/remote-sim.c (gdb_os_write_stderr): Update.
1709 * gdb/remote.c (remote_console_output): Update.
1710 * gdb/ui-file.c (fputs_unfiltered): Rename to...
1711 (ui_file_puts): ...this.
1712 * gdb/ui-file.h (ui_file_puts): Add declaration.
1713 * gdb/utils.c (emit_style_escape): Update.
1714 (flush_wrap_buffer): Update.
1715 (fputs_maybe_filtered): Update.
1716 (fputs_unfiltered): Add function.
1717
1718 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
1719
1720 * gdb/event-loop.c (gdb_wait_for_event): Update.
1721 * gdb/printcmd.c (printf_command): Update.
1722 * gdb/remote-fileio.c (remote_fileio_func_write): Update.
1723 * gdb/remote-sim.c (gdb_os_flush_stdout): Update.
1724 (gdb_os_flush_stderr): Update.
1725 * gdb/remote.c (remote_console_output): Update.
1726 * gdb/ui-file.c (gdb_flush): Rename to...
1727 (ui_file_flush): ...this.
1728 (stderr_file::write): Update.
1729 (stderr_file::puts): Update.
1730 * gdb/ui-file.h (gdb_flush): Rename to...
1731 (ui_file_flush): ...this.
1732 * gdb/utils.c (gdb_flush): Add function.
1733 * gdb/utils.h (gdb_flush): Add declaration.
1734
1735 2020-02-07 Tom Tromey <tromey@adacore.com>
1736
1737 PR breakpoints/24915:
1738 * source.c (find_and_open_source): Do not check basenames_may_differ.
1739
1740 2020-02-07 Tom Tromey <tom@tromey.com>
1741
1742 * README: Update gdbserver documentation.
1743 * gdbserver: Move to top level.
1744 * configure.tgt (build_gdbserver): Remove.
1745 * configure.ac: Remove --enable-gdbserver.
1746 * configure: Rebuild.
1747 * Makefile.in (distclean): Don't mention gdbserver.
1748
1749 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
1750
1751 * source-cache.c (source_cache::ensure): Surround
1752 get_plain_source_lines with a try/catch.
1753 (source_cache::get_line_charpos): Get rid of try/catch
1754 and only check for the return value of "ensure".
1755 * tui/tui-source.c (tui_source_window::set_contents):
1756 Simplify "nlines" calculation.
1757
1758 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
1759
1760 * MAINTAINERS (Write After Approval): Add myself.
1761
1762 2020-02-05 Christian Biesinger <cbiesinger@google.com>
1763
1764 * sparc-nat.h (struct sparc_target) <xfer_partial>: Fix base class
1765 function call.
1766
1767 2020-02-05 Christian Biesinger <cbiesinger@google.com>
1768
1769 * ppc-nbsd-tdep.h: Fix macro name in #endif comment.
1770
1771 2020-02-05 Maciej W. Rozycki <macro@wdc.com>
1772
1773 * nat/riscv-linux-tdesc.h: New file.
1774 * nat/riscv-linux-tdesc.c: New file, taking code from...
1775 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
1776 ... here.
1777 * configure.nat <linux> <riscv*>: Add nat/riscv-linux-tdesc.o to
1778 NATDEPFILES.
1779
1780 2020-02-04 Andrew Burgess <andrew.burgess@embecosm.com>
1781
1782 * remote-sim.c (sim_inferior_data::sim_inferior_data): Assert that
1783 we don't set the fake simulator ptid to the null_ptid.
1784
1785 2020-02-03 Simon Marchi <simon.marchi@efficios.com>
1786
1787 * fork-child.c (gdb_startup_inferior): Use bool instead of int.
1788 * gdbthread.h (class thread_info) <resumed>: Likewise.
1789 * infrun.c (resume_1): Likewise.
1790 (proceed): Likewise.
1791 (infrun_thread_stop_requested): Likewise.
1792 (stop_all_threads): Likewise.
1793 (handle_inferior_event): Likewise.
1794 (restart_threads): Likewise.
1795 (finish_step_over): Likewise.
1796 (keep_going_stepped_thread): Likewise.
1797 * linux-nat.c (attach_proc_task_lwp_callback): Likewise.
1798 (linux_handle_extended_wait): Likewise.
1799 * record-btrace.c (get_thread_current_frame_id): Likewise.
1800 * record-full.c (record_full_wait_1): Likewise.
1801 * remote.c (remote_target::process_initial_stop_replies): Likewise.
1802 * target.c (target_resume): Likewise.
1803 * thread.c (set_running_thread): Likewise.
1804
1805 2020-02-03 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
1806
1807 * f-valprint.c (f77_print_array_1): Changed datatype of index
1808 variable to LONGEST from int to enable it to contain bound
1809 values correctly.
1810
1811 2020-02-03 Maciej W. Rozycki <macro@wdc.com>
1812
1813 * riscv-linux-nat.c [!NFPREG] (NFPREG): New macro.
1814 (supply_fpregset_regnum, fill_fpregset): Handle regset buffer
1815 offsets according to FLEN determined.
1816 (riscv_linux_nat_target::read_description): Determine FLEN
1817 dynamically.
1818 (riscv_linux_nat_target::fetch_registers): Size regset buffer
1819 according to FLEN determined.
1820 (riscv_linux_nat_target::store_registers): Likewise.
1821
1822 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
1823
1824 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
1825 when reg->group is empty and reggroup is not.
1826
1827 2020-01-31 Tom Tromey <tromey@adacore.com>
1828
1829 * ravenscar-thread.c (ravenscar_thread_target::mourn_inferior):
1830 Call beneath target's mourn_inferior after unpushing.
1831
1832 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
1833
1834 PR tui/9765
1835 * tui/tui-disasm.c (tui_find_disassembly_address): If we don't
1836 have enough lines to fill the screen, still return the lowest
1837 address we found.
1838
1839 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
1840
1841 * tui/tui-win.c (_initialize_tui_win): Update help text for '+',
1842 '-', '<', and '>' commands.
1843
1844 2020-01-29 Pedro Alves <palves@redhat.com>
1845 Sergio Durigan Junior <sergiodj@redhat.com>
1846
1847 * infcmd.c (construct_inferior_arguments): Assert that
1848 'argc' is greater than 0.
1849
1850 2020-01-29 Luis Machado <luis.machado@linaro.org>
1851
1852 * aarch64-tdep.c (BRK_INSN_MASK): Define to 0xffe0001f.
1853 (BRK_INSN_MASK): Define to 0xd4200000.
1854 (aarch64_program_breakpoint_here_p): New function.
1855 (aarch64_gdbarch_init): Set gdbarch_program_breakpoint_here_p hook.
1856 * arch-utils.c (default_program_breakpoint_here_p): Moved from
1857 breakpoint.c.
1858 * arch-utils.h (default_program_breakpoint_here_p): Moved from
1859 breakpoint.h
1860 * breakpoint.c (bp_loc_is_permanent): Changed return type to bool and
1861 call gdbarch_program_breakpoint_here_p.
1862 (program_breakpoint_here): Moved to arch-utils.c, renamed to
1863 default_program_breakpoint_here_p, changed return type to bool and
1864 simplified.
1865 * breakpoint.h (program_breakpoint_here): Moved prototype to
1866 arch-utils.h, renamed to default_program_breakpoint_here_p and changed
1867 return type to bool.
1868 * gdbarch.c: Regenerate.
1869 * gdbarch.h: Regenerate.
1870 * gdbarch.sh (program_breakpoint_here_p): New method.
1871 * infrun.c (handle_signal_stop): Call
1872 gdbarch_program_breakpoint_here_p.
1873
1874 2020-01-26 Tom Tromey <tom@tromey.com>
1875
1876 * ctfread.c (struct ctf_fp_info): Reindent.
1877 (_initialize_ctfread): Remove.
1878
1879 2020-01-26 Tom Tromey <tom@tromey.com>
1880
1881 * psymtab.c (partial_map_expand_apply)
1882 (psym_find_pc_sect_compunit_symtab, psym_lookup_symbol)
1883 (psymtab_to_symtab, psym_find_last_source_symtab, dump_psymtab)
1884 (psym_print_stats, psym_expand_symtabs_for_function)
1885 (psym_map_symbol_filenames, psym_map_matching_symbols)
1886 (psym_expand_symtabs_matching)
1887 (partial_symtab::read_dependencies, maintenance_info_psymtabs)
1888 (maintenance_check_psymtabs): Use new methods.
1889 * psympriv.h (struct partial_symtab) <readin_p,
1890 get_compunit_symtab>: New methods.
1891 <readin, compunit_symtab>: Remove members.
1892 (struct standard_psymtab): New.
1893 (struct legacy_psymtab): Derive from standard_psymtab.
1894 * dwarf2read.h (struct dwarf2_psymtab): Derive from
1895 standard_psymtab.
1896 * ctfread.c (struct ctf_psymtab): Derive from standard_psymtab.
1897
1898 2020-01-26 Tom Tromey <tom@tromey.com>
1899
1900 * xcoffread.c (xcoff_psymtab_to_symtab_1): Call
1901 read_dependencies. Add assert.
1902 * psymtab.c (partial_symtab::read_dependencies): New method.
1903 * psympriv.h (struct partial_symtab) <read_dependencies>: New
1904 method.
1905 * mdebugread.c (psymtab_to_symtab_1): Call read_dependencies.
1906 * dwarf2read.c (dwarf2_psymtab::expand_psymtab): Call
1907 read_dependencies.
1908 * dbxread.c (dbx_psymtab_to_symtab_1): Call read_dependencies.
1909 Add assert.
1910
1911 2020-01-26 Tom Tromey <tom@tromey.com>
1912
1913 * xcoffread.c (xcoff_psymtab_to_symtab_1): Change argument order.
1914 Call expand_psymtab.
1915 (xcoff_read_symtab): Call expand_psymtab.
1916 (xcoff_start_psymtab, xcoff_end_psymtab): Set
1917 legacy_expand_psymtab.
1918 * psympriv.h (struct partial_symtab) <expand_psymtab>: New
1919 method.
1920 (struct legacy_psymtab) <expand_psymtab>: Implement.
1921 <legacy_expand_psymtab>: New member.
1922 * mdebugread.c (mdebug_read_symtab): Call expand_psymtab.
1923 (parse_partial_symbols): Set legacy_expand_psymtab.
1924 (psymtab_to_symtab_1): Change argument order. Call
1925 expand_psymtab.
1926 (new_psymtab): Set legacy_expand_psymtab.
1927 * dwarf2read.h (struct dwarf2_psymtab) <expand_psymtab>: Declare.
1928 * dwarf2read.c (dwarf2_psymtab::read_symtab): Call
1929 expand_psymtab.
1930 (dwarf2_psymtab::expand_psymtab): Rename from
1931 psymtab_to_symtab_1. Call expand_psymtab.
1932 * dbxread.c (start_psymtab): Set legacy_expand_psymtab.
1933 (dbx_end_psymtab): Likewise.
1934 (dbx_psymtab_to_symtab_1): Change argument order. Call
1935 expand_psymtab.
1936 (dbx_read_symtab): Call expand_psymtab.
1937 * ctfread.c (struct ctf_psymtab) <expand_psymtab>: Declare.
1938 (ctf_psymtab::expand_psymtab): Rename from psymtab_to_symtab.
1939 (ctf_psymtab::read_symtab): Call expand_psymtab.
1940
1941 2020-01-26 Tom Tromey <tom@tromey.com>
1942
1943 * xcoffread.c (xcoff_read_symtab): Remove prints. Add assert.
1944 * psymtab.c (psymtab_to_symtab): Print verbose "Reading"
1945 messages.
1946 * mdebugread.c (mdebug_read_symtab): Remove prints.
1947 * dwarf2read.c (dwarf2_psymtab::read_symtab): Remove prints. Add
1948 assert.
1949 * dbxread.c (dbx_read_symtab): Remove prints. Add assert.
1950
1951 2020-01-26 Tom Tromey <tom@tromey.com>
1952
1953 * xcoffread.c (this_symtab_psymtab, read_xcoff_symtab)
1954 (xcoff_psymtab_to_symtab_1, xcoff_read_symtab)
1955 (xcoff_start_psymtab, xcoff_end_psymtab, scan_xcoff_symtab): Use
1956 legacy_symtab.
1957 * stabsread.h (dbx_end_psymtab): Use legacy_symtab.
1958 * psymtab.c (psymtab_to_symtab): Call method.
1959 (dump_psymtab): Update.
1960 * psympriv.h (struct partial_symtab): Add virtual destructor.
1961 <read_symtab>: New method.
1962 (struct legacy_symtab): New.
1963 * mdebugread.c (mdebug_read_symtab): Use legacy_psymtab.
1964 (struct pst_map) <pst>: Now a legacy_psymtab.
1965 (parse_procedure, parse_partial_symbols, psymtab_to_symtab_1)
1966 (new_psymtab): Use legacy_psymtab.
1967 * dwarf2read.h (struct dwarf2_psymtab): New.
1968 (struct dwarf2_per_cu_data) <psymtab>: Use it.
1969 * dwarf2read.c (dwarf2_create_include_psymtab)
1970 (dwarf2_build_include_psymtabs, create_type_unit_group)
1971 (create_partial_symtab, process_psymtab_comp_unit_reader)
1972 (build_type_psymtabs_reader, build_type_psymtab_dependencies)
1973 (set_partial_user): Use dwarf2_psymtab.
1974 (dwarf2_psymtab::read_symtab): Rename from dwarf2_read_symtab.
1975 (psymtab_to_symtab_1, process_full_comp_unit)
1976 (process_full_type_unit, dwarf2_ranges_read)
1977 (dwarf2_get_pc_bounds, psymtab_include_file_name)
1978 (dwarf_decode_lines): Use dwarf2_psymtab.
1979 * dwarf-index-write.c (psym_index_map): Use dwarf2_psymtab.
1980 (add_address_entry_worker, write_one_signatured_type)
1981 (recursively_count_psymbols, recursively_write_psymbols)
1982 (write_one_signatured_type, psyms_seen_size, write_gdbindex)
1983 (write_debug_names): Likewise.
1984 * dbxread.c (struct header_file_location): Take a legacy_psymtab.
1985 <pst>: Now a legacy_psymtab.
1986 (find_corresponding_bincl_psymtab): Return a legacy_psymtab.
1987 (read_dbx_symtab, start_psymtab, dbx_end_psymtab)
1988 (dbx_psymtab_to_symtab_1, read_ofile_symtab): Use legacy_psymtab.
1989 * ctfread.c (struct ctf_psymtab): New.
1990 (ctf_start_symtab, ctf_end_symtab, psymtab_to_symtab): Take a
1991 ctf_psymtab.
1992 (ctf_psymtab::read_symtab): Rename from ctf_read_symtab.
1993 (create_partial_symtab): Return a ctf_psymtab.
1994 (scan_partial_symbols): Update.
1995
1996 2020-01-26 Tom Tromey <tom@tromey.com>
1997
1998 * xcoffread.c (xcoff_start_psymtab): Use new.
1999 * psymtab.c (partial_symtab::partial_symtab): New constructor,
2000 renamed from start_psymtab_common.
2001 * psympriv.h (struct partial_symtab): Add new constructor.
2002 (start_psymtab_common): Don't declare.
2003 * mdebugread.c (parse_partial_symbols): Use new.
2004 * dwarf2read.c (create_partial_symtab): Use new.
2005 * dbxread.c (start_psymtab): Use new.
2006 * ctfread.c (create_partial_symtab): Use new.
2007
2008 2020-01-26 Tom Tromey <tom@tromey.com>
2009
2010 * xcoffread.c (xcoff_end_psymtab): Use new.
2011 * psymtab.c (start_psymtab_common): Use new.
2012 (partial_symtab::partial_symtab): Rename from allocate_psymtab.
2013 Update.
2014 * psympriv.h (struct partial_symtab): Add parameters to
2015 constructor. Don't inline.
2016 (allocate_psymtab): Don't declare.
2017 * mdebugread.c (new_psymtab): Use new.
2018 * dwarf2read.c (dwarf2_create_include_psymtab): Use new.
2019 * dbxread.c (dbx_end_psymtab): Use new.
2020
2021 2020-01-26 Tom Tromey <tom@tromey.com>
2022
2023 * psymtab.h (class psymtab_storage) <install_psymtab>: Rename from
2024 allocate_psymtab. Update documentation.
2025 * psymtab.c (psymtab_storage::install_psymtab): Rename from
2026 allocate_psymtab. Do not use new.
2027 (allocate_psymtab): Use new. Update.
2028
2029 2020-01-26 Tom Tromey <tom@tromey.com>
2030
2031 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2032 * psymtab.c (psym_print_stats): Update.
2033 * psympriv.h (struct partial_symtab) <readin,
2034 psymtabs_addrmap_supported, anonymous>: Now bool.
2035 * mdebugread.c (psymtab_to_symtab_1): Update.
2036 * dwarf2read.c (create_type_unit_group, create_partial_symtab)
2037 (build_type_psymtabs_reader, psymtab_to_symtab_1)
2038 (process_full_comp_unit, process_full_type_unit): Update.
2039 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
2040 * ctfread.c (psymtab_to_symtab): Update.
2041
2042 2020-01-26 Tom Tromey <tom@tromey.com>
2043
2044 * mdebugread.c (parse_partial_symbols): Use discard_psymtab.
2045 * psymtab.h (class psymtab_storage) <free_psymtabs>: Remove.
2046 * psymtab.c (psymtab_storage): Delete psymtabs.
2047 (psymtab_storage::allocate_psymtab): Use new.
2048 (psymtab_storage::discard_psymtab): Use delete.
2049 * psympriv.h (struct partial_symtab): Add constructor and
2050 initializers.
2051
2052 2020-01-26 Tom Tromey <tom@tromey.com>
2053
2054 * machoread.c: Do not include psympriv.h.
2055
2056 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2057
2058 * NEWS: Mention the new option and the set/show commands.
2059
2060 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2061
2062 * exec.c (exec_file_mismatch_names, exec_file_mismatch_mode)
2063 (show_exec_file_mismatch_command, set_exec_file_mismatch_command)
2064 (validate_exec_file): New variables, enums, functions.
2065 (exec_file_locate_attach, print_section_info): Style the filenames.
2066 (_initialize_exec): Install show_exec_file_mismatch_command and
2067 set_exec_file_mismatch_command.
2068 * gdbcore.h (validate_exec_file): Declare.
2069 * infcmd.c (attach_command): Call validate_exec_file.
2070 * remote.c ( remote_target::remote_add_inferior): Likewise.
2071
2072 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
2073
2074 * frame.c (find_frame_sal): Move call to get_next_frame into more
2075 inner scope.
2076 * inline-frame.c (inilne_state) <inline_state>: Update argument
2077 types.
2078 (inilne_state) <skipped_symbol>: Rename to...
2079 (inilne_state) <skipped_symbols>: ...this, and change to a vector.
2080 (skip_inline_frames): Build vector of skipped symbols and use this
2081 to reate the inline_state.
2082 (inline_skipped_symbol): Add a comment and some assertions, fetch
2083 skipped symbol from the list.
2084
2085 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
2086
2087 * buildsym.c (lte_is_less_than): Delete.
2088 (buildsym_compunit::end_symtab_with_blockvector): Create local
2089 lambda function to sort line table entries, and use
2090 std::stable_sort instead of std::sort.
2091 * symtab.c (find_pc_sect_line): Skip backward over end of sequence
2092 markers when looking for a previous line.
2093
2094 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
2095
2096 * dwarf2read.c (lnp_state_machine::record_line): Include
2097 end_sequence parameter in debug print out. Record the line if we
2098 are at an end_sequence marker even if it's not the start of a
2099 statement.
2100 * symmisc.c (maintenance_print_one_line_table): Print end of
2101 sequence markers with 'END' not '0'.
2102
2103 2020-01-24 Pedro Alves <palves@redhat.com>
2104
2105 PR gdb/25410
2106 * thread.c (scoped_restore_current_thread::restore): Use
2107 switch_to_inferior_no_thread.
2108 * exec.c: Include "progspace-and-thread.h".
2109 (add_target_sections, remove_target_sections):
2110 scoped_restore_current_pspace_and_thread instead of
2111 scoped_restore_current_thread.
2112 * infrun.c (handle_vfork_child_exec_or_exit): Assign the pspace
2113 and aspace to the inferior before calling clone_program_space.
2114 Remove stale comment.
2115
2116 2020-01-24 Christian Biesinger <cbiesinger@google.com>
2117
2118 * arm-nbsd-nat.c (arm_nbsd_nat_target::fetch_registers): Rename to...
2119 (arm_netbsd_nat_target::fetch_registers): ...this.
2120 (arm_nbsd_nat_target::store_registers): Rename to...
2121 (arm_netbsd_nat_target::store_registers): ...this.
2122
2123 2020-01-24 Christian Biesinger <cbiesinger@google.com>
2124
2125 * arm-nbsd-nat.c: Define _KERNTYPES to get the declaration of
2126 register_t.
2127
2128 2020-01-24 Christian Biesinger <cbiesinger@google.com>
2129
2130 * aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections):
2131 Update comment.
2132 * aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections):
2133 Likewise.
2134 * arm-fbsd-tdep.c (arm_fbsd_iterate_over_regset_sections): Likewise.
2135 * gdbcore.h (deprecated_add_core_fns): Update comment to point to
2136 the correct replacement (iterate_over_regset_sections).
2137 * riscv-fbsd-tdep.c (riscv_fbsd_iterate_over_regset_sections):
2138 Update comment.
2139
2140 2020-01-24 Graham Markall <graham.markall@embecosm.com>
2141
2142 PR gdb/23718
2143 * gdb/python/python.c (execute_gdb_command): Call
2144 async_enable_stdin in catch block.
2145
2146 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
2147
2148 * event-loop.c (start_event_loop): Wrap async_enable_stdin with
2149 SWITCH_THRU_ALL_UIS.
2150
2151 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
2152
2153 PR tui/9765
2154 * minsyms.c (lookup_minimal_symbol_by_pc_section): Update header
2155 comment, add extra parameter, and update to store previous symbol
2156 when appropriate.
2157 * minsyms.h (lookup_minimal_symbol_by_pc_section): Update comment,
2158 add extra parameter.
2159 * tui/tui-disasm.c (tui_disassemble): Update header comment,
2160 remove unneeded parameter, add try/catch around gdb_print_insn,
2161 rewrite to add items to asm_lines vector.
2162 (tui_find_backward_disassembly_start_address): New function.
2163 (tui_find_disassembly_address): Updated throughout.
2164 (tui_disasm_window::set_contents): Update for changes to
2165 tui_disassemble.
2166 (tui_disasm_window::do_scroll_vertical): No need to adjust the
2167 number of lines to scroll.
2168
2169 2020-01-23 Simon Marchi <simon.marchi@polymtl.ca>
2170
2171 * objfiles.h (ALL_OBJFILE_OSECTIONS): Move up.
2172 (SECT_OFF_DATA): Likewise.
2173 (SECT_OFF_RODATA): Likewise.
2174 (SECT_OFF_TEXT): Likewise.
2175 (SECT_OFF_BSS): Likewise.
2176 (struct objfile) <text_section_offset, data_section_offset>: New
2177 methods.
2178 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Use
2179 objfile::text_section_offset.
2180 * coff-pe-read.c (add_pe_forwarded_sym): Likewise.
2181 * coffread.c (coff_symtab_read): Likewise.
2182 (enter_linenos): Likewise.
2183 (process_coff_symbol): Likewise.
2184 * ctfread.c (get_objfile_text_range): Likewise.
2185 * dtrace-probe.c (dtrace_probe::get_relocated_address):
2186 Use objfile::data_section_offset.
2187 * dwarf2-frame.c (execute_cfa_program): Use
2188 objfile::text_section_offset.
2189 (dwarf2_frame_find_fde): Likewise.
2190 * dwarf2read.c (create_addrmap_from_index): Likewise.
2191 (create_addrmap_from_aranges): Likewise.
2192 (dw2_find_pc_sect_compunit_symtab): Likewise.
2193 (process_psymtab_comp_unit_reader): Likewise.
2194 (add_partial_symbol): Likewise.
2195 (add_partial_subprogram): Likewise.
2196 (process_full_comp_unit): Likewise.
2197 (read_file_scope): Likewise.
2198 (read_func_scope): Likewise.
2199 (read_lexical_block_scope): Likewise.
2200 (read_call_site_scope): Likewise.
2201 (dwarf2_rnglists_process): Likewise.
2202 (dwarf2_ranges_process): Likewise.
2203 (dwarf2_ranges_read): Likewise.
2204 (dwarf_decode_lines_1): Likewise.
2205 (new_symbol): Likewise.
2206 (dwarf2_fetch_die_loc_sect_off): Likewise.
2207 (dwarf2_per_cu_text_offset): Likewise.
2208 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Likewise.
2209 * hppa-tdep.c (read_unwind_info): Likewise.
2210 * ia64-tdep.c (ia64_find_unwind_table): Likewise.
2211 * psympriv.h (struct partial_symtab): Likewise.
2212 * psymtab.c (find_pc_sect_psymtab): Likewise.
2213 * solib-svr4.c (enable_break): Likewise.
2214 * stap-probe.c (relocate_address): Use
2215 objfile::data_section_offset.
2216 * xcoffread.c (enter_line_range): Use
2217 objfile::text_section_offset.
2218 (read_xcoff_symtab): Likewise.
2219
2220 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
2221
2222 * darwin-nat.c (darwin_nat_target::wait_1): Move `inf`
2223 declaration to narrower scopes.
2224
2225 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
2226
2227 * darwin-nat.h (struct darwin_exception_msg, enum
2228 darwin_msg_state, struct darwin_thread_info, darwin_thread_t):
2229 Move up.
2230 (class darwin_nat_target) <wait_1, check_new_threads,
2231 decode_exception_message, decode_message, stop_inferior,
2232 init_thread_list, ptrace_him, cancel_breakpoint>: Declare.
2233 * darwin-nat.c (darwin_check_new_threads): Rename to...
2234 (darwin_nat_target::check_new_threads): ... this.
2235 (darwin_suspend_inferior_it): Remove.
2236 (darwin_decode_exception_message): Rename to...
2237 (darwin_nat_target::decode_exception_message): ... this.
2238 (darwin_nat_target::resume): Pass target to find_inferior_ptid.
2239 (darwin_decode_message): Rename to...
2240 (darwin_nat_target::decode_message): ... this.
2241 (cancel_breakpoint): Rename to...
2242 (darwin_nat_target::cancel_breakpoint): ... this.
2243 (darwin_wait): Rename to...
2244 (darwin_nat_target::wait_1): ... this. Use range-based for loop
2245 instead of iterate_over_inferiors.
2246 (darwin_nat_target::wait): Call wait_1 instead of darwin_wait.
2247 (darwin_stop_inferior): Rename to...
2248 (darwin_nat_target::stop_inferior): ... this.
2249 (darwin_nat_target::kill): Call wait_1 instead of darwin_wait.
2250 (darwin_init_thread_list): Rename to...
2251 (darwin_nat_target::init_thread_list): ... this.
2252 (darwin_ptrace_him): Rename to...
2253 (darwin_nat_target::ptrace_him): ... this.
2254 (darwin_nat_target::create_inferior): Pass lambda function to
2255 fork_inferior.
2256 (darwin_nat_target::detach): Call stop_inferior instead of
2257 darwin_stop_inferior.
2258 * fork-inferior.h (fork_inferior): Change init_trace_fun
2259 parameter to gdb::function_view.
2260 * fork-inferior.c (fork_inferior): Likewise.
2261
2262 2020-01-23 Hannes Domani <ssbssa@yahoo.de>
2263
2264 * i386-cygwin-tdep.c (core_process_module_section): Update.
2265 * windows-nat.c (struct lm_info_windows): Add text_offset.
2266 (windows_xfer_shared_libraries): Update.
2267 * windows-tdep.c (windows_xfer_shared_library):
2268 Add text_offset_cached argument.
2269 * windows-tdep.h (windows_xfer_shared_library): Update.
2270
2271 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
2272
2273 * gdbarch.sh: Add declaration for _initialize_gdbarch.
2274
2275 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
2276
2277 * remote-sim.c (check_for_duplicate_sim_descriptor): Remove.
2278 (get_sim_inferior_data): Remove use of iterate_over_inferiors,
2279 replace with range-based for.
2280 (gdbsim_interrupt_inferior): Remove.
2281 (gdbsim_target::interrupt): Replace iterate_over_inferiors use
2282 with a range-based for. Inline code from
2283 gdbsim_interrupt_inferior.
2284
2285 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
2286
2287 * infrun.c (proceed): Fix indentation.
2288
2289 2020-01-21 Tom Tromey <tromey@adacore.com>
2290
2291 * source-cache.c (source_cache::ensure): Call ext_lang_colorize.
2292 * python/python.c (python_extension_ops): Update.
2293 (gdbpy_colorize): New function.
2294 * python/lib/gdb/__init__.py (colorize): New function.
2295 * extension.h (ext_lang_colorize): Declare.
2296 * extension.c (ext_lang_colorize): New function.
2297 * extension-priv.h (struct extension_language_ops) <colorize>: New
2298 member.
2299 * cli/cli-style.c (_initialize_cli_style): Update help text.
2300
2301 2020-01-21 Luis Machado <luis.machado@linaro.org>
2302
2303 * aarch64-tdep.c (struct aarch64_displaced_step_closure)
2304 <cond>: Change type to bool.
2305 (aarch64_displaced_step_b_cond): Update cond to use bool type.
2306 (aarch64_displaced_step_cb): Likewise.
2307 (aarch64_displaced_step_tb): Likewise.
2308
2309 2020-01-21 Luis Machado <luis.machado@linaro.org>
2310
2311 * aarch64-tdep.c (aarch64_displaced_step_fixup): Add more debugging
2312 output.
2313
2314 2020-01-21 Luis Machado <luis.machado@linaro.org>
2315
2316 * aarch64-tdep.c (struct aarch64_displaced_step_closure )
2317 <pc_adjust>: Adjust the documentation.
2318 (aarch64_displaced_step_fixup): Check if PC really moved before
2319 adjusting it.
2320
2321 2020-01-19 Tom Tromey <tom@tromey.com>
2322
2323 * disasm.c (~gdb_disassembler): New destructor.
2324 (gdb_buffered_insn_length): Call disassemble_free_target.
2325 * disasm.h (class gdb_disassembler): Declare destructor. Use
2326 DISABLE_COPY_AND_ASSIGN.
2327
2328 2020-01-19 Tom Tromey <tom@tromey.com>
2329
2330 * dwarf2read.c (abbrev_table_up): Move typedef earlier.
2331 (die_reader_func_ftype): Remove.
2332 (cutu_reader): New class.
2333 (dw2_get_file_names_reader): Remove "data" parameter.
2334 (dw2_get_file_names): Use cutu_reader.
2335 (create_debug_type_hash_table): Update.
2336 (read_cutu_die_from_dwo): Update comment.
2337 (lookup_dwo_unit): Add dwo_name parameter.
2338 (cutu_reader::init_tu_and_read_dwo_dies): Now a method. Remove
2339 die_reader_func_ftype and data parameters.
2340 (cutu_reader::cutu_reader): Rename from init_cutu_and_read_dies.
2341 Remove die_reader_func_ftype and data parameters.
2342 (~cutu_reader): New; from init_cutu_and_read_dies.
2343 (cutu_reader::cutu_reader): Rename from
2344 init_cutu_and_read_dies_no_follow. Remove die_reader_func_ftype
2345 and data parameters.
2346 (init_cutu_and_read_dies_simple): Remove.
2347 (struct process_psymtab_comp_unit_data): Remove.
2348 (process_psymtab_comp_unit_reader): Remove data parameter; add
2349 want_partial_unit and pretend_language parameters.
2350 (process_psymtab_comp_unit): Use cutu_reader.
2351 (build_type_psymtabs_reader): Remove data parameter.
2352 (build_type_psymtabs_1): Use cutu_reader.
2353 (process_skeletonless_type_unit): Likewise.
2354 (load_partial_comp_unit_reader): Remove.
2355 (load_partial_comp_unit): Use cutu_reader.
2356 (load_full_comp_unit_reader): Remove.
2357 (load_full_comp_unit): Use cutu_reader.
2358 (struct create_dwo_cu_data): Remove.
2359 (create_dwo_cu_reader): Remove datap parameter; add dwo_file and
2360 dwo_unit parameters.
2361 (create_cus_hash_table): Use cutu_reader.
2362 (struct dwarf2_read_addr_index_data): Remove.
2363 (dwarf2_read_addr_index_reader): Remove.
2364 (dwarf2_read_addr_index): Use cutu_reader.
2365 (read_signatured_type_reader): Remove.
2366 (read_signatured_type): Use cutu_reader.
2367
2368 2020-01-19 Tom Tromey <tom@tromey.com>
2369
2370 * tui/tui.c (tui_show_assembly): Use tui_suppress_output.
2371 * tui/tui-wingeneral.h (class tui_suppress_output): New.
2372 (tui_wrefresh): Declare.
2373 * tui/tui-wingeneral.c (suppress_output): New global.
2374 (tui_suppress_output, ~tui_suppress_output): New constructor and
2375 destructor.
2376 (tui_wrefresh): New function.
2377 (tui_gen_win_info::refresh_window): Use tui_wrefresh.
2378 (tui_gen_win_info::make_window): Call wnoutrefresh when needed.
2379 * tui/tui-regs.h (struct tui_data_window) <no_refresh>: Declare
2380 method.
2381 * tui/tui-regs.c (tui_data_window::erase_data_content): Call
2382 tui_wrefresh.
2383 (tui_data_window::no_refresh): New method.
2384 (tui_data_item_window::refresh_window): Call tui_wrefresh.
2385 (tui_reg_command): Use tui_suppress_output
2386 * tui/tui-layout.c (tui_set_layout): Use tui_suppress_output.
2387 * tui/tui-data.h (struct tui_gen_win_info) <no_refresh>: New
2388 method.
2389 * tui/tui-command.c (tui_refresh_cmd_win): Call tui_wrefresh.
2390
2391 2020-01-19 Tom Tromey <tom@tromey.com>
2392
2393 * tui/tui-winsource.c (tui_update_source_windows_with_line):
2394 Handle case where symtab is null.
2395
2396 2020-01-19 Simon Marchi <simon.marchi@polymtl.ca>
2397
2398 * linux-fork.c (one_fork_p): Simplify.
2399
2400 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
2401
2402 * top.c (struct qt_args): Remove.
2403 (kill_or_detach): Change return type to void, replace `void *`
2404 parameter with a proper one.
2405 (print_inferior_quit_action): Likewise.
2406 (quit_confirm): Use range-based for loop to iterate over inferiors.
2407 (quit_force): Likewise.
2408
2409 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
2410
2411 * mi/mi-main.c (run_one_inferior): Change return type to void, replace
2412 `void *` parameter with proper parameters.
2413 (mi_cmd_exec_run): Use range-based loop to iterate over inferiors.
2414 (print_one_inferior): Change return type to void, replace `void *`
2415 parameter with proper parameters.
2416 (mi_cmd_list_thread_groups): Use range-based loop to iterate over
2417 inferiors.
2418 (get_other_inferior): Remove.
2419 (mi_cmd_remove_inferior): Use range-based loop to iterate over
2420 inferiors.
2421
2422 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
2423
2424 * mi/mi-interp.c (report_initial_inferior): Remove.
2425 (mi_interp::init): Use range-based for to iterate over inferiors.
2426
2427 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
2428
2429 * python/py-inferior.c (build_inferior_list): Remove.
2430 (gdbpy_ref): Use range-based for loop to iterate over inferiors.
2431
2432 2020-01-16 Christian Biesinger <cbiesinger@google.com>
2433
2434 * btrace.c (btrace_compute_ftrace_1): Fix spelling error (Unkown).
2435 (btrace_stitch_trace): Likewise.
2436 * charset.c (intermediate_encoding): Likewise (vaild).
2437 * nat/linux-btrace.c (linux_read_pt): Likewise (Unkown).
2438 * python/py-record-btrace.c (struct PyMethodDef): Likewise (occurences).
2439 * record-btrace.c (record_btrace_print_conf): Likewise (unkown).
2440
2441 2020-01-16 Hannes Domani <ssbssa@yahoo.de>
2442
2443 * windows-tdep.c (windows_get_tlb_type):
2444 Add rtl_user_process_parameters type.
2445
2446 2020-01-16 Pedro Alves <palves@redhat.com>
2447 Norbert Lange <nolange79@gmail.com>
2448
2449 PR build/24805
2450 * gdbsupport/gdb_proc_service.h (PS_EXPORT): New.
2451 (ps_get_thread_area, ps_getpid, ps_lcontinue, ps_lgetfpregs)
2452 (ps_lgetregs, ps_lsetfpregs, ps_lsetregs, ps_lstop, ps_pcontinue)
2453 (ps_pdread, ps_pdwrite, ps_pglobal_lookup, ps_pstop, ps_ptread)
2454 (ps_ptwrite, ps_lgetxregs, ps_lgetxregsize, ps_lsetxregs)
2455 (ps_plog): Redeclare exported functions with default visibility.
2456
2457 2020-01-16 Nitika Achra <Nitika.Achra@amd.com>
2458
2459 * dwarf2loc.c (decode_debug_loclists_addresses): Handle
2460 DW_LLE_base_addressx, DW_LLE_startx_length, DW_LLE_start_length.
2461
2462 2020-01-15 Simon Marchi <simon.marchi@efficios.com>
2463
2464 * infcmd.c (post_create_inferior): Use get_thread_regcache
2465 instead of get_current_regcache.
2466
2467 2020-01-14 Tom Tromey <tom@tromey.com>
2468
2469 PR symtab/12535:
2470 * python/python.c (gdbpy_decode_line): Treat empty string the same
2471 as no argument.
2472
2473 2020-01-14 Tom Tromey <tom@tromey.com>
2474
2475 * Makefile.in (CLIBS): Remove second use of $(LIBIBERTY).
2476
2477 2020-01-14 Tom Tromey <tom@tromey.com>
2478
2479 * nat/linux-btrace.c: Don't include <config.h>.
2480 * nat/linux-ptrace.c: Don't include <config.h>.
2481 * nat/x86-linux-dregs.c: Don't include <config.h>.
2482
2483 2020-01-14 Tom Tromey <tom@tromey.com>
2484
2485 * configure: Rebuild.
2486 * configure.ac: Move many checks to ../gdbsupport/common.m4.
2487
2488 2020-01-14 Tom Tromey <tom@tromey.com>
2489
2490 * nat/x86-linux-dregs.c: Include configh.h.
2491 * nat/linux-ptrace.c: Include configh.h.
2492 * nat/linux-btrace.c: Include configh.h.
2493 * defs.h: Include config.h, bfd.h.
2494 * configure.ac: Don't source common.host.
2495 (CONFIG_OBS, CONFIG_SRCS): Remove gdbsupport files.
2496 * configure: Rebuild.
2497 * acinclude.m4: Update path.
2498 * Makefile.in (SUPPORT, LIBSUPPORT, INCSUPPORT): New variables.
2499 (CONFIG_SRC_SUBDIR): Remove gdbsupport.
2500 (INTERNAL_CFLAGS_BASE): Add INCSUPPORT.
2501 (CLIBS): Add LIBSUPPORT.
2502 (CDEPS): Likewise.
2503 (COMMON_SFILES): Remove gdbsupport files.
2504 (HFILES_NO_SRCDIR): Likewise.
2505 (stamp-version): Update path to create-version.sh.
2506 (ALLDEPFILES): Remove gdbsupport files.
2507
2508 2020-01-14 Tom Tromey <tom@tromey.com>
2509
2510 * gdbsupport/common.m4 (GDB_AC_COMMON): Define WIN32APILIBS and
2511 USE_WIN32API when needed.
2512 * configure.ac (USE_WIN32API): Don't define.
2513 (WIN32LIBS): Use WIN32APILIBS.
2514 * configure: Rebuild.
2515
2516 2020-01-14 Tom Tromey <tom@tromey.com>
2517
2518 * configure: Rebuild.
2519 * gdbsupport/common.m4 (GDB_AC_COMMON): Fix indentation.
2520
2521 2020-01-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2522
2523 * skip.c (skip_function_command): Make skip w/o arguments use the
2524 name of the inlined function if pc is inside any inlined function.
2525
2526 2020-01-14 Luis Machado <luis.machado@linaro.org>
2527
2528 * inf-ptrace.c (inf_ptrace_target::resume): Update comments.
2529 * infrun.c (resume_1): Likewise.
2530 (handle_inferior_event): Remove stale comment.
2531 * linux-nat.c (linux_nat_target::resume): Update comments.
2532 (save_stop_reason): Likewise.
2533 (linux_nat_filter_event): Likewise.
2534 * linux-nat.h (struct lwp_info) <stop_pc>, <stop_reason>: Likewise.
2535
2536 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
2537
2538 * elfread.c (record_minimal_symbol): Set section index to 0 for
2539 non-allocatable sections.
2540
2541
2542 2020-01-13 Ali Tamur <tamur@google.com>
2543
2544 * dwarf2read.c (dwarf2_debug_sections): Add debug_str_offsets sections.
2545 (dwarf2_cu): Add str_offsets_base field. Change the type of addr_base
2546 to gdb::optional. Update comments.
2547 (dwo_file): Update comments.
2548 (read_attribute): Update API to take an additional out parameter,
2549 need_reprocess. This is used to mark attributes that need other
2550 attributes (e.g. str_offsets_base) for correct computation which may not
2551 have been read yet.
2552 (read_attribute_reprocess): New function declaration.
2553 (read_addr_index): Likewise.
2554 (read_dwo_str_index): Likewise.
2555 (read_stub_str_index): Likewise.
2556 (dwarf2_per_objfile::locate_sections): Handle debug_str_offsets section.
2557 (lookup_addr_base): New function definition.
2558 (lookup_ranges_base): Likewise.
2559 (read_cutu_die_from_dwo): Use the new functions: lookup_addr_base,
2560 lookup_ranges_base.
2561 (init_cutu_and_read_dies): Update comments.
2562 (init_cutu_and_read_dies_no_follow): Change API to take parent compile
2563 unit. This is used to inherit parent's str_offsets_base and addr_base.
2564 Update comments.
2565 (init_cutu_and_read_dies_simple): Reflect API changes.
2566 (skip_one_die): Reflect API changes. Handle DW_FORM_rnglistx.
2567 (create_cus_hash_table): Change API to take parent compile unit.
2568 Reflect API changes.
2569 (open_and_init_dwo_file): Reflect API changes.
2570 (dwarf2_get_pc_bounds): Update comments.
2571 (dwarf2_record_block_ranges): Likewise.
2572 (read_full_die_1): Change implementation to reprocess attributes that
2573 need str_offsets_base and addr_base.
2574 (partial_die_info::read): Likewise.
2575 (read_attribute_reprocess): New function definition.
2576 (read_attribute_value): Change API to take an additional out parameter,
2577 need_reprocess. Handle DW_FORM_rnglistx. No longer trigger an error
2578 when a non-dwo compile unit has index based attributes.
2579 (read_attribute): Reflect API changes.
2580 (read_addr_index_1): Reflect API changes. Update comments.
2581 (dwarf2_read_addr_index_data): Reflect API changes.
2582 (dwarf2_read_addr_index): Likewise.
2583 (read_str_index): Change API and implementation. This becomes a helper
2584 to be used by the new string index related methods. Update error
2585 message and comments.
2586 (read_dwo_str_index): New function definition.
2587 (read_stub_str_index): Likewise.
2588 * dwarf2read.h (dwarf2_per_objfile): Add str_offsets field.
2589 * symfile.h (dwarf2_debug_sections): Likewise.
2590 * xcoffread.c (dwarf2_debug_sections): Likewise.
2591
2592 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2593
2594 * gdbcore.h (struct core_fns) <core_read_registers>: Change
2595 core_reg_sect type to gdb_byte *.
2596 * arm-nbsd-nat.c (fetch_elfcore_registers): Likewise.
2597 * cris-tdep.c (fetch_core_registers): Likewise.
2598 * corelow.c (core_target::get_core_register_section): Change
2599 type of `contents` to gdb::byte_vector.
2600
2601 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
2602
2603 * tui/tui-wingeneral.c (box_win): Position the title in the center
2604 of the border.
2605
2606 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
2607
2608 * corelow.c (core_target::get_core_register_section): Use
2609 std::vector instead of alloca.
2610
2611 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2612
2613 * warning.m4: Add -Wmissing-declarations to build_warnings.
2614 * configure: Re-generate.
2615
2616 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2617
2618 * python/python.c (init__gdb_module): Add declaration.
2619
2620 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2621
2622 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Add declaration.
2623 * aarch64-fbsd-tdep.c (_initialize_aarch64_fbsd_tdep): Add declaration.
2624 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Add declaration.
2625 * aarch64-linux-tdep.c (_initialize_aarch64_linux_tdep): Add declaration.
2626 * aarch64-newlib-tdep.c (_initialize_aarch64_newlib_tdep): Add declaration.
2627 * aarch64-tdep.c (_initialize_aarch64_tdep): Add declaration.
2628 * ada-exp.y (_initialize_ada_exp): Add declaration.
2629 * ada-lang.c (_initialize_ada_language): Add declaration.
2630 * ada-tasks.c (_initialize_tasks): Add declaration.
2631 * agent.c (_initialize_agent): Add declaration.
2632 * aix-thread.c (_initialize_aix_thread): Add declaration.
2633 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Add declaration.
2634 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Add declaration.
2635 * alpha-linux-tdep.c (_initialize_alpha_linux_tdep): Add declaration.
2636 * alpha-nbsd-tdep.c (_initialize_alphanbsd_tdep): Add declaration.
2637 * alpha-obsd-tdep.c (_initialize_alphaobsd_tdep): Add declaration.
2638 * alpha-tdep.c (_initialize_alpha_tdep): Add declaration.
2639 * amd64-darwin-tdep.c (_initialize_amd64_darwin_tdep): Add declaration.
2640 * amd64-dicos-tdep.c (_initialize_amd64_dicos_tdep): Add declaration.
2641 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Add declaration.
2642 * amd64-fbsd-tdep.c (_initialize_amd64fbsd_tdep): Add declaration.
2643 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Add declaration.
2644 * amd64-linux-tdep.c (_initialize_amd64_linux_tdep): Add declaration.
2645 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Add declaration.
2646 * amd64-nbsd-tdep.c (_initialize_amd64nbsd_tdep): Add declaration.
2647 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Add declaration.
2648 * amd64-obsd-tdep.c (_initialize_amd64obsd_tdep): Add declaration.
2649 * amd64-sol2-tdep.c (_initialize_amd64_sol2_tdep): Add declaration.
2650 * amd64-tdep.c (_initialize_amd64_tdep): Add declaration.
2651 * amd64-windows-nat.c (_initialize_amd64_windows_nat): Add declaration.
2652 * amd64-windows-tdep.c (_initialize_amd64_windows_tdep): Add declaration.
2653 * annotate.c (_initialize_annotate): Add declaration.
2654 * arc-newlib-tdep.c (_initialize_arc_newlib_tdep): Add declaration.
2655 * arc-tdep.c (_initialize_arc_tdep): Add declaration.
2656 * arch-utils.c (_initialize_gdbarch_utils): Add declaration.
2657 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Add declaration.
2658 * arm-fbsd-tdep.c (_initialize_arm_fbsd_tdep): Add declaration.
2659 * arm-linux-nat.c (_initialize_arm_linux_nat): Add declaration.
2660 * arm-linux-tdep.c (_initialize_arm_linux_tdep): Add declaration.
2661 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Add declaration.
2662 * arm-nbsd-tdep.c (_initialize_arm_netbsd_tdep): Add declaration.
2663 * arm-obsd-tdep.c (_initialize_armobsd_tdep): Add declaration.
2664 * arm-pikeos-tdep.c (_initialize_arm_pikeos_tdep): Add declaration.
2665 * arm-symbian-tdep.c (_initialize_arm_symbian_tdep): Add declaration.
2666 * arm-tdep.c (_initialize_arm_tdep): Add declaration.
2667 * arm-wince-tdep.c (_initialize_arm_wince_tdep): Add declaration.
2668 * auto-load.c (_initialize_auto_load): Add declaration.
2669 * auxv.c (_initialize_auxv): Add declaration.
2670 * avr-tdep.c (_initialize_avr_tdep): Add declaration.
2671 * ax-gdb.c (_initialize_ax_gdb): Add declaration.
2672 * bfin-linux-tdep.c (_initialize_bfin_linux_tdep): Add declaration.
2673 * bfin-tdep.c (_initialize_bfin_tdep): Add declaration.
2674 * break-catch-sig.c (_initialize_break_catch_sig): Add declaration.
2675 * break-catch-syscall.c (_initialize_break_catch_syscall): Add declaration.
2676 * break-catch-throw.c (_initialize_break_catch_throw): Add declaration.
2677 * breakpoint.c (_initialize_breakpoint): Add declaration.
2678 * bsd-uthread.c (_initialize_bsd_uthread): Add declaration.
2679 * btrace.c (_initialize_btrace): Add declaration.
2680 * charset.c (_initialize_charset): Add declaration.
2681 * cli/cli-cmds.c (_initialize_cli_cmds): Add declaration.
2682 * cli/cli-dump.c (_initialize_cli_dump): Add declaration.
2683 * cli/cli-interp.c (_initialize_cli_interp): Add declaration.
2684 * cli/cli-logging.c (_initialize_cli_logging): Add declaration.
2685 * cli/cli-script.c (_initialize_cli_script): Add declaration.
2686 * cli/cli-style.c (_initialize_cli_style): Add declaration.
2687 * coff-pe-read.c (_initialize_coff_pe_read): Add declaration.
2688 * coffread.c (_initialize_coffread): Add declaration.
2689 * compile/compile-cplus-types.c (_initialize_compile_cplus_types): Add declaration.
2690 * compile/compile.c (_initialize_compile): Add declaration.
2691 * complaints.c (_initialize_complaints): Add declaration.
2692 * completer.c (_initialize_completer): Add declaration.
2693 * copying.c (_initialize_copying): Add declaration.
2694 * corefile.c (_initialize_core): Add declaration.
2695 * corelow.c (_initialize_corelow): Add declaration.
2696 * cp-abi.c (_initialize_cp_abi): Add declaration.
2697 * cp-namespace.c (_initialize_cp_namespace): Add declaration.
2698 * cp-support.c (_initialize_cp_support): Add declaration.
2699 * cp-valprint.c (_initialize_cp_valprint): Add declaration.
2700 * cris-linux-tdep.c (_initialize_cris_linux_tdep): Add declaration.
2701 * cris-tdep.c (_initialize_cris_tdep): Add declaration.
2702 * csky-linux-tdep.c (_initialize_csky_linux_tdep): Add declaration.
2703 * csky-tdep.c (_initialize_csky_tdep): Add declaration.
2704 * ctfread.c (_initialize_ctfread): Add declaration.
2705 * d-lang.c (_initialize_d_language): Add declaration.
2706 * darwin-nat-info.c (_initialize_darwin_info_commands): Add declaration.
2707 * darwin-nat.c (_initialize_darwin_nat): Add declaration.
2708 * dbxread.c (_initialize_dbxread): Add declaration.
2709 * dcache.c (_initialize_dcache): Add declaration.
2710 * disasm-selftests.c (_initialize_disasm_selftests): Add declaration.
2711 * disasm.c (_initialize_disasm): Add declaration.
2712 * dtrace-probe.c (_initialize_dtrace_probe): Add declaration.
2713 * dummy-frame.c (_initialize_dummy_frame): Add declaration.
2714 * dwarf-index-cache.c (_initialize_index_cache): Add declaration.
2715 * dwarf-index-write.c (_initialize_dwarf_index_write): Add declaration.
2716 * dwarf2-frame-tailcall.c (_initialize_tailcall_frame): Add declaration.
2717 * dwarf2-frame.c (_initialize_dwarf2_frame): Add declaration.
2718 * dwarf2expr.c (_initialize_dwarf2expr): Add declaration.
2719 * dwarf2loc.c (_initialize_dwarf2loc): Add declaration.
2720 * dwarf2read.c (_initialize_dwarf2_read): Add declaration.
2721 * elfread.c (_initialize_elfread): Add declaration.
2722 * exec.c (_initialize_exec): Add declaration.
2723 * extension.c (_initialize_extension): Add declaration.
2724 * f-lang.c (_initialize_f_language): Add declaration.
2725 * f-valprint.c (_initialize_f_valprint): Add declaration.
2726 * fbsd-nat.c (_initialize_fbsd_nat): Add declaration.
2727 * fbsd-tdep.c (_initialize_fbsd_tdep): Add declaration.
2728 * filesystem.c (_initialize_filesystem): Add declaration.
2729 * findcmd.c (_initialize_mem_search): Add declaration.
2730 * findvar.c (_initialize_findvar): Add declaration.
2731 * fork-child.c (_initialize_fork_child): Add declaration.
2732 * frame-base.c (_initialize_frame_base): Add declaration.
2733 * frame-unwind.c (_initialize_frame_unwind): Add declaration.
2734 * frame.c (_initialize_frame): Add declaration.
2735 * frv-linux-tdep.c (_initialize_frv_linux_tdep): Add declaration.
2736 * frv-tdep.c (_initialize_frv_tdep): Add declaration.
2737 * ft32-tdep.c (_initialize_ft32_tdep): Add declaration.
2738 * gcore.c (_initialize_gcore): Add declaration.
2739 * gdb-demangle.c (_initialize_gdb_demangle): Add declaration.
2740 * gdb_bfd.c (_initialize_gdb_bfd): Add declaration.
2741 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Add declaration.
2742 * gdbarch.c (_initialize_gdbarch): Add declaration.
2743 * gdbtypes.c (_initialize_gdbtypes): Add declaration.
2744 * gnu-nat.c (_initialize_gnu_nat): Add declaration.
2745 * gnu-v2-abi.c (_initialize_gnu_v2_abi): Add declaration.
2746 * gnu-v3-abi.c (_initialize_gnu_v3_abi): Add declaration.
2747 * go-lang.c (_initialize_go_language): Add declaration.
2748 * go32-nat.c (_initialize_go32_nat): Add declaration.
2749 * guile/guile.c (_initialize_guile): Add declaration.
2750 * h8300-tdep.c (_initialize_h8300_tdep): Add declaration.
2751 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Add declaration.
2752 * hppa-linux-tdep.c (_initialize_hppa_linux_tdep): Add declaration.
2753 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Add declaration.
2754 * hppa-nbsd-tdep.c (_initialize_hppanbsd_tdep): Add declaration.
2755 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Add declaration.
2756 * hppa-obsd-tdep.c (_initialize_hppabsd_tdep): Add declaration.
2757 * hppa-tdep.c (_initialize_hppa_tdep): Add declaration.
2758 * i386-bsd-nat.c (_initialize_i386bsd_nat): Add declaration.
2759 * i386-cygwin-tdep.c (_initialize_i386_cygwin_tdep): Add declaration.
2760 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Add declaration.
2761 * i386-darwin-tdep.c (_initialize_i386_darwin_tdep): Add declaration.
2762 * i386-dicos-tdep.c (_initialize_i386_dicos_tdep): Add declaration.
2763 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Add declaration.
2764 * i386-fbsd-tdep.c (_initialize_i386fbsd_tdep): Add declaration.
2765 * i386-gnu-nat.c (_initialize_i386gnu_nat): Add declaration.
2766 * i386-gnu-tdep.c (_initialize_i386gnu_tdep): Add declaration.
2767 * i386-go32-tdep.c (_initialize_i386_go32_tdep): Add declaration.
2768 * i386-linux-nat.c (_initialize_i386_linux_nat): Add declaration.
2769 * i386-linux-tdep.c (_initialize_i386_linux_tdep): Add declaration.
2770 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Add declaration.
2771 * i386-nbsd-tdep.c (_initialize_i386nbsd_tdep): Add declaration.
2772 * i386-nto-tdep.c (_initialize_i386nto_tdep): Add declaration.
2773 * i386-obsd-nat.c (_initialize_i386obsd_nat): Add declaration.
2774 * i386-obsd-tdep.c (_initialize_i386obsd_tdep): Add declaration.
2775 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Add declaration.
2776 * i386-sol2-tdep.c (_initialize_i386_sol2_tdep): Add declaration.
2777 * i386-tdep.c (_initialize_i386_tdep): Add declaration.
2778 * i386-windows-nat.c (_initialize_i386_windows_nat): Add declaration.
2779 * ia64-libunwind-tdep.c (_initialize_libunwind_frame): Add declaration.
2780 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Add declaration.
2781 * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Add declaration.
2782 * ia64-tdep.c (_initialize_ia64_tdep): Add declaration.
2783 * ia64-vms-tdep.c (_initialize_ia64_vms_tdep): Add declaration.
2784 * infcall.c (_initialize_infcall): Add declaration.
2785 * infcmd.c (_initialize_infcmd): Add declaration.
2786 * inflow.c (_initialize_inflow): Add declaration.
2787 * infrun.c (_initialize_infrun): Add declaration.
2788 * interps.c (_initialize_interpreter): Add declaration.
2789 * iq2000-tdep.c (_initialize_iq2000_tdep): Add declaration.
2790 * jit.c (_initialize_jit): Add declaration.
2791 * language.c (_initialize_language): Add declaration.
2792 * linux-fork.c (_initialize_linux_fork): Add declaration.
2793 * linux-nat.c (_initialize_linux_nat): Add declaration.
2794 * linux-tdep.c (_initialize_linux_tdep): Add declaration.
2795 * linux-thread-db.c (_initialize_thread_db): Add declaration.
2796 * lm32-tdep.c (_initialize_lm32_tdep): Add declaration.
2797 * m2-lang.c (_initialize_m2_language): Add declaration.
2798 * m32c-tdep.c (_initialize_m32c_tdep): Add declaration.
2799 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Add declaration.
2800 * m32r-linux-tdep.c (_initialize_m32r_linux_tdep): Add declaration.
2801 * m32r-tdep.c (_initialize_m32r_tdep): Add declaration.
2802 * m68hc11-tdep.c (_initialize_m68hc11_tdep): Add declaration.
2803 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Add declaration.
2804 * m68k-bsd-tdep.c (_initialize_m68kbsd_tdep): Add declaration.
2805 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Add declaration.
2806 * m68k-linux-tdep.c (_initialize_m68k_linux_tdep): Add declaration.
2807 * m68k-tdep.c (_initialize_m68k_tdep): Add declaration.
2808 * machoread.c (_initialize_machoread): Add declaration.
2809 * macrocmd.c (_initialize_macrocmd): Add declaration.
2810 * macroscope.c (_initialize_macroscope): Add declaration.
2811 * maint-test-options.c (_initialize_maint_test_options): Add declaration.
2812 * maint-test-settings.c (_initialize_maint_test_settings): Add declaration.
2813 * maint.c (_initialize_maint_cmds): Add declaration.
2814 * mdebugread.c (_initialize_mdebugread): Add declaration.
2815 * memattr.c (_initialize_mem): Add declaration.
2816 * mep-tdep.c (_initialize_mep_tdep): Add declaration.
2817 * mi/mi-cmd-env.c (_initialize_mi_cmd_env): Add declaration.
2818 * mi/mi-cmds.c (_initialize_mi_cmds): Add declaration.
2819 * mi/mi-interp.c (_initialize_mi_interp): Add declaration.
2820 * mi/mi-main.c (_initialize_mi_main): Add declaration.
2821 * microblaze-linux-tdep.c (_initialize_microblaze_linux_tdep): Add declaration.
2822 * microblaze-tdep.c (_initialize_microblaze_tdep): Add declaration.
2823 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Add declaration.
2824 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Add declaration.
2825 * mips-linux-nat.c (_initialize_mips_linux_nat): Add declaration.
2826 * mips-linux-tdep.c (_initialize_mips_linux_tdep): Add declaration.
2827 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Add declaration.
2828 * mips-nbsd-tdep.c (_initialize_mipsnbsd_tdep): Add declaration.
2829 * mips-sde-tdep.c (_initialize_mips_sde_tdep): Add declaration.
2830 * mips-tdep.c (_initialize_mips_tdep): Add declaration.
2831 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Add declaration.
2832 * mips64-obsd-tdep.c (_initialize_mips64obsd_tdep): Add declaration.
2833 * mipsread.c (_initialize_mipsread): Add declaration.
2834 * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Add declaration.
2835 * mn10300-tdep.c (_initialize_mn10300_tdep): Add declaration.
2836 * moxie-tdep.c (_initialize_moxie_tdep): Add declaration.
2837 * msp430-tdep.c (_initialize_msp430_tdep): Add declaration.
2838 * nds32-tdep.c (_initialize_nds32_tdep): Add declaration.
2839 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Add declaration.
2840 * nios2-tdep.c (_initialize_nios2_tdep): Add declaration.
2841 * nto-procfs.c (_initialize_procfs): Add declaration.
2842 * objc-lang.c (_initialize_objc_language): Add declaration.
2843 * observable.c (_initialize_observer): Add declaration.
2844 * opencl-lang.c (_initialize_opencl_language): Add declaration.
2845 * or1k-linux-tdep.c (_initialize_or1k_linux_tdep): Add declaration.
2846 * or1k-tdep.c (_initialize_or1k_tdep): Add declaration.
2847 * osabi.c (_initialize_gdb_osabi): Add declaration.
2848 * osdata.c (_initialize_osdata): Add declaration.
2849 * p-valprint.c (_initialize_pascal_valprint): Add declaration.
2850 * parse.c (_initialize_parse): Add declaration.
2851 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Add declaration.
2852 * ppc-fbsd-tdep.c (_initialize_ppcfbsd_tdep): Add declaration.
2853 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Add declaration.
2854 * ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Add declaration.
2855 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Add declaration.
2856 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Add declaration.
2857 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Add declaration.
2858 * ppc-obsd-tdep.c (_initialize_ppcobsd_tdep): Add declaration.
2859 * printcmd.c (_initialize_printcmd): Add declaration.
2860 * probe.c (_initialize_probe): Add declaration.
2861 * proc-api.c (_initialize_proc_api): Add declaration.
2862 * proc-events.c (_initialize_proc_events): Add declaration.
2863 * proc-service.c (_initialize_proc_service): Add declaration.
2864 * procfs.c (_initialize_procfs): Add declaration.
2865 * producer.c (_initialize_producer): Add declaration.
2866 * psymtab.c (_initialize_psymtab): Add declaration.
2867 * python/python.c (_initialize_python): Add declaration.
2868 * ravenscar-thread.c (_initialize_ravenscar): Add declaration.
2869 * record-btrace.c (_initialize_record_btrace): Add declaration.
2870 * record-full.c (_initialize_record_full): Add declaration.
2871 * record.c (_initialize_record): Add declaration.
2872 * regcache-dump.c (_initialize_regcache_dump): Add declaration.
2873 * regcache.c (_initialize_regcache): Add declaration.
2874 * reggroups.c (_initialize_reggroup): Add declaration.
2875 * remote-notif.c (_initialize_notif): Add declaration.
2876 * remote-sim.c (_initialize_remote_sim): Add declaration.
2877 * remote.c (_initialize_remote): Add declaration.
2878 * reverse.c (_initialize_reverse): Add declaration.
2879 * riscv-fbsd-nat.c (_initialize_riscv_fbsd_nat): Add declaration.
2880 * riscv-fbsd-tdep.c (_initialize_riscv_fbsd_tdep): Add declaration.
2881 * riscv-linux-nat.c (_initialize_riscv_linux_nat): Add declaration.
2882 * riscv-linux-tdep.c (_initialize_riscv_linux_tdep): Add declaration.
2883 * riscv-tdep.c (_initialize_riscv_tdep): Add declaration.
2884 * rl78-tdep.c (_initialize_rl78_tdep): Add declaration.
2885 * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Add declaration.
2886 * rs6000-lynx178-tdep.c (_initialize_rs6000_lynx178_tdep):
2887 Add declaration.
2888 * rs6000-nat.c (_initialize_rs6000_nat): Add declaration.
2889 * rs6000-tdep.c (_initialize_rs6000_tdep): Add declaration.
2890 * run-on-main-thread.c (_initialize_run_on_main_thread): Add declaration.
2891 * rust-exp.y (_initialize_rust_exp): Add declaration.
2892 * rx-tdep.c (_initialize_rx_tdep): Add declaration.
2893 * s12z-tdep.c (_initialize_s12z_tdep): Add declaration.
2894 * s390-linux-nat.c (_initialize_s390_nat): Add declaration.
2895 * s390-linux-tdep.c (_initialize_s390_linux_tdep): Add declaration.
2896 * s390-tdep.c (_initialize_s390_tdep): Add declaration.
2897 * score-tdep.c (_initialize_score_tdep): Add declaration.
2898 * ser-go32.c (_initialize_ser_dos): Add declaration.
2899 * ser-mingw.c (_initialize_ser_windows): Add declaration.
2900 * ser-pipe.c (_initialize_ser_pipe): Add declaration.
2901 * ser-tcp.c (_initialize_ser_tcp): Add declaration.
2902 * ser-uds.c (_initialize_ser_socket): Add declaration.
2903 * ser-unix.c (_initialize_ser_hardwire): Add declaration.
2904 * serial.c (_initialize_serial): Add declaration.
2905 * sh-linux-tdep.c (_initialize_sh_linux_tdep): Add declaration.
2906 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Add declaration.
2907 * sh-nbsd-tdep.c (_initialize_shnbsd_tdep): Add declaration.
2908 * sh-tdep.c (_initialize_sh_tdep): Add declaration.
2909 * skip.c (_initialize_step_skip): Add declaration.
2910 * sol-thread.c (_initialize_sol_thread): Add declaration.
2911 * solib-aix.c (_initialize_solib_aix): Add declaration.
2912 * solib-darwin.c (_initialize_darwin_solib): Add declaration.
2913 * solib-dsbt.c (_initialize_dsbt_solib): Add declaration.
2914 * solib-frv.c (_initialize_frv_solib): Add declaration.
2915 * solib-svr4.c (_initialize_svr4_solib): Add declaration.
2916 * solib-target.c (_initialize_solib_target): Add declaration.
2917 * solib.c (_initialize_solib): Add declaration.
2918 * source-cache.c (_initialize_source_cache): Add declaration.
2919 * source.c (_initialize_source): Add declaration.
2920 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Add declaration.
2921 * sparc-linux-tdep.c (_initialize_sparc_linux_tdep): Add declaration.
2922 * sparc-nat.c (_initialize_sparc_nat): Add declaration.
2923 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Add declaration.
2924 * sparc-nbsd-tdep.c (_initialize_sparcnbsd_tdep): Add declaration.
2925 * sparc-obsd-tdep.c (_initialize_sparc32obsd_tdep): Add declaration.
2926 * sparc-sol2-tdep.c (_initialize_sparc_sol2_tdep): Add declaration.
2927 * sparc-tdep.c (_initialize_sparc_tdep): Add declaration.
2928 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Add declaration.
2929 * sparc64-fbsd-tdep.c (_initialize_sparc64fbsd_tdep): Add declaration.
2930 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Add declaration.
2931 * sparc64-linux-tdep.c (_initialize_sparc64_linux_tdep): Add declaration.
2932 * sparc64-nat.c (_initialize_sparc64_nat): Add declaration.
2933 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Add declaration.
2934 * sparc64-nbsd-tdep.c (_initialize_sparc64nbsd_tdep): Add declaration.
2935 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Add declaration.
2936 * sparc64-obsd-tdep.c (_initialize_sparc64obsd_tdep): Add declaration.
2937 * sparc64-sol2-tdep.c (_initialize_sparc64_sol2_tdep): Add declaration.
2938 * sparc64-tdep.c (_initialize_sparc64_adi_tdep): Add declaration.
2939 * stabsread.c (_initialize_stabsread): Add declaration.
2940 * stack.c (_initialize_stack): Add declaration.
2941 * stap-probe.c (_initialize_stap_probe): Add declaration.
2942 * std-regs.c (_initialize_frame_reg): Add declaration.
2943 * symfile-debug.c (_initialize_symfile_debug): Add declaration.
2944 * symfile-mem.c (_initialize_symfile_mem): Add declaration.
2945 * symfile.c (_initialize_symfile): Add declaration.
2946 * symmisc.c (_initialize_symmisc): Add declaration.
2947 * symtab.c (_initialize_symtab): Add declaration.
2948 * target.c (_initialize_target): Add declaration.
2949 * target-connection.c (_initialize_target_connection): Add
2950 declaration.
2951 * target-dcache.c (_initialize_target_dcache): Add declaration.
2952 * target-descriptions.c (_initialize_target_descriptions): Add declaration.
2953 * thread.c (_initialize_thread): Add declaration.
2954 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Add declaration.
2955 * tic6x-tdep.c (_initialize_tic6x_tdep): Add declaration.
2956 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Add declaration.
2957 * tilegx-linux-tdep.c (_initialize_tilegx_linux_tdep): Add declaration.
2958 * tilegx-tdep.c (_initialize_tilegx_tdep): Add declaration.
2959 * tracectf.c (_initialize_ctf): Add declaration.
2960 * tracefile-tfile.c (_initialize_tracefile_tfile): Add declaration.
2961 * tracefile.c (_initialize_tracefile): Add declaration.
2962 * tracepoint.c (_initialize_tracepoint): Add declaration.
2963 * tui/tui-hooks.c (_initialize_tui_hooks): Add declaration.
2964 * tui/tui-interp.c (_initialize_tui_interp): Add declaration.
2965 * tui/tui-layout.c (_initialize_tui_layout): Add declaration.
2966 * tui/tui-regs.c (_initialize_tui_regs): Add declaration.
2967 * tui/tui-stack.c (_initialize_tui_stack): Add declaration.
2968 * tui/tui-win.c (_initialize_tui_win): Add declaration.
2969 * tui/tui.c (_initialize_tui): Add declaration.
2970 * typeprint.c (_initialize_typeprint): Add declaration.
2971 * ui-style.c (_initialize_ui_style): Add declaration.
2972 * unittests/array-view-selftests.c (_initialize_array_view_selftests): Add declaration.
2973 * unittests/child-path-selftests.c (_initialize_child_path_selftests): Add declaration.
2974 * unittests/cli-utils-selftests.c (_initialize_cli_utils_selftests): Add declaration.
2975 * unittests/common-utils-selftests.c (_initialize_common_utils_selftests): Add declaration.
2976 * unittests/copy_bitwise-selftests.c (_initialize_copy_bitwise_utils_selftests): Add declaration.
2977 * unittests/environ-selftests.c (_initialize_environ_selftests): Add declaration.
2978 * unittests/filtered_iterator-selftests.c
2979 (_initialize_filtered_iterator_selftests): Add declaration.
2980 * unittests/format_pieces-selftests.c (_initialize_format_pieces_selftests): Add declaration.
2981 * unittests/function-view-selftests.c (_initialize_function_view_selftests): Add declaration.
2982 * unittests/help-doc-selftests.c (_initialize_help_doc_selftests): Add declaration.
2983 * unittests/lookup_name_info-selftests.c (_initialize_lookup_name_info_selftests): Add declaration.
2984 * unittests/main-thread-selftests.c
2985 (_initialize_main_thread_selftests): Add declaration.
2986 * unittests/memory-map-selftests.c (_initialize_memory_map_selftests): Add declaration.
2987 * unittests/memrange-selftests.c (_initialize_memrange_selftests): Add declaration.
2988 * unittests/mkdir-recursive-selftests.c (_initialize_mkdir_recursive_selftests): Add declaration.
2989 * unittests/observable-selftests.c (_initialize_observer_selftest): Add declaration.
2990 * unittests/offset-type-selftests.c (_initialize_offset_type_selftests): Add declaration.
2991 * unittests/optional-selftests.c (_initialize_optional_selftests): Add declaration.
2992 * unittests/parse-connection-spec-selftests.c (_initialize_parse_connection_spec_selftests): Add declaration.
2993 * unittests/rsp-low-selftests.c (_initialize_rsp_low_selftests): Add declaration.
2994 * unittests/scoped_fd-selftests.c (_initialize_scoped_fd_selftests): Add declaration.
2995 * unittests/scoped_mmap-selftests.c (_initialize_scoped_mmap_selftests): Add declaration.
2996 * unittests/scoped_restore-selftests.c (_initialize_scoped_restore_selftests): Add declaration.
2997 * unittests/string_view-selftests.c (_initialize_string_view_selftests): Add declaration.
2998 * unittests/style-selftests.c (_initialize_style_selftest): Add declaration.
2999 * unittests/tracepoint-selftests.c (_initialize_tracepoint_selftests): Add declaration.
3000 * unittests/tui-selftests.c (_initialize_tui_selftest): Add
3001 declaration.
3002 * unittests/unpack-selftests.c (_initialize_unpack_selftests): Add declaration.
3003 * unittests/utils-selftests.c (_initialize_utils_selftests): Add declaration.
3004 * unittests/vec-utils-selftests.c (_initialize_vec_utils_selftests): Add declaration.
3005 * unittests/xml-utils-selftests.c (_initialize_xml_utils): Add declaration.
3006 * user-regs.c (_initialize_user_regs): Add declaration.
3007 * utils.c (_initialize_utils): Add declaration.
3008 * v850-tdep.c (_initialize_v850_tdep): Add declaration.
3009 * valops.c (_initialize_valops): Add declaration.
3010 * valprint.c (_initialize_valprint): Add declaration.
3011 * value.c (_initialize_values): Add declaration.
3012 * varobj.c (_initialize_varobj): Add declaration.
3013 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Add declaration.
3014 * vax-nbsd-tdep.c (_initialize_vaxnbsd_tdep): Add declaration.
3015 * vax-tdep.c (_initialize_vax_tdep): Add declaration.
3016 * windows-nat.c (_initialize_windows_nat): Add declaration.
3017 (_initialize_check_for_gdb_ini): Add declaration.
3018 (_initialize_loadable): Add declaration.
3019 * windows-tdep.c (_initialize_windows_tdep): Add declaration.
3020 * x86-bsd-nat.c (_initialize_x86_bsd_nat): Add declaration.
3021 * x86-linux-nat.c (_initialize_x86_linux_nat): Add declaration.
3022 * xcoffread.c (_initialize_xcoffread): Add declaration.
3023 * xml-support.c (_initialize_xml_support): Add declaration.
3024 * xstormy16-tdep.c (_initialize_xstormy16_tdep): Add declaration.
3025 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Add declaration.
3026 * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Add declaration.
3027 * xtensa-tdep.c (_initialize_xtensa_tdep): Add declaration.
3028
3029 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
3030
3031 * regformats/regdat.sh: Generate declaration for init function.
3032
3033 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
3034
3035 * remote-sim.c (next_pid, INITIAL_PID, sim_inferior_data): Move
3036 up.
3037 (gdbsim_target) <get_inferior_data_by_ptid, resume_one_inferior,
3038 close_one_inferior>: New methods.
3039 (get_sim_inferior_data_by_ptid): Move to gdbsim_target,
3040 pass down target to find_inferior_pid.
3041 (gdbsim_target::fetch_registers, gdbsim_target::store_registers):
3042 Pass down target to find_inferior_ptid.
3043 (gdbsim_target::create_inferior): Pass down target to
3044 add_thread_silent.
3045 (gdbsim_close_inferior): Move to gdbsim_close_inferior, pass
3046 target down to find_inferior_ptid and switch_to_thread.
3047 (gdbsim_target::close): Update to call close_one_inferior.
3048 (struct resume_data): Remove.
3049 (gdbsim_resume_inferior): Move to gdbsim_target. Take arguments
3050 directly, rather than through a void pointer.
3051 (gdbsim_target::resume): Update to call resume_one_inferior.
3052
3053 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3054
3055 * gdbsupport/gdb_wait.c: Include gdb_wait.h.
3056
3057 2020-01-12 Pedro Alves <palves@redhat.com>
3058
3059 * bsd-kvm.c (bsd_kvm_target::close): Call exit_inferior_silent
3060 directly for the current inferior instead of
3061 discard_all_inferiors.
3062 (discard_all_inferiors): Delete.
3063
3064 2020-01-11 Tom Tromey <tom@tromey.com>
3065
3066 * tui/tui-wingeneral.c (box_win): Check cli_styling.
3067 * tui/tui-winsource.c (tui_source_window_base::refill): Use
3068 deprecated_safe_get_selected_frame.
3069
3070 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3071
3072 * inferior.c (print_inferior): Switch inferior before printing it.
3073
3074 2020-01-10 Aleksandar Paunovic <aleksandar.paunovic@intel.com>
3075 Pedro Alves <palves@redhat.com>
3076
3077 * progspace-and-thread.c (switch_to_program_space_and_thread):
3078 Assert there's an inferior for PSPACE. Use
3079 switch_to_inferior_no_thread to switch the inferior too.
3080 * progspace.c (program_space::~program_space): Call
3081 clear_symtab_users here, with SYMFILE_DEFER_BP_RESET.
3082 (program_space::free_all_objfiles): Don't call clear_symtab_users
3083 here.
3084 * symfile.c (symbol_file_clear): Call clear_symtab_users here.
3085
3086 2020-01-10 Pedro Alves <palves@redhat.com>
3087
3088 * NEWS: Mention multi-target debugging, "info connections", and
3089 "add-inferior -no-connection".
3090
3091 2020-01-10 Pedro Alves <palves@redhat.com>
3092
3093 * infrun.c: Include "target-connection.h".
3094 (check_multi_target_resumption): New.
3095 (proceed): Call it.
3096 * target-connection.c (make_target_connection_string): Make
3097 extern.
3098 * target-connection.h (make_target_connection_string): Declare.
3099
3100 2020-01-10 Pedro Alves <palves@redhat.com>
3101
3102 * Makefile.in (COMMON_SFILES): Add target-connection.c.
3103 * inferior.c (uiout_field_connection): New function.
3104 (print_inferior): Add new "connection-id" column.
3105 (add_inferior_command): Show connection number/string of added
3106 inferior.
3107 * process-stratum-target.h
3108 (process_stratum_target::connection_string): New virtual method.
3109 (process_stratum_target::connection_number): New field.
3110 * remote.c (remote_target::connection_string): New override.
3111 * target-connection.c: New file.
3112 * target-connection.h: New file.
3113 * target.c (decref_target): Remove process_stratum targets from
3114 the connection list.
3115 (target_stack::push): Add process_stratum targets to the
3116 connection list.
3117
3118 2020-01-10 Pedro Alves <palves@redhat.com>
3119
3120 Revert:
3121 2016-04-12 Pedro Alves <palves@redhat.com>
3122 * serial.c (serial_open, serial_fdopen_ops, do_serial_close):
3123 Remove references to name.
3124 * serial.h (struct serial) <name>: Delete.
3125
3126 2020-01-10 Pedro Alves <palves@redhat.com>
3127
3128 * gdbarch-selftests.c (register_to_value_test): Remove "target
3129 already pushed" check.
3130
3131 2020-01-10 Pedro Alves <palves@redhat.com>
3132 John Baldwin <jhb@FreeBSD.org>
3133
3134 * aarch64-linux-nat.c
3135 (aarch64_linux_nat_target::thread_architecture): Adjust.
3136 * ada-tasks.c (print_ada_task_info): Adjust find_thread_ptid call.
3137 (task_command_1): Likewise.
3138 * aix-thread.c (sync_threadlists, aix_thread_target::resume)
3139 (aix_thread_target::wait, aix_thread_target::fetch_registers)
3140 (aix_thread_target::store_registers)
3141 (aix_thread_target::thread_alive): Adjust.
3142 * amd64-fbsd-tdep.c: Include "inferior.h".
3143 (amd64fbsd_get_thread_local_address): Pass down target.
3144 * amd64-linux-nat.c (ps_get_thread_area): Use ps_prochandle
3145 thread's gdbarch instead of target_gdbarch.
3146 * break-catch-sig.c (signal_catchpoint_print_it): Adjust call to
3147 get_last_target_status.
3148 * break-catch-syscall.c (print_it_catch_syscall): Likewise.
3149 * breakpoint.c (breakpoints_should_be_inserted_now): Consider all
3150 inferiors.
3151 (update_inserted_breakpoint_locations): Skip if inferiors with no
3152 execution.
3153 (update_global_location_list): When handling moribund locations,
3154 find representative inferior for location's pspace, and use thread
3155 count of its process_stratum target.
3156 * bsd-kvm.c (bsd_kvm_target_open): Pass target down.
3157 * bsd-uthread.c (bsd_uthread_target::wait): Use
3158 as_process_stratum_target and adjust thread_change_ptid and
3159 add_thread calls.
3160 (bsd_uthread_target::update_thread_list): Use
3161 as_process_stratum_target and adjust find_thread_ptid,
3162 thread_change_ptid and add_thread calls.
3163 * btrace.c (maint_btrace_packet_history_cmd): Adjust
3164 find_thread_ptid call.
3165 * corelow.c (add_to_thread_list): Adjust add_thread call.
3166 (core_target_open): Adjust add_thread_silent and thread_count
3167 calls.
3168 (core_target::pid_to_str): Adjust find_inferior_ptid call.
3169 * ctf.c (ctf_target_open): Adjust add_thread_silent call.
3170 * event-top.c (async_disconnect): Pop targets from all inferiors.
3171 * exec.c (add_target_sections): Push exec target on all inferiors
3172 sharing the program space.
3173 (remove_target_sections): Remove the exec target from all
3174 inferiors sharing the program space.
3175 (exec_on_vfork): New.
3176 * exec.h (exec_on_vfork): Declare.
3177 * fbsd-nat.c (fbsd_add_threads): Add fbsd_nat_target parameter.
3178 Pass it down.
3179 (fbsd_nat_target::update_thread_list): Adjust.
3180 (fbsd_nat_target::resume): Adjust.
3181 (fbsd_handle_debug_trap): Add fbsd_nat_target parameter. Pass it
3182 down.
3183 (fbsd_nat_target::wait, fbsd_nat_target::post_attach): Adjust.
3184 * fbsd-tdep.c (fbsd_corefile_thread): Adjust
3185 get_thread_arch_regcache call.
3186 * fork-child.c (gdb_startup_inferior): Pass target down to
3187 startup_inferior and set_executing.
3188 * gdbthread.h (struct process_stratum_target): Forward declare.
3189 (add_thread, add_thread_silent, add_thread_with_info)
3190 (in_thread_list): Add process_stratum_target parameter.
3191 (find_thread_ptid(inferior*, ptid_t)): New overload.
3192 (find_thread_ptid, thread_change_ptid): Add process_stratum_target
3193 parameter.
3194 (all_threads()): Delete overload.
3195 (all_threads, all_non_exited_threads): Add process_stratum_target
3196 parameter.
3197 (all_threads_safe): Use brace initialization.
3198 (thread_count): Add process_stratum_target parameter.
3199 (set_resumed, set_running, set_stop_requested, set_executing)
3200 (threads_are_executing, finish_thread_state): Add
3201 process_stratum_target parameter.
3202 (switch_to_thread): Use is_current_thread.
3203 * i386-fbsd-tdep.c: Include "inferior.h".
3204 (i386fbsd_get_thread_local_address): Pass down target.
3205 * i386-linux-nat.c (i386_linux_nat_target::low_resume): Adjust.
3206 * inf-child.c (inf_child_target::maybe_unpush_target): Remove
3207 have_inferiors check.
3208 * inf-ptrace.c (inf_ptrace_target::create_inferior)
3209 (inf_ptrace_target::attach): Adjust.
3210 * infcall.c (run_inferior_call): Adjust.
3211 * infcmd.c (run_command_1): Pass target to
3212 scoped_finish_thread_state.
3213 (proceed_thread_callback): Skip inferiors with no execution.
3214 (continue_command): Rename 'all_threads' local to avoid hiding
3215 'all_threads' function. Adjust get_last_target_status call.
3216 (prepare_one_step): Adjust set_running call.
3217 (signal_command): Use user_visible_resume_target. Compare thread
3218 pointers instead of inferior_ptid.
3219 (info_program_command): Adjust to pass down target.
3220 (attach_command): Mark target's 'thread_executing' flag.
3221 (stop_current_target_threads_ns): New, factored out from ...
3222 (interrupt_target_1): ... this. Switch inferior before making
3223 target calls.
3224 * inferior-iter.h
3225 (struct all_inferiors_iterator, struct all_inferiors_range)
3226 (struct all_inferiors_safe_range)
3227 (struct all_non_exited_inferiors_range): Filter on
3228 process_stratum_target too. Remove explicit.
3229 * inferior.c (inferior::inferior): Push dummy target on target
3230 stack.
3231 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors):
3232 Add process_stratum_target parameter, and pass it down.
3233 (have_live_inferiors): Adjust.
3234 (switch_to_inferior_and_push_target): New.
3235 (add_inferior_command, clone_inferior_command): Handle
3236 "-no-connection" parameter. Use
3237 switch_to_inferior_and_push_target.
3238 (_initialize_inferior): Mention "-no-connection" option in
3239 the help of "add-inferior" and "clone-inferior" commands.
3240 * inferior.h: Include "process-stratum-target.h".
3241 (interrupt_target_1): Use bool.
3242 (struct inferior) <push_target, unpush_target, target_is_pushed,
3243 find_target_beneath, top_target, process_target, target_at,
3244 m_stack>: New.
3245 (discard_all_inferiors): Delete.
3246 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors)
3247 (all_inferiors, all_non_exited_inferiors): Add
3248 process_stratum_target parameter.
3249 * infrun.c: Include "gdb_select.h" and <unordered_map>.
3250 (target_last_proc_target): New global.
3251 (follow_fork_inferior): Push target on new inferior. Pass target
3252 to add_thread_silent. Call exec_on_vfork. Handle target's
3253 reference count.
3254 (follow_fork): Adjust get_last_target_status call. Also consider
3255 target.
3256 (follow_exec): Push target on new inferior.
3257 (struct execution_control_state) <target>: New field.
3258 (user_visible_resume_target): New.
3259 (do_target_resume): Call target_async.
3260 (resume_1): Set target's threads_executing flag. Consider resume
3261 target.
3262 (commit_resume_all_targets): New.
3263 (proceed): Also consider resume target. Skip threads of inferiors
3264 with no execution. Commit resumtion in all targets.
3265 (start_remote): Pass current inferior to wait_for_inferior.
3266 (infrun_thread_stop_requested): Consider target as well. Pass
3267 thread_info pointer to clear_inline_frame_state instead of ptid.
3268 (infrun_thread_thread_exit): Consider target as well.
3269 (random_pending_event_thread): New inferior parameter. Use it.
3270 (do_target_wait): Rename to ...
3271 (do_target_wait_1): ... this. Add inferior parameter, and pass it
3272 down.
3273 (threads_are_resumed_pending_p, do_target_wait): New.
3274 (prepare_for_detach): Adjust calls.
3275 (wait_for_inferior): New inferior parameter. Handle it. Use
3276 do_target_wait_1 instead of do_target_wait.
3277 (fetch_inferior_event): Adjust. Switch to representative
3278 inferior. Pass target down.
3279 (set_last_target_status): Add process_stratum_target parameter.
3280 Save target in global.
3281 (get_last_target_status): Add process_stratum_target parameter and
3282 handle it.
3283 (nullify_last_target_wait_ptid): Clear 'target_last_proc_target'.
3284 (context_switch): Check inferior_ptid == null_ptid before calling
3285 inferior_thread().
3286 (get_inferior_stop_soon): Pass down target.
3287 (wait_one): Rename to ...
3288 (poll_one_curr_target): ... this.
3289 (struct wait_one_event): New.
3290 (wait_one): New.
3291 (stop_all_threads): Adjust.
3292 (handle_no_resumed, handle_inferior_event): Adjust to consider the
3293 event's target.
3294 (switch_back_to_stepped_thread): Also consider target.
3295 (print_stop_event): Update.
3296 (normal_stop): Update. Also consider the resume target.
3297 * infrun.h (wait_for_inferior): Remove declaration.
3298 (user_visible_resume_target): New declaration.
3299 (get_last_target_status, set_last_target_status): New
3300 process_stratum_target parameter.
3301 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
3302 process_stratum_target parameter, and use it.
3303 (clear_inline_frame_state (thread_info*)): New.
3304 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
3305 process_stratum_target parameter.
3306 (clear_inline_frame_state (thread_info*)): Declare.
3307 * linux-fork.c (delete_checkpoint_command): Pass target down to
3308 find_thread_ptid.
3309 (checkpoint_command): Adjust.
3310 * linux-nat.c (linux_nat_target::follow_fork): Switch to thread
3311 instead of just tweaking inferior_ptid.
3312 (linux_nat_switch_fork): Pass target down to thread_change_ptid.
3313 (exit_lwp): Pass target down to find_thread_ptid.
3314 (attach_proc_task_lwp_callback): Pass target down to
3315 add_thread/set_running/set_executing.
3316 (linux_nat_target::attach): Pass target down to
3317 thread_change_ptid.
3318 (get_detach_signal): Pass target down to find_thread_ptid.
3319 Consider last target status's target.
3320 (linux_resume_one_lwp_throw, resume_lwp)
3321 (linux_handle_syscall_trap, linux_handle_extended_wait, wait_lwp)
3322 (stop_wait_callback, save_stop_reason, linux_nat_filter_event)
3323 (linux_nat_wait_1, resume_stopped_resumed_lwps): Pass target down.
3324 (linux_nat_target::async_wait_fd): New.
3325 (linux_nat_stop_lwp, linux_nat_target::thread_address_space): Pass
3326 target down.
3327 * linux-nat.h (linux_nat_target::async_wait_fd): Declare.
3328 * linux-tdep.c (get_thread_arch_regcache): Pass target down.
3329 * linux-thread-db.c (struct thread_db_info::process_target): New
3330 field.
3331 (add_thread_db_info): Save target.
3332 (get_thread_db_info): New process_stratum_target parameter. Also
3333 match target.
3334 (delete_thread_db_info): New process_stratum_target parameter.
3335 Also match target.
3336 (thread_from_lwp): Adjust to pass down target.
3337 (thread_db_notice_clone): Pass down target.
3338 (check_thread_db_callback): Pass down target.
3339 (try_thread_db_load_1): Always push the thread_db target.
3340 (try_thread_db_load, record_thread): Pass target down.
3341 (thread_db_target::detach): Pass target down. Always unpush the
3342 thread_db target.
3343 (thread_db_target::wait, thread_db_target::mourn_inferior): Pass
3344 target down. Always unpush the thread_db target.
3345 (find_new_threads_callback, thread_db_find_new_threads_2)
3346 (thread_db_target::update_thread_list): Pass target down.
3347 (thread_db_target::pid_to_str): Pass current inferior down.
3348 (thread_db_target::get_thread_local_address): Pass target down.
3349 (thread_db_target::resume, maintenance_check_libthread_db): Pass
3350 target down.
3351 * nto-procfs.c (nto_procfs_target::update_thread_list): Adjust.
3352 * procfs.c (procfs_target::procfs_init_inferior): Declare.
3353 (proc_set_current_signal, do_attach, procfs_target::wait): Adjust.
3354 (procfs_init_inferior): Rename to ...
3355 (procfs_target::procfs_init_inferior): ... this and adjust.
3356 (procfs_target::create_inferior, procfs_notice_thread)
3357 (procfs_do_thread_registers): Adjust.
3358 * ppc-fbsd-tdep.c: Include "inferior.h".
3359 (ppcfbsd_get_thread_local_address): Pass down target.
3360 * proc-service.c (ps_xfer_memory): Switch current inferior and
3361 program space as well.
3362 (get_ps_regcache): Pass target down.
3363 * process-stratum-target.c
3364 (process_stratum_target::thread_address_space)
3365 (process_stratum_target::thread_architecture): Pass target down.
3366 * process-stratum-target.h
3367 (process_stratum_target::threads_executing): New field.
3368 (as_process_stratum_target): New.
3369 * ravenscar-thread.c
3370 (ravenscar_thread_target::update_inferior_ptid): Pass target down.
3371 (ravenscar_thread_target::wait, ravenscar_add_thread): Pass target
3372 down.
3373 * record-btrace.c (record_btrace_target::info_record): Adjust.
3374 (record_btrace_target::record_method)
3375 (record_btrace_target::record_is_replaying)
3376 (record_btrace_target::fetch_registers)
3377 (get_thread_current_frame_id, record_btrace_target::resume)
3378 (record_btrace_target::wait, record_btrace_target::stop): Pass
3379 target down.
3380 * record-full.c (record_full_wait_1): Switch to event thread.
3381 Pass target down.
3382 * regcache.c (regcache::regcache)
3383 (get_thread_arch_aspace_regcache, get_thread_arch_regcache): Add
3384 process_stratum_target parameter and handle it.
3385 (current_thread_target): New global.
3386 (get_thread_regcache): Add process_stratum_target parameter and
3387 handle it. Switch inferior before calling target method.
3388 (get_thread_regcache): Pass target down.
3389 (get_thread_regcache_for_ptid): Pass target down.
3390 (registers_changed_ptid): Add process_stratum_target parameter and
3391 handle it.
3392 (registers_changed_thread, registers_changed): Pass target down.
3393 (test_get_thread_arch_aspace_regcache): New.
3394 (current_regcache_test): Define a couple local test_target_ops
3395 instances and use them for testing.
3396 (readwrite_regcache): Pass process_stratum_target parameter.
3397 (cooked_read_test, cooked_write_test): Pass mock_target down.
3398 * regcache.h (get_thread_regcache, get_thread_arch_regcache)
3399 (get_thread_arch_aspace_regcache): Add process_stratum_target
3400 parameter.
3401 (regcache::target): New method.
3402 (regcache::regcache, regcache::get_thread_arch_aspace_regcache)
3403 (regcache::registers_changed_ptid): Add process_stratum_target
3404 parameter.
3405 (regcache::m_target): New field.
3406 (registers_changed_ptid): Add process_stratum_target parameter.
3407 * remote.c (remote_state::supports_vCont_probed): New field.
3408 (remote_target::async_wait_fd): New method.
3409 (remote_unpush_and_throw): Add remote_target parameter.
3410 (get_current_remote_target): Adjust.
3411 (remote_target::remote_add_inferior): Push target.
3412 (remote_target::remote_add_thread)
3413 (remote_target::remote_notice_new_inferior)
3414 (get_remote_thread_info): Pass target down.
3415 (remote_target::update_thread_list): Skip threads of inferiors
3416 bound to other targets. (remote_target::close): Don't discard
3417 inferiors. (remote_target::add_current_inferior_and_thread)
3418 (remote_target::process_initial_stop_replies)
3419 (remote_target::start_remote)
3420 (remote_target::remote_serial_quit_handler): Pass down target.
3421 (remote_target::remote_unpush_target): New remote_target
3422 parameter. Unpush the target from all inferiors.
3423 (remote_target::remote_unpush_and_throw): New remote_target
3424 parameter. Pass it down.
3425 (remote_target::open_1): Check whether the current inferior has
3426 execution instead of checking whether any inferior is live. Pass
3427 target down.
3428 (remote_target::remote_detach_1): Pass down target. Use
3429 remote_unpush_target.
3430 (extended_remote_target::attach): Pass down target.
3431 (remote_target::remote_vcont_probe): Set supports_vCont_probed.
3432 (remote_target::append_resumption): Pass down target.
3433 (remote_target::append_pending_thread_resumptions)
3434 (remote_target::remote_resume_with_hc, remote_target::resume)
3435 (remote_target::commit_resume): Pass down target.
3436 (remote_target::remote_stop_ns): Check supports_vCont_probed.
3437 (remote_target::interrupt_query)
3438 (remote_target::remove_new_fork_children)
3439 (remote_target::check_pending_events_prevent_wildcard_vcont)
3440 (remote_target::remote_parse_stop_reply)
3441 (remote_target::process_stop_reply): Pass down target.
3442 (first_remote_resumed_thread): New remote_target parameter. Pass
3443 it down.
3444 (remote_target::wait_as): Pass down target.
3445 (unpush_and_perror): New remote_target parameter. Pass it down.
3446 (remote_target::readchar, remote_target::remote_serial_write)
3447 (remote_target::getpkt_or_notif_sane_1)
3448 (remote_target::kill_new_fork_children, remote_target::kill): Pass
3449 down target.
3450 (remote_target::mourn_inferior): Pass down target. Use
3451 remote_unpush_target.
3452 (remote_target::core_of_thread)
3453 (remote_target::remote_btrace_maybe_reopen): Pass down target.
3454 (remote_target::pid_to_exec_file)
3455 (remote_target::thread_handle_to_thread_info): Pass down target.
3456 (remote_target::async_wait_fd): New.
3457 * riscv-fbsd-tdep.c: Include "inferior.h".
3458 (riscv_fbsd_get_thread_local_address): Pass down target.
3459 * sol2-tdep.c (sol2_core_pid_to_str): Pass down target.
3460 * sol-thread.c (sol_thread_target::wait, ps_lgetregs, ps_lsetregs)
3461 (ps_lgetfpregs, ps_lsetfpregs, sol_update_thread_list_callback):
3462 Adjust.
3463 * solib-spu.c (spu_skip_standalone_loader): Pass down target.
3464 * solib-svr4.c (enable_break): Pass down target.
3465 * spu-multiarch.c (parse_spufs_run): Pass down target.
3466 * spu-tdep.c (spu2ppu_sniffer): Pass down target.
3467 * target-delegates.c: Regenerate.
3468 * target.c (g_target_stack): Delete.
3469 (current_top_target): Return the current inferior's top target.
3470 (target_has_execution_1): Refer to the passed-in inferior's top
3471 target.
3472 (target_supports_terminal_ours): Check whether the initial
3473 inferior was already created.
3474 (decref_target): New.
3475 (target_stack::push): Incref/decref the target.
3476 (push_target, push_target, unpush_target): Adjust.
3477 (target_stack::unpush): Defref target.
3478 (target_is_pushed): Return bool. Adjust to refer to the current
3479 inferior's target stack.
3480 (dispose_inferior): Delete, and inline parts ...
3481 (target_preopen): ... here. Only dispose of the current inferior.
3482 (target_detach): Hold strong target reference while detaching.
3483 Pass target down.
3484 (target_thread_name): Add assertion.
3485 (target_resume): Pass down target.
3486 (target_ops::beneath, find_target_at): Adjust to refer to the
3487 current inferior's target stack.
3488 (get_dummy_target): New.
3489 (target_pass_ctrlc): Pass the Ctrl-C to the first inferior that
3490 has a thread running.
3491 (initialize_targets): Rename to ...
3492 (_initialize_target): ... this.
3493 * target.h: Include "gdbsupport/refcounted-object.h".
3494 (struct target_ops): Inherit refcounted_object.
3495 (target_ops::shortname, target_ops::longname): Make const.
3496 (target_ops::async_wait_fd): New method.
3497 (decref_target): Declare.
3498 (struct target_ops_ref_policy): New.
3499 (target_ops_ref): New typedef.
3500 (get_dummy_target): Declare function.
3501 (target_is_pushed): Return bool.
3502 * thread-iter.c (all_matching_threads_iterator::m_inf_matches)
3503 (all_matching_threads_iterator::all_matching_threads_iterator):
3504 Handle filter target.
3505 * thread-iter.h (struct all_matching_threads_iterator, struct
3506 all_matching_threads_range, class all_non_exited_threads_range):
3507 Filter by target too. Remove explicit.
3508 * thread.c (threads_executing): Delete.
3509 (inferior_thread): Pass down current inferior.
3510 (clear_thread_inferior_resources): Pass down thread pointer
3511 instead of ptid_t.
3512 (add_thread_silent, add_thread_with_info, add_thread): Add
3513 process_stratum_target parameter. Use it for thread and inferior
3514 searches.
3515 (is_current_thread): New.
3516 (thread_info::deletable): Use it.
3517 (find_thread_ptid, thread_count, in_thread_list)
3518 (thread_change_ptid, set_resumed, set_running): New
3519 process_stratum_target parameter. Pass it down.
3520 (set_executing): New process_stratum_target parameter. Pass it
3521 down. Adjust reference to 'threads_executing'.
3522 (threads_are_executing): New process_stratum_target parameter.
3523 Adjust reference to 'threads_executing'.
3524 (set_stop_requested, finish_thread_state): New
3525 process_stratum_target parameter. Pass it down.
3526 (switch_to_thread): Also match inferior.
3527 (switch_to_thread): New process_stratum_target parameter. Pass it
3528 down.
3529 (update_threads_executing): Reimplement.
3530 * top.c (quit_force): Pop targets from all inferior.
3531 (gdb_init): Don't call initialize_targets.
3532 * windows-nat.c (windows_nat_target) <get_windows_debug_event>:
3533 Declare.
3534 (windows_add_thread, windows_delete_thread): Adjust.
3535 (get_windows_debug_event): Rename to ...
3536 (windows_nat_target::get_windows_debug_event): ... this. Adjust.
3537 * tracefile-tfile.c (tfile_target_open): Pass down target.
3538 * gdbsupport/common-gdbthread.h (struct process_stratum_target):
3539 Forward declare.
3540 (switch_to_thread): Add process_stratum_target parameter.
3541 * mi/mi-interp.c (mi_on_resume_1): Add process_stratum_target
3542 parameter. Use it.
3543 (mi_on_resume): Pass target down.
3544 * nat/fork-inferior.c (startup_inferior): Add
3545 process_stratum_target parameter. Pass it down.
3546 * nat/fork-inferior.h (startup_inferior): Add
3547 process_stratum_target parameter.
3548 * python/py-threadevent.c (py_get_event_thread): Pass target down.
3549
3550 2020-01-10 Pedro Alves <palves@redhat.com>
3551
3552 * remote.c (remote_target::start_remote): Don't set inferior_ptid
3553 directly. Instead find the first thread in the thread list and
3554 use switch_to_thread.
3555
3556 2020-01-10 Pedro Alves <palves@redhat.com>
3557
3558 * remote.c (remote_target::remote_add_inferior): Don't bind a
3559 process to the current inferior if the current inferior is already
3560 bound to a process.
3561
3562 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3563 Pedro Alves <palves@redhat.com>
3564
3565 * remote.c (remote_target::remote_parse_stop_reply) <W/X packets>:
3566 If no process is specified, return null_ptid instead of
3567 inferior_ptid.
3568 (remote_target::wait_as): Handle TARGET_WAITKIND_EXITED /
3569 TARGET_WAITKIND_SIGNALLED with no pid.
3570
3571 2020-01-10 Pedro Alves <palves@redhat.com>
3572
3573 * remote.c (first_remote_resumed_thread): New.
3574 (remote_target::wait_as): Use it as default event_ptid instead of
3575 inferior_ptid.
3576
3577 2020-01-10 Pedro Alves <palves@redhat.com>
3578
3579 * infrun.c (handle_no_resumed): Use all_non_exited_inferiors.
3580
3581 2020-01-10 Pedro Alves <palves@redhat.com>
3582
3583 * tracefile-tfile.c (tfile_target::close): Assert that trace_fd is
3584 not -1.
3585
3586 2020-01-10 Pedro Alves <palves@redhat.com>
3587
3588 * break-catch-sig.c (signal_catchpoint_print_it): Don't pass a
3589 ptid to get_last_target_status.
3590 * break-catch-syscall.c (print_it_catch_syscall): Don't pass a
3591 ptid to get_last_target_status.
3592 * infcmd.c (continue_command): Don't pass a target_waitstatus to
3593 get_last_target_status.
3594 (info_program_command): Don't pass a target_waitstatus to
3595 get_last_target_status.
3596 * infrun.c (init_wait_for_inferior): Use
3597 nullify_last_target_wait_ptid.
3598 (get_last_target_status): Handle nullptr arguments.
3599 (nullify_last_target_wait_ptid): Clear target_last_waitstatus.
3600 (print_stop_event): Don't pass a ptid to get_last_target_status.
3601 (normal_stop): Don't pass a ptid to get_last_target_status.
3602 * infrun.h (get_last_target_status, set_last_target_status): Move
3603 comments here and update.
3604 (nullify_last_target_wait_ptid): Declare.
3605 * linux-fork.c (fork_load_infrun_state): Remove local extern
3606 declaration of nullify_last_target_wait_ptid.
3607 * linux-nat.c (get_detach_signal): Don't pass a target_waitstatus
3608 to get_last_target_status.
3609
3610 2020-01-10 Pedro Alves <palves@redhat.com>
3611
3612 * gdbthread.h (scoped_restore_current_thread)
3613 <dont_restore, restore, m_dont_restore>: Declare.
3614 * thread.c (thread_alive): Add assertion. Return bool.
3615 (switch_to_thread_if_alive): New.
3616 (prune_threads): Switch inferior/thread.
3617 (print_thread_info_1): Switch thread before calling target methods.
3618 (scoped_restore_current_thread::restore): New, factored out from
3619 ...
3620 (scoped_restore_current_thread::~scoped_restore_current_thread):
3621 ... this.
3622 (scoped_restore_current_thread::scoped_restore_current_thread):
3623 Add assertion.
3624 (thread_apply_all_command, thread_select): Use
3625 switch_to_thread_if_alive.
3626 * infrun.c (proceed, restart_threads, handle_signal_stop)
3627 (switch_back_to_stepped_thread): Switch current thread before
3628 calling target methods.
3629
3630 2020-01-10 Pedro Alves <palves@redhat.com>
3631
3632 * inferior.c (switch_to_inferior_no_thread): New function,
3633 factored out from ...
3634 (inferior_command): ... here.
3635 * inferior.h (switch_to_inferior_no_thread): Declare.
3636 * mi/mi-main.c (run_one_inferior): Use
3637 switch_to_inferior_no_thread.
3638
3639 2020-01-10 Pedro Alves <palves@redhat.com>
3640
3641 * infcmd.c (kill_command): Remove dead code.
3642
3643 2020-01-10 Pedro Alves <palves@redhat.com>
3644
3645 * remote.c (remote_target::mourn_inferior): No longer check
3646 whether the target is running.
3647
3648 2020-01-10 Pedro Alves <palves@redhat.com>
3649
3650 * corelow.c (core_target::has_execution): Change parameter type to
3651 inferior pointer.
3652 * inferior.c (number_of_live_inferiors): Use
3653 inferior::has_execution instead of target_has_execution_1.
3654 * inferior.h (inferior::has_execution): New.
3655 * linux-thread-db.c (thread_db_target::update_thread_list): Use
3656 inferior::has_execution instead of target_has_execution_1.
3657 * process-stratum-target.c
3658 (process_stratum_target::has_execution): Change parameter type to
3659 inferior pointer. Check the inferior's PID instead of
3660 inferior_ptid.
3661 * process-stratum-target.h
3662 (process_stratum_target::has_execution): Change parameter type to
3663 inferior pointer.
3664 * record-full.c (record_full_core_target::has_execution): Change
3665 parameter type to inferior pointer.
3666 * target.c (target_has_execution_1): Change parameter type to
3667 inferior pointer.
3668 (target_has_execution_current): Adjust.
3669 * target.h (target_ops::has_execution): Change parameter type to
3670 inferior pointer.
3671 (target_has_execution_1): Change parameter type to inferior
3672 pointer. Change return type to bool.
3673 * tracefile.h (tracefile_target::has_execution): Change parameter
3674 type to inferior pointer.
3675
3676 2020-01-10 Pedro Alves <palves@redhat.com>
3677
3678 * exceptions.c (print_flush): Remove current_top_target() check.
3679
3680 2020-01-10 Pedro Alves <palves@redhat.com>
3681
3682 * remote.c (show_remote_exec_file): Show the current inferior's
3683 exec-file instead of the command variable's value.
3684
3685 2020-01-10 Pedro Alves <palves@redhat.com>
3686
3687 * record-full.c (record_full_resume_ptid): New global.
3688 (record_full_target::resume): Set it.
3689 (record_full_wait_1): Use record_full_resume_ptid instead of
3690 inferior_ptid.
3691
3692 2020-01-10 Pedro Alves <palves@redhat.com>
3693
3694 * gdbthread.h (scoped_restore_current_thread)
3695 <dont_restore, restore, m_dont_restore>: Declare.
3696 * thread.c (thread_alive): Add assertion. Return bool.
3697 (switch_to_thread_if_alive): New.
3698 (prune_threads): Switch inferior/thread.
3699 (print_thread_info_1): Switch thread before calling target methods.
3700 (scoped_restore_current_thread::restore): New, factored out from
3701 ...
3702 (scoped_restore_current_thread::~scoped_restore_current_thread):
3703 ... this.
3704 (scoped_restore_current_thread::scoped_restore_current_thread):
3705 Add assertion.
3706 (thread_apply_all_command, thread_select): Use
3707 switch_to_thread_if_alive.
3708
3709 2020-01-10 George Barrett <bob@bob131.so>
3710
3711 * stap-probe.c (stap_modify_semaphore): Don't check for null
3712 semaphores.
3713 (stap_probe::set_semaphore, stap_probe::clear_semaphore): Check
3714 for null semaphores.
3715
3716 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
3717
3718 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Update
3719 all source windows, and maintain horizontal scroll status while
3720 doing so.
3721
3722 2020-01-09 Tom Tromey <tom@tromey.com>
3723
3724 PR tui/18932:
3725 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Call
3726 update_source_window, not print_source_lines.
3727
3728 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
3729
3730 * tui/tui.c (tui_enable): Register tui hooks after calling
3731 tui_display_main.
3732
3733 2020-01-09 Christian Biesinger <cbiesinger@google.com>
3734
3735 * gdbsupport/common-defs.h: Don't define _FORTIFY_SOURCE on MinGW.
3736
3737 2020-01-08 Simon Marchi <simon.marchi@efficios.com>
3738
3739 * thread.c (print_thread_info_1): Fix indentation.
3740
3741 2020-01-09 Christian Biesinger <cbiesinger@google.com>
3742
3743 * symtab.c (general_symbol_info::compute_and_set_names): Move the
3744 unique_xmalloc_ptr outside the if to always free the demangled name.
3745
3746 2020-01-08 Tom Tromey <tromey@adacore.com>
3747
3748 * xcoffread.c (enter_line_range, read_xcoff_symtab)
3749 (process_xcoff_symbol, xcoff_symfile_offsets): Update.
3750 * symtab.h (MSYMBOL_VALUE_ADDRESS): Update.
3751 (struct section_offsets, ANOFFSET, SIZEOF_N_SECTION_OFFSETS):
3752 Remove.
3753 (section_offsets): New typedef.
3754 * symtab.c (fixup_section, get_msymbol_address): Update.
3755 * symmisc.c (dump_msymbols): Update.
3756 * symfile.h (relative_addr_info_to_section_offsets)
3757 (symfile_map_offsets_to_segments): Update.
3758 * symfile.c (build_section_addr_info_from_objfile)
3759 (init_objfile_sect_indices): Update.
3760 (struct place_section_arg): Change type of "offsets".
3761 (place_section): Update.
3762 (relative_addr_info_to_section_offsets): Change type of
3763 "section_offsets". Remove "num_sections" parameter.
3764 (default_symfile_offsets, syms_from_objfile_1)
3765 (set_objfile_default_section_offset): Update.
3766 (reread_symbols): No need to preserve section offsets by hand.
3767 (symfile_map_offsets_to_segments): Change type of "offsets".
3768 * stap-probe.c (relocate_address): Update.
3769 * stabsread.h (process_one_symbol): Update.
3770 * solib-target.c (struct lm_info_target) <offsets>: Change type.
3771 (solib_target_relocate_section_addresses): Update.
3772 * solib-svr4.c (enable_break, svr4_relocate_main_executable):
3773 Update.
3774 * solib-frv.c (frv_relocate_main_executable): Update.
3775 * solib-dsbt.c (dsbt_relocate_main_executable): Update.
3776 * solib-aix.c (solib_aix_get_section_offsets): Change return
3777 type.
3778 (solib_aix_solib_create_inferior_hook): Update.
3779 * remote.c (remote_target::get_offsets): Update.
3780 * psymtab.c (find_pc_sect_psymtab): Update.
3781 * psympriv.h (struct partial_symbol) <address, text_low,
3782 text_high>: Update.
3783 * objfiles.h (obj_section_offset): Update.
3784 (struct objfile) <section_offsets>: Change type.
3785 <num_sections>: Remove.
3786 (objfile_relocate): Update.
3787 * objfiles.c (entry_point_address_query): Update
3788 (relocate_one_symbol): Change type of "section_offsets".
3789 (objfile_relocate1, objfile_relocate1): Change type of
3790 "new_offsets".
3791 (objfile_rebase1): Update.
3792 * mipsread.c (mipscoff_symfile_read): Update.
3793 (read_alphacoff_dynamic_symtab): Remove "section_offsets"
3794 parameter.
3795 * mdebugread.c (parse_symbol): Change type of "section_offsets".
3796 (parse_external, psymtab_to_symtab_1): Update.
3797 * machoread.c (macho_symfile_offsets): Update.
3798 * ia64-tdep.c (ia64_find_unwind_table): Update.
3799 * hppa-tdep.c (read_unwind_info): Update.
3800 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Update.
3801 * dwarf2read.c (create_addrmap_from_index)
3802 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
3803 (process_psymtab_comp_unit_reader, add_partial_symbol)
3804 (add_partial_subprogram, process_full_comp_unit)
3805 (read_file_scope, read_func_scope, read_lexical_block_scope)
3806 (read_call_site_scope, dwarf2_rnglists_process)
3807 (dwarf2_ranges_process, dwarf2_ranges_read)
3808 (dwarf_decode_lines_1, var_decode_location, new_symbol)
3809 (dwarf2_fetch_die_loc_sect_off, dwarf2_per_cu_text_offset):
3810 Update.
3811 * dwarf2-frame.c (execute_cfa_program, dwarf2_frame_find_fde):
3812 Update.
3813 * dtrace-probe.c (dtrace_probe::get_relocated_address): Update.
3814 * dbxread.c (read_dbx_symtab, read_ofile_symtab): Update.
3815 (process_one_symbol): Change type of "section_offsets".
3816 * ctfread.c (get_objfile_text_range): Update.
3817 * coffread.c (coff_symtab_read, enter_linenos)
3818 (process_coff_symbol): Update.
3819 * coff-pe-read.c (add_pe_forwarded_sym): Update.
3820 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Update.
3821
3822 2020-01-08 Tom Tromey <tromey@adacore.com>
3823
3824 * dwarf2read.c (parse_macro_definition): Use std::string.
3825 (parse_macro_definition): Likewise.
3826
3827 2020-01-08 Tom Tromey <tromey@adacore.com>
3828
3829 * dwarf2read.c (abbrev_table_read_table): Use std::vector.
3830 (ATTR_ALLOC_CHUNK): Remove.
3831
3832 2020-01-08 Tom Tromey <tromey@adacore.com>
3833
3834 * dwarf2read.c (fixup_go_packaging): Use unique_xmalloc_ptr.
3835
3836 2020-01-08 Tom Tromey <tromey@adacore.com>
3837
3838 * dwarf2read.c (add_partial_symbol): Use unique_xmalloc_ptr.
3839 (dwarf2_compute_name, open_dwo_file): Likewise.
3840 (process_enumeration_scope): Use std::vector.
3841 (guess_partial_die_structure_name): Use unique_xmalloc_ptr.
3842 (partial_die_info::fixup, dwarf2_start_subfile)
3843 (guess_full_die_structure_name, dwarf2_name): Likewise.
3844 (determine_prefix): Update.
3845 (guess_full_die_structure_name): Make return type const.
3846 (partial_die_full_name): Return unique_xmalloc_ptr.
3847 (DW_FIELD_ALLOC_CHUNK): Remove.
3848
3849 2020-01-07 Tom Tromey <tromey@adacore.com>
3850
3851 PR build/24937:
3852 * stap-probe.c (class stap_static_probe_ops): Add constructor.
3853
3854 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
3855
3856 * cli/cli-style.c: Set cli_styling to 'true' in the Cygwin build.
3857
3858 2020-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
3859
3860 * stack.c (print_frame_info): Move disassemble_next_line code
3861 inside source_print block.
3862
3863 2020-01-06 Eli Zaretskii <eliz@gnu.org>
3864
3865 * gdbsupport/gdb_wait.c: Include <signal.h> instead of
3866 gdb/signals.h, as we are now using native signal symbols.
3867
3868 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
3869
3870 * tui/tui-disasm.c (tui_disasm_window::addr_is_displayed): Avoid
3871 overflow by an early check of content vs threshold.
3872 * tui/tui-source.c (tui_source_window::line_is_displayed):
3873 Likewise.
3874
3875 2020-01-06 Eli Zaretskii <eliz@gnu.org>
3876
3877 * NEWS: Mention the recent fix of $_exitsignal on MS-Windows.
3878
3879 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
3880
3881 * coff-pe-read.c (read_pe_exported_syms): Don't try to read the
3882 export table if no section contains it's RVA.
3883
3884 2020-01-06 Eli Zaretskii <eliz@gnu.org>
3885
3886 * windows-tdep.c: Fix a typo in WINDOWS_SIGABRT.
3887
3888 2020-01-06 Hannes Domani <ssbssa@yahoo.de>
3889
3890 * source.c (print_source_lines_base): Set last_line_listed.
3891
3892 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
3893
3894 * tui/tui-disasm.c: Remove trailing spaces.
3895
3896 2020-01-06 Eli Zaretskii <eliz@gnu.org>
3897 Pedro Alves <palves@redhat.com>
3898
3899 * Makefile.in (COMMON_SFILES): Add gdbsupport/gdb_wait.c.
3900 * windows-tdep.c: New enumeration of WINDOWS_SIG* signals.
3901 (windows_gdb_signal_to_target): New function, uses the above
3902 enumeration to convert GDB internal signal codes to equivalent
3903 Windows codes.
3904 (windows_init_abi): Call set_gdbarch_gdb_signal_to_target.
3905 * windows-nat.c: Include "gdb_wait.h".
3906 (get_windows_debug_event): Extract the fatal exception from the
3907 exit status and convert to the equivalent Posix signal number.
3908 * cli/cli-cmds.c (exit_status_set_internal_vars): Account for the
3909 possibility that WTERMSIG returns GDB_SIGNAL_UNKNOWN.
3910 * gdbsupport/gdb_wait.c: New file, implements
3911 windows_status_to_termsig.
3912 * gdbsupport/gdb_wait.h (WIFEXITED, WIFSIGNALED, WEXITSTATUS)
3913 (WTERMSIG) [__MINGW32__]: Separate definitions for MinGW.
3914
3915 2020-01-05 Andrew Burgess <andrew.burgess@embecosm.com>
3916
3917 * tui/tui-layout.c (tui_add_win_to_layout): Use tui_set_layout not
3918 show_layout.
3919
3920 2020-01-05 Luis Machado <luis.machado@linaro.org>
3921
3922 * aarch64-linux-nat.c
3923 (aarch64_linux_nat_target::thread_architecture): Use bfd_arch_aarch64
3924 and bfd_mach_aarch64.
3925
3926 2020-01-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3927
3928 * ui-file.c (stdio_file::can_emit_style_escape)
3929 (tee_file::can_emit_style_escape): Ensure style is used also on
3930 gdb_stderr when gdb_stderr is a tty supporting styling, similarly
3931 to gdb_stdout.
3932 * main.c (set_gdb_data_directory): Use file style to output the
3933 warning that the given pathname is not a directory.
3934 * top.c (show_history_filename, gdb_safe_append_history)
3935 (show_gdb_datadir): Use file style.
3936
3937 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
3938
3939 * solib-target.c (struct lm_info_target):
3940 Change offsets to be a unique_xmalloc_ptr.
3941 (solib_target_relocate_section_addresses): Update.
3942
3943 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
3944
3945 * windows-nat.c (windows_clear_solib): Free so_list linked list.
3946
3947 2020-01-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
3948
3949 * MAINTAINERS (Write After Approval): Add myself.
3950
3951 2020-01-02 Luis Machado <luis.machado@linaro.org>
3952
3953 * proc-service.c (get_ps_regcache): Remove reference to obsolete
3954 Cell BE architecture.
3955 * target.h (struct target_ops) <thread_architecture>: Likewise.
3956
3957 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
3958
3959 * Makefile.in: Use INSTALL_PROGRAM_ENV.
3960
3961 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
3962
3963 * MAINTAINERS (Write After Approval): Add myself.
3964
3965 2020-01-01 Joel Brobecker <brobecker@adacore.com>
3966
3967 * gdbarch.sh: Update copyright year range of generated files.
3968
3969 2020-01-01 Joel Brobecker <brobecker@adacore.com>
3970
3971 Update copyright year range in all GDB files.
3972
3973 2020-01-01 Joel Brobecker <brobecker@adacore.com>
3974
3975 * copyright.py: Convert to Python 3.
3976
3977 2020-01-01 Joel Brobecker <brobecker@adacore.com>
3978
3979 * copyright.py: Adapt after move of gnulib directory from gdb
3980 directory to toplevel directory.
3981
3982 2020-01-01 Joel Brobecker <brobecker@adacore.com>
3983
3984 * copyright.py (main): Exit if run from the wrong directory.
3985
3986 2020-01-01 Joel Brobecker <brobecker@adacore.com>
3987
3988 * top.c (print_gdb_version): Change copyright year to 2020.
3989
3990 2020-01-01 Joel Brobecker <brobecker@adacore.com>
3991
3992 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2019.
3993
3994 For older changes see ChangeLog-2019.
3995 \f
3996 Local Variables:
3997 mode: change-log
3998 left-margin: 8
3999 fill-column: 74
4000 version-control: never
4001 coding: utf-8
4002 End: