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