Consolidate psymtab "Reading" messages
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2020-01-26 Tom Tromey <tom@tromey.com>
2
3 * xcoffread.c (xcoff_read_symtab): Remove prints. Add assert.
4 * psymtab.c (psymtab_to_symtab): Print verbose "Reading"
5 messages.
6 * mdebugread.c (mdebug_read_symtab): Remove prints.
7 * dwarf2read.c (dwarf2_psymtab::read_symtab): Remove prints. Add
8 assert.
9 * dbxread.c (dbx_read_symtab): Remove prints. Add assert.
10
11 2020-01-26 Tom Tromey <tom@tromey.com>
12
13 * xcoffread.c (this_symtab_psymtab, read_xcoff_symtab)
14 (xcoff_psymtab_to_symtab_1, xcoff_read_symtab)
15 (xcoff_start_psymtab, xcoff_end_psymtab, scan_xcoff_symtab): Use
16 legacy_symtab.
17 * stabsread.h (dbx_end_psymtab): Use legacy_symtab.
18 * psymtab.c (psymtab_to_symtab): Call method.
19 (dump_psymtab): Update.
20 * psympriv.h (struct partial_symtab): Add virtual destructor.
21 <read_symtab>: New method.
22 (struct legacy_symtab): New.
23 * mdebugread.c (mdebug_read_symtab): Use legacy_psymtab.
24 (struct pst_map) <pst>: Now a legacy_psymtab.
25 (parse_procedure, parse_partial_symbols, psymtab_to_symtab_1)
26 (new_psymtab): Use legacy_psymtab.
27 * dwarf2read.h (struct dwarf2_psymtab): New.
28 (struct dwarf2_per_cu_data) <psymtab>: Use it.
29 * dwarf2read.c (dwarf2_create_include_psymtab)
30 (dwarf2_build_include_psymtabs, create_type_unit_group)
31 (create_partial_symtab, process_psymtab_comp_unit_reader)
32 (build_type_psymtabs_reader, build_type_psymtab_dependencies)
33 (set_partial_user): Use dwarf2_psymtab.
34 (dwarf2_psymtab::read_symtab): Rename from dwarf2_read_symtab.
35 (psymtab_to_symtab_1, process_full_comp_unit)
36 (process_full_type_unit, dwarf2_ranges_read)
37 (dwarf2_get_pc_bounds, psymtab_include_file_name)
38 (dwarf_decode_lines): Use dwarf2_psymtab.
39 * dwarf-index-write.c (psym_index_map): Use dwarf2_psymtab.
40 (add_address_entry_worker, write_one_signatured_type)
41 (recursively_count_psymbols, recursively_write_psymbols)
42 (write_one_signatured_type, psyms_seen_size, write_gdbindex)
43 (write_debug_names): Likewise.
44 * dbxread.c (struct header_file_location): Take a legacy_psymtab.
45 <pst>: Now a legacy_psymtab.
46 (find_corresponding_bincl_psymtab): Return a legacy_psymtab.
47 (read_dbx_symtab, start_psymtab, dbx_end_psymtab)
48 (dbx_psymtab_to_symtab_1, read_ofile_symtab): Use legacy_psymtab.
49 * ctfread.c (struct ctf_psymtab): New.
50 (ctf_start_symtab, ctf_end_symtab, psymtab_to_symtab): Take a
51 ctf_psymtab.
52 (ctf_psymtab::read_symtab): Rename from ctf_read_symtab.
53 (create_partial_symtab): Return a ctf_psymtab.
54 (scan_partial_symbols): Update.
55
56 2020-01-26 Tom Tromey <tom@tromey.com>
57
58 * xcoffread.c (xcoff_start_psymtab): Use new.
59 * psymtab.c (partial_symtab::partial_symtab): New constructor,
60 renamed from start_psymtab_common.
61 * psympriv.h (struct partial_symtab): Add new constructor.
62 (start_psymtab_common): Don't declare.
63 * mdebugread.c (parse_partial_symbols): Use new.
64 * dwarf2read.c (create_partial_symtab): Use new.
65 * dbxread.c (start_psymtab): Use new.
66 * ctfread.c (create_partial_symtab): Use new.
67
68 2020-01-26 Tom Tromey <tom@tromey.com>
69
70 * xcoffread.c (xcoff_end_psymtab): Use new.
71 * psymtab.c (start_psymtab_common): Use new.
72 (partial_symtab::partial_symtab): Rename from allocate_psymtab.
73 Update.
74 * psympriv.h (struct partial_symtab): Add parameters to
75 constructor. Don't inline.
76 (allocate_psymtab): Don't declare.
77 * mdebugread.c (new_psymtab): Use new.
78 * dwarf2read.c (dwarf2_create_include_psymtab): Use new.
79 * dbxread.c (dbx_end_psymtab): Use new.
80
81 2020-01-26 Tom Tromey <tom@tromey.com>
82
83 * psymtab.h (class psymtab_storage) <install_psymtab>: Rename from
84 allocate_psymtab. Update documentation.
85 * psymtab.c (psymtab_storage::install_psymtab): Rename from
86 allocate_psymtab. Do not use new.
87 (allocate_psymtab): Use new. Update.
88
89 2020-01-26 Tom Tromey <tom@tromey.com>
90
91 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
92 * psymtab.c (psym_print_stats): Update.
93 * psympriv.h (struct partial_symtab) <readin,
94 psymtabs_addrmap_supported, anonymous>: Now bool.
95 * mdebugread.c (psymtab_to_symtab_1): Update.
96 * dwarf2read.c (create_type_unit_group, create_partial_symtab)
97 (build_type_psymtabs_reader, psymtab_to_symtab_1)
98 (process_full_comp_unit, process_full_type_unit): Update.
99 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
100 * ctfread.c (psymtab_to_symtab): Update.
101
102 2020-01-26 Tom Tromey <tom@tromey.com>
103
104 * mdebugread.c (parse_partial_symbols): Use discard_psymtab.
105 * psymtab.h (class psymtab_storage) <free_psymtabs>: Remove.
106 * psymtab.c (psymtab_storage): Delete psymtabs.
107 (psymtab_storage::allocate_psymtab): Use new.
108 (psymtab_storage::discard_psymtab): Use delete.
109 * psympriv.h (struct partial_symtab): Add constructor and
110 initializers.
111
112 2020-01-26 Tom Tromey <tom@tromey.com>
113
114 * machoread.c: Do not include psympriv.h.
115
116 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
117
118 * NEWS: Mention the new option and the set/show commands.
119
120 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
121
122 * exec.c (exec_file_mismatch_names, exec_file_mismatch_mode)
123 (show_exec_file_mismatch_command, set_exec_file_mismatch_command)
124 (validate_exec_file): New variables, enums, functions.
125 (exec_file_locate_attach, print_section_info): Style the filenames.
126 (_initialize_exec): Install show_exec_file_mismatch_command and
127 set_exec_file_mismatch_command.
128 * gdbcore.h (validate_exec_file): Declare.
129 * infcmd.c (attach_command): Call validate_exec_file.
130 * remote.c ( remote_target::remote_add_inferior): Likewise.
131
132 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
133
134 * frame.c (find_frame_sal): Move call to get_next_frame into more
135 inner scope.
136 * inline-frame.c (inilne_state) <inline_state>: Update argument
137 types.
138 (inilne_state) <skipped_symbol>: Rename to...
139 (inilne_state) <skipped_symbols>: ...this, and change to a vector.
140 (skip_inline_frames): Build vector of skipped symbols and use this
141 to reate the inline_state.
142 (inline_skipped_symbol): Add a comment and some assertions, fetch
143 skipped symbol from the list.
144
145 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
146
147 * buildsym.c (lte_is_less_than): Delete.
148 (buildsym_compunit::end_symtab_with_blockvector): Create local
149 lambda function to sort line table entries, and use
150 std::stable_sort instead of std::sort.
151 * symtab.c (find_pc_sect_line): Skip backward over end of sequence
152 markers when looking for a previous line.
153
154 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
155
156 * dwarf2read.c (lnp_state_machine::record_line): Include
157 end_sequence parameter in debug print out. Record the line if we
158 are at an end_sequence marker even if it's not the start of a
159 statement.
160 * symmisc.c (maintenance_print_one_line_table): Print end of
161 sequence markers with 'END' not '0'.
162
163 2020-01-24 Pedro Alves <palves@redhat.com>
164
165 PR gdb/25410
166 * thread.c (scoped_restore_current_thread::restore): Use
167 switch_to_inferior_no_thread.
168 * exec.c: Include "progspace-and-thread.h".
169 (add_target_sections, remove_target_sections):
170 scoped_restore_current_pspace_and_thread instead of
171 scoped_restore_current_thread.
172 * infrun.c (handle_vfork_child_exec_or_exit): Assign the pspace
173 and aspace to the inferior before calling clone_program_space.
174 Remove stale comment.
175
176 2020-01-24 Christian Biesinger <cbiesinger@google.com>
177
178 * arm-nbsd-nat.c (arm_nbsd_nat_target::fetch_registers): Rename to...
179 (arm_netbsd_nat_target::fetch_registers): ...this.
180 (arm_nbsd_nat_target::store_registers): Rename to...
181 (arm_netbsd_nat_target::store_registers): ...this.
182
183 2020-01-24 Christian Biesinger <cbiesinger@google.com>
184
185 * arm-nbsd-nat.c: Define _KERNTYPES to get the declaration of
186 register_t.
187
188 2020-01-24 Christian Biesinger <cbiesinger@google.com>
189
190 * aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections):
191 Update comment.
192 * aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections):
193 Likewise.
194 * arm-fbsd-tdep.c (arm_fbsd_iterate_over_regset_sections): Likewise.
195 * gdbcore.h (deprecated_add_core_fns): Update comment to point to
196 the correct replacement (iterate_over_regset_sections).
197 * riscv-fbsd-tdep.c (riscv_fbsd_iterate_over_regset_sections):
198 Update comment.
199
200 2020-01-24 Graham Markall <graham.markall@embecosm.com>
201
202 PR gdb/23718
203 * gdb/python/python.c (execute_gdb_command): Call
204 async_enable_stdin in catch block.
205
206 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
207
208 * event-loop.c (start_event_loop): Wrap async_enable_stdin with
209 SWITCH_THRU_ALL_UIS.
210
211 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
212
213 PR tui/9765
214 * minsyms.c (lookup_minimal_symbol_by_pc_section): Update header
215 comment, add extra parameter, and update to store previous symbol
216 when appropriate.
217 * minsyms.h (lookup_minimal_symbol_by_pc_section): Update comment,
218 add extra parameter.
219 * tui/tui-disasm.c (tui_disassemble): Update header comment,
220 remove unneeded parameter, add try/catch around gdb_print_insn,
221 rewrite to add items to asm_lines vector.
222 (tui_find_backward_disassembly_start_address): New function.
223 (tui_find_disassembly_address): Updated throughout.
224 (tui_disasm_window::set_contents): Update for changes to
225 tui_disassemble.
226 (tui_disasm_window::do_scroll_vertical): No need to adjust the
227 number of lines to scroll.
228
229 2020-01-23 Simon Marchi <simon.marchi@polymtl.ca>
230
231 * objfiles.h (ALL_OBJFILE_OSECTIONS): Move up.
232 (SECT_OFF_DATA): Likewise.
233 (SECT_OFF_RODATA): Likewise.
234 (SECT_OFF_TEXT): Likewise.
235 (SECT_OFF_BSS): Likewise.
236 (struct objfile) <text_section_offset, data_section_offset>: New
237 methods.
238 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Use
239 objfile::text_section_offset.
240 * coff-pe-read.c (add_pe_forwarded_sym): Likewise.
241 * coffread.c (coff_symtab_read): Likewise.
242 (enter_linenos): Likewise.
243 (process_coff_symbol): Likewise.
244 * ctfread.c (get_objfile_text_range): Likewise.
245 * dtrace-probe.c (dtrace_probe::get_relocated_address):
246 Use objfile::data_section_offset.
247 * dwarf2-frame.c (execute_cfa_program): Use
248 objfile::text_section_offset.
249 (dwarf2_frame_find_fde): Likewise.
250 * dwarf2read.c (create_addrmap_from_index): Likewise.
251 (create_addrmap_from_aranges): Likewise.
252 (dw2_find_pc_sect_compunit_symtab): Likewise.
253 (process_psymtab_comp_unit_reader): Likewise.
254 (add_partial_symbol): Likewise.
255 (add_partial_subprogram): Likewise.
256 (process_full_comp_unit): Likewise.
257 (read_file_scope): Likewise.
258 (read_func_scope): Likewise.
259 (read_lexical_block_scope): Likewise.
260 (read_call_site_scope): Likewise.
261 (dwarf2_rnglists_process): Likewise.
262 (dwarf2_ranges_process): Likewise.
263 (dwarf2_ranges_read): Likewise.
264 (dwarf_decode_lines_1): Likewise.
265 (new_symbol): Likewise.
266 (dwarf2_fetch_die_loc_sect_off): Likewise.
267 (dwarf2_per_cu_text_offset): Likewise.
268 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Likewise.
269 * hppa-tdep.c (read_unwind_info): Likewise.
270 * ia64-tdep.c (ia64_find_unwind_table): Likewise.
271 * psympriv.h (struct partial_symtab): Likewise.
272 * psymtab.c (find_pc_sect_psymtab): Likewise.
273 * solib-svr4.c (enable_break): Likewise.
274 * stap-probe.c (relocate_address): Use
275 objfile::data_section_offset.
276 * xcoffread.c (enter_line_range): Use
277 objfile::text_section_offset.
278 (read_xcoff_symtab): Likewise.
279
280 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
281
282 * darwin-nat.c (darwin_nat_target::wait_1): Move `inf`
283 declaration to narrower scopes.
284
285 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
286
287 * darwin-nat.h (struct darwin_exception_msg, enum
288 darwin_msg_state, struct darwin_thread_info, darwin_thread_t):
289 Move up.
290 (class darwin_nat_target) <wait_1, check_new_threads,
291 decode_exception_message, decode_message, stop_inferior,
292 init_thread_list, ptrace_him, cancel_breakpoint>: Declare.
293 * darwin-nat.c (darwin_check_new_threads): Rename to...
294 (darwin_nat_target::check_new_threads): ... this.
295 (darwin_suspend_inferior_it): Remove.
296 (darwin_decode_exception_message): Rename to...
297 (darwin_nat_target::decode_exception_message): ... this.
298 (darwin_nat_target::resume): Pass target to find_inferior_ptid.
299 (darwin_decode_message): Rename to...
300 (darwin_nat_target::decode_message): ... this.
301 (cancel_breakpoint): Rename to...
302 (darwin_nat_target::cancel_breakpoint): ... this.
303 (darwin_wait): Rename to...
304 (darwin_nat_target::wait_1): ... this. Use range-based for loop
305 instead of iterate_over_inferiors.
306 (darwin_nat_target::wait): Call wait_1 instead of darwin_wait.
307 (darwin_stop_inferior): Rename to...
308 (darwin_nat_target::stop_inferior): ... this.
309 (darwin_nat_target::kill): Call wait_1 instead of darwin_wait.
310 (darwin_init_thread_list): Rename to...
311 (darwin_nat_target::init_thread_list): ... this.
312 (darwin_ptrace_him): Rename to...
313 (darwin_nat_target::ptrace_him): ... this.
314 (darwin_nat_target::create_inferior): Pass lambda function to
315 fork_inferior.
316 (darwin_nat_target::detach): Call stop_inferior instead of
317 darwin_stop_inferior.
318 * fork-inferior.h (fork_inferior): Change init_trace_fun
319 parameter to gdb::function_view.
320 * fork-inferior.c (fork_inferior): Likewise.
321
322 2020-01-23 Hannes Domani <ssbssa@yahoo.de>
323
324 * i386-cygwin-tdep.c (core_process_module_section): Update.
325 * windows-nat.c (struct lm_info_windows): Add text_offset.
326 (windows_xfer_shared_libraries): Update.
327 * windows-tdep.c (windows_xfer_shared_library):
328 Add text_offset_cached argument.
329 * windows-tdep.h (windows_xfer_shared_library): Update.
330
331 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
332
333 * gdbarch.sh: Add declaration for _initialize_gdbarch.
334
335 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
336
337 * remote-sim.c (check_for_duplicate_sim_descriptor): Remove.
338 (get_sim_inferior_data): Remove use of iterate_over_inferiors,
339 replace with range-based for.
340 (gdbsim_interrupt_inferior): Remove.
341 (gdbsim_target::interrupt): Replace iterate_over_inferiors use
342 with a range-based for. Inline code from
343 gdbsim_interrupt_inferior.
344
345 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
346
347 * infrun.c (proceed): Fix indentation.
348
349 2020-01-21 Tom Tromey <tromey@adacore.com>
350
351 * source-cache.c (source_cache::ensure): Call ext_lang_colorize.
352 * python/python.c (python_extension_ops): Update.
353 (gdbpy_colorize): New function.
354 * python/lib/gdb/__init__.py (colorize): New function.
355 * extension.h (ext_lang_colorize): Declare.
356 * extension.c (ext_lang_colorize): New function.
357 * extension-priv.h (struct extension_language_ops) <colorize>: New
358 member.
359 * cli/cli-style.c (_initialize_cli_style): Update help text.
360
361 2020-01-21 Luis Machado <luis.machado@linaro.org>
362
363 * aarch64-tdep.c (struct aarch64_displaced_step_closure)
364 <cond>: Change type to bool.
365 (aarch64_displaced_step_b_cond): Update cond to use bool type.
366 (aarch64_displaced_step_cb): Likewise.
367 (aarch64_displaced_step_tb): Likewise.
368
369 2020-01-21 Luis Machado <luis.machado@linaro.org>
370
371 * aarch64-tdep.c (aarch64_displaced_step_fixup): Add more debugging
372 output.
373
374 2020-01-21 Luis Machado <luis.machado@linaro.org>
375
376 * aarch64-tdep.c (struct aarch64_displaced_step_closure )
377 <pc_adjust>: Adjust the documentation.
378 (aarch64_displaced_step_fixup): Check if PC really moved before
379 adjusting it.
380
381 2020-01-19 Tom Tromey <tom@tromey.com>
382
383 * disasm.c (~gdb_disassembler): New destructor.
384 (gdb_buffered_insn_length): Call disassemble_free_target.
385 * disasm.h (class gdb_disassembler): Declare destructor. Use
386 DISABLE_COPY_AND_ASSIGN.
387
388 2020-01-19 Tom Tromey <tom@tromey.com>
389
390 * dwarf2read.c (abbrev_table_up): Move typedef earlier.
391 (die_reader_func_ftype): Remove.
392 (cutu_reader): New class.
393 (dw2_get_file_names_reader): Remove "data" parameter.
394 (dw2_get_file_names): Use cutu_reader.
395 (create_debug_type_hash_table): Update.
396 (read_cutu_die_from_dwo): Update comment.
397 (lookup_dwo_unit): Add dwo_name parameter.
398 (cutu_reader::init_tu_and_read_dwo_dies): Now a method. Remove
399 die_reader_func_ftype and data parameters.
400 (cutu_reader::cutu_reader): Rename from init_cutu_and_read_dies.
401 Remove die_reader_func_ftype and data parameters.
402 (~cutu_reader): New; from init_cutu_and_read_dies.
403 (cutu_reader::cutu_reader): Rename from
404 init_cutu_and_read_dies_no_follow. Remove die_reader_func_ftype
405 and data parameters.
406 (init_cutu_and_read_dies_simple): Remove.
407 (struct process_psymtab_comp_unit_data): Remove.
408 (process_psymtab_comp_unit_reader): Remove data parameter; add
409 want_partial_unit and pretend_language parameters.
410 (process_psymtab_comp_unit): Use cutu_reader.
411 (build_type_psymtabs_reader): Remove data parameter.
412 (build_type_psymtabs_1): Use cutu_reader.
413 (process_skeletonless_type_unit): Likewise.
414 (load_partial_comp_unit_reader): Remove.
415 (load_partial_comp_unit): Use cutu_reader.
416 (load_full_comp_unit_reader): Remove.
417 (load_full_comp_unit): Use cutu_reader.
418 (struct create_dwo_cu_data): Remove.
419 (create_dwo_cu_reader): Remove datap parameter; add dwo_file and
420 dwo_unit parameters.
421 (create_cus_hash_table): Use cutu_reader.
422 (struct dwarf2_read_addr_index_data): Remove.
423 (dwarf2_read_addr_index_reader): Remove.
424 (dwarf2_read_addr_index): Use cutu_reader.
425 (read_signatured_type_reader): Remove.
426 (read_signatured_type): Use cutu_reader.
427
428 2020-01-19 Tom Tromey <tom@tromey.com>
429
430 * tui/tui.c (tui_show_assembly): Use tui_suppress_output.
431 * tui/tui-wingeneral.h (class tui_suppress_output): New.
432 (tui_wrefresh): Declare.
433 * tui/tui-wingeneral.c (suppress_output): New global.
434 (tui_suppress_output, ~tui_suppress_output): New constructor and
435 destructor.
436 (tui_wrefresh): New function.
437 (tui_gen_win_info::refresh_window): Use tui_wrefresh.
438 (tui_gen_win_info::make_window): Call wnoutrefresh when needed.
439 * tui/tui-regs.h (struct tui_data_window) <no_refresh>: Declare
440 method.
441 * tui/tui-regs.c (tui_data_window::erase_data_content): Call
442 tui_wrefresh.
443 (tui_data_window::no_refresh): New method.
444 (tui_data_item_window::refresh_window): Call tui_wrefresh.
445 (tui_reg_command): Use tui_suppress_output
446 * tui/tui-layout.c (tui_set_layout): Use tui_suppress_output.
447 * tui/tui-data.h (struct tui_gen_win_info) <no_refresh>: New
448 method.
449 * tui/tui-command.c (tui_refresh_cmd_win): Call tui_wrefresh.
450
451 2020-01-19 Tom Tromey <tom@tromey.com>
452
453 * tui/tui-winsource.c (tui_update_source_windows_with_line):
454 Handle case where symtab is null.
455
456 2020-01-19 Simon Marchi <simon.marchi@polymtl.ca>
457
458 * linux-fork.c (one_fork_p): Simplify.
459
460 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
461
462 * top.c (struct qt_args): Remove.
463 (kill_or_detach): Change return type to void, replace `void *`
464 parameter with a proper one.
465 (print_inferior_quit_action): Likewise.
466 (quit_confirm): Use range-based for loop to iterate over inferiors.
467 (quit_force): Likewise.
468
469 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
470
471 * mi/mi-main.c (run_one_inferior): Change return type to void, replace
472 `void *` parameter with proper parameters.
473 (mi_cmd_exec_run): Use range-based loop to iterate over inferiors.
474 (print_one_inferior): Change return type to void, replace `void *`
475 parameter with proper parameters.
476 (mi_cmd_list_thread_groups): Use range-based loop to iterate over
477 inferiors.
478 (get_other_inferior): Remove.
479 (mi_cmd_remove_inferior): Use range-based loop to iterate over
480 inferiors.
481
482 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
483
484 * mi/mi-interp.c (report_initial_inferior): Remove.
485 (mi_interp::init): Use range-based for to iterate over inferiors.
486
487 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
488
489 * python/py-inferior.c (build_inferior_list): Remove.
490 (gdbpy_ref): Use range-based for loop to iterate over inferiors.
491
492 2020-01-16 Christian Biesinger <cbiesinger@google.com>
493
494 * btrace.c (btrace_compute_ftrace_1): Fix spelling error (Unkown).
495 (btrace_stitch_trace): Likewise.
496 * charset.c (intermediate_encoding): Likewise (vaild).
497 * nat/linux-btrace.c (linux_read_pt): Likewise (Unkown).
498 * python/py-record-btrace.c (struct PyMethodDef): Likewise (occurences).
499 * record-btrace.c (record_btrace_print_conf): Likewise (unkown).
500
501 2020-01-16 Hannes Domani <ssbssa@yahoo.de>
502
503 * windows-tdep.c (windows_get_tlb_type):
504 Add rtl_user_process_parameters type.
505
506 2020-01-16 Pedro Alves <palves@redhat.com>
507 Norbert Lange <nolange79@gmail.com>
508
509 PR build/24805
510 * gdbsupport/gdb_proc_service.h (PS_EXPORT): New.
511 (ps_get_thread_area, ps_getpid, ps_lcontinue, ps_lgetfpregs)
512 (ps_lgetregs, ps_lsetfpregs, ps_lsetregs, ps_lstop, ps_pcontinue)
513 (ps_pdread, ps_pdwrite, ps_pglobal_lookup, ps_pstop, ps_ptread)
514 (ps_ptwrite, ps_lgetxregs, ps_lgetxregsize, ps_lsetxregs)
515 (ps_plog): Redeclare exported functions with default visibility.
516
517 2020-01-16 Nitika Achra <Nitika.Achra@amd.com>
518
519 * dwarf2loc.c (decode_debug_loclists_addresses): Handle
520 DW_LLE_base_addressx, DW_LLE_startx_length, DW_LLE_start_length.
521
522 2020-01-15 Simon Marchi <simon.marchi@efficios.com>
523
524 * infcmd.c (post_create_inferior): Use get_thread_regcache
525 instead of get_current_regcache.
526
527 2020-01-14 Tom Tromey <tom@tromey.com>
528
529 PR symtab/12535:
530 * python/python.c (gdbpy_decode_line): Treat empty string the same
531 as no argument.
532
533 2020-01-14 Tom Tromey <tom@tromey.com>
534
535 * Makefile.in (CLIBS): Remove second use of $(LIBIBERTY).
536
537 2020-01-14 Tom Tromey <tom@tromey.com>
538
539 * nat/linux-btrace.c: Don't include <config.h>.
540 * nat/linux-ptrace.c: Don't include <config.h>.
541 * nat/x86-linux-dregs.c: Don't include <config.h>.
542
543 2020-01-14 Tom Tromey <tom@tromey.com>
544
545 * configure: Rebuild.
546 * configure.ac: Move many checks to ../gdbsupport/common.m4.
547
548 2020-01-14 Tom Tromey <tom@tromey.com>
549
550 * nat/x86-linux-dregs.c: Include configh.h.
551 * nat/linux-ptrace.c: Include configh.h.
552 * nat/linux-btrace.c: Include configh.h.
553 * defs.h: Include config.h, bfd.h.
554 * configure.ac: Don't source common.host.
555 (CONFIG_OBS, CONFIG_SRCS): Remove gdbsupport files.
556 * configure: Rebuild.
557 * acinclude.m4: Update path.
558 * Makefile.in (SUPPORT, LIBSUPPORT, INCSUPPORT): New variables.
559 (CONFIG_SRC_SUBDIR): Remove gdbsupport.
560 (INTERNAL_CFLAGS_BASE): Add INCSUPPORT.
561 (CLIBS): Add LIBSUPPORT.
562 (CDEPS): Likewise.
563 (COMMON_SFILES): Remove gdbsupport files.
564 (HFILES_NO_SRCDIR): Likewise.
565 (stamp-version): Update path to create-version.sh.
566 (ALLDEPFILES): Remove gdbsupport files.
567
568 2020-01-14 Tom Tromey <tom@tromey.com>
569
570 * gdbsupport/common.m4 (GDB_AC_COMMON): Define WIN32APILIBS and
571 USE_WIN32API when needed.
572 * configure.ac (USE_WIN32API): Don't define.
573 (WIN32LIBS): Use WIN32APILIBS.
574 * configure: Rebuild.
575
576 2020-01-14 Tom Tromey <tom@tromey.com>
577
578 * configure: Rebuild.
579 * gdbsupport/common.m4 (GDB_AC_COMMON): Fix indentation.
580
581 2020-01-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
582
583 * skip.c (skip_function_command): Make skip w/o arguments use the
584 name of the inlined function if pc is inside any inlined function.
585
586 2020-01-14 Luis Machado <luis.machado@linaro.org>
587
588 * inf-ptrace.c (inf_ptrace_target::resume): Update comments.
589 * infrun.c (resume_1): Likewise.
590 (handle_inferior_event): Remove stale comment.
591 * linux-nat.c (linux_nat_target::resume): Update comments.
592 (save_stop_reason): Likewise.
593 (linux_nat_filter_event): Likewise.
594 * linux-nat.h (struct lwp_info) <stop_pc>, <stop_reason>: Likewise.
595
596 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
597
598 * elfread.c (record_minimal_symbol): Set section index to 0 for
599 non-allocatable sections.
600
601
602 2020-01-13 Ali Tamur <tamur@google.com>
603
604 * dwarf2read.c (dwarf2_debug_sections): Add debug_str_offsets sections.
605 (dwarf2_cu): Add str_offsets_base field. Change the type of addr_base
606 to gdb::optional. Update comments.
607 (dwo_file): Update comments.
608 (read_attribute): Update API to take an additional out parameter,
609 need_reprocess. This is used to mark attributes that need other
610 attributes (e.g. str_offsets_base) for correct computation which may not
611 have been read yet.
612 (read_attribute_reprocess): New function declaration.
613 (read_addr_index): Likewise.
614 (read_dwo_str_index): Likewise.
615 (read_stub_str_index): Likewise.
616 (dwarf2_per_objfile::locate_sections): Handle debug_str_offsets section.
617 (lookup_addr_base): New function definition.
618 (lookup_ranges_base): Likewise.
619 (read_cutu_die_from_dwo): Use the new functions: lookup_addr_base,
620 lookup_ranges_base.
621 (init_cutu_and_read_dies): Update comments.
622 (init_cutu_and_read_dies_no_follow): Change API to take parent compile
623 unit. This is used to inherit parent's str_offsets_base and addr_base.
624 Update comments.
625 (init_cutu_and_read_dies_simple): Reflect API changes.
626 (skip_one_die): Reflect API changes. Handle DW_FORM_rnglistx.
627 (create_cus_hash_table): Change API to take parent compile unit.
628 Reflect API changes.
629 (open_and_init_dwo_file): Reflect API changes.
630 (dwarf2_get_pc_bounds): Update comments.
631 (dwarf2_record_block_ranges): Likewise.
632 (read_full_die_1): Change implementation to reprocess attributes that
633 need str_offsets_base and addr_base.
634 (partial_die_info::read): Likewise.
635 (read_attribute_reprocess): New function definition.
636 (read_attribute_value): Change API to take an additional out parameter,
637 need_reprocess. Handle DW_FORM_rnglistx. No longer trigger an error
638 when a non-dwo compile unit has index based attributes.
639 (read_attribute): Reflect API changes.
640 (read_addr_index_1): Reflect API changes. Update comments.
641 (dwarf2_read_addr_index_data): Reflect API changes.
642 (dwarf2_read_addr_index): Likewise.
643 (read_str_index): Change API and implementation. This becomes a helper
644 to be used by the new string index related methods. Update error
645 message and comments.
646 (read_dwo_str_index): New function definition.
647 (read_stub_str_index): Likewise.
648 * dwarf2read.h (dwarf2_per_objfile): Add str_offsets field.
649 * symfile.h (dwarf2_debug_sections): Likewise.
650 * xcoffread.c (dwarf2_debug_sections): Likewise.
651
652 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
653
654 * gdbcore.h (struct core_fns) <core_read_registers>: Change
655 core_reg_sect type to gdb_byte *.
656 * arm-nbsd-nat.c (fetch_elfcore_registers): Likewise.
657 * cris-tdep.c (fetch_core_registers): Likewise.
658 * corelow.c (core_target::get_core_register_section): Change
659 type of `contents` to gdb::byte_vector.
660
661 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
662
663 * tui/tui-wingeneral.c (box_win): Position the title in the center
664 of the border.
665
666 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
667
668 * corelow.c (core_target::get_core_register_section): Use
669 std::vector instead of alloca.
670
671 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
672
673 * warning.m4: Add -Wmissing-declarations to build_warnings.
674 * configure: Re-generate.
675
676 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
677
678 * python/python.c (init__gdb_module): Add declaration.
679
680 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
681
682 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Add declaration.
683 * aarch64-fbsd-tdep.c (_initialize_aarch64_fbsd_tdep): Add declaration.
684 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Add declaration.
685 * aarch64-linux-tdep.c (_initialize_aarch64_linux_tdep): Add declaration.
686 * aarch64-newlib-tdep.c (_initialize_aarch64_newlib_tdep): Add declaration.
687 * aarch64-tdep.c (_initialize_aarch64_tdep): Add declaration.
688 * ada-exp.y (_initialize_ada_exp): Add declaration.
689 * ada-lang.c (_initialize_ada_language): Add declaration.
690 * ada-tasks.c (_initialize_tasks): Add declaration.
691 * agent.c (_initialize_agent): Add declaration.
692 * aix-thread.c (_initialize_aix_thread): Add declaration.
693 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Add declaration.
694 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Add declaration.
695 * alpha-linux-tdep.c (_initialize_alpha_linux_tdep): Add declaration.
696 * alpha-nbsd-tdep.c (_initialize_alphanbsd_tdep): Add declaration.
697 * alpha-obsd-tdep.c (_initialize_alphaobsd_tdep): Add declaration.
698 * alpha-tdep.c (_initialize_alpha_tdep): Add declaration.
699 * amd64-darwin-tdep.c (_initialize_amd64_darwin_tdep): Add declaration.
700 * amd64-dicos-tdep.c (_initialize_amd64_dicos_tdep): Add declaration.
701 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Add declaration.
702 * amd64-fbsd-tdep.c (_initialize_amd64fbsd_tdep): Add declaration.
703 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Add declaration.
704 * amd64-linux-tdep.c (_initialize_amd64_linux_tdep): Add declaration.
705 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Add declaration.
706 * amd64-nbsd-tdep.c (_initialize_amd64nbsd_tdep): Add declaration.
707 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Add declaration.
708 * amd64-obsd-tdep.c (_initialize_amd64obsd_tdep): Add declaration.
709 * amd64-sol2-tdep.c (_initialize_amd64_sol2_tdep): Add declaration.
710 * amd64-tdep.c (_initialize_amd64_tdep): Add declaration.
711 * amd64-windows-nat.c (_initialize_amd64_windows_nat): Add declaration.
712 * amd64-windows-tdep.c (_initialize_amd64_windows_tdep): Add declaration.
713 * annotate.c (_initialize_annotate): Add declaration.
714 * arc-newlib-tdep.c (_initialize_arc_newlib_tdep): Add declaration.
715 * arc-tdep.c (_initialize_arc_tdep): Add declaration.
716 * arch-utils.c (_initialize_gdbarch_utils): Add declaration.
717 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Add declaration.
718 * arm-fbsd-tdep.c (_initialize_arm_fbsd_tdep): Add declaration.
719 * arm-linux-nat.c (_initialize_arm_linux_nat): Add declaration.
720 * arm-linux-tdep.c (_initialize_arm_linux_tdep): Add declaration.
721 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Add declaration.
722 * arm-nbsd-tdep.c (_initialize_arm_netbsd_tdep): Add declaration.
723 * arm-obsd-tdep.c (_initialize_armobsd_tdep): Add declaration.
724 * arm-pikeos-tdep.c (_initialize_arm_pikeos_tdep): Add declaration.
725 * arm-symbian-tdep.c (_initialize_arm_symbian_tdep): Add declaration.
726 * arm-tdep.c (_initialize_arm_tdep): Add declaration.
727 * arm-wince-tdep.c (_initialize_arm_wince_tdep): Add declaration.
728 * auto-load.c (_initialize_auto_load): Add declaration.
729 * auxv.c (_initialize_auxv): Add declaration.
730 * avr-tdep.c (_initialize_avr_tdep): Add declaration.
731 * ax-gdb.c (_initialize_ax_gdb): Add declaration.
732 * bfin-linux-tdep.c (_initialize_bfin_linux_tdep): Add declaration.
733 * bfin-tdep.c (_initialize_bfin_tdep): Add declaration.
734 * break-catch-sig.c (_initialize_break_catch_sig): Add declaration.
735 * break-catch-syscall.c (_initialize_break_catch_syscall): Add declaration.
736 * break-catch-throw.c (_initialize_break_catch_throw): Add declaration.
737 * breakpoint.c (_initialize_breakpoint): Add declaration.
738 * bsd-uthread.c (_initialize_bsd_uthread): Add declaration.
739 * btrace.c (_initialize_btrace): Add declaration.
740 * charset.c (_initialize_charset): Add declaration.
741 * cli/cli-cmds.c (_initialize_cli_cmds): Add declaration.
742 * cli/cli-dump.c (_initialize_cli_dump): Add declaration.
743 * cli/cli-interp.c (_initialize_cli_interp): Add declaration.
744 * cli/cli-logging.c (_initialize_cli_logging): Add declaration.
745 * cli/cli-script.c (_initialize_cli_script): Add declaration.
746 * cli/cli-style.c (_initialize_cli_style): Add declaration.
747 * coff-pe-read.c (_initialize_coff_pe_read): Add declaration.
748 * coffread.c (_initialize_coffread): Add declaration.
749 * compile/compile-cplus-types.c (_initialize_compile_cplus_types): Add declaration.
750 * compile/compile.c (_initialize_compile): Add declaration.
751 * complaints.c (_initialize_complaints): Add declaration.
752 * completer.c (_initialize_completer): Add declaration.
753 * copying.c (_initialize_copying): Add declaration.
754 * corefile.c (_initialize_core): Add declaration.
755 * corelow.c (_initialize_corelow): Add declaration.
756 * cp-abi.c (_initialize_cp_abi): Add declaration.
757 * cp-namespace.c (_initialize_cp_namespace): Add declaration.
758 * cp-support.c (_initialize_cp_support): Add declaration.
759 * cp-valprint.c (_initialize_cp_valprint): Add declaration.
760 * cris-linux-tdep.c (_initialize_cris_linux_tdep): Add declaration.
761 * cris-tdep.c (_initialize_cris_tdep): Add declaration.
762 * csky-linux-tdep.c (_initialize_csky_linux_tdep): Add declaration.
763 * csky-tdep.c (_initialize_csky_tdep): Add declaration.
764 * ctfread.c (_initialize_ctfread): Add declaration.
765 * d-lang.c (_initialize_d_language): Add declaration.
766 * darwin-nat-info.c (_initialize_darwin_info_commands): Add declaration.
767 * darwin-nat.c (_initialize_darwin_nat): Add declaration.
768 * dbxread.c (_initialize_dbxread): Add declaration.
769 * dcache.c (_initialize_dcache): Add declaration.
770 * disasm-selftests.c (_initialize_disasm_selftests): Add declaration.
771 * disasm.c (_initialize_disasm): Add declaration.
772 * dtrace-probe.c (_initialize_dtrace_probe): Add declaration.
773 * dummy-frame.c (_initialize_dummy_frame): Add declaration.
774 * dwarf-index-cache.c (_initialize_index_cache): Add declaration.
775 * dwarf-index-write.c (_initialize_dwarf_index_write): Add declaration.
776 * dwarf2-frame-tailcall.c (_initialize_tailcall_frame): Add declaration.
777 * dwarf2-frame.c (_initialize_dwarf2_frame): Add declaration.
778 * dwarf2expr.c (_initialize_dwarf2expr): Add declaration.
779 * dwarf2loc.c (_initialize_dwarf2loc): Add declaration.
780 * dwarf2read.c (_initialize_dwarf2_read): Add declaration.
781 * elfread.c (_initialize_elfread): Add declaration.
782 * exec.c (_initialize_exec): Add declaration.
783 * extension.c (_initialize_extension): Add declaration.
784 * f-lang.c (_initialize_f_language): Add declaration.
785 * f-valprint.c (_initialize_f_valprint): Add declaration.
786 * fbsd-nat.c (_initialize_fbsd_nat): Add declaration.
787 * fbsd-tdep.c (_initialize_fbsd_tdep): Add declaration.
788 * filesystem.c (_initialize_filesystem): Add declaration.
789 * findcmd.c (_initialize_mem_search): Add declaration.
790 * findvar.c (_initialize_findvar): Add declaration.
791 * fork-child.c (_initialize_fork_child): Add declaration.
792 * frame-base.c (_initialize_frame_base): Add declaration.
793 * frame-unwind.c (_initialize_frame_unwind): Add declaration.
794 * frame.c (_initialize_frame): Add declaration.
795 * frv-linux-tdep.c (_initialize_frv_linux_tdep): Add declaration.
796 * frv-tdep.c (_initialize_frv_tdep): Add declaration.
797 * ft32-tdep.c (_initialize_ft32_tdep): Add declaration.
798 * gcore.c (_initialize_gcore): Add declaration.
799 * gdb-demangle.c (_initialize_gdb_demangle): Add declaration.
800 * gdb_bfd.c (_initialize_gdb_bfd): Add declaration.
801 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Add declaration.
802 * gdbarch.c (_initialize_gdbarch): Add declaration.
803 * gdbtypes.c (_initialize_gdbtypes): Add declaration.
804 * gnu-nat.c (_initialize_gnu_nat): Add declaration.
805 * gnu-v2-abi.c (_initialize_gnu_v2_abi): Add declaration.
806 * gnu-v3-abi.c (_initialize_gnu_v3_abi): Add declaration.
807 * go-lang.c (_initialize_go_language): Add declaration.
808 * go32-nat.c (_initialize_go32_nat): Add declaration.
809 * guile/guile.c (_initialize_guile): Add declaration.
810 * h8300-tdep.c (_initialize_h8300_tdep): Add declaration.
811 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Add declaration.
812 * hppa-linux-tdep.c (_initialize_hppa_linux_tdep): Add declaration.
813 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Add declaration.
814 * hppa-nbsd-tdep.c (_initialize_hppanbsd_tdep): Add declaration.
815 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Add declaration.
816 * hppa-obsd-tdep.c (_initialize_hppabsd_tdep): Add declaration.
817 * hppa-tdep.c (_initialize_hppa_tdep): Add declaration.
818 * i386-bsd-nat.c (_initialize_i386bsd_nat): Add declaration.
819 * i386-cygwin-tdep.c (_initialize_i386_cygwin_tdep): Add declaration.
820 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Add declaration.
821 * i386-darwin-tdep.c (_initialize_i386_darwin_tdep): Add declaration.
822 * i386-dicos-tdep.c (_initialize_i386_dicos_tdep): Add declaration.
823 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Add declaration.
824 * i386-fbsd-tdep.c (_initialize_i386fbsd_tdep): Add declaration.
825 * i386-gnu-nat.c (_initialize_i386gnu_nat): Add declaration.
826 * i386-gnu-tdep.c (_initialize_i386gnu_tdep): Add declaration.
827 * i386-go32-tdep.c (_initialize_i386_go32_tdep): Add declaration.
828 * i386-linux-nat.c (_initialize_i386_linux_nat): Add declaration.
829 * i386-linux-tdep.c (_initialize_i386_linux_tdep): Add declaration.
830 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Add declaration.
831 * i386-nbsd-tdep.c (_initialize_i386nbsd_tdep): Add declaration.
832 * i386-nto-tdep.c (_initialize_i386nto_tdep): Add declaration.
833 * i386-obsd-nat.c (_initialize_i386obsd_nat): Add declaration.
834 * i386-obsd-tdep.c (_initialize_i386obsd_tdep): Add declaration.
835 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Add declaration.
836 * i386-sol2-tdep.c (_initialize_i386_sol2_tdep): Add declaration.
837 * i386-tdep.c (_initialize_i386_tdep): Add declaration.
838 * i386-windows-nat.c (_initialize_i386_windows_nat): Add declaration.
839 * ia64-libunwind-tdep.c (_initialize_libunwind_frame): Add declaration.
840 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Add declaration.
841 * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Add declaration.
842 * ia64-tdep.c (_initialize_ia64_tdep): Add declaration.
843 * ia64-vms-tdep.c (_initialize_ia64_vms_tdep): Add declaration.
844 * infcall.c (_initialize_infcall): Add declaration.
845 * infcmd.c (_initialize_infcmd): Add declaration.
846 * inflow.c (_initialize_inflow): Add declaration.
847 * infrun.c (_initialize_infrun): Add declaration.
848 * interps.c (_initialize_interpreter): Add declaration.
849 * iq2000-tdep.c (_initialize_iq2000_tdep): Add declaration.
850 * jit.c (_initialize_jit): Add declaration.
851 * language.c (_initialize_language): Add declaration.
852 * linux-fork.c (_initialize_linux_fork): Add declaration.
853 * linux-nat.c (_initialize_linux_nat): Add declaration.
854 * linux-tdep.c (_initialize_linux_tdep): Add declaration.
855 * linux-thread-db.c (_initialize_thread_db): Add declaration.
856 * lm32-tdep.c (_initialize_lm32_tdep): Add declaration.
857 * m2-lang.c (_initialize_m2_language): Add declaration.
858 * m32c-tdep.c (_initialize_m32c_tdep): Add declaration.
859 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Add declaration.
860 * m32r-linux-tdep.c (_initialize_m32r_linux_tdep): Add declaration.
861 * m32r-tdep.c (_initialize_m32r_tdep): Add declaration.
862 * m68hc11-tdep.c (_initialize_m68hc11_tdep): Add declaration.
863 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Add declaration.
864 * m68k-bsd-tdep.c (_initialize_m68kbsd_tdep): Add declaration.
865 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Add declaration.
866 * m68k-linux-tdep.c (_initialize_m68k_linux_tdep): Add declaration.
867 * m68k-tdep.c (_initialize_m68k_tdep): Add declaration.
868 * machoread.c (_initialize_machoread): Add declaration.
869 * macrocmd.c (_initialize_macrocmd): Add declaration.
870 * macroscope.c (_initialize_macroscope): Add declaration.
871 * maint-test-options.c (_initialize_maint_test_options): Add declaration.
872 * maint-test-settings.c (_initialize_maint_test_settings): Add declaration.
873 * maint.c (_initialize_maint_cmds): Add declaration.
874 * mdebugread.c (_initialize_mdebugread): Add declaration.
875 * memattr.c (_initialize_mem): Add declaration.
876 * mep-tdep.c (_initialize_mep_tdep): Add declaration.
877 * mi/mi-cmd-env.c (_initialize_mi_cmd_env): Add declaration.
878 * mi/mi-cmds.c (_initialize_mi_cmds): Add declaration.
879 * mi/mi-interp.c (_initialize_mi_interp): Add declaration.
880 * mi/mi-main.c (_initialize_mi_main): Add declaration.
881 * microblaze-linux-tdep.c (_initialize_microblaze_linux_tdep): Add declaration.
882 * microblaze-tdep.c (_initialize_microblaze_tdep): Add declaration.
883 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Add declaration.
884 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Add declaration.
885 * mips-linux-nat.c (_initialize_mips_linux_nat): Add declaration.
886 * mips-linux-tdep.c (_initialize_mips_linux_tdep): Add declaration.
887 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Add declaration.
888 * mips-nbsd-tdep.c (_initialize_mipsnbsd_tdep): Add declaration.
889 * mips-sde-tdep.c (_initialize_mips_sde_tdep): Add declaration.
890 * mips-tdep.c (_initialize_mips_tdep): Add declaration.
891 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Add declaration.
892 * mips64-obsd-tdep.c (_initialize_mips64obsd_tdep): Add declaration.
893 * mipsread.c (_initialize_mipsread): Add declaration.
894 * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Add declaration.
895 * mn10300-tdep.c (_initialize_mn10300_tdep): Add declaration.
896 * moxie-tdep.c (_initialize_moxie_tdep): Add declaration.
897 * msp430-tdep.c (_initialize_msp430_tdep): Add declaration.
898 * nds32-tdep.c (_initialize_nds32_tdep): Add declaration.
899 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Add declaration.
900 * nios2-tdep.c (_initialize_nios2_tdep): Add declaration.
901 * nto-procfs.c (_initialize_procfs): Add declaration.
902 * objc-lang.c (_initialize_objc_language): Add declaration.
903 * observable.c (_initialize_observer): Add declaration.
904 * opencl-lang.c (_initialize_opencl_language): Add declaration.
905 * or1k-linux-tdep.c (_initialize_or1k_linux_tdep): Add declaration.
906 * or1k-tdep.c (_initialize_or1k_tdep): Add declaration.
907 * osabi.c (_initialize_gdb_osabi): Add declaration.
908 * osdata.c (_initialize_osdata): Add declaration.
909 * p-valprint.c (_initialize_pascal_valprint): Add declaration.
910 * parse.c (_initialize_parse): Add declaration.
911 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Add declaration.
912 * ppc-fbsd-tdep.c (_initialize_ppcfbsd_tdep): Add declaration.
913 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Add declaration.
914 * ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Add declaration.
915 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Add declaration.
916 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Add declaration.
917 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Add declaration.
918 * ppc-obsd-tdep.c (_initialize_ppcobsd_tdep): Add declaration.
919 * printcmd.c (_initialize_printcmd): Add declaration.
920 * probe.c (_initialize_probe): Add declaration.
921 * proc-api.c (_initialize_proc_api): Add declaration.
922 * proc-events.c (_initialize_proc_events): Add declaration.
923 * proc-service.c (_initialize_proc_service): Add declaration.
924 * procfs.c (_initialize_procfs): Add declaration.
925 * producer.c (_initialize_producer): Add declaration.
926 * psymtab.c (_initialize_psymtab): Add declaration.
927 * python/python.c (_initialize_python): Add declaration.
928 * ravenscar-thread.c (_initialize_ravenscar): Add declaration.
929 * record-btrace.c (_initialize_record_btrace): Add declaration.
930 * record-full.c (_initialize_record_full): Add declaration.
931 * record.c (_initialize_record): Add declaration.
932 * regcache-dump.c (_initialize_regcache_dump): Add declaration.
933 * regcache.c (_initialize_regcache): Add declaration.
934 * reggroups.c (_initialize_reggroup): Add declaration.
935 * remote-notif.c (_initialize_notif): Add declaration.
936 * remote-sim.c (_initialize_remote_sim): Add declaration.
937 * remote.c (_initialize_remote): Add declaration.
938 * reverse.c (_initialize_reverse): Add declaration.
939 * riscv-fbsd-nat.c (_initialize_riscv_fbsd_nat): Add declaration.
940 * riscv-fbsd-tdep.c (_initialize_riscv_fbsd_tdep): Add declaration.
941 * riscv-linux-nat.c (_initialize_riscv_linux_nat): Add declaration.
942 * riscv-linux-tdep.c (_initialize_riscv_linux_tdep): Add declaration.
943 * riscv-tdep.c (_initialize_riscv_tdep): Add declaration.
944 * rl78-tdep.c (_initialize_rl78_tdep): Add declaration.
945 * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Add declaration.
946 * rs6000-lynx178-tdep.c (_initialize_rs6000_lynx178_tdep):
947 Add declaration.
948 * rs6000-nat.c (_initialize_rs6000_nat): Add declaration.
949 * rs6000-tdep.c (_initialize_rs6000_tdep): Add declaration.
950 * run-on-main-thread.c (_initialize_run_on_main_thread): Add declaration.
951 * rust-exp.y (_initialize_rust_exp): Add declaration.
952 * rx-tdep.c (_initialize_rx_tdep): Add declaration.
953 * s12z-tdep.c (_initialize_s12z_tdep): Add declaration.
954 * s390-linux-nat.c (_initialize_s390_nat): Add declaration.
955 * s390-linux-tdep.c (_initialize_s390_linux_tdep): Add declaration.
956 * s390-tdep.c (_initialize_s390_tdep): Add declaration.
957 * score-tdep.c (_initialize_score_tdep): Add declaration.
958 * ser-go32.c (_initialize_ser_dos): Add declaration.
959 * ser-mingw.c (_initialize_ser_windows): Add declaration.
960 * ser-pipe.c (_initialize_ser_pipe): Add declaration.
961 * ser-tcp.c (_initialize_ser_tcp): Add declaration.
962 * ser-uds.c (_initialize_ser_socket): Add declaration.
963 * ser-unix.c (_initialize_ser_hardwire): Add declaration.
964 * serial.c (_initialize_serial): Add declaration.
965 * sh-linux-tdep.c (_initialize_sh_linux_tdep): Add declaration.
966 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Add declaration.
967 * sh-nbsd-tdep.c (_initialize_shnbsd_tdep): Add declaration.
968 * sh-tdep.c (_initialize_sh_tdep): Add declaration.
969 * skip.c (_initialize_step_skip): Add declaration.
970 * sol-thread.c (_initialize_sol_thread): Add declaration.
971 * solib-aix.c (_initialize_solib_aix): Add declaration.
972 * solib-darwin.c (_initialize_darwin_solib): Add declaration.
973 * solib-dsbt.c (_initialize_dsbt_solib): Add declaration.
974 * solib-frv.c (_initialize_frv_solib): Add declaration.
975 * solib-svr4.c (_initialize_svr4_solib): Add declaration.
976 * solib-target.c (_initialize_solib_target): Add declaration.
977 * solib.c (_initialize_solib): Add declaration.
978 * source-cache.c (_initialize_source_cache): Add declaration.
979 * source.c (_initialize_source): Add declaration.
980 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Add declaration.
981 * sparc-linux-tdep.c (_initialize_sparc_linux_tdep): Add declaration.
982 * sparc-nat.c (_initialize_sparc_nat): Add declaration.
983 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Add declaration.
984 * sparc-nbsd-tdep.c (_initialize_sparcnbsd_tdep): Add declaration.
985 * sparc-obsd-tdep.c (_initialize_sparc32obsd_tdep): Add declaration.
986 * sparc-sol2-tdep.c (_initialize_sparc_sol2_tdep): Add declaration.
987 * sparc-tdep.c (_initialize_sparc_tdep): Add declaration.
988 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Add declaration.
989 * sparc64-fbsd-tdep.c (_initialize_sparc64fbsd_tdep): Add declaration.
990 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Add declaration.
991 * sparc64-linux-tdep.c (_initialize_sparc64_linux_tdep): Add declaration.
992 * sparc64-nat.c (_initialize_sparc64_nat): Add declaration.
993 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Add declaration.
994 * sparc64-nbsd-tdep.c (_initialize_sparc64nbsd_tdep): Add declaration.
995 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Add declaration.
996 * sparc64-obsd-tdep.c (_initialize_sparc64obsd_tdep): Add declaration.
997 * sparc64-sol2-tdep.c (_initialize_sparc64_sol2_tdep): Add declaration.
998 * sparc64-tdep.c (_initialize_sparc64_adi_tdep): Add declaration.
999 * stabsread.c (_initialize_stabsread): Add declaration.
1000 * stack.c (_initialize_stack): Add declaration.
1001 * stap-probe.c (_initialize_stap_probe): Add declaration.
1002 * std-regs.c (_initialize_frame_reg): Add declaration.
1003 * symfile-debug.c (_initialize_symfile_debug): Add declaration.
1004 * symfile-mem.c (_initialize_symfile_mem): Add declaration.
1005 * symfile.c (_initialize_symfile): Add declaration.
1006 * symmisc.c (_initialize_symmisc): Add declaration.
1007 * symtab.c (_initialize_symtab): Add declaration.
1008 * target.c (_initialize_target): Add declaration.
1009 * target-connection.c (_initialize_target_connection): Add
1010 declaration.
1011 * target-dcache.c (_initialize_target_dcache): Add declaration.
1012 * target-descriptions.c (_initialize_target_descriptions): Add declaration.
1013 * thread.c (_initialize_thread): Add declaration.
1014 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Add declaration.
1015 * tic6x-tdep.c (_initialize_tic6x_tdep): Add declaration.
1016 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Add declaration.
1017 * tilegx-linux-tdep.c (_initialize_tilegx_linux_tdep): Add declaration.
1018 * tilegx-tdep.c (_initialize_tilegx_tdep): Add declaration.
1019 * tracectf.c (_initialize_ctf): Add declaration.
1020 * tracefile-tfile.c (_initialize_tracefile_tfile): Add declaration.
1021 * tracefile.c (_initialize_tracefile): Add declaration.
1022 * tracepoint.c (_initialize_tracepoint): Add declaration.
1023 * tui/tui-hooks.c (_initialize_tui_hooks): Add declaration.
1024 * tui/tui-interp.c (_initialize_tui_interp): Add declaration.
1025 * tui/tui-layout.c (_initialize_tui_layout): Add declaration.
1026 * tui/tui-regs.c (_initialize_tui_regs): Add declaration.
1027 * tui/tui-stack.c (_initialize_tui_stack): Add declaration.
1028 * tui/tui-win.c (_initialize_tui_win): Add declaration.
1029 * tui/tui.c (_initialize_tui): Add declaration.
1030 * typeprint.c (_initialize_typeprint): Add declaration.
1031 * ui-style.c (_initialize_ui_style): Add declaration.
1032 * unittests/array-view-selftests.c (_initialize_array_view_selftests): Add declaration.
1033 * unittests/child-path-selftests.c (_initialize_child_path_selftests): Add declaration.
1034 * unittests/cli-utils-selftests.c (_initialize_cli_utils_selftests): Add declaration.
1035 * unittests/common-utils-selftests.c (_initialize_common_utils_selftests): Add declaration.
1036 * unittests/copy_bitwise-selftests.c (_initialize_copy_bitwise_utils_selftests): Add declaration.
1037 * unittests/environ-selftests.c (_initialize_environ_selftests): Add declaration.
1038 * unittests/filtered_iterator-selftests.c
1039 (_initialize_filtered_iterator_selftests): Add declaration.
1040 * unittests/format_pieces-selftests.c (_initialize_format_pieces_selftests): Add declaration.
1041 * unittests/function-view-selftests.c (_initialize_function_view_selftests): Add declaration.
1042 * unittests/help-doc-selftests.c (_initialize_help_doc_selftests): Add declaration.
1043 * unittests/lookup_name_info-selftests.c (_initialize_lookup_name_info_selftests): Add declaration.
1044 * unittests/main-thread-selftests.c
1045 (_initialize_main_thread_selftests): Add declaration.
1046 * unittests/memory-map-selftests.c (_initialize_memory_map_selftests): Add declaration.
1047 * unittests/memrange-selftests.c (_initialize_memrange_selftests): Add declaration.
1048 * unittests/mkdir-recursive-selftests.c (_initialize_mkdir_recursive_selftests): Add declaration.
1049 * unittests/observable-selftests.c (_initialize_observer_selftest): Add declaration.
1050 * unittests/offset-type-selftests.c (_initialize_offset_type_selftests): Add declaration.
1051 * unittests/optional-selftests.c (_initialize_optional_selftests): Add declaration.
1052 * unittests/parse-connection-spec-selftests.c (_initialize_parse_connection_spec_selftests): Add declaration.
1053 * unittests/rsp-low-selftests.c (_initialize_rsp_low_selftests): Add declaration.
1054 * unittests/scoped_fd-selftests.c (_initialize_scoped_fd_selftests): Add declaration.
1055 * unittests/scoped_mmap-selftests.c (_initialize_scoped_mmap_selftests): Add declaration.
1056 * unittests/scoped_restore-selftests.c (_initialize_scoped_restore_selftests): Add declaration.
1057 * unittests/string_view-selftests.c (_initialize_string_view_selftests): Add declaration.
1058 * unittests/style-selftests.c (_initialize_style_selftest): Add declaration.
1059 * unittests/tracepoint-selftests.c (_initialize_tracepoint_selftests): Add declaration.
1060 * unittests/tui-selftests.c (_initialize_tui_selftest): Add
1061 declaration.
1062 * unittests/unpack-selftests.c (_initialize_unpack_selftests): Add declaration.
1063 * unittests/utils-selftests.c (_initialize_utils_selftests): Add declaration.
1064 * unittests/vec-utils-selftests.c (_initialize_vec_utils_selftests): Add declaration.
1065 * unittests/xml-utils-selftests.c (_initialize_xml_utils): Add declaration.
1066 * user-regs.c (_initialize_user_regs): Add declaration.
1067 * utils.c (_initialize_utils): Add declaration.
1068 * v850-tdep.c (_initialize_v850_tdep): Add declaration.
1069 * valops.c (_initialize_valops): Add declaration.
1070 * valprint.c (_initialize_valprint): Add declaration.
1071 * value.c (_initialize_values): Add declaration.
1072 * varobj.c (_initialize_varobj): Add declaration.
1073 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Add declaration.
1074 * vax-nbsd-tdep.c (_initialize_vaxnbsd_tdep): Add declaration.
1075 * vax-tdep.c (_initialize_vax_tdep): Add declaration.
1076 * windows-nat.c (_initialize_windows_nat): Add declaration.
1077 (_initialize_check_for_gdb_ini): Add declaration.
1078 (_initialize_loadable): Add declaration.
1079 * windows-tdep.c (_initialize_windows_tdep): Add declaration.
1080 * x86-bsd-nat.c (_initialize_x86_bsd_nat): Add declaration.
1081 * x86-linux-nat.c (_initialize_x86_linux_nat): Add declaration.
1082 * xcoffread.c (_initialize_xcoffread): Add declaration.
1083 * xml-support.c (_initialize_xml_support): Add declaration.
1084 * xstormy16-tdep.c (_initialize_xstormy16_tdep): Add declaration.
1085 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Add declaration.
1086 * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Add declaration.
1087 * xtensa-tdep.c (_initialize_xtensa_tdep): Add declaration.
1088
1089 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
1090
1091 * regformats/regdat.sh: Generate declaration for init function.
1092
1093 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
1094
1095 * remote-sim.c (next_pid, INITIAL_PID, sim_inferior_data): Move
1096 up.
1097 (gdbsim_target) <get_inferior_data_by_ptid, resume_one_inferior,
1098 close_one_inferior>: New methods.
1099 (get_sim_inferior_data_by_ptid): Move to gdbsim_target,
1100 pass down target to find_inferior_pid.
1101 (gdbsim_target::fetch_registers, gdbsim_target::store_registers):
1102 Pass down target to find_inferior_ptid.
1103 (gdbsim_target::create_inferior): Pass down target to
1104 add_thread_silent.
1105 (gdbsim_close_inferior): Move to gdbsim_close_inferior, pass
1106 target down to find_inferior_ptid and switch_to_thread.
1107 (gdbsim_target::close): Update to call close_one_inferior.
1108 (struct resume_data): Remove.
1109 (gdbsim_resume_inferior): Move to gdbsim_target. Take arguments
1110 directly, rather than through a void pointer.
1111 (gdbsim_target::resume): Update to call resume_one_inferior.
1112
1113 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1114
1115 * gdbsupport/gdb_wait.c: Include gdb_wait.h.
1116
1117 2020-01-12 Pedro Alves <palves@redhat.com>
1118
1119 * bsd-kvm.c (bsd_kvm_target::close): Call exit_inferior_silent
1120 directly for the current inferior instead of
1121 discard_all_inferiors.
1122 (discard_all_inferiors): Delete.
1123
1124 2020-01-11 Tom Tromey <tom@tromey.com>
1125
1126 * tui/tui-wingeneral.c (box_win): Check cli_styling.
1127 * tui/tui-winsource.c (tui_source_window_base::refill): Use
1128 deprecated_safe_get_selected_frame.
1129
1130 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1131
1132 * inferior.c (print_inferior): Switch inferior before printing it.
1133
1134 2020-01-10 Aleksandar Paunovic <aleksandar.paunovic@intel.com>
1135 Pedro Alves <palves@redhat.com>
1136
1137 * progspace-and-thread.c (switch_to_program_space_and_thread):
1138 Assert there's an inferior for PSPACE. Use
1139 switch_to_inferior_no_thread to switch the inferior too.
1140 * progspace.c (program_space::~program_space): Call
1141 clear_symtab_users here, with SYMFILE_DEFER_BP_RESET.
1142 (program_space::free_all_objfiles): Don't call clear_symtab_users
1143 here.
1144 * symfile.c (symbol_file_clear): Call clear_symtab_users here.
1145
1146 2020-01-10 Pedro Alves <palves@redhat.com>
1147
1148 * NEWS: Mention multi-target debugging, "info connections", and
1149 "add-inferior -no-connection".
1150
1151 2020-01-10 Pedro Alves <palves@redhat.com>
1152
1153 * infrun.c: Include "target-connection.h".
1154 (check_multi_target_resumption): New.
1155 (proceed): Call it.
1156 * target-connection.c (make_target_connection_string): Make
1157 extern.
1158 * target-connection.h (make_target_connection_string): Declare.
1159
1160 2020-01-10 Pedro Alves <palves@redhat.com>
1161
1162 * Makefile.in (COMMON_SFILES): Add target-connection.c.
1163 * inferior.c (uiout_field_connection): New function.
1164 (print_inferior): Add new "connection-id" column.
1165 (add_inferior_command): Show connection number/string of added
1166 inferior.
1167 * process-stratum-target.h
1168 (process_stratum_target::connection_string): New virtual method.
1169 (process_stratum_target::connection_number): New field.
1170 * remote.c (remote_target::connection_string): New override.
1171 * target-connection.c: New file.
1172 * target-connection.h: New file.
1173 * target.c (decref_target): Remove process_stratum targets from
1174 the connection list.
1175 (target_stack::push): Add process_stratum targets to the
1176 connection list.
1177
1178 2020-01-10 Pedro Alves <palves@redhat.com>
1179
1180 Revert:
1181 2016-04-12 Pedro Alves <palves@redhat.com>
1182 * serial.c (serial_open, serial_fdopen_ops, do_serial_close):
1183 Remove references to name.
1184 * serial.h (struct serial) <name>: Delete.
1185
1186 2020-01-10 Pedro Alves <palves@redhat.com>
1187
1188 * gdbarch-selftests.c (register_to_value_test): Remove "target
1189 already pushed" check.
1190
1191 2020-01-10 Pedro Alves <palves@redhat.com>
1192 John Baldwin <jhb@FreeBSD.org>
1193
1194 * aarch64-linux-nat.c
1195 (aarch64_linux_nat_target::thread_architecture): Adjust.
1196 * ada-tasks.c (print_ada_task_info): Adjust find_thread_ptid call.
1197 (task_command_1): Likewise.
1198 * aix-thread.c (sync_threadlists, aix_thread_target::resume)
1199 (aix_thread_target::wait, aix_thread_target::fetch_registers)
1200 (aix_thread_target::store_registers)
1201 (aix_thread_target::thread_alive): Adjust.
1202 * amd64-fbsd-tdep.c: Include "inferior.h".
1203 (amd64fbsd_get_thread_local_address): Pass down target.
1204 * amd64-linux-nat.c (ps_get_thread_area): Use ps_prochandle
1205 thread's gdbarch instead of target_gdbarch.
1206 * break-catch-sig.c (signal_catchpoint_print_it): Adjust call to
1207 get_last_target_status.
1208 * break-catch-syscall.c (print_it_catch_syscall): Likewise.
1209 * breakpoint.c (breakpoints_should_be_inserted_now): Consider all
1210 inferiors.
1211 (update_inserted_breakpoint_locations): Skip if inferiors with no
1212 execution.
1213 (update_global_location_list): When handling moribund locations,
1214 find representative inferior for location's pspace, and use thread
1215 count of its process_stratum target.
1216 * bsd-kvm.c (bsd_kvm_target_open): Pass target down.
1217 * bsd-uthread.c (bsd_uthread_target::wait): Use
1218 as_process_stratum_target and adjust thread_change_ptid and
1219 add_thread calls.
1220 (bsd_uthread_target::update_thread_list): Use
1221 as_process_stratum_target and adjust find_thread_ptid,
1222 thread_change_ptid and add_thread calls.
1223 * btrace.c (maint_btrace_packet_history_cmd): Adjust
1224 find_thread_ptid call.
1225 * corelow.c (add_to_thread_list): Adjust add_thread call.
1226 (core_target_open): Adjust add_thread_silent and thread_count
1227 calls.
1228 (core_target::pid_to_str): Adjust find_inferior_ptid call.
1229 * ctf.c (ctf_target_open): Adjust add_thread_silent call.
1230 * event-top.c (async_disconnect): Pop targets from all inferiors.
1231 * exec.c (add_target_sections): Push exec target on all inferiors
1232 sharing the program space.
1233 (remove_target_sections): Remove the exec target from all
1234 inferiors sharing the program space.
1235 (exec_on_vfork): New.
1236 * exec.h (exec_on_vfork): Declare.
1237 * fbsd-nat.c (fbsd_add_threads): Add fbsd_nat_target parameter.
1238 Pass it down.
1239 (fbsd_nat_target::update_thread_list): Adjust.
1240 (fbsd_nat_target::resume): Adjust.
1241 (fbsd_handle_debug_trap): Add fbsd_nat_target parameter. Pass it
1242 down.
1243 (fbsd_nat_target::wait, fbsd_nat_target::post_attach): Adjust.
1244 * fbsd-tdep.c (fbsd_corefile_thread): Adjust
1245 get_thread_arch_regcache call.
1246 * fork-child.c (gdb_startup_inferior): Pass target down to
1247 startup_inferior and set_executing.
1248 * gdbthread.h (struct process_stratum_target): Forward declare.
1249 (add_thread, add_thread_silent, add_thread_with_info)
1250 (in_thread_list): Add process_stratum_target parameter.
1251 (find_thread_ptid(inferior*, ptid_t)): New overload.
1252 (find_thread_ptid, thread_change_ptid): Add process_stratum_target
1253 parameter.
1254 (all_threads()): Delete overload.
1255 (all_threads, all_non_exited_threads): Add process_stratum_target
1256 parameter.
1257 (all_threads_safe): Use brace initialization.
1258 (thread_count): Add process_stratum_target parameter.
1259 (set_resumed, set_running, set_stop_requested, set_executing)
1260 (threads_are_executing, finish_thread_state): Add
1261 process_stratum_target parameter.
1262 (switch_to_thread): Use is_current_thread.
1263 * i386-fbsd-tdep.c: Include "inferior.h".
1264 (i386fbsd_get_thread_local_address): Pass down target.
1265 * i386-linux-nat.c (i386_linux_nat_target::low_resume): Adjust.
1266 * inf-child.c (inf_child_target::maybe_unpush_target): Remove
1267 have_inferiors check.
1268 * inf-ptrace.c (inf_ptrace_target::create_inferior)
1269 (inf_ptrace_target::attach): Adjust.
1270 * infcall.c (run_inferior_call): Adjust.
1271 * infcmd.c (run_command_1): Pass target to
1272 scoped_finish_thread_state.
1273 (proceed_thread_callback): Skip inferiors with no execution.
1274 (continue_command): Rename 'all_threads' local to avoid hiding
1275 'all_threads' function. Adjust get_last_target_status call.
1276 (prepare_one_step): Adjust set_running call.
1277 (signal_command): Use user_visible_resume_target. Compare thread
1278 pointers instead of inferior_ptid.
1279 (info_program_command): Adjust to pass down target.
1280 (attach_command): Mark target's 'thread_executing' flag.
1281 (stop_current_target_threads_ns): New, factored out from ...
1282 (interrupt_target_1): ... this. Switch inferior before making
1283 target calls.
1284 * inferior-iter.h
1285 (struct all_inferiors_iterator, struct all_inferiors_range)
1286 (struct all_inferiors_safe_range)
1287 (struct all_non_exited_inferiors_range): Filter on
1288 process_stratum_target too. Remove explicit.
1289 * inferior.c (inferior::inferior): Push dummy target on target
1290 stack.
1291 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors):
1292 Add process_stratum_target parameter, and pass it down.
1293 (have_live_inferiors): Adjust.
1294 (switch_to_inferior_and_push_target): New.
1295 (add_inferior_command, clone_inferior_command): Handle
1296 "-no-connection" parameter. Use
1297 switch_to_inferior_and_push_target.
1298 (_initialize_inferior): Mention "-no-connection" option in
1299 the help of "add-inferior" and "clone-inferior" commands.
1300 * inferior.h: Include "process-stratum-target.h".
1301 (interrupt_target_1): Use bool.
1302 (struct inferior) <push_target, unpush_target, target_is_pushed,
1303 find_target_beneath, top_target, process_target, target_at,
1304 m_stack>: New.
1305 (discard_all_inferiors): Delete.
1306 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors)
1307 (all_inferiors, all_non_exited_inferiors): Add
1308 process_stratum_target parameter.
1309 * infrun.c: Include "gdb_select.h" and <unordered_map>.
1310 (target_last_proc_target): New global.
1311 (follow_fork_inferior): Push target on new inferior. Pass target
1312 to add_thread_silent. Call exec_on_vfork. Handle target's
1313 reference count.
1314 (follow_fork): Adjust get_last_target_status call. Also consider
1315 target.
1316 (follow_exec): Push target on new inferior.
1317 (struct execution_control_state) <target>: New field.
1318 (user_visible_resume_target): New.
1319 (do_target_resume): Call target_async.
1320 (resume_1): Set target's threads_executing flag. Consider resume
1321 target.
1322 (commit_resume_all_targets): New.
1323 (proceed): Also consider resume target. Skip threads of inferiors
1324 with no execution. Commit resumtion in all targets.
1325 (start_remote): Pass current inferior to wait_for_inferior.
1326 (infrun_thread_stop_requested): Consider target as well. Pass
1327 thread_info pointer to clear_inline_frame_state instead of ptid.
1328 (infrun_thread_thread_exit): Consider target as well.
1329 (random_pending_event_thread): New inferior parameter. Use it.
1330 (do_target_wait): Rename to ...
1331 (do_target_wait_1): ... this. Add inferior parameter, and pass it
1332 down.
1333 (threads_are_resumed_pending_p, do_target_wait): New.
1334 (prepare_for_detach): Adjust calls.
1335 (wait_for_inferior): New inferior parameter. Handle it. Use
1336 do_target_wait_1 instead of do_target_wait.
1337 (fetch_inferior_event): Adjust. Switch to representative
1338 inferior. Pass target down.
1339 (set_last_target_status): Add process_stratum_target parameter.
1340 Save target in global.
1341 (get_last_target_status): Add process_stratum_target parameter and
1342 handle it.
1343 (nullify_last_target_wait_ptid): Clear 'target_last_proc_target'.
1344 (context_switch): Check inferior_ptid == null_ptid before calling
1345 inferior_thread().
1346 (get_inferior_stop_soon): Pass down target.
1347 (wait_one): Rename to ...
1348 (poll_one_curr_target): ... this.
1349 (struct wait_one_event): New.
1350 (wait_one): New.
1351 (stop_all_threads): Adjust.
1352 (handle_no_resumed, handle_inferior_event): Adjust to consider the
1353 event's target.
1354 (switch_back_to_stepped_thread): Also consider target.
1355 (print_stop_event): Update.
1356 (normal_stop): Update. Also consider the resume target.
1357 * infrun.h (wait_for_inferior): Remove declaration.
1358 (user_visible_resume_target): New declaration.
1359 (get_last_target_status, set_last_target_status): New
1360 process_stratum_target parameter.
1361 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
1362 process_stratum_target parameter, and use it.
1363 (clear_inline_frame_state (thread_info*)): New.
1364 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
1365 process_stratum_target parameter.
1366 (clear_inline_frame_state (thread_info*)): Declare.
1367 * linux-fork.c (delete_checkpoint_command): Pass target down to
1368 find_thread_ptid.
1369 (checkpoint_command): Adjust.
1370 * linux-nat.c (linux_nat_target::follow_fork): Switch to thread
1371 instead of just tweaking inferior_ptid.
1372 (linux_nat_switch_fork): Pass target down to thread_change_ptid.
1373 (exit_lwp): Pass target down to find_thread_ptid.
1374 (attach_proc_task_lwp_callback): Pass target down to
1375 add_thread/set_running/set_executing.
1376 (linux_nat_target::attach): Pass target down to
1377 thread_change_ptid.
1378 (get_detach_signal): Pass target down to find_thread_ptid.
1379 Consider last target status's target.
1380 (linux_resume_one_lwp_throw, resume_lwp)
1381 (linux_handle_syscall_trap, linux_handle_extended_wait, wait_lwp)
1382 (stop_wait_callback, save_stop_reason, linux_nat_filter_event)
1383 (linux_nat_wait_1, resume_stopped_resumed_lwps): Pass target down.
1384 (linux_nat_target::async_wait_fd): New.
1385 (linux_nat_stop_lwp, linux_nat_target::thread_address_space): Pass
1386 target down.
1387 * linux-nat.h (linux_nat_target::async_wait_fd): Declare.
1388 * linux-tdep.c (get_thread_arch_regcache): Pass target down.
1389 * linux-thread-db.c (struct thread_db_info::process_target): New
1390 field.
1391 (add_thread_db_info): Save target.
1392 (get_thread_db_info): New process_stratum_target parameter. Also
1393 match target.
1394 (delete_thread_db_info): New process_stratum_target parameter.
1395 Also match target.
1396 (thread_from_lwp): Adjust to pass down target.
1397 (thread_db_notice_clone): Pass down target.
1398 (check_thread_db_callback): Pass down target.
1399 (try_thread_db_load_1): Always push the thread_db target.
1400 (try_thread_db_load, record_thread): Pass target down.
1401 (thread_db_target::detach): Pass target down. Always unpush the
1402 thread_db target.
1403 (thread_db_target::wait, thread_db_target::mourn_inferior): Pass
1404 target down. Always unpush the thread_db target.
1405 (find_new_threads_callback, thread_db_find_new_threads_2)
1406 (thread_db_target::update_thread_list): Pass target down.
1407 (thread_db_target::pid_to_str): Pass current inferior down.
1408 (thread_db_target::get_thread_local_address): Pass target down.
1409 (thread_db_target::resume, maintenance_check_libthread_db): Pass
1410 target down.
1411 * nto-procfs.c (nto_procfs_target::update_thread_list): Adjust.
1412 * procfs.c (procfs_target::procfs_init_inferior): Declare.
1413 (proc_set_current_signal, do_attach, procfs_target::wait): Adjust.
1414 (procfs_init_inferior): Rename to ...
1415 (procfs_target::procfs_init_inferior): ... this and adjust.
1416 (procfs_target::create_inferior, procfs_notice_thread)
1417 (procfs_do_thread_registers): Adjust.
1418 * ppc-fbsd-tdep.c: Include "inferior.h".
1419 (ppcfbsd_get_thread_local_address): Pass down target.
1420 * proc-service.c (ps_xfer_memory): Switch current inferior and
1421 program space as well.
1422 (get_ps_regcache): Pass target down.
1423 * process-stratum-target.c
1424 (process_stratum_target::thread_address_space)
1425 (process_stratum_target::thread_architecture): Pass target down.
1426 * process-stratum-target.h
1427 (process_stratum_target::threads_executing): New field.
1428 (as_process_stratum_target): New.
1429 * ravenscar-thread.c
1430 (ravenscar_thread_target::update_inferior_ptid): Pass target down.
1431 (ravenscar_thread_target::wait, ravenscar_add_thread): Pass target
1432 down.
1433 * record-btrace.c (record_btrace_target::info_record): Adjust.
1434 (record_btrace_target::record_method)
1435 (record_btrace_target::record_is_replaying)
1436 (record_btrace_target::fetch_registers)
1437 (get_thread_current_frame_id, record_btrace_target::resume)
1438 (record_btrace_target::wait, record_btrace_target::stop): Pass
1439 target down.
1440 * record-full.c (record_full_wait_1): Switch to event thread.
1441 Pass target down.
1442 * regcache.c (regcache::regcache)
1443 (get_thread_arch_aspace_regcache, get_thread_arch_regcache): Add
1444 process_stratum_target parameter and handle it.
1445 (current_thread_target): New global.
1446 (get_thread_regcache): Add process_stratum_target parameter and
1447 handle it. Switch inferior before calling target method.
1448 (get_thread_regcache): Pass target down.
1449 (get_thread_regcache_for_ptid): Pass target down.
1450 (registers_changed_ptid): Add process_stratum_target parameter and
1451 handle it.
1452 (registers_changed_thread, registers_changed): Pass target down.
1453 (test_get_thread_arch_aspace_regcache): New.
1454 (current_regcache_test): Define a couple local test_target_ops
1455 instances and use them for testing.
1456 (readwrite_regcache): Pass process_stratum_target parameter.
1457 (cooked_read_test, cooked_write_test): Pass mock_target down.
1458 * regcache.h (get_thread_regcache, get_thread_arch_regcache)
1459 (get_thread_arch_aspace_regcache): Add process_stratum_target
1460 parameter.
1461 (regcache::target): New method.
1462 (regcache::regcache, regcache::get_thread_arch_aspace_regcache)
1463 (regcache::registers_changed_ptid): Add process_stratum_target
1464 parameter.
1465 (regcache::m_target): New field.
1466 (registers_changed_ptid): Add process_stratum_target parameter.
1467 * remote.c (remote_state::supports_vCont_probed): New field.
1468 (remote_target::async_wait_fd): New method.
1469 (remote_unpush_and_throw): Add remote_target parameter.
1470 (get_current_remote_target): Adjust.
1471 (remote_target::remote_add_inferior): Push target.
1472 (remote_target::remote_add_thread)
1473 (remote_target::remote_notice_new_inferior)
1474 (get_remote_thread_info): Pass target down.
1475 (remote_target::update_thread_list): Skip threads of inferiors
1476 bound to other targets. (remote_target::close): Don't discard
1477 inferiors. (remote_target::add_current_inferior_and_thread)
1478 (remote_target::process_initial_stop_replies)
1479 (remote_target::start_remote)
1480 (remote_target::remote_serial_quit_handler): Pass down target.
1481 (remote_target::remote_unpush_target): New remote_target
1482 parameter. Unpush the target from all inferiors.
1483 (remote_target::remote_unpush_and_throw): New remote_target
1484 parameter. Pass it down.
1485 (remote_target::open_1): Check whether the current inferior has
1486 execution instead of checking whether any inferior is live. Pass
1487 target down.
1488 (remote_target::remote_detach_1): Pass down target. Use
1489 remote_unpush_target.
1490 (extended_remote_target::attach): Pass down target.
1491 (remote_target::remote_vcont_probe): Set supports_vCont_probed.
1492 (remote_target::append_resumption): Pass down target.
1493 (remote_target::append_pending_thread_resumptions)
1494 (remote_target::remote_resume_with_hc, remote_target::resume)
1495 (remote_target::commit_resume): Pass down target.
1496 (remote_target::remote_stop_ns): Check supports_vCont_probed.
1497 (remote_target::interrupt_query)
1498 (remote_target::remove_new_fork_children)
1499 (remote_target::check_pending_events_prevent_wildcard_vcont)
1500 (remote_target::remote_parse_stop_reply)
1501 (remote_target::process_stop_reply): Pass down target.
1502 (first_remote_resumed_thread): New remote_target parameter. Pass
1503 it down.
1504 (remote_target::wait_as): Pass down target.
1505 (unpush_and_perror): New remote_target parameter. Pass it down.
1506 (remote_target::readchar, remote_target::remote_serial_write)
1507 (remote_target::getpkt_or_notif_sane_1)
1508 (remote_target::kill_new_fork_children, remote_target::kill): Pass
1509 down target.
1510 (remote_target::mourn_inferior): Pass down target. Use
1511 remote_unpush_target.
1512 (remote_target::core_of_thread)
1513 (remote_target::remote_btrace_maybe_reopen): Pass down target.
1514 (remote_target::pid_to_exec_file)
1515 (remote_target::thread_handle_to_thread_info): Pass down target.
1516 (remote_target::async_wait_fd): New.
1517 * riscv-fbsd-tdep.c: Include "inferior.h".
1518 (riscv_fbsd_get_thread_local_address): Pass down target.
1519 * sol2-tdep.c (sol2_core_pid_to_str): Pass down target.
1520 * sol-thread.c (sol_thread_target::wait, ps_lgetregs, ps_lsetregs)
1521 (ps_lgetfpregs, ps_lsetfpregs, sol_update_thread_list_callback):
1522 Adjust.
1523 * solib-spu.c (spu_skip_standalone_loader): Pass down target.
1524 * solib-svr4.c (enable_break): Pass down target.
1525 * spu-multiarch.c (parse_spufs_run): Pass down target.
1526 * spu-tdep.c (spu2ppu_sniffer): Pass down target.
1527 * target-delegates.c: Regenerate.
1528 * target.c (g_target_stack): Delete.
1529 (current_top_target): Return the current inferior's top target.
1530 (target_has_execution_1): Refer to the passed-in inferior's top
1531 target.
1532 (target_supports_terminal_ours): Check whether the initial
1533 inferior was already created.
1534 (decref_target): New.
1535 (target_stack::push): Incref/decref the target.
1536 (push_target, push_target, unpush_target): Adjust.
1537 (target_stack::unpush): Defref target.
1538 (target_is_pushed): Return bool. Adjust to refer to the current
1539 inferior's target stack.
1540 (dispose_inferior): Delete, and inline parts ...
1541 (target_preopen): ... here. Only dispose of the current inferior.
1542 (target_detach): Hold strong target reference while detaching.
1543 Pass target down.
1544 (target_thread_name): Add assertion.
1545 (target_resume): Pass down target.
1546 (target_ops::beneath, find_target_at): Adjust to refer to the
1547 current inferior's target stack.
1548 (get_dummy_target): New.
1549 (target_pass_ctrlc): Pass the Ctrl-C to the first inferior that
1550 has a thread running.
1551 (initialize_targets): Rename to ...
1552 (_initialize_target): ... this.
1553 * target.h: Include "gdbsupport/refcounted-object.h".
1554 (struct target_ops): Inherit refcounted_object.
1555 (target_ops::shortname, target_ops::longname): Make const.
1556 (target_ops::async_wait_fd): New method.
1557 (decref_target): Declare.
1558 (struct target_ops_ref_policy): New.
1559 (target_ops_ref): New typedef.
1560 (get_dummy_target): Declare function.
1561 (target_is_pushed): Return bool.
1562 * thread-iter.c (all_matching_threads_iterator::m_inf_matches)
1563 (all_matching_threads_iterator::all_matching_threads_iterator):
1564 Handle filter target.
1565 * thread-iter.h (struct all_matching_threads_iterator, struct
1566 all_matching_threads_range, class all_non_exited_threads_range):
1567 Filter by target too. Remove explicit.
1568 * thread.c (threads_executing): Delete.
1569 (inferior_thread): Pass down current inferior.
1570 (clear_thread_inferior_resources): Pass down thread pointer
1571 instead of ptid_t.
1572 (add_thread_silent, add_thread_with_info, add_thread): Add
1573 process_stratum_target parameter. Use it for thread and inferior
1574 searches.
1575 (is_current_thread): New.
1576 (thread_info::deletable): Use it.
1577 (find_thread_ptid, thread_count, in_thread_list)
1578 (thread_change_ptid, set_resumed, set_running): New
1579 process_stratum_target parameter. Pass it down.
1580 (set_executing): New process_stratum_target parameter. Pass it
1581 down. Adjust reference to 'threads_executing'.
1582 (threads_are_executing): New process_stratum_target parameter.
1583 Adjust reference to 'threads_executing'.
1584 (set_stop_requested, finish_thread_state): New
1585 process_stratum_target parameter. Pass it down.
1586 (switch_to_thread): Also match inferior.
1587 (switch_to_thread): New process_stratum_target parameter. Pass it
1588 down.
1589 (update_threads_executing): Reimplement.
1590 * top.c (quit_force): Pop targets from all inferior.
1591 (gdb_init): Don't call initialize_targets.
1592 * windows-nat.c (windows_nat_target) <get_windows_debug_event>:
1593 Declare.
1594 (windows_add_thread, windows_delete_thread): Adjust.
1595 (get_windows_debug_event): Rename to ...
1596 (windows_nat_target::get_windows_debug_event): ... this. Adjust.
1597 * tracefile-tfile.c (tfile_target_open): Pass down target.
1598 * gdbsupport/common-gdbthread.h (struct process_stratum_target):
1599 Forward declare.
1600 (switch_to_thread): Add process_stratum_target parameter.
1601 * mi/mi-interp.c (mi_on_resume_1): Add process_stratum_target
1602 parameter. Use it.
1603 (mi_on_resume): Pass target down.
1604 * nat/fork-inferior.c (startup_inferior): Add
1605 process_stratum_target parameter. Pass it down.
1606 * nat/fork-inferior.h (startup_inferior): Add
1607 process_stratum_target parameter.
1608 * python/py-threadevent.c (py_get_event_thread): Pass target down.
1609
1610 2020-01-10 Pedro Alves <palves@redhat.com>
1611
1612 * remote.c (remote_target::start_remote): Don't set inferior_ptid
1613 directly. Instead find the first thread in the thread list and
1614 use switch_to_thread.
1615
1616 2020-01-10 Pedro Alves <palves@redhat.com>
1617
1618 * remote.c (remote_target::remote_add_inferior): Don't bind a
1619 process to the current inferior if the current inferior is already
1620 bound to a process.
1621
1622 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1623 Pedro Alves <palves@redhat.com>
1624
1625 * remote.c (remote_target::remote_parse_stop_reply) <W/X packets>:
1626 If no process is specified, return null_ptid instead of
1627 inferior_ptid.
1628 (remote_target::wait_as): Handle TARGET_WAITKIND_EXITED /
1629 TARGET_WAITKIND_SIGNALLED with no pid.
1630
1631 2020-01-10 Pedro Alves <palves@redhat.com>
1632
1633 * remote.c (first_remote_resumed_thread): New.
1634 (remote_target::wait_as): Use it as default event_ptid instead of
1635 inferior_ptid.
1636
1637 2020-01-10 Pedro Alves <palves@redhat.com>
1638
1639 * infrun.c (handle_no_resumed): Use all_non_exited_inferiors.
1640
1641 2020-01-10 Pedro Alves <palves@redhat.com>
1642
1643 * tracefile-tfile.c (tfile_target::close): Assert that trace_fd is
1644 not -1.
1645
1646 2020-01-10 Pedro Alves <palves@redhat.com>
1647
1648 * break-catch-sig.c (signal_catchpoint_print_it): Don't pass a
1649 ptid to get_last_target_status.
1650 * break-catch-syscall.c (print_it_catch_syscall): Don't pass a
1651 ptid to get_last_target_status.
1652 * infcmd.c (continue_command): Don't pass a target_waitstatus to
1653 get_last_target_status.
1654 (info_program_command): Don't pass a target_waitstatus to
1655 get_last_target_status.
1656 * infrun.c (init_wait_for_inferior): Use
1657 nullify_last_target_wait_ptid.
1658 (get_last_target_status): Handle nullptr arguments.
1659 (nullify_last_target_wait_ptid): Clear target_last_waitstatus.
1660 (print_stop_event): Don't pass a ptid to get_last_target_status.
1661 (normal_stop): Don't pass a ptid to get_last_target_status.
1662 * infrun.h (get_last_target_status, set_last_target_status): Move
1663 comments here and update.
1664 (nullify_last_target_wait_ptid): Declare.
1665 * linux-fork.c (fork_load_infrun_state): Remove local extern
1666 declaration of nullify_last_target_wait_ptid.
1667 * linux-nat.c (get_detach_signal): Don't pass a target_waitstatus
1668 to get_last_target_status.
1669
1670 2020-01-10 Pedro Alves <palves@redhat.com>
1671
1672 * gdbthread.h (scoped_restore_current_thread)
1673 <dont_restore, restore, m_dont_restore>: Declare.
1674 * thread.c (thread_alive): Add assertion. Return bool.
1675 (switch_to_thread_if_alive): New.
1676 (prune_threads): Switch inferior/thread.
1677 (print_thread_info_1): Switch thread before calling target methods.
1678 (scoped_restore_current_thread::restore): New, factored out from
1679 ...
1680 (scoped_restore_current_thread::~scoped_restore_current_thread):
1681 ... this.
1682 (scoped_restore_current_thread::scoped_restore_current_thread):
1683 Add assertion.
1684 (thread_apply_all_command, thread_select): Use
1685 switch_to_thread_if_alive.
1686 * infrun.c (proceed, restart_threads, handle_signal_stop)
1687 (switch_back_to_stepped_thread): Switch current thread before
1688 calling target methods.
1689
1690 2020-01-10 Pedro Alves <palves@redhat.com>
1691
1692 * inferior.c (switch_to_inferior_no_thread): New function,
1693 factored out from ...
1694 (inferior_command): ... here.
1695 * inferior.h (switch_to_inferior_no_thread): Declare.
1696 * mi/mi-main.c (run_one_inferior): Use
1697 switch_to_inferior_no_thread.
1698
1699 2020-01-10 Pedro Alves <palves@redhat.com>
1700
1701 * infcmd.c (kill_command): Remove dead code.
1702
1703 2020-01-10 Pedro Alves <palves@redhat.com>
1704
1705 * remote.c (remote_target::mourn_inferior): No longer check
1706 whether the target is running.
1707
1708 2020-01-10 Pedro Alves <palves@redhat.com>
1709
1710 * corelow.c (core_target::has_execution): Change parameter type to
1711 inferior pointer.
1712 * inferior.c (number_of_live_inferiors): Use
1713 inferior::has_execution instead of target_has_execution_1.
1714 * inferior.h (inferior::has_execution): New.
1715 * linux-thread-db.c (thread_db_target::update_thread_list): Use
1716 inferior::has_execution instead of target_has_execution_1.
1717 * process-stratum-target.c
1718 (process_stratum_target::has_execution): Change parameter type to
1719 inferior pointer. Check the inferior's PID instead of
1720 inferior_ptid.
1721 * process-stratum-target.h
1722 (process_stratum_target::has_execution): Change parameter type to
1723 inferior pointer.
1724 * record-full.c (record_full_core_target::has_execution): Change
1725 parameter type to inferior pointer.
1726 * target.c (target_has_execution_1): Change parameter type to
1727 inferior pointer.
1728 (target_has_execution_current): Adjust.
1729 * target.h (target_ops::has_execution): Change parameter type to
1730 inferior pointer.
1731 (target_has_execution_1): Change parameter type to inferior
1732 pointer. Change return type to bool.
1733 * tracefile.h (tracefile_target::has_execution): Change parameter
1734 type to inferior pointer.
1735
1736 2020-01-10 Pedro Alves <palves@redhat.com>
1737
1738 * exceptions.c (print_flush): Remove current_top_target() check.
1739
1740 2020-01-10 Pedro Alves <palves@redhat.com>
1741
1742 * remote.c (show_remote_exec_file): Show the current inferior's
1743 exec-file instead of the command variable's value.
1744
1745 2020-01-10 Pedro Alves <palves@redhat.com>
1746
1747 * record-full.c (record_full_resume_ptid): New global.
1748 (record_full_target::resume): Set it.
1749 (record_full_wait_1): Use record_full_resume_ptid instead of
1750 inferior_ptid.
1751
1752 2020-01-10 Pedro Alves <palves@redhat.com>
1753
1754 * gdbthread.h (scoped_restore_current_thread)
1755 <dont_restore, restore, m_dont_restore>: Declare.
1756 * thread.c (thread_alive): Add assertion. Return bool.
1757 (switch_to_thread_if_alive): New.
1758 (prune_threads): Switch inferior/thread.
1759 (print_thread_info_1): Switch thread before calling target methods.
1760 (scoped_restore_current_thread::restore): New, factored out from
1761 ...
1762 (scoped_restore_current_thread::~scoped_restore_current_thread):
1763 ... this.
1764 (scoped_restore_current_thread::scoped_restore_current_thread):
1765 Add assertion.
1766 (thread_apply_all_command, thread_select): Use
1767 switch_to_thread_if_alive.
1768
1769 2020-01-10 George Barrett <bob@bob131.so>
1770
1771 * stap-probe.c (stap_modify_semaphore): Don't check for null
1772 semaphores.
1773 (stap_probe::set_semaphore, stap_probe::clear_semaphore): Check
1774 for null semaphores.
1775
1776 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
1777
1778 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Update
1779 all source windows, and maintain horizontal scroll status while
1780 doing so.
1781
1782 2020-01-09 Tom Tromey <tom@tromey.com>
1783
1784 PR tui/18932:
1785 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Call
1786 update_source_window, not print_source_lines.
1787
1788 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
1789
1790 * tui/tui.c (tui_enable): Register tui hooks after calling
1791 tui_display_main.
1792
1793 2020-01-09 Christian Biesinger <cbiesinger@google.com>
1794
1795 * gdbsupport/common-defs.h: Don't define _FORTIFY_SOURCE on MinGW.
1796
1797 2020-01-08 Simon Marchi <simon.marchi@efficios.com>
1798
1799 * thread.c (print_thread_info_1): Fix indentation.
1800
1801 2020-01-09 Christian Biesinger <cbiesinger@google.com>
1802
1803 * symtab.c (general_symbol_info::compute_and_set_names): Move the
1804 unique_xmalloc_ptr outside the if to always free the demangled name.
1805
1806 2020-01-08 Tom Tromey <tromey@adacore.com>
1807
1808 * xcoffread.c (enter_line_range, read_xcoff_symtab)
1809 (process_xcoff_symbol, xcoff_symfile_offsets): Update.
1810 * symtab.h (MSYMBOL_VALUE_ADDRESS): Update.
1811 (struct section_offsets, ANOFFSET, SIZEOF_N_SECTION_OFFSETS):
1812 Remove.
1813 (section_offsets): New typedef.
1814 * symtab.c (fixup_section, get_msymbol_address): Update.
1815 * symmisc.c (dump_msymbols): Update.
1816 * symfile.h (relative_addr_info_to_section_offsets)
1817 (symfile_map_offsets_to_segments): Update.
1818 * symfile.c (build_section_addr_info_from_objfile)
1819 (init_objfile_sect_indices): Update.
1820 (struct place_section_arg): Change type of "offsets".
1821 (place_section): Update.
1822 (relative_addr_info_to_section_offsets): Change type of
1823 "section_offsets". Remove "num_sections" parameter.
1824 (default_symfile_offsets, syms_from_objfile_1)
1825 (set_objfile_default_section_offset): Update.
1826 (reread_symbols): No need to preserve section offsets by hand.
1827 (symfile_map_offsets_to_segments): Change type of "offsets".
1828 * stap-probe.c (relocate_address): Update.
1829 * stabsread.h (process_one_symbol): Update.
1830 * solib-target.c (struct lm_info_target) <offsets>: Change type.
1831 (solib_target_relocate_section_addresses): Update.
1832 * solib-svr4.c (enable_break, svr4_relocate_main_executable):
1833 Update.
1834 * solib-frv.c (frv_relocate_main_executable): Update.
1835 * solib-dsbt.c (dsbt_relocate_main_executable): Update.
1836 * solib-aix.c (solib_aix_get_section_offsets): Change return
1837 type.
1838 (solib_aix_solib_create_inferior_hook): Update.
1839 * remote.c (remote_target::get_offsets): Update.
1840 * psymtab.c (find_pc_sect_psymtab): Update.
1841 * psympriv.h (struct partial_symbol) <address, text_low,
1842 text_high>: Update.
1843 * objfiles.h (obj_section_offset): Update.
1844 (struct objfile) <section_offsets>: Change type.
1845 <num_sections>: Remove.
1846 (objfile_relocate): Update.
1847 * objfiles.c (entry_point_address_query): Update
1848 (relocate_one_symbol): Change type of "section_offsets".
1849 (objfile_relocate1, objfile_relocate1): Change type of
1850 "new_offsets".
1851 (objfile_rebase1): Update.
1852 * mipsread.c (mipscoff_symfile_read): Update.
1853 (read_alphacoff_dynamic_symtab): Remove "section_offsets"
1854 parameter.
1855 * mdebugread.c (parse_symbol): Change type of "section_offsets".
1856 (parse_external, psymtab_to_symtab_1): Update.
1857 * machoread.c (macho_symfile_offsets): Update.
1858 * ia64-tdep.c (ia64_find_unwind_table): Update.
1859 * hppa-tdep.c (read_unwind_info): Update.
1860 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Update.
1861 * dwarf2read.c (create_addrmap_from_index)
1862 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
1863 (process_psymtab_comp_unit_reader, add_partial_symbol)
1864 (add_partial_subprogram, process_full_comp_unit)
1865 (read_file_scope, read_func_scope, read_lexical_block_scope)
1866 (read_call_site_scope, dwarf2_rnglists_process)
1867 (dwarf2_ranges_process, dwarf2_ranges_read)
1868 (dwarf_decode_lines_1, var_decode_location, new_symbol)
1869 (dwarf2_fetch_die_loc_sect_off, dwarf2_per_cu_text_offset):
1870 Update.
1871 * dwarf2-frame.c (execute_cfa_program, dwarf2_frame_find_fde):
1872 Update.
1873 * dtrace-probe.c (dtrace_probe::get_relocated_address): Update.
1874 * dbxread.c (read_dbx_symtab, read_ofile_symtab): Update.
1875 (process_one_symbol): Change type of "section_offsets".
1876 * ctfread.c (get_objfile_text_range): Update.
1877 * coffread.c (coff_symtab_read, enter_linenos)
1878 (process_coff_symbol): Update.
1879 * coff-pe-read.c (add_pe_forwarded_sym): Update.
1880 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Update.
1881
1882 2020-01-08 Tom Tromey <tromey@adacore.com>
1883
1884 * dwarf2read.c (parse_macro_definition): Use std::string.
1885 (parse_macro_definition): Likewise.
1886
1887 2020-01-08 Tom Tromey <tromey@adacore.com>
1888
1889 * dwarf2read.c (abbrev_table_read_table): Use std::vector.
1890 (ATTR_ALLOC_CHUNK): Remove.
1891
1892 2020-01-08 Tom Tromey <tromey@adacore.com>
1893
1894 * dwarf2read.c (fixup_go_packaging): Use unique_xmalloc_ptr.
1895
1896 2020-01-08 Tom Tromey <tromey@adacore.com>
1897
1898 * dwarf2read.c (add_partial_symbol): Use unique_xmalloc_ptr.
1899 (dwarf2_compute_name, open_dwo_file): Likewise.
1900 (process_enumeration_scope): Use std::vector.
1901 (guess_partial_die_structure_name): Use unique_xmalloc_ptr.
1902 (partial_die_info::fixup, dwarf2_start_subfile)
1903 (guess_full_die_structure_name, dwarf2_name): Likewise.
1904 (determine_prefix): Update.
1905 (guess_full_die_structure_name): Make return type const.
1906 (partial_die_full_name): Return unique_xmalloc_ptr.
1907 (DW_FIELD_ALLOC_CHUNK): Remove.
1908
1909 2020-01-07 Tom Tromey <tromey@adacore.com>
1910
1911 PR build/24937:
1912 * stap-probe.c (class stap_static_probe_ops): Add constructor.
1913
1914 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
1915
1916 * cli/cli-style.c: Set cli_styling to 'true' in the Cygwin build.
1917
1918 2020-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
1919
1920 * stack.c (print_frame_info): Move disassemble_next_line code
1921 inside source_print block.
1922
1923 2020-01-06 Eli Zaretskii <eliz@gnu.org>
1924
1925 * gdbsupport/gdb_wait.c: Include <signal.h> instead of
1926 gdb/signals.h, as we are now using native signal symbols.
1927
1928 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
1929
1930 * tui/tui-disasm.c (tui_disasm_window::addr_is_displayed): Avoid
1931 overflow by an early check of content vs threshold.
1932 * tui/tui-source.c (tui_source_window::line_is_displayed):
1933 Likewise.
1934
1935 2020-01-06 Eli Zaretskii <eliz@gnu.org>
1936
1937 * NEWS: Mention the recent fix of $_exitsignal on MS-Windows.
1938
1939 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
1940
1941 * coff-pe-read.c (read_pe_exported_syms): Don't try to read the
1942 export table if no section contains it's RVA.
1943
1944 2020-01-06 Eli Zaretskii <eliz@gnu.org>
1945
1946 * windows-tdep.c: Fix a typo in WINDOWS_SIGABRT.
1947
1948 2020-01-06 Hannes Domani <ssbssa@yahoo.de>
1949
1950 * source.c (print_source_lines_base): Set last_line_listed.
1951
1952 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
1953
1954 * tui/tui-disasm.c: Remove trailing spaces.
1955
1956 2020-01-06 Eli Zaretskii <eliz@gnu.org>
1957 Pedro Alves <palves@redhat.com>
1958
1959 * Makefile.in (COMMON_SFILES): Add gdbsupport/gdb_wait.c.
1960 * windows-tdep.c: New enumeration of WINDOWS_SIG* signals.
1961 (windows_gdb_signal_to_target): New function, uses the above
1962 enumeration to convert GDB internal signal codes to equivalent
1963 Windows codes.
1964 (windows_init_abi): Call set_gdbarch_gdb_signal_to_target.
1965 * windows-nat.c: Include "gdb_wait.h".
1966 (get_windows_debug_event): Extract the fatal exception from the
1967 exit status and convert to the equivalent Posix signal number.
1968 * cli/cli-cmds.c (exit_status_set_internal_vars): Account for the
1969 possibility that WTERMSIG returns GDB_SIGNAL_UNKNOWN.
1970 * gdbsupport/gdb_wait.c: New file, implements
1971 windows_status_to_termsig.
1972 * gdbsupport/gdb_wait.h (WIFEXITED, WIFSIGNALED, WEXITSTATUS)
1973 (WTERMSIG) [__MINGW32__]: Separate definitions for MinGW.
1974
1975 2020-01-05 Andrew Burgess <andrew.burgess@embecosm.com>
1976
1977 * tui/tui-layout.c (tui_add_win_to_layout): Use tui_set_layout not
1978 show_layout.
1979
1980 2020-01-05 Luis Machado <luis.machado@linaro.org>
1981
1982 * aarch64-linux-nat.c
1983 (aarch64_linux_nat_target::thread_architecture): Use bfd_arch_aarch64
1984 and bfd_mach_aarch64.
1985
1986 2020-01-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1987
1988 * ui-file.c (stdio_file::can_emit_style_escape)
1989 (tee_file::can_emit_style_escape): Ensure style is used also on
1990 gdb_stderr when gdb_stderr is a tty supporting styling, similarly
1991 to gdb_stdout.
1992 * main.c (set_gdb_data_directory): Use file style to output the
1993 warning that the given pathname is not a directory.
1994 * top.c (show_history_filename, gdb_safe_append_history)
1995 (show_gdb_datadir): Use file style.
1996
1997 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
1998
1999 * solib-target.c (struct lm_info_target):
2000 Change offsets to be a unique_xmalloc_ptr.
2001 (solib_target_relocate_section_addresses): Update.
2002
2003 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
2004
2005 * windows-nat.c (windows_clear_solib): Free so_list linked list.
2006
2007 2020-01-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
2008
2009 * MAINTAINERS (Write After Approval): Add myself.
2010
2011 2020-01-02 Luis Machado <luis.machado@linaro.org>
2012
2013 * proc-service.c (get_ps_regcache): Remove reference to obsolete
2014 Cell BE architecture.
2015 * target.h (struct target_ops) <thread_architecture>: Likewise.
2016
2017 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
2018
2019 * Makefile.in: Use INSTALL_PROGRAM_ENV.
2020
2021 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
2022
2023 * MAINTAINERS (Write After Approval): Add myself.
2024
2025 2020-01-01 Joel Brobecker <brobecker@adacore.com>
2026
2027 * gdbarch.sh: Update copyright year range of generated files.
2028
2029 2020-01-01 Joel Brobecker <brobecker@adacore.com>
2030
2031 Update copyright year range in all GDB files.
2032
2033 2020-01-01 Joel Brobecker <brobecker@adacore.com>
2034
2035 * copyright.py: Convert to Python 3.
2036
2037 2020-01-01 Joel Brobecker <brobecker@adacore.com>
2038
2039 * copyright.py: Adapt after move of gnulib directory from gdb
2040 directory to toplevel directory.
2041
2042 2020-01-01 Joel Brobecker <brobecker@adacore.com>
2043
2044 * copyright.py (main): Exit if run from the wrong directory.
2045
2046 2020-01-01 Joel Brobecker <brobecker@adacore.com>
2047
2048 * top.c (print_gdb_version): Change copyright year to 2020.
2049
2050 2020-01-01 Joel Brobecker <brobecker@adacore.com>
2051
2052 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2019.
2053
2054 For older changes see ChangeLog-2019.
2055 \f
2056 Local Variables:
2057 mode: change-log
2058 left-margin: 8
2059 fill-column: 74
2060 version-control: never
2061 coding: utf-8
2062 End:
This page took 0.141441 seconds and 5 git commands to generate.