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