b90e45581d33022f8f9348198e56a7ceecf9fbe5
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2020-07-10 Pedro Alves <pedro@palves.net>
2
3 PR gdb/26199
4 * remote.c (remote_target::open_1): Pass remote target pointer as
5 data to create_async_event_handler.
6 (remote_async_inferior_event_handler): Mark async event handler
7 before returning if the remote target still has either pending
8 events or unacknowledged notifications.
9
10 2020-07-10 John Baldwin <jhb@FreeBSD.org>
11
12 * fbsd-nat.h (fbsd_nat_target::supports_multi_process): New
13 declaration.
14 * fbsd-nat.c (fbsd_nat_target::supports_multi_process): New
15 function.
16
17 2020-07-09 John Baldwin <jhb@FreeBSD.org>
18
19 * inf-ptrace.c (inf_ptrace_target::wait): Don't compare against
20 inferior_ptid.
21
22 2020-07-09 John Baldwin <jhb@FreeBSD.org>
23
24 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_ARGC,
25 AT_FREEBSD_ARGV, AT_FREEBSD_ENVC, AT_FREEBSD_ENVV,
26 AT_FREEBSD_PS_STRINGS.
27
28 2020-07-08 Hannes Domani <ssbssa@yahoo.de>
29
30 * auto-load.c (auto_load_objfile_script_1): Convert drive part
31 of debugfile path on Windows.
32
33 2020-07-08 John Baldwin <jhb@FreeBSD.org>
34
35 * fbsd-nat.c (fbsd_nat_target::find_memory_regions): Rename 'obfd'
36 argument to 'data'.
37
38 2020-07-08 Tom Tromey <tromey@adacore.com>
39
40 * ada-lang.c (ada_exception_message_1): Use read_memory.
41
42 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
43
44 PR python/22748
45 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Remove
46 special handling for inline frames.
47 * findvar.c (value_of_register_lazy): Skip inline frames when
48 creating lazy register values.
49 * frame.c (frame_id_computed_p): Delete definition.
50 * frame.h (frame_id_computed_p): Delete declaration.
51
52 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
53
54 * NEWS: Mention additions to Python API.
55 * python/py-arch.c (archpy_register_groups): New function.
56 (arch_object_methods): Add 'register_groups' method.
57 * python/py-registers.c (reggroup_iterator_object): New struct.
58 (reggroup_object): New struct.
59 (gdbpy_new_reggroup): New function.
60 (gdbpy_reggroup_to_string): New function.
61 (gdbpy_reggroup_name): New function.
62 (gdbpy_reggroup_iter): New function.
63 (gdbpy_reggroup_iter_next): New function.
64 (gdbpy_new_reggroup_iterator): New function
65 (gdbpy_initialize_registers): Register new types.
66 (reggroup_iterator_object_type): Define new Python type.
67 (gdbpy_reggroup_getset): New static global.
68 (reggroup_object_type): Define new Python type.
69 * python/python-internal.h
70
71 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
72
73 * Makefile.in (SUBDIR_PYTHON_SRCS): Add py-registers.c
74 * python/py-arch.c (archpy_registers): New function.
75 (arch_object_methods): Add 'registers' method.
76 * python/py-registers.c: New file.
77 * python/python-internal.h
78 (gdbpy_new_register_descriptor_iterator): Declare.
79 (gdbpy_initialize_registers): Declare.
80 * python/python.c (do_start_initialization): Call
81 gdbpy_initialize_registers.
82 * NEWS: Mention additions to the Python API.
83
84 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
85
86 * NEWS: Mention new Python API method.
87 * python/py-unwind.c (pending_framepy_architecture): New function.
88 (pending_frame_object_methods): Add architecture method.
89
90 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
91
92 * gdbarch.c: Regenerate.
93 * gdbarch.h: Regenerate.
94 * gdbarch.sh (deprecated_set_gdbarch_data): Delete.
95 (gdbarch_data): Use internal_error for the case where
96 deprecated_set_gdbarch_data was originally needed.
97 * ia64-libunwind-tdep.c (libunwind_descr_init): Update parameters,
98 and use passed in obstack.
99 (libunwind_frame_set_descr): Should no longer get back NULL from
100 gdbarch_data.
101 (_initialize_libunwind_frame): Register as a pre-init gdbarch data
102 type.
103 * user-regs.c (user_regs_init): Update parameters, and use passed
104 in obstack.
105 (user_reg_add): Should no longer get back NULL from gdbarch_data.
106 (_initialize_user_regs): Register as a pre-init gdbarch data type.
107
108 2020-07-06 Tom de Vries <tdevries@suse.de>
109
110 * buildsym.c (buildsym_compunit::end_symtab_with_blockvector): Handle
111 End-Of-Sequence in lte_is_less_than.
112 * symtab.c (find_pc_sect_line): Revert change from commit 3d92a3e313
113 "gdb: Don't reorder line table entries too much when sorting".
114
115 2020-07-06 Tom de Vries <tdevries@suse.de>
116
117 PR tui/26205
118 * tui/tui-win.c (tui_partial_win_by_name): Don't test for NULL name.
119
120 2020-07-05 Tom de Vries <tdevries@suse.de>
121
122 PR build/26187
123 * inferior.h (struct infcall_suspend_state_deleter): If available, use
124 std::uncaught_exceptions instead of deprecated
125 std::uncaught_exception.
126
127 2020-07-02 Simon Marchi <simon.marchi@polymtl.ca>
128
129 * macroexp.h (macro_stringify): Return
130 gdb::unique_xmalloc_ptr<char>.
131 * macroexp.c (macro_stringify): Likewise.
132 * macrotab.c (fixup_definition): Update.
133
134 2020-07-02 Simon Marchi <simon.marchi@polymtl.ca>
135
136 * c-exp.y (scan_macro_expansion): Don't free `expansion`.
137 (lex_one_token): Update.
138 * macroexp.c (struct macro_buffer) <release>: Return
139 gdb::unique_xmalloc_ptr<char>.
140 (macro_stringify): Update.
141 (macro_expand): Update.
142 (macro_expand_next): Return gdb::unique_xmalloc_ptr<char>.
143 * macroexp.h (macro_expand_next): Likewise.
144
145 2020-07-02 Simon Marchi <simon.marchi@efficios.com>
146
147 * macroexp.h (macro_lookup_ftype): Remove.
148 (macro_expand, macro_expand_once, macro_expand_next): Remove
149 lookup function parameters, add scope parameter.
150 * macroexp.c (scan, substitute_args, expand, maybe_expand,
151 macro_expand, macro_expand_once, macro_expand_next): Likewise.
152 * macroscope.h (standard_macro_lookup): Change parameter type
153 to macro_scope.
154 * macroscope.c (standard_macro_lookup): Likewise.
155 * c-exp.y (lex_one_token): Update.
156 * macrocmd.c (macro_expand_command): Likewise.
157 (macro_expand_once_command): Likewise.
158
159 2020-07-02 Simon Marchi <simon.marchi@polymtl.ca>
160
161 * inf-loop.c (inferior_event_handler): Remove client_data param.
162 * inf-loop.h (inferior_event_handler): Likewise.
163 * infcmd.c (step_1): Adjust.
164 * infrun.c (proceed): Adjust.
165 (fetch_inferior_event): Remove client_data param.
166 (infrun_async_inferior_event_handler): Adjust.
167 * infrun.h (fetch_inferior_event): Remove `void *` param.
168 * linux-nat.c (handle_target_event): Adjust.
169 * record-btrace.c (record_btrace_handle_async_inferior_event):
170 Adjust.
171 * record-full.c (record_full_async_inferior_event_handler):
172 Adjust.
173 * remote.c (remote_async_inferior_event_handler): Adjust.
174
175 2020-07-01 Tom Tromey <tom@tromey.com>
176
177 * tui/tui-data.h (struct tui_win_info) <name>: Now pure virtual.
178 * tui/tui-stack.h (struct tui_locator_window) <name>: New method.
179
180 2020-07-01 Tom Tromey <tom@tromey.com>
181
182 * tui/tui-wingeneral.c (tui_win_info::refresh_window): Move from
183 tui_gen_win_info.
184 (tui_win_info::make_window): Merge with
185 tui_gen_win_info::make_window.
186 (tui_win_info::make_visible): Move from tui_gen_win_info.
187 * tui/tui-win.c (tui_win_info::max_width): Move from
188 tui_gen_win_info.
189 * tui/tui-layout.h (class tui_layout_window) <m_window>: Change
190 type.
191 <window_factory>: Likewise.
192 * tui/tui-layout.c (tui_win_info::resize): Move from
193 tui_gen_win_info.
194 (make_standard_window): Change return type.
195 (get_locator_window, tui_get_window_by_name): Likewise.
196 (tui_layout_window::apply): Remove a cast.
197 * tui/tui-data.h (MIN_WIN_HEIGHT): Move earlier.
198 (struct tui_win_info): Merge with tui_gen_win_info.
199 (struct tui_gen_win_info): Remove.
200
201 2020-07-01 Tom Tromey <tom@tromey.com>
202
203 * tui/tui-stack.h (struct tui_locator_window): Derive from
204 tui_win_info.
205 <do_scroll_horizontal, do_scroll_vertical>: New methods.
206 <can_box>: New method.
207
208 2020-07-01 Tom Tromey <tom@tromey.com>
209
210 * tui/tui-stack.h (struct tui_locator_window): Remove body.
211
212 2020-07-01 Tom Tromey <tom@tromey.com>
213
214 * tui/tui-regs.c (tui_data_window::display_registers_from)
215 (tui_data_window::display_registers_from)
216 (tui_data_window::first_data_item_displayed)
217 (tui_data_window::delete_data_content_windows): Update.
218 (tui_data_window::refresh_window, tui_data_window::no_refresh):
219 Remove.
220 (tui_data_window::check_register_values): Update.
221 (tui_data_item_window::rerender): Add parameters. Update.
222 (tui_data_item_window::refresh_window): Remove.
223 * tui/tui-data.h (struct tui_gen_win_info) <no_refresh>: No longer
224 virtual.
225 * tui/tui-regs.h (struct tui_data_item_window): Don't derive from
226 tui_gen_win_info.
227 <refresh_window, max_height, min_height>: Remove.
228 <rerender>: Add parameters.
229 <x, y, visible>: New members.
230 (struct tui_data_window) <refresh_window, no_refresh>: Remove.
231 <m_item_width>: New member.
232
233 2020-07-01 Tom Tromey <tom@tromey.com>
234
235 * tui/tui-regs.c (tui_data_window::show_register_group)
236 (tui_data_window::check_register_values): Update.
237 * tui/tui-regs.h (struct tui_data_item_window) <regno>: Rename
238 from item_no.
239
240 2020-07-01 Tom Tromey <tom@tromey.com>
241
242 * tui/tui-regs.c (tui_data_window::show_register_group): Remove
243 useless "if".
244
245 2020-07-01 Tom Tromey <tom@tromey.com>
246
247 * tui/tui-regs.c (tui_data_window::show_register_group): Update.
248 * tui/tui-regs.h (struct tui_data_item_window) <name>: Remove.
249
250 2020-07-01 Tom Tromey <tom@tromey.com>
251
252 * tui/tui-stack.c (SINGLE_KEY): Move from tui-data.h
253 * tui/tui-winsource.h (enum tui_line_or_address_kind)
254 (struct tui_line_or_address): Move from tui-data.h.
255 * tui/tui-win.c (DEFAULT_TAB_LEN): Move from tui-data.h.
256 * tui/tui-data.h (DEFAULT_TAB_LEN): Move to tui-win.c.
257 (tui_cmd_window, tui_source_window_base, tui_source_window)
258 (tui_disasm_window): Don't declare.
259 (enum tui_line_or_address_kind, struct tui_line_or_address): Move
260 to tui-winsource.h.
261 (SINGLE_KEY): Move to tui-stack.c.
262
263 2020-07-01 Tom Tromey <tom@tromey.com>
264
265 * tui/tui-regs.h (struct tui_data_item_window) <content>: Now a
266 std::string.
267 * tui/tui-regs.c (class tab_expansion_file): New.
268 (tab_expansion_file::write): New method.
269 (tui_register_format): Change return type. Use
270 tab_expansion_file.
271 (tui_get_register, tui_data_window::display_registers_from)
272 (tui_data_item_window::rerender): Update.
273 * tui/tui-io.h (tui_expand_tabs): Don't declare.
274 * tui/tui-io.c (tui_expand_tabs): Remove.
275
276 2020-07-01 Tom Tromey <tom@tromey.com>
277
278 * tui/tui-regs.c (tui_reggroup_completer): Use complete_on_enum.
279
280 2020-07-01 Fangrui Song <maskray@google.com>
281
282 * dwarf2/read.c (lnp_state_machine::check_line_address): Test -1.
283
284 2020-07-01 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
285
286 * dwarf2/read.c (set_die_type): Removed conditions to restrict
287 forms for DW_AT_associated and DW_AT_allocated attributes,
288 which is already checked in function attr_to_dynamic_prop.
289
290 2020-06-30 Tom Tromey <tromey@adacore.com>
291
292 * dwarf2/read.c (quirk_rust_enum): Correctly call
293 alloc_rust_variant for default-less enum.
294
295 2020-06-30 Tom Tromey <tromey@adacore.com>
296
297 PR build/26183:
298 * ada-lang.c (ada_lookup_name_info::ada_lookup_name_info): Use
299 gdb::to_string.
300
301 2020-06-29 Simon Marchi <simon.marchi@efficios.com>
302
303 * gdbarch.sh (displaced_step_copy_insn): Update doc.
304 * gdbarch.h: Re-generate.
305
306 2020-06-28 Tom Tromey <tom@tromey.com>
307
308 * command.h (cmd_types): Remove.
309 (cmd_type): Don't declare.
310 * cli/cli-decode.h (enum cmd_types): Uncomment. No longer a
311 typedef.
312 * cli/cli-cmds.c (setting_cmd): Use cmd->type directly.
313 * cli/cli-decode.c (cmd_type): Remove.
314
315 2020-06-27 Pedro Alves <palves@redhat.com>
316
317 * fork-child.c (prefork_hook): Adjust.
318 * infcmd.c (set_inferior_io_terminal, get_inferior_io_terminal):
319 Delete.
320 (set_inferior_tty_command, show_inferior_tty_command): Adjust.
321 * inferior.c (inferior::set_tty, inferior::tty): New methods.
322 * inferior.h (set_inferior_io_terminal, get_inferior_io_terminal):
323 Remove declarations.
324 (struct inferior) <set_tty, tty>: New methods.
325 (struct inferior) <terminal>: Rename to ...
326 (struct inferior) <m_terminal>: ... this and make private.
327 * main.c (captured_main_1): Adjust.
328 * mi/mi-cmd-env.c (mi_cmd_inferior_tty_set): Adjust.
329 (mi_cmd_inferior_tty_show): Adjust.
330 * nto-procfs.c (nto_procfs_target::create_inferior): Adjust.
331 * windows-nat.c (windows_nat_target::create_inferior): Adjust.
332
333 2020-06-26 Nick Alcock <nick.alcock@oracle.com>
334
335 * configure.ac: Add --enable-libctf: handle --disable-static
336 properly.
337 * acinclude.m4: sinclude ../config/enable.m4.
338 * Makefile.in (aclocal_m4_deps): Adjust accordingly.
339 (LIBCTF): Substitute in.
340 (CTF_DEPS): New, likewise.
341 (CLIBS): libctf needs symbols from libbfd: move earlier.
342 (CDEPS): Use CTF_DEPS, not LIBCTF, now LIBCTF can include rpath
343 flags.
344 * ctfread.c: Surround in ENABLE_LIBCTF.
345 (elfctf_build_psymtabs) [!ENABLE_LIBCTF]: New stub.
346 * configure: Regenerate.
347 * config.in: Likewise.
348
349 2020-06-25 Simon Marchi <simon.marchi@efficios.com>
350
351 * infcmd.c (set_inferior_io_terminal): Use make_unique_xstrdup.
352
353 2020-06-25 Simon Marchi <simon.marchi@efficios.com>
354
355 * inferior.h (struct inferior) <terminal>: Change type to
356 gdb::unique_xmalloc_ptr<char>.
357 * inferior.c (inferior::~inferior): Don't free inf->terminal.
358 * infcmd.c (set_inferior_io_terminal): Don't free terminal
359 field, adjust to unique pointer.
360 (get_inferior_io_terminal): Adjust to unique pointer.
361
362 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
363
364 * riscv-tdep.c (riscv_print_registers_info): Loop over all
365 registers, not just the known core set of registers.
366
367 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
368
369 * riscv-tdep.c (riscv_register_name): Return NULL for duplicate
370 fflags, frm, and fcsr registers.
371 (riscv_register_reggroup_p): Remove unknown CSRs from save and
372 restore groups.
373 (riscv_tdesc_unknown_reg): New function.
374 (riscv_gdbarch_init): Pass riscv_tdesc_unknown_reg to
375 tdesc_use_registers.
376 * riscv-tdep.h (struct gdbarch_tdep): Add
377 unknown_csrs_first_regnum, unknown_csrs_count,
378 duplicate_fflags_regnum, duplicate_frm_regnum, and
379 duplicate_fcsr_regnum fields.
380
381 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
382
383 * target-descriptions.c (tdesc_use_registers): Add new parameter a
384 callback, use the callback (when not null) to help number unknown
385 registers.
386 * target-descriptions.h (tdesc_unknown_register_ftype): New typedef.
387 (tdesc_use_registers): Add extra parameter to declaration.
388
389 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
390
391 * riscv-tdep.c (value_of_riscv_user_reg): Moved to here from later
392 in the file.
393 (class riscv_pending_register_alias): Likewise.
394 (riscv_register_feature::register_info): Change 'required_p' field
395 to 'required', and change its type. Add 'check' member function.
396 (riscv_register_feature::register_info::check): Define new member
397 function.
398 (riscv_xreg_feature): Change initialisation of 'required' field.
399 (riscv_freg_feature): Likewise.
400 (riscv_virtual_feature): Likewise.
401 (riscv_csr_feature): Likewise.
402 (riscv_check_tdesc_feature): Take extra parameter, the csr
403 tdesc_feature, rewrite the function to use the new
404 riscv_register_feature::register_info::check function.
405 (riscv_gdbarch_init): Pass the csr tdesc_feature where needed.
406
407 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
408
409 * features/Makefile: Remove all references to the deleted files
410 below.
411 * features/riscv/32bit-csr.c: Deleted.
412 * features/riscv/32bit-csr.xml: Deleted.
413 * features/riscv/64bit-csr.c: Deleted.
414 * features/riscv/64bit-csr.xml: Deleted.
415 * features/riscv/rebuild-csr-xml.sh: Deleted.
416
417 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
418
419 * riscv-tdep.c (struct riscv_register_feature::register_info): Fix
420 whitespace error for declaration of names member variable.
421 (struct riscv_register_feature): Add new prefer_first_name member
422 variable, and fix whitespace error in declaration of registers.
423 (riscv_xreg_feature): Initialize prefer_first_name field.
424 (riscv_freg_feature): Likewise.
425 (riscv_virtual_feature): Likewise.
426 (riscv_csr_feature): Likewise.
427 (riscv_register_name): Expand on comments. Remove register name
428 modifications for CSR and virtual registers.
429
430 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
431
432 * riscv-tdep.c (struct riscv_register_feature): Fix whitespace
433 errors.
434
435 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
436
437 * riscv-tdep.c (riscv_create_csr_aliases): Handle csr aliases from
438 riscv-opc.h.
439 (class riscv_pending_register_alias): New class.
440 (riscv_check_tdesc_feature): Take vector of pending aliases and
441 populate it as appropriate.
442 (riscv_setup_register_aliases): Delete.
443 (riscv_gdbarch_init): Create vector of pending aliases and pass it
444 to riscv_check_tdesc_feature in all cases. Use the vector to
445 create the register aliases.
446
447 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
448
449 * sol2-tdep.c (sol2_static_transform_name): Remove.
450 (sol2_init_abi): Don't register it.
451 * gdbarch.sh (static_transform_name): Remove.
452 * gdbarch.c, gdbarch.h: Regenerate.
453
454 * dbxread.c (read_dbx_symtab) <'S'>: Remove call to
455 gdbarch_static_transform_name.
456 * mdebugread.c (parse_partial_symbols) <'S'>: Likewise.
457 * stabsread.c (define_symbol) <'X'>: Remove.
458 (define_symbol) <'S'>: Remove gdbarch_static_transform_name
459 handling.
460 <'V'>: Likewise.
461 * xcoffread.c (scan_xcoff_symtab): Remove gdbarch.
462 <'S'>: Remove call to gdbarch_static_transform_name.
463
464 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
465
466 * procfs.c (procfs_pre_trace): New function.
467 (procfs_target::create_inferior): Pass it to fork_inferior.
468
469 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
470
471 * configure.tgt <sparc-*-linux*> (gdb_target_obs): Remove
472 sparc-sol2-tdep.o, sol2-tdep.o, sparc64-sol2-tdep.o.
473 <sparc64-*-linux*> (gdb_target_obs): Remove sparc64-sol2-tdep.o,
474 sol2-tdep.o, sparc-sol2-tdep.o.
475 * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Make static.
476 * sparc-tdep.h (sparc32_sol2_init_abi): Remove.
477 * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Make static.
478 * sparc64-tdep.h (sparc64_sol2_init_abi): Remove.
479
480 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
481
482 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Remove.
483 (amd64_sol2_init_abi): Use sol2_sigtramp_p.
484 Call sol2_init_abi.
485 Remove calls to set_gdbarch_skip_solib_resolver,
486 set_gdbarch_core_pid_to_str.
487 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Remove.
488 (i386_sol2_static_transform_name): Remove.
489 (i386_sol2_init_abi): Call sol2_init_abi.
490 Remove calls to set_gdbarch_sofun_address_maybe_missing,
491 set_gdbarch_static_transform_name,
492 set_gdbarch_skip_solib_resolver, set_gdbarch_core_pid_to_str.
493 Use sol2_sigtramp_p.
494 * sol2-tdep.c (sol2_pc_in_sigtramp): New function.
495 (sol2_sigtramp_p): New function.
496 (sol2_static_transform_name): New function.
497 (sol2_skip_solib_resolver, sol2_core_pid_to_str): Make static.
498 (sol2_init_abi): New function.
499 * sol2-tdep.h (sol2_sigtramp_p, sol2_init_abi): Declare.
500 (sol2_skip_solib_resolver, sol2_core_pid_to_str): Remove.
501 * sparc-sol2-tdep.c (sparc_sol2_pc_in_sigtramp): Remove.
502 (sparc32_sol2_sigtramp_frame_sniffer): Just call sol2_sigtramp_p.
503 (sparc_sol2_static_transform_name): Remove.
504 (sparc32_sol2_init_abi): Call sol2_init_abi.
505 Remove calls to set_gdbarch_sofun_address_maybe_missing,
506 set_gdbarch_static_transform_name,
507 set_gdbarch_skip_solib_resolver,
508 set_gdbarch_core_pid_to_str.
509 * sparc-tdep.h (sparc_sol2_pc_in_sigtramp)
510 (sparc_sol2_static_transform_name): Remove
511 * sparc64-sol2-tdep.c (sparc64_sol2_sigtramp_frame_sniffer): Just
512 call sol2_sigtramp_p.
513 (sparc64_sol2_init_abi): Call sol2_init_abi.
514 Remove calls to set_gdbarch_sofun_address_maybe_missing,
515 set_gdbarch_static_transform_name,
516 set_gdbarch_skip_solib_resolver, set_gdbarch_core_pid_to_str.
517
518 2020-06-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
519
520 * symfile-add-flags.h: New flag SYMFILE_ALWAYS_CONFIRM.
521 * exec.c (validate_exec_file): If from_tty, set both
522 SYMFILE_VERBOSE (== from_tty) and SYMFILE_ALWAYS_CONFIRM.
523 * symfile.c (symbol_file_add_with_addrs): if always_confirm
524 and from_tty, unconditionally ask a confirmation.
525
526 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
527
528 * target-descriptions.c (tdesc_architecture_name): Protect against
529 NULL pointer dereference.
530 (maint_print_xml_tdesc_cmd): New function.
531 (_initialize_target_descriptions): Register new 'maint print
532 xml-tdesc' command and give it the filename completer.
533 * NEWS: Mention new 'maint print xml-tdesc' command.
534
535 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
536
537 * target-descriptions.c (class tdesc_compatible_info): New class.
538 (struct target_desc): Change type of compatible vector.
539 (tdesc_compatible_p): Update for change in type of
540 target_desc::compatible.
541 (tdesc_compatible_info_list): New function.
542 (tdesc_compatible_info_arch_name): New function.
543 (tdesc_add_compatible): Update for change in type of
544 target_desc::compatible.
545 (print_c_tdesc::visit_pre): Likewise.
546
547 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
548
549 * target-descriptions.c (print_c_tdesc::print_c_tdesc): Change
550 whitespace to underscore.
551 (maint_print_c_tdesc_cmd): Use fake filename for target
552 descriptions that came from the target.
553 (_initialize_target_descriptions): Add filename command completion
554 for 'maint print c-tdesc'.
555
556 2020-06-23 Simon Marchi <simon.marchi@efficios.com>
557
558 * dwarf2/loc.c (decode_debug_loclists_addresses): Add empty
559 lines.
560
561 2020-06-23 Simon Marchi <simon.marchi@efficios.com>
562
563 * dwarf2/loc.c (decode_debug_loc_dwo_addresses): Add empty
564 lines.
565 (dwarf2_find_location_expression): Likewise.
566 (call_site_parameter_matches): Likewise.
567 (dwarf2_compile_expr_to_ax): Likewise.
568 (disassemble_dwarf_expression): Likewise.
569 (loclist_describe_location): Likewise.
570
571 2020-06-23 Pedro Alves <palves@redhat.com>
572
573 * gdbarch-selftests.c: Don't include inferior.h, gdbthread.h or
574 progspace-and-thread.h. Include scoped-mock-context.h instead.
575 (register_to_value_test): Use scoped_mock_context.
576 * regcache.c: Include "scoped-mock-context.h".
577 (cooked_read_test): Don't error out if a target is already pushed.
578 Use scoped_mock_context. Adjust.
579 * scoped-mock-context.h: New file.
580
581 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
582
583 * ada-lang.c (ada_language_data): Delete la_is_string_type_p
584 initializer.
585 (ada_language::is_string_type_p): New member function.
586 * c-lang.c (c_language_data): Delete la_is_string_type_p
587 initializer.
588 (cplus_language_data): Likewise.
589 (asm_language_data): Likewise.
590 (minimal_language_data): Likewise.
591 * d-lang.c (d_language_data): Likewise.
592 * f-lang.c (f_is_string_type_p): Delete function, implementation
593 moved to f_language::is_string_type_p.
594 (f_language_data): Delete la_is_string_type_p initializer.
595 (f_language::is_string_type_p): New member function,
596 implementation from f_is_string_type_p.
597 * go-lang.c (go_is_string_type_p): Delete function, implementation
598 moved to go_language::is_string_type_p.
599 (go_language_data): Delete la_is_string_type_p initializer.
600 (go_language::is_string_type_p): New member function,
601 implementation from go_is_string_type_p.
602 * language.c (language_defn::is_string_type_p): Define new member
603 function.
604 (default_is_string_type_p): Make static, add comment copied from
605 header file.
606 (unknown_language_data): Delete la_is_string_type_p initializer.
607 (unknown_language::is_string_type_p): New member function.
608 (auto_language_data): Delete la_is_string_type_p initializer.
609 (auto_language::is_string_type_p): New member function.
610 * language.h (language_data): Delete la_is_string_type_p field.
611 (language_defn::is_string_type_p): Declare new function.
612 (default_is_string_type_p): Delete desclaration, move comment to
613 definition.
614 * m2-lang.c (m2_is_string_type_p): Delete function, implementation
615 moved to m2_language::is_string_type_p.
616 (m2_language_data): Delete la_is_string_type_p initializer.
617 (m2_language::is_string_type_p): New member function,
618 implementation from m2_is_string_type_p.
619 * objc-lang.c (objc_language_data): Delete la_is_string_type_p
620 initializer.
621 * opencl-lang.c (opencl_language_data): Likewise.
622 * p-lang.c (pascal_is_string_type_p): Delete function,
623 implementation moved to pascal_language::is_string_type_p.
624 (pascal_language_data): Delete la_is_string_type_p initializer.
625 (pascal_language::is_string_type_p): New member function,
626 implementation from pascal_is_string_type_p.
627 * rust-lang.c (rust_is_string_type_p): Delete function,
628 implementation moved to rust_language::is_string_type_p.
629 (rust_language_data): Delete la_is_string_type_p initializer.
630 (rust_language::is_string_type_p): New member function,
631 implementation from rust_is_string_type_p.
632 * valprint.c (val_print_scalar_or_string_type_p): Update call to
633 is_string_type_p.
634
635 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
636
637 * ada-lang.c (ada_language_data): Delete la_print_typedef
638 initializer.
639 (ada_language::print_typedef): New member function.
640 * c-lang.c (c_language_data): Delete la_print_typedef initializer.
641 (cplus_language_data): Likewise.
642 (asm_language_data): Likewise.
643 (minimal_language_data): Likewise.
644 * d-lang.c (d_language_data): Likewise.
645 * f-lang.c (f_language_data): Likewise.
646 (f_language::print_typedef): New member function.
647 * go-lang.c (go_language_data): Delete la_print_typedef
648 initializer.
649 * language.c (language_defn::print_typedef): Define member
650 function.
651 (unknown_language_data): Delete la_print_typedef initializer.
652 (unknown_language::print_typedef): New member function.
653 (auto_language_data): Delete la_print_typedef initializer.
654 (auto_language::print_typedef): New member function.
655 * language.h (language_data): Delete la_print_typedef field.
656 (language_defn::print_typedef): Declare new member function.
657 (LA_PRINT_TYPEDEF): Update call to print_typedef.
658 (default_print_typedef): Delete declaration.
659 * m2-lang.c (m2_language_data): Delete la_print_typedef
660 initializer.
661 (m2_language::print_typedef): New member function.
662 * objc-lang.c (objc_language_data): Delete la_print_typedef
663 initializer.
664 * opencl-lang.c (opencl_language_data): Likewise.
665 * p-lang.c (pascal_language_data): Likewise.
666 (pascal_language::print_typedef): New member function.
667 * rust-lang.c (rust_print_typedef): Delete function,
668 implementation moved to rust_language::print_typedef.
669 (rust_language): Delete la_print_typedef initializer.
670 (rust_language::print_typedef): New member function,
671 implementation from rust_print_typedef.
672 * typeprint.c (default_print_typedef): Delete.
673
674 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
675
676 * ada-lang.c (ada_language_data): Delete la_printstr initializer.
677 (ada_language::printstr): New member function.
678 * c-lang.c (c_language_data): Delete la_printstr initializer.
679 (cplus_language_data): Likewise.
680 (asm_language_data): Likewise.
681 (minimal_language_data): Likewise.
682 * d-lang.c (d_language_data): Likewise.
683 * f-lang.c (f_printstr): Rename to f_language::printstr.
684 (f_language_data): Delete la_printstr initializer.
685 (f_language::printstr): New member function, implementation from
686 f_printstr.
687 * go-lang.c (go_language_data): Delete la_printstr initializer.
688 * language.c (language_defn::printstr): Define new member
689 function.
690 (unk_lang_printstr): Delete.
691 (unknown_language_data): Delete la_printstr initializer.
692 (unknown_language::printstr): New member function.
693 (auto_language_data): Delete la_printstr initializer.
694 (auto_language::printstr): New member function.
695 * language.h (language_data): Delete la_printstr field.
696 (language_defn::printstr): Declare new member function.
697 (LA_PRINT_STRING): Update call to printstr.
698 * m2-lang.c (m2_printstr): Rename to m2_language::printstr.
699 (m2_language_data): Delete la_printstr initializer.
700 (m2_language::printstr): New member function, implementation from
701 m2_printstr.
702 * objc-lang.c (objc_language_data): Delete la_printstr
703 initializer.
704 * opencl-lang.c (opencl_language_data): Likewise.
705 * p-lang.c (pascal_printstr): Rename to pascal_language::printstr.
706 (pascal_language_data): Delete la_printstr initializer.
707 (pascal_language::printstr): New member function, implementation
708 from pascal_printstr.
709 * p-lang.h (pascal_printstr): Delete declaration.
710 * rust-lang.c (rust_printstr): Update header comment.
711 (rust_language_data): Delete la_printstr initializer.
712 (rust_language::printstr): New member function.
713
714 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
715
716 * ada-lang.c (ada_language_data): Delete la_printchar initializer.
717 (ada_language::printchar): New member function.
718 * c-lang.c (c_language_data): Delete la_printchar initializer.
719 (cplus_language_data): Likewise.
720 (asm_language_data): Likewise.
721 (minimal_language_data): Likewise.
722 * d-lang.c (d_language_data): Likewise.
723 * f-lang.c (f_printchar): Rename to f_language::printchar.
724 (f_language_data): Delete la_printchar initializer.
725 (f_language::printchar): New member function, implementation from
726 f_printchar.
727 * go-lang.c (go_language_data): Delete la_printchar initializer.
728 * language.c (unk_lang_printchar): Delete.
729 (language_defn::printchar): Define new member function.
730 (unknown_language_data): Delete la_printchar initializer.
731 (unknown_language::printchar): New member function.
732 (auto_language_data): Delete la_printchar initializer.
733 (auto_language::printchar): New member function.
734 * language.h (language_data): Delete la_printchar field.
735 (language_defn::printchar): Declare new member function.
736 (LA_PRINT_CHAR): Update call to printchar.
737 * m2-lang.c (m2_language_data): Delete la_printchar initializer.
738 (m2_language::printchar): New member function.
739 * objc-lang.c (objc_language_data): Delete la_printchar
740 initializer.
741 * opencl-lang.c (opencl_language_data): Likewise.
742 * p-lang.c (pascal_language_data): Delete la_printchar
743 initializer.
744 (pascal_language::printchar): New member function.
745 * rust-lang.c (rust_printchar): Rename to
746 rust_language::printchar.
747 (rust_language_data): Delete la_printchar initializer.
748 (rust_language::printchar): New member function, implementation
749 from rust_printchar.
750
751 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
752
753 * ada-lang.c (emit_char): Renamed to ada_language::emitchar.
754 (ada_language_data): Delete la_emitchar initializer.
755 (ada_language::emitchar): New member function, implementation from
756 emit_char.
757 * c-lang.c (c_language_data): Delete la_emitchar initializer.
758 (cplus_language_data): Likewise.
759 (asm_language_data): Likewise.
760 (minimal_language_data): Likewise.
761 * d-lang.c (d_language_data): Likewise.
762 * f-lang.c (f_emit_char): Rename to f_language::emitchar.
763 (f_language_data): Delete la_emitchar initializer.
764 (f_language::emitchar): New member function, implementation from
765 f_emit_char.
766 * go-lang.c (go_language_data): Delete la_emitchar initializer.
767 * language.c (unk_lang_emit_char): Delete.
768 (language_defn::emitchar): New member function definition.
769 (unknown_language_data): Delete la_emitchar initializer.
770 (unknown_language::emitchar): New member function.
771 (auto_language_data): Delete la_emitchar initializer.
772 (auto_language::emitchar): New member function.
773 * language.h (language_data): Delete la_emitchar field.
774 (language_defn::emitchar): New member field declaration.
775 (LA_EMIT_CHAR): Update call to emitchar.
776 * m2-lang.c (m2_emit_char): Rename to m2_language::emitchar.
777 (m2_language_data): Delete la_emitchar initializer.
778 (m2_language::emitchar): New member function, implementation from
779 m2_emit_char.
780 * objc-lang.c (objc_language_data): Delete la_emitchar
781 initializer.
782 * opencl-lang.c (opencl_language_data): Likewise.
783 * p-lang.c (pascal_emit_char): Rename to pascal_language::emitchar.
784 (pascal_language_data): Delete la_emitchar initializer.
785 (pascal_language::emitchar): New member function, implementation
786 from pascal_emit_char.
787 * rust-lang.c (rust_emitchar): Rename to rust_language::emitchar.
788 (rust_language_data): Delete la_emitchar initializer.
789 (rust_language::emitchar): New member function, implementation
790 from rust_emitchar.
791
792 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
793
794 * ada-lang.c (resolve): Rename to ada_language::post_parser.
795 (ada_language_data): Delete la_post_parser initializer.
796 (ada_language::post_parser): New member function.
797 * c-lang.c (c_language_data): Delete la_post_parser initializer.
798 (cplus_language_data): Likewise.
799 (asm_language_data): Likewise.
800 (minimal_language_data): Likewise.
801 * d-lang.c (d_language_data): Likewise.
802 * f-lang.c (f_language_data): Likewise.
803 * go-lang.c (go_language_data): Likewise.
804 * language.c (unknown_language_data): Likewise.
805 (auto_language_data): Likewise.
806 * language.h (language_data): Delete la_post_parser field.
807 (language_defn::post_parser): New member function.
808 * m2-lang.c (m2_language_data): Delete la_post_parser initializer.
809 * objc-lang.c (objc_language_data): Likewise.
810 * opencl-lang.c (opencl_language_data): Likewise.
811 * p-lang.c (pascal_language_data): Likewise.
812 * parse.c (parse_exp_in_context): Update call to post_parser.
813 (null_post_parser): Delete definition.
814 * parser-defs.h (null_post_parser): Delete declaration.
815 * rust-lang.c (rust_language_data): Delete la_post_parser
816 initializer.
817
818 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
819
820 * ada-lang.c (parse): Rename to ada_language::parser.
821 (ada_language_data): Delete la_parser initializer.
822 (ada_language::parser): New member function, implementation from
823 parse.
824 * c-lang.c (c_language_data): Delete la_parser initializer.
825 (cplus_language_data): Likewise.
826 (asm_language_data): Likewise.
827 (minimal_language_data): Likewise.
828 * d-lang.c (d_language_data): Likewise.
829 (d_language::parser): New member function.
830 * f-lang.c (f_language_data): Delete la_parser initializer.
831 (f_language::parser): New member function.
832 * go-lang.c (go_language_data): Delete la_parser initializer.
833 (go_language::parser): New member function.
834 * language.c (unk_lang_parser): Delete.
835 (language_defn::parser): Define new member function.
836 (unknown_language_data): Delete la_parser initializer.
837 (unknown_language::parser): New member function.
838 (auto_language_data): Delete la_parser initializer.
839 (auto_language::parser): New member function.
840 * language.h (language_data): Delete la_parser field.
841 (language_defn::parser): Declare new member function.
842 * m2-lang.c (m2_language_data): Delete la_parser initializer.
843 (m2_language::parser): New member function.
844 * objc-lang.c (objc_language_data): Delete la_parser initializer.
845 * opencl-lang.c (opencl_language_data): Likewise.
846 * p-lang.c (pascal_language_data): Likewise.
847 (pascal_language::parser): New member function.
848 * parse.c (parse_exp_in_context): Update call to parser.
849 * rust-lang.c (rust_language_data): Delete la_parser initializer.
850 (rust_language::parser): New member function.
851
852 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
853
854 * top.c (print_gdb_configuration): Print --with-python-libdir
855 configuration value.
856
857 2020-06-22 Philippe Waroquiers <philippe.waroquiers@skynet.be>
858
859 * NEWS: Mention change to the alias command.
860
861 2020-06-22 Philippe Waroquiers <philippe.waroquiers@skynet.be>
862
863 * cli/cli-cmds.c (lookup_cmd_for_default_args)
864 (alias_command_completer)
865 (make_alias_options_def_group): New functions.
866 (alias_opts, alias_option_defs): New struct and array.
867 (alias_usage_error): Update usage.
868 (alias_command): Handles optional DEFAULT-ARGS... arguments.
869 Use option framework.
870 (_initialize_cli_cmds): Update alias command help.
871 Update aliases command help.
872 (show_user):
873 Add NULL for new default_args lookup_cmd argument.
874 (valid_command_p): Rename to validate_aliased_command.
875 Add NULL for new default_args lookup_cmd argument. Verify that the
876 aliased_command has no default args.
877 * cli/cli-decode.c (help_cmd): Show aliases definitions.
878 (lookup_cmd_1, lookup_cmd): New argument default_args.
879 (add_alias_cmd):
880 Add NULL for new default_args lookup_cmd argument.
881 (print_help_for_command): Show default args under the layout
882 alias some_alias = some_aliased_cmd some_alias_default_arg.
883 * cli/cli-decode.h (struct cmd_list_element): New member default_args.
884 xfree default_args in destructor.
885 * cli/cli-script.c (process_next_line, do_define_command):
886 Add NULL for new default_args lookup_cmd argument.
887 * command.h: Declare new default_args argument in lookup_cmd
888 and lookup_cmd_1.
889 * completer.c (complete_line_internal_1):
890 Add NULL for new default_args lookup_cmd or lookup_cmd_1 argument.
891 * guile/scm-cmd.c (gdbscm_parse_command_name): Likewise.
892 * guile/scm-param.c (add_setshow_generic, pascm_parameter_defined_p):
893 Likewise.
894 * infcmd.c (_initialize_infcmd): Likewise.
895 * python/py-auto-load.c (gdbpy_initialize_auto_load): Likewise.
896 * python/py-cmd.c (gdbpy_parse_command_name): Likewise.
897 * python/py-param.c (add_setshow_generic): Likewise.
898 * remote.c (_initialize_remote): Likewise.
899 * top.c (execute_command): Prepend default_args if command has some.
900 (set_verbose):
901 Add NULL for new default_args lookup_cmd or lookup_cmd_1 argument.
902 * tracepoint.c (validate_actionline, encode_actions_1):
903 Add NULL for new default_args lookup_cmd or lookup_cmd_1 argument.
904
905 2020-06-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
906
907 * jit.c (jit_read_descriptor): Use bool as the return type.
908 (jit_breakpoint_re_set_internal): Use bool as the return type.
909 Invert the return value logic; return true if the jit breakpoint
910 has been successfully initialized.
911 (jit_inferior_init): Update the call to
912 jit_breakpoint_re_set_internal.
913
914 2020-06-22 Pedro Alves <palves@redhat.com>
915
916 PR gdb/25939
917 * procfs.c (procfs_target::wait): Don't reference inferior_ptid.
918 Use the current inferior instead. Don't return
919 TARGET_WAITKIND_SPURIOUS/inferior_ptid -- instead continue and
920 wait again.
921 * sol-thread.c (sol_thread_target::wait): Don't reference
922 inferior_ptid.
923 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs)
924 (sol_update_thread_list_callback): Use the current inferior's pid
925 instead of inferior_ptid.
926
927 2020-06-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
928
929 * procfs.c: Cleanup many comments.
930
931 (READ_WATCHFLAG, WRITE_WATCHFLAG, EXEC_WATCHFLAG)
932 (AFTER_WATCHFLAG): Replace by value.
933
934 (MAIN_PROC_NAME_FORMAT): Inline ...
935 (create_procinfo): ... here.
936
937 (procfs_debug_inferior): Remove SYS_exec handling.
938 (syscall_is_exec): Likewise.
939 (procfs_set_exec_trap): Likewise.
940
941 (syscall_is_lwp_exit): Inline in callers.
942 (syscall_is_exit): Likewise.
943 (syscall_is_exec): Likewise.
944 (syscall_is_lwp_create): Likewise.
945
946 (invalidate_cache): Remove #if 0 code.
947
948 (make_signal_thread_runnable): Remove.
949 (procfs_target::resume): Remove #if 0 code.
950
951 2020-06-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
952
953 PR gdb/25939
954 * procfs.c (procfs_target::procfs_init_inferior): Move push_target
955 call ...
956 (procfs_target::create_inferior): ... here.
957
958 2020-06-21 Philippe Waroquiers <philippe.waroquiers@skynet.be>
959
960 * exec.c (validate_exec_file): Ensure the build-id is up to
961 date by calling reopen_exec_file (that checks file timestamp
962 to decide to re-read the file).
963
964 2020-06-18 Pedro Alves <palves@redhat.com>
965
966 PR gdb/25412
967 * gdbthread.h (delete_thread, delete_thread_silent)
968 (find_thread_ptid): Update comments.
969 * thread.c (current_thread_): New global.
970 (is_current_thread): Move higher, and reimplement.
971 (inferior_thread): Reimplement.
972 (set_thread_exited): Use bool. Add assertions.
973 (add_thread_silent): Simplify thread-reuse handling by always
974 calling delete_thread.
975 (delete_thread): Remove intro comment.
976 (find_thread_ptid): Skip exited threads.
977 (switch_to_thread_no_regs): Write to current_thread_.
978 (switch_to_no_thread): Check CURRENT_THREAD_ instead of
979 INFERIOR_PTID. Clear current_thread_.
980
981 2020-06-18 Pedro Alves <palves@redhat.com>
982
983 * aix-thread.c (pd_update): Use switch_to_thread.
984
985 2020-06-18 Pedro Alves <palves@redhat.com>
986
987 * ravenscar-thread.c (ravenscar_thread_target): Update.
988 (ravenscar_thread_target::update_inferior_ptid): Rename to ...
989 (ravenscar_thread_target::add_active_thread): ... this. Don't
990 set m_base_ptid here. Update to avoid referencing inferior_ptid.
991 (ravenscar_thread_target::wait): Don't write to inferior_ptid.
992
993 2020-06-18 Pedro Alves <palves@redhat.com>
994
995 * nat/windows-nat.c (current_windows_thread): Remove.
996 * nat/windows-nat.h (current_windows_thread): Remove.
997 * windows-nat.c (windows_nat_target::stopped_by_sw_breakpoint):
998 Adjust.
999 (display_selectors): Adjust to fetch the current
1000 windows_thread_info based on inferior_ptid.
1001 (fake_create_process): No longer write to current_windows_thread.
1002 (windows_nat_target::get_windows_debug_event):
1003 Don't set inferior_ptid or current_windows_thread.
1004 (windows_nat_target::wait): Adjust to not rely on
1005 current_windows_thread.
1006 (do_initial_windows_stuff): Now a method of windows_nat_target.
1007 Switch to the last_ptid thread.
1008 (windows_nat_target::attach): Adjust.
1009 (windows_nat_target::detach): Use switch_to_no_thread instead of
1010 writing to inferior_ptid directly.
1011 (windows_nat_target::create_inferior): Adjust.
1012
1013 2020-06-18 Pedro Alves <palves@redhat.com>
1014
1015 * windows-nat.c (do_initial_windows_stuff): No longer set inferior_ptid.
1016
1017 2020-06-18 Pedro Alves <palves@redhat.com>
1018
1019 * go32-nat.c (go32_nat_target::create_inferior): Switch to thread
1020 after creating it, instead of writing to inferior_ptid. Don't
1021 write to inferior_ptid.
1022
1023 2020-06-18 Pedro Alves <palves@redhat.com>
1024
1025 * fork-child.c (postfork_hook): Don't write to inferior_ptid.
1026
1027 2020-06-18 Pedro Alves <palves@redhat.com>
1028
1029 * bsd-kvm.c (bsd_kvm_target_open): Switch to thread after adding
1030 it, instead of writing to inferior_ptid.
1031
1032 2020-06-18 Pedro Alves <palves@redhat.com>
1033
1034 * btrace.c (btrace_fetch): Use switch_to_thread instead of writing
1035 to inferior_ptid.
1036
1037 2020-06-18 Pedro Alves <palves@redhat.com>
1038
1039 * bsd-kvm.c (bsd_kvm_target::close): Use switch_to_no_thread
1040 instead of writing to inferior_ptid directly.
1041
1042 2020-06-18 Pedro Alves <palves@redhat.com>
1043
1044 * corelow.c (core_target::close): Use switch_to_no_thread instead
1045 of writing to inferior_ptid directly.
1046 (add_to_thread_list, core_target_open): Use switch_to_thread
1047 instead of writing to inferior_ptid directly.
1048
1049 2020-06-18 Pedro Alves <palves@redhat.com>
1050
1051 * darwin-nat.c (darwin_nat_target::decode_message): Don't write to
1052 inferior_ptid.
1053 (darwin_nat_target::stop_inferior, darwin_nat_target::kill): Avoid
1054 inferior_ptid.
1055 (darwin_attach_pid): Use switch_to_no_thread instead of writing to
1056 inferior_ptid directly.
1057 (darwin_nat_target::init_thread_list): Switch to thread, instead
1058 of writing to inferior_ptid.
1059 (darwin_nat_target::attach): Don't write to inferior_ptid.
1060 (darwin_nat_target::get_ada_task_ptid): Avoid inferior_ptid.
1061
1062 2020-06-18 Pedro Alves <palves@redhat.com>
1063
1064 * gnu-nat.c (gnu_nat_target::create_inferior): Switch to the added
1065 thread.
1066 (gnu_nat_target::attach): Don't write to inferior_ptid directly.
1067 Instead use switch_to_thread.
1068 (gnu_nat_target::detach): Use switch_to_no_thread
1069 instead of writing to inferior_ptid directly. Used passed-in
1070 inferior instead of looking up the inferior by pid.
1071
1072 2020-06-18 Pedro Alves <palves@redhat.com>
1073
1074 * go32-nat.c (go32_nat_target::create_inferior): Don't write to
1075 inferior_ptid.
1076
1077 2020-06-18 Pedro Alves <palves@redhat.com>
1078
1079 * nto-procfs.c (nto_procfs_target::update_thread_list): Avoid
1080 inferior_ptid.
1081 (nto_procfs_target::attach): Avoid inferior_ptid. Switch to
1082 thread.
1083 (nto_procfs_target::detach): Avoid referencing
1084 inferior_ptid. Use switch_to_no_thread instead of writing to
1085 inferior_ptid directly.
1086 (nto_procfs_target::mourn_inferior): Use switch_to_no_thread
1087 instead of writing to inferior_ptid directly.
1088 (nto_procfs_target::create_inferior): Avoid inferior_ptid. Switch
1089 to thread.
1090
1091 2020-06-18 Pedro Alves <palves@redhat.com>
1092
1093 * remote-sim.c (gdbsim_target::create_inferior): Switch to thread
1094 after creating it, instead of writing to inferior_ptid.
1095 (gdbsim_target_open): Use switch_to_no_thread instead of writing
1096 to inferior_ptid directly.
1097 (gdbsim_target::wait): Don't write to inferior_ptid.
1098
1099 2020-06-18 Pedro Alves <palves@redhat.com>
1100
1101 * remote.c (remote_target::remote_notice_new_inferior): Use
1102 switch_to_thread instead of writing to inferior_ptid directly.
1103 (remote_target::add_current_inferior_and_thread): Use
1104 switch_to_no_thread instead of writing to inferior_ptid directly.
1105 (extended_remote_target::attach): Use switch_to_inferior_no_thread
1106 and switch_to_thread instead of using set_current_inferior or
1107 writing to inferior_ptid directly.
1108
1109 2020-06-18 Pedro Alves <palves@redhat.com>
1110
1111 * tracectf.c (ctf_target_open): Switch to added thread instead of
1112 writing to inferior_ptid directly.
1113 (ctf_target::close): Use switch_to_no_thread instead of writing to
1114 inferior_ptid directly.
1115
1116 2020-06-18 Pedro Alves <palves@redhat.com>
1117
1118 * tracefile-tfile.c (tfile_target_open): Don't write to
1119 inferior_ptid directly, instead switch to added thread.
1120 (tfile_target::close): Use switch_to_no_thread instead of writing
1121 to inferior_ptid directly.
1122
1123 2020-06-18 Pedro Alves <palves@redhat.com>
1124
1125 * procfs.c (procfs_target::attach): Don't write to inferior_ptid.
1126 (procfs_target::detach): Use switch_to_no_thread
1127 instead of writing to inferior_ptid directly.
1128 (do_attach): Change return type to void. Switch to the added
1129 thread.
1130 (procfs_target::create_inferior): Switch to the added thread.
1131 (procfs_do_thread_registers): Don't write to inferior_ptid.
1132
1133 2020-06-18 Pedro Alves <palves@redhat.com>
1134
1135 * infrun.c (generic_mourn_inferior): Use switch_to_thread instead
1136 of writing to inferior_ptid.
1137 (scoped_restore_exited_inferior): Delete.
1138 (handle_vfork_child_exec_or_exit): Simplify using
1139 scoped_restore_current_pspace_and_thread. Use switch_to_thread
1140 instead of writing to inferior_ptid.
1141 (THREAD_STOPPED_BY): Delete.
1142 (thread_stopped_by_watchpoint, thread_stopped_by_sw_breakpoint)
1143 (thread_stopped_by_hw_breakpoint): Delete.
1144 (save_waitstatus): Use
1145 scoped_restore_current_thread+switch_to_thread, and call
1146 target_stopped_by_watchpoint instead of
1147 thread_stopped_by_watchpoint, target_stopped_by_sw_breakpoint
1148 instead of thread_stopped_by_sw_breakpoint, and
1149 target_stopped_by_hw_breakpoint instead of
1150 thread_stopped_by_hw_breakpoint.
1151 (handle_inferior_event)
1152 <TARGET_WAITKIND_EXITED/TARGET_WAITKIND_SIGNALLED>: Don't write to
1153 inferior_ptid directly, nor
1154 set_current_inferior/set_current_program_space. Use
1155 switch_to_thread / switch_to_inferior_no_thread instead.
1156
1157 2020-06-18 Pedro Alves <palves@redhat.com>
1158
1159 * target.c (generic_mourn_inferior): Use switch_to_no_thread
1160 instead of writing to inferior_ptid.
1161
1162 2020-06-18 Pedro Alves <palves@redhat.com>
1163
1164 * inf-ptrace.c (inf_ptrace_target::create_inferior): Switch to the
1165 added thread.
1166 (inf_ptrace_target::attach): Don't write to inferior_ptid. Switch
1167 to the added thread.
1168 (inf_ptrace_target::detach_success): Use switch_to_no_thread
1169 instead of writing to inferior_ptid.
1170
1171 2020-06-18 Pedro Alves <palves@redhat.com>
1172
1173 * gdbarch-selftests.c: Include "progspace-and-thread.h".
1174 (register_to_value_test): Mock a program_space too. Heap-allocate
1175 the address space. Don't write to inferior_ptid. Use
1176 switch_to_thread instead.
1177
1178 2020-06-18 Pedro Alves <palves@redhat.com>
1179
1180 * linux-tdep.c (find_signalled_thread(thread_info *,void *)):
1181 Delete.
1182 (find_signalled_thread()): New, factored out from
1183 linux_make_corefile_notes and adjusted to handle exited threads.
1184 (linux_make_corefile_notes): Adjust to use the new
1185 find_signalled_thread.
1186
1187 2020-06-18 Pedro Alves <palves@redhat.com>
1188
1189 * linux-tdep.c (btrace_fetch): Save/restore current thread instead
1190 of saving/restoring inferior_ptid.
1191
1192 2020-06-17 Tom Tromey <tom@tromey.com>
1193
1194 * tui/tui-win.h (tui_scroll_forward, tui_scroll_backward)
1195 (tui_scroll_left, tui_scroll_right, struct tui_win_info): Don't
1196 declare.
1197 * tui/tui-data.h (MIN_CMD_WIN_HEIGHT): Remove.
1198
1199 2020-06-15 Simon Marchi <simon.marchi@efficios.com>
1200
1201 * dwarf2/read.c (dwarf2_initialize_objfile): Check for presence
1202 of partial symtabs.
1203
1204 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
1205
1206 * regformats/reg-arm.dat: Remove.
1207 * regformats/reg-bfin.dat: Remove.
1208 * regformats/reg-cris.dat: Remove.
1209 * regformats/reg-crisv32.dat: Remove.
1210 * regformats/reg-m32r.dat: Remove.
1211 * regformats/reg-tilegx.dat: Remove.
1212 * regformats/reg-tilegx32.dat: Remove.
1213
1214 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
1215
1216 * features/Makefile (WHICH): Remove arm files.
1217 * regformats/arm/arm-with-iwmmxt.dat: Remove.
1218 * regformats/arm/arm-with-neon.dat: Remove.
1219 * regformats/arm/arm-with-vfpv2.dat: Remove.
1220 * regformats/arm/arm-with-vfpv3.dat: Remove.
1221
1222 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
1223
1224 * features/Makefile (XMLTOC): Remove rx.xml.
1225
1226 2020-06-17 Pedro Alves <palves@redhat.com>
1227
1228 * gdbthread.h (thread_control_state) <trap_expected> Update
1229 comments.
1230
1231 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1232
1233 * ada-lang.c (ada_lookup_symbol_nonlocal): Rename to
1234 ada_language::lookup_symbol_nonlocal.
1235 (ada_language_data): Delete la_lookup_symbol_nonlocal initializer.
1236 (ada_language::lookup_symbol_nonlocal): New member function,
1237 implementation from ada_lookup_symbol_nonlocal.
1238 * c-lang.c (c_language_data): Delete la_lookup_symbol_nonlocal
1239 initializer.
1240 (cplus_language_data): Delete la_lookup_symbol_nonlocal
1241 initializer.
1242 (cplus_language::lookup_symbol_nonlocal): New member function.
1243 (asm_language_data): Delete la_lookup_symbol_nonlocal initializer.
1244 (minimal_language_data) Likewise.
1245 * cp-namespace.c (cp_lookup_nested_symbol): Update comment.
1246 * d-lang.c (d_language_data): Delete la_lookup_symbol_nonlocal
1247 initializer.
1248 (d_language::lookup_symbol_nonlocal): New member function.
1249 * f-lang.c (f_language_data): Delete la_lookup_symbol_nonlocal
1250 initializer.
1251 (f_language::lookup_symbol_nonlocal): New member function.
1252 * go-lang.c (go_language_data): Delete la_lookup_symbol_nonlocal
1253 initializer.
1254 * language.c (unknown_language_data): Likewise.
1255 (auto_language_data): Likewise.
1256 * language.h (language_data): Delete la_lookup_symbol_nonlocal
1257 field.
1258 (language_defn::lookup_symbol_nonlocal): New member function.
1259 * m2-lang.c (m2_language_data): Delete la_lookup_symbol_nonlocal
1260 initializer.
1261 * objc-lang.c (objc_language_data): Likewise.
1262 * opencl-lang.c (opencl_language_data): Likewise.
1263 * p-lang.c (pascal_language_data): Likewise.
1264 * rust-lang.c (rust_lookup_symbol_nonlocal): Rename to
1265 rust_language::lookup_symbol_nonlocal.
1266 (rust_language_data): Delete la_lookup_symbol_nonlocal
1267 initializer.
1268 (rust_language::lookup_symbol_nonlocal): New member function,
1269 implementation from rust_lookup_symbol_nonlocal.
1270 * symtab.c (lookup_symbol_aux): Update call to
1271 lookup_symbol_nonlocal.
1272 (basic_lookup_symbol_nonlocal): Rename to...
1273 (language_defn::lookup_symbol_nonlocal): ...this, and update
1274 header comment. Remove language_defn parameter, and replace with
1275 uses of `this'.
1276 * symtab.h (basic_lookup_symbol_nonlocal): Delete declaration.
1277
1278 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1279
1280 * ada-lang.c (ada_language_data): Delete la_value_print_inner
1281 initializer.
1282 (ada_language::value_print_inner): New member function.
1283 * c-lang.c (c_language_data): Delete la_value_print_inner
1284 initializer.
1285 (cplus_language_data): Likewise.
1286 (asm_language_data): Likewise.
1287 (minimal_language_data): Likewise.
1288 * d-lang.c (d_language_data): Likewise.
1289 (d_language::value_print_inner): New member function.
1290 * f-lang.c (f_language_data): Delete la_value_print_inner
1291 initializer.
1292 (f_language::value_print_inner): New member function.
1293 * f-lang.h (f_value_print_innner): Rename to...
1294 (f_value_print_inner): ...this (note spelling of 'inner').
1295 * f-valprint.c (f_value_print_innner): Rename to...
1296 (f_value_print_inner): ...this (note spelling of 'inner').
1297 * go-lang.c (go_language_data): Delete la_value_print_inner
1298 initializer.
1299 (go_language::value_print_inner): New member function.
1300 * language.c (language_defn::value_print_inner): Define new member
1301 function.
1302 (unk_lang_value_print_inner): Delete.
1303 (unknown_language_data): Delete la_value_print_inner initializer.
1304 (unknown_language::value_print_inner): New member function.
1305 (auto_language_data): Delete la_value_print_inner initializer.
1306 (auto_language::value_print_inner): New member function.
1307 * language.h (language_data): Delete la_value_print_inner field.
1308 (language_defn::value_print_inner): Delcare new member function.
1309 * m2-lang.c (m2_language_data): Delete la_value_print_inner
1310 initializer.
1311 (m2_language::value_print_inner): New member function.
1312 * objc-lang.c (objc_language_data): Delete la_value_print_inner
1313 initializer.
1314 * opencl-lang.c (opencl_language_data): Likewise.
1315 * p-lang.c (pascal_language_data): Likewise.
1316 (pascal_language::value_print_inner): New member function.
1317 * rust-lang.c (rust_language_data): Delete la_value_print_inner
1318 initializer.
1319 (rust_language::value_print_inner): New member function.
1320 * valprint.c (do_val_print): Update call to value_print_inner.
1321
1322 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1323
1324 * ada-lang.c (ada_language_data): Delete la_value_print
1325 initializer.
1326 (ada_language::value_print): New member function.
1327 * c-lang.c (c_language_data): Delete la_value_print initializer.
1328 (cplus_language_data): Likewise.
1329 (asm_language_data): Likewise.
1330 (minimal_language_data): Likewise.
1331 * d-lang.c (d_language_data): Likewise.
1332 * f-lang.c (f_language_data): Likewise.
1333 * go-lang.c (go_language_data): Likewise.
1334 * language.c (unk_lang_value_print): Delete.
1335 (language_defn::value_print): Define new member function.
1336 (unknown_language_data): Delete la_value_print initializer.
1337 (unknown_language::value_print): New member function.
1338 (auto_language_data): Delete la_value_print initializer.
1339 (auto_language::value_print): New member function.
1340 * language.h (language_data): Delete la_value_print field.
1341 (language_defn::value_print): Declare new member function.
1342 (LA_VALUE_PRINT): Update call to value_print.
1343 * m2-lang.c (m2_language_data): Delete la_value_print initializer.
1344 * objc-lang.c (objc_language_data): Likewise.
1345 * opencl-lang.c (opencl_language_data): Likewise.
1346 * p-lang.c (pascal_language_data): Likewise.
1347 (pascal_language::value_print): New member function.
1348 * rust-lang.c (rust_language_data): Delete la_value_print
1349 initializer.
1350
1351 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1352
1353 * ada-lang.c (ada_watch_location_expression): Rename to
1354 ada_language::watch_location_expression.
1355 (ada_language_data): Delete la_watch_location_expression
1356 initializer.
1357 (ada_language::watch_location_expression): New member function,
1358 implementation from ada_watch_location_expression.
1359 * breakpoint.c (watch_command_1): Update call to
1360 watch_location_expression.
1361 * c-lang.c (c_watch_location_expression): Rename to
1362 language_defn::watch_location_expression.
1363 (c_language_data): Delete la_watch_location_expression
1364 initializer.
1365 (cplus_language_data): Likewise.
1366 (asm_language_data): Likewise.
1367 (minimal_language_data): Likewise.
1368 * c-lang.h (c_watch_location_expression): Delete declaration.
1369 * d-lang.c (d_language_data): Delete la_watch_location_expression
1370 initializer.
1371 * f-lang.c (f_language_data): Likewise.
1372 * go-lang.c (go_language_data): Likewise.
1373 * language.c (language_defn::watch_location_expression): Member
1374 function implementation from c_watch_location_expression.
1375 (unknown_language_data): Delete la_watch_location_expression
1376 initializer.
1377 (auto_language_data): Likewise.
1378 * language.h (language_data): Delete la_watch_location_expression
1379 field.
1380 (language_defn::watch_location_expression): Declare new member
1381 function.
1382 * m2-lang.c (m2_language_data): Delete
1383 la_watch_location_expression initializer.
1384 * objc-lang.c (objc_language_data): Likewise.
1385 * opencl-lang.c (opencl_language_data): Likewise.
1386 * p-lang.c (pascal_language_data): Likewise.
1387 * rust-lang.c (rust_watch_location_expression): Rename to
1388 rust_language::watch_location_expression.
1389 (rust_language_data): Delete la_watch_location_expression
1390 initializer.
1391 (rust_language::watch_location_expression): New member function,
1392 implementation from rust_watch_location_expression.
1393
1394 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1395
1396 * ada-lang.c (ada_collect_symbol_completion_matches): Rename to
1397 ada_language::collect_symbol_completion_matches.
1398 (ada_language_data): Delete la_collect_symbol_completion_matches
1399 initializer.
1400 (ada_language::collect_symbol_completion_matches): New member
1401 function, implementation from
1402 ada_collect_symbol_completion_matches.
1403 * c-lang.c (c_language_data): Delete
1404 la_collect_symbol_completion_matches initializer.
1405 (cplus_language_data): Likewise.
1406 (asm_language_data): Likewise.
1407 (minimal_language_data): Likewise.
1408 * d-lang.c (d_language_data): Likewise.
1409 * f-lang.c (f_collect_symbol_completion_matches): Rename to
1410 f_language::collect_symbol_completion_matches.
1411 (f_language_data): Delete la_collect_symbol_completion_matches
1412 initializer.
1413 (f_language::collect_symbol_completion_matches) New member
1414 function, implementation from f_collect_symbol_completion_matches.
1415 * go-lang.c (go_language_data): Delete
1416 la_collect_symbol_completion_matches initializer.
1417 * language.c (unknown_language_data): Likewise.
1418 (auto_language_data): Likewise.
1419 * language.h (language_data): Delete
1420 la_collect_symbol_completion_matches field.
1421 (language_defn::collect_symbol_completion_matches): New member
1422 function.
1423 * m2-lang.c (m2_language_data): Delete
1424 la_collect_symbol_completion_matches initializer.
1425 * objc-lang.c (objc_language_data): Likewise.
1426 * opencl-lang.c (opencl_language_data): Likewise.
1427 * p-lang.c (pascal_language_data): Likewise.
1428 * rust-lang.c (rust_language_data): Likewise.
1429 * symtab.c (default_collect_symbol_completion_matches): Delete.
1430 (collect_symbol_completion_matches): Update call to
1431 collect_symbol_completion_matches.
1432 (collect_symbol_completion_matches_type): Likewise.
1433 * symtab.h (default_collect_symbol_completion_matches): Delete
1434 declaration.
1435
1436 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1437
1438 * ada-lang.c (ada_get_gdb_completer_word_break_characters): Delete.
1439 (ada_language_data): Delete la_word_break_characters initializer.
1440 (ada_language::word_break_characters): New member function.
1441 * c-lang.c (c_language_data): Delete la_word_break_characters
1442 initializer.
1443 (cplus_language_data): Likewise.
1444 (asm_language_data): Likewise.
1445 (minimal_language_data): Likewise.
1446 * completer.c: Update global comment.
1447 (advance_to_expression_complete_word_point): Update call to
1448 word_break_characters.
1449 (complete_files_symbols): Likewise.
1450 (complete_line_internal_1): Likewise.
1451 (default_completer_handle_brkchars): Likewise.
1452 (skip_quoted_chars): Likewise.
1453 * d-lang.c (d_language_data): Delete la_word_break_characters
1454 initializer.
1455 * f-lang.c (f_word_break_characters): Delete.
1456 (f_language_data): Delete la_word_break_characters initializer.
1457 (f_language::word_break_characters): New member function.
1458 * go-lang.c (go_language_data): Delete la_word_break_characters
1459 initializer.
1460 * language.c (unknown_language_data): Likewise.
1461 (auto_language_data): Likewise.
1462 * language.h (default_word_break_characters): Move declaration to
1463 earlier in the file.
1464 (language_data): Delete la_word_break_characters field.
1465 (language_defn::word_break_characters): New member function.
1466 * m2-lang.c (m2_language_data): Delete la_word_break_characters
1467 initializer.
1468 * objc-lang.c (objc_language_data): Likewise.
1469 * opencl-lang.c (opencl_language_data): Likewise.
1470 * p-lang.c (pascal_language_data): Likewise.
1471 * rust-lang.c (rust_language_data): Likewise.
1472
1473 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1474
1475 * ada-lang.c (ada_get_symbol_name_matcher): Update header comment.
1476 (ada_language_data): Delete la_get_symbol_name_matcher
1477 initializer.
1478 (language_defn::get_symbol_name_matcher_inner): New member
1479 function.
1480 * c-lang.c (c_language_data): Delete la_get_symbol_name_matcher
1481 initializer.
1482 (cplus_language_data): Likewise.
1483 (cplus_language::get_symbol_name_matcher_inner): New member
1484 function.
1485 (asm_language_data): Delete la_get_symbol_name_matcher initializer.
1486 (minimal_language_data): Likewise.
1487 * cp-support.h (cp_get_symbol_name_matcher): Update header comment.
1488 * d-lang.c (d_language_data): Delete la_get_symbol_name_matcher
1489 initializer.
1490 * dictionary.c (iter_match_first_hashed): Update call to
1491 get_symbol_name_matcher.
1492 (iter_match_next_hashed): Likewise.
1493 (iter_match_next_linear): Likewise.
1494 * dwarf2/read.c (dw2_expand_symtabs_matching_symbol): Likewise.
1495 * f-lang.c (f_language_data): Delete la_get_symbol_name_matcher
1496 initializer.
1497 (f_language::get_symbol_name_matcher_inner): New member function.
1498 * go-lang.c (go_language_data): Delete la_get_symbol_name_matcher
1499 initializer.
1500 * language.c (default_symbol_name_matcher): Update header comment,
1501 make static.
1502 (language_defn::get_symbol_name_matcher): New definition.
1503 (language_defn::get_symbol_name_matcher_inner): Likewise.
1504 (get_symbol_name_matcher): Delete.
1505 (unknown_language_data): Delete la_get_symbol_name_matcher
1506 initializer.
1507 (auto_language_data): Likewise.
1508 * language.h (language_data): Delete la_get_symbol_name_matcher
1509 field.
1510 (language_defn::get_symbol_name_matcher): New member function.
1511 (language_defn::get_symbol_name_matcher_inner): Likewise.
1512 (default_symbol_name_matcher): Delete declaration.
1513 * linespec.c (find_methods): Update call to
1514 get_symbol_name_matcher.
1515 * m2-lang.c (m2_language_data): Delete la_get_symbol_name_matcher
1516 initializer.
1517 * minsyms.c (lookup_minimal_symbol): Update call to
1518 get_symbol_name_matcher.
1519 (iterate_over_minimal_symbols): Likewise.
1520 * objc-lang.c (objc_language_data): Delete
1521 la_get_symbol_name_matcher initializer.
1522 * opencl-lang.c (opencl_language_data): Likewise.
1523 * p-lang.c (pascal_language_data): Likewise.
1524 * psymtab.c (psymbol_name_matches): Update call to
1525 get_symbol_name_matcher.
1526 * rust-lang.c (rust_language_data): Delete
1527 la_get_symbol_name_matcher initializer.
1528 * symtab.c (symbol_matches_search_name): Update call to
1529 get_symbol_name_matcher.
1530 (compare_symbol_name): Likewise.
1531
1532 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1533
1534 * ada-lang.c (ada_language_data): Delete la_compute_program
1535 initializer.
1536 * c-lang.c (c_language_data): Likewise.
1537 (c_language::compute_program): New member function.
1538 (cplus_language_data): Delete la_compute_program initializer.
1539 (cplus_language::compute_program): New member function.
1540 (asm_language_data): Delete la_compute_program initializer.
1541 (minimal_language_data): Likewise.
1542 * c-lang.h (c_compute_program): Update comment.
1543 (cplus_compute_program): Likewise.
1544 * compile/compile-c-support.c (c_compute_program): Likewise.
1545 (cplus_compute_program): Likewise.
1546 * compile/compile.c (compile_to_object): Update call to
1547 la_compute_program.
1548 * d-lang.c (d_language_data): Delete la_compute_program
1549 initializer.
1550 * f-lang.c (f_language_data): Likewise.
1551 * go-lang.c (go_language_data): Likewise.
1552 * language.c (unknown_language_data): Likewise.
1553 (auto_language_data): Likewise.
1554 * language.h (language_data): Delete la_compute_program field.
1555 (language_defn::compute_program): New member function.
1556 * m2-lang.c (m2_language_data): Delete la_compute_program
1557 initializer.
1558 * objc-lang.c (objc_language_data): Likewise.
1559 * opencl-lang.c (opencl_language_data): Likewise.
1560 * p-lang.c (pascal_language_data): Likewise.
1561 * rust-lang.c (rust_language_data): Likewise.
1562
1563 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1564
1565 * ada-lang.c (ada_language_data) Delete
1566 la_class_name_from_physname initializer.
1567 * c-lang.c (c_language_data): Likewise.
1568 (cplus_language_data): Likewise.
1569 (cplus_language::class_name_from_physname): New member function.
1570 (asm_language_data): Delete la_class_name_from_physname
1571 initializer.
1572 (minimal_language_data): Likewise.
1573 * d-lang.c (d_language_data): Likewise.
1574 * dwarf2/read.c (guess_partial_die_structure_name): Update to call
1575 method on language_defn class.
1576 (guess_full_die_structure_name): Likewise.
1577 * f-lang.c (f_language_data): Delete la_class_name_from_physname
1578 initializer.
1579 * go-lang.c (go_language_data): Likewise.
1580 * language.c (language_class_name_from_physname): Delete.
1581 (unk_lang_class_name): Delete.
1582 (unknown_language_data): Delete la_class_name_from_physname
1583 initializer.
1584 (auto_language_data): Likewise.
1585 * language.h (language_data): Delete la_class_name_from_physname
1586 field.
1587 (language_defn::class_name_from_physname): New function.
1588 (language_class_name_from_physname): Delete declaration.
1589 * m2-lang.c (m2_language_data): Delete la_class_name_from_physname
1590 initializer.
1591 * objc-lang.c (objc_language_data): Likewise.
1592 * opencl-lang.c (opencl_language_data): Likewise.
1593 * p-lang.c (pascal_language_data): Likewise.
1594 * rust-lang.c (rust_language_data): Likewise.
1595
1596 2020-06-16 Tom Tromey <tom@tromey.com>
1597
1598 * tui/tui-data.h (STATUS_NAME): New macro.
1599 * tui/tui-layout.c (tui_remove_some_windows)
1600 (initialize_known_windows, tui_register_window)
1601 (tui_layout_split::remove_windows, initialize_layouts)
1602 (tui_new_layout_command): Don't use hard-coded window names.
1603
1604 2020-06-16 Tom Tromey <tom@tromey.com>
1605
1606 PR tui/25348:
1607 * tui/tui.c (tui_ensure_readline_initialized): Rename from
1608 tui_initialize_readline. Only run once. Call rl_initialize.
1609 * tui/tui.h (tui_ensure_readline_initialized): Rename from
1610 tui_initialize_readline.
1611 * tui/tui-io.c (tui_setup_io): Call
1612 tui_ensure_readline_initialized.
1613 * tui/tui-interp.c (tui_interp::init): Update.
1614
1615 2020-06-16 Tom Tromey <tom@tromey.com>
1616
1617 * tui/tui-layout.c (tui_layout_split::remove_windows): Fix logic.
1618 Also preserve the status window.
1619
1620 2020-06-16 Tom Tromey <tom@tromey.com>
1621
1622 * python/py-tui.c (tui_py_window::~tui_py_window): Handle case
1623 where m_window==nullptr.
1624
1625 2020-06-15 Tom Tromey <tromey@adacore.com>
1626
1627 * windows-nat.c (windows_nat::handle_output_debug_string):
1628 Update.
1629 (windows_nat::handle_ms_vc_exception): Update.
1630 * target.h (target_read_string): Change API.
1631 * target.c (target_read_string): Change API.
1632 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
1633 Update.
1634 * solib-frv.c (frv_current_sos): Update.
1635 * solib-dsbt.c (dsbt_current_sos): Update.
1636 * solib-darwin.c (darwin_current_sos): Update.
1637 * linux-thread-db.c (inferior_has_bug): Update.
1638 * expprint.c (print_subexp_standard): Update.
1639 * ada-lang.c (ada_main_name, ada_tag_name_from_tsd)
1640 (ada_exception_message_1): Update.
1641
1642 2020-06-15 Tom Tromey <tromey@adacore.com>
1643
1644 * linux-tdep.c (dump_mapping_p): Use target_read_memory.
1645
1646 2020-06-15 Tom Tromey <tromey@adacore.com>
1647
1648 * valprint.c (read_string): Update comment.
1649 * target.c (MIN): Remove.
1650 (target_read_string): Rewrite.
1651
1652 2020-06-15 Tom Tromey <tromey@adacore.com>
1653
1654 * corefile.c (read_memory_string): Remove.
1655 * ada-valprint.c (ada_value_print_ptr): Update.
1656 * ada-lang.h (ada_tag_name): Change return type.
1657 * ada-lang.c (type_from_tag): Update.
1658 (ada_tag_name_from_tsd): Change return type. Use
1659 target_read_string.
1660 (ada_tag_name): Likewise.
1661 * gdbcore.h (read_memory_string): Don't declare.
1662
1663 2020-06-14 Hannes Domani <ssbssa@yahoo.de>
1664
1665 * symtab.c (rbreak_command): Ignore Windows drive colon.
1666
1667 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
1668
1669 * NEWS: Mention removed GDBserver host support.
1670
1671 2020-06-12 Nelson Chu <nelson.chu@sifive.com>
1672
1673 * features/riscv/rebuild-csr-xml.sh: Updated.
1674
1675 2020-06-11 Tom Tromey <tom@tromey.com>
1676
1677 PR gdb/18318:
1678 * c-exp.y (lex_one_token): Handle 'p' like 'e'.
1679
1680 2020-06-09 Jonny Grant <jg@jguk.org>
1681 2020-06-09 Simon Marchi <simon.marchi@polymtl.ca>
1682
1683 * main.c (captured_main_1): Don't print new line after help.
1684 (print_gdb_help): add mailing list and IRC channel information
1685 to --help. Add new lines between items in the footer. Remove
1686 quotes around bug url.
1687
1688 2020-06-11 Keith Seitz <keiths@redhat.com>
1689
1690 PR gdb/21356
1691 * gdbtypes.c (resolve_dynamic_union, resolve_dynamic_struct):
1692 Resolve typedefs for type length calculations.
1693
1694 2020-06-10 Tom de Vries <tdevries@suse.de>
1695
1696 PR ada/24713
1697 * dwarf2/index-write.c (struct mapped_symtab): Add m_string_obstack.
1698 (write_psymbols): Enable .gdb_index for ada.
1699 * dwarf2/read.c: Remove comment stating .gdb_index is unsupported for
1700 ada.
1701
1702 2020-06-10 Tom de Vries <tdevries@suse.de>
1703
1704 * dwarf2/read.c (dw2_symtab_iter_init_common): Factor out of ...
1705 (dw2_symtab_iter_init): ... here. Add variant with "offset_type
1706 namei" instead of "const char *name" argument.
1707 (dw2_map_matching_symbols): Use "offset_type namei" variant of
1708 dw2_symtab_iter_init.
1709
1710 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
1711
1712 * gdbtypes.h (TYPE_FIELD_TYPE): Remove. Change all call sites
1713 to use type::field and field::type instead.
1714
1715 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
1716
1717 * gdbtypes.h (FIELD_TYPE): Remove. Change all call sites
1718 to use field::type instead.
1719
1720 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
1721
1722 * gdbtypes.h (struct field) <type, set_type>: New methods.
1723 Rename `type` field to...
1724 <m_type>: ... this. Change references throughout to use type or
1725 set_type methods.
1726 (FIELD_TYPE): Use field::type. Change call sites that modify
1727 the field's type to use field::set_type instead.
1728
1729 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
1730
1731 * gdbtypes.h (TYPE_INDEX_TYPE): Remove. Change all call sites
1732 to use type::index_type instead.
1733
1734 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
1735
1736 * gdbtypes.h (struct type) <index_type, set_index_type>: New
1737 methods.
1738 (TYPE_INDEX_TYPE): Use type::index_type.
1739 * gdbtypes.c (create_array_type_with_stride): Likewise.
1740
1741 2020-06-07 Tom Tromey <tom@tromey.com>
1742
1743 * valprint.c (generic_val_print_float): Remove "embedded_offset"
1744 parameter.
1745 (generic_value_print): Update.
1746
1747 2020-06-05 Andrew Burgess <andrew.burgess@embecosm.com>
1748
1749 Revert commit 982a38f60b0.
1750 * python/py-tui.c (gdbpy_tui_set_title): Restore use of get.
1751
1752 2020-06-05 Andrew Burgess <andrew.burgess@embecosm.com>
1753
1754 * python/py-tui.c (gdbpy_tui_set_title): Use release, not get, to
1755 avoid use after free.
1756
1757 2020-06-05 Tom de Vries <tdevries@suse.de>
1758
1759 * NEWS: Fix typos.
1760
1761 2020-06-04 Simon Marchi <simon.marchi@efficios.com>
1762
1763 * dwarf2/read.c (dwarf2_read_gdb_index): Save partial_symtabs in
1764 the per_bfd object.
1765 (dwarf2_read_debug_names): Likewise.
1766 (dwarf2_initialize_objfile): Use partial_symtabs from per_bfd
1767 object when re-using a per_bfd object with an index.
1768
1769 2020-06-03 Tom de Vries <tdevries@suse.de>
1770
1771 PR symtab/26046
1772 * dwarf2/read.c (scan_partial_symbols): Recurse into DW_TAG_subprogram
1773 children for C++.
1774 (load_partial_dies): Don't skip DW_TAG_inlined_subroutine child of
1775 DW_TAG_subprogram.
1776
1777 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
1778
1779 * ada-lang.c (ada_language_data): Delete skip_trampoline
1780 initializer.
1781 * c-lang.c (c_language_data): Likewise.
1782 (cplus_language_data): Likewise.
1783 (cplus_language::skip_trampoline): New member function.
1784 (asm_language_data): Delete skip_trampoline initializer.
1785 (minimal_language_data): Likewise.
1786 * d-lang.c (d_language_data): Likewise.
1787 * f-lang.c (f_language_data): Likewise.
1788 * go-lang.c (go_language_data): Likewise.
1789 * language.c (unk_lang_trampoline): Delete function.
1790 (skip_language_trampoline): Update.
1791 (unknown_language_data): Delete skip_trampoline initializer.
1792 (auto_language_data): Likewise.
1793 * language.h (language_data): Delete skip_trampoline field.
1794 (language_defn::skip_trampoline): New function.
1795 * m2-lang.c (m2_language_data): Delete skip_trampoline
1796 initializer.
1797 * objc-lang.c (objc_skip_trampoline): Delete function, move
1798 implementation to objc_language::skip_trampoline.
1799 (objc_language_data): Delete skip_trampoline initializer.
1800 (objc_language::skip_trampoline): New member function with
1801 implementation from objc_skip_trampoline.
1802 * opencl-lang.c (opencl_language_data): Delete skip_trampoline
1803 initializer.
1804 * p-lang.c (pascal_language_data): Likewise.
1805 * rust-lang.c (rust_language_data): Likewise.
1806
1807 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
1808
1809 * ada-lang.c (ada_language_data): Delete la_demangle initializer.
1810 (ada_language::demangle): New member function.
1811 * c-lang.c (c_language_data): Delete la_demangle initializer.
1812 (cplus_language_data): Delete la_demangle initializer.
1813 (cplus_language::demangle): New member function.
1814 (asm_language_data): Delete la_demangle initializer.
1815 (minimal_language_data): Delete la_demangle initializer.
1816 * d-lang.c (d_language_data): Delete la_demangle initializer.
1817 (d_language::demangle): New member function.
1818 * f-lang.c (f_language_data): Delete la_demangle initializer.
1819 (f_language::demangle): New member function.
1820 * go-lang.c (go_language_data): Delete la_demangle initializer.
1821 (go_language::demangle): New member function.
1822 * language.c (language_demangle): Update.
1823 (unk_lang_demangle): Delete.
1824 (unknown_language_data): Delete la_demangle initializer.
1825 (unknown_language::demangle): New member function.
1826 (auto_language_data): Delete la_demangle initializer.
1827 (auto_language::demangle): New member function.
1828 * language.h (language_data): Delete la_demangle field.
1829 (language_defn::demangle): New function.
1830 * m2-lang.c (m2_language_data): Delete la_demangle initializer.
1831 * objc-lang.c (objc_language_data): Delete la_demangle
1832 initializer.
1833 (objc_language::demangle): New member function.
1834 * opencl-lang.c (opencl_language_data): Delete la_demangle
1835 initializer.
1836 * p-lang.c (pascal_language_data): Likewise.
1837 * rust-lang.c (rust_language_data): Likewise.
1838 (rust_language::demangle): New member function.
1839
1840 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
1841
1842 * ada-lang.c (ada_language_data): Delete la_print_type
1843 initializer.
1844 (ada_language::print_type): New member function.
1845 * c-lang.c (c_language_data): Delete la_print_type initializer.
1846 (c_language::print_type): New member function.
1847 (cplus_language_data): Delete la_print_type initializer.
1848 (cplus_language::print_type): New member function.
1849 (asm_language_data): Delete la_print_type initializer.
1850 (asm_language::print_type): New member function.
1851 (minimal_language_data): Delete la_print_type initializer.
1852 (minimal_language::print_type): New member function.
1853 * d-lang.c (d_language_data): Delete la_print_type initializer.
1854 (d_language::print_type): New member function.
1855 * f-lang.c (f_language_data): Delete la_print_type initializer.
1856 (f_language::print_type): New member function.
1857 * go-lang.c (go_language_data): Delete la_print_type initializer.
1858 (go_language::print_type): New member function.
1859 * language.c (unk_lang_print_type): Delete.
1860 (unknown_language_data): Delete la_print_type initializer.
1861 (unknown_language::print_type): New member function.
1862 (auto_language_data): Delete la_print_type initializer.
1863 (auto_language::print_type): New member function.
1864 * language.h (language_data): Delete la_print_type field.
1865 (language_defn::print_type): New function.
1866 (LA_PRINT_TYPE): Update.
1867 * m2-lang.c (m2_language_data): Delete la_print_type initializer.
1868 (m2_language::print_type): New member function.
1869 * objc-lang.c (objc_language_data): Delete la_print_type
1870 initializer.
1871 (objc_language::print_type): New member function.
1872 * opencl-lang.c (opencl_print_type): Delete, implementation moved
1873 to opencl_language::print_type.
1874 (opencl_language_data): Delete la_print_type initializer.
1875 (opencl_language::print_type): New member function, implementation
1876 from opencl_print_type.
1877 * p-lang.c (pascal_language_data): Delete la_print_type
1878 initializer.
1879 (pascal_language::print_type): New member function.
1880 * rust-lang.c (rust_print_type): Delete, implementation moved to
1881 rust_language::print_type.
1882 (rust_language_data): Delete la_print_type initializer.
1883 (rust_language::print_type): New member function, implementation
1884 from rust_print_type.
1885
1886 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
1887
1888 * ada-lang.c (ada_sniff_from_mangled_name): Delete function,
1889 implementation moves to...
1890 (ada_language::sniff_from_mangled_name): ...here. Update return
1891 type.
1892 (ada_language_data): Delete la_sniff_from_mangled_name
1893 initializer.
1894 * c-lang.c (c_language_data): Likewise.
1895 (cplus_language_data): Likewise.
1896 (cplus_language::sniff_from_mangled_name): New member function,
1897 implementation taken from gdb_sniff_from_mangled_name.
1898 (asm_language_data): Delete la_sniff_from_mangled_name
1899 initializer.
1900 (minimal_language_data): Likewise.
1901 * cp-support.c (gdb_sniff_from_mangled_name): Delete,
1902 implementation moves to cplus_language::sniff_from_mangled_name.
1903 * cp-support.h (gdb_sniff_from_mangled_name): Delete declaration.
1904 * d-lang.c (d_sniff_from_mangled_name): Delete, implementation
1905 moves to...
1906 (d_language::sniff_from_mangled_name): ...here.
1907 (d_language_data): Delete la_sniff_from_mangled_name initializer.
1908 * f-lang.c (f_language_data): Likewise.
1909 * go-lang.c (go_sniff_from_mangled_name): Delete, implementation
1910 moves to...
1911 (go_language::sniff_from_mangled_name): ...here.
1912 (go_language_data): Delete la_sniff_from_mangled_name initializer.
1913 * language.c (language_sniff_from_mangled_name): Delete.
1914 (unknown_language_data): Delete la_sniff_from_mangled_name
1915 initializer.
1916 (auto_language_data): Likewise.
1917 * language.h (language_data): Delete la_sniff_from_mangled_name
1918 field.
1919 (language_defn::sniff_from_mangled_name): New function.
1920 (language_sniff_from_mangled_name): Delete declaration.
1921 * m2-lang.c (m2_language_data): Delete la_sniff_from_mangled_name
1922 field.
1923 * objc-lang.c (objc_sniff_from_mangled_name): Delete,
1924 implementation moves to...
1925 (objc_language::sniff_from_mangled_name): ...here.
1926 (objc_language_data): Delete la_sniff_from_mangled_name initializer.
1927 * opencl-lang.c (opencl_language_data): Likewise.
1928 * p-lang.c (pascal_language_data): Likewise.
1929 * rust-lang.c (rust_sniff_from_mangled_name): Delete,
1930 implementation moves to...
1931 (rust_language::sniff_from_mangled_name): ...here.
1932 (rust_language_data): Delete la_sniff_from_mangled_name
1933 initializer.
1934 * symtab.c (symbol_find_demangled_name): Call
1935 sniff_from_mangled_name member function.
1936
1937 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
1938
1939 * ada-lang.c (ada_language_data): Delete la_search_name_hash
1940 initializer.
1941 * c-lang.c (c_language_data): Likewise.
1942 (cplus_language_data): Likewise.
1943 (cplus_language::search_name_hash): New member function.
1944 (asm_language_data): Delete la_search_name_hash initializer.
1945 (minimal_language_data): Likewise.
1946 * d-lang.c (d_language_data): Likewise.
1947 * dictionary.c (default_search_name_hash): Rename to...
1948 (language_defn::search_name_hash): ...this.
1949 * f-lang.c (f_language_data): Likewise.
1950 (f_language::search_name_hash): New member function.
1951 * go-lang.c (go_language_data): Delete la_search_name_hash
1952 initializer.
1953 * language.c (unknown_language_data): Likewise.
1954 (auto_language_data): Likewise.
1955 * language.h (struct language_data): Delete la_search_name_hash
1956 field.
1957 (language_defn::search_name_hash): Declare new member function.
1958 (default_search_name_hash): Delete declaration.
1959 * m2-lang.c (m2_language_data): Delete la_search_name_hash
1960 initializer.
1961 * objc-lang.c (objc_language_data): Likewise.
1962 * opencl-lang.c (opencl_language_data): Likewise.
1963 * p-lang.c (pascal_language_data): Likewise.
1964 * rust-lang.c (rust_language_data): Likewise.
1965 * symtab.c (search_name_hash): Update call.
1966
1967 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
1968
1969 * ada-lang.c (ada_language_data): Delete la_get_compile_instance
1970 initializer.
1971 * c-lang.c (class compile_instance): Declare.
1972 (c_language_data): Delete la_get_compile_instance initializer.
1973 (c_language::get_compile_instance): New member function.
1974 (cplus_language_data): Delete la_get_compile_instance initializer.
1975 (cplus_language::get_compile_instance): New member function.
1976 (asm_language_data): Delete la_get_compile_instance initializer.
1977 (minimal_language_data): Likewise.
1978 * c-lang.h (c_get_compile_context): Update comment.
1979 (cplus_get_compile_context): Update comment.
1980 * compile/compile.c (compile_to_object): Update calls, don't rely
1981 on function pointer being NULL.
1982 * d-lang.c (d_language_data): Delete la_get_compile_instance
1983 initializer.
1984 * f-lang.c (f_language_data): Likewise.
1985 * go-lang.c (go_language_data): Likewise.
1986 * language.c (unknown_language_data): Likewise.
1987 (auto_language_data): Likewise.
1988 * language.h (language_data): Delete la_get_compile_instance field.
1989 (language_defn::get_compile_instance): New member function.
1990 * m2-lang.c (m2_language_data): Delete la_get_compile_instance
1991 initializer.
1992 * objc-lang.c (objc_language_data): Likewise.
1993 * opencl-lang.c (opencl_language_data): Likewise.
1994 * p-lang.c (pascal_language_data): Likewise.
1995 * rust-lang.c (rust_language_data): Likewise.
1996
1997 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
1998
1999 * ada-lang.c (ada_add_all_symbols): Update comment.
2000 (ada_iterate_over_symbols): Delete, move implementation to...
2001 (ada_language::iterate_over_symbols): ...here, a new member
2002 function, rewrite to use range based for loop.
2003 (ada_language_data): Delete la_iterate_over_symbols initializer.
2004 * c-lang.c (c_language_data): Likewise.
2005 (cplus_language_data): Likewise.
2006 (asm_language_data): Likewise.
2007 (minimal_language_data): Likewise.
2008 * d-lang.c (d_language_data): Likewise.
2009 * f-lang.c (f_language_data): Likewise.
2010 * go-lang.c (go_language_data): Likewise.
2011 * language.c (unknown_language_data): Likewise.
2012 (auto_language_data): Likewise.
2013 * language.h (language_data): Delete la_iterate_over_symbols field.
2014 (language_defn::iterate_over_symbols): New member function.
2015 (LA_ITERATE_OVER_SYMBOLS): Update.
2016 * linespec.c (iterate_over_all_matching_symtabs): Update.
2017 * m2-lang.c (m2_language_data): Delete la_iterate_over_symbols
2018 initializer.
2019 * objc-lang.c (objc_language_data): Likewise.
2020 * opencl-lang.c (opencl_language_data): Likewise.
2021 * p-lang.c (pascal_language_data): Likewise.
2022 * rust-lang.c (rust_language_data): Likewise.
2023
2024 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2025
2026 * ada-lang.c (ada_language_data): Delete
2027 la_lookup_transparent_type initializer.
2028 * c-lang.c (c_language_data): Likewise.
2029 (cplus_language_data): Likewise.
2030 (cplus_language::lookup_transparent_type): New member function.
2031 (asm_language_data): Delete la_lookup_transparent_type
2032 initializer.
2033 (minimal_language_data): Likewise.
2034 * d-lang.c (d_language_data): Likewise.
2035 * f-lang.c (f_language_data): Likewise.
2036 * go-lang.c (go_language_data): Likewise.
2037 * language.c (unknown_language_data): Likewise.
2038 (auto_language_data): Likewise.
2039 * language.h (struct language_data): Delete
2040 la_lookup_transparent_type field.
2041 (language_defn::lookup_transparent_type): New member function.
2042 * m2-lang.c (m2_language_data): Delete la_lookup_transparent_type
2043 initializer.
2044 * objc-lang.c (objc_language_data): Likewise.
2045 * opencl-lang.c (opencl_language_data): Likewise.
2046 * p-lang.c (pascal_language_data): Likewise.
2047 * rust-lang.c (rust_language_data): Likewise.
2048 * symtab.c (symbol_matches_domain): Update call.
2049
2050 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2051
2052 * ada-lang.c (ada_language_arch_info): Delete function, move
2053 implementation to...
2054 (ada_language::language_arch_info): ...here, a new member
2055 function.
2056 (ada_language_data): Delete la_language_arch_info.
2057 * c-lang.c (c_language_data): Likewise.
2058 (c_language::language_arch_info): New member function.
2059 (cplus_language_arch_info): Delete function, move
2060 implementation to...
2061 (cplus_language::language_arch_info): ...here, a new member
2062 function.
2063 (cplus_language_data): Delete la_language_arch_info.
2064 (asm_language_data): Likewise.
2065 (asm_language::language_arch_info): New member function.
2066 (minimal_language_data): Delete la_language_arch_info.
2067 (minimal_language::language_arch_info): New member function.
2068 * d-lang.c (d_language_arch_info): Delete function, move
2069 implementation to...
2070 (d_language::language_arch_info): ...here, a new member
2071 function.
2072 (d_language_data): Delete la_language_arch_info.
2073 * f-lang.c (f_language_arch_info): Delete function, move
2074 implementation to...
2075 (f_language::language_arch_info): ...here, a new member
2076 function.
2077 (f_language_data): Delete la_language_arch_info.
2078 * go-lang.c (go_language_arch_info): Delete function, move
2079 implementation to...
2080 (go_language::language_arch_info): ...here, a new member
2081 function.
2082 (go_language_data): Delete la_language_arch_info.
2083 * language.c (unknown_language_data): Likewise.
2084 (unknown_language::language_arch_info): New member function.
2085 (auto_language_data): Delete la_language_arch_info.
2086 (auto_language::language_arch_info): New member function.
2087 (language_gdbarch_post_init): Update call to
2088 la_language_arch_info.
2089 * language.h (language_data): Delete la_language_arch_info
2090 function pointer.
2091 (language_defn::language_arch_info): New function.
2092 * m2-lang.c (m2_language_arch_info): Delete function, move
2093 implementation to...
2094 (m2_language::language_arch_info): ...here, a new member
2095 function.
2096 (m2_language_data): Delete la_language_arch_info.
2097 * objc-lang.c (objc_language_arch_info): Delete function, move
2098 implementation to...
2099 (objc_language::language_arch_info): ...here, a new member
2100 function.
2101 (objc_language_data): Delete la_language_arch_info.
2102 * opencl-lang.c (opencl_language_arch_info): Delete function, move
2103 implementation to...
2104 (opencl_language::language_arch_info): ...here, a new member
2105 function.
2106 (opencl_language_data): Delete la_language_arch_info.
2107 * p-lang.c (pascal_language_arch_info): Delete function, move
2108 implementation to...
2109 (pascal_language::language_arch_info): ...here, a new member
2110 function.
2111 (pascal_language_data): Delete la_language_arch_info.
2112 * rust-lang.c (rust_language_arch_info): Delete function, move
2113 implementation to...
2114 (rust_language::language_arch_info): ...here, a new member
2115 function.
2116 (rust_language_data): Delete la_language_arch_info.
2117
2118 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2119
2120 * ada-lang.c (ada_language_data): Delete la_pass_by_reference
2121 initializer.
2122 * c-lang.c (c_language_data): Likewise.
2123 (cplus_language_data): Likewise.
2124 (cplus_language::pass_by_reference_info): New method.
2125 (asm_language_data): Delete la_pass_by_reference initializer.
2126 (minimal_language_data): Likewise.
2127 * cp-abi.c (cp_pass_by_reference): Remove use of
2128 default_pass_by_reference.
2129 * d-lang.c (d_language_data): Likewise.
2130 * f-lang.c (f_language_data): Likewise.
2131 * gnu-v3-abi.c (gnuv3_pass_by_reference): Remove use of
2132 default_pass_by_reference.
2133 * go-lang.c (go_language_data): Likewise.
2134 * language.c (language_pass_by_reference): Update.
2135 (default_pass_by_reference): Delete.
2136 (unknown_language_data): Delete la_pass_by_reference
2137 initializer.
2138 (auto_language_data): Likewise.
2139 * language.h (struct language_data): Delete la_pass_by_reference
2140 field.
2141 (language_defn::pass_by_reference_info): New member function.
2142 (default_pass_by_reference): Delete declaration.
2143 * m2-lang.c (m2_language_data): Delete la_pass_by_reference
2144 initializer.
2145 * objc-lang.c (objc_language_data): Likewise.
2146 * opencl-lang.c (opencl_language_data): Likewise.
2147 * p-lang.c (pascal_language_data): Likewise.
2148 * rust-lang.c (rust_language_data): Likewise.
2149
2150 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2151
2152 * ada-lang.c (ada_read_var_value): Delete function, move
2153 implementation to...
2154 (ada_language::read_var_value): ...here.
2155 (ada_language_data): Delete la_read_var_value initializer.
2156 * c-lang.c (c_language_data): Likewise.
2157 (cplus_language_data): Likewise.
2158 (minimal_language_data): Likewise.
2159 * d-lang.c (d_language_data): Likewise.
2160 * f-lang.c (f_language_data): Likewise.
2161 * findvar.c (default_read_var_value): Rename to...
2162 (language_defn::read_var_value): ...this.
2163 * findvar.c (read_var_value): Update header comment, and change to
2164 call member function instead of function pointer.
2165 * go-lang.c (go_language_data): Likewise.
2166 * language.c (unknown_language_data): Delete la_read_var_value
2167 initializer.
2168 (auto_language_data): Likewise.
2169 * language.h (struct language_data): Delete la_read_var_value
2170 field.
2171 (language_defn::read_var_value): New member function.
2172 (default_read_var_value): Delete declaration.
2173 * m2-lang.c (m2_language_data): Delete la_read_var_value
2174 initializer.
2175 * objc-lang.c (objc_language_data): Likewise.
2176 * opencl-lang.c (opencl_language_data): Likewise.
2177 * p-lang.c (pascal_language_data): Likewise.
2178 * rust-lang.c (rust_language_data): Likewise.
2179 * value.h (default_read_var_value): Delete declaration.
2180
2181 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2182
2183 * ada-lang.c (ada_print_array_index): Delete function, move
2184 implementation to...
2185 (ada_language::print_array_index): ...here.
2186 (ada_language_data): Delete la_print_array_index initializer.
2187 * c-lang.c (c_language_data): Likewise.
2188 (cplus_language_data): Likewise.
2189 (minimal_language_data): Likewise.
2190 * d-lang.c (d_language_data): Likewise.
2191 * f-lang.c (f_language_data): Likewise.
2192 * go-lang.c (go_language_data): Likewise.
2193 * language.c (default_print_array_index): Delete function, move
2194 implementation to...
2195 (language_defn::print_array_index): ...here.
2196 (unknown_language_data): Delete la_print_array_index initializer.
2197 (auto_language_data): Likewise.
2198 * language.h (struct language_data): Delete la_print_array_index
2199 field.
2200 (language_defn::print_array_index): New member function.
2201 (LA_PRINT_ARRAY_INDEX): Update.
2202 (default_print_array_index): Delete declaration.
2203 * m2-lang.c (m2_language_data): Delete la_print_array_index
2204 initializer.
2205 * objc-lang.c (objc_language_data): Likewise.
2206 * opencl-lang.c (opencl_language_data): Likewise.
2207 * p-lang.c (pascal_language_data): Likewise.
2208 * rust-lang.c (rust_language_data): Likewise.
2209
2210 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2211
2212 * gdb/ada-lang.c (ada_language_defn): Convert to...
2213 (ada_language_data): ...this.
2214 (class ada_language): New class.
2215 (ada_language_defn): New static global.
2216 * gdb/c-lang.c (c_language_defn): Convert to...
2217 (c_language_data): ...this.
2218 (class c_language): New class.
2219 (c_language_defn): New static global.
2220 (cplus_language_defn): Convert to...
2221 (cplus_language_data): ...this.
2222 (class cplus_language): New class.
2223 (cplus_language_defn): New static global.
2224 (asm_language_defn): Convert to...
2225 (asm_language_data): ...this.
2226 (class asm_language): New class.
2227 (asm_language_defn): New static global.
2228 (minimal_language_defn): Convert to...
2229 (minimal_language_data): ...this.
2230 (class minimal_language): New class.
2231 (minimal_language_defn): New static global.
2232 * gdb/d-lang.c (d_language_defn): Convert to...
2233 (d_language_data): ...this.
2234 (class d_language): New class.
2235 (d_language_defn): New static global.
2236 * gdb/f-lang.c (f_language_defn): Convert to...
2237 (f_language_data): ...this.
2238 (class f_language): New class.
2239 (f_language_defn): New static global.
2240 * gdb/go-lang.c (go_language_defn): Convert to...
2241 (go_language_data): ...this.
2242 (class go_language): New class.
2243 (go_language_defn): New static global.
2244 * gdb/language.c (unknown_language_defn): Remove declaration.
2245 (current_language): Initialize to nullptr, real initialization is
2246 moved to _initialize_language.
2247 (languages): Delete global.
2248 (language_defn::languages): Define.
2249 (set_language_command): Use language_defn::languages.
2250 (set_language): Likewise.
2251 (range_error): Likewise.
2252 (language_enum): Likewise.
2253 (language_def): Likewise.
2254 (add_set_language_command): Use language_def::languages for the
2255 language list, and language_def to lookup language pointers.
2256 (skip_language_trampoline): Use language_defn::languages.
2257 (unknown_language_defn): Convert to...
2258 (unknown_language_data): ...this.
2259 (class unknown_language): New class.
2260 (unknown_language_defn): New static global.
2261 (auto_language_defn): Convert to...
2262 (auto_language_data): ...this.
2263 (class auto_language): New class.
2264 (auto_language_defn): New static global.
2265 (language_gdbarch_post_init): Use language_defn::languages.
2266 (_initialize_language): Initialize current_language.
2267 * gdb/language.h (struct language_defn): Rename to...
2268 (struct language_data): ...this.
2269 (struct language_defn): New.
2270 (auto_language_defn): Delete.
2271 (unknown_language_defn): Delete.
2272 (minimal_language_defn): Delete.
2273 (ada_language_defn): Delete.
2274 (asm_language_defn): Delete.
2275 (c_language_defn): Delete.
2276 (cplus_language_defn): Delete.
2277 (d_language_defn): Delete.
2278 (f_language_defn): Delete.
2279 (go_language_defn): Delete.
2280 (m2_language_defn): Delete.
2281 (objc_language_defn): Delete.
2282 (opencl_language_defn): Delete.
2283 (pascal_language_defn): Delete.
2284 (rust_language_defn): Delete.
2285 * gdb/m2-lang.c (m2_language_defn): Convert to...
2286 (m2_language_data): ...this.
2287 (class m2_language): New class.
2288 (m2_language_defn): New static global.
2289 * gdb/objc-lang.c (objc_language_defn): Convert to...
2290 (objc_language_data): ...this.
2291 (class objc_language): New class.
2292 (objc_language_defn): New static global.
2293 * gdb/opencl-lang.c (opencl_language_defn): Convert to...
2294 (opencl_language_data): ...this.
2295 (class opencl_language): New class.
2296 (opencl_language_defn): New static global.
2297 * gdb/p-lang.c (pascal_language_defn): Convert to...
2298 (pascal_language_data): ...this.
2299 (class pascal_language): New class.
2300 (pascal_language_defn): New static global.
2301 * gdb/rust-exp.y (rust_lex_tests): Use language_def to find
2302 language pointer, update comment format.
2303 * gdb/rust-lang.c (rust_language_defn): Convert to...
2304 (rust_language_data): ...this.
2305 (class rust_language): New class.
2306 (rust_language_defn): New static global.
2307
2308 2020-06-01 Andrew Burgess <andrew.burgess@embecosm.com>
2309
2310 * dwarf2/read.c (class lnp_state_machine) <m_last_address>: New
2311 member variable.
2312 <m_stmt_at_address>: New member variable.
2313 (lnp_state_machine::record_line): Don't record some lines, update
2314 tracking of is_stmt at the same address.
2315 (lnp_state_machine::lnp_state_machine): Initialise new member
2316 variables.
2317
2318 2020-06-01 Samuel Thibault <samuel.thibault@ens-lyon.org>
2319
2320 * config/i386/i386gnu.mn [%_S.o %_U.o] (COMPILE.post): Add
2321 "-include gnu-nat-mig.h".
2322 * gnu-nat-mig.h: New file.
2323 * gnu-nat.c: Include "gnu-nat-mig.h".
2324 (exc_server, msg_reply_server, notify_server,
2325 process_reply_server): Remove declarations.
2326
2327 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2328
2329 * gnu-nat.h (inf_validate_procs, inf_suspend, inf_set_traced,
2330 steal_exc_port, proc_get_state, inf_clear_wait, inf_cleanup,
2331 inf_startup, inf_update_suspends, inf_set_pid, inf_steal_exc_ports,
2332 inf_validate_procinfo, inf_validate_task_sc, inf_restore_exc_ports,
2333 inf_set_threads_resume_sc, inf_set_threads_resume_sc_for_signal_thread,
2334 inf_resume, inf_set_step_thread, inf_detach, inf_attach, inf_signal,
2335 inf_continue, make_proc, proc_abort, _proc_free, proc_update_sc,
2336 proc_get_exception_port, proc_set_exception_port, _proc_get_exc_port,
2337 proc_steal_exc_port, proc_restore_exc_port, proc_trace): Move functions
2338 to gnu_nat_target class.
2339 * gnu-nat.c: Likewise.
2340 (inf_update_procs, S_proc_wait_reply, set_task_pause_cmd,
2341 set_task_exc_port_cmd, set_signals_cmd, set_thread_pause_cmd,
2342 set_thread_exc_port_cmd): Call inf_validate_procs through gnu_target
2343 object.
2344 (gnu_nat_target::create_inferior, gnu_nat_target::detach): Pass `this'
2345 instead of `gnu_target'.
2346
2347 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2348
2349 * i386-gnu-tdep.c: Include "gdbcore.h"
2350 (gnu_sigtramp_code, i386_gnu_sc_reg_offset): New arrays.
2351 (GNU_SIGTRAMP_LEN, GNU_SIGTRAMP_TAIL,
2352 I386_GNU_SIGCONTEXT_THREAD_STATE_OFFSET): New macros
2353 (i386_gnu_sigtramp_start, i386_gnu_sigtramp_p,
2354 i386_gnu_sigcontext_addr): New functions
2355 (i386gnu_init_abi): Register i386_gnu_sigtramp_p,
2356 i386_gnu_sigcontext_addr, and i386_gnu_sc_reg_offset in the gdbarch
2357 tdep.
2358
2359 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2360
2361 * gnu-nat.c (gnu_nat_target::create_inferior): Move push_target call
2362 before fork_inferior call. Avoid calling it if target_is_pushed returns
2363 true.
2364
2365 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2366
2367 * gnu-nat.h (gnu_target): New variable declaration.
2368 * i386-gnu-nat.c (_initialize_i386gnu_nat): Initialize
2369 gnu_target.
2370 * gnu-nat.c (gnu_target): New variable.
2371 (inf_validate_procs): Pass gnu_target to thread_change_ptid,
2372 add_thread_silent, and add_thread calls.
2373 (gnu_nat_target::create_inferior): Pass gnu_target to
2374 add_thread_silent, thread_change_ptid call.
2375 (gnu_nat_target::detach): Pass gnu_target to detach_inferior
2376 call.
2377
2378 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2379
2380 * gnu-nat.c (gnu_xfer_auxv): Remove unused `res' variable.
2381 (gnu_nat_target::find_memory_regions): Remove unused
2382 `old_address' variable.
2383
2384 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2385
2386 * gnu-nat.c: Include "gdbarch.h".
2387
2388 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2389
2390 * reply_mig_hack.awk (Error return): Cast function through
2391 void *, to bypass compiler function call check.
2392
2393 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2394
2395 * config/i386/i386gnu.mn (%_reply_S.c): Add dependency on
2396 $(srcdir)/reply_mig_hack.awk.
2397
2398 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2399
2400 * gnu-nat.h (gnu_debug_flag): Set type to bool.
2401
2402 2020-05-30 Jonny Grant <jg@jguk.org>
2403
2404 * configure.ac (ACX_BUGURL): change bug URL to https.
2405
2406 2020-05-30 Pedro Alves <palves@redhat.com>
2407
2408 * cp-support.c (replace_typedefs_template): New.
2409 (replace_typedefs_qualified_name): Handle
2410 DEMANGLE_COMPONENT_TEMPLATE.
2411
2412 2020-05-29 Simon Marchi <simon.marchi@efficios.com>
2413
2414 * dwarf2/comp-unit.c, dwarf2/comp-unit.h, dwarf2/index-cache.c,
2415 dwarf2/index-cache.h, dwarf2/index-write.c,
2416 dwarf2/index-write.h, dwarf2/line-header.c,
2417 dwarf2/line-header.h, dwarf2/macro.c, dwarf2/macro.h,
2418 dwarf2/read.c, dwarf2/read.h: Rename struct dwarf2_per_objfile
2419 variables and fields from `dwarf2_per_objfile` to just
2420 `per_objfile` throughout.
2421
2422 2020-05-28 Simon Marchi <simon.marchi@polymtl.ca>
2423
2424 * dwarf2/loc.c (class dwarf_evaluate_loc_desc)
2425 <push_dwarf_reg_entry_value>: Add comment.
2426
2427 2020-05-28 Kevin Buettner <kevinb@redhat.com>
2428 Keith Seitz <keiths@redhat.com>
2429
2430 * python/python.c (do_start_initialization): Call PyEval_SaveThread
2431 instead of PyEval_ReleaseLock.
2432 (class gdbpy_gil): Move to earlier in file.
2433 (finalize_python): Set gdb_python_initialized.
2434 (gdbpy_check_quit_flag): Acquire GIL via gdbpy_gil. Return early
2435 when not initialized.
2436
2437 2020-05-28 Simon Marchi <simon.marchi@efficios.com>
2438
2439 * dwarf2/loc.c (class dwarf_evaluate_loc_desc)
2440 <push_dwarf_reg_entry_value>: Remove assert. Override
2441 per_objfile with caller_per_objfile.
2442
2443 2020-05-28 Tom de Vries <tdevries@suse.de>
2444
2445 * dwarf2/read.c (dw2_symtab_iter_next, dw2_expand_marked_cus): Limit
2446 PR gold/15646 workaround to symbol kind "type".
2447
2448 2020-05-27 Tom Tromey <tromey@adacore.com>
2449
2450 * dwarf2/read.c (load_partial_dies): Use add_partial_symbol.
2451
2452 2020-05-27 Tom Tromey <tromey@adacore.com>
2453
2454 * dwarf2/abbrev.h (struct abbrev_table) <lookup_abbrev>: Inline.
2455 Use htab_find_with_hash.
2456 <add_abbrev>: Remove "abbrev_number" parameter.
2457 * dwarf2/abbrev.c (abbrev_table::add_abbrev): Remove
2458 "abbrev_number" parameter. Use htab_find_slot_with_hash.
2459 (hash_abbrev): Add comment.
2460 (abbrev_table::lookup_abbrev): Move to header file.
2461 (abbrev_table::read): Update.
2462
2463 2020-05-27 Tom Tromey <tromey@adacore.com>
2464
2465 * dwarf2/read.c (struct partial_die_info) <name>: Declare new
2466 method.
2467 <canonical_name>: New member.
2468 <raw_name>: Rename from "name".
2469 (partial_die_info): Initialize canonical_name.
2470 (scan_partial_symbols): Check raw_name.
2471 (partial_die_parent_scope, partial_die_full_name)
2472 (add_partial_symbol, add_partial_subprogram)
2473 (add_partial_enumeration, load_partial_dies): Use "name" method.
2474 (partial_die_info::name): New method.
2475 (partial_die_info::read, guess_partial_die_structure_name)
2476 (partial_die_info::fixup): Update.
2477
2478 2020-05-27 Tom Tromey <tromey@adacore.com>
2479
2480 * dwarf2/attribute.h (struct attribute) <form_is_ref>: Inline.
2481 <get_ref_die_offset>: Inline.
2482 <get_ref_die_offset_complaint>: New method.
2483 * dwarf2/attribute.c (attribute::form_is_ref): Move to header.
2484 (attribute::get_ref_die_offset_complaint): Rename from
2485 get_ref_die_offset. Just issue complaint.
2486
2487 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
2488
2489 * cli/cli-cmds.c (shell_escape): Move exit_status_set_internal_vars.
2490
2491 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
2492
2493 * exec.c (exec_file_attach): Use errno value of first openp failure.
2494
2495 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
2496
2497 * nat/windows-nat.c (windows_thread_info::~windows_thread_info):
2498 Don't close thread handle.
2499
2500 2020-05-27 Tom Tromey <tom@tromey.com>
2501 Simon Marchi <simon.marchi@efficios.com>
2502
2503 * objfiles.h (struct objfile) <partial_symtabs>: Now a
2504 shared_ptr.
2505 * dwarf2/read.h (struct dwarf2_per_objfile) <partial_symtabs>: New
2506 member.
2507 * dwarf2/read.c (dwarf2_per_bfd_bfd_data_key,
2508 dwarf2_per_bfd_objfile_data_key>: New globals.
2509 (dwarf2_has_info): Use shared dwarf2_per_bfd if possible.
2510 (dwarf2_get_section_info): Use get_dwarf2_per_objfile.
2511 (dwarf2_initialize_objfile): Consider cases where per_bfd can be
2512 shared.
2513 (dwarf2_build_psymtabs): Set objfile::partial_symtabs and
2514 short-circuit when sharing.
2515 (dwarf2_build_psymtabs): Set dwarf2_per_objfile::partial_symtabs.
2516 (dwarf2_psymtab::expand_psymtab): Use free_cached_comp_units.
2517
2518 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2519
2520 * dwarf2/read.h (struct dwarf2_per_bfd) <line_header_hash>: Move
2521 to...
2522 (struct dwarf2_per_objfile) <line_header_hash>: ... here.
2523 * dwarf2/read.c (handle_DW_AT_stmt_list): Update.
2524
2525 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2526
2527 * dwarf2/read.c (struct mapped_index_base) <symbol_name_at,
2528 build_name_components, find_name_components_bounds>:
2529 Add per_objfile parameter.
2530 (struct mapped_index) <symbol_name_at>: Likewise.
2531 (struct mapped_debug_names): Remove constructor.
2532 <dwarf2_per_objfile>: Remove field.
2533 <namei_to_name, symbol_name_at>: Add per_objfile parameter.
2534 (mapped_index_base::find_name_components_bounds,
2535 mapped_index_base::build_name_components,
2536 dw2_expand_symtabs_matching_symbol): Likewise.
2537 (class mock_mapped_index) <symbol_name_at>: Likewise.
2538 (check_match): Likewise.
2539 (check_find_bounds_finds): Likewise.
2540 (test_mapped_index_find_name_component_bounds): Update.
2541 (CHECK_MATCH): Update.
2542 (dw2_expand_symtabs_matching): Update.
2543 (class dw2_debug_names_iterator) <dw2_debug_names_iterator>: Add
2544 per_objfile parameter.
2545 <find_vec_in_debug_names>: Likewise.
2546 <m_per_objfile>: New field.
2547 (mapped_debug_names::namei_to_name): Add dwarf2_per_objfile
2548 parameter.
2549 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
2550 (dw2_debug_names_iterator::next): Update.
2551 (dw2_debug_names_lookup_symbol): Update.
2552 (dw2_debug_names_expand_symtabs_for_function): Update.
2553 (dw2_debug_names_map_matching_symbols): Update.
2554 (dw2_debug_names_expand_symtabs_matching): Update.
2555 (dwarf2_read_debug_names): Update.
2556
2557 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2558
2559 * dwarf2/read.h (struct dwarf2_cu): Forward-declare.
2560 (struct dwarf2_per_bfd) <free_cached_comp_units>: Remove,
2561 move to dwarf2_per_objfile.
2562 <read_in_chain>: Remove.
2563 (struct dwarf2_per_objfile) <get_cu, set_cu, remove_cu,
2564 remove_all_cus, age_comp_units>: New methods.
2565 <m_dwarf2_cus>: New member.
2566 (struct dwarf2_per_cu_data) <cu>: Remove.
2567 * dwarf2/read.c (struct dwarf2_cu) <read_in_chain>: Remove.
2568 (age_cached_comp_units, free_one_cached_comp_unit): Remove,
2569 moved to methods of dwarf2_per_objfile.
2570 (dwarf2_clear_marks): Remove.
2571 (dwarf2_queue_item::~dwarf2_queue_item): Update.
2572 (dwarf2_per_bfd::~dwarf2_per_bfd): Don't free dwarf2_cus.
2573 (dwarf2_per_bfd::free_cached_comp_units): Remove.
2574 (dwarf2_per_objfile::remove_all_cus): New.
2575 (class free_cached_comp_units) <~free_cached_comp_units>:
2576 Update.
2577 (load_cu): Update.
2578 (dw2_do_instantiate_symtab): Adjust.
2579 (fill_in_sig_entry_from_dwo_entry): Adjust.
2580 (cutu_reader::init_tu_and_read_dwo_dies): Update.
2581 (cutu_reader::cutu_reader): Likewise.
2582 (cutu_reader::keep): Use dwarf2_per_objfile::set_cu.
2583 (cutu_reader::cutu_reader): Use dwarf2_per_objfile::get_cu.
2584 (process_psymtab_comp_unit): Use dwarf2_per_objfile::remove_cu
2585 and dwarf2_per_objfile::age_comp_units.
2586 (load_partial_comp_unit): Update.
2587 (maybe_queue_comp_unit): Use dwarf2_per_objfile::get_cu.
2588 (process_queue): Likewise.
2589 (find_partial_die): Use dwarf2_per_objfile::get_cu instead of cu
2590 backlink.
2591 (dwarf2_read_addr_index): Likewise.
2592 (follow_die_offset): Likewise.
2593 (dwarf2_fetch_die_loc_sect_off): Likewise.
2594 (dwarf2_fetch_constant_bytes): Likewise.
2595 (dwarf2_fetch_die_type_sect_off): Likewise.
2596 (follow_die_sig_1): Likewise.
2597 (load_full_type_unit): Likewise.
2598 (read_signatured_type): Likewise.
2599 (dwarf2_cu::dwarf2_cu): Don't set cu field.
2600 (dwarf2_cu::~dwarf2_cu): Remove.
2601 (dwarf2_per_objfile::get_cu): New.
2602 (dwarf2_per_objfile::set_cu): New.
2603 (age_cached_comp_units): Rename to...
2604 (dwarf2_per_objfile::age_comp_units): ... this. Adjust
2605 to std::unordered_map.
2606 (free_one_cached_comp_unit): Rename to...
2607 (dwarf2_per_objfile::remove_cu): ... this. Adjust
2608 to std::unordered_map.
2609 (dwarf2_per_objfile::~dwarf2_per_objfile): New.
2610 (dwarf2_mark_helper): Use dwarf2_per_objfile::get_cu, expect
2611 a dwarf2_per_objfile in data.
2612 (dwarf2_mark): Pass dwarf2_per_objfile in data to htab_traverse.
2613 (dwarf2_clear_marks): Remove.
2614
2615 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2616
2617 * dwarf2/read.c (class cutu_reader) <cutu_reader>: Replace
2618 `int use_existing_cu` parameter with `dwarf2_cu *existing_cu`.
2619 (init_tu_and_read_dwo_dies): Likewise.
2620 (cutu_reader::init_tu_and_read_dwo_dies): Likewise.
2621 (cutu_reader::cutu_reader): Likewise.
2622 (load_partial_comp_unit): Likewise.
2623 (process_psymtab_comp_unit): Update.
2624 (build_type_psymtabs_1): Update.
2625 (process_skeletonless_type_unit): Update.
2626 (load_full_comp_unit): Update.
2627 (find_partial_die): Update.
2628 (dwarf2_read_addr_index): Update.
2629 (read_signatured_type): Update.
2630
2631 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
2632
2633 * dwarf2/read.h (struct dwarf2_per_cu_data) <m_header,
2634 m_header_read_in>: New fields.
2635 <get_header>: New method.
2636 * dwarf2/read.c (per_cu_header_read_in): Remove.
2637 (dwarf2_per_cu_data::get_header): New.
2638 (dwarf2_per_cu_data::addr_size): Update.
2639 (dwarf2_per_cu_data::offset_size): Update.
2640 (dwarf2_per_cu_data::ref_addr_size): Update.
2641
2642 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
2643
2644 * dwarf2/read.c (load_cu): Return dwarf2_cu.
2645 (dw2_do_instantiate_symtab): Update.
2646 (queue_and_load_all_dwo_tus): Change parameter from
2647 dwarf2_per_cu_data to dwarf2_cu.
2648 (dwarf2_fetch_die_loc_sect_off): Update.
2649 (dwarf2_fetch_constant_bytes): Update.
2650 (dwarf2_fetch_die_type_sect_off): Update.
2651
2652 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
2653
2654 * dwarf2/read.c (process_full_comp_unit,
2655 process_full_type_unit): Remove per_cu, per_objfile paramters.
2656 Add dwarf2_cu parameter.
2657 (process_queue): Update.
2658
2659 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
2660
2661 * dwarf2/read.c (create_cu_from_index_list): Replace
2662 dwarf2_per_objfile parameter with dwarf2_per_bfd.
2663 (create_cus_from_index_list): Likewise.
2664 (create_cus_from_index): Likewise.
2665 (create_signatured_type_table_from_index): Likewise.
2666 (create_cus_from_debug_names_list): Likewise.
2667 (create_cus_from_debug_names): Likewise.
2668 (dwarf2_read_gdb_index): Update.
2669 (dwarf2_read_debug_names): Update.
2670
2671 2020-05-27 Tom Tromey <tom@tromey.com>
2672 Simon Marchi <simon.marchi@efficios.com>
2673
2674 * dwarf2/read.h (struct dwarf2_per_objfile)
2675 <get_type_for_signatured_type, set_type_for_signatured_type>:
2676 New methods.
2677 <m_type_map>: New member.
2678 (struct signatured_type) <type>: Remove.
2679 * dwarf2/read.c
2680 (dwarf2_per_objfile::get_type_for_signatured_type,
2681 dwarf2_per_objfile::set_type_for_signatured_type): New.
2682 (get_signatured_type): Use new methods.
2683
2684 2020-05-27 Tom Tromey <tom@tromey.com>
2685 Simon Marchi <simon.marchi@efficios.com>
2686
2687 * dwarf2/read.h (struct type_unit_group_unshareable): New.
2688 (struct dwarf2_per_objfile) <type_units>: New member.
2689 <get_type_unit_group_unshareable>: New method.
2690 * dwarf2/read.c (struct type_unit_group) <compunit_symtab,
2691 num_symtabs, symtabs>: Remove; move to
2692 type_unit_group_unshareable.
2693 (dwarf2_per_objfile::get_type_unit_group_unshareable): New.
2694 (process_full_type_unit, dwarf2_cu::setup_type_unit_groups)
2695 (dwarf2_cu::setup_type_unit_groups): Use type_unit_group_unshareable.
2696
2697 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2698
2699 * dwarf2/read.h (struct dwarf2_per_cu_data):
2700 <dwarf2_per_objfile>: Remove.
2701 * dwarf2/read.c (create_cu_from_index_list): Don't assign
2702 dwarf2_per_objfile.
2703 (create_signatured_type_table_from_index): Likewise.
2704 (create_signatured_type_table_from_debug_names): Likewise.
2705 (create_debug_type_hash_table): Likewise.
2706 (fill_in_sig_entry_from_dwo_entry): Likewise.
2707 (create_type_unit_group): Likewise.
2708 (read_comp_units_from_section): Likewise.
2709 (create_cus_hash_table): Likewise.
2710
2711 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2712
2713 * dwarf2/read.c (process_psymtab_comp_unit): Remove reference to
2714 dwarf2_per_cu_data::dwarf2_per_objfile.
2715 (compute_compunit_symtab_includes): Likewise.
2716 (dwarf2_cu::start_symtab): Likewise.
2717
2718 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
2719
2720 * dwarf2/read.h (dwarf2_get_die_type): Add dwarf2_per_objfile
2721 parameter.
2722 * dwarf2/read.c (get_die_type_at_offset): Likewise.
2723 (read_namespace_alias): Update.
2724 (lookup_die_type): Update.
2725 (dwarf2_get_die_type): Add dwarf2_per_objfile parameter.
2726 * dwarf2/loc.c (class dwarf_evaluate_loc_desc) <get_base_type>:
2727 Update.
2728 (disassemble_dwarf_expression): Update.
2729
2730 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2731
2732 * dwarf2/read.h (struct dwarf2_queue_item): Add
2733 dwarf2_per_objfile parameter, assign new parameter.
2734 <per_objfile>: New field.
2735 * dwarf2/read.c (free_one_cached_comp_unit): Add
2736 dwarf2_per_objfile parameter.
2737 (queue_comp_unit): Likewise.
2738 (dw2_do_instantiate_symtab): Update.
2739 (process_psymtab_comp_unit): Update.
2740 (maybe_queue_comp_unit): Add dwarf2_per_objfile parameter.
2741 (process_imported_unit_die): Update.
2742 (queue_and_load_dwo_tu): Update.
2743 (follow_die_offset): Update.
2744 (follow_die_sig_1): Update.
2745
2746 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2747
2748 * dwarf2/read.h (struct dwarf2_per_cu_data) <objfile>: Remove.
2749 * dwarf2/read.c (dwarf2_compute_name): Pass per_objfile down.
2750 (read_call_site_scope): Assign per_objfile.
2751 (dwarf2_per_cu_data::objfile): Remove.
2752 * gdbtypes.h (struct call_site) <per_objfile>: New member.
2753 * dwarf2/loc.h (dwarf2_evaluate_loc_desc): Add
2754 dwarf2_per_objfile parameter.
2755 * dwarf2/loc.c (dwarf2_evaluate_loc_desc_full): Add
2756 dwarf2_per_objfile parameter.
2757 (dwarf_expr_reg_to_entry_parameter): Add output
2758 dwarf2_per_objfile parameter.
2759 (locexpr_get_frame_base): Update.
2760 (class dwarf_evaluate_loc_desc) <get_tls_address>: Update.
2761 <push_dwarf_reg_entry_value>: Update.
2762 <call_site_to_target_addr>: Update.
2763 (dwarf_entry_parameter_to_value): Add dwarf2_per_objfile
2764 parameter.
2765 (value_of_dwarf_reg_entry): Update.
2766 (rw_pieced_value): Update.
2767 (indirect_synthetic_pointer): Update.
2768 (dwarf2_evaluate_property): Update.
2769 (dwarf2_loc_desc_get_symbol_read_needs): Add dwarf2_per_objfile
2770 parameter.
2771 (locexpr_read_variable): Update.
2772 (locexpr_get_symbol_read_needs): Update.
2773 (loclist_read_variable): Update.
2774
2775 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2776
2777 * dwarf2/read.h (dwarf2_fetch_die_loc_sect_off,
2778 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
2779 dwarf2_fetch_die_type_sect_off): Add dwarf2_per_objfile
2780 parameter.
2781 * dwarf2/read.c (dwarf2_fetch_die_loc_sect_off,
2782 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
2783 dwarf2_fetch_die_type_sect_off): Add dwarf2_per_objfile
2784 parameter.
2785 * dwarf2/loc.c (indirect_synthetic_pointer, per_cu_dwarf_call,
2786 sect_variable_value): Add dwarf2_per_objfile parameter.
2787 (class dwarf_evaluate_loc_desc) <dwarf_call,
2788 dwarf_variable_value>: Update.
2789 (fetch_const_value_from_synthetic_pointer): Add
2790 dwarf2_per_objfile parameter.
2791 (fetch_const_value_from_synthetic_pointer): Update.
2792 (coerced_pieced_ref): Update.
2793 (class symbol_needs_eval_context) <dwarf_call,
2794 dwarf_variable_value>: Update.
2795 (dwarf2_compile_expr_to_ax): Update.
2796
2797 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2798
2799 * dwarf2/loc.c (allocate_piece_closure): Add dwarf2_per_objfile
2800 parameter.
2801 (dwarf2_evaluate_loc_desc_full): Update.
2802
2803 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2804
2805 * dwarf2/read.h (dwarf2_read_addr_index): Add dwarf2_per_objfile
2806 parameter.
2807 * dwarf2/read.c (dwarf2_read_addr_index): Likewise.
2808 * dwarf2/loc.c (decode_debug_loclists_addresses): Add
2809 dwarf2_per_objfile parameter.
2810 (decode_debug_loc_dwo_addresses): Likewise.
2811 (dwarf2_find_location_expression): Update.
2812 (class dwarf_evaluate_loc_desc) <get_addr_index>: Update.
2813 (locexpr_describe_location_piece): Add dwarf2_per_objfile
2814 parameter.
2815 (disassemble_dwarf_expression): Add dwarf2_per_objfile
2816 parameter.
2817 (locexpr_describe_location_1): Likewise.
2818 (locexpr_describe_location): Update.
2819
2820 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2821
2822 * dwarf2/read.h (struct dwarf2_per_cu_data) <text_offset>:
2823 Remove.
2824 * dwarf2/read.c (dwarf2_per_cu_data::text_offset): Remove.
2825 * dwarf2/loc.c (dwarf2_find_location_expression): Update.
2826 (dwarf2_compile_property_to_c): Update.
2827 (dwarf2_compile_expr_to_ax): Add dwarf2_per_objfile parameter,
2828 use text offset from objfile.
2829 (locexpr_tracepoint_var_ref): Update.
2830 (locexpr_generate_c_location): Update.
2831 (loclist_describe_location): Update.
2832 (loclist_tracepoint_var_ref): Update.
2833 * dwarf2/compile.h (compile_dwarf_bounds_to_c): Add
2834 dwarf2_per_objfile parameter.
2835 * dwarf2/loc2c.c (do_compile_dwarf_expr_to_c): Likewise,
2836 use text offset from objfile.
2837 (compile_dwarf_expr_to_c): Add dwarf2_per_objfile parameter.
2838
2839 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2840
2841 * dwarf2/expr.h (struct dwarf_expr_context)
2842 <dwarf_expr_context>: Add dwarf2_per_objfile parameter.
2843 <offset>: Remove.
2844 <per_objfile>: New member.
2845 * dwarf2/expr.c (dwarf_expr_context::dwarf_expr_context): Add
2846 dwarf2_per_objfile parameter. Don't set offset, set
2847 per_objfile.
2848 (dwarf_expr_context::execute_stack_op): Use offset from objfile.
2849 * dwarf2/frame.c (dwarf2_frame_find_fde): Return (by parameter)
2850 a dwarf2_per_objfile object instead of an offset.
2851 (class dwarf_expr_executor) <dwarf_expr_executor>: Add
2852 constructor.
2853 (execute_stack_op): Add dwarf2_per_objfile parameter, pass it
2854 to dwarf2_expr_executor constructor. Don't set offset.
2855 (dwarf2_fetch_cfa_info): Update.
2856 (struct dwarf2_frame_cache) <text_offset>: Remove.
2857 <per_objfile>: New field.
2858 (dwarf2_frame_cache): Update.
2859 (dwarf2_frame_prev_register): Update.
2860 * dwarf2/loc.c (class dwarf_evaluate_loc_desc)
2861 <dwarf_evaluate_loc_desc>: Add constructor.
2862 (dwarf2_evaluate_loc_desc_full): Update.
2863 (dwarf2_locexpr_baton_eval): Update.
2864 (class symbol_needs_eval_context) <symbol_needs_eval_context>:
2865 Add constructor.
2866 (dwarf2_loc_desc_get_symbol_read_needs): Update.
2867
2868 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2869
2870 * dwarf2/read.h (struct dwarf2_per_cu_data) <addr_type,
2871 addr_sized_int_type>: Move to dwarf2_cu.
2872 <int_type>: Move to dwarf2_per_objfile.
2873 (struct dwarf2_per_objfile) <int_type>: Move here.
2874 * dwarf2/read.c (struct dwarf2_cu) <addr_type,
2875 addr_sized_int_type>: Move here.
2876 (read_func_scope): Update.
2877 (read_array_type): Update.
2878 (read_tag_string_type): Update.
2879 (attr_to_dynamic_prop): Update.
2880 (dwarf2_per_cu_data::int_type): Rename to...
2881 (dwarf2_per_objfile::int_type): ... this.
2882 (dwarf2_per_cu_data::addr_sized_int_type): Rename to...
2883 (dwarf2_cu::addr_sized_int_type): ... this.
2884 (read_subrange_type): Update.
2885 (dwarf2_per_cu_data::addr_type): Rename to...
2886 (dwarf2_cu::addr_type): ... this.
2887 (set_die_type): Update.
2888
2889 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2890
2891 * dwarf2/read.c (queue_and_load_all_dwo_tus): Access per_objfile
2892 data through per_cu->cu.
2893
2894 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2895
2896 * dwarf2/read.c (lookup_dwo_comp_unit): Change
2897 dwarf2_per_cu_data parameter fo dwarf2_cu.
2898 (lookup_dwo_type_unit): Likewise.
2899 (read_cutu_die_from_dwo): Likewise.
2900 (lookup_dwo_unit): Likewise.
2901 (open_and_init_dwo_file): Likewise.
2902 (lookup_dwo_cutu): Likewise.
2903 (lookup_dwo_comp_unit): Likewise.
2904 (lookup_dwo_type_unit): Likewise.
2905 (cutu_reader::init_tu_and_read_dwo_dies): Update.
2906 (cutu_reader::cutu_reader): Update.
2907
2908 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2909
2910 * dwarf2/read.c (process_full_comp_unit): Add dwarf2_per_objfile
2911 parameter.
2912 (process_full_type_unit): Likewise.
2913 (process_queue): Update.
2914
2915 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2916
2917 * dwarf2/read.c (recursively_compute_inclusions): Add
2918 dwarf2_per_objfile parameter.
2919 (compute_compunit_symtab_includes): Likewise.
2920 (process_cu_includes): Update.
2921
2922 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2923
2924 * dwarf2/read.c (create_partial_symtab): Add dwarf2_per_objfile
2925 parameter.
2926 (create_type_unit_group): Update.
2927 (process_psymtab_comp_unit_reader): Update.
2928 (build_type_psymtabs_reader): Update.
2929
2930 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2931
2932 * dwarf2/read.c (cutu_reader::keep): Access dwarf2_per_objfile
2933 object through m_this_cu->cu.
2934
2935 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
2936
2937 * dwarf2/read.c (queue_and_load_dwo_tu): Expect a dwarf2_cu as
2938 the info parameter.
2939 (queue_and_load_all_dwo_tus): Pass per_cu->cu.
2940
2941 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
2942
2943 * dwarf2/read.c (class cutu_reader) <cutu_reader>: Add
2944 per_objfile parameter.
2945 (load_full_type_unit): Add per_objfile parameter.
2946 (read_signatured_type): Likewise.
2947 (load_full_comp_unit): Likewise.
2948 (load_cu): Likewise.
2949 (dw2_do_instantiate_symtab): Likewise.
2950 (dw2_get_file_names): Likewise.
2951 (dw2_map_symtabs_matching_filename): Update.
2952 (dw_expand_symtabs_matching_file_matcher): Update.
2953 (dw2_map_symbol_filenames): Update.
2954 (process_psymtab_comp_unit): Add per_objfile parameter.
2955 (build_type_psymtabs_1): Update.
2956 (process_skeletonless_type_unit): Update.
2957 (dwarf2_build_psymtabs_hard): Update.
2958 (load_partial_comp_unit): Add per_objfile parameter.
2959 (scan_partial_symbols): Update.
2960 (load_full_comp_unit): Add per_objfile parameter.
2961 (process_imported_unit_die): Update.
2962 (create_cus_hash_table): Update.
2963 (find_partial_die): Update.
2964 (dwarf2_read_addr_index): Update.
2965 (follow_die_offset): Update.
2966 (dwarf2_fetch_die_loc_sect_off): Update.
2967 (dwarf2_fetch_constant_bytes): Update.
2968 (dwarf2_fetch_die_type_sect_off): Update.
2969 (follow_die_sig_1): Update.
2970 (load_full_type_unit): Add per_objfile parameter.
2971 (read_signatured_type): Likewise.
2972
2973 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2974
2975 * dwarf2/read.c (lookup_dwo_unit): Use bfd_get_filename instead
2976 of objfile_name.
2977
2978 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
2979
2980 * dwarf2/read.h (struct dwarf2_per_bfd) <obfd>: New member.
2981 (dwarf2_get_dwz_file): Replace parameter with dwarf2_per_bfd.
2982 * dwarf2/read.c (dwarf2_per_bfd::dwarf2_per_bfd): Assign obfd
2983 field.
2984 (dwarf2_get_dwz_file): Replace parameter with dwarf2_per_bfd.
2985 (create_cus_from_index): Update.
2986 (dwarf2_read_gdb_index): Update.
2987 (create_cus_from_debug_names): Update.
2988 (dwarf2_read_debug_names): Update.
2989 (get_abbrev_section_for_cu): Update.
2990 (create_all_comp_units): Update.
2991 (read_attribute_value): Update.
2992 (get_debug_line_section): Update.
2993 * dwarf2/index-cache.c (index_cache::store): Update.
2994 * dwarf2/index-write.c (save_gdb_index_command): Update.
2995 * dwarf2/macro.c (dwarf_decode_macro_bytes): Update.
2996
2997 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
2998
2999 * dwarf2/read.h (struct dwarf2_per_cu_data) <per_bfd>: New
3000 member.
3001 * dwarf2/read.c (dwarf2_per_bfd::allocate_per_cu): Initialize
3002 dwarf2_per_cu_data::per_bfd.
3003 (dwarf2_per_bfd::allocate_signatured_type): Likewise.
3004 (create_type_unit_group): Likewise.
3005 (queue_comp_unit): Remove reference to
3006 per_cu->dwarf2_per_objfile.
3007 (maybe_queue_comp_unit): Likewise.
3008 (fill_in_sig_entry_from_dwo_entry): Assign new field.
3009 (create_cus_hash_table): Assign new field.
3010
3011 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3012
3013 * dwarf2/read.c: Replace
3014 dwarf2_cu->per_cu->dwarf2_per_objfile references with
3015 dwarf2_cu->per_objfile throughout.
3016
3017 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3018
3019 * dwarf2/read.c (dw2_do_instantiate_symtab): Add per_objfile
3020 parameter, don't use per_cu->dwarf2_per_objfile.
3021 (dw2_instantiate_symtab): Likewise.
3022 (dw2_find_last_source_symtab): Update.
3023 (dw2_map_expand_apply): Update.
3024 (dw2_lookup_symbol): Update.
3025 (dw2_expand_symtabs_for_function): Update.
3026 (dw2_expand_all_symtabs): Update.
3027 (dw2_expand_symtabs_with_fullname): Update.
3028 (dw2_expand_symtabs_matching_one): Add per_objfile parameter,
3029 don't use per_cu->dwarf2_per_objfile.
3030 (dw2_expand_marked_cus): Update.
3031 (dw2_find_pc_sect_compunit_symtab): Update.
3032 (dw2_debug_names_lookup_symbol): Update.
3033 (dw2_debug_names_expand_symtabs_for_function): Update.
3034 (dw2_debug_names_map_matching_symbols): Update.
3035 (dwarf2_psymtab::expand_psymtab): Update.
3036
3037 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3038
3039 * dwarf2/read.c (struct dwarf2_cu) <dwarf2_cu>: Add parameter.
3040 <per_objfile>: New member.
3041 (class cutu_reader) <init_tu_and_read_dwo_dies>: Add parameter.
3042 (cutu_reader::init_tu_and_read_dwo_dies): Add parameter, update
3043 call to dwarf2_cu.
3044 (cutu_reader::cutu_reader): Update.
3045 (dwarf2_cu::dwarf2_cu): Add parameter, initialize per_objfile.
3046
3047 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3048
3049 * dwarf2/read.h (struct dwarf2_per_bfd) <die_type_hash>: Move to
3050 struct dwarf2_per_objfile.
3051 (struct dwarf2_per_objfile) <die_type_hash>: Move from struct
3052 dwarf2_per_bfd.
3053 * dwarf2/read.c (set_die_type): Update.
3054 (get_die_type_at_offset): Update.
3055
3056 2020-05-27 Tom Tromey <tom@tromey.com>
3057 Simon Marchi <simon.marchi@efficios.com>
3058
3059 * dwarf2/read.h (struct dwarf2_per_bfd) <num_psymtabs>: New
3060 method.
3061 (struct dwarf2_per_objfile) <resize_symtabs, symtab_set_p,
3062 get_symtab, set_symtab>: New methods.
3063 <m_symtabs>: New field.
3064 (struct dwarf2_psymtab): Derive from partial_symtab.
3065 <readin_p, get_compunit_symtab>: Declare methods.
3066 * dwarf2/read.c (dwarf2_per_objfile::symtab_set_p,
3067 dwarf2_per_objfile::get_symtab, dwarf2_per_objfile::set_symtab):
3068 New methods.
3069 (struct dwarf2_per_cu_quick_data) <compunit_symtab>: Remove.
3070 (dw2_do_instantiate_symtab, dw2_instantiate_symtab)
3071 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
3072 (dw2_symtab_iter_next, dw2_print_stats)
3073 (dw2_expand_symtabs_with_fullname)
3074 (dw2_expand_symtabs_matching_one)
3075 (dw_expand_symtabs_matching_file_matcher)
3076 (dw2_find_pc_sect_compunit_symtab, dw2_map_symbol_filenames)
3077 (dw2_debug_names_iterator::next)
3078 (dw2_debug_names_map_matching_symbols)
3079 (fill_in_sig_entry_from_dwo_entry, dwarf2_psymtab::read_symtab)
3080 (process_queue, dwarf2_psymtab::expand_psymtab): Update.
3081 (dwarf2_psymtab::readin_p, dwarf2_psymtab::get_compunit_symtab):
3082 New methods.
3083 (get_compunit_symtab, process_full_comp_unit)
3084 (process_full_type_unit): Update.
3085 (dwarf2_build_psymtabs, dwarf2_initialize_objfile, add_type_unit): Call
3086
3087 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3088
3089 * dwarf2/read.h (dwarf2_per_objfile): Rename to dwarf2_per_bfd,
3090 then introduce a new dwarf2_per_objfile type.
3091 <read_line_string>: Move to the new dwarf2_per_objfile type.
3092 <objfile>: Likewise.
3093 (dwarf2_per_bfd): Rename dwarf2_per_objfile to this.
3094 * dwarf2/read.c: Replace references to dwarf2_per_objfile with
3095 dwarf2_per_objfile->per_bfd.
3096 (dwarf2_per_objfile::dwarf2_per_objfile): Rename to...
3097 (dwarf2_per_bfd::dwarf2_per_bfd): ... this.
3098 (dwarf2_per_objfile::free_cached_comp_units): Rename to...
3099 (dwarf2_per_bfd::free_cached_comp_units): ... this.
3100 (dwarf2_has_info): Allocate dwarf2_per_bfd.
3101 (dwarf2_per_objfile::locate_sections): Rename to...
3102 (dwarf2_per_bfd::locate_sections): ... this.
3103 (dwarf2_per_objfile::get_cutu): Rename to...
3104 (dwarf2_per_bfd::get_cutu): ... this.
3105 (dwarf2_per_objfile::get_cu): Rename to...
3106 (dwarf2_per_bfd::get_cu): ... this.
3107 (dwarf2_per_objfile::get_tu): Rename to...
3108 (dwarf2_per_bfd::get_tu): ... this.
3109 (dwarf2_per_objfile::allocate_per_cu): Rename to...
3110 (dwarf2_per_bfd::allocate_per_cu): ... this.
3111 (dwarf2_per_objfile::allocate_signatured_type): Rename to...
3112 (dwarf2_per_bfd::allocate_signatured_type): ... this.
3113 (get_gdb_index_contents_ftype): Change parameter from
3114 dwarf2_per_objfile to dwarf2_per_bfd.
3115 * dwarf2/macro.c, dwarf2/index-write.c: Replace references to
3116 dwarf2_per_objfile with dwarf2_per_objfile->per_bfd.
3117
3118 2020-05-27 Tom Tromey <tom@tromey.com>
3119 Simon Marchi <simon.marchi@efficios.com>
3120
3121 * dwarf2/loc.c (struct piece_closure) <per_objfile>: New member.
3122 (allocate_piece_closure): Set "per_objfile" member.
3123 (dwarf2_find_location_expression, dwarf2_locexpr_baton_eval)
3124 (locexpr_describe_location, loclist_describe_location): Use new
3125 member.
3126 * dwarf2/read.c (read_call_site_scope)
3127 (mark_common_block_symbol_computed, attr_to_dynamic_prop)
3128 (dwarf2_const_value_attr, dwarf2_fetch_die_loc_sect_off)
3129 (fill_in_loclist_baton, dwarf2_symbol_mark_computed,
3130 handle_data_member_location): Set per_objfile member.
3131 * dwarf2/loc.h (struct dwarf2_locexpr_baton) <per_objfile>: New
3132 member.
3133 (struct dwarf2_loclist_baton) <per_objfile>: New member.
3134
3135 2020-05-27 Tom Tromey <tom@tromey.com>
3136
3137 * dwarf2/read.h (struct dwarf2_per_objfile) <allocate_per_cu,
3138 allocate_signatured_type>: Declare new methods.
3139 <m_num_psymtabs>: New member.
3140 (struct dwarf2_per_cu_data) <index>: New member.
3141 * dwarf2/read.c (dwarf2_per_objfile::allocate_per_cu)
3142 (dwarf2_per_objfile::allocate_signatured_type): New methods.
3143 (create_cu_from_index_list): Use allocate_per_cu.
3144 (create_signatured_type_table_from_index)
3145 (create_signatured_type_table_from_debug_names)
3146 (create_debug_type_hash_table, add_type_unit)
3147 (read_comp_units_from_section): Use allocate_signatured_type.
3148
3149 2020-05-27 Tom Tromey <tom@tromey.com>
3150
3151 * psymtab.c (partial_map_expand_apply)
3152 (psym_find_pc_sect_compunit_symtab, psym_lookup_symbol)
3153 (psym_lookup_global_symbol_language)
3154 (psymtab_to_symtab, psym_find_last_source_symtab, dump_psymtab)
3155 (psym_print_stats, psym_expand_symtabs_for_function)
3156 (psym_map_symbol_filenames, psym_map_matching_symbols)
3157 (psym_expand_symtabs_matching)
3158 (partial_symtab::read_dependencies, maintenance_info_psymtabs)
3159 (maintenance_check_psymtabs): Update.
3160 * psympriv.h (struct partial_symtab) <readin_p,
3161 get_compunit_symtab>: Add objfile parameter.
3162 (struct standard_psymtab) <readin_p, get_compunit_symtab>:
3163 Likewise.
3164 * dwarf2/read.c (struct dwarf2_include_psymtab) <readin_p,
3165 get_compunit_symtab>: Likewise.
3166 (dwarf2_psymtab::expand_psymtab): Pass objfile argument.
3167
3168 2020-05-27 Tom Tromey <tom@tromey.com>
3169
3170 * dwarf2/read.h (struct dwarf2_per_objfile) <obstack>: New
3171 member.
3172 * dwarf2/read.c (delete_file_name_entry): Fix comment.
3173 (create_cu_from_index_list)
3174 (create_signatured_type_table_from_index)
3175 (create_signatured_type_table_from_debug_names)
3176 (dw2_get_file_names_reader, dwarf2_initialize_objfile)
3177 (dwarf2_create_include_psymtab)
3178 (create_debug_type_hash_table, add_type_unit)
3179 (create_type_unit_group, read_comp_units_from_section)
3180 (dwarf2_compute_name, create_cus_hash_table)
3181 (create_dwp_hash_table, create_dwo_unit_in_dwp_v1)
3182 (create_dwo_unit_in_dwp_v2, open_and_init_dwp_file): Use new
3183 obstack.
3184 (dw2_get_real_path): Likewise. Change argument to
3185 dwarf2_per_objfile.
3186
3187 2020-05-27 Luis Machado <luis.machado@linaro.org>
3188
3189 PR tdep/26000
3190 * arm-tdep.c (thumb_analyze_prologue): Fix instruction matching
3191 for ldrd (immediate).
3192
3193 2020-05-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3194
3195 * command.h: Add comment giving the name of class_tui.
3196 * cli/cli-cmds.c (_initialize_cli_cmds): If TUI defined,
3197 create the fake command for the help for class_tui.
3198
3199 2020-05-26 Tom Tromey <tromey@adacore.com>
3200
3201 * ada-lang.c (ada_print_array_index): Change type. Call val_atr.
3202 (ada_value_ptr_subscript): Don't call pos_atr on the lower bound.
3203 (val_atr): New function.
3204 (value_val_atr): Use it.
3205 * ada-valprint.c (print_optional_low_bound): Change low bound
3206 handling for enums.
3207 (val_print_packed_array_elements): Don't call discrete_position.
3208 * gdbtypes.c (get_discrete_bounds) <TYPE_CODE_RANGE>: Call
3209 discrete_position for enum types.
3210 * language.c (default_print_array_index): Change type.
3211 * language.h (struct language_defn) <la_print_array_index>: Add
3212 index_type parameter, change type of index_value.
3213 (LA_PRINT_ARRAY_INDEX): Add index_type parameter.
3214 (default_print_array_index): Update.
3215 * valprint.c (maybe_print_array_index): Don't call
3216 value_from_longest. Update.
3217 (value_print_array_elements): Don't call discrete_position.
3218
3219 2020-05-26 Tom Tromey <tromey@adacore.com>
3220
3221 * ada-lang.c (value_val_atr): Handle TYPE_CODE_RANGE.
3222 * gdbtypes.c (discrete_position): Handle TYPE_CODE_RANGE.
3223
3224 2020-05-25 Cristiano De Alti <cristiano_dealti@hotmail.com>
3225
3226 PR gdb/13519
3227 * avr-tdep.c (avr_integer_to_address): Return data or code
3228 address accordingly to the second 'type' argument of the
3229 function.
3230
3231 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
3232
3233 * infcmd.c, inferior.h: (construct_inferior_arguments):
3234 Moved function from here to gdbsupport/common-inferior.{h,cc}
3235
3236 2020-05-23 Tom Tromey <tom@tromey.com>
3237
3238 Revert commit eca1f90c:
3239 * NEWS: Remove entry for completion styling.
3240 * completer.c (_rl_completion_prefix_display_length): Move
3241 declaration later.
3242 (gdb_fnprint): Revert.
3243 (gdb_display_match_list_1): Likewise.
3244 * cli/cli-style.c (completion_prefix_style)
3245 (completion_difference_style, completion_suffix_style): Remove.
3246 (_initialize_cli_style): Revert.
3247 * cli/cli-style.h (completion_prefix_style)
3248 (completion_difference_style, completion_suffix_style): Don't
3249 declare.
3250
3251 2020-05-24 Pedro Alves <palves@redhat.com>
3252
3253 * symtab.c (completion_list_add_name): Return boolean indication
3254 of whether the symbol matched.
3255 (completion_list_add_symbol): Don't try to remove C++ aliases if
3256 the symbol didn't match in the first place.
3257 * symtab.h (completion_list_add_name): Return bool.
3258
3259 2020-05-23 Simon Marchi <simon.marchi@polymtl.ca>
3260
3261 * gdbtypes.h (TYPE_FIELD): Remove. Replace all uses with
3262 type::field.
3263
3264 2020-05-23 Joel Brobecker <brobecker@adacore.com>
3265
3266 GDB 9.2 released.
3267
3268 2020-05-23 Tom Tromey <tom@tromey.com>
3269
3270 * NEWS: Add entry for completion styling.
3271 * completer.c (_rl_completion_prefix_display_length): Move
3272 declaration earlier.
3273 (gdb_fnprint): Use completion_style.
3274 (gdb_display_match_list_1): Likewise.
3275 * cli/cli-style.c (completion_prefix_style)
3276 (completion_difference_style, completion_suffix_style): New
3277 globals.
3278 (_initialize_cli_style): Register new globals.
3279 * cli/cli-style.h (completion_prefix_style)
3280 (completion_difference_style, completion_suffix_style): Declare.
3281
3282 2020-05-23 Pedro Alves <palves@redhat.com>
3283
3284 * utils.c: Include "gdbsupport/gdb-safe-ctype.h".
3285 (parse_escape): Use ISDIGIT instead of isdigit.
3286 (puts_debug): Use gdb_isprint instead of isprint.
3287 (fprintf_symbol_filtered): Use ISALNUM instead of isalnum.
3288 (cp_skip_operator_token, skip_ws, strncmp_iw_with_mode): Use
3289 ISSPACE instead of isspace.
3290 (strncmp_iw_with_mode): Use TOLOWER instead of tolower and ISSPACE
3291 instead of isspace.
3292 (strcmp_iw_ordered): Use ISSPACE instead of isspace.
3293 (string_to_core_addr): Use TOLOWER instead of tolower, ISXDIGIT
3294 instead of isxdigit and ISDIGIT instead of isdigit.
3295
3296 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
3297
3298 * gdbtypes.h (struct type) <field>: New method.
3299 (TYPE_FIELDS): Remove, replace all uses with either type::fields
3300 or type::field.
3301
3302 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
3303
3304 * gdbtypes.h (struct type) <fields, set_fields>: New methods.
3305 (TYPE_FIELDS): Use type::fields. Change all call sites that
3306 modify the propery to use type::set_fields instead.
3307
3308 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
3309
3310 * gdbtypes.h (TYPE_NFIELDS): Remove. Change all cal sites to use
3311 type::num_fields instead.
3312
3313 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
3314
3315 * gdbtypes.h (struct type) <num_fields, set_num_fields>: New
3316 methods.
3317 (TYPE_NFIELDS): Use type::num_fields. Change all call sites
3318 that modify the number of fields to use type::set_num_fields
3319 instead.
3320
3321 2020-05-22 Tom Tromey <tromey@adacore.com>
3322
3323 * compile/compile-object-load.h (munmap_list_free): Don't
3324 declare.
3325
3326 2020-05-22 Andrew Burgess <andrew.burgess@embecosm.com>
3327
3328 * annotate.c (annotate_source_line): Update return type, add call
3329 to update current symtab and line.
3330 * annotate.h (annotate_source_line): Update return type, and
3331 extend header comment.
3332 * source.c (info_line_command): Check annotation_level before
3333 calling annotate_source_line.
3334 * stack.c (print_frame_info): If calling annotate_source_line
3335 returns true, then don't print any other source line information.
3336
3337 2020-05-21 Simon Marchi <simon.marchi@efficios.com>
3338
3339 * lm32-tdep.c (lm32_register_reggroup_p): Fix condition.
3340
3341 2020-05-21 Simon Marchi <simon.marchi@efficios.com>
3342
3343 * coffread.c (patch_type): Remove NULL check before xfree.
3344 * corefile.c (set_gnutarget): Likewise.
3345 * cp-abi.c (set_cp_abi_as_auto_default): Likewise.
3346 * exec.c (build_section_table): Likewise.
3347 * remote.c (remote_target::pass_signals): Likewise.
3348 * utils.c (n_spaces): Likewise.
3349 * cli/cli-script.c (document_command): Likewise.
3350 * i386-windows-tdep.c (core_process_module_section): Likewise.
3351 * linux-fork.c (struct fork_info) <~fork_info>: Likewise.
3352
3353 2020-05-20 Simon Marchi <simon.marchi@efficios.com>
3354
3355 * symfile.c (reread_symbols): Clear objfile's section_offsets
3356 vector and section indices, re-compute them by calling
3357 sym_offsets.
3358
3359 2020-05-20 Tom Tromey <tromey@adacore.com>
3360
3361 * ada-lang.c (bound_name, MAX_ADA_DIMENS): Remove.
3362 (desc_one_bound, desc_index_type): Compute field name.
3363
3364 2020-05-20 Tom de Vries <tdevries@suse.de>
3365
3366 PR symtab/25833
3367 * dwarf2/read.c (dw2_map_matching_symbols): Handle .gdb_index.
3368
3369 2020-05-20 Alan Modra <amodra@gmail.com>
3370
3371 PR 25993
3372 * solib-darwin.c (darwin_bfd_open): Don't strdup pathname for
3373 bfd_set_filename.
3374 * solib-aix.c (solib_aix_bfd_open): Use std::string for name
3375 passed to bfd_set_filename.
3376 * symfile-mem.c (add_vsyscall_page): Likewise for string
3377 passed to symbol_file_add_from_memory.
3378 (symbol_file_add_from_memory): Make name param a const char* and
3379 don't strdup.
3380
3381 2020-05-20 Alan Modra <amodra@gmail.com>
3382
3383 * coff-pe-read.c (read_pe_exported_syms): Use bfd_get_filename
3384 rather than accessing bfd->filename directly.
3385 * dtrace-probe.c (dtrace_static_probe_ops::get_probes): Likewise,
3386 and use bfd_section_name.
3387 * dwarf2/frame.c (decode_frame_entry): Likewise.
3388 * exec.c (exec_set_section_address): Likewise.
3389 * solib-aix.c (solib_aix_bfd_open): Likewise.
3390 * stap-probe.c (get_stap_base_address): Likewise.
3391 * symfile.c (reread_symbols): Likewise.
3392
3393 2020-05-19 Tom Tromey <tromey@adacore.com>
3394
3395 * sparc64-tdep.c (adi_tag_fd): Update call to target_fileio_open.
3396
3397 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
3398
3399 * dwarf2/read.c (quirk_rust_enum): Allocate enough fields.
3400
3401 2020-05-19 Pedro Alves <palves@redhat.com>
3402
3403 * NEWS (set exec-file-mismatch): Adjust entry.
3404 * exec.c: Include "build-id.h".
3405 (validate_exec_file): Try to match build IDs instead of filenames.
3406 * gdb_bfd.c (struct gdb_bfd_open_closure): New.
3407 (gdb_bfd_iovec_fileio_open): Adjust to use gdb_bfd_open_closure
3408 and pass down 'warn_if_slow'.
3409 (gdb_bfd_open): Add 'warn_if_slow' parameter. Use
3410 gdb_bfd_open_closure to pass it down.
3411 * gdb_bfd.h (gdb_bfd_open): Add 'warn_if_slow' parameter.
3412
3413 2020-05-19 Pedro Alves <palves@redhat.com>
3414
3415 * gdb_bfd.c (gdb_bfd_iovec_fileio_open): Adjust.
3416 * target.c (target_fileio_open_1): Rename to target_fileio_open
3417 and make extern. Use bool.
3418 (target_fileio_open, target_fileio_open_warn_if_slow): Delete.
3419 (target_fileio_read_alloc_1): Adjust.
3420 * target.h (target_fileio_open): Add 'warn_if_slow' parameter.
3421 (target_fileio_open_warn_if_slow): Delete declaration.
3422
3423 2020-05-19 Pedro Alves <palves@redhat.com>
3424
3425 * gdb_bfd.h: (gdb_bfd_open): Default to 'fd' parameter to -1.
3426 Adjust all callers.
3427
3428 2020-05-19 Yoshinori Sato <ysato@users.sourceforge.jp>
3429
3430 * h8300-tdep.c (h8300_is_argument_spill): Change how we check
3431 whether disp is negative.
3432
3433 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
3434
3435 * symfile.h (struct symfile_segment_data)
3436 <~symfile_segment_data>: Remove.
3437 <segment_info>: Change to std::vector.
3438 * symfile.c (default_symfile_segments): Update.
3439 * elfread.c (elf_symfile_segments): Update.
3440
3441 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
3442
3443 * symfile.h (struct symfile_segment_data) <struct segment>: New.
3444 <segments>: New.
3445 <segment_bases, segment_sizes>: Remove.
3446 * symfile.c (default_symfile_segments): Update.
3447 * elfread.c (elf_symfile_segments): Update.
3448 * remote.c (remote_target::get_offsets): Update.
3449 * solib-target.c (solib_target_relocate_section_addresses):
3450 Update.
3451
3452 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
3453
3454 * symfile.h (struct symfile_segment_data): Initialize fields.
3455 <~symfile_segment_data>: Add.
3456 (symfile_segment_data_up): New.
3457 (struct sym_fns) <sym_segments>: Return a
3458 symfile_segment_data_up.
3459 (default_symfile_segments): Return a symfile_segment_data_up.
3460 (free_symfile_segment_data): Remove.
3461 (get_symfile_segment_data): Return a symfile_segment_data_up.
3462 * symfile.c (default_symfile_segments): Likewise.
3463 (get_symfile_segment_data): Likewise.
3464 (free_symfile_segment_data): Remove.
3465 (symfile_find_segment_sections): Update.
3466 * elfread.c (elf_symfile_segments): Return a
3467 symfile_segment_data_up.
3468 * remote.c (remote_target::get_offsets): Update.
3469 * solib-target.c (solib_target_relocate_section_addresses):
3470 Update.
3471 * symfile-debug.c (debug_sym_segments): Return a
3472 symfile_segment_data_up.
3473
3474 2020-05-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3475
3476 PR build/25981
3477 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64] (regmap):
3478 Hardcode register numbers.
3479
3480 PR build/25981
3481 * procfs.c [(__i386__ || __x86_64__) && sun] (proc_get_LDT_entry,
3482 procfs_find_LDT_entry): Remove.
3483 * procfs.h [(__i386__ || __x86_64__) && sun] (struct ssd,
3484 procfs_find_LDT_entry): Remove.
3485 * sol-thread.c [(__i386__ || __x86_64__) && sun] (ps_lgetLDT):
3486 Remove.
3487
3488 2020-05-17 Pedro Alves <palves@redhat.com>
3489 Andrew Burgess <andrew.burgess@embecosm.com>
3490 Keno Fischer <keno@juliacomputing.com>
3491
3492 PR gdb/25741
3493 * breakpoint.c (build_target_condition_list): Update comments.
3494 (build_target_command_list): Update comments and skip matching
3495 locations.
3496 (insert_bp_location): Move "set breakpoint auto-hw on" handling to
3497 a separate function. Simplify "set breakpoint auto-hw off"
3498 handling.
3499 (insert_breakpoints): Update comment.
3500 (tracepoint_locations_match): New parameter. For breakpoints,
3501 compare location types too, if the caller wants to.
3502 (handle_automatic_hardware_breakpoints): New functions.
3503 (bp_location_is_less_than): Also sort by location type and
3504 hardware breakpoint length.
3505 (update_global_location_list): Handle "set breakpoint auto-hw on"
3506 here.
3507 (update_breakpoint_locations): Ask breakpoint_locations_match to
3508 ignore location types.
3509
3510 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
3511
3512 * gdbtypes.h (TYPE_NAME): Remove. Change all cal sites to use
3513 type::name instead.
3514
3515 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
3516
3517 * gdbtypes.h (struct type) <name, set_name>: New methods.
3518 (TYPE_CODE): Use type::name. Change all call sites used to set
3519 the name to use type::set_name instead.
3520
3521 2020-05-16 Tom Tromey <tom@tromey.com>
3522
3523 * top.c (quit_force): Update.
3524 * infrun.c (handle_no_resumed): Update.
3525 * top.h (all_uis): New function.
3526 (ALL_UIS): Remove.
3527
3528 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
3529
3530 * mips-linux-tdep.c (mips_linux_in_dynsym_stub): Fix condition.
3531
3532 2020-05-16 Pedro Alves <palves@redhat.com>
3533
3534 * ia64-linux-nat.c
3535 (ia64_linux_nat_target) <enable_watchpoints_in_psr(ptid_t)>:
3536 Declare method.
3537 (enable_watchpoints_in_psr): Now a method of ia64_linux_nat_target.
3538
3539 2020-05-15 Simon Marchi <simon.marchi@efficios.com>
3540
3541 * sparc64-tdep.c (adi_stat_t): Remove typedef (leaving struct).
3542 (sparc64_adi_info): Likewise.
3543
3544 2020-05-15 Tom Tromey <tom@tromey.com>
3545
3546 * symtab.c (lookup_language_this, lookup_symbol_aux): Use
3547 block_objfile.
3548 (lookup_objfile_from_block): Remove.
3549 (lookup_symbol_in_block, lookup_symbol_in_static_block)
3550 (lookup_global_symbol): Use block_objfile.
3551 * symtab.h (lookup_objfile_from_block): Don't declare.
3552 * printcmd.c (clear_dangling_display_expressions): Use
3553 block_objfile.
3554 * parse.c (operator_check_standard): Use block_objfile.
3555
3556 2020-05-15 Tom Tromey <tom@tromey.com>
3557
3558 * language.c (language_alloc_type_symbol): Set
3559 SYMBOL_SECTION.
3560 * symtab.c (initialize_objfile_symbol): Remove.
3561 (allocate_symbol): Remove.
3562 (allocate_template_symbol): Remove.
3563 * dwarf2/read.c (fixup_go_packaging): Use "new".
3564 (new_symbol): Use "new".
3565 (read_variable): Don't call initialize_objfile_symbol. Use
3566 "new".
3567 (read_func_scope): Use "new".
3568 * xcoffread.c (process_xcoff_symbol): Don't call
3569 initialize_objfile_symbol.
3570 (SYMBOL_DUP): Remove.
3571 * coffread.c (process_coff_symbol, coff_read_enum_type): Use
3572 "new".
3573 * symtab.h (allocate_symbol, initialize_objfile_symbol)
3574 (allocate_template_symbol): Don't declare.
3575 (struct symbol): Add copy constructor. Change defaults.
3576 * jit.c (finalize_symtab): Use "new".
3577 * ctfread.c (ctf_add_enum_member_cb, new_symbol, ctf_add_var_cb):
3578 Use "new".
3579 * stabsread.c (patch_block_stabs, define_symbol, read_enum_type)
3580 (common_block_end): Use "new".
3581 * mdebugread.c (parse_symbol): Use "new".
3582 (new_symbol): Likewise.
3583
3584 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3585
3586 * NEWS: Mention changes to help and apropos.
3587
3588 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3589
3590 * command.h (enum command_class): Improve comments, document
3591 that class_alias is for user-defined aliases, give the class
3592 name for each class, remove unused class_xdb.
3593 * cli/cli-decode.c (add_com_alias): Document THECLASS intended usage.
3594 * breakpoint.c (_initialize_breakpoint): Replace class_alias
3595 by a precise class.
3596 * infcmd.c (_initialize_infcmd): Likewise.
3597 * reverse.c (_initialize_reverse): Likewise.
3598 * stack.c (_initialize_stack): Likewise.
3599 * symfile.c (_initialize_symfile): Likewise.
3600 * tracepoint.c (_initialize_tracepoint): Likewise.
3601
3602 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3603
3604 * cli/cli-decode.c (apropos_cmd): Produce output for aliases
3605 when their aliased command is traversed.
3606 (help_cmd): Add fput_command_names_styled call to
3607 output command name and aliases when command has an alias.
3608
3609 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3610
3611 * cli/cli-decode.h (help_cmd_list): Remove declaration.
3612 * cli/cli-decode.c (help_cmd_list): Declare as static,
3613 remove prefix argument, use bool for recurse arg, rework to show the aliases of
3614 a command together with the command.
3615 (fput_command_name_styled, fput_command_names_styled): New functions.
3616 (print_help_for_command): Remove prefix arg, use bool for recurse arg, use
3617 fput_command_name_styled.
3618 (help_list, help_all): Update callers to remove prefix arg and use bool recurse.
3619 * cli/cli-cmds.c (_initialize_cli_cmds): Update alias_command doc.
3620
3621 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3622
3623 * cli/cli-setshow.h (cmd_show_list): Remove prefix argument.
3624 * cli/cli-decode.c (do_show_prefix_cmd): Likewise.
3625 * command.h (cmd_show_list): Likewise.
3626 * dwarf2/index-cache.c (show_index_cache_command): Likewise.
3627 * cli/cli-setshow.c (cmd_show_list): Use the prefix to produce the output. Skip aliases.
3628
3629 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3630
3631 * unittests/command-def-selftests.c (traverse_command_structure):
3632 Verify all commands of a list have the same prefix command and
3633 that only the top cmdlist commands have a null prefix.
3634
3635 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3636
3637 * cli/cli-decode.c (lookup_cmd_for_prefix): Return the aliased command
3638 as prefix, not one of its aliases.
3639 (set_cmd_prefix): Remove.
3640 (do_add_cmd): Centralize the setting of the prefix of a command, when
3641 command is defined after its full chain of prefix commands.
3642 (add_alias_cmd): Remove call to set_cmd_prefix, as do_add_cmd does it.
3643 (add_setshow_cmd_full): Likewise.
3644 (update_prefix_field_of_prefixed_commands): New function.
3645 (add_prefix_cmd): Replace non working call to set_cmd_prefix by
3646 update_prefix_field_of_prefixed_commands.
3647 * gdb/remote-fileio.c (initialize_remote_fileio): Use the real
3648 addresses of remote_set_cmdlist and remote_show_cmdlist given
3649 as argument, not the address of an argument.
3650 * gdb/remote-fileio.h (initialize_remote_fileio): Likewise.
3651 * gdb/remote.c (_initialize_remote): Likewise.
3652
3653 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3654
3655 * cli/cli-cmds.c (alias_command): Check for an existing alias
3656 using lookup_cmd_composition, as valid_command_p is too strict
3657 and forbids aliases that are the prefix of an existing alias
3658 or command.
3659 * cli/cli-decode.c (lookup_cmd_composition): Ensure a prefix
3660 command is properly recognised as a valid command.
3661
3662 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3663
3664 * unittests/help-doc-selftests.c: Rename to
3665 unittests/command-def-selftests.c
3666 * unittests/command-def-selftests.c (help_doc_tests): Update some
3667 comments.
3668 (command_structure_tests, traverse_command_structure): New namespace
3669 and function.
3670 (command_structure_invariants_tests): New function.
3671 (_initialize_command_def_selftests) Renamed from
3672 _initialize_help_doc_selftests, register command_structure_invariants
3673 selftest.
3674
3675 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3676
3677 * cli/cli-cmds.c (_initialize_cli_cmds): Define 'info set' as
3678 an alias of 'show'.
3679
3680 2020-05-15 Joel Brobecker <brobecker@adacore.com>
3681
3682 * ada-lang.h: (ada_is_gnat_encoded_fixed_point_type): Renames
3683 ada_is_fixed_point_type. Update all callers.
3684 (gnat_encoded_fixed_point_delta): Renames ada_delta. Update
3685 all callers.
3686 * ada-lang.c (gnat_encoded_fixed_type_info): Renames fixed_type_info.
3687 Update all callers.
3688 * ada-typeprint.c (print_gnat_encoded_fixed_point_type): Renames
3689 print_fixed_point_type. Update all callers.
3690 * ada-valprint.c (ada_value_print_num): Replace call to
3691 ada_is_fixed_point_type by ada_is_gnat_encoded_fixed_point_type.
3692
3693 2020-05-14 Kevin Buettner <kevinb@redhat.com>
3694
3695 * nat/linux-btrace.c (btrace_this_cpu): Add check for AMD
3696 processors.
3697 (cpu_supports_bts): Add CV_AMD case.
3698
3699 2020-05-14 Laurent Morichetti <Laurent.Morichetti@amd.com>
3700 Simon Marchi <simon.marchi@efficios.com>
3701
3702 * infrun.c (stop_all_threads): Collect multiple wait events at
3703 each pass.
3704
3705 2020-05-14 Simon Marchi <simon.marchi@efficios.com>
3706
3707 * gdbtypes.h (TYPE_CODE): Remove. Change all call sites to use
3708 type::code instead.
3709
3710 2020-05-14 Simon Marchi <simon.marchi@efficios.com>
3711
3712 * gdbtypes.h (struct type) <code, set_code>: New methods.
3713 (TYPE_CODE): Use type::code. Change all call sites used to set
3714 the code to use type::set_code instead.
3715
3716 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3717 Tom de Vries <tdevries@suse.de>
3718 Pedro Alves <palves@redhat.com>
3719
3720 PR threads/25478
3721 * infrun.c (stop_all_threads): Do NOT ignore
3722 TARGET_WAITKIND_NO_RESUMED, TARGET_WAITKIND_THREAD_EXITED,
3723 TARGET_WAITKIND_EXITED, TARGET_WAITKIND_SIGNALLED wait statuses
3724 received.
3725 (handle_no_resumed): Remove code handling a live inferior with no
3726 threads.
3727 * remote.c (has_single_non_exited_thread): New.
3728 (remote_target::update_thread_list): Do not delete a thread if is
3729 the last thread of the process.
3730 * thread.c (thread_select): Call delete_exited_threads instead of
3731 prune_threads.
3732
3733 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3734
3735 * infrun.c (stop_all_threads): Enable/disable thread events of all
3736 targets. Move a debug message denoting the end of the function
3737 into the SCOPED_EXIT block.
3738
3739 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3740
3741 * process-stratum-target.h: Include <set>.
3742 (all_non_exited_process_targets, switch_to_target_no_thread): New
3743 function declarations.
3744 * process-stratum-target.c (all_non_exited_process_targets)
3745 (switch_to_target_no_thread): New function implementations.
3746
3747 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3748
3749 * infrun.c (handle_inferior_event): Extract out a piece of code
3750 into...
3751 (mark_non_executing_threads): ...this new function.
3752
3753 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3754
3755 * infrun.c (resume_1): Move a 'regcache_read_pc' call down to first
3756 use.
3757
3758 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3759
3760 * regcache.c (regcache_read_pc_protected): New function
3761 implementation that returns 0 if the PC cannot read via
3762 'regcache_read_pc'.
3763 * infrun.c (proceed): Call 'regcache_read_pc_protected'
3764 instead of 'regcache_read_pc'.
3765 (keep_going_pass_signal): Ditto.
3766
3767 2020-05-13 Tom Tromey <tromey@adacore.com>
3768
3769 * ada-lang.c (align_value): Remove.
3770 (ada_template_to_fixed_record_type_1): Use align_up.
3771
3772 2020-05-13 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3773
3774 * async-event.c: Update the copyright year.
3775 * async-event.h: Update the copyright year.
3776
3777 2020-05-12 Simon Marchi <simon.marchi@efficios.com>
3778
3779 * objfiles.h (is_addr_in_objfile,
3780 shared_objfile_contains_address_p): Return bool.
3781 * objfile.c (is_addr_in_objfile,
3782 shared_objfile_contains_address_p): Return bool.
3783
3784 2020-05-11 Tom Tromey <tromey@adacore.com>
3785
3786 * cli/cli-cmds.c (info_command): Restore.
3787 (_initialize_cli_cmds): Use add_prefix_command for "info".
3788 * gdb-gdb.gdb.in: Restore breakpoint on info_command.
3789
3790 2020-05-11 Tom Tromey <tromey@adacore.com>
3791
3792 * ada-lang.c (ada_value_primitive_field): Now public.
3793 * ada-lang.h (ada_value_primitive_field): Declare.
3794 * ada-valprint.c (print_field_values): Use
3795 ada_value_primitive_field for wrapper fields.
3796
3797 2020-05-11 Tom de Vries <tdevries@suse.de>
3798
3799 * dwarf2/index-write.c (debug_names::psymbol_tag): Handle
3800 MODULE_DOMAIN.
3801
3802 2020-05-11 Tom de Vries <tdevries@suse.de>
3803
3804 PR symtab/25941
3805 * dwarf2/read.c (create_cus_from_debug_names_list): Initialize CUs
3806 with length 0, if not gdb-produced.
3807 (cutu_reader::cutu_reader): Set CU length to actual length if 0.
3808
3809 2020-05-09 Tom de Vries <tdevries@suse.de>
3810
3811 PR gdb/25955
3812 * break-catch-throw.c (check_status_exception_catchpoint): Fix name
3813 calculation.
3814
3815 2020-05-09 Tom Tromey <tom@tromey.com>
3816
3817 * top.c (server_command): Now bool.
3818 * top.h (server_command): Now bool.
3819
3820 2020-05-08 Tom Tromey <tromey@adacore.com>
3821
3822 * dwarf2/read.c (read_lexical_block_scope): Don't process a DIE
3823 already being processed.
3824
3825 2020-05-08 Tom Tromey <tom@tromey.com>
3826
3827 * printcmd.c (struct display) <next>: Remove.
3828 <display>: New constructor.
3829 <exp_string>: Now a std::string.
3830 <enabled_p>: Now a bool.
3831 (display_number): Move definition earlier.
3832 (displays): Rename from display_chain. Now a std::vector.
3833 (ALL_DISPLAYS, ALL_DISPLAYS_SAFE): Remove.
3834 (display_command): Update.
3835 (do_one_display, disable_display)
3836 (enable_disable_display_command, do_enable_disable_display):
3837 Update.
3838 (free_display): Remove.
3839 (clear_displays): Rewrite.
3840 (delete_display): Update.
3841 (map_display_numbers): Use function_view. Remove "data"
3842 parameter. Update.
3843 (do_delete_display): Remove.
3844 (undisplay_command): Update.
3845 (do_one_display, do_displays, disable_display)
3846 (info_display_command): Update.
3847 (do_enable_disable_display): Remove.
3848 (enable_disable_display_command)
3849 (clear_dangling_display_expressions): Update.
3850
3851 2020-05-08 Tom Tromey <tom@tromey.com>
3852
3853 * symtab.c (set_symbol_cache_size)
3854 (maintenance_print_symbol_cache, maintenance_flush_symbol_cache)
3855 (maintenance_print_symbol_cache_statistics): Update.
3856 * symmisc.c (print_symbol_bcache_statistics)
3857 (print_objfile_statistics, maintenance_print_objfiles)
3858 (maintenance_info_symtabs, maintenance_check_symtabs)
3859 (maintenance_expand_symtabs, maintenance_info_line_tables):
3860 Update.
3861 * symfile-debug.c (set_debug_symfile): Update.
3862 * source.c (forget_cached_source_info): Update.
3863 * python/python.c (gdbpy_progspaces): Update.
3864 * psymtab.c (maintenance_info_psymtabs): Update.
3865 * probe.c (parse_probes): Update.
3866 * linespec.c (iterate_over_all_matching_symtabs)
3867 (collect_symtabs_from_filename, search_minsyms_for_name): Update.
3868 * guile/scm-progspace.c (gdbscm_progspaces): Update.
3869 * exec.c (exec_target::close): Update.
3870 * ada-tasks.c (ada_tasks_new_objfile_observer): Update.
3871 * breakpoint.c (print_one_breakpoint_location)
3872 (create_longjmp_master_breakpoint)
3873 (create_std_terminate_master_breakpoint): Update.
3874 * progspace.c (program_spaces): Now a std::vector.
3875 (maybe_new_address_space): Update.
3876 (add_program_space): Remove.
3877 (program_space::program_space): Update.
3878 (remove_program_space): Update.
3879 (number_of_program_spaces): Remove.
3880 (print_program_space, update_address_spaces): Update.
3881 * progspace.h (program_spaces): Change type.
3882 (ALL_PSPACES): Remove.
3883 (number_of_program_spaces): Don't declare.
3884 (struct program_space) <next>: Remove.
3885
3886 2020-05-08 Tom Tromey <tom@tromey.com>
3887
3888 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Update.
3889 * solib-svr4.c (svr4_fetch_objfile_link_map): Update.
3890 (enable_break): Update.
3891 * solib-frv.c (frv_fdpic_find_global_pointer): Update.
3892 (frv_fdpic_find_canonical_descriptor): Update.
3893 (frv_fetch_objfile_link_map): Update.
3894 * progspace.c (program_space::free_all_objfiles): Update.
3895 (program_space::solibs): New method.
3896 * progspace.h (struct program_space) <solibs>: New method.
3897 * solist.h (master_so_list): Don't declare.
3898 (ALL_SO_LIBS): Remove.
3899 * solib.h (so_list_head): Remove.
3900 (update_solib_list): Update comment.
3901 * solib.c (master_so_list): Remove.
3902 (solib_used, update_solib_list, solib_add)
3903 (info_sharedlibrary_command, clear_solib)
3904 (reload_shared_libraries_1, remove_user_added_objfile): Update.
3905
3906 2020-05-08 Tom Tromey <tom@tromey.com>
3907
3908 * extension.c (extension_languages): Now a std::array.
3909 (ALL_EXTENSION_LANGUAGES): Remove.
3910 (get_ext_lang_defn, get_ext_lang_of_file)
3911 (eval_ext_lang_from_control_command): Update.
3912 (finish_ext_lang_initialization)
3913 (auto_load_ext_lang_scripts_for_objfile)
3914 (ext_lang_type_printers::ext_lang_type_printers)
3915 (apply_ext_lang_type_printers)
3916 (ext_lang_type_printers::~ext_lang_type_printers)
3917 (apply_ext_lang_val_pretty_printer, apply_ext_lang_frame_filter)
3918 (preserve_ext_lang_values, get_breakpoint_cond_ext_lang)
3919 (breakpoint_ext_lang_cond_says_stop, check_quit_flag)
3920 (get_matching_xmethod_workers, ext_lang_colorize)
3921 (ext_lang_before_prompt): Update.
3922 (ALL_ENABLED_EXTENSION_LANGUAGES): Remove.
3923
3924 2020-05-08 Tom Tromey <tom@tromey.com>
3925
3926 * symtab.h (class demangle_result_storage) <set_malloc_ptr>: New
3927 overload.
3928 <swap_string, m_string>: Remove.
3929 * symtab.c (demangle_for_lookup, completion_list_add_symbol):
3930 Update.
3931 * stabsread.c (define_symbol, read_type): Update.
3932 * linespec.c (find_linespec_symbols): Update.
3933 * gnu-v3-abi.c (gnuv3_get_typeid): Update.
3934 * dwarf2/read.c (dwarf2_canonicalize_name): Update.
3935 * dbxread.c (read_dbx_symtab): Update.
3936 * cp-support.h (cp_canonicalize_string_full)
3937 (cp_canonicalize_string, cp_canonicalize_string_no_typedefs):
3938 Return unique_xmalloc_ptr.
3939 * cp-support.c (inspect_type): Update.
3940 (cp_canonicalize_string_full): Return unique_xmalloc_ptr.
3941 (cp_canonicalize_string_no_typedefs, cp_canonicalize_string):
3942 Likewise.
3943 * c-typeprint.c (print_name_maybe_canonical): Update.
3944 * break-catch-throw.c (check_status_exception_catchpoint):
3945 Update.
3946
3947 2020-05-08 Tom de Vries <tdevries@suse.de>
3948
3949 * infrun.c (follow_fork): Copy current_line and current_symtab to
3950 child thread.
3951
3952 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
3953
3954 * async-event.c (struct async_signal_handler, struct
3955 async_event_handler): Reformat, remove typedef.
3956
3957 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
3958
3959 * gdbtypes.h (TYPE_DYN_PROP_LIST): Remove. Update all users
3960 access thistype->main_type->dyn_prop_list directly.
3961
3962 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
3963
3964 * gdbtypes.h (struct type) <remove_dyn_prop>: New method.
3965 (remove_dyn_prop): Remove. Update all users to use
3966 type::remove_dyn_prop.
3967 * gdbtypes.c (remove_dyn_prop): Rename to...
3968 (type::remove_dyn_prop): ... this.
3969
3970 2020-05-07 Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
3971
3972 * gdbtypes.h (struct type) <add_dyn_prop>: New method.
3973 (add_dyn_prop): Remove. Update all users to use
3974 type::add_dyn_prop.
3975 * gdbtypes.c (add_dyn_prop): Rename to...
3976 (type::add_dyn_prop): ... this.
3977
3978 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
3979
3980 * gdbtypes.h (struct type) <get_dyn_prop>: New method.
3981 (get_dyn_prop): Remove. Update all users to use
3982 type::dyn_prop.
3983 * gdbtypes.c (get_dyn_prop): Rename to...
3984 (type::dyn_prop): ... this.
3985
3986 2020-05-06 Simon Marchi <simon.marchi@efficios.com>
3987
3988 * gdbtypes.h (struct main_type) <flag_static>: Remove.
3989
3990 2020-05-06 Simon Marchi <simon.marchi@efficios.com>
3991
3992 * amd64-tdep.c (amd64_analyze_prologue): Check for `endbr64`
3993 instruction, skip it if it's there.
3994
3995 2020-05-05 Simon Marchi <simon.marchi@efficios.com>
3996
3997 * gdbtypes.h (struct main_type) <flag_incomplete>: Remove.
3998
3999 2020-05-04 Simon Marchi <simon.marchi@efficios.com>
4000
4001 * gdbtypes.h (TYPE_INCOMPLETE): Remove.
4002 * gdbtypes.c (recursive_dump_type): Remove use of
4003 TYPE_INCOMPLETE.
4004
4005 2020-05-03 Tom Tromey <tom@tromey.com>
4006
4007 * breakpoint.c (catch_command, tcatch_command): Remove.
4008 (_initialize_breakpoint): Use add_basic_prefix_cmd,
4009 add_show_prefix_cmd.
4010 (set_breakpoint_cmd, show_breakpoint_cmd): Remove
4011 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
4012 Remove.
4013 (add_internal_problem_command): Use add_basic_prefix_cmd,
4014 add_show_prefix_cmd.
4015 * mips-tdep.c (set_mipsfpu_command): Remove.
4016 (_initialize_mips_tdep): Use add_basic_prefix_cmd.
4017 * dwarf2/index-cache.c (set_index_cache_command): Remove.
4018 (_initialize_index_cache): Use add_basic_prefix_cmd.
4019 * memattr.c (dummy_cmd): Remove.
4020 (_initialize_mem): Use add_basic_prefix_cmd, add_show_prefix_cmd.
4021 * tui/tui-win.c (set_tui_cmd, show_tui_cmd): Remove.
4022 (_initialize_tui_win): Use add_basic_prefix_cmd,
4023 add_show_prefix_cmd.
4024 * cli/cli-logging.c (set_logging_command): Remove.
4025 (_initialize_cli_logging): Use add_basic_prefix_cmd,
4026 add_show_prefix_cmd.
4027 (show_logging_command): Remove.
4028 * target.c (target_command): Remove.
4029 (add_target): Use add_basic_prefix_cmd.
4030
4031 2020-05-02 Hannes Domani <ssbssa@yahoo.de>
4032
4033 * gdbtypes.h (enum dynamic_prop_node_kind): Fix typo.
4034
4035 2020-05-01 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4036
4037 * gdb-gdb.gdb-in: Remove breakpoint on disappeared function
4038 info_command.
4039
4040 2020-04-30 Kamil Rytarowski <n54@gmx.com>
4041
4042 * nbsd-nat.c (nbsd_enable_proc_events)
4043 (nbsd_nat_target::post_startup_inferior): Add.
4044 (nbsd_nat_target::post_attach): Call `nbsd_enable_proc_events'.
4045 (nbsd_nat_target::update_thread_list): Rewrite.
4046 (nbsd_nat_target::wait): Handle "PTRACE_LWP_EXIT" and
4047 "PTRACE_LWP_CREATE".
4048 * nbsd-nat.h (nbsd_nat_target::post_startup_inferior): Add.
4049
4050 2020-04-30 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4051
4052 * stack.c (_initialize_stack): Remove duplicated creation
4053 of "frame" command and "f" alias.
4054
4055 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
4056
4057 PR gdb/18706
4058 * gdbtypes.c (check_typedef): Calculate size of array of
4059 stubbed type.
4060
4061 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
4062
4063 PR gdb/15559
4064 * i386-tdep.c (i386_push_dummy_call): Call
4065 i386_thiscall_push_dummy_call.
4066 (i386_thiscall_push_dummy_call): New function.
4067 * i386-tdep.h (i386_thiscall_push_dummy_call): Declare.
4068 * i386-windows-tdep.c (i386_windows_push_dummy_call): New function.
4069 (i386_windows_init_abi): Call set_gdbarch_push_dummy_call.
4070
4071 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
4072
4073 * gdbarch.sh (do_read): Add shellcheck disable directive for
4074 warning SC2162.
4075
4076 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
4077
4078 * gdbarch.sh: Use ${foo:-} where shellcheck would report a
4079 "referenced but not assigned" warning.
4080
4081 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
4082
4083 * gdbarch.sh: Remove code that sets fallbackdefault.
4084
4085 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
4086
4087 * gdbarch.sh: Use shell operators && and || instead of
4088 -a and -o.
4089
4090 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
4091
4092 * gdbarch.sh: Use $(...) instead of `...`.
4093
4094 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
4095
4096 * gdbarch.sh: Use double quotes around variables.
4097
4098 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
4099
4100 * gdbarch.sh: Use %s with printf, instead of variables in the
4101 format string.
4102
4103 2020-04-29 Tom Tromey <tromey@adacore.com>
4104
4105 PR ada/25875:
4106 * dwarf2/read.c (update_enumeration_type_from_children): Compute
4107 type fields here.
4108 (read_enumeration_type): Call
4109 update_enumeration_type_from_children later. Update comments.
4110 (process_enumeration_scope): Don't create type fields.
4111
4112 2020-04-29 Kamil Rytarowski <n54@gmx.com>
4113
4114 * nbsd-tdep.c: Include "xml-syscall.h".
4115 (nbsd_init_abi): Call `set_xml_syscall_file_name'.
4116
4117 2020-04-29 Kamil Rytarowski <n54@gmx.com>
4118
4119 * nbsd-nat.c: Include "sys/wait.h".
4120 (nbsd_resume, nbsd_nat_target::resume, nbsd_wait)
4121 (nbsd_nat_target::wait, nbsd_nat_target::insert_exec_catchpoint)
4122 (nbsd_nat_target::remove_exec_catchpoint)
4123 (nbsd_nat_target::set_syscall_catchpoint): Add.
4124 * nbsd-nat.h (nbsd_nat_target::resume, nbsd_nat_target::wait)
4125 (nbsd_nat_target::insert_exec_catchpoint)
4126 (nbsd_nat_target::remove_exec_catchpoint)
4127 (nbsd_nat_target::set_syscall_catchpoint): Add.
4128 * nbsd-tdep.c (nbsd_get_syscall_number): Add.
4129 (nbsd_init_abi): Call `set_gdbarch_get_syscall_number' and pass
4130 `nbsd_get_syscall_number'.
4131
4132 2020-04-29 Tom Tromey <tom@tromey.com>
4133
4134 * stack.c (print_block_frame_labels): Remove.
4135
4136 2020-04-29 Hannes Domani <ssbssa@yahoo.de>
4137
4138 PR gdb/17320
4139 * ada-valprint.c (val_print_packed_array_elements): Move array
4140 end bracket to new line.
4141 (ada_val_print_string): Remove extra spaces before first array
4142 element.
4143 * c-valprint.c (c_value_print_array): Likewise.
4144 * m2-valprint.c (m2_print_array_contents): Likewise.
4145 (m2_value_print_inner): Likewise.
4146 * p-valprint.c (pascal_value_print_inner): Likewise.
4147 * valprint.c (generic_val_print_array): Likewise.
4148 (value_print_array_elements): Move first array element and array
4149 end bracket to new line.
4150
4151 2020-04-29 Tom de Vries <tdevries@suse.de>
4152
4153 PR symtab/25889
4154 * linespec.c (find_method): Fix ix calculation.
4155
4156 2020-04-28 Kamil Rytarowski <n54@gmx.com>
4157
4158 * syscalls/update-netbsd.sh: New file.
4159 * syscalls/netbsd.xml: Regenerate.
4160 * data-directory/Makefile.in: Register `netbsd.xml' in
4161 `SYSCALLS_FILES'.
4162
4163 2020-04-28 Simon Marchi <simon.marchi@efficios.com>
4164
4165 * syscalls/update-freebsd.sh: Add double quotes.
4166
4167 2020-04-28 Tom Tromey <tom@tromey.com>
4168
4169 * NEWS: Update.
4170 * python/py-cmd.c (gdbpy_initialize_commands): Add COMMAND_TUI.
4171 (cmdpy_init): Allow class_tui.
4172
4173 2020-04-28 Mark Williams <mark@myosotissp.com>
4174
4175 PR gdb/24480
4176 * dwarf2read.c: Add missing assingments to list_in_scope when
4177 start_symtab was already called.
4178
4179 2020-04-28 Simon Marchi <simon.marchi@efficios.com>
4180
4181 PR gdb/25881
4182 * dwarf2/read.c (offset_map_type): Use
4183 gdb:hash_enum<sect_offset> as hash function.
4184
4185 2020-04-28 Tom de Vries <tdevries@suse.de>
4186
4187 * dwarf2/read.c (process_structure_scope): Add symbol for struct decl
4188 with DW_AT_signature.
4189
4190 2020-04-27 Simon Marchi <simon.marchi@efficios.com>
4191
4192 * configure.ac: Remove check for fs_base/gs_base in
4193 user_regs_struct.
4194 * configure: Re-generate.
4195 * config.in: Re-generate.
4196 * amd64-nat.c (amd64_native_gregset_reg_offset): Adjust.
4197 * amd64-linux-nat.c (amd64_linux_nat_target::fetch_registers,
4198 amd64_linux_nat_target::store_registers, ps_get_thread_area, ): Adjust.
4199
4200 2020-04-27 Luis Machado <luis.machado@linaro.org>
4201
4202 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Handle
4203 problematic inline frame unwinding situation.
4204 * frame.c (frame_id_computed_p): New function.
4205 * frame.h (frame_id_computed_p): New prototype.
4206
4207 2020-04-26 Tom Tromey <tom@tromey.com>
4208
4209 * command.h (enum command_class) <class_pseudo>: Remove.
4210
4211 2020-04-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4212
4213 * cli/cli-decode.c (lookup_cmd_composition): Fix comments
4214 and whitespace.
4215
4216 2020-04-25 Kamil Rytarowski <n54@gmx.com>
4217
4218 * inf-ptrace.c (inf_ptrace_target::wait): Remove
4219 `PT_GET_PROCESS_STATE' block.
4220
4221 2020-04-24 Tom Tromey <tom@tromey.com>
4222
4223 * symtab.h (symbol_get_demangled_name): Don't declare.
4224 * symtab.c (symbol_get_demangled_name): Remove.
4225 (general_symbol_info::natural_name)
4226 (general_symbol_info::demangled_name): Update.
4227
4228 2020-04-24 Tom Tromey <tom@tromey.com>
4229
4230 PR rust/25025:
4231 * dwarf2/read.c (dwarf2_physname): Do not demangle for Rust.
4232
4233 2020-04-24 Tom Tromey <tom@tromey.com>
4234
4235 PR symtab/12707:
4236 * dwarf2/read.c (add_partial_symbol): Use the linkage name if it
4237 exists.
4238 (new_symbol): Likewise.
4239 * compile/compile-object-load.c (get_out_value_type): Use
4240 symbol_matches_search_name.
4241
4242 2020-04-24 Tom Tromey <tom@tromey.com>
4243
4244 * dwarf2/read.c (add_partial_symbol): Do not call
4245 compute_and_set_names.
4246
4247 2020-04-24 Tom Tromey <tom@tromey.com>
4248
4249 * dwarf2/read.c (add_partial_symbol): Use new add_psymbol_to_list
4250 overload.
4251
4252 2020-04-24 Tom Tromey <tom@tromey.com>
4253
4254 * psymtab.c (add_psymbol_to_bcache): Simplify calling convention.
4255 (add_psymbol_to_list): New overload. Make old overload call new
4256 one.
4257 * psympriv.h (add_psymbol_to_list): New overload.
4258
4259 2020-04-24 Tom Tromey <tom@tromey.com>
4260
4261 * dwarf2/read.c (partial_die_info::read) <case
4262 DW_AT_linkage_name>: Use value_as_string.
4263 (dwarf2_string_attr): Use value_as_string.
4264 * dwarf2/attribute.h (struct attribute) <value_as_string>: Declare
4265 method.
4266 * dwarf2/attribute.c (attribute::value_as_string): New method.
4267
4268 2020-04-24 Tom Tromey <tom@tromey.com>
4269
4270 * symtab.c (general_symbol_info::natural_name)
4271 (general_symbol_info::demangled_name): Check for language_rust.
4272
4273 2020-04-24 Tom Tromey <tom@tromey.com>
4274
4275 * dwarf2/read.c (dw2_linkage_name): Move Rust "{" hack here...
4276 (dwarf2_physname): ... from here.
4277 (partial_die_info::read): Add Rust "{" hack.
4278
4279 2020-04-24 Tom Tromey <tom@tromey.com>
4280
4281 * symtab.h (struct general_symbol_info) <set_demangled_name>: New
4282 method.
4283 (symbol_set_demangled_name): Don't declare.
4284 * symtab.c (general_symbol_info::set_demangled_name): Rename from
4285 symbol_set_demangled_name.
4286 (general_symbol_info::set_language)
4287 (general_symbol_info::compute_and_set_names): Update.
4288 * minsyms.c (minimal_symbol_reader::install): Update.
4289 * dwarf2/read.c (new_symbol): Update.
4290
4291 2020-04-24 Tom Tromey <tromey@adacore.com>
4292
4293 PR python/23662:
4294 * python/py-type.c (convert_field): Handle
4295 FIELD_LOC_KIND_DWARF_BLOCK.
4296 (typy_get_sizeof): Handle TYPE_HAS_DYNAMIC_LENGTH.
4297 (typy_get_dynamic): Nw function.
4298 (type_object_getset): Add "dynamic".
4299 * NEWS: Add entry.
4300
4301 2020-04-24 Tom Tromey <tromey@adacore.com>
4302
4303 * ada-typeprint.c (print_choices, print_variant_part)
4304 (print_record_field_types_dynamic): New functions.
4305 (print_record_field_types): Use print_record_field_types_dynamic.
4306
4307 2020-04-24 Tom Tromey <tromey@adacore.com>
4308
4309 * dwarf2/read.c (handle_data_member_location): New overload.
4310 (dwarf2_add_field): Use it.
4311 (decode_locdesc): Add "computed" parameter. Update comment.
4312 * gdbtypes.c (is_dynamic_type_internal): Also look for
4313 FIELD_LOC_KIND_DWARF_BLOCK.
4314 (resolve_dynamic_struct): Handle FIELD_LOC_KIND_DWARF_BLOCK.
4315 * gdbtypes.c (is_dynamic_type_internal): Add special case for C++
4316 virtual base classes.
4317 * gnu-v3-abi.c (gnuv3_baseclass_offset): Handle
4318 FIELD_LOC_KIND_DWARF_BLOCK.
4319
4320 2020-04-24 Tom Tromey <tromey@adacore.com>
4321
4322 * dwarf2/read.c (read_structure_type): Handle dynamic length.
4323 * gdbtypes.c (is_dynamic_type_internal): Check
4324 TYPE_HAS_DYNAMIC_LENGTH.
4325 (resolve_dynamic_type_internal): Use TYPE_DYNAMIC_LENGTH.
4326 * gdbtypes.h (TYPE_HAS_DYNAMIC_LENGTH, TYPE_DYNAMIC_LENGTH):
4327 New macros.
4328 (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_SIZE>: New
4329 constant.
4330
4331 2020-04-24 Tom Tromey <tromey@adacore.com>
4332
4333 * dwarf2/read.c (struct variant_field): Rewrite.
4334 (struct variant_part_builder): New.
4335 (struct nextfield): Remove "variant" field. Add "offset".
4336 (struct field_info): Add "current_variant_part" and
4337 "variant_parts".
4338 (alloc_discriminant_info): Remove.
4339 (alloc_rust_variant): New function.
4340 (quirk_rust_enum): Update.
4341 (dwarf2_add_field): Set "offset" member. Don't handle
4342 DW_TAG_variant_part.
4343 (offset_map_type): New typedef.
4344 (convert_variant_range, create_one_variant)
4345 (create_one_variant_part, create_variant_parts)
4346 (add_variant_property): New functions.
4347 (dwarf2_attach_fields_to_type): Call add_variant_property.
4348 (read_structure_type): Don't handle DW_TAG_variant_part.
4349 (handle_variant_part, handle_variant): New functions.
4350 (handle_struct_member_die): Use them.
4351 (process_structure_scope): Don't handle variant parts.
4352 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): Remove.
4353 (struct discriminant_info): Remove.
4354 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: Remove.
4355 (struct main_type) <flag_discriminated_union>: Remove.
4356 * rust-lang.c (rust_enum_p, rust_empty_enum_p): Rewrite.
4357 (rust_enum_variant): Return int. Remove "contents". Rewrite.
4358 (rust_print_enum, rust_print_struct_def, rust_evaluate_subexp):
4359 Update.
4360 * valops.c (value_union_variant): Remove.
4361 * value.h (value_union_variant): Don't declare.
4362
4363 2020-04-24 Tom Tromey <tromey@adacore.com>
4364
4365 * ada-lang.c (ada_discrete_type_high_bound, ada_discrete_type_low)
4366 (ada_value_primitive_packed_val): Update.
4367 * ada-valprint.c (ada_value_print_1): Update.
4368 * dwarf2/loc.c (evaluate_for_locexpr_baton): New struct.
4369 (dwarf2_locexpr_baton_eval): Take a property_addr_info rather than
4370 just an address. Use evaluate_for_locexpr_baton.
4371 (dwarf2_evaluate_property): Update.
4372 * dwarf2/loc.h (struct property_addr_info) <valaddr>: Now an
4373 array_view.
4374 * findvar.c (default_read_var_value): Update.
4375 * gdbtypes.c (compute_variant_fields_inner)
4376 (resolve_dynamic_type_internal): Update.
4377 (resolve_dynamic_type): Change type of valaddr parameter.
4378 * gdbtypes.h (resolve_dynamic_type): Update.
4379 * valarith.c (value_subscripted_rvalue): Update.
4380 * value.c (value_from_contents_and_address): Update.
4381
4382 2020-04-24 Tom Tromey <tromey@adacore.com>
4383
4384 * dwarf2/loc.c (dwarf2_locexpr_baton_eval): Add
4385 "push_initial_value" parameter.
4386 (dwarf2_evaluate_property): Likewise.
4387 * dwarf2/loc.h (dwarf2_evaluate_property): Update.
4388
4389 2020-04-24 Tom Tromey <tromey@adacore.com>
4390
4391 * gdbtypes.c (is_dynamic_type_internal): Check for variant parts.
4392 (variant::matches, compute_variant_fields_recurse)
4393 (compute_variant_fields_inner, compute_variant_fields): New
4394 functions.
4395 (resolve_dynamic_struct): Check for DYN_PROP_VARIANT_PARTS.
4396 Use resolved_type after type is made.
4397 (operator==): Add new cases.
4398 * gdbtypes.h (TYPE_HAS_VARIANT_PARTS): New macro.
4399 (struct discriminant_range, struct variant, struct variant_part):
4400 New.
4401 (union dynamic_prop_data) <variant_parts, original_type>: New
4402 members.
4403 (enum dynamic_prop_node_kind) <DYN_PROP_VARIANT_PARTS>: New constant.
4404 (enum dynamic_prop_kind) <PROP_TYPE, PROP_VARIANT_PARTS>: New
4405 constants.
4406 * value.c (unpack_bits_as_long): Now public.
4407 * value.h (unpack_bits_as_long): Declare.
4408
4409 2020-04-24 Tom Tromey <tromey@adacore.com>
4410
4411 * rs6000-tdep.c (struct ppc_variant): Rename from "variant".
4412 (variants, find_variant_by_arch, rs6000_gdbarch_init): Update.
4413
4414 2020-04-24 Hannes Domani <ssbssa@yahoo.de>
4415
4416 * windows-tdep.c (exception_values): Add WOW64 exception numbers.
4417
4418 2020-04-24 Kamil Rytarowski <n54@gmx.com>
4419
4420 * inf-ptrace.h (follow_fork, insert_fork_catchpoint)
4421 (remove_fork_catchpoint, post_startup_inferior)
4422 (post_attach): Move...
4423 * obsd-nat.h (follow_fork, insert_fork_catchpoint)
4424 (remove_fork_catchpoint, post_startup_inferior)
4425 (post_attach): ...here.
4426 * inf-ptrace.c (follow_fork, insert_fork_catchpoint)
4427 (remove_fork_catchpoint, post_startup_inferior)
4428 (post_attach): Move...
4429 * obsd-nat.c (follow_fork, insert_fork_catchpoint)
4430 (remove_fork_catchpoint, post_startup_inferior)
4431 (post_attach): ...here.
4432
4433 2020-04-24 Tom Tromey <tromey@adacore.com>
4434
4435 * nat/windows-nat.h (struct windows_thread_info)
4436 <pc_adjusted>: New member.
4437 * windows-nat.c (windows_fetch_one_register): Check
4438 pc_adjusted.
4439 (windows_nat_target::get_windows_debug_event)
4440 (windows_nat_target::wait): Set pc_adjusted.
4441
4442 2020-04-24 Tom de Vries <tdevries@suse.de>
4443
4444 * contrib/cc-with-tweaks.sh: Remove <exec>.gdb-index file handling.
4445 Run gdb-add-index inside temp dir.
4446
4447 2020-04-23 Tom Tromey <tromey@adacore.com>
4448
4449 * windows-tdep.c (is_linked_with_cygwin_dll): Always update "iter"
4450 in loop.
4451
4452 2020-04-23 Luis Machado <luis.machado@linaro.org>
4453
4454 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Use
4455 get_frame_register instead of gdbarch_unwind_pc.
4456
4457 2020-04-23 Tom de Vries <tdevries@suse.de>
4458
4459 * symtab.c (lookup_global_symbol): Prefer def over decl.
4460
4461 2020-04-23 Tom de Vries <tdevries@suse.de>
4462
4463 PR symtab/25807
4464 * block.c (best_symbol, better_symbol): Promote to external.
4465 * block.h (best_symbol, better_symbol): Declare.
4466 * symtab.c (lookup_symbol_in_objfile_symtabs): Prefer def over
4467 decl.
4468
4469 2020-04-23 Tom Tromey <tromey@adacore.com>
4470
4471 PR ada/25837:
4472 * dwarf2/read.c (dw2_expand_symtabs_matching_symbol): Store a
4473 "const char *", not a "const std::string &".
4474 <name_and_matcher::operator==>: Update.
4475 * unittests/lookup_name_info-selftests.c: Change type of
4476 "result".
4477
4478 2020-04-23 Tom Tromey <tom@tromey.com>
4479
4480 * inferior.h (iterate_over_inferiors): Don't declare.
4481 * inferior.c (iterate_over_inferiors): Remove.
4482 * darwin-nat.c (find_inferior_task_it, find_inferior_pid_it):
4483 Remove.
4484 (darwin_find_inferior_by_task, darwin_find_inferior_by_pid): Don't
4485 use iterate_over_inferiors.
4486 (darwin_resume_inferior_it)
4487 (struct resume_inferior_threads_param)
4488 (darwin_resume_inferior_threads_it): Remove.
4489 (darwin_nat_target::resume): Don't use iterate_over_inferiors.
4490
4491 2020-04-23 Tom de Vries <tdevries@suse.de>
4492
4493 * blockframe.c (find_pc_partial_function): Use
4494 find_pc_sect_compunit_symtab rather than
4495 objfile->sf->qf->find_pc_sect_compunit_symtab.
4496
4497 2020-04-22 Tom de Vries <tdevries@suse.de>
4498
4499 PR symtab/25764
4500 * dwarf2/read.c (scan_partial_symbols): Allow external variable decls
4501 in psymtabs.
4502
4503 2020-04-22 Tom de Vries <tdevries@suse.de>
4504
4505 PR symtab/25801
4506 * psymtab.c (psym_map_symtabs_matching_filename): Don't skip shared
4507 symtabs.
4508
4509 2020-04-22 Tom de Vries <tdevries@suse.de>
4510
4511 PR symtab/25700
4512 * dwarf2/read.c (dwarf2_build_psymtabs_hard): Don't create psymtab for
4513 CU if already created.
4514
4515 2020-04-21 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4516
4517 * infrun.c (displaced_step_fixup): Switch to the event_thread
4518 before calling displaced_step_restore, not after.
4519
4520 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
4521
4522 * record-btrace.c (record_btrace_enable_warn): Ignore thread if
4523 its inferior is not recorded by us.
4524 (record_btrace_target_open): Replace call to
4525 all_non_exited_threads () with call to current_inferior
4526 ()->non_exited_threads ().
4527 (record_btrace_target::stop_recording): Likewise.
4528 (record_btrace_target::close): Likewise.
4529 (record_btrace_target::wait): Likewise.
4530 (record_btrace_target::record_stop_replaying): Likewise.
4531
4532 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
4533
4534 * btrace.c (btrace_enable): Throw an error on double enables and
4535 when enabling recording fails.
4536 (btrace_disable): Throw an error if the thread is not recorded.
4537
4538 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
4539
4540 * record-btrace.c (record_btrace_target::fetch_registers): Forward
4541 request if we do not have a thread_info.
4542
4543 2020-04-21 Tom de Vries <tdevries@suse.de>
4544
4545 PR gdb/25471
4546 * thread.c
4547 (scoped_restore_current_thread::scoped_restore_current_thread): Catch
4548 exception in get_frame_id.
4549
4550 2020-04-20 Tom Tromey <tromey@adacore.com>
4551
4552 * python/python.c (struct gdbpy_event): Mark move constructor as
4553 noexcept.
4554 * python/py-tui.c (class gdbpy_tui_window_maker): Mark move
4555 constructor as noexcept.
4556 * completer.h (struct completion_result): Mark move constructor as
4557 noexcept.
4558 * completer.c (completion_result::completion_result): Use
4559 initialization style. Don't call reset_match_list.
4560
4561 2020-04-20 Mihails Strasuns <mihails.strasuns@intel.com>
4562
4563 * MAINTAINERS (Write After Approval): Add myself.
4564
4565 2020-04-18 Tom Tromey <tom@tromey.com>
4566
4567 * windows-tdep.c (init_w32_command_list)
4568 (w32_prefix_command_valid): Restore.
4569 (_initialize_windows_tdep): Call init_w32_command_list.
4570
4571 2020-04-18 Tom Tromey <tom@tromey.com>
4572
4573 * xcoffread.c (enter_line_range, scan_xcoff_symtab): Update.
4574 * value.c (value_fn_field): Update.
4575 * valops.c (find_function_in_inferior)
4576 (value_allocate_space_in_inferior): Update.
4577 * tui/tui-winsource.c (tui_update_source_windows_with_line):
4578 Update.
4579 * tui/tui-source.c (tui_source_window::set_contents): Update.
4580 * symtab.c (lookup_global_or_static_symbol)
4581 (find_function_start_sal_1, skip_prologue_sal)
4582 (print_msymbol_info, find_gnu_ifunc, symbol_arch): Update.
4583 * symmisc.c (dump_msymbols, dump_symtab_1)
4584 (maintenance_print_one_line_table): Update.
4585 * symfile.c (init_entry_point_info, section_is_mapped)
4586 (list_overlays_command, simple_read_overlay_table)
4587 (simple_overlay_update_1): Update.
4588 * stap-probe.c (handle_stap_probe): Update.
4589 * stabsread.c (dbx_init_float_type, define_symbol)
4590 (read_one_struct_field, read_enum_type, read_range_type): Update.
4591 * source.c (info_line_command): Update.
4592 * python/python.c (gdbpy_source_objfile_script)
4593 (gdbpy_execute_objfile_script): Update.
4594 * python/py-type.c (save_objfile_types): Update.
4595 * python/py-objfile.c (py_free_objfile): Update.
4596 * python/py-inferior.c (python_new_objfile): Update.
4597 * psymtab.c (psym_find_pc_sect_compunit_symtab, dump_psymtab)
4598 (dump_psymtab_addrmap_1, maintenance_info_psymtabs)
4599 (maintenance_check_psymtabs): Update.
4600 * printcmd.c (info_address_command): Update.
4601 * objfiles.h (struct objfile) <arch>: New method, from
4602 get_objfile_arch.
4603 (get_objfile_arch): Don't declare.
4604 * objfiles.c (get_objfile_arch): Remove.
4605 (filter_overlapping_sections): Update.
4606 * minsyms.c (msymbol_is_function): Update.
4607 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines)
4608 (output_nondebug_symbol): Update.
4609 * mdebugread.c (parse_symbol, basic_type, parse_partial_symbols)
4610 (mdebug_expand_psymtab): Update.
4611 * machoread.c (macho_add_oso_symfile): Update.
4612 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap):
4613 Update.
4614 * linux-fork.c (checkpoint_command): Update.
4615 * linespec.c (convert_linespec_to_sals): Update.
4616 * jit.c (finalize_symtab): Update.
4617 * infrun.c (insert_exception_resume_from_probe): Update.
4618 * ia64-tdep.c (ia64_find_unwind_table): Update.
4619 * hppa-tdep.c (internalize_unwinds): Update.
4620 * gdbtypes.c (get_type_arch, init_float_type, objfile_type):
4621 Update.
4622 * gcore.c (call_target_sbrk): Update.
4623 * elfread.c (record_minimal_symbol, elf_symtab_read)
4624 (elf_rel_plt_read, elf_gnu_ifunc_record_cache)
4625 (elf_gnu_ifunc_resolve_by_got): Update.
4626 * dwarf2/read.c (create_addrmap_from_index)
4627 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
4628 (read_debug_names_from_section)
4629 (process_psymtab_comp_unit_reader, add_partial_symbol)
4630 (add_partial_subprogram, process_full_comp_unit)
4631 (read_file_scope, read_func_scope, read_lexical_block_scope)
4632 (read_call_site_scope, dwarf2_ranges_read)
4633 (dwarf2_record_block_ranges, dwarf2_add_field)
4634 (mark_common_block_symbol_computed, read_tag_pointer_type)
4635 (read_tag_string_type, dwarf2_init_float_type)
4636 (dwarf2_init_complex_target_type, read_base_type)
4637 (partial_die_info::read, partial_die_info::read)
4638 (read_attribute_value, dwarf_decode_lines_1, new_symbol)
4639 (dwarf2_fetch_die_loc_sect_off): Update.
4640 * dwarf2/loc.c (dwarf2_find_location_expression)
4641 (class dwarf_evaluate_loc_desc, rw_pieced_value)
4642 (dwarf2_evaluate_loc_desc_full, dwarf2_locexpr_baton_eval)
4643 (dwarf2_loc_desc_get_symbol_read_needs)
4644 (locexpr_describe_location_piece, locexpr_describe_location_1)
4645 (loclist_describe_location): Update.
4646 * dwarf2/index-write.c (write_debug_names): Update.
4647 * dwarf2/frame.c (dwarf2_build_frame_info): Update.
4648 * dtrace-probe.c (dtrace_process_dof): Update.
4649 * dbxread.c (read_dbx_symtab, dbx_end_psymtab)
4650 (process_one_symbol): Update.
4651 * ctfread.c (ctf_init_float_type, read_base_type): Update.
4652 * coffread.c (coff_symtab_read, enter_linenos, decode_base_type)
4653 (coff_read_enum_type): Update.
4654 * cli/cli-cmds.c (edit_command, list_command): Update.
4655 * buildsym.c (buildsym_compunit::finish_block_internal): Update.
4656 * breakpoint.c (create_overlay_event_breakpoint)
4657 (create_longjmp_master_breakpoint)
4658 (create_std_terminate_master_breakpoint)
4659 (create_exception_master_breakpoint, get_sal_arch): Update.
4660 * block.c (block_gdbarch): Update.
4661 * annotate.c (annotate_source_line): Update.
4662
4663 2020-04-17 Tom Tromey <tromey@adacore.com>
4664
4665 * auto-load.c (show_auto_load_cmd): Remove.
4666 (auto_load_show_cmdlist_get): Use add_show_prefix_cmd.
4667 * arc-tdep.c (_initialize_arc_tdep): Use add_show_prefix_cmd.
4668 (maintenance_print_arc_command): Remove.
4669 * tui/tui-win.c (tui_command): Remove.
4670 (tui_get_cmd_list): Use add_basic_prefix_cmd.
4671 * tui/tui-layout.c (tui_layout_command): Remove.
4672 (_initialize_tui_layout): Use add_basic_prefix_cmd.
4673 * python/python.c (user_set_python, user_show_python): Remove.
4674 (_initialize_python): Use add_basic_prefix_cmd,
4675 add_show_prefix_cmd.
4676 * guile/guile.c (set_guile_command, show_guile_command): Remove.
4677 (install_gdb_commands): Use add_basic_prefix_cmd,
4678 add_show_prefix_cmd.
4679 (info_guile_command): Remove.
4680 * dwarf2/read.c (set_dwarf_cmd, show_dwarf_cmd): Remove.
4681 (_initialize_dwarf2_read): Use add_basic_prefix_cmd,
4682 add_show_prefix_cmd.
4683 * cli/cli-style.h (class cli_style_option) <add_setshow_commands>:
4684 Remove do_set and do_show parameters.
4685 * cli/cli-style.c (set_style, show_style): Remove.
4686 (_initialize_cli_style): Use add_basic_prefix_cmd,
4687 add_show_prefix_cmd.
4688 (cli_style_option::add_setshow_commands): Remove do_set and
4689 do_show parameters.
4690 (cli_style_option::add_setshow_commands): Use
4691 add_basic_prefix_cmd, add_show_prefix_cmd.
4692 (STYLE_ADD_SETSHOW_COMMANDS): Remove macro.
4693 (set_style_name): Remove.
4694 * cli/cli-dump.c (dump_command, append_command): Remove.
4695 (srec_dump_command, ihex_dump_command, verilog_dump_command)
4696 (tekhex_dump_command, binary_dump_command)
4697 (binary_append_command): Remove.
4698 (_initialize_cli_dump): Use add_basic_prefix_cmd.
4699 * windows-tdep.c (w32_prefix_command_valid): Remove global.
4700 (init_w32_command_list): Remove; move into ...
4701 (_initialize_windows_tdep): ... here. Use add_basic_prefix_cmd.
4702 * valprint.c (set_print, show_print, set_print_raw)
4703 (show_print_raw): Remove.
4704 (_initialize_valprint): Use add_basic_prefix_cmd,
4705 add_show_prefix_cmd.
4706 * typeprint.c (set_print_type, show_print_type): Remove.
4707 (_initialize_typeprint): Use add_basic_prefix_cmd,
4708 add_show_prefix_cmd.
4709 * record.c (set_record_command, show_record_command): Remove.
4710 (_initialize_record): Use add_basic_prefix_cmd,
4711 add_show_prefix_cmd.
4712 * cli/cli-cmds.c (_initialize_cli_cmds): Use add_basic_prefix_cmd,
4713 add_show_prefix_cmd.
4714 (info_command, show_command, set_debug, show_debug): Remove.
4715 * top.h (set_history, show_history): Don't declare.
4716 * top.c (set_history, show_history): Remove.
4717 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
4718 (unset_tdesc_cmd): Remove.
4719 (_initialize_target_descriptions): Use add_basic_prefix_cmd,
4720 add_show_prefix_cmd.
4721 * symtab.c (info_module_command): Remove.
4722 (_initialize_symtab): Use add_basic_prefix_cmd.
4723 * symfile.c (overlay_command): Remove.
4724 (_initialize_symfile): Use add_basic_prefix_cmd.
4725 * sparc64-tdep.c (info_adi_command): Remove.
4726 (_initialize_sparc64_adi_tdep): Use add_basic_prefix_cmd.
4727 * sh-tdep.c (show_sh_command, set_sh_command): Remove.
4728 (_initialize_sh_tdep): Use add_basic_prefix_cmd,
4729 add_show_prefix_cmd.
4730 * serial.c (serial_set_cmd, serial_show_cmd): Remove.
4731 (_initialize_serial): Use add_basic_prefix_cmd,
4732 add_show_prefix_cmd.
4733 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Remove.
4734 (_initialize_ser_tcp): Use add_basic_prefix_cmd,
4735 add_show_prefix_cmd.
4736 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command)
4737 (_initialize_rs6000_tdep): Use add_basic_prefix_cmd,
4738 add_show_prefix_cmd.
4739 * riscv-tdep.c (show_riscv_command, set_riscv_command)
4740 (show_debug_riscv_command, set_debug_riscv_command): Remove.
4741 (_initialize_riscv_tdep): Use add_basic_prefix_cmd,
4742 add_show_prefix_cmd.
4743 * remote.c (remote_command, set_remote_cmd): Remove.
4744 (_initialize_remote): Use add_basic_prefix_cmd.
4745 * record-full.c (set_record_full_command)
4746 (show_record_full_command): Remove.
4747 (_initialize_record_full): Use add_basic_prefix_cmd,
4748 add_show_prefix_cmd.
4749 * record-btrace.c (cmd_set_record_btrace)
4750 (cmd_show_record_btrace, cmd_set_record_btrace_bts)
4751 (cmd_show_record_btrace_bts, cmd_set_record_btrace_pt)
4752 (cmd_show_record_btrace_pt): Remove.
4753 (_initialize_record_btrace): Use add_basic_prefix_cmd,
4754 add_show_prefix_cmd.
4755 * ravenscar-thread.c (set_ravenscar_command)
4756 (show_ravenscar_command): Remove.
4757 (_initialize_ravenscar): Use add_basic_prefix_cmd,
4758 add_show_prefix_cmd.
4759 * mips-tdep.c (show_mips_command, set_mips_command)
4760 (_initialize_mips_tdep): Use add_basic_prefix_cmd,
4761 add_show_prefix_cmd.
4762 * maint.c (maintenance_command, maintenance_info_command)
4763 (maintenance_check_command, maintenance_print_command)
4764 (maintenance_set_cmd, maintenance_show_cmd): Remove.
4765 (_initialize_maint_cmds): Use add_basic_prefix_cmd,
4766 add_show_prefix_cmd.
4767 (show_per_command_cmd): Remove.
4768 * maint-test-settings.c (maintenance_set_test_settings_cmd):
4769 Remove.
4770 (maintenance_show_test_settings_cmd): Remove.
4771 (_initialize_maint_test_settings): Use add_basic_prefix_cmd,
4772 add_show_prefix_cmd.
4773 * maint-test-options.c (maintenance_test_options_command):
4774 Remove.
4775 (_initialize_maint_test_options): Use add_basic_prefix_cmd.
4776 * macrocmd.c (macro_command): Remove
4777 (_initialize_macrocmd): Use add_basic_prefix_cmd.
4778 * language.c (set_check, show_check): Remove.
4779 (_initialize_language): Use add_basic_prefix_cmd,
4780 add_show_prefix_cmd.
4781 * infcmd.c (unset_command): Remove.
4782 (_initialize_infcmd): Use add_basic_prefix_cmd.
4783 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Remove.
4784 (_initialize_i386_tdep): Use add_basic_prefix_cmd,
4785 add_show_prefix_cmd.
4786 * go32-nat.c (go32_info_dos_command): Remove.
4787 (_initialize_go32_nat): Use add_basic_prefix_cmd.
4788 * cli/cli-decode.c (do_prefix_cmd, add_basic_prefix_cmd)
4789 (do_show_prefix_cmd, add_show_prefix_cmd): New functions.
4790 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Remove.
4791 (_initialize_frame): Use add_basic_prefix_cmd,
4792 add_show_prefix_cmd.
4793 * dcache.c (set_dcache_command, show_dcache_command): Remove.
4794 (_initialize_dcache): Use add_basic_prefix_cmd,
4795 add_show_prefix_cmd.
4796 * cp-support.c (maint_cplus_command): Remove.
4797 (_initialize_cp_support): Use add_basic_prefix_cmd.
4798 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
4799 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
4800 (maint_btrace_pt_show_cmd, _initialize_btrace): Use
4801 add_basic_prefix_cmd, add_show_prefix_cmd.
4802 * breakpoint.c (save_command): Remove.
4803 (_initialize_breakpoint): Use add_basic_prefix_cmd.
4804 * arm-tdep.c (set_arm_command, show_arm_command): Remove.
4805 (_initialize_arm_tdep): Use add_basic_prefix_cmd,
4806 add_show_prefix_cmd.
4807 * ada-lang.c (maint_set_ada_cmd, maint_show_ada_cmd)
4808 (set_ada_command, show_ada_command): Remove.
4809 (_initialize_ada_language): Use add_basic_prefix_cmd,
4810 add_show_prefix_cmd.
4811 * command.h (add_basic_prefix_cmd, add_show_prefix_cmd): Declare.
4812
4813 2020-04-16 Kamil Rytarowski <n54@gmx.com>
4814
4815 * nbsd-nat.c (inf_ptrace_target::auxv_parse): Remove.
4816 * nbsd-nat.h (inf_ptrace_target::auxv_parse): Likewise.
4817
4818 2020-04-16 Simon Marchi <simon.marchi@polymtl.ca>
4819
4820 * windows-tdep.c (is_linked_with_cygwin_dll): Add filename to
4821 warning messages.
4822
4823 2020-04-16 Simon Marchi <simon.marchi@polymtl.ca>
4824
4825 * windows-tdep.c (is_linked_with_cygwin_dll): Consider case where
4826 import table is not at beginning of .idata section.
4827
4828 2020-04-16 Pedro Alves <palves@redhat.com>
4829
4830 * inferior.c (delete_inferior): Use delete operator directly
4831 instead of delete_program_space.
4832 * progspace.c (add_program_space): New, factored out from
4833 program_space::program_space.
4834 (remove_program_space): New, factored out from
4835 delete_program_space.
4836 (program_space::program_space): Remove intro comment. Rewrite.
4837 (program_space::~program_space): Remove intro comment. Call
4838 remove_program_space.
4839 (delete_program_space): Delete.
4840 * progspace.h (program_space::program_space): Make explicit. Move
4841 intro comment here, adjusted.
4842 (program_space::~program_space): Move intro comment here,
4843 adjusted.
4844 (delete_program_space): Remove.
4845
4846 2020-04-16 Tom Tromey <tromey@adacore.com>
4847
4848 * windows-nat.c (windows_nat::handle_access_violation): New
4849 function.
4850 * nat/windows-nat.h (handle_access_violation): Declare.
4851 * nat/windows-nat.c (handle_exception): Move Cygwin code to
4852 windows-nat.c. Call handle_access_violation.
4853
4854 2020-04-16 Tom de Vries <tdevries@suse.de>
4855
4856 PR symtab/25791
4857 * dwarf2/index-write.c (write_gdbindex): Generate CU table entries for
4858 CUs without psymtab.
4859
4860 2020-04-16 Kevin Buettner <kevinb@redhat.com>
4861
4862 * python/python.c (do_start_initialization): Don't call
4863 PyEval_InitThreads for Python 3.9 and beyond.
4864
4865 2020-04-15 Kamil Rytarowski <n54@gmx.com>
4866
4867 * obsd-nat.c (obsd_nat_target::update_thread_list): Pass "this" to
4868 thread functions.
4869 (obsd_nat_target::wait): Likewise.
4870
4871 2020-04-15 Tom Tromey <tromey@adacore.com>
4872
4873 * windows-nat.c (DEBUG_EXEC, DEBUG_EVENTS, DEBUG_MEM)
4874 (DEBUG_EXCEPT): Use debug_printf.
4875
4876 2020-04-15 Andrew Burgess <andrew.burgess@embecosm.com>
4877
4878 * completer.c (class completion_tracker::completion_hash_entry)
4879 <hash_name>: New member function.
4880 (completion_tracker::discard_completions): New callback to hash a
4881 completion_hash_entry, pass this to htab_create_alloc.
4882
4883 2016-01-20 Jon Turney <jon.turney@dronecode.org.uk>
4884
4885 * windows-nat.c (windows_make_so): Warn rather than stopping with
4886 an error if realpath() fails.
4887
4888 2020-04-14 Kamil Rytarowski <n54@gmx.com>
4889
4890 * nbsd-nat.c (nbsd_pid_to_kinfo_proc2): New.
4891 (nbsd_nat_target::info_proc): Add do_status.
4892
4893 2020-04-14 Simon Marchi <simon.marchi@polymtl.ca>
4894 Tom de Vries <tdevries@suse.de>
4895
4896 PR symtab/25718
4897 * psympriv.h (struct partial_symtab::read_symtab)
4898 (struct partial_symtab::expand_psymtab)
4899 (struct partial_symtab::read_dependencies): Update comments.
4900 * dwarf2/read.c (struct dwarf2_include_psymtab::read_symtab): Call
4901 read_symtab for includer.
4902 (struct dwarf2_include_psymtab::expand_psymtab): Assert false.
4903 (struct dwarf2_include_psymtab::readin_p): Call readin_p () for includer.
4904 (struct dwarf2_include_psymtab::m_readin): Remove.
4905 (struct dwarf2_include_psymtab::includer): New member function.
4906 (dwarf2_psymtab::expand_psymtab): Assert !readin.
4907
4908 2020-04-14 Tom de Vries <tdevries@suse.de>
4909
4910 PR symtab/25720
4911 * symmisc.c (maintenance_expand_symtabs): Call expand_symtabs_matching
4912 with NULL symbol_matcher and lookup_name.
4913 * psymtab.c (psym_expand_symtabs_matching): Handle NULL symbol_matcher
4914 and lookup_name.
4915 * dwarf2/read.c (dw2_expand_symtabs_matching)
4916 (dw2_debug_names_expand_symtabs_matching): Same.
4917 * symfile.h (struct quick_symbol_functions::expand_symtabs_matching):
4918 Make lookup_name a pointer. Update comment.
4919 * symtab.c (global_symbol_searcher::expand_symtabs): Handle
4920 lookup_name being a pointer.
4921 * symfile.c (expand_symtabs_matching): Same.
4922 * symfile-debug.c (debug_qf_expand_symtabs_matching): Same.
4923 * linespec.c (iterate_over_all_matching_symtabs): Same.
4924
4925 2020-04-13 Tom Tromey <tom@tromey.com>
4926
4927 * run-on-main-thread.c: Update include.
4928 * unittests/main-thread-selftests.c: Update include.
4929 * tui/tui-win.c: Update include.
4930 * tui/tui-io.c: Update include.
4931 * tui/tui-interp.c: Update include.
4932 * tui/tui-hooks.c: Update include.
4933 * top.h: Update include.
4934 * top.c: Update include.
4935 * ser-base.c: Update include.
4936 * remote.c: Update include.
4937 * remote-notif.c: Update include.
4938 * remote-fileio.c: Update include.
4939 * record-full.c: Update include.
4940 * record-btrace.c: Update include.
4941 * python/python.c: Update include.
4942 * posix-hdep.c: Update include.
4943 * mingw-hdep.c: Update include.
4944 * mi/mi-main.c: Update include.
4945 * mi/mi-interp.c: Update include.
4946 * main.c: Update include.
4947 * linux-nat.c: Update include.
4948 * interps.c: Update include.
4949 * infrun.c: Update include.
4950 * inf-loop.c: Update include.
4951 * event-top.c: Update include.
4952 * event-loop.c: Move to ../gdbsupport/.
4953 * event-loop.h: Move to ../gdbsupport/.
4954 * async-event.h: Update include.
4955 * Makefile.in (COMMON_SFILES, HFILES_NO_SRCDIR): Update.
4956
4957 2020-04-13 Tom Tromey <tom@tromey.com>
4958
4959 * tui/tui-win.c: Include async-event.h.
4960 * remote.c: Include async-event.h.
4961 * remote-notif.c: Include async-event.h.
4962 * record-full.c: Include async-event.h.
4963 * record-btrace.c: Include async-event.h.
4964 * infrun.c: Include async-event.h.
4965 * event-top.c: Include async-event.h.
4966 * event-loop.h: Move some declarations to async-event.h.
4967 * event-loop.c: Don't include ser-event.h or top.h. Move some
4968 code to async-event.c.
4969 * async-event.h: New file.
4970 * async-event.c: New file.
4971 * Makefile.in (COMMON_SFILES): Add async-event.c.
4972 (HFILES_NO_SRCDIR): Add async-event.h.
4973
4974 2020-04-13 Tom Tromey <tom@tromey.com>
4975
4976 * utils.c (flush_streams): New function.
4977 * event-loop.c (gdb_wait_for_event): Call flush_streams.
4978
4979 2020-04-13 Tom Tromey <tom@tromey.com>
4980
4981 * event-loop.c (handle_file_event): Use warning, not
4982 printf_unfiltered.
4983
4984 2020-04-13 Tom Tromey <tom@tromey.com>
4985
4986 * event-loop.c: Include <chrono>.
4987
4988 2020-04-13 Tom Tromey <tom@tromey.com>
4989
4990 * gdb_select.h: Move to ../gdbsupport/.
4991 * event-loop.c: Update include path.
4992 * top.c: Update include path.
4993 * ser-base.c: Update include path.
4994 * ui-file.c: Update include path.
4995 * ser-tcp.c: Update include path.
4996 * guile/scm-ports.c: Update include path.
4997 * posix-hdep.c: Update include path.
4998 * ser-unix.c: Update include path.
4999 * gdb_usleep.c: Update include path.
5000 * mingw-hdep.c: Update include path.
5001 * inflow.c: Update include path.
5002 * infrun.c: Update include path.
5003 * event-top.c: Update include path.
5004
5005 2020-04-13 Tom Tromey <tom@tromey.com>
5006
5007 * configure: Rebuild.
5008 * configure.ac: Remove checks that are now in GDB_AC_COMMON.
5009
5010 2020-04-13 Tom Tromey <tom@tromey.com>
5011
5012 * event-loop.h (start_event_loop): Don't declare.
5013 * event-loop.c (start_event_loop): Move...
5014 * main.c (start_event_loop): ...here. Now static.
5015
5016 2020-04-13 Sergio Durigan Junior <sergiodj@sergiodj.net>
5017
5018 * MAINTAINERS: Update my email address.
5019
5020 2020-04-12 Kamil Rytarowski <n54@gmx.com>
5021
5022 * nbsd-nat.c (nbsd_nat_target::info_proc): Add IP_MINIMAL and
5023 IP_ALL.
5024
5025 2020-04-12 Kamil Rytarowski <n54@gmx.com>
5026
5027 * nbsd-nat.c (nbsd_pid_to_cmdline): Add.
5028 (nbsd_nat_target::info_proc): Add do_cmdline.
5029
5030 2020-04-12 Kamil Rytarowski <n54@gmx.com>
5031
5032 * nbsd-nat.c (nbsd_pid_to_cwd): Add.
5033 (nbsd_nat_target::info_proc): Add do_cwd.
5034
5035 2020-04-12 Kamil Rytarowski <n54@gmx.com>
5036
5037 * nbsd-nat.c (nbsd_nat_target::info_proc): Add do_exe.
5038
5039 2020-04-11 Kamil Rytarowski <n54@gmx.com>
5040
5041 * nbsd-nat.c; Include "nbsd-tdep.h" and "gdbarch.h".
5042 * nbsd-nat.c (nbsd_nat_target::find_memory_regions)
5043 (nbsd_nat_target::info_proc): New functions.
5044 * nbsd-nat.c (kinfo_get_vmmap): New function.
5045 * nbsd-nat.c (nbsd_nat_target::info_proc) Use
5046 nbsd_info_proc_mappings_header and nbsd_info_proc_mappings_entry.
5047 * nbsd-tdep.c (nbsd_info_proc_mappings_header)
5048 (nbsd_info_proc_mappings_entry, nbsd_vm_map_entry_flags): New
5049 functions.
5050 * nbsd-tdep.c (KINFO_VME_PROT_READ, KINFO_VME_PROT_WRITE)
5051 (KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
5052 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
5053 (KINFO_VME_FLAG_PAGEABLE, KINFO_VME_FLAG_GROWS_UP)
5054 (KINFO_VME_FLAG_GROWS_DOWN): New.
5055
5056 2020-04-10 Artur Shepilko <nomadbyte@gmail.com>
5057
5058 * utils.c (copy_bitwise): Use unsigned 0 constant as operand of
5059 bit shift.
5060
5061 2020-04-10 Tom Tromey <tromey@adacore.com>
5062
5063 * symfile.c (symbol_file_add_separate): Preserve OBJF_MAINLINE.
5064
5065 2020-04-10 Tom Tromey <tromey@adacore.com>
5066
5067 * symtab.c (get_symbol_address, get_msymbol_address): Skip
5068 separate debug files.
5069
5070 2020-04-10 Hannes Domani <ssbssa@yahoo.de>
5071
5072 * nat/windows-nat.c (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP):
5073 Move to...
5074 * nat/windows-nat.h (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP):
5075 ... here.
5076 * windows-nat.c (windows_nat_target::get_windows_debug_event):
5077 Check for STATUS_WX86_BREAKPOINT.
5078 (windows_nat_target::wait): Same.
5079
5080 2020-04-10 Tom de Vries <tdevries@suse.de>
5081
5082 PR cli/25808
5083 * python/lib/gdb/__init__.py: Initialize lexer with stripnl=False.
5084
5085 2020-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5086
5087 * MAINTAINERS (Global Maintainers): Add Tom de Vries.
5088 (Write After Approval): Remove Tom de Vries.
5089
5090 2020-04-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
5091
5092 revert partially:
5093 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
5094
5095 * buildsym.c (record_line): Fix undefined behavior and preserve
5096 lines at eof.
5097
5098 2020-04-09 Kamil Rytarowski <n54@gmx.com>
5099
5100 * auxv.h (svr4_auxv_parse): New.
5101 * auxv.c (default_auxv_parse): Split into default_auxv_parse
5102 and generic_auxv_parse.
5103 (svr4_auxv_parse): Add.
5104 * obsd-tdep.c: Include "auxv.h".
5105 (obsd_auxv_parse): Remove.
5106 (obsd_init_abi): Remove comment.
5107 (obsd_init_abi): Change set_gdbarch_auxv_parse passed argument
5108 from `obsd_auxv_parse' to `svr4_auxv_parse'.
5109 * nbsd-tdep.c: Include "auxv.h".
5110 (nbsd_init_abi): Call set_gdbarch_auxv_parse.
5111
5112 2020-04-08 Tom Tromey <tromey@adacore.com>
5113
5114 * nat/windows-nat.h (last_wait_event): Don't declare.
5115 (wait_for_debug_event): Update comment.
5116 * nat/windows-nat.c (last_wait_event): Now static.
5117
5118 2020-04-08 Tom Tromey <tromey@adacore.com>
5119
5120 * windows-nat.c (wait_for_debug_event): Move to
5121 nat/windows-nat.c.
5122 * nat/windows-nat.h (wait_for_debug_event): Declare.
5123 * nat/windows-nat.c (wait_for_debug_event): Move from
5124 windows-nat.c. No longer static.
5125
5126 2020-04-08 Tom Tromey <tromey@adacore.com>
5127
5128 * windows-nat.c (get_windows_debug_event): Use
5129 fetch_pending_stop.
5130 * nat/windows-nat.h (fetch_pending_stop): Declare.
5131 * nat/windows-nat.c (fetch_pending_stop): New function.
5132
5133 2020-04-08 Tom Tromey <tromey@adacore.com>
5134
5135 * windows-nat.c (windows_continue): Use matching_pending_stop and
5136 continue_last_debug_event.
5137 * nat/windows-nat.h (matching_pending_stop)
5138 (continue_last_debug_event): Declare.
5139 * nat/windows-nat.c (DEBUG_EVENTS): New define.
5140 (matching_pending_stop, continue_last_debug_event): New
5141 functions.
5142
5143 2020-04-08 Tom Tromey <tromey@adacore.com>
5144
5145 * windows-nat.c (MS_VC_EXCEPTION): Move to nat/windows-nat.c.
5146 (handle_exception_result): Move to nat/windows-nat.h.
5147 (DEBUG_EXCEPTION_SIMPLE): Remove.
5148 (windows_nat::handle_ms_vc_exception): New function.
5149 (handle_exception): Move to nat/windows-nat.c.
5150 (get_windows_debug_event): Update.
5151 (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP): Move to
5152 nat/windows-nat.c.
5153 * nat/windows-nat.h (handle_ms_vc_exception): Declare.
5154 (handle_exception_result): Move from windows-nat.c.
5155 (handle_exception): Declare.
5156 * nat/windows-nat.c (MS_VC_EXCEPTION, handle_exception)
5157 (STATUS_WX86_SINGLE_STEP, STATUS_WX86_BREAKPOINT): Move from
5158 windows-nat.c.
5159
5160 2020-04-08 Tom Tromey <tromey@adacore.com>
5161
5162 * windows-nat.c (exception_count, event_count): Remove.
5163 (handle_exception, get_windows_debug_event)
5164 (do_initial_windows_stuff): Update.
5165
5166 2020-04-08 Tom Tromey <tromey@adacore.com>
5167
5168 * windows-nat.c (windows_nat::handle_load_dll)
5169 (windows_nat::handle_unload_dll): Rename. No longer static.
5170 * nat/windows-nat.h (handle_load_dll, handle_unload_dll):
5171 Declare.
5172
5173 2020-04-08 Tom Tromey <tromey@adacore.com>
5174
5175 * complaints.h (stop_whining): Declare at top-level.
5176 (complaint): Don't declare stop_whining.
5177
5178 2020-04-08 Tom Tromey <tromey@adacore.com>
5179
5180 * windows-nat.c (windows_nat::handle_output_debug_string):
5181 Rename. No longer static.
5182 * nat/windows-nat.h (handle_output_debug_string): Declare.
5183
5184 2020-04-08 Tom Tromey <tromey@adacore.com>
5185
5186 * windows-nat.c (current_process_handle, current_process_id)
5187 (main_thread_id, last_sig, current_event, last_wait_event)
5188 (current_windows_thread, desired_stop_thread_id, pending_stops)
5189 (struct pending_stop, siginfo_er): Move to nat/windows-nat.c.
5190 (display_selectors, fake_create_process)
5191 (get_windows_debug_event): Update.
5192 * nat/windows-nat.h (current_process_handle, current_process_id)
5193 (main_thread_id, last_sig, current_event, last_wait_event)
5194 (current_windows_thread, desired_stop_thread_id, pending_stops)
5195 (struct pending_stop, siginfo_er): Move from windows-nat.c.
5196 * nat/windows-nat.c (current_process_handle, current_process_id)
5197 (main_thread_id, last_sig, current_event, last_wait_event)
5198 (current_windows_thread, desired_stop_thread_id, pending_stops)
5199 (siginfo_er): New globals. Move from windows-nat.c.
5200
5201 2020-04-08 Tom Tromey <tromey@adacore.com>
5202
5203 * windows-nat.c (get_image_name): Move to nat/windows-nat.c.
5204 (handle_load_dll): Update.
5205 * nat/windows-nat.c (get_image_name): Move from windows-nat.c.
5206
5207 2020-04-08 Tom Tromey <tromey@adacore.com>
5208
5209 * windows-nat.c (enum thread_disposition_type): Move to
5210 nat/windows-nat.h.
5211 (windows_nat::thread_rec): Rename from thread_rec. No longer
5212 static.
5213 (windows_add_thread, windows_nat_target::fetch_registers)
5214 (windows_nat_target::store_registers, handle_exception)
5215 (windows_nat_target::resume, get_windows_debug_event)
5216 (windows_nat_target::get_tib_address)
5217 (windows_nat_target::thread_name)
5218 (windows_nat_target::thread_alive): Update.
5219 * nat/windows-nat.h (enum thread_disposition_type): Move from
5220 windows-nat.c.
5221 (thread_rec): Declare.
5222
5223 2020-04-08 Tom Tromey <tromey@adacore.com>
5224
5225 * windows-nat.c: Add "using namespace".
5226 * nat/windows-nat.h: Wrap contents in windows_nat namespace.
5227 * nat/windows-nat.c: Wrap contents in windows_nat namespace.
5228
5229 2020-04-08 Tom Tromey <tromey@adacore.com>
5230
5231 * nat/windows-nat.h (struct windows_thread_info): Declare
5232 destructor.
5233 * nat/windows-nat.c (~windows_thread_info): New.
5234
5235 2020-04-08 Tom Tromey <tromey@adacore.com>
5236
5237 PR gdb/22992
5238 * windows-nat.c (current_event): Update comment.
5239 (last_wait_event, desired_stop_thread_id): New globals.
5240 (struct pending_stop): New.
5241 (pending_stops): New global.
5242 (windows_nat_target) <stopped_by_sw_breakpoint>
5243 <supports_stopped_by_sw_breakpoint>: New methods.
5244 (windows_fetch_one_register): Add assertions. Adjust PC.
5245 (windows_continue): Handle pending stops. Suspend other threads
5246 when stepping. Use last_wait_event
5247 (wait_for_debug_event): New function.
5248 (get_windows_debug_event): Use wait_for_debug_event. Handle
5249 pending stops. Queue spurious stops.
5250 (windows_nat_target::wait): Set stopped_at_software_breakpoint.
5251 (windows_nat_target::kill): Use wait_for_debug_event.
5252 * nat/windows-nat.h (struct windows_thread_info)
5253 <stopped_at_software_breakpoint>: New field.
5254 * nat/windows-nat.c (windows_thread_info::resume): Clear
5255 stopped_at_software_breakpoint.
5256
5257 2020-04-08 Tom Tromey <tromey@adacore.com>
5258
5259 * windows-nat.c (enum thread_disposition_type): New.
5260 (thread_rec): Replace "get_context" parameter with "disposition";
5261 change type.
5262 (windows_add_thread, windows_nat_target::fetch_registers)
5263 (windows_nat_target::store_registers, handle_exception)
5264 (windows_nat_target::resume, get_windows_debug_event)
5265 (windows_nat_target::get_tib_address)
5266 (windows_nat_target::thread_name)
5267 (windows_nat_target::thread_alive): Update.
5268
5269 2020-04-08 Tom Tromey <tromey@adacore.com>
5270
5271 * windows-nat.c (thread_rec): Use windows_thread_info::suspend.
5272 (windows_continue): Use windows_continue::resume.
5273 * nat/windows-nat.h (struct windows_thread_info) <suspend,
5274 resume>: Declare new methods.
5275 * nat/windows-nat.c: New file.
5276 * configure.nat (NATDEPFILES): Add nat/windows-nat.o when needed.
5277
5278 2020-04-08 Tom Tromey <tromey@adacore.com>
5279
5280 * windows-nat.c (windows_add_thread, windows_delete_thread)
5281 (windows_nat_target::fetch_registers)
5282 (windows_nat_target::store_registers, fake_create_process)
5283 (windows_nat_target::resume, windows_nat_target::resume)
5284 (get_windows_debug_event, windows_nat_target::wait)
5285 (windows_nat_target::pid_to_str)
5286 (windows_nat_target::get_tib_address)
5287 (windows_nat_target::get_ada_task_ptid)
5288 (windows_nat_target::thread_name)
5289 (windows_nat_target::thread_alive): Use lwp, not tid.
5290
5291 2020-04-08 Tom Tromey <tromey@adacore.com>
5292
5293 * windows-nat.c (handle_exception)
5294 (windows_nat_target::thread_name): Update.
5295 * nat/windows-nat.h (windows_thread_info): Remove destructor.
5296 <name>: Now unique_xmalloc_ptr.
5297
5298 2020-04-08 Tom Tromey <tromey@adacore.com>
5299
5300 * windows-nat.c (thread_rec)
5301 (windows_nat_target::fetch_registers): Update.
5302 * nat/windows-nat.h (struct windows_thread_info) <suspended>:
5303 Update comment.
5304 <debug_registers_changed, reload_context>: Now bool.
5305
5306 2020-04-08 Tom Tromey <tromey@adacore.com>
5307
5308 * windows-nat.c (windows_add_thread): Use new.
5309 (windows_init_thread_list, windows_delete_thread): Use delete.
5310 (get_windows_debug_event): Update.
5311 * nat/windows-nat.h (struct windows_thread_info): Add constructor,
5312 destructor, and initializers.
5313
5314 2020-04-08 Tom Tromey <tromey@adacore.com>
5315
5316 * windows-nat.c (struct windows_thread_info): Remove.
5317 * nat/windows-nat.h: New file.
5318
5319 2020-04-08 Tom Tromey <tromey@adacore.com>
5320
5321 * windows-nat.c (struct windows_thread_info) <tid>: Rename from "id".
5322 (thread_rec, windows_add_thread, windows_delete_thread)
5323 (windows_continue): Update.
5324
5325 2020-04-08 Tom Tromey <tromey@adacore.com>
5326
5327 * windows-nat.c (struct windows_thread_info): Remove typedef.
5328 (thread_head): Remove.
5329 (thread_list): New global.
5330 (thread_rec, windows_add_thread, windows_init_thread_list)
5331 (windows_delete_thread, windows_continue): Update.
5332
5333 2020-04-08 Simon Marchi <simon.marchi@polymtl.ca>
5334
5335 * windows-tdep.h (windows_init_abi): Add comment.
5336 (cygwin_init_abi): New declaration.
5337 * windows-tdep.c: Split signal enumeration in two, one for
5338 Windows and one for Cygwin.
5339 (windows_gdb_signal_to_target): Only deal with signal of the
5340 Windows OS ABI.
5341 (cygwin_gdb_signal_to_target): New function.
5342 (windows_init_abi): Rename to windows_init_abi_common, don't set
5343 gdb_signal_to_target gdbarch method. Add new new function with
5344 this name.
5345 (cygwin_init_abi): New function.
5346 * amd64-windows-tdep.c (amd64_windows_init_abi_common): Add
5347 comment. Don't call windows_init_abi.
5348 (amd64_windows_init_abi): Add comment, call windows_init_abi.
5349 (amd64_cygwin_init_abi): Add comment, call cygwin_init_abi.
5350 * i386-windows-tdep.c (i386_windows_init_abi): Rename to
5351 i386_windows_init_abi_common, don't call windows_init_abi. Add
5352 a new function of this name.
5353 (i386_cygwin_init_abi): New function.
5354 (_initialize_i386_windows_tdep): Bind i386_cygwin_init_abi to
5355 OS ABI Cygwin.
5356
5357 2020-04-08 Simon Marchi <simon.marchi@polymtl.ca>
5358
5359 * dwarf2/read.c (read_gdb_index_from_buffer): Remove objfile
5360 parameter.c.
5361 (dwarf2_read_gdb_index): Update.
5362
5363 2020-04-07 Kamil Rytarowski <n54@gmx.com>
5364
5365 * nbsd-tdep.c: Include "objfiles.h".
5366 (nbsd_skip_solib_resolver): New.
5367 (nbsd_init_abi): Call set_gdbarch_skip_solib_resolver().
5368
5369 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
5370
5371 * dwarf2/loc.c (loclist_describe_location): Call the function decode_debug_loclists_
5372 addresses if DWARF version is 5 or more because DW_LLE_start* or DW_LLE_offset_pair
5373 with DW_LLE_base_addressx are being emitted in DWARFv5.
5374 Add the newly added kind DW_LOC_OFFSET_PAIR also.
5375 The length of location description is an unsigned ULEB integer in DWARFv5 instead of
5376 unsigned integer.
5377
5378 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
5379
5380 * dwarf2/loc.c (enum debug_loc_kind): Add a new kind DEBUG_LOC_OFFSET_PAIR.
5381 (dwarf2_find_location_expression): Call the function decode_debug_loclists_
5382 addresses if DWARF version is 5 or more. DW_LLE_start* or DW_LLE_offset_pair
5383 with DW_LLE_base_addressx are being emitted in DWARFv5 instead of DW_LLE_GNU*.
5384 Add applicable base address if the entry is DW_LLE_offset_pair from DWO.
5385 (decode_debug_loclists_addresses): Return DEBUG_LOC_OFFSET_PAIR instead of
5386 DEBUG_LOC_START_END in case of DW_LLE_offset_pair.
5387
5388
5389 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
5390
5391 * dwarf2/read.c (cu_debug_loc_section): Added the declaration for the function.
5392 (read_loclist_index): New function definition.
5393 (lookup_loclist_base): New function definition.
5394 (read_loclist_header): New function definition.
5395 (dwarf2_cu): Add loclist_base and loclist_header field.
5396 (dwarf2_locate_dwo_sections): Handle .debug_loclists.dwo section.
5397 (read_full_die_1): Read the value of DW_AT_loclists_base.
5398 (read_attribute_reprocess): Handle DW_FORM_loclistx.
5399 (read_attribute_value): Handle DW_FORM_loclistx.
5400 (skip_one_die): Handle DW_FORM_loclistx.
5401 (loclist_header): New structure declaration.
5402 * dwarf2/attribute.c (form_is_section_offset): Handle DW_FORM_loclistx.
5403
5404 2020-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5405
5406 * dwarf2/read.h (struct dwarf2_psymtab): Remove two-parameters
5407 constructor. Remove `addr` parameter from other constructor and
5408 add `per_cu` parameter.
5409 * dwarf2/read.c (create_partial_symtab): Update.
5410
5411 2020-04-07 Tom de Vries <tdevries@suse.de>
5412
5413 PR symtab/25796
5414 * dwarf2/read.c (can_have_DW_AT_const_value_p): New function.
5415 (partial_die_info::fixup): Inherit has_const_value.
5416
5417 2020-04-07 Tom de Vries <tdevries@suse.de>
5418
5419 * psymtab.c (maintenance_check_psymtabs): Skip static LOC_BLOCK
5420 symbols without address.
5421
5422 2020-04-06 Kamil Rytarowski <n54@gmx.com>
5423
5424 * nbsd-nat.h (struct thread_info): Add forward declaration.
5425 (nbsd_nat_target::thread_alive): Add.
5426 (nbsd_nat_target::thread_name): Likewise.
5427 (nbsd_nat_target::update_thread_list): Likewise.
5428 (update_thread_list::post_attach): Likewise.
5429 (post_attach::pid_to_str): Likewise.
5430 * nbsd-nat.c: Include "gdbthread.h" and "inferior.h".
5431 (nbsd_thread_lister): Add.
5432 (nbsd_nat_target::thread_alive): Likewise.
5433 (nbsd_nat_target::thread_name): Likewise.
5434 (nbsd_add_threads): Likewise.
5435 (update_thread_list::post_attach): Likewise.
5436 (nbsd_nat_target::update_thread_list): Likewise.
5437 (post_attach::pid_to_str): Likewise.
5438
5439 2020-04-06 Tom Tromey <tromey@adacore.com>
5440
5441 * ada-valprint.c (print_variant_part): Extract the variant field.
5442 (print_field_values): Use the field as the outer value when
5443 recursing.
5444
5445 2020-04-06 Tom Tromey <tromey@adacore.com>
5446
5447 * sh-nbsd-tdep.c: Include nbsd-tdep.h.
5448 * ppc-nbsd-tdep.c: Include nbsd-tdep.h.
5449 * mips-nbsd-tdep.c (mipsnbsd_init_abi): Add missing ";".
5450 * arm-nbsd-tdep.c: Include nbsd-tdep.h.
5451 * hppa-nbsd-tdep.c: Include nbsd-tdep.h.
5452
5453 2020-04-06 Tom Tromey <tromey@adacore.com>
5454
5455 * dwarf2/read.c (read_base_type) <DW_ATE_complex_float>: Handle
5456 TYPE_CODE_ERROR.
5457
5458 2020-04-06 Kamil Rytarowski <n54@gmx.com>
5459
5460 * nbsd-tdep.c: Include "gdbarch.h".
5461 Define enum with NetBSD signal numbers.
5462 (nbsd_gdb_signal_from_target, nbsd_gdb_signal_to_target): New.
5463 * alpha-nbsd-tdep.c (alphanbsd_init_abi): Call nbsd_init_abi().
5464 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5465 * arm-nbsd-tdep.c (arm_netbsd_elf_init_abi): Likewise.
5466 * hppa-nbsd-tdep.c (hppanbsd_init_abi): Likewise.
5467 * i386-nbsd-tdep.c (i386nbsd_init_abi): Likewise.
5468 * mips-nbsd-tdep.c (nbsd_init_abi): Likewise.
5469 * ppc-nbsd-tdep.c (ppcnbsd_init_abi): Likewise.
5470 * sh-nbsd-tdep.c (shnbsd_init_abi): Likewise.
5471 * sparc-nbsd-tdep.c (sparc32nbsd_init_abi): Likewise.
5472 * sparc64-nbsd-tdep.c (sparc64nbsd_init_abi): Likewise.
5473 * vax-nbsd-tdep.c (vaxnbsd_elf_init_abi): Likewise.
5474
5475 2020-04-03 Hannes Domani <ssbssa@yahoo.de>
5476
5477 PR gdb/25325
5478 * dwarf2/read.c (read_enumeration_type): Fix typed enum attributes.
5479
5480 2020-04-03 Tom Tromey <tromey@adacore.com>
5481
5482 * dwarf2/loc.c (disassemble_dwarf_expression) <DW_OP_const_type>:
5483 Read constant block.
5484
5485 2020-04-02 Simon Marchi <simon.marchi@polymtl.ca>
5486
5487 * gdb_bfd.h: Include gdbsupport/byte-vector.h.
5488 (gdb_bfd_get_full_section_contents): New declaration.
5489 * gdb_bfd.c (gdb_bfd_get_full_section_contents): New function.
5490 * windows-tdep.c (is_linked_with_cygwin_dll): Use
5491 gdb_bfd_get_full_section_contents.
5492
5493 2020-04-02 Simon Marchi <simon.marchi@polymtl.ca>
5494
5495 * exec.c (build_section_table): Replace internal_error with
5496 gdb_assert.
5497 (section_table_xfer_memory_partial): Likewise.
5498 * mdebugread.c (parse_partial_symbols): Likewise.
5499 * psymtab.c (lookup_partial_symbol): Likewise.
5500 * utils.c (wrap_here): Likewise.
5501
5502 2020-04-02 Tom Tromey <tromey@adacore.com>
5503
5504 * f-lang.c (build_fortran_types): Use arch_type to initialize
5505 builtin_complex_s32 in the TYPE_CODE_ERROR case.
5506
5507 2020-04-02 Tom Tromey <tromey@adacore.com>
5508
5509 * dwarf2/read.c (partial_die_info::read): Do not create a vector
5510 of attributes.
5511
5512 2020-04-02 Andrew Burgess <andrew.burgess@embecosm.com>
5513 Bernd Edlinger <bernd.edlinger@hotmail.de>
5514 Tom Tromey <tromey@adacore.com>
5515
5516 * buildsym.c (buildsym_compunit::record_line): Remove
5517 deduplication code.
5518
5519 2020-04-02 Tom de Vries <tdevries@suse.de>
5520
5521 PR ada/24671
5522 * dwarf2/read.c (dw2_map_matching_symbols): Handle -readnow.
5523
5524 2020-04-02 Tom de Vries <tdevries@suse.de>
5525
5526 * dwarf2/read.c (dwarf2_gdb_index_functions,
5527 dwarf2_debug_names_functions): Init lookup_global_symbol_language with
5528 NULL.
5529 * psymtab.c (psym_lookup_global_symbol_language): New function.
5530 (psym_functions): Init psym_lookup_global_symbol_language with
5531 psym_lookup_global_symbol_language.
5532 * symfile-debug.c (debug_sym_quick_functions): Init
5533 lookup_global_symbol_language with NULL.
5534 * symfile.c (set_initial_language): Remove fixme comment.
5535 * symfile.h (struct quick_symbol_functions): Add
5536 lookup_global_symbol_language.
5537 * symtab.c (find_quick_global_symbol_language): New function.
5538 (find_main_name): Use find_quick_global_symbol_language.
5539
5540 2020-04-01 Simon Marchi <simon.marchi@polymtl.ca>
5541
5542 * windows-tdep.c (is_linked_with_cygwin_dll): Fix style.
5543
5544 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
5545
5546 * buildsym.c (record_line): Fix undefined behavior and preserve
5547 lines at eof.
5548
5549 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
5550
5551 * buildsym.c (record_line): Fix the resizing condition.
5552
5553 2020-04-01 Tom Tromey <tom@tromey.com>
5554
5555 * value.h (value_literal_complex): Add comment.
5556 * valops.c (value_literal_complex): Refer to value.h.
5557
5558 2020-04-01 Tom Tromey <tom@tromey.com>
5559
5560 * c-exp.y (FLOAT_KEYWORD, COMPLEX): New tokens.
5561 (scalar_type): New rule, from typebase.
5562 (typebase): Use scalar_type. Recognize complex types.
5563 (field_name): Handle FLOAT_KEYWORD.
5564 (ident_tokens): Add _Complex and __complex__.
5565
5566 2020-04-01 Tom Tromey <tom@tromey.com>
5567
5568 PR exp/25299:
5569 * valarith.c (promotion_type, complex_binop): New functions.
5570 (scalar_binop): Handle complex numbers. Use promotion_type.
5571 (value_pos, value_neg, value_complement): Handle complex numbers.
5572
5573 2020-04-01 Tom Tromey <tom@tromey.com>
5574
5575 * c-exp.y (COMPLEX_INT, COMPLEX_FLOAT): New tokens.
5576 (exp) <COMPLEX_INT, COMPLEX_FLOAT>: New rules.
5577 (parse_number): Handle complex numbers.
5578
5579 2020-04-01 Tom Tromey <tom@tromey.com>
5580
5581 * c-valprint.c (c_decorations): Change complex suffix to "i".
5582
5583 2020-04-01 Tom Tromey <tom@tromey.com>
5584
5585 * valprint.c (generic_value_print_complex): Use accessors.
5586 * value.h (value_real_part, value_imaginary_part): Declare.
5587 * valops.c (value_real_part, value_imaginary_part): New
5588 functions.
5589 * value.c (creal_internal_fn, cimag_internal_fn): Use accessors.
5590
5591 2020-04-01 Tom Tromey <tom@tromey.com>
5592
5593 * stabsread.c (rs6000_builtin_type, read_sun_floating_type)
5594 (read_range_type): Update.
5595 * mdebugread.c (basic_type): Update.
5596 * go-lang.c (build_go_types): Use init_complex_type.
5597 * gdbtypes.h (struct main_type) <complex_type>: New member.
5598 (init_complex_type): Update.
5599 (arch_complex_type): Don't declare.
5600 * gdbtypes.c (init_complex_type): Remove "objfile" parameter.
5601 Make name if none given. Use alloc_type_copy. Look for cached
5602 complex type.
5603 (arch_complex_type): Remove.
5604 (gdbtypes_post_init): Use init_complex_type.
5605 * f-lang.c (build_fortran_types): Use init_complex_type.
5606 * dwarf2/read.c (read_base_type): Update.
5607 * d-lang.c (build_d_types): Use init_complex_type.
5608 * ctfread.c (read_base_type): Update.
5609
5610 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5611
5612 * infrun.c (stop_all_threads): Update assertion, plus when
5613 stopping threads, take into account that we might be trying
5614 to stop an all-stop target.
5615 (stop_waiting): Call 'stop_all_threads' if there exists a
5616 non-stop target.
5617
5618 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5619
5620 * target.h (exists_non_stop_target): New function declaration.
5621 * target.c (exists_non_stop_target): New function.
5622
5623 2020-04-01 Hannes Domani <ssbssa@yahoo.de>
5624
5625 PR gdb/24789
5626 * eval.c (is_integral_or_integral_reference): New function.
5627 (evaluate_subexp_standard): Allow integer references in
5628 pointer arithmetic.
5629
5630 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5631
5632 * remote.c (remote_target::remote_parse_stop_reply): Remove the
5633 check for no ptid in the stop reply when the target is non-stop.
5634
5635 2020-04-01 Tom Tromey <tromey@adacore.com>
5636
5637 * symtab.h (class lookup_name_info) <lookup_name_info>: Change
5638 "name" parameter to rvalue reference. Initialize m_name_holder.
5639 <lookup_name_info>: New overloads.
5640 <name>: Return gdb::string_view.
5641 <c_str>: New method.
5642 <make_ignore_params>: Update.
5643 <search_name_hash>: Update.
5644 <language_lookup_name>: Return const char *.
5645 <m_name>: Change type.
5646 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info)
5647 (demangle_for_lookup_info::demangle_for_lookup_info): Update.
5648 (lookup_name_info::match_any): Update.
5649 * psymtab.c (match_partial_symbol, lookup_partial_symbol):
5650 Update.
5651 * minsyms.c (linkage_name_str): Update.
5652 * language.c (default_symbol_name_matcher): Update.
5653 * dwarf2/read.c (mapped_index_base::find_name_components_bounds):
5654 Update.
5655 * ada-lang.c (ada_fold_name): Change parameter to string_view.
5656 (ada_lookup_name_info::ada_lookup_name_info): Update.
5657 (literal_symbol_name_matcher): Update.
5658
5659 2020-04-01 Tom Tromey <tromey@adacore.com>
5660
5661 * psymtab.c (psymtab_search_name): Remove function.
5662 (psym_lookup_symbol): Create search name and lookup name here.
5663 (lookup_partial_symbol): Remove "name" parameter; add
5664 lookup_name.
5665 (psym_expand_symtabs_for_function): Update.
5666
5667 2020-03-31 Joel Jones <joelkevinjones@gmail.com>
5668
5669 PR tui/25597:
5670 * python/py-tui.c: Include gdb_curses.h inside of #ifdef TUI.
5671
5672 2020-03-31 Tom Tromey <tromey@adacore.com>
5673
5674 * dwarf2/abbrev.c (abbrev_table::read): Conditionally call
5675 memcpy.
5676
5677 2020-03-30 Nelson Chu <nelson.chu@sifive.com>
5678
5679 * features/riscv/32bit-csr.xml: Regenerated.
5680 * features/riscv/64bit-csr.xml: Regenerated.
5681
5682 2020-03-30 Tom Tromey <tromey@adacore.com>
5683
5684 * ada-valprint.c (print_variant_part): Update.
5685 * ada-lang.h (ada_which_variant_applies): Update.
5686 * ada-lang.c (ada_which_variant_applies): Remove outer_type and
5687 outer_valaddr parameters; replace with "outer" value parameter.
5688 (to_fixed_variant_branch_type): Update.
5689
5690 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5691
5692 * ppc-linux-nat.c: Include <algorithm>, <unordered_map>, and
5693 <list>. Remove inclusion of observable.h.
5694 (PPC_DEBUG_CURRENT_VERSION): Move up define.
5695 (struct arch_lwp_info): New struct.
5696 (class ppc_linux_dreg_interface): New class.
5697 (struct ppc_linux_process_info): New struct.
5698 (struct ppc_linux_nat_target) <low_delete_thread, low_new_fork>
5699 <low_new_clone, low_forget_process, low_prepare_to_resume>
5700 <copy_thread_dreg_state, mark_thread_stale>
5701 <mark_debug_registers_changed, register_hw_breakpoint>
5702 <clear_hw_breakpoint, register_wp, clear_wp>
5703 <can_use_watchpoint_cond_accel, calculate_dvc, check_condition>
5704 <num_memory_accesses, get_trigger_type>
5705 <create_watchpoint_request, hwdebug_point_cmp>
5706 <init_arch_lwp_info, get_arch_lwp_info>
5707 <low_stopped_by_watchpoint, low_stopped_data_address>: Declare as
5708 methods.
5709 <struct ptid_hash>: New inner struct.
5710 <m_dreg_interface, m_process_info, m_installed_hw_bps>: Declare
5711 members.
5712 (saved_dabr_value, hwdebug_info, max_slots_number)
5713 (struct hw_break_tuple, struct thread_points, ppc_threads)
5714 (have_ptrace_hwdebug_interface)
5715 (hwdebug_find_thread_points_by_tid)
5716 (hwdebug_insert_point, hwdebug_remove_point): Remove.
5717 (ppc_linux_nat_target::can_use_hw_breakpoint): Use
5718 m_dreg_interface, remove call to PTRACE_SET_DEBUGREG.
5719 (ppc_linux_nat_target::region_ok_for_hw_watchpoint): Add comment,
5720 use m_dreg_interface.
5721 (hwdebug_point_cmp): Change to...
5722 (ppc_linux_nat_target::hwdebug_point_cmp): ...this method. Use
5723 reference arguments instead of pointers.
5724 (ppc_linux_nat_target::ranged_break_num_registers): Use
5725 m_dreg_interface.
5726 (ppc_linux_nat_target::insert_hw_breakpoint): Add comment, use
5727 m_dreg_interface. Call register_hw_breakpoint.
5728 (ppc_linux_nat_target::remove_hw_breakpoint): Add comment, use
5729 m_dreg_interface. Call clear_hw_breakpoint.
5730 (get_trigger_type): Change to...
5731 (ppc_linux_nat_target::get_trigger_type): ...this method. Add
5732 comment.
5733 (ppc_linux_nat_target::insert_mask_watchpoint): Update comment,
5734 use m_dreg_interface. Call register_hw_breakpoint.
5735 (ppc_linux_nat_target::remove_mask_watchpoint): Update comment,
5736 use m_dreg_interface. Call clear_hw_breakpoint.
5737 (can_use_watchpoint_cond_accel): Change to...
5738 (ppc_linux_nat_target::can_use_watchpoint_cond_accel): ...this
5739 method. Update comment, use m_dreg_interface and
5740 m_process_info.
5741 (calculate_dvc): Change to...
5742 (ppc_linux_nat_target::calculate_dvc): ...this method. Use
5743 m_dreg_interface.
5744 (num_memory_accesses): Change to...
5745 (ppc_linux_nat_target::num_memory_accesses): ...this method.
5746 (check_condition): Change to...
5747 (ppc_linux_nat_target::check_condition): ...this method.
5748 (ppc_linux_nat_target::can_accel_watchpoint_condition): Update
5749 comment, use m_dreg_interface.
5750 (create_watchpoint_request): Change to...
5751 (ppc_linux_nat_target::create_watchpoint_request): ...this
5752 method. Use m_dreg_interface.
5753 (ppc_linux_nat_target::insert_watchpoint): Add comment, use
5754 m_dreg_interface. Call register_hw_breakpoint or register_wp.
5755 (ppc_linux_nat_target::remove_watchpoint): Add comment, use
5756 m_dreg_interface. Call clear_hw_breakpoint or clear_wp.
5757 (ppc_linux_nat_target::low_forget_process)
5758 (ppc_linux_nat_target::low_new_fork)
5759 (ppc_linux_nat_target::low_new_clone)
5760 (ppc_linux_nat_target::low_delete_thread)
5761 (ppc_linux_nat_target::low_prepare_to_resume): New methods.
5762 (ppc_linux_nat_target::low_new_thread): Remove previous logic,
5763 only call mark_thread_stale.
5764 (ppc_linux_thread_exit): Remove.
5765 (ppc_linux_nat_target::stopped_data_address): Change to...
5766 (ppc_linux_nat_target::low_stopped_data_address): This. Add
5767 comment, use m_dreg_interface and m_thread_hw_breakpoints.
5768 (ppc_linux_nat_target::stopped_by_watchpoint): Change to...
5769 (ppc_linux_nat_target::stopped_by_watchpoint): This. Add
5770 comment. Call low_stopped_data_address.
5771 (ppc_linux_nat_target::watchpoint_addr_within_range): Use
5772 m_dreg_interface.
5773 (ppc_linux_nat_target::masked_watch_num_registers): Use
5774 m_dreg_interface.
5775 (ppc_linux_nat_target::copy_thread_dreg_state)
5776 (ppc_linux_nat_target::mark_thread_stale)
5777 (ppc_linux_nat_target::mark_debug_registers_changed)
5778 (ppc_linux_nat_target::register_hw_breakpoint)
5779 (ppc_linux_nat_target::clear_hw_breakpoint)
5780 (ppc_linux_nat_target::register_wp)
5781 (ppc_linux_nat_target::clear_wp)
5782 (ppc_linux_nat_target::init_arch_lwp_info)
5783 (ppc_linux_nat_target::get_arch_lwp_info): New methods.
5784 (_initialize_ppc_linux_nat): Remove observer callback.
5785
5786 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5787
5788 * ppc-linux-nat.c (ppc_linux_nat_target::store_registers)
5789 (ppc_linux_nat_target::auxv_parse)
5790 (ppc_linux_nat_target::read_description)
5791 (supply_gregset, fill_gregset, supply_fpregset, fill_fpregset):
5792 Move up.
5793
5794 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5795
5796 * linux-nat.h (low_new_clone): New method.
5797 * linux-nat.c (linux_handle_extended_wait): Call low_new_clone.
5798
5799 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
5800
5801 * dbxread.c (dbx_psymtab_to_symtab_1): Rename to...
5802 (dbx_expand_psymtab): ... this.
5803 (start_psymtab): Update.
5804 * mdebugread.c (psymtab_to_symtab_1): Rename to...
5805 (mdebug_expand_psymtab): ... this.
5806 (parse_partial_symbols): Update.
5807 (new_psymtab): Update.
5808 * xcoffread.c (xcoff_psymtab_to_symtab_1): Rename to...
5809 (xcoff_expand_psymtab): ... this.
5810 (xcoff_start_psymtab): Update.
5811
5812 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
5813
5814 * psympriv.h (partial_symtab) <read_dependencies>: Rename to...
5815 <expand_dependencies>: ... this.
5816 * psymtab.c (partial_symtab::read_dependencies): Rename to...
5817 (partial_symtab::expand_dependencies): ... this.
5818 * dwarf2/read.c (dwarf2_include_psymtab) <expand_psymtab>:
5819 Update.
5820 (dwarf2_psymtab::expand_psymtab): Update.
5821 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
5822 * mdebugread.c (psymtab_to_symtab_1): Update.
5823 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
5824
5825 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
5826
5827 * psympriv.h (discard_psymtab): Remove.
5828 * dbxread.c (dbx_end_psymtab): Update.
5829 * xcoffread.c (xcoff_end_psymtab): Update.
5830
5831 2020-03-28 Tom Tromey <tom@tromey.com>
5832
5833 * dwarf2/attribute.h (struct attribute) <form_is_constant>: Update
5834 comment.
5835
5836 2020-03-28 Tom Tromey <tom@tromey.com>
5837
5838 * dwarf2/read.c (read_attribute_reprocess): Fix formatting.
5839
5840 2020-03-27 Hannes Domani <ssbssa@yahoo.de>
5841
5842 * windows-nat.c (windows_add_all_dlls): Fix system dll paths.
5843
5844 2020-03-26 John Baldwin <jhb@FreeBSD.org>
5845
5846 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_BSDFLAGS.
5847
5848 2020-03-26 Tom Tromey <tom@tromey.com>
5849
5850 * dwarf2/read.c (handle_data_member_location, dwarf2_add_field)
5851 (mark_common_block_symbol_computed, read_tag_string_type)
5852 (attr_to_dynamic_prop, read_subrange_type): Update.
5853 (dwarf2_get_ref_die_offset, dwarf2_get_attr_constant_value): Move
5854 to be methods on struct attribute.
5855 (skip_one_die, process_imported_unit_die, read_namespace_alias)
5856 (read_call_site_scope, partial_die_info::read)
5857 (partial_die_info::read, lookup_die_type, follow_die_ref):
5858 Update.
5859 * dwarf2/attribute.c (attribute::get_ref_die_offset): New method,
5860 from dwarf2_get_ref_die_offset.
5861 (attribute::constant_value): New method, from
5862 dwarf2_get_attr_constant_value.
5863 * dwarf2/attribute.h (struct attribute) <get_ref_die_offset>:
5864 Declare method.
5865 <constant_value>: New method.
5866
5867 2020-03-26 Tom Tromey <tom@tromey.com>
5868
5869 * dwarf2/read.c (dwarf_unit_type_name, dwarf_tag_name)
5870 (dwarf_attr_name, dwarf_form_name, dwarf_bool_name)
5871 (dwarf_type_encoding_name): Move to stringify.c.
5872 * Makefile.in (COMMON_SFILES): Add dwarf2/stringify.c.
5873 * dwarf2/stringify.c: New file.
5874 * dwarf2/stringify.h: New file.
5875
5876 2020-03-26 Tom Tromey <tom@tromey.com>
5877
5878 * dwarf2/die.h (struct die_info) <addr_base, ranges_base>:
5879 Rewrite.
5880
5881 2020-03-26 Tom Tromey <tom@tromey.com>
5882
5883 * dwarf2/die.h (struct die_info) <addr_base, ranges_base>: New
5884 methods.
5885 * dwarf2/read.c (lookup_addr_base): Move to die.h.
5886 (lookup_ranges_base): Likewise.
5887 (read_cutu_die_from_dwo, read_full_die_1): Update.
5888
5889 2020-03-26 Tom Tromey <tom@tromey.com>
5890
5891 * dwarf2/read.c (read_import_statement, read_file_scope)
5892 (read_type_unit_scope, inherit_abstract_dies, read_func_scope)
5893 (read_lexical_block_scope, read_call_site_scope)
5894 (dwarf2_get_subprogram_pc_bounds, get_scope_pc_bounds)
5895 (handle_struct_member_die, process_structure_scope)
5896 (update_enumeration_type_from_children)
5897 (process_enumeration_scope, read_array_type, read_common_block)
5898 (read_namespace, read_module, read_subroutine_type): Update.
5899 (sibling_die): Remove.
5900
5901 2020-03-26 Tom Tromey <tom@tromey.com>
5902
5903 * dwarf2/read.c (lookup_addr_base, lookup_ranges_base)
5904 (build_type_psymtabs_reader, read_structure_type)
5905 (read_enumeration_type, read_full_die_1): Update.
5906 (dwarf2_attr_no_follow): Move to die.h.
5907 * dwarf2/die.h (struct die_info) <attr>: New method.
5908
5909 2020-03-26 Tom Tromey <tom@tromey.com>
5910
5911 * dwarf2/read.c (struct dwarf2_cu) <base_known>: Remove.
5912 <base_address>: Now an optional.
5913 (dwarf2_find_base_address, dwarf2_rnglists_process)
5914 (dwarf2_ranges_process, fill_in_loclist_baton)
5915 (dwarf2_symbol_mark_computed): Update.
5916
5917 2020-03-26 Tom Tromey <tom@tromey.com>
5918
5919 * dwarf2/read.c (struct die_info): Move to die.h.
5920 * dwarf2/die.h: New file.
5921
5922 2020-03-26 Tom Tromey <tom@tromey.com>
5923
5924 * dwarf2/line-header.h (dwarf_decode_line_header): Declare.
5925 * dwarf2/read.c
5926 (dwarf2_statement_list_fits_in_line_number_section_complaint):
5927 Move to line-header.c.
5928 (read_checked_initial_length_and_offset, read_formatted_entries):
5929 Likewise.
5930 (dwarf_decode_line_header): Split into two.
5931 * dwarf2/line-header.c
5932 (dwarf2_statement_list_fits_in_line_number_section_complaint):
5933 Move from read.c.
5934 (read_checked_initial_length_and_offset, read_formatted_entries):
5935 Likewise.
5936 (dwarf_decode_line_header): New function, split from read.c.
5937
5938 2020-03-26 Tom Tromey <tom@tromey.com>
5939
5940 * dwarf2/read.h (struct dwarf2_per_objfile) <read_line_string>:
5941 Declare method.
5942 * dwarf2/read.c (read_attribute_value): Update.
5943 (dwarf2_per_objfile::read_line_string): Rename from
5944 read_indirect_line_string.
5945 (read_formatted_entries): Update.
5946
5947 2020-03-26 Tom Tromey <tom@tromey.com>
5948
5949 * dwarf2/macro.c (dwarf_decode_macro_bytes): Use objfile local
5950 variable.
5951
5952 2020-03-26 Tom Tromey <tom@tromey.com>
5953
5954 * dwarf2/macro.h (dwarf_decode_macros): Make section parameter
5955 const.
5956 * dwarf2/macro.c (skip_form_bytes, skip_unknown_opcode)
5957 (dwarf_decode_macro_bytes, dwarf_decode_macros): Make section
5958 parameter const.
5959
5960 2020-03-26 Tom Tromey <tom@tromey.com>
5961
5962 * dwarf2/read.c (dwarf_decode_macros): Make "lh" const.
5963 * dwarf2/macro.h (dwarf_decode_macros): Constify "lh" parameter.
5964 * dwarf2/macro.c (macro_start_file): Constify "lh" parameter.
5965 (dwarf_decode_macro_bytes, dwarf_decode_macros): Likewise.
5966
5967 2020-03-26 Tom Tromey <tom@tromey.com>
5968
5969 * dwarf2/line-header.h (struct line_header) <is_valid_file_index,
5970 file_names_size, file_full_name, file_file_name>: Use const.
5971 <file_name_at, file_names>: Add const overload.
5972 * dwarf2/line-header.c (line_header::file_file_name)
5973 (line_header::file_full_name): Update.
5974
5975 2020-03-26 Tom Tromey <tom@tromey.com>
5976
5977 * dwarf2/read.c (dwarf2_macro_malformed_definition_complaint)
5978 (macro_start_file, consume_improper_spaces)
5979 (parse_macro_definition, skip_form_bytes, skip_unknown_opcode)
5980 (dwarf_parse_macro_header, dwarf_decode_macro_bytes)
5981 (dwarf_decode_macros): Move to macro.c.
5982 * dwarf2/macro.c: New file.
5983 * dwarf2/macro.h: New file.
5984 * Makefile.in (COMMON_SFILES): Add dwarf2/macro.c.
5985
5986 2020-03-26 Tom Tromey <tom@tromey.com>
5987
5988 * dwarf2/section.h (struct dwarf2_section_info) <read_string>: New
5989 method.
5990 * dwarf2/section.c: New method. From
5991 read_indirect_string_at_offset_from.
5992 * dwarf2/read.c (mapped_debug_names::namei_to_name): Update.
5993 (read_indirect_string_at_offset_from): Move to section.c.
5994 (read_indirect_string_at_offset): Rewrite.
5995 (read_indirect_line_string_at_offset): Remove.
5996 (read_indirect_string, read_indirect_line_string)
5997 (dwarf_decode_macro_bytes): Update.
5998
5999 2020-03-26 Tom Tromey <tom@tromey.com>
6000
6001 * dwarf2/section.h (struct dwarf2_section_info)
6002 <overload_complaint>: Declare.
6003 (dwarf2_section_buffer_overflow_complaint): Don't declare.
6004 * dwarf2/section.c (dwarf2_section_info::overflow_complaint):
6005 Rename from dwarf2_section_buffer_overflow_complaint.
6006 * dwarf2/read.c (skip_one_die, partial_die_info::read)
6007 (skip_form_bytes, dwarf_decode_macro_bytes): Update.
6008
6009 2020-03-26 Tom Tromey <tom@tromey.com>
6010
6011 * dwarf2/section.h (dwarf2_section_buffer_overflow_complaint):
6012 Declare.
6013 * dwarf2/section.c (dwarf2_section_buffer_overflow_complaint):
6014 Move from read.c.
6015 * dwarf2/read.c (dwarf2_section_buffer_overflow_complaint): Move
6016 to section.c.
6017
6018 2020-03-26 Tom Tromey <tom@tromey.com>
6019
6020 * dwarf2/read.c (dwarf_decode_macros): Split into two overloads.
6021
6022 2020-03-26 Tom Tromey <tom@tromey.com>
6023
6024 * dwarf2/read.c (macro_start_file): Change "cu" parameter to
6025 "builder".
6026 (dwarf_decode_macro_bytes): Likewise. Add dwarf2_per_objfile
6027 parameter.
6028 (dwarf_decode_macros): Update.
6029
6030 2020-03-26 Tom Tromey <tom@tromey.com>
6031
6032 * dwarf2/read.c (read_attribute_value): Update.
6033 (read_indirect_string_from_dwz): Move to dwz.c; change into
6034 method.
6035 (dwarf_decode_macro_bytes): Update.
6036 * dwarf2/dwz.h (struct dwz_file) <read_string>: Declare method.
6037 * dwarf2/dwz.c: New file.
6038 * Makefile.in (COMMON_SFILES): Add dwz.c.
6039
6040 2020-03-26 Tom Tromey <tom@tromey.com>
6041
6042 * dwarf2/read.h (struct dwz_file): Move to dwz.h.
6043 * dwarf2/read.c: Add include.
6044 * dwarf2/index-write.c: Add include.
6045 * dwarf2/index-cache.c: Add include.
6046 * dwarf2/dwz.h: New file.
6047
6048 2020-03-25 Tom Tromey <tom@tromey.com>
6049
6050 * compile/compile-object-load.c (get_out_value_type): Mention
6051 correct symbol name in error message.
6052
6053 2020-03-25 Hannes Domani <ssbssa@yahoo.de>
6054
6055 * windows-nat.c (windows_add_all_dlls): Fix system dll paths.
6056
6057 2020-03-25 Tom de Vries <tdevries@suse.de>
6058
6059 * symtab.h (is_main_symtab_of_compunit_symtab): New function.
6060 * symmisc.c (dump_symtab_1): Print user and includes fields.
6061 (maintenance_info_symtabs): Same.
6062
6063 2020-03-25 Andrew Burgess <andrew.burgess@embecosm.com>
6064
6065 PR gdb/25534
6066 * riscv-tdep.c (riscv_arg_info::c_offset): Update comment.
6067 (riscv_regcache_cooked_write): New function.
6068 (riscv_push_dummy_call): Use new function.
6069 (riscv_return_value): Likewise.
6070
6071 2020-03-24 Simon Marchi <simon.marchi@polymtl.ca>
6072
6073 * fbsd-nat.c (fbsd_nat_target::follow_fork): Change bool to int.
6074 * fbsd-nat.h (class fbsd_nat_target) <follow_fork>: Likewise.
6075 * inf-ptrace.c (inf_ptrace_target::follow_fork): Likewise.
6076 * inf-ptrace.h (struct inf_ptrace_target) <follow_fork>: Likewise.
6077 * infrun.c (follow_fork): Likewise.
6078 (follow_fork_inferior): Likewise.
6079 * linux-nat.c (linux_nat_target::follow_fork): Likewise.
6080 * linux-nat.h (class linux_nat_target): Likewise.
6081 * remote.c (class remote_target) <follow_fork>: Likewise.
6082 (remote_target::follow_fork): Likewise.
6083 * target-delegates.c: Re-generate.
6084 * target.c (default_follow_fork): Likewise.
6085 (target_follow_fork): Likewise.
6086 * target.h (struct target_ops) <follow_fork>: Likewise.
6087 (target_follow_fork): Likewise.
6088
6089 2020-03-24 Tom de Vries <tdevries@suse.de>
6090
6091 * psymtab.c (maintenance_info_psymtabs): Print user field.
6092
6093 2020-03-20 Tom Tromey <tromey@adacore.com>
6094
6095 * dwarf2/loc.h (dwarf2_evaluate_property): Make "addr_stack"
6096 const.
6097 * dwarf2/loc.c (dwarf2_evaluate_property): Make "addr_stack"
6098 const.
6099
6100 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
6101
6102 * ptrace.m4: Don't check for ptrace declaration.
6103 * config.in: Re-generate.
6104 * configure: Re-generate.
6105 * nat/gdb_ptrace.h: Don't declare ptrace if HAVE_DECL_PTRACE is
6106 not defined.
6107
6108 2020-03-20 Kamil Rytarowski <n54@gmx.com>
6109
6110 * amd64-bsd-nat.c (gdb_ptrace): Change return type from `int' to
6111 `PTRACE_TYPE_RET'.
6112 * i386-bsd-nat.c (gdb_ptrace): Likewise.
6113 * sparc-nat.c (gdb_ptrace): Likewise.
6114 * x86-bsd-nat.c (gdb_ptrace): Likewise.
6115
6116 2020-03-20 Tom Tromey <tromey@adacore.com>
6117
6118 * c-exp.y (lex_one_token): Fix assert.
6119
6120 2020-03-20 Tom Tromey <tromey@adacore.com>
6121
6122 * ada-tasks.c (read_atcb): Use smaller length in strncpy call.
6123 * linux-tdep.c (linux_fill_prpsinfo): Use smaller length in
6124 strncpy call.
6125
6126 2020-03-20 Tom Tromey <tromey@adacore.com>
6127
6128 * symmisc.c (maintenance_print_one_line_table): Use ui_out.
6129
6130 2020-03-20 Tom Tromey <tromey@adacore.com>
6131
6132 * ada-valprint.c (print_variant_part): Remove parameters; switch
6133 to value-based API.
6134 (print_field_values): Likewise.
6135 (ada_val_print_struct_union): Likewise.
6136 (ada_value_print_1): Update.
6137
6138 2020-03-20 Kamil Rytarowski <n54@gmx.com>
6139
6140 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): Inherit from
6141 nbsd_nat_target instead of inf_ptrace_target.
6142 * ppc-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
6143 nbsd_nat_target.
6144
6145 2020-03-20 Kamil Rytarowski <n54@gmx.com>
6146
6147 * hppa-nbsd-nat.c (fetch_registers): New variable lwp and pass
6148 it to the ptrace call.
6149 * (store_registers): Likewise.
6150
6151 2020-03-20 Kamil Rytarowski <n54@gmx.com>
6152
6153 * ppc-nbsd-nat.c (fetch_registers): New variable lwp and pass
6154 it to the ptrace call.
6155 * (store_registers): Likewise.
6156
6157 2020-03-19 Luis Machado <luis.machado@linaro.org>
6158
6159 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_set_vq): If vg is not
6160 valid, fetch vg value from ptrace.
6161
6162 2020-03-19 Kamil Rytarowski <n54@gmx.com>
6163 * inf-ptrace.h: Disable get_ptrace_pid on NetBSD.
6164 * inf-ptrace.c: Likewise.
6165 * (gdb_ptrace): Add.
6166 * (inf_ptrace_target::resume): Update.
6167 * (inf_ptrace_target::xfer_partial): Likewise.
6168 * (inf_ptrace_peek_poke): Change argument `pid' to `ptid'.
6169 * (inf_ptrace_peek_poke): Update.
6170
6171 2020-03-19 Kamil Rytarowski <n54@gmx.com>
6172
6173 * x86-bsd-nat.c (gdb_ptrace): New.
6174 * (x86bsd_dr_set): Add new argument `ptid'.
6175 * (x86bsd_dr_get, x86bsd_dr_set, x86bsd_dr_set_control,
6176 x86bsd_dr_set_addr): Update.
6177
6178 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
6179
6180 * remote.c (remote_target::process_stop_reply): Handle events for
6181 all threads differently.
6182
6183 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
6184
6185 * completer.c (completion_tracker::remove_completion): Define new
6186 function.
6187 * completer.h (completion_tracker::remove_completion): Declare new
6188 function.
6189 * symtab.c (completion_list_add_symbol): Remove aliasing msymbols
6190 when adding a C++ function symbol.
6191
6192 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
6193
6194 * completer.c (completion_tracker::completion_hash_entry): Define
6195 new class.
6196 (advance_to_filename_complete_word_point): Call
6197 recompute_lowest_common_denominator.
6198 (completion_tracker::completion_tracker): Call discard_completions
6199 to setup the hash table.
6200 (completion_tracker::discard_completions): Allow for being called
6201 from the constructor, pass new equal function, and element deleter
6202 when constructing the hash table. Initialise new class member
6203 variables.
6204 (completion_tracker::maybe_add_completion): Remove use of
6205 m_entries_vec, and store more information into m_entries_hash.
6206 (completion_tracker::recompute_lcd_visitor): New function, most
6207 content taken from...
6208 (completion_tracker::recompute_lowest_common_denominator):
6209 ...here, this now just visits each item in the hash calling the
6210 above visitor.
6211 (completion_tracker::build_completion_result): Remove use of
6212 m_entries_vec, call recompute_lowest_common_denominator.
6213 * completer.h (completion_tracker::have_completions): Remove use
6214 of m_entries_vec.
6215 (completion_tracker::completion_hash_entry): Declare new class.
6216 (completion_tracker::recompute_lowest_common_denominator): Change
6217 function signature.
6218 (completion_tracker::recompute_lcd_visitor): Declare new function.
6219 (completion_tracker::m_entries_vec): Delete.
6220 (completion_tracker::m_entries_hash): Initialize to NULL.
6221 (completion_tracker::m_lowest_common_denominator_valid): New
6222 member variable.
6223 (completion_tracker::m_lowest_common_denominator_max_length): New
6224 member variable.
6225
6226 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6227
6228 * regformats/regdef.h: Put reg in gdb namespace.
6229
6230 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6231
6232 * i386-bsd-nat.c (gdb_ptrace): New.
6233 * (i386bsd_fetch_inferior_registers,
6234 i386bsd_store_inferior_registers) Switch from pid_t to ptid_t.
6235 * (i386bsd_fetch_inferior_registers,
6236 i386bsd_store_inferior_registers) Use gdb_ptrace.
6237
6238 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6239
6240 * amd64-bsd-nat.c (gdb_ptrace): New.
6241 * (amd64bsd_fetch_inferior_registers,
6242 amd64bsd_store_inferior_registers) Switch from pid_t to ptid_t.
6243 * (amd64bsd_fetch_inferior_registers,
6244 amd64bsd_store_inferior_registers) Use gdb_ptrace.
6245
6246 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6247
6248 * user-regs.c (user_reg::read): Rename to...
6249 (user_reg::xread): ...this.
6250 * (append_user_reg): Rename argument `read' to `xread'.
6251 * (user_reg_add_builtin): Likewise.
6252 * (user_reg_add): Likewise.
6253 * (value_of_user_reg): Likewise.
6254
6255 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6256
6257 * sparc-nat.c (gdb_ptrace): New.
6258 * sparc-nat.c (sparc_fetch_inferior_registers)
6259 (sparc_store_inferior_registers) Remove obsolete comment.
6260 * sparc-nat.c (sparc_fetch_inferior_registers)
6261 (sparc_store_inferior_registers) Switch from pid_t to ptid_t.
6262 * sparc-nat.c (sparc_fetch_inferior_registers)
6263 (sparc_store_inferior_registers) Use gdb_ptrace.
6264
6265 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6266
6267 * sh-nbsd-nat.c (fetch_registers): New variable lwp and pass
6268 it to the ptrace call.
6269 * sh-nbsd-nat.c (store_registers): Likewise.
6270
6271 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6272
6273 * sh-nbsd-nat.c (sh_nbsd_nat_target): Inherit from
6274 nbsd_nat_target instead of inf_ptrace_target.
6275 * sh-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
6276 nbsd_nat_target.
6277
6278 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6279
6280 * amd64-bsd-nat.c: Include amd64-bsd-nat.h".
6281
6282 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6283
6284 * nbsd-nat.c: Include <sys/types.h>, <sys/ptrace.h> and
6285 <sys/sysctl.h>.
6286 * nbsd-nat.c (nbsd_nat_target::pid_to_exec_file): Rewrite.
6287
6288 2020-03-17 Tom de Vries <tdevries@suse.de>
6289
6290 PR gdb/23710
6291 * dwarf2/read.h (struct dwarf2_per_cu_data): Add unit_type and lang
6292 fields.
6293 * dwarf2/read.c (process_psymtab_comp_unit): Initialize unit_type and lang
6294 fields.
6295 (process_imported_unit_die): Skip import of c++ CUs.
6296
6297 2020-03-16 Tom Tromey <tom@tromey.com>
6298
6299 * p-valprint.c (pascal_object_print_value): Initialize
6300 base_value.
6301
6302 2020-03-16 Anton Kolesov <anton.kolesov@synopsys.com>
6303 Shahab Vahedi <shahab@synopsys.com>
6304
6305 * Makefile.in: Add arch/arc.o
6306 * configure.tgt: Likewise.
6307 * arc-tdep.c (arc_tdesc_init): Use arc_read_description.
6308 (_initialize_arc_tdep): Don't initialize old target descriptions.
6309 (arc_read_description): New function to cache target descriptions.
6310 * arc-tdep.h (arc_read_description): Add proto type.
6311 * arch/arc.c: New file.
6312 * arch/arc.h: Likewise.
6313 * features/Makefile: Replace old target descriptions with new.
6314 * features/arc-arcompact.c: Remove.
6315 * features/arc-arcompact.xml: Likewise.
6316 * features/arc-v2.c: Likewise
6317 * features/arc-v2.xml: Likewise
6318 * features/arc/aux-arcompact.xml: New file.
6319 * features/arc/aux-v2.xml: Likewise.
6320 * features/arc/core-arcompact.xml: Likewise.
6321 * features/arc/core-v2.xml: Likewise.
6322 * features/arc/aux-arcompact.c: Generate.
6323 * features/arc/aux-v2.c: Likewise.
6324 * features/arc/core-arcompact.c: Likewise.
6325 * features/arc/core-v2.c: Likewise.
6326 * target-descriptions (maint_print_c_tdesc_cmd): Support ARC features.
6327
6328 2020-03-16 Tom Tromey <tromey@adacore.com>
6329
6330 PR gdb/25663:
6331 * dwarf2/read.c (dwarf2_name): Strip leading namespaces after
6332 putting value into bcache.
6333
6334 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
6335
6336 PR gdb/21500
6337 * amd64-windows-tdep.c (amd64_windows_init_abi): Rename
6338 to...
6339 (amd64_windows_init_abi_common): ... this. Don't set size of
6340 long type.
6341 (amd64_windows_init_abi): New function.
6342 (amd64_cygwin_init_abi): New function.
6343 (_initialize_amd64_windows_tdep): Use amd64_cygwin_init_abi for
6344 the Cygwin OS ABI.
6345 * i386-windows-tdep.c (_initialize_i386_windows_tdep): Clarify
6346 comment.
6347
6348 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
6349
6350 * windows-tdep.h (is_linked_with_cygwin_dll): New declaration.
6351 * windows-tdep.c (CYGWIN_DLL_NAME): New.
6352 (pe_import_directory_entry): New struct type.
6353 (is_linked_with_cygwin_dll): New function.
6354 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Select
6355 GDB_OSABI_CYGWIN if the BFD is linked with the Cygwin DLL.
6356 * i386-windows-tdep.c (i386_windows_osabi_sniffer): Likewise.
6357
6358 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
6359
6360 * i386-windows-tdep.c: Mass-rename "cygwin" to "windows", except
6361 i386_cygwin_core_osabi_sniffer.
6362
6363 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
6364
6365 * i386-cygwin-tdep.c: Rename to...
6366 * i386-windows-tdep.c: ... this.
6367 * Makefile.in (ALL_TARGET_OBS): Rename i386-cygwin-tdep.c to
6368 i386-windows-tdep.c.
6369 * configure.tgt: Likewise.
6370
6371 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
6372
6373 * osabi.h (enum gdb_osabi): Add GDB_OSABI_WINDOWS.
6374 * osabi.c (gdb_osabi_names): Add "Windows".
6375 * i386-cygwin-tdep.c (i386_cygwin_osabi_sniffer): Return
6376 GDB_OSABI_WINDOWS when the binary's target is "pei-i386".
6377 (i386_cygwin_core_osabi_sniffer): New function, extracted from
6378 i386_cygwin_osabi_sniffer.
6379 (_initialize_i386_cygwin_tdep): Register OS ABI
6380 GDB_OSABI_WINDOWS for i386.
6381 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Return
6382 GDB_OSABI_WINDOWS when the binary's target is "pei-x86-64".
6383 (_initialize_amd64_windows_tdep): Register OS ABI GDB_OSABI_WINDOWS
6384 for x86-64.
6385 * configure.tgt: Use GDB_OSABI_WINDOWS as the default OS ABI
6386 when the target matches '*-*-mingw*'.
6387
6388 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
6389
6390 * defs.h (enum gdb_osabi): Move to...
6391 * osabi.h (enum gdb_osabi): ... here.
6392 * gdbarch.sh: Include osabi.h in gdbarch.h.
6393 * gdbarch.h: Re-generate.
6394
6395 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
6396
6397 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): New
6398 function.
6399 (_initialize_amd64_windows_tdep): Register osabi sniffer.
6400
6401 2020-03-14 Tom Tromey <tom@tromey.com>
6402
6403 * c-typeprint.c (cp_type_print_method_args): Print "__restrict__"
6404 for C++.
6405 (c_type_print_modifier): Likewise. Add "language" parameter.
6406 (c_type_print_varspec_prefix, c_type_print_base_struct_union)
6407 (c_type_print_base_1): Update.
6408 * type-stack.h (enum type_pieces) <tp_atomic, tp_restrict>: New
6409 constants.
6410 * type-stack.c (type_stack::insert): Handle tp_atomic and
6411 tp_restrict.
6412 (type_stack::follow_type_instance_flags): Likewise.
6413 (type_stack::follow_types): Likewise. Merge type-following code.
6414 * c-exp.y (RESTRICT, ATOMIC): New tokens.
6415 (space_identifier, cv_with_space_id)
6416 (const_or_volatile_or_space_identifier_noopt)
6417 (const_or_volatile_or_space_identifier): Remove.
6418 (single_qualifier, qualifier_seq_noopt, qualifier_seq): New
6419 rules.
6420 (ptr_operator, typebase): Update.
6421 (enum token_flag) <FLAG_C>: New constant.
6422 (ident_tokens): Add "restrict", "__restrict__", "__restrict", and
6423 "_Atomic".
6424 (lex_one_token): Handle FLAG_C.
6425
6426 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6427
6428 * m68k-bsd-nat.c (fetch_registers): New variable lwp and pass
6429 it to the ptrace call.
6430 * m68k-bsd-nat.c (store_registers): Likewise.
6431
6432 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6433
6434 * m68k-bsd-nat.c (m68kbsd_supply_gregset): Change type of regs to
6435 gdb_byte *.
6436 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
6437 * m68k-bsd-nat.c (m68kbsd_collect_gregset): Likewise.
6438 * m68k-bsd-nat.c (m68kbsd_supply_pcb): Cast &tmp to gdb_byte *.
6439
6440 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6441
6442 * m68k-bsd-nat.c (m68k_bsd_nat_target): Inherit from
6443 nbsd_nat_target instead of inf_ptrace_target.
6444 * m68k-bsd-nat.c: Include "nbsd-nat.h", as we are now using
6445 nbsd_nat_target.
6446
6447 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6448
6449 * m68k-bsd-nat.c: Define _KERNTYPES to get the declaration of
6450 register_t.
6451
6452 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6453
6454 * alpha-bsd-nat.c (fetch_registers): New variable lwp and pass
6455 it to the ptrace call.
6456 * alpha-bsd-nat.c (store_registers): Likewise.
6457
6458 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6459
6460 * alpha-bsd-nat.c: Remove <sys/procfs.h> and "gregset.h" from
6461 includes.
6462 * alpha-bsd-nat.c (gregset_t, fpregset_t): Remove.
6463 * alpha-bsd-nat.c (supply_gregset, fill_gregset, supply_fpregset,
6464 fill_fpregset): Likewise.
6465
6466 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6467
6468 * alpha-bsd-nat.c (alpha_netbsd_nat_target): Inherit from
6469 nbsd_nat_target instead of inf_ptrace_target.
6470 * alpha-bsd-nat.c: Include "nbsd-nat.h", as we are now using
6471 nbsd_nat_target.
6472
6473 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6474
6475 * alpha-bsd-nat.c: Define _KERNTYPES to get the declaration of
6476 register_t.
6477
6478 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6479
6480 * arm-nbsd-nat.c (fetch_register): New variable lwp and pass
6481 it to the ptrace call.
6482 * arm-nbsd-nat.c (fetch_fp_register): Likewise.
6483 * arm-nbsd-nat.c (fetch_fp_regs): Likewise.
6484 * arm-nbsd-nat.c (store_register): Likewise.
6485 * arm-nbsd-nat.c (store_regs): Likewise.
6486 * arm-nbsd-nat.c (store_fp_register): Likewise.
6487 * arm-nbsd-nat.c (store_fp_regs): Likewise.
6488
6489 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6490
6491 * arm-nbsd-nat.c (arm_netbsd_nat_target): Inherit from
6492 nbsd_nat_target instead of inf_ptrace_target.
6493 * arm-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
6494 nbsd_nat_target.
6495
6496 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6497
6498 * x86-bsd-nat.c (x86bsd_dr_get): New variable lwp and pass
6499 it to the ptrace call.
6500 * x86-bsd-nat.c (x86bsd_dr_set): Likewise.
6501
6502 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6503
6504 * vax-bsd-nat.c (vaxbsd_supply_gregset): New variable lwp and pass
6505 it to the ptrace call.
6506 * vax-bsd-nat.c (vaxbsd_collect_gregset): Likewise.
6507
6508 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6509
6510 * vax-bsd-nat.c (vaxbsd_supply_gregset): Cast gregs to const
6511 gdb_byte *.
6512 * vax-bsd-nat.c (vaxbsd_collect_gregset): Cast gregs to void *.
6513
6514 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6515
6516 * vax-bsd-nat.c (vax_bsd_nat_target): Inherit from nbsd_nat_target
6517 instead of inf_ptrace_target.
6518 * vax-bsd-nat.c: Include "nbsd-nat.h", as we are now using
6519 nbsd_nat_target.
6520
6521 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6522
6523 * mips-nbsd-nat.c: Define _KERNTYPES to get the declaration of
6524 register_t.
6525
6526 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6527
6528 * ppc-nbsd-nat.c: Define _KERNTYPES to get the declaration of
6529 register_t.
6530
6531 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6532
6533 * vax-bsd-nat.c: Define _KERNTYPES to get the declaration of
6534 register_t.
6535
6536 2020-03-13 Tom Tromey <tom@tromey.com>
6537
6538 * value.h (val_print): Don't declare.
6539 * valprint.h (val_print_array_elements)
6540 (val_print_scalar_formatted, generic_val_print): Don't declare.
6541 * valprint.c (generic_val_print_array): Take a struct value.
6542 (generic_val_print_ptr, generic_val_print_memberptr)
6543 (generic_val_print_bool, generic_val_print_int)
6544 (generic_val_print_char, generic_val_print_complex)
6545 (generic_val_print): Remove.
6546 (generic_value_print): Update.
6547 (do_val_print): Remove unused parameters. Don't call
6548 la_val_print.
6549 (val_print): Remove.
6550 (common_val_print): Update. Don't call value_check_printable.
6551 (val_print_scalar_formatted, val_print_array_elements): Remove.
6552 * rust-lang.c (rust_val_print): Remove.
6553 (rust_language_defn): Update.
6554 * p-valprint.c (pascal_val_print): Remove.
6555 (pascal_value_print_inner): Update.
6556 (pascal_object_print_val_fields, pascal_object_print_val):
6557 Remove.
6558 (pascal_object_print_static_field): Update.
6559 * p-lang.h (pascal_val_print): Don't declare.
6560 * p-lang.c (pascal_language_defn): Update.
6561 * opencl-lang.c (opencl_language_defn): Update.
6562 * objc-lang.c (objc_language_defn): Update.
6563 * m2-valprint.c (m2_print_unbounded_array, m2_val_print): Remove.
6564 * m2-lang.h (m2_val_print): Don't declare.
6565 * m2-lang.c (m2_language_defn): Update.
6566 * language.h (struct language_defn) <la_val_print>: Remove.
6567 * language.c (unk_lang_value_print_inner): Rename. Change
6568 argument types.
6569 (unknown_language_defn, auto_language_defn): Update.
6570 * go-valprint.c (go_val_print): Remove.
6571 * go-lang.h (go_val_print): Don't declare.
6572 * go-lang.c (go_language_defn): Update.
6573 * f-valprint.c (f_val_print): Remove.
6574 * f-lang.h (f_value_print): Don't declare.
6575 * f-lang.c (f_language_defn): Update.
6576 * d-valprint.c (d_val_print): Remove.
6577 * d-lang.h (d_value_print): Don't declare.
6578 * d-lang.c (d_language_defn): Update.
6579 * cp-valprint.c (cp_print_value_fields)
6580 (cp_print_value_fields_rtti, cp_print_value): Remove.
6581 (cp_print_static_field): Update.
6582 * c-valprint.c (c_val_print_array, c_val_print_ptr)
6583 (c_val_print_struct, c_val_print_union, c_val_print_int)
6584 (c_val_print_memberptr, c_val_print): Remove.
6585 * c-lang.h (c_val_print_array, cp_print_value_fields)
6586 (cp_print_value_fields_rtti): Don't declare.
6587 * c-lang.c (c_language_defn, cplus_language_defn)
6588 (asm_language_defn, minimal_language_defn): Update.
6589 * ada-valprint.c (ada_val_print_ptr, ada_val_print_num): Remove.
6590 (ada_val_print_enum): Take a struct value.
6591 (ada_val_print_flt, ada_val_print_array, ada_val_print_1)
6592 (ada_val_print): Remove.
6593 (ada_value_print_1): Update.
6594 (printable_val_type): Remove.
6595 * ada-lang.h (ada_val_print): Don't declare.
6596 * ada-lang.c (ada_language_defn): Update.
6597
6598 2020-03-13 Tom Tromey <tom@tromey.com>
6599
6600 * valprint.c (do_val_print): Update.
6601 * python/python-internal.h (gdbpy_apply_val_pretty_printer): Take
6602 a struct value.
6603 (value_to_value_object_no_release): Declare.
6604 * python/py-value.c (value_to_value_object_no_release): New
6605 function.
6606 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Take a
6607 struct value.
6608 * guile/scm-value.c (vlscm_scm_from_value_no_release): New
6609 function.
6610 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer): Take
6611 a struct value.
6612 * guile/guile-internal.h (vlscm_scm_from_value_no_release):
6613 Declare.
6614 (gdbscm_apply_val_pretty_printer): Take a struct value.
6615 * extension.h (apply_ext_lang_val_pretty_printer): Take a struct
6616 value.
6617 * extension.c (apply_ext_lang_val_pretty_printer): Take a struct
6618 value.
6619 * extension-priv.h (struct extension_language_ops)
6620 <apply_val_pretty_printer>: Take a struct value.
6621 * cp-valprint.c (cp_print_value): Create a struct value.
6622 (cp_print_value): Update.
6623
6624 2020-03-13 Tom Tromey <tom@tromey.com>
6625
6626 * ada-valprint.c (print_field_values): Call common_val_print.
6627
6628 2020-03-13 Tom Tromey <tom@tromey.com>
6629
6630 * ada-valprint.c (val_print_packed_array_elements): Remove
6631 bitoffset and val parameters. Call common_val_print.
6632 (ada_val_print_string): Remove offset, address, and original_value
6633 parameters.
6634 (ada_val_print_array): Update.
6635 (ada_value_print_array): New function.
6636 (ada_value_print_1): Call it.
6637
6638 2020-03-13 Tom Tromey <tom@tromey.com>
6639
6640 * ada-valprint.c (ada_value_print): Use common_val_print.
6641
6642 2020-03-13 Tom Tromey <tom@tromey.com>
6643
6644 * ada-valprint.c (ada_val_print_ref): Use common_val_print.
6645
6646 2020-03-13 Tom Tromey <tom@tromey.com>
6647
6648 * ada-valprint.c (ada_value_print_num): New function.
6649 (ada_value_print_1): Use it.
6650
6651 2020-03-13 Tom Tromey <tom@tromey.com>
6652
6653 * ada-valprint.c (ada_value_print_1) <TYPE_CODE_FLT>: Rewrite.
6654
6655 2020-03-13 Tom Tromey <tom@tromey.com>
6656
6657 * ada-valprint.c (ada_value_print_ptr): New function.
6658 (ada_value_print_1): Use it.
6659
6660 2020-03-13 Tom Tromey <tom@tromey.com>
6661
6662 * ada-valprint.c (ada_val_print_gnat_array): Take a struct value;
6663 call common_val_print.
6664 (ada_val_print_1): Update.
6665 (ada_value_print_1): New function.
6666 (ada_value_print_inner): Rewrite.
6667
6668 2020-03-13 Tom Tromey <tom@tromey.com>
6669
6670 * cp-valprint.c (cp_print_value_fields): Update.
6671 (cp_print_value): New function.
6672
6673 2020-03-13 Tom Tromey <tom@tromey.com>
6674
6675 * m2-valprint.c (m2_value_print_inner): Use
6676 cp_print_value_fields.
6677 * cp-valprint.c (cp_print_value_fields): New function.
6678 * c-valprint.c (c_value_print_struct): New function.
6679 (c_value_print_inner): Use c_value_print_struct.
6680 * c-lang.h (cp_print_value_fields): Declare.
6681
6682 2020-03-13 Tom Tromey <tom@tromey.com>
6683
6684 * c-valprint.c (c_value_print_array): New function.
6685 (c_value_print_inner): Use it.
6686
6687 2020-03-13 Tom Tromey <tom@tromey.com>
6688
6689 * c-valprint.c (c_value_print_memberptr): New function.
6690 (c_value_print_inner): Use it.
6691
6692 2020-03-13 Tom Tromey <tom@tromey.com>
6693
6694 * c-valprint.c (c_value_print_int): New function.
6695 (c_value_print_inner): Use it.
6696
6697 2020-03-13 Tom Tromey <tom@tromey.com>
6698
6699 * c-valprint.c (c_value_print_ptr): New function.
6700 (c_value_print_inner): Use it.
6701
6702 2020-03-13 Tom Tromey <tom@tromey.com>
6703
6704 * c-valprint.c (c_value_print_inner): Rewrite.
6705
6706 2020-03-13 Tom Tromey <tom@tromey.com>
6707
6708 * valprint.c (generic_value_print_complex): New function.
6709 (generic_value_print): Use it.
6710
6711 2020-03-13 Tom Tromey <tom@tromey.com>
6712
6713 * valprint.c (generic_val_print_float): Don't call
6714 val_print_scalar_formatted.
6715 (generic_val_print, generic_value_print): Update.
6716
6717 2020-03-13 Tom Tromey <tom@tromey.com>
6718
6719 * valprint.c (generic_value_print_char): New function
6720 (generic_value_print): Use it.
6721
6722 2020-03-13 Tom Tromey <tom@tromey.com>
6723
6724 * valprint.c (generic_value_print_int): New function.
6725 (generic_value_print): Use it.
6726
6727 2020-03-13 Tom Tromey <tom@tromey.com>
6728
6729 * valprint.c (generic_value_print_bool): New function.
6730 (generic_value_print): Use it.
6731
6732 2020-03-13 Tom Tromey <tom@tromey.com>
6733
6734 * valprint.c (generic_val_print_func): Simplify.
6735 (generic_val_print, generic_value_print): Update.
6736
6737 2020-03-13 Tom Tromey <tom@tromey.com>
6738
6739 * valprint.c (generic_val_print_flags): Remove.
6740 (generic_val_print, generic_value_print): Update.
6741 (val_print_type_code_flags): Add original_value parameter.
6742
6743 2020-03-13 Tom Tromey <tom@tromey.com>
6744
6745 * valprint.c (generic_val_print): Update.
6746 (generic_value_print): Update.
6747 * valprint.c (generic_val_print_enum): Don't call
6748 val_print_scalar_formatted.
6749
6750 2020-03-13 Tom Tromey <tom@tromey.com>
6751
6752 * valprint.c (generic_value_print): Call generic_value_print_ptr.
6753 * valprint.c (generic_value_print_ptr): New function.
6754
6755 2020-03-13 Tom Tromey <tom@tromey.com>
6756
6757 * valprint.c (generic_value_print): Rewrite.
6758
6759 2020-03-13 Tom Tromey <tom@tromey.com>
6760
6761 * p-valprint.c (pascal_object_print_value_fields)
6762 (pascal_object_print_value): New functions.
6763
6764 2020-03-13 Tom Tromey <tom@tromey.com>
6765
6766 * p-valprint.c (pascal_value_print_inner): Rewrite.
6767
6768 2020-03-13 Tom Tromey <tom@tromey.com>
6769
6770 * f-valprint.c (f_value_print_innner): Rewrite.
6771
6772 2020-03-13 Tom Tromey <tom@tromey.com>
6773
6774 * m2-valprint.c (m2_print_unbounded_array): New overload.
6775 (m2_print_unbounded_array): Update.
6776 (m2_print_array_contents): Take a struct value.
6777 (m2_value_print_inner): Rewrite.
6778
6779 2020-03-13 Tom Tromey <tom@tromey.com>
6780
6781 * d-valprint.c (dynamic_array_type): Call d_value_print_inner.
6782 (d_value_print_inner): New function.
6783 * d-lang.h (d_value_print_inner): Declare.
6784 * d-lang.c (d_language_defn): Use d_value_print_inner.
6785
6786 2020-03-13 Tom Tromey <tom@tromey.com>
6787
6788 * go-valprint.c (go_value_print_inner): New function.
6789 * go-lang.h (go_value_print_inner): Declare.
6790 * go-lang.c (go_language_defn): Use go_value_print_inner.
6791
6792 2020-03-13 Tom Tromey <tom@tromey.com>
6793
6794 * rust-lang.c (val_print_struct, rust_print_enum): Use the value
6795 API.
6796 (rust_val_print): Rewrite.
6797 (rust_value_print_inner): New function, from rust_val_print.
6798 (rust_language_defn): Use rust_value_print_inner.
6799
6800 2020-03-13 Tom Tromey <tom@tromey.com>
6801
6802 * ada-valprint.c (ada_value_print_inner): New function.
6803 * ada-lang.h (ada_value_print_inner): Declare.
6804 * ada-lang.c (ada_language_defn): Use ada_value_print_inner.
6805
6806 2020-03-13 Tom Tromey <tom@tromey.com>
6807
6808 * f-valprint.c (f_value_print_innner): New function.
6809 * f-lang.h (f_value_print_innner): Declare.
6810 * f-lang.c (f_language_defn): Use f_value_print_innner.
6811
6812 2020-03-13 Tom Tromey <tom@tromey.com>
6813
6814 * p-valprint.c (pascal_value_print_inner): New function.
6815 * p-lang.h (pascal_value_print_inner): Declare.
6816 * p-lang.c (pascal_language_defn): Use pascal_value_print_inner.
6817
6818 2020-03-13 Tom Tromey <tom@tromey.com>
6819
6820 * m2-valprint.c (m2_value_print_inner): New function.
6821 * m2-lang.h (m2_value_print_inner): Declare.
6822 * m2-lang.c (m2_language_defn): Use m2_value_print_inner.
6823
6824 2020-03-13 Tom Tromey <tom@tromey.com>
6825
6826 * opencl-lang.c (opencl_language_defn): Use c_value_print_inner.
6827 * objc-lang.c (objc_language_defn): Use c_value_print_inner.
6828 * c-valprint.c (c_value_print_inner): New function.
6829 * c-lang.h (c_value_print_inner): Declare.
6830 * c-lang.c (c_language_defn, cplus_language_defn)
6831 (asm_language_defn, minimal_language_defn): Use
6832 c_value_print_inner.
6833
6834 2020-03-13 Tom Tromey <tom@tromey.com>
6835
6836 * p-valprint.c (pascal_object_print_value_fields): Now static.
6837 * p-lang.h (pascal_object_print_value_fields): Don't declare.
6838
6839 2020-03-13 Tom Tromey <tom@tromey.com>
6840
6841 * c-valprint.c (c_val_print_array): Simplify.
6842
6843 2020-03-13 Tom Tromey <tom@tromey.com>
6844
6845 * valprint.c (value_print_array_elements): New function.
6846 * valprint.h (value_print_array_elements): Declare.
6847
6848 2020-03-13 Tom Tromey <tom@tromey.com>
6849
6850 * printcmd.c (print_formatted): Use value_print_scalar_formatted.
6851 * mips-tdep.c (mips_print_register): Use
6852 value_print_scalar_formatted.
6853
6854 2020-03-13 Tom Tromey <tom@tromey.com>
6855
6856 * valprint.h (value_print_scalar_formatted): Declare.
6857 * valprint.c (value_print_scalar_formatted): New function.
6858
6859 2020-03-13 Tom Tromey <tom@tromey.com>
6860
6861 * valprint.h (generic_value_print): Declare.
6862 * valprint.c (generic_value_print): New function.
6863
6864 2020-03-13 Tom Tromey <tom@tromey.com>
6865
6866 * valprint.c (do_val_print): Call la_value_print_inner, if
6867 available.
6868 * rust-lang.c (rust_language_defn): Update.
6869 * p-lang.c (pascal_language_defn): Update.
6870 * opencl-lang.c (opencl_language_defn): Update.
6871 * objc-lang.c (objc_language_defn): Update.
6872 * m2-lang.c (m2_language_defn): Update.
6873 * language.h (struct language_defn) <la_value_print_inner>: New
6874 member.
6875 * language.c (unknown_language_defn, auto_language_defn): Update.
6876 * go-lang.c (go_language_defn): Update.
6877 * f-lang.c (f_language_defn): Update.
6878 * d-lang.c (d_language_defn): Update.
6879 * c-lang.c (c_language_defn, cplus_language_defn)
6880 (asm_language_defn, minimal_language_defn): Update.
6881 * ada-lang.c (ada_language_defn): Update.
6882
6883 2020-03-13 Tom Tromey <tom@tromey.com>
6884
6885 * c-valprint.c (c_value_print): Use common_val_print.
6886
6887 2020-03-13 Tom Tromey <tom@tromey.com>
6888
6889 * cp-valprint.c (cp_print_static_field): Use common_val_print.
6890
6891 2020-03-13 Tom Tromey <tom@tromey.com>
6892
6893 * f-valprint.c (f77_print_array_1, f_val_print): Use
6894 common_val_print.
6895
6896 2020-03-13 Tom Tromey <tom@tromey.com>
6897
6898 * riscv-tdep.c (riscv_print_one_register_info): Use
6899 common_val_print.
6900
6901 2020-03-13 Tom Tromey <tom@tromey.com>
6902
6903 * mi/mi-main.c (output_register): Use common_val_print.
6904
6905 2020-03-13 Tom Tromey <tom@tromey.com>
6906
6907 * infcmd.c (default_print_one_register_info): Use
6908 common_val_print.
6909
6910 2020-03-13 Tom Tromey <tom@tromey.com>
6911
6912 * valprint.h (common_val_print_checked): Declare.
6913 * valprint.c (common_val_print_checked): New function.
6914 * stack.c (print_frame_arg): Use common_val_print_checked.
6915
6916 2020-03-13 Tom Tromey <tom@tromey.com>
6917
6918 * valprint.c (do_val_print): New function, from val_print.
6919 (val_print): Use do_val_print.
6920 (common_val_print): Use do_val_print.
6921
6922 2020-03-13 Tom Tromey <tom@tromey.com>
6923
6924 * valprint.c (value_print): Use scoped_value_mark.
6925
6926 2020-03-13 Tom de Vries <tdevries@suse.de>
6927
6928 PR symtab/25646
6929 * psymtab.c (partial_symtab::partial_symtab): Don't set
6930 globals_offset and statics_offset. Push element onto
6931 current_global_psymbols and current_static_psymbols stacks.
6932 (concat): New function.
6933 (end_psymtab_common): Set globals_offset and statics_offset. Pop
6934 element from current_global_psymbols and current_static_psymbols
6935 stacks. Concat popped elements to global_psymbols and
6936 static_symbols.
6937 (add_psymbol_to_list): Use current_global_psymbols and
6938 current_static_psymbols stacks.
6939 * psymtab.h (class psymtab_storage): Add current_global_psymbols and
6940 current_static_psymbols fields.
6941
6942 2020-03-12 Christian Biesinger <cbiesinger@google.com>
6943
6944 * corelow.c (sniff_core_bfd): Remove.
6945 (class core_target) <m_core_vec>: Remove.
6946 (core_target::core_target): Update.
6947 (core_file_fns): Remove.
6948 (deprecated_add_core_fns): Remove.
6949 (default_core_sniffer): Remove.
6950 (sniff_core_bfd): Remove.
6951 (default_check_format): Remove.
6952 (gdb_check_format): Remove.
6953 (core_target_open): Update.
6954 (core_target::get_core_register_section): Update.
6955 (get_core_registers_cb): Update.
6956 (core_target::fetch_registers): Update.
6957 * gdbcore.h (struct core_fns): Remove.
6958 (deprecated_add_core_fns): Remove.
6959 (default_core_sniffer): Remove.
6960 (default_check_format): Remove.
6961
6962 2020-03-12 Tom Tromey <tom@tromey.com>
6963
6964 * arm-tdep.c (struct arm_mapping_symbol) <value>: Now a
6965 CORE_ADDR.
6966 (struct arm_exidx_entry) <addr>: Now a CORE_ADDR.
6967
6968 2020-03-12 Tom Tromey <tom@tromey.com>
6969
6970 * remote.c (remote_target::download_tracepoint)
6971 (remote_target::enable_tracepoint)
6972 (remote_target::disable_tracepoint): Use phex, not sprintf_vma.
6973 * breakpoint.c (print_recreate_masked_watchpoint): Use phex, not
6974 sprintf_vma.
6975
6976 2020-03-12 Tom Tromey <tom@tromey.com>
6977
6978 * symfile-mem.c: Update CORE_ADDR size assert.
6979
6980 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
6981
6982 * selftest.m4: Move to gdbsupport/.
6983 * acinclude.m4: Update path to selftest.m4.
6984
6985 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
6986
6987 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Rename to...
6988 (SELFTESTS_SRCS): ... this. Add disasm-selftests.c,
6989 gdbarch-selfselftests.c and selftest-arch.c.
6990 (SUBDIR_UNITTESTS_OBS): Rename to...
6991 (SELFTESTS_OBS): ... this.
6992 (COMMON_SFILES): Remove disasm-selftests.c and
6993 gdbarch-selftests.c.
6994 * configure.ac: Don't add selftest-arch.{c,o} to
6995 CONFIG_{SRCS,OBS}.
6996 * disasm-selftests.c, gdbarch-selftests.c: Remove GDB_SELF_TEST
6997 preprocessor conditions.
6998
6999 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
7000
7001 * configure.ac: Don't source bfd/development.sh.
7002 * selftest.m4: Modify comment.
7003 * configure: Re-generate.
7004
7005 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
7006
7007 * selftest.m4 (GDB_AC_SELFTEST): Error out if $development is
7008 not "true" or "false".
7009 * configure: Re-generate.
7010
7011 2020-03-12 Christian Biesinger <cbiesinger@google.com>
7012
7013 * Makefile.in (HFILES_NO_SRCDIR): Add new arm-nbsd-tdep.h file.
7014 * arm-nbsd-nat.c (arm_supply_gregset): Moved to arm-nbsd-tdep and
7015 renamed to arm_nbsd_supply_gregset.
7016 (fetch_register): Update to call arm_nbsd_supply_gregset.
7017 (fetch_regs): Remove in favor of fetch_register with a -1 regno.
7018 (arm_netbsd_nat_target::fetch_registers): Update.
7019 (fetch_elfcore_registers): Removed.
7020 (_initialize_arm_netbsd_nat): Removed call to deprecated_add_core_fns.
7021 * arm-nbsd-tdep.c (struct arm_nbsd_reg): New struct.
7022 (arm_nbsd_supply_gregset): Moved from arm-nbsd-nat.c and updated to
7023 not require NetBSD system headers.
7024 (arm_nbsd_regset): New struct.
7025 (arm_nbsd_iterate_over_regset_sections): New function.
7026 (arm_netbsd_init_abi_common): Updated to call
7027 set_gdbarch_iterate_over_regset_sections.
7028 * arm-nbsd-tdep.h: New file.
7029
7030 2020-03-11 Kevin Buettner <kevinb@redhat.com>
7031
7032 * symtab.c (find_pc_sect_line): Add check which prevents infinite
7033 recursion.
7034
7035 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
7036
7037 * configure: Re-generate.
7038
7039 2020-03-11 Tom Tromey <tromey@adacore.com>
7040
7041 * ada-typeprint.c (print_choices): Fix comment.
7042
7043 2020-03-11 Andrew Burgess <andrew.burgess@embecosm.com>
7044
7045 * buildsyms.c (buildsym_compunit::record_line): Avoid accessing
7046 previous item in the list, when the list has no items.
7047
7048 2020-03-11 Tom de Vries <tdevries@suse.de>
7049
7050 * dwarf2/loc.c (dwarf2_evaluate_property): Handle NULL frame in
7051 PROP_LOCLIST handling code.
7052
7053 2020-03-10 Andrew Burgess <andrew.burgess@embecosm.com>
7054
7055 * buildsym-legacy.c (record_line): Pass extra parameter to
7056 record_line.
7057 * buildsym.c (buildsym_compunit::record_line): Take an extra
7058 parameter, reduce duplication in the line table, and record the
7059 is_stmt flag in the line table.
7060 * buildsym.h (buildsym_compunit::record_line): Add extra
7061 parameter.
7062 * disasm.c (do_mixed_source_and_assembly_deprecated): Ignore
7063 non-statement lines.
7064 * dwarf2/read.c (dwarf_record_line_1): Add extra parameter, pass
7065 this to the symtab builder.
7066 (dwarf_finish_line): Pass extra parameter to dwarf_record_line_1.
7067 (lnp_state_machine::record_line): Pass a suitable is_stmt flag
7068 through to dwarf_record_line_1.
7069 * infrun.c (process_event_stop_test): When stepping, don't stop at
7070 a non-statement instruction, and only refresh the step info when
7071 we land in the middle of a line's range. Also add an extra
7072 comment.
7073 * jit.c (jit_symtab_line_mapping_add_impl): Initialise is_stmt
7074 field.
7075 * record-btrace.c (btrace_find_line_range): Only record lines
7076 marked as is-statement.
7077 * stack.c (frame_show_address): Show the frame address if we are
7078 in a non-statement sal.
7079 * symmisc.c (dump_symtab_1): Print the is_stmt flag.
7080 (maintenance_print_one_line_table): Print a header for the is_stmt
7081 column, and include is_stmt information in the output.
7082 * symtab.c (find_pc_sect_line): Find lines marked as statements in
7083 preference to non-statements.
7084 (find_pcs_for_symtab_line): Prefer is-statement entries.
7085 (find_line_common): Likewise.
7086 * symtab.h (struct linetable_entry): Add is_stmt field.
7087 (struct symtab_and_line): Likewise.
7088 * xcoffread.c (arrange_linetable): Initialise is_stmt field when
7089 arranging the line table.
7090
7091 2020-03-07 Tom de Vries <tdevries@suse.de>
7092
7093 * dwarf2/read.c (read_typedef): Treat anonymous typedef as forwarder
7094 DIE.
7095
7096 2020-03-07 Tom Tromey <tom@tromey.com>
7097
7098 * valops.c (value_literal_complex): Remove obsolete comment.
7099 * gdbtypes.h (enum type_code) <TYPE_CODE_FLT>: Remove obsolete
7100 comment.
7101
7102 2020-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7103
7104 * infrun.h: Forward-declare thread_info.
7105 (set_step_info): Add thread_info parameter, add doc.
7106 * infrun.c (set_step_info): Add thread_info parameter, move doc
7107 to header.
7108 * infrun.c (process_event_stop_test): Pass thread to
7109 set_step_info call.
7110 * infcmd.c (set_step_frame): Add thread_info pointer, pass it to
7111 set_step_info.
7112 (prepare_one_step): Add thread_info parameter, pass it to
7113 set_step_frame and prepare_one_step (recursive) call.
7114 (step_1): Pass thread to prepare_one_step call.
7115 (step_command_fsm::should_stop): Pass thread to
7116 prepare_one_step.
7117 (until_next_fsm): Pass thread to set_step_frame call.
7118 (finish_command): Pass thread to set_step_info call.
7119
7120 2020-03-06 Hannes Domani <ssbssa@yahoo.de>
7121
7122 * windows-tdep.c (windows_solib_create_inferior_hook):
7123 Check if inferior is running.
7124
7125 2020-03-06 Tom de Vries <tdevries@suse.de>
7126
7127 * NEWS: Fix "the the".
7128 * ctfread.c: Same.
7129
7130 2020-03-06 Tom de Vries <tdevries@suse.de>
7131
7132 * psymtab.c (psymtab_to_symtab): Don't print "done.".
7133
7134 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7135
7136 * .dir-locals.el: Add a comment referencing the other copies of
7137 this file.
7138
7139 2020-03-05 John Baldwin <jhb@FreeBSD.org>
7140
7141 * fbsd-tdep.c (fbsd_make_corefile_notes): Use std::string for
7142 psargs.
7143
7144 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
7145
7146 * .gitattributes: New file.
7147
7148 2020-03-04 Tom Tromey <tom@tromey.com>
7149
7150 * symmisc.c (print_symbol_bcache_statistics)
7151 (print_objfile_statistics): Update.
7152 * symfile.c (allocate_symtab): Use intern.
7153 * psymtab.c (partial_symtab::partial_symtab): Use intern.
7154 * objfiles.h (struct objfile_per_bfd_storage) <filename_cache,
7155 macro_cache>: Remove.
7156 <string_cache>: New member.
7157 (struct objfile) <intern>: New methods.
7158 * elfread.c (elf_symtab_read): Use intern.
7159 * dwarf2/read.c (fixup_go_packaging): Intern package name.
7160 (dwarf2_compute_name, dwarf2_physname)
7161 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2): Intern
7162 names.
7163 (guess_partial_die_structure_name): Update.
7164 (partial_die_info::fixup): Intern name.
7165 (dwarf2_canonicalize_name): Change parameter to objfile. Intern
7166 name.
7167 (dwarf2_name): Intern name. Update.
7168 * buildsym.c (buildsym_compunit::get_macro_table): Use
7169 string_cache.
7170
7171 2020-03-04 Tom Tromey <tom@tromey.com>
7172
7173 * jit.c (bfd_open_from_target_memory): Make "target" const.
7174 * corefile.c (gnutarget): Now const.
7175 * gdbcore.h (gnutarget): Now const.
7176
7177 2020-03-04 Hannes Domani <ssbssa@yahoo.de>
7178
7179 * NEWS: Mention support for WOW64 processes.
7180 * amd64-windows-nat.c (amd64_mappings): Rename and remove static.
7181 (amd64_windows_segment_register_p): Remove static.
7182 (_initialize_amd64_windows_nat): Update.
7183 * configure.nat <windows> (NATDEPFILES): Add i386-windows-nat.o.
7184 * i386-windows-nat.c (context_offset): Update.
7185 (i386_mappings): Rename and remove static.
7186 (i386_windows_segment_register_p): Remove static.
7187 (_initialize_i386_windows_nat): Update.
7188 * windows-nat.c (STATUS_WX86_BREAKPOINT): New macro.
7189 (STATUS_WX86_SINGLE_STEP): New macro.
7190 (EnumProcessModulesEx): New macro.
7191 (Wow64SuspendThread): New macro.
7192 (Wow64GetThreadContext): New macro.
7193 (Wow64SetThreadContext): New macro.
7194 (Wow64GetThreadSelectorEntry): New macro.
7195 (windows_set_context_register_offsets): Add static.
7196 (windows_set_segment_register_p): Likewise.
7197 (windows_add_thread): Adapt for WOW64 processes.
7198 (windows_fetch_one_register): Likewise.
7199 (windows_nat_target::fetch_registers): Likewise.
7200 (windows_store_one_register): Likewise.
7201 (display_selector): Likewise.
7202 (display_selectors): Likewise.
7203 (handle_exception): Likewise.
7204 (windows_continue): Likewise.
7205 (windows_nat_target::resume): Likewise.
7206 (windows_add_all_dlls): Likewise.
7207 (do_initial_windows_stuff): Likewise.
7208 (windows_nat_target::attach): Likewise.
7209 (windows_get_exec_module_filename): Likewise.
7210 (windows_nat_target::create_inferior): Likewise.
7211 (windows_xfer_siginfo): Likewise.
7212 (_initialize_loadable): Initialize Wow64SuspendThread,
7213 Wow64GetThreadContext, Wow64SetThreadContext,
7214 Wow64GetThreadSelectorEntry and EnumProcessModulesEx.
7215 * windows-nat.h (windows_set_context_register_offsets):
7216 Remove declaration.
7217 (windows_set_segment_register_p): Likewise.
7218 (i386_windows_segment_register_p): Add declaration.
7219 (amd64_windows_segment_register_p): Likewise.
7220
7221 2020-03-04 Luis Machado <luis.machado@linaro.org>
7222
7223 Revert aa66aac47b4dd38f9524ddb5546c08cc09930d37 due to regressions
7224 in "info registers" for AArch64/ARM.
7225
7226 The change caused "info registers" to not print GPR's.
7227
7228 gdb/ChangeLog:
7229
7230 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
7231
7232 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
7233 when reg->group is empty and reggroup is not.
7234
7235 2020-03-03 Tom Tromey <tromey@adacore.com>
7236
7237 * dwarf2/frame.c (struct dwarf2_frame_cache)
7238 <checked_tailcall_bottom, entry_cfa_sp_offset,
7239 entry_cfa_sp_offset_p>: Remove members.
7240 (dwarf2_frame_cache): Call dwarf2_tailcall_sniffer_first.
7241 (dwarf2_frame_prev_register): Don't call
7242 dwarf2_tailcall_sniffer_first.
7243 (dwarf2_append_unwinders): Don't append tailcall unwinder.
7244 * frame-unwind.c (add_unwinder): New fuction.
7245 (frame_unwind_init): Use it. Add tailcall unwinder.
7246
7247 2020-03-03 Andrew Burgess <andrew.burgess@embecosm.com>
7248 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
7249
7250 * f-valprint.c (f_val_print): Handle TYPE_CODE_BOOL, any non-zero
7251 value should be printed as true.
7252
7253 2020-03-03 Hannes Domani <ssbssa@yahoo.de>
7254
7255 * windows-tdep.c (windows_solib_create_inferior_hook): New function.
7256 (windows_init_abi): Set and use windows_so_ops.
7257
7258 2020-03-03 Sergio Durigan Junior <sergiodj@redhat.com>
7259
7260 * printcmd.c (print_c_string): Check also for TYPE_CODE_PTR
7261 when verifying if dealing with a convenience variable.
7262
7263 2020-03-03 Luis Machado <luis.machado@linaro.org>
7264
7265 * auxv.c (default_print_auxv_entry): Add new AUXV entries.
7266
7267 2020-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7268
7269 * infrun.c (gdbarch_supports_displaced_stepping): New.
7270 (use_displaced_stepping): Break up conditions in smaller pieces.
7271 Use gdbarch_supports_displaced_stepping.
7272 (displaced_step_prepare_throw): Use
7273 gdbarch_supports_displaced_stepping.
7274
7275 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
7276
7277 * NEWS: Mention new behaviour of the history filename.
7278 * top.c (write_history_p): Add comment.
7279 (show_write_history_p): Add header comment, give a different
7280 message when history writing is on, but the history filename is
7281 empty.
7282 (history_filename): Add comment.
7283 (history_filename_empty): New function.
7284 (show_history_filename): Add header comment, give a different
7285 message when the filename is empty.
7286 (init_history): Compare history_filename against nullptr, and only
7287 read history if the filename is not empty.
7288 (set_history_filename): Add header comment, and only make
7289 non-empty filenames absolute.
7290 (init_main): Make the filename argument to 'set history filename'
7291 optional.
7292
7293 2020-03-02 Christian Biesinger <cbiesinger@google.com>
7294
7295 * arm-nbsd-nat.c (arm_supply_fparegset): Rename to...
7296 (arm_supply_vfpregset): ...this, and update to use VFP registers.
7297 (fetch_fp_register): Update.
7298 (fetch_fp_regs): Update.
7299 (store_fp_register): Update.
7300 (store_fp_regs): Update.
7301 (arm_netbsd_nat_target::read_description): New function.
7302 (fetch_elfcore_registers): Update.
7303
7304 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
7305
7306 * remote.c (remote_target::remote_parse_stop_reply): Don't use the
7307 general_thread if the stop reply is missing a thread-id.
7308 (remote_target::process_stop_reply): Use the first non-exited
7309 thread if the target didn't pass a thread-id.
7310 * infrun.c (do_target_wait): Move call to
7311 switch_to_inferior_no_thread to ....
7312 (do_target_wait_1): ... here.
7313
7314 2020-02-29 Jon Turney <jon.turney@dronecode.org.uk>
7315
7316 * debuginfod-support.c: Include defs.h first.
7317
7318 2020-02-28 Tom de Vries <tdevries@suse.de>
7319
7320 * symfile.c (set_initial_language): Use default language for lookup.
7321
7322 2020-02-28 Simon Marchi <simon.marchi@efficios.com>
7323
7324 * dwarf2/read.c (cutu_reader::init_tu_and_read_dwo_dies): Remove
7325 reader variable, pass `this` to read_cutu_die_from_dwo.
7326
7327 2020-02-27 Aaron Merey <amerey@redhat.com>
7328
7329 * source.c (open_source_file): Check for nullptr when computing
7330 srcpath.
7331
7332 2020-02-27 Tom Tromey <tromey@adacore.com>
7333
7334 * dwarf2/read.c (struct field_info) <nfields>: Now a method, not a
7335 member.
7336 (dwarf2_add_field): Don't update nfields.
7337 (dwarf2_attach_fields_to_type, process_structure_scope): Update.
7338
7339 2020-02-27 Andrew Burgess <andrew.burgess@embecosm.com>
7340
7341 * gdbtypes.c (create_array_type_with_stride): Use std::abs not
7342 abs.
7343
7344 2020-02-26 Tom Tromey <tom@tromey.com>
7345
7346 * dwarf2/read.c (struct dwarf2_include_psymtab): New.
7347 (dwarf2_create_include_psymtab): Use dwarf2_include_psymtab.
7348 (dwarf2_psymtab::expand_psymtab, dwarf2_psymtab::readin_p)
7349 (dwarf2_psymtab::get_compunit_symtab): Remove null checks for
7350 per_cu_data.
7351
7352 2020-02-26 Tom Tromey <tom@tromey.com>
7353
7354 * dwarf2/index-write.c (psym_index_map): Change type.
7355 (add_address_entry_worker, write_one_signatured_type)
7356 (recursively_count_psymbols, recursively_write_psymbols)
7357 (class debug_names, psyms_seen_size, write_gdbindex)
7358 (write_debug_names): Use partial_symtab, not dwarf2_psymtab.
7359
7360 2020-02-26 Aaron Merey <amerey@redhat.com>
7361
7362 * Makefile.in: Handle optional debuginfod support.
7363 * NEWS: Update.
7364 * README: Add --with-debuginfod summary.
7365 * config.in: Regenerate.
7366 * configure: Regenerate.
7367 * configure.ac: Handle optional debuginfod support.
7368 * debuginfod-support.c: debuginfod helper functions.
7369 * debuginfod-support.h: Ditto.
7370 * doc/gdb.texinfo: Add --with-debuginfod to configure options
7371 summary.
7372 * dwarf2/read.c (dwarf2_get_dwz_file): Query debuginfod servers
7373 when a dwz file cannot be found.
7374 * elfread.c (elf_symfile_read): Query debuginfod servers when a
7375 debuginfo file cannot be found.
7376 * source.c (open_source_file): Query debuginfod servers when a
7377 source file cannot be found.
7378 * top.c (print_gdb_configuration): Include
7379 --{with,without}-debuginfod in the output.
7380
7381 2020-02-26 Jérémie Galarneau <jeremie.galarneau@efficios.com>
7382
7383 * thread.c (thr_try_catch_cmd): Print thread name.
7384
7385 2020-02-26 Simon Marchi <simon.marchi@efficios.com>
7386
7387 * dwarf2/loc.h (dwarf2_fetch_die_loc_sect_off,
7388 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
7389 dwarf2_fetch_die_type_sect_off): Move to...
7390 * dwarf2/read.h (dwarf2_fetch_die_loc_sect_off,
7391 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
7392 dwarf2_fetch_die_type_sect_off): ... here.
7393 * dwarf2/read.c (dwarf2_fetch_die_loc_sect_off,
7394 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
7395 dwarf2_fetch_die_type_sect_off): Move doc to header file.
7396
7397 2020-02-26 Tom de Vries <tdevries@suse.de>
7398
7399 PR gdb/25603
7400 * symfile.c (set_initial_language): Exit-early if
7401 language_mode == language_mode_manual.
7402
7403 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
7404
7405 * dwarf2/loc.h (dwarf2_read_addr_index): Move...
7406 * dwarf2/read.h (dwarf2_read_addr_index): ... here.
7407 * dwarf2/read.c (dwarf2_read_addr_index): Move doc to header.
7408
7409 2020-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
7410
7411 * gdbtypes.c (create_array_type_with_stride): Handle negative
7412 array strides.
7413 * valarith.c (value_subscripted_rvalue): Likewise.
7414
7415 2020-02-25 Luis Machado <luis.machado@linaro.org>
7416
7417 * aarch64-tdep.c (aarch64_vnv_type): Fix comment typo.
7418
7419 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
7420
7421 * loc.h (dwarf2_get_die_type): Move to...
7422 * read.h (dwarf2_get_die_type): ... here.
7423 * read.c (dwarf2_get_die_type): Move doc to header.
7424
7425 2020-02-25 Joel Brobecker <brobecker@adacore.com>
7426
7427 * copypright.py (EXCLUDE_LIST): Add 'gnulib/config.in' and
7428 'gnulib/Makefile.in' to the list.
7429
7430 2020-02-24 Tom Tromey <tom@tromey.com>
7431
7432 * dwarf2/read.h (struct type_unit_unshareable) <num_symtabs>:
7433 Remove.
7434 * dwarf2/read.c (dwarf2_cu::setup_type_unit_groups): Use
7435 XOBNEWVEC.
7436
7437 2020-02-24 Tom Tromey <tom@tromey.com>
7438
7439 * dwarf2/read.h (struct dwarf2_per_cu_data) <type_unit_group_p>:
7440 New method.
7441 * dwarf2/read.c (IS_TYPE_UNIT_GROUP): Remove.
7442 (dw2_do_instantiate_symtab, dw2_get_file_names)
7443 (build_type_psymtab_dependencies, load_full_type_unit): Update.
7444
7445 2020-02-24 Tom Tromey <tom@tromey.com>
7446
7447 * dwarf2read.c (dwarf2_build_psymtabs_hard): Use
7448 make_scoped_restore.
7449 (dwarf2_psymtab::read_symtab): Don't clear
7450 reading_partial_symbols.
7451
7452 2020-02-24 Tom de Vries <tdevries@suse.de>
7453
7454 PR gdb/25592
7455 * stack.c (iterate_over_block_locals): Handle LOC_CONST.
7456
7457 2020-02-24 Tom de Vries <tdevries@suse.de>
7458
7459 * tui/tui-layout.c (_initialize_tui_layout): Fix help messages for
7460 commands layout next/prev/regs.
7461
7462 2020-02-22 Tom Tromey <tom@tromey.com>
7463
7464 * dwarf2/loc.h (dwarf2_compile_expr_to_ax): Don't declare.
7465 * dwarf2/loc.c (dwarf2_compile_expr_to_ax): Now static.
7466
7467 2020-02-22 Tom Tromey <tom@tromey.com>
7468
7469 * tui/tui-data.h (TUI_DISASM_WIN): Cast to tui_disasm_window.
7470
7471 2020-02-22 Tom Tromey <tom@tromey.com>
7472
7473 * tui/tui-win.c (_initialize_tui_win): Add usage text.
7474 * tui/tui-stack.c (_initialize_tui_stack): Add usage text.
7475 * tui/tui-regs.c (_initialize_tui_regs): Add usage text.
7476 * tui/tui.c (_initialize_tui): Add usage text.
7477
7478 2020-02-22 Tom Tromey <tom@tromey.com>
7479
7480 * tui/tui-win.c (tui_set_focus_command)
7481 (tui_set_win_height_command): Use error_no_arg.
7482 (_initialize_tui_win): Update help text.
7483 (FOCUS_USAGE, WIN_HEIGHT_USAGE): Don't define.
7484
7485 2020-02-22 Tom Tromey <tom@tromey.com>
7486
7487 * tui/tui-layout.c (extract_display_start_addr): Rewrite.
7488 * tui/tui-disasm.h (struct tui_disasm_window)
7489 <display_start_addr>: Declare.
7490 * tui/tui-source.h (struct tui_source_window)
7491 <display_start_addr>: Declare.
7492 * tui/tui-winsource.h (struct tui_source_window_base)
7493 <show_source_line, display_start_addr>: New methods.
7494 <m_horizontal_offset, m_start_line_or_addr, m_gdbarch, m_content>:
7495 Rename and move to protected section.
7496 * tui/tui-winsource.c (tui_source_window_base::update_source_window)
7497 (tui_source_window_base::do_erase_source_content): Update.
7498 (tui_source_window_base::show_source_line): Now a method.
7499 (tui_source_window_base::show_source_content)
7500 (tui_source_window_base::tui_source_window_base)
7501 (tui_source_window_base::rerender)
7502 (tui_source_window_base::refill)
7503 (tui_source_window_base::do_scroll_horizontal)
7504 (tui_source_window_base::set_is_exec_point_at)
7505 (tui_source_window_base::update_breakpoint_info)
7506 (tui_source_window_base::update_exec_info): Update.
7507 * tui/tui-source.c (tui_source_window::set_contents)
7508 (tui_source_window::showing_source_p)
7509 (tui_source_window::do_scroll_vertical)
7510 (tui_source_window::location_matches_p)
7511 (tui_source_window::line_is_displayed): Update.
7512 (tui_source_window::display_start_addr): New method.
7513 * tui/tui-disasm.c (tui_disasm_window::set_contents)
7514 (tui_disasm_window::do_scroll_vertical)
7515 (tui_disasm_window::location_matches_p): Update.
7516 (tui_disasm_window::display_start_addr): New method.
7517
7518 2020-02-22 Tom Tromey <tom@tromey.com>
7519
7520 * NEWS: Add entry for gdb.register_window_type.
7521 * tui/tui-layout.h (window_factory): New typedef.
7522 (tui_register_window): Declare.
7523 * tui/tui-layout.c (saved_tui_windows): New global.
7524 (tui_apply_current_layout): Use it.
7525 (tui_register_window): New function.
7526 * python/python.c (do_start_initialization): Call
7527 gdbpy_initialize_tui.
7528 (python_GdbMethods): Add "register_window_type" function.
7529 * python/python-internal.h (gdbpy_register_tui_window)
7530 (gdbpy_initialize_tui): Declare.
7531 * python/py-tui.c: New file.
7532 * Makefile.in (SUBDIR_PYTHON_SRCS): Add py-tui.c.
7533
7534 2020-02-22 Tom Tromey <tom@tromey.com>
7535
7536 * tui/tui-io.c (do_tui_putc): Don't omit annotations.
7537
7538 2020-02-22 Tom Tromey <tom@tromey.com>
7539
7540 * tui/tui-win.c (tui_set_win_focus_to): Move to tui-data.c.
7541 * tui/tui-data.h (tui_set_win_with_focus): Don't declare.
7542 * tui/tui-data.c (tui_set_win_with_focus): Remove.
7543 (tui_set_win_focus_to): Move from tui-win.c.
7544
7545 2020-02-22 Tom Tromey <tom@tromey.com>
7546
7547 * tui/tui-layout.c (make_standard_window, get_locator_window): New
7548 functions.
7549 (known_window_types): New global.
7550 (tui_get_window_by_name): Reimplement.
7551 (initialize_known_windows): New function.
7552 (validate_window_name): Rewrite.
7553 (_initialize_tui_layout): Call initialize_known_windows.
7554
7555 2020-02-22 Tom Tromey <tom@tromey.com>
7556
7557 * tui/tui.h (enum tui_win_type) <LOCATOR_WIN, DATA_ITEM_WIN>:
7558 Remove constants.
7559 * tui/tui-winsource.h (struct tui_source_window_base)
7560 <tui_source_window_base>: Remove parameter.
7561 * tui/tui-winsource.c
7562 (tui_source_window_base::tui_source_window_base): Remove
7563 parameter.
7564 (tui_source_window_base::refill): Update.
7565 * tui/tui-stack.h (struct tui_locator_window)
7566 <tui_locator_window>: Update.
7567 * tui/tui-source.h (struct tui_source_window) <tui_source_window>:
7568 Default the constructor.
7569 * tui/tui-regs.h (struct tui_data_item_window)
7570 <tui_data_item_window>: Default the constructor.
7571 (struct tui_data_window) <tui_data_window>: Likewise.
7572 * tui/tui-disasm.h (struct tui_disasm_window) <tui_disasm_window>:
7573 Default the constructor.
7574 * tui/tui-data.h (struct tui_gen_win_info) <tui_gen_win_info>:
7575 Default the constructor.
7576 <type>: Remove.
7577 (struct tui_win_info) <tui_win_info>: Default the constructor.
7578 * tui/tui-data.c (tui_win_info::tui_win_info): Remove.
7579 * tui/tui-command.h (struct tui_cmd_window) <tui_cmd_window>:
7580 Default the constructor.
7581
7582 2020-02-22 Tom Tromey <tom@tromey.com>
7583
7584 * tui/tui-wingeneral.h (tui_make_all_invisible): Don't declare.
7585 * tui/tui-wingeneral.c (tui_make_all_invisible): Remove.
7586 * tui/tui-win.c (tui_resize_all): Don't call
7587 tui_delete_invisible_windows.
7588 * tui/tui-layout.c (tui_apply_current_layout): Delete windows when
7589 done.
7590 (tui_set_layout): Update.
7591 (tui_add_win_to_layout): Don't call tui_delete_invisible_windows.
7592 * tui/tui-data.h (tui_delete_invisible_windows): Don't declare.
7593 * tui/tui-data.c (tui_delete_invisible_windows): Remove.
7594
7595 2020-02-22 Tom Tromey <tom@tromey.com>
7596
7597 * tui/tui-win.c (tui_partial_win_by_name): Handle ambiguity
7598 correctly.
7599
7600 2020-02-22 Tom Tromey <tom@tromey.com>
7601
7602 * tui/tui-data.c (tui_next_win, tui_prev_win): Reimplement.
7603
7604 2020-02-22 Tom Tromey <tom@tromey.com>
7605
7606 * tui/tui-winsource.h (struct tui_source_window_iterator)
7607 <inner_iterator>: New etytypedef.
7608 <tui_source_window_iterator>: Take "end" parameter.
7609 <tui_source_window_iterator>: Take iterator.
7610 <operator*, advance>: Update.
7611 <m_iter>: Change type.
7612 <m_end>: New field.
7613 (struct tui_source_windows) <begin, end>: Update.
7614 * tui/tui-layout.c (tui_windows): New global.
7615 (tui_apply_current_layout): Clear tui_windows.
7616 (tui_layout_window::apply): Update tui_windows.
7617 * tui/tui-data.h (tui_windows): Declare.
7618 (all_tui_windows): Now inline function.
7619 (class tui_window_iterator, struct all_tui_windows): Remove.
7620
7621 2020-02-22 Tom Tromey <tom@tromey.com>
7622
7623 PR tui/17850:
7624 * tui/tui-win.c (tui_gen_win_info::max_width): New method.
7625 * tui/tui-layout.h (class tui_layout_base) <get_sizes>: Add
7626 "height" argument.
7627 (class tui_layout_window) <get_sizes>: Likewise.
7628 (class tui_layout_split) <tui_layout_split>: Add "vertical"
7629 argument.
7630 <get_sizes>: Add "height" argument.
7631 <m_vertical>: New field.
7632 * tui/tui-layout.c (tui_layout_split::clone): Update.
7633 (tui_layout_split::get_sizes): Add "height" argument.
7634 (tui_layout_split::adjust_size, tui_layout_split::apply): Update.
7635 (tui_new_layout_command): Parse "-horizontal".
7636 (_initialize_tui_layout): Update help string.
7637 (tui_layout_split::specification): Add "-horizontal" when needed.
7638 * tui/tui-layout.c (tui_layout_window::get_sizes): Add "height"
7639 argument.
7640 * tui/tui-data.h (struct tui_gen_win_info) <max_width, min_width>:
7641 New methods.
7642
7643 2020-02-22 Tom Tromey <tom@tromey.com>
7644
7645 * tui/tui-layout.h (enum tui_adjust_result): New.
7646 (class tui_layout_base) <adjust_size>: Return tui_adjust_result.
7647 (class tui_layout_window) <adjust_size>: Return
7648 tui_adjust_result. Rewrite.
7649 (class tui_layout_split) <adjust_size>: Return tui_adjust_result.
7650 * tui/tui-layout.c (tui_layout_split::adjust_size): Update.
7651
7652 2020-02-22 Tom Tromey <tom@tromey.com>
7653
7654 * tui/tui-layout.h (class tui_layout_split) <add_split>: Change
7655 parameter and return types.
7656 (class tui_layout_base) <specification>: Add "depth".
7657 (class tui_layout_window) <specification>: Add "depth".
7658 (class tui_layout_split) <specification>: Add "depth".
7659 * tui/tui-layout.c (tui_layout_split::add_split): Change parameter
7660 and return types.
7661 (tui_new_layout_command): Parse sub-layouts.
7662 (_initialize_tui_layout): Update help string.
7663 (tui_layout_window::specification): Add "depth".
7664 (add_layout_command): Update.
7665
7666 2020-02-22 Tom Tromey <tom@tromey.com>
7667
7668 * NEWS: Add "tui new-layout" item.
7669 * tui/tui-layout.c (add_layout_command): Return cmd_list_element.
7670 Add new-layout command to help text.
7671 (validate_window_name): New function.
7672 (tui_new_layout_command): New function.
7673 (_initialize_tui_layout): Register "new-layout".
7674 (tui_layout_window::specification): New method.
7675 (tui_layout_window::specification): New method.
7676 * tui/tui-layout.h (class tui_layout_base) <specification>: New
7677 method.
7678 (class tui_layout_window) <specification>: New method.
7679 (class tui_layout_split) <specification>: New method.
7680
7681 2020-02-22 Tom Tromey <tom@tromey.com>
7682
7683 * tui/tui.c (tui_enable): Call tui_set_initial_layout.
7684 * tui/tui-win.c (window_name_completer): Update comment.
7685 * tui/tui-layout.h (class tui_layout_base) <replace_window>:
7686 Declare method.
7687 (class tui_layout_window) <replace_window>: Likewise.
7688 (class tui_layout_split) <replace_window>: Likewise.
7689 (tui_set_layout): Don't declare.
7690 (tui_set_initial_layout): Declare function.
7691 * tui/tui-layout.c (layouts, applied_skeleton, src_regs_layout)
7692 (asm_regs_layout): New globals.
7693 (tui_current_layout, show_layout): Remove.
7694 (tui_set_layout, tui_add_win_to_layout): Rewrite.
7695 (find_layout, tui_apply_layout): New function.
7696 (layout_completer): Remove.
7697 (tui_next_layout): Reimplement.
7698 (tui_next_layout_command): New function.
7699 (tui_set_initial_layout, tui_prev_layout_command): New functions.
7700 (tui_regs_layout): Reimplement.
7701 (tui_regs_layout_command): New function.
7702 (extract_display_start_addr): Rewrite.
7703 (next_layout, prev_layout): Remove.
7704 (tui_layout_window::replace_window): New method.
7705 (tui_layout_split::replace_window): New method.
7706 (destroy_layout): New function.
7707 (layout_list): New global.
7708 (add_layout_command): New function.
7709 (initialize_layouts): Update.
7710 (tui_layout_command): New function.
7711 (_initialize_tui_layout): Install "layout" commands.
7712 * tui/tui-data.h (enum tui_layout_type): Remove.
7713 (tui_current_layout): Don't declare.
7714
7715 2020-02-22 Tom Tromey <tom@tromey.com>
7716
7717 * tui/tui-regs.c (tui_reg_layout): Remove.
7718 (tui_reg_command): Use tui_regs_layout.
7719 * tui/tui-layout.h (tui_reg_command): Declare.
7720 * tui/tui-layout.c (tui_reg_command): New function.
7721
7722 2020-02-22 Tom Tromey <tom@tromey.com>
7723
7724 * tui/tui.c (tui_rl_delete_other_windows): Call
7725 tui_remove_some_windows.
7726 * tui/tui-layout.h (class tui_layout_base) <remove_windows>:
7727 Declare method.
7728 (class tui_layout_window) <remove_windows>: New method.
7729 (class tui_layout_split) <remove_windows>: Declare.
7730 (tui_remove_some_windows): Declare.
7731 * tui/tui-layout.c (tui_remove_some_windows): New function.
7732 (tui_layout_split::remove_windows): New method.
7733
7734 2020-02-22 Tom Tromey <tom@tromey.com>
7735
7736 * tui/tui.c (tui_rl_change_windows): Call tui_next_layout.
7737 * tui/tui-layout.h (tui_next_layout): Declare.
7738 * tui/tui-layout.c (tui_next_layout): New function.
7739
7740 2020-02-22 Tom Tromey <tom@tromey.com>
7741
7742 * tui/tui-regs.c (tui_data_window::display_registers_from): Use
7743 correct coordinates.
7744
7745 2020-02-22 Tom Tromey <tom@tromey.com>
7746
7747 * tui/tui-layout.h (tui_add_win_to_layout): Add comment.
7748 * tui/tui-layout.c (tui_add_win_to_layout): Add assert. Remove
7749 DATA_WIN case.
7750
7751 2020-02-22 Tom Tromey <tom@tromey.com>
7752
7753 * tui/tui-disasm.c (tui_get_low_disassembly_address): Use
7754 TUI_DISASM_WIN, not tui_win_list.
7755
7756 2020-02-22 Tom Tromey <tom@tromey.com>
7757
7758 * valprint.c (generic_val_print_enum_1)
7759 (val_print_type_code_flags): Style member names.
7760 * rust-lang.c (val_print_struct, rust_print_enum)
7761 (rust_print_struct_def, rust_internal_print_type): Style member
7762 names.
7763 * p-valprint.c (pascal_object_print_value_fields): Style member
7764 names. Only call fprintf_symbol_filtered for static members.
7765 * m2-typeprint.c (m2_record_fields, m2_enum): Style member names.
7766 * f-valprint.c (f_val_print): Style member names.
7767 * f-typeprint.c (f_type_print_base): Style member names.
7768 * cp-valprint.c (cp_print_value_fields): Style member names. Only
7769 call fprintf_symbol_filtered for static members.
7770 (cp_print_class_member): Style member names.
7771 * c-typeprint.c (c_print_type_1, c_type_print_base_1): Style
7772 member names.
7773 * ada-valprint.c (ada_print_scalar): Style enum names.
7774 (ada_val_print_enum): Likewise.
7775 * ada-typeprint.c (print_enum_type): Style enum names.
7776
7777 2020-02-21 Tom Tromey <tom@tromey.com>
7778
7779 * psympriv.h (struct partial_symtab): Update comment.
7780
7781 2020-02-21 Tom Tromey <tromey@adacore.com>
7782
7783 * mips-tdep.h (mips_pc_is_mips16, mips_pc_is_micromips): Parameter
7784 type is CORE_ADDR.
7785
7786 2020-02-21 Tom de Vries <tdevries@suse.de>
7787
7788 PR gdb/25534
7789 * psymtab.c (partial_symtab::read_dependencies): Don't read dependency
7790 if dependencies[i]->user != NULL.
7791
7792 2020-02-21 Ali Tamur <tamur@google.com>
7793
7794 * dwarf2/read.c (dwarf2_name): Add null check.
7795
7796 2020-02-20 Tom Tromey <tom@tromey.com>
7797
7798 * dwarf2/read.c (dwarf2_find_containing_comp_unit): Use ">", not
7799 ">=", in binary search.
7800 (dwarf2_find_containing_comp_unit): New overload.
7801 (run_test): New self-test.
7802 (_initialize_dwarf2_read): Register new test.
7803
7804 2020-02-20 Nelson Chu <nelson.chu@sifive.com>
7805
7806 * riscv-tdep.c: Updated since the DECLARE_CSR is changed.
7807 * riscv-tdep.h: Likewise.
7808 * features/riscv/rebuild-csr-xml.sh: Generate the 64bit-csr.xml without
7809 rv32-only CSR.
7810 * features/riscv/64bit-csr.xml: Regenerated.
7811
7812 2020-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
7813 Tom Tromey <tom@tromey.com>
7814
7815 * utils.c (fputs_maybe_filtered): Call 'stream->puts' instead
7816 of 'fputc_unfiltered'.
7817 (putchar_unfiltered): Call 'fputc_unfiltered'.
7818 (fputc_unfiltered): Call 'fputs_unfiltered'.
7819
7820 2020-02-20 Andrew Burgess <andrew.burgess@embecosm.com>
7821
7822 * config.in: Regenerate.
7823 * configure: Regenerate.
7824 * configure.ac: Add --with-python-libdir option.
7825 * main.c: Use WITH_PYTHON_LIBDIR.
7826
7827 2020-02-19 Tom Tromey <tom@tromey.com>
7828
7829 * symtab.c (general_symbol_info::compute_and_set_names): Use
7830 obstack_strndup. Simplify call to symbol_set_demangled_name.
7831
7832 2020-02-19 Simon Marchi <simon.marchi@efficios.com>
7833
7834 * dwarf2/read.c (allocate_signatured_type_table,
7835 allocate_dwo_unit_table, allocate_type_unit_groups_table,
7836 allocate_dwo_file_hash_table, allocate_dwp_loaded_cutus_table):
7837 Remove objfile parameter, update all callers.
7838
7839 2020-02-19 Doug Evans <dje@google.com>
7840
7841 PR rust/25535
7842 * rust-lang.c (rust_print_enum): Apply embedded_offset to
7843 rust_enum_variant calculation.
7844
7845 2020-02-19 Tom Tromey <tromey@adacore.com>
7846
7847 * mips-tdep.h (mips_pc_is_mips): Parameter type is CORE_ADDR.
7848
7849 2020-02-19 Tom Tromey <tromey@adacore.com>
7850
7851 * ada-lang.c (cache_symbol): Use obstack_strdup.
7852
7853 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
7854
7855 * configure: Regenerate.
7856
7857 2020-02-19 Tom Tromey <tromey@adacore.com>
7858
7859 * python/python.c (do_start_initialization): Use XNEWVEC. Remove
7860 NULL check.
7861
7862 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
7863
7864 * NEWS: Mention RISC-V GNU/Linux GDBserver support.
7865
7866 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
7867
7868 * arch/riscv.c (struct riscv_gdbarch_features_hasher): Only define
7869 if GDBSERVER is not defined.
7870 (riscv_tdesc_cache): Likewise, also store const target_desc.
7871 (STATIC_IN_GDB): Define.
7872 (riscv_create_target_description): Update declaration with
7873 STATIC_IN_GDB.
7874 (riscv_lookup_target_description): New function, only define if
7875 GDBSERVER is not defined.
7876 * arch/riscv.h (riscv_create_target_description): Declare only
7877 when GDBSERVER is defined.
7878 (riscv_lookup_target_description): New declaration when GDBSERVER
7879 is not defined.
7880 * nat/riscv-linux-tdesc.c (riscv_linux_read_description): Rename to...
7881 (riscv_linux_read_features): ...this, and return
7882 riscv_gdbarch_features instead of target_desc.
7883 * nat/riscv-linux-tdesc.h: Include 'arch/riscv.h'.
7884 (riscv_linux_read_description): Rename to...
7885 (riscv_linux_read_features): ...this.
7886 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
7887 Update to use riscv_gdbarch_features and
7888 riscv_lookup_target_description.
7889 * riscv-tdep.c (riscv_find_default_target_description): Use
7890 riscv_lookup_target_description instead of
7891 riscv_create_target_description.
7892
7893 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
7894
7895 * valprint.c (generic_val_print_enum_1): When printing a flag
7896 enum with value 0 and there is no enumerator with value 0, print
7897 just "0" instead of "(unknown: 0x0)".
7898
7899 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
7900
7901 * valprint.c (generic_val_print_enum_1): Print unknown part of
7902 flag enum in hex.
7903
7904 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
7905
7906 * dwarf2/read.c (update_enumeration_type_from_children): Allow
7907 flag enums to contain duplicate enumerators.
7908 * valprint.c (generic_val_print_enum_1): Update comment.
7909
7910 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
7911
7912 * dwarf2/read.c: Include "count-one-bits.h".
7913 (update_enumeration_type_from_children): If an enumerator has
7914 multiple bits set, don't treat the enumeration as a "flag enum".
7915 * valprint.c (generic_val_print_enum_1): Assert that enumerators
7916 of flag enums have 0 or 1 bit set.
7917
7918 2020-02-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
7919
7920 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use an explicit
7921 conversion.
7922 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
7923 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
7924 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
7925 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
7926 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
7927
7928 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
7929
7930 * MAINTAINERS: Change palmer@sifive.com to palmer@dabbelt.com.
7931
7932 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
7933
7934 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use
7935 displaced_step_closure_up.
7936 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
7937 (struct displaced_step_closure_up):
7938 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
7939 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
7940 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn):
7941 Likewise.
7942 * gdbarch.sh (displaced_step_copy_insn): Likewise.
7943 * gdbarch.c, gdbarch.h: Re-generate.
7944 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Use
7945 displaced_step_closure_up.
7946 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
7947 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
7948 * infrun.h (displaced_step_closure_up): New type alias.
7949 (struct displaced_step_inferior_state) <step_closure>: Change
7950 type to displaced_step_closure_up.
7951 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Use
7952 displaced_step_closure_up.
7953 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
7954
7955 2020-02-14 Tom Tromey <tom@tromey.com>
7956
7957 * minidebug.c (gnu_debug_key): New global.
7958 (find_separate_debug_file_in_section): Use it.
7959
7960 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
7961
7962 * gdbarch.sh (displaced_step_copy_insn): Change return type to an
7963 std::unique_ptr.
7964 * gdbarch.c: Re-generate.
7965 * gdbarch.h: Re-generate.
7966 * infrun.c (displaced_step_prepare_throw): Adjust to std::unique_ptr
7967 change.
7968 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Change return
7969 type to std::unique_ptr.
7970 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
7971 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
7972 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
7973 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
7974 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Likewise.
7975 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
7976 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
7977 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
7978 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
7979
7980 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
7981
7982 * infrun.c (get_displaced_step_closure_by_addr): Adjust to
7983 std::unique_ptr.
7984 (displaced_step_clear): Rename to...
7985 (displaced_step_reset): ... this. Just call displaced->reset ().
7986 (displaced_step_clear_cleanup): Rename to...
7987 (displaced_step_reset_cleanup): ... this.
7988 (displaced_step_prepare_throw): Adjust to std::unique_ptr.
7989 (displaced_step_fixup): Likewise.
7990 (resume_1): Likewise.
7991 (handle_inferior_event): Restore child's memory before calling
7992 displaced_step_fixup on the parent.
7993 * infrun.h (displaced_step_inferior_state) <reset>: Adjust
7994 to std::unique_ptr.
7995 <step_closure>: Change type to std::unique_ptr.
7996
7997 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
7998
7999 * arm-tdep.c: Include count-one-bits.h.
8000 (cleanup_block_store_pc): Use count_one_bits.
8001 (cleanup_block_load_pc): Use count_one_bits.
8002 (arm_copy_block_xfer): Use count_one_bits.
8003 (thumb2_copy_block_xfer): Use count_one_bits.
8004 (thumb_copy_pop_pc_16bit): Use count_one_bits.
8005 * arch/arm-get-next-pcs.c: Include count-one-bits.h.
8006 (thumb_get_next_pcs_raw): Use count_one_bits.
8007 (arm_get_next_pcs_raw): Use count_one_bits_l.
8008 * arch/arm.c (bitcount): Remove.
8009 * arch/arm.h (bitcount): Remove.
8010
8011 2020-02-14 Tom Tromey <tromey@adacore.com>
8012
8013 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first):
8014 Update.
8015 * dwarf2/loc.h (call_site_find_chain): Return unique_xmalloc_ptr.
8016 * dwarf2/loc.c (call_site_find_chain_1): Return
8017 unique_xmalloc_ptr.
8018 (call_site_find_chain): Likewise.
8019
8020 2020-02-14 Richard Biener <rguenther@suse.de>
8021
8022 * dwarf2/read.c (lnp_state_machine::handle_special_opcode): Apply CSE
8023 on expression with division operators.
8024
8025 2020-02-13 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
8026
8027 * MAINTAINERS (Write After Approval): Adding myself.
8028
8029 2020-02-12 Tom Tromey <tom@tromey.com>
8030
8031 * event-loop.c (event_data, gdb_event, event_handler_func):
8032 Remove.
8033
8034 2020-02-12 Tom Tromey <tom@tromey.com>
8035
8036 * dwarf2/frame.c (dwarf2_frame_bfd_data): New global.
8037 (dwarf2_frame_objfile_data): Add comment.
8038 (find_comp_unit, set_comp_unit): New functions.
8039 (dwarf2_frame_find_fde): Use find_comp_unit.
8040 (dwarf2_build_frame_info): Use set_comp_unit.
8041
8042 2020-02-12 Tom Tromey <tom@tromey.com>
8043
8044 * dwarf2/frame.c (struct comp_unit) <objfile>: Remove.
8045 (comp_unit): Don't initialize objfile.
8046 (execute_cfa_program): Add text_offset parameter.
8047 (execute_cfa_program_test, dwarf2_fetch_cfa_info)
8048 (dwarf2_frame_cache): Update.
8049 (dwarf2_build_frame_info): Don't set "objfile" member.
8050
8051 2020-02-12 Tom Tromey <tom@tromey.com>
8052
8053 * dwarf2/frame.c (decode_frame_entry_1): Add gdbarch parameter.
8054 (decode_frame_entry): Likewise.
8055 (dwarf2_build_frame_info): Update.
8056
8057 2020-02-12 Tom Tromey <tom@tromey.com>
8058
8059 * dwarf2/frame.c (struct comp_unit) <obstack>: New member.
8060 (decode_frame_entry_1): Use the comp_unit obstack.
8061
8062 2020-02-12 Tom Tromey <tom@tromey.com>
8063
8064 * dwarf2/frame.c (struct comp_unit): Add initializers and
8065 constructor.
8066 (dwarf2_frame_objfile_data): Store a comp_unit.
8067 (dwarf2_frame_find_fde): Update.
8068 (dwarf2_build_frame_info): Use "new".
8069
8070 2020-02-12 Tom Tromey <tom@tromey.com>
8071
8072 * dwarf2/frame.c (struct dwarf2_fde_table): Remove.
8073 (dwarf2_fde_table): Typedef for std::vector.
8074 (dwarf2_frame_objfile_data): Remove the deleter. Now static.
8075 (dwarf2_frame_find_fde, add_fde, decode_frame_entry_1)
8076 (decode_frame_entry): Update.
8077 (dwarf2_build_frame_info): Use "new".
8078
8079 2020-02-12 Christian Biesinger <cbiesinger@google.com>
8080
8081 * arm-tdep.c (arm_gdbarch_init): Update.
8082 * arm-tdep.h (struct gdbarch_tdep) <have_fpa_registers,
8083 have_wmmx_registers, have_vfp_pseudos, have_neon_pseudos,
8084 have_neon, is_m>: Change to bool.
8085
8086 2020-02-12 Christian Biesinger <cbiesinger@google.com>
8087
8088 * arm-tdep.c (arm_dump_tdep): Print more fields of tdep.
8089
8090 2020-02-12 Tom Tromey <tom@tromey.com>
8091
8092 * dwarf2/loc.c (struct dwarf_expr_baton): Remove.
8093
8094 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
8095
8096 * windows-tdep.c (struct windows_gdbarch_data): Add tib_ptr_type.
8097 (windows_get_tlb_type): Use windows_gdbarch_data->tib_ptr_type.
8098
8099 2020-02-11 Tom Tromey <tom@tromey.com>
8100
8101 * psymtab.h: Update comment.
8102
8103 2020-02-11 Tom Tromey <tom@tromey.com>
8104
8105 * gdb_obstack.h (struct auto_obstack): Use
8106 DISABLE_COPY_AND_ASSIGN.
8107
8108 2020-02-11 Tom Tromey <tom@tromey.com>
8109
8110 * dwarf2/frame.h (struct objfile): Don't forward declare.
8111
8112 2020-02-11 Christian Biesinger <cbiesinger@google.com>
8113
8114 * cris-tdep.c (cris_supply_gregset): Change signature to match
8115 what struct regset expects.
8116 (cris_regset): New struct.
8117 (fetch_core_registers): Remove.
8118 (cris_iterate_over_regset_sections): New function.
8119 (_initialize_cris_tdep): Don't call deprecated_add_core_fns.
8120 (cris_gdbarch_init): Call set_gdbarch_iterate_over_regset_sections.
8121
8122 2020-02-11 Christian Biesinger <cbiesinger@google.com>
8123
8124 * arch/arm.h (enum gdb_regnum): Add comment for the FP0..7
8125 registers.
8126
8127 2020-02-11 Christian Biesinger <cbiesinger@google.com>
8128
8129 * arm-tdep.c (arm_dump_tdep): Add \n in fprintf.
8130
8131 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
8132
8133 * configure: Re-generate.
8134
8135 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
8136
8137 * configure: Re-generate.
8138
8139 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
8140
8141 * acinclude: Update warning.m4 path.
8142 * warning.m4: Move to gdbsupport.
8143
8144 2020-02-11 Tom Tromey <tromey@adacore.com>
8145
8146 * remote.c (remote_console_output): Update.
8147 * printcmd.c (printf_command): Update.
8148 * event-loop.c (gdb_wait_for_event): Update.
8149 * linux-nat.c (sigchld_handler): Update.
8150 * remote-sim.c (gdb_os_write_stdout): Update.
8151 (gdb_os_flush_stdout): Update.
8152 (gdb_os_flush_stderr): Update.
8153 (gdb_os_write_stderr): Update.
8154 * exceptions.c (print_exception): Update.
8155 * remote-fileio.c (remote_fileio_func_read): Update.
8156 (remote_fileio_func_write): Update.
8157 * tui/tui.c (tui_enable): Update.
8158 * tui/tui-interp.c (tui_interp::init): Update.
8159 * utils.c (init_page_info): Update.
8160 (putchar_unfiltered, fputc_unfiltered): Update.
8161 (gdb_flush): Update.
8162 (emit_style_escape): Update.
8163 (flush_wrap_buffer, fputs_maybe_filtered): Update.
8164 * ui-file.c (ui_file_isatty, ui_file_read, ui_file_write)
8165 (ui_file_write_async_safe, ui_file_flush, ui_file_puts): Remove.
8166 (stderr_file::write): Update.
8167 (stderr_file::puts): Update.
8168 * ui-file.h (ui_file_isatty, ui_file_write)
8169 (ui_file_write_async_safe, ui_file_read, ui_file_flush)
8170 (ui_file_puts): Don't declare.
8171
8172 2020-02-10 Tom de Vries <tdevries@suse.de>
8173
8174 * dwarf2/read.c (process_psymtab_comp_unit_reader): Cast concat NULL
8175 sentinel to char *.
8176
8177 2020-02-09 Tom de Vries <tdevries@suse.de>
8178
8179 * dwarf2read.c (process_psymtab_comp_unit_reader): Append CU offset to
8180 filename if it matches "<artificial>".
8181
8182 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
8183
8184 * windows-tdep.c (struct enum_value_name): New struct.
8185 (create_enum): New function.
8186 (windows_get_siginfo_type): Create and use enum types.
8187
8188 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
8189
8190 * NEWS: Mention $_siginfo support for Windows.
8191 * windows-nat.c (handle_exception): Set siginfo_er.
8192 (windows_nat_target::mourn_inferior): Reset siginfo_er.
8193 (windows_xfer_siginfo): New function.
8194 (windows_nat_target::xfer_partial): Call windows_xfer_siginfo.
8195 * windows-tdep.c (struct windows_gdbarch_data): New struct.
8196 (init_windows_gdbarch_data): New function.
8197 (get_windows_gdbarch_data): New function.
8198 (windows_get_siginfo_type): New function.
8199 (windows_init_abi): Register windows_get_siginfo_type.
8200 (_initialize_windows_tdep): Register init_windows_gdbarch_data.
8201
8202 2020-02-08 Tom Tromey <tom@tromey.com>
8203
8204 * dwarf2/read.c (class cutu_reader) <cutu_reader,
8205 init_tu_and_read_dwo_dies>: Remove "keep" parameter.
8206 <keep>: Declare method.
8207 <m_keep>: Remove member.
8208 <~cutu_reader>: Remove.
8209 (cutu_reader::init_tu_and_read_dwo_dies): Update.
8210 (cutu_reader::cutu_reader): Update.
8211 (cutu_reader::keep): Rename from ~cutu_reader.
8212 (process_psymtab_comp_unit, build_type_psymtabs_1)
8213 (process_skeletonless_type_unit, load_partial_comp_unit)
8214 (load_full_comp_unit, dwarf2_read_addr_index)
8215 (read_signatured_type): Update.
8216
8217 2020-02-08 Tom Tromey <tom@tromey.com>
8218
8219 * dwarf2/read.c (process_psymtab_comp_unit_reader): Remove
8220 "want_partial_unit" parameter.
8221 (process_psymtab_comp_unit): Change want_partial_unit to bool.
8222 Inline check for DW_TAG_partial_unit.
8223 (dwarf2_build_psymtabs_hard, scan_partial_symbols): Update.
8224
8225 2020-02-08 Tom Tromey <tom@tromey.com>
8226
8227 * dwarf2/read.c (read_n_bytes, read_direct_string): Move to
8228 read.c.
8229 * dwarf2/leb.h (read_n_bytes, read_direct_string): Move from
8230 read.c.
8231
8232 2020-02-08 Tom Tromey <tom@tromey.com>
8233
8234 * dwarf2/read.c (read_address): Move to comp-unit.c.
8235 (dwarf2_rnglists_process, dwarf2_ranges_process)
8236 (read_attribute_value, dwarf_decode_lines_1)
8237 (var_decode_location, decode_locdesc): Update.
8238 * dwarf2/comp-unit.c (comp_unit_head::read_address): Move from
8239 read.c. Remove "cu" parameter.
8240 * dwarf2/comp-unit.h (struct comp_unit_head) <read_address>: New
8241 method.
8242
8243 2020-02-08 Tom Tromey <tom@tromey.com>
8244
8245 * dwarf2/read.c (read_attribute_value, read_indirect_string)
8246 (read_indirect_line_string): Update.
8247 * dwarf2/comp-unit.c (read_offset): Remove.
8248 (read_comp_unit_head): Update.
8249 * dwarf2/comp-unit.h (struct comp_unit_head) <read_offset>: New
8250 method.
8251 (read_offset): Don't declare.
8252
8253 2020-02-08 Tom Tromey <tom@tromey.com>
8254
8255 * Makefile.in (COMMON_SFILES): Add dwarf2/comp-unit.c.
8256 * dwarf2/read.c (struct comp_unit_head): Move to
8257 dwarf2/comp-unit.h.
8258 (enum class rcuh_kind): Move to comp-unit.h.
8259 (get_cu_length, offset_in_cu_p): Now methods on comp_unit_head.
8260 (read_comp_unit_head, error_check_comp_unit_head)
8261 (read_and_check_comp_unit_head): Move to comp-unit.c.
8262 (read_offset, dwarf_unit_type_name): Likewise.
8263 (create_debug_type_hash_table, read_cutu_die_from_dwo)
8264 (cutu_reader::cutu_reader, read_call_site_scope)
8265 (find_partial_die, follow_die_offset): Update.
8266 * dwarf2/comp-unit.h: New file, from dwarf2read.c.
8267
8268 2020-02-08 Tom Tromey <tom@tromey.com>
8269
8270 * dwarf2/read.c (read_offset_1): Move to leb.c.
8271 (read_abbrev_offset, read_offset, dwarf_decode_line_header)
8272 (dwarf_decode_macro_bytes): Update.
8273 * dwarf2/leb.c (read_offset): Rename; move from read.c.
8274 * dwarf2/leb.h (read_offset): Declare.
8275
8276 2020-02-08 Tom Tromey <tom@tromey.com>
8277
8278 * dwarf2/read.c (dwarf2_section_size): Remove.
8279 (error_check_comp_unit_head, dwarf2_symbol_mark_computed):
8280 Update.
8281 * dwarf2/section.h (struct dwarf2_section_info) <get_size>: New method.
8282
8283 2020-02-08 Tom Tromey <tom@tromey.com>
8284
8285 * dwarf2/read.c (read_initial_length): Move to leb.c.
8286 * dwarf2/leb.h (read_initial_length): Declare.
8287 * dwarf2/leb.c (read_initial_length): Move from read.c. Add
8288 handle_nonstd parameter.
8289 * dwarf2/frame.c (read_initial_length): Remove.
8290 (decode_frame_entry_1): Update.
8291
8292 2020-02-08 Tom Tromey <tom@tromey.com>
8293
8294 * dwarf2/loc.c (dwarf2_find_location_expression)
8295 (dwarf_evaluate_loc_desc::get_tls_address)
8296 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
8297 (rw_pieced_value, dwarf2_evaluate_loc_desc_full)
8298 (dwarf2_locexpr_baton_eval, dwarf2_evaluate_property)
8299 (dwarf2_compile_property_to_c)
8300 (dwarf2_loc_desc_get_symbol_read_needs)
8301 (dwarf2_compile_expr_to_ax, locexpr_describe_location)
8302 (locexpr_tracepoint_var_ref, locexpr_generate_c_location)
8303 (loclist_describe_location, loclist_tracepoint_var_ref)
8304 (loclist_generate_c_location): Update.
8305 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Update.
8306 * dwarf2/loc.h (dwarf2_per_cu_objfile, dwarf2_per_cu_addr_size)
8307 (dwarf2_per_cu_ref_addr_size, dwarf2_per_cu_offset_size)
8308 (dwarf2_per_cu_text_offset, dwarf2_version): Don't declare.
8309 * dwarf2/read.c (dwarf2_per_cu_data::objfile)
8310 (dwarf2_per_cu_data::addr_size)
8311 (dwarf2_per_cu_data::ref_addr_size)
8312 (dwarf2_per_cu_data::text_offset)
8313 (dwarf2_per_cu_data::addr_type): Now methods.
8314 (per_cu_header_read_in): Make per_cu "const".
8315 (dwarf2_version): Remove.
8316 (dwarf2_per_cu_data::int_type): Now a method.
8317 (dwarf2_per_cu_data::_addr_sized_int_type): Likewise.
8318 (set_die_type, read_array_type, read_subrange_index_type)
8319 (read_tag_string_type, read_subrange_type): Update.
8320 * dwarf2/read.h (struct dwarf2_per_cu_data) <addr_size,
8321 offset_size, ref_addr_size, text_offset, addr_type, version,
8322 objfile, int_type, addr_sized_int_type>: Declare methods.
8323
8324 2020-02-08 Tom Tromey <tom@tromey.com>
8325
8326 * dwarf2/read.h (struct dwarf2_per_cu_data) <imported_symtabs>:
8327 Move earlier.
8328
8329 2020-02-08 Tom Tromey <tom@tromey.com>
8330
8331 * dwarf2/read.h (dwarf_line_debug): Declare.
8332 * Makefile.in (COMMON_SFILES): Add dwarf2/line-header.c.
8333 * dwarf2/read.c: Move line_header code to new files.
8334 (dwarf_line_debug): No longer static.
8335 * dwarf2/line-header.c: New file.
8336 * dwarf2/line-header.h: New file.
8337
8338 2020-02-08 Tom Tromey <tom@tromey.com>
8339
8340 * dwarf2/read.c (struct line_header) <file_full_name,
8341 file_file_name>: Return unique_xmalloc_ptr.
8342 (line_header::file_file_name): Update.
8343 (line_header::file_full_name): Update.
8344 (dw2_get_file_names_reader): Update.
8345 (macro_start_file): Update.
8346
8347 2020-02-08 Tom Tromey <tom@tromey.com>
8348
8349 * dwarf2/read.c (struct line_header) <file_full_name,
8350 file_file_name>: Declare methods.
8351 (dw2_get_file_names_reader): Update.
8352 (file_file_name): Now a method.
8353 (file_full_name): Likewise.
8354 (macro_start_file): Update.
8355
8356 2020-02-08 Tom Tromey <tom@tromey.com>
8357
8358 * dwarf2/read.c (dwarf_always_disassemble)
8359 (show_dwarf_always_disassemble): Move to loc.c.
8360 (_initialize_dwarf2_read): Move "always-disassemble" registration
8361 to loc.c.
8362 * dwarf2/read.h (dwarf_always_disassemble): Don't declare.
8363 * dwarf2/loc.c (dwarf_always_disassemble): Move from read.c. Now
8364 static.
8365 (show_dwarf_always_disassemble): Move from read.c.
8366 (_initialize_dwarf2loc): Move always-disassemble from read.c.
8367
8368 2020-02-08 Tom Tromey <tom@tromey.com>
8369
8370 * dwarf2/read.c (~dwarf2_per_objfile): Update.
8371 (create_quick_file_names_table): Return htab_up.
8372 (dw2_get_file_names_reader, dw2_forget_cached_source_info):
8373 Update.
8374 * dwarf2/read.h (struct dwarf2_per_objfile)
8375 <quick_file_names_table>: Now htab_up.
8376
8377 2020-02-08 Tom Tromey <tom@tromey.com>
8378
8379 * dwarf2/abbrev.c (abbrev_table::read): Simplify.
8380
8381 2020-02-08 Tom Tromey <tom@tromey.com>
8382
8383 * dwarf2/abbrev.c (abbrev_table): Move constructor from header.
8384 Rewrite.
8385 (abbrev_table::add_abbrev, abbrev_table::lookup_abbrev): Rewrite.
8386 * dwarf2/abbrev.h (struct abbrev_info) <next>: Remove.
8387 (abbrev_table::abbrev_table): No longer inline.
8388 (ABBREV_HASH_SIZE): Remove.
8389 (abbrev_table::m_abbrevs): Now an htab_up.
8390
8391 2020-02-08 Tom Tromey <tom@tromey.com>
8392
8393 * dwarf2/read.c (read_cutu_die_from_dwo): Update.
8394 (cutu_reader): Update.
8395 (build_type_psymtabs_1): Update.
8396 * dwarf2/abbrev.c (abbrev_table::read): Rename.
8397 (abbrev_table::alloc_abbrev): Update.
8398 * dwarf2/abbrev.h (abbrev_table_up): Move earlier.
8399 (abbrev_table::read): New static method, renamed from
8400 abbrev_table_read_table.
8401 (abbrev_table::alloc_abbrev)
8402 (abbrev_table::add_abbrev): Now private.
8403 (abbrev_table::abbrev_table): Now private.
8404 (abbrev_table::m_abbrev_obstack): Now private. Rename.
8405
8406 2020-02-08 Tom Tromey <tom@tromey.com>
8407
8408 * dwarf2/read.c (set_die_type, get_die_type_at_offset): Update.
8409 * dwarf2/read.h (struct dwarf2_per_objfile) <die_type_hash>: Now
8410 htab_up.
8411
8412 2020-02-08 Tom Tromey <tom@tromey.com>
8413
8414 * dwarf2/read.c (struct dwp_file) <loaded_cus, loaded_tus>: Now
8415 htab_up.
8416 (lookup_dwo_unit_in_dwp): Update.
8417 (allocate_dwp_loaded_cutus_table): Return htab_up. Don't allocate
8418 on obstack.
8419
8420 2020-02-08 Tom Tromey <tom@tromey.com>
8421
8422 * dwarf2/read.c (allocate_dwo_file_hash_table): Don't allocate on
8423 obstack.
8424
8425 2020-02-08 Tom Tromey <tom@tromey.com>
8426
8427 * dwarf2/read.c (~dwarf2_per_objfile): Don't delete
8428 line_header_hash.
8429 (handle_DW_AT_stmt_list): Update. Don't allocate on obstack.
8430 * dwarf2/read.h (struct dwarf2_per_objfile) <line_header_hash>:
8431 Change type to htab_up.
8432
8433 2020-02-08 Tom Tromey <tom@tromey.com>
8434
8435 * dwarf2/read.c (allocate_type_unit_groups_table): Return
8436 htab_up. Don't allocate on obstack.
8437 (get_type_unit_group, dwarf2_build_psymtabs_hard): Update.
8438 * dwarf2/read.h (struct dwarf2_per_objfile) <type_unit_groups>:
8439 Change type to htab_up.
8440
8441 2020-02-08 Tom Tromey <tom@tromey.com>
8442
8443 * dwarf2/read.h (struct dwarf2_per_objfile) <signatured_types>:
8444 Change type to htab_up.
8445 * dwarf2/read.c (create_signatured_type_table_from_index)
8446 (create_signatured_type_table_from_debug_names)
8447 (create_all_type_units, add_type_unit)
8448 (lookup_dwo_signatured_type, lookup_signatured_type)
8449 (process_skeletonless_type_unit): Update.
8450 (create_debug_type_hash_table, create_debug_types_hash_table):
8451 Change type of types_htab.
8452 (allocate_signatured_type_table, allocate_dwo_unit_table): Return
8453 htab_up. Don't allocate on obstack.
8454 (create_cus_hash_table): Change type of cus_htab parameter.
8455 (struct dwo_file) <cus, tus>: Now htab_up.
8456 (lookup_dwo_signatured_type, lookup_dwo_cutu)
8457 (process_dwo_file_for_skeletonless_type_units, lookup_dwo_cutu)
8458 (queue_and_load_all_dwo_tus): Update.
8459 * dwarf2/index-write.c (write_gdbindex): Update.
8460 (write_debug_names): Update.
8461
8462 2020-02-08 Tom Tromey <tom@tromey.com>
8463
8464 * dwarf2/read.h (struct dwarf2_queue_item): Move from
8465 dwarf2/read.c. Remove "next" member. Add constructor ntad
8466 destructor.
8467 (struct dwarf2_per_objfile) <queue>: New member.
8468 * dwarf2/read.c (struct dwarf2_queue_item): Move to
8469 dwarf2/read.h.
8470 (dwarf2_queue, dwarf2_queue_tail): Remove.
8471 (class dwarf2_queue_guard): Add parameter to constructor. Use
8472 DISABLE_COPY_AND_ASSIGN.
8473 <m_per_objfile>: New member.
8474 <~dwarf2_queue_guard>: Rewrite.
8475 (dw2_do_instantiate_symtab, queue_comp_unit, process_queue):
8476 Update.
8477 (~dwarf2_queue_item): New.
8478
8479 2020-02-08 Tom Tromey <tom@tromey.com>
8480
8481 * dwarf2/read.c (struct die_info) <has_children>: New member.
8482 (dw2_get_file_names_reader): Remove has_children.
8483 (dw2_get_file_names): Update.
8484 (read_cutu_die_from_dwo): Remove has_children.
8485 (cutu_reader::init_tu_and_read_dwo_dies)
8486 (cutu_reader::cutu_reader): Update.
8487 (process_psymtab_comp_unit_reader, build_type_psymtabs_reader):
8488 Remove has_children.
8489 (build_type_psymtabs_1, process_skeletonless_type_unit)
8490 (load_partial_comp_unit, load_full_comp_unit): Update.
8491 (create_dwo_cu_reader): Remove has_children.
8492 (create_cus_hash_table, read_die_and_children): Update.
8493 (read_full_die_1,read_full_die): Remove has_children.
8494 (read_signatured_type): Update.
8495 (class cutu_reader) <has_children>: Remove.
8496
8497 2020-02-08 Tom Tromey <tom@tromey.com>
8498
8499 * dwarf2/expr.c: Rename from dwarf2expr.c.
8500 * dwarf2/expr.h: Rename from dwarf2expr.h.
8501 * dwarf2/frame-tailcall.c: Rename from dwarf2-frame-tailcall.c.
8502 * dwarf2/frame-tailcall.h: Rename from dwarf2-frame-tailcall.h.
8503 * dwarf2/frame.c: Rename from dwarf2-frame.c.
8504 * dwarf2/frame.h: Rename from dwarf2-frame.h.
8505 * dwarf2/index-cache.c: Rename from dwarf-index-cache.c.
8506 * dwarf2/index-cache.h: Rename from dwarf-index-cache.h.
8507 * dwarf2/index-common.c: Rename from dwarf-index-common.c.
8508 * dwarf2/index-common.h: Rename from dwarf-index-common.h.
8509 * dwarf2/index-write.c: Rename from dwarf-index-write.c.
8510 * dwarf2/index-write.h: Rename from dwarf-index-write.h.
8511 * dwarf2/loc.c: Rename from dwarf2loc.c.
8512 * dwarf2/loc.h: Rename from dwarf2loc.h.
8513 * dwarf2/read.c: Rename from dwarf2read.c.
8514 * dwarf2/read.h: Rename from dwarf2read.h.
8515 * dwarf2/abbrev.c, aarch64-tdep.c, alpha-tdep.c,
8516 amd64-darwin-tdep.c, arc-tdep.c, arm-tdep.c, bfin-tdep.c,
8517 compile/compile-c-symbols.c, compile/compile-cplus-symbols.c,
8518 compile/compile-loc2c.c, cris-tdep.c, csky-tdep.c, findvar.c,
8519 gdbtypes.c, guile/scm-type.c, h8300-tdep.c, hppa-bsd-tdep.c,
8520 hppa-linux-tdep.c, i386-darwin-tdep.c, i386-linux-tdep.c,
8521 i386-tdep.c, iq2000-tdep.c, m32c-tdep.c, m68hc11-tdep.c,
8522 m68k-tdep.c, microblaze-tdep.c, mips-tdep.c, mn10300-tdep.c,
8523 msp430-tdep.c, nds32-tdep.c, nios2-tdep.c, or1k-tdep.c,
8524 riscv-tdep.c, rl78-tdep.c, rs6000-tdep.c, rx-tdep.c, s12z-tdep.c,
8525 s390-tdep.c, score-tdep.c, sh-tdep.c, sparc-linux-tdep.c,
8526 sparc-tdep.c, sparc64-linux-tdep.c, sparc64-tdep.c, tic6x-tdep.c,
8527 tilegx-tdep.c, v850-tdep.c, xstormy16-tdep.c, xtensa-tdep.c:
8528 Update.
8529 * Makefile.in (COMMON_SFILES): Update.
8530 (HFILES_NO_SRCDIR): Update.
8531
8532 2020-02-08 Tom Tromey <tom@tromey.com>
8533
8534 * dwarf2read.c (struct die_reader_specs) <comp_dir>: Remove.
8535 (init_cu_die_reader, read_cutu_die_from_dwo): Update.
8536
8537 2020-02-08 Tom Tromey <tom@tromey.com>
8538
8539 * dwarf2read.h (struct die_info): Don't declare.
8540
8541 2020-02-08 Tom Tromey <tom@tromey.com>
8542
8543 * dwarf2read.h (die_info_ptr): Remove typedef.
8544
8545 2020-02-08 Tom Tromey <tom@tromey.com>
8546
8547 * dwarf2read.c (read_call_site_scope)
8548 (handle_data_member_location, dwarf2_add_member_fn)
8549 (mark_common_block_symbol_computed, read_common_block)
8550 (attr_to_dynamic_prop, partial_die_info::read)
8551 (var_decode_location, dwarf2_fetch_die_loc_sect_off)
8552 (dwarf2_symbol_mark_computed, set_die_type): Update.
8553 * dwarf2/attribute.h (struct attribute) <form_is_block>: Declare
8554 method.
8555 (attr_form_is_block): Don't declare.
8556 * dwarf2/attribute.c (attribute::form_is_block): Now a method.
8557
8558 2020-02-08 Tom Tromey <tom@tromey.com>
8559
8560 * dwarf2read.c (dwarf2_find_base_address, )
8561 (read_call_site_scope, rust_containing_type)
8562 (dwarf2_get_pc_bounds, dwarf2_record_block_ranges)
8563 (handle_data_member_location, dwarf2_add_member_fn)
8564 (get_alignment, read_structure_type, process_structure_scope)
8565 (mark_common_block_symbol_computed, read_common_block)
8566 (read_tag_string_type, attr_to_dynamic_prop, read_subrange_type)
8567 (partial_die_info::read, read_attribute_value, new_symbol)
8568 (lookup_die_type, dwarf2_get_ref_die_offset)
8569 (dwarf2_get_attr_constant_value, follow_die_ref_or_sig)
8570 (dwarf2_fetch_die_loc_sect_off, get_DW_AT_signature_type)
8571 (dwarf2_symbol_mark_computed): Update.
8572 * dwarf2/attribute.h (struct attribute) <value_as_address,
8573 form_is_section_offset, form_is_constant, form_is_ref>: Declare
8574 methods.
8575 (value_as_address, attr_form_is_section_offset)
8576 (attr_form_is_constant, attr_form_is_ref): Don't declare.
8577 * dwarf2/attribute.c (attribute::value_as_address)
8578 (attribute::form_is_section_offset, attribute::form_is_constant)
8579 (attribute::form_is_ref): Now methods.
8580
8581 2020-02-08 Tom Tromey <tom@tromey.com>
8582
8583 * dwarf2read.c (struct attribute, DW_STRING)
8584 (DW_STRING_IS_CANONICAL, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR)
8585 (DW_SIGNATURE, struct dwarf_block, attr_value_as_address)
8586 (attr_form_is_block, attr_form_is_section_offset)
8587 (attr_form_is_constant, attr_form_is_ref): Move.
8588 * dwarf2/attribute.h: New file.
8589 * dwarf2/attribute.c: New file, from dwarf2read.c.
8590 * Makefile.in (COMMON_SFILES): Add dwarf2/attribute.c.
8591
8592 2020-02-08 Tom Tromey <tom@tromey.com>
8593
8594 * dwarf2read.c (abbrev_table_up, struct abbrev_info)
8595 (struct attr_abbrev, ABBREV_HASH_SIZE, struct abbrev_table):
8596 Move.
8597 (read_cutu_die_from_dwo, build_type_psymtabs_1): Update.
8598 (abbrev_table::alloc_abbrev, abbrev_table::add_abbrev)
8599 (abbrev_table::lookup_abbrev, abbrev_table_read_table): Move to
8600 abbrev.c.
8601 * dwarf2/abbrev.h: New file.
8602 * dwarf2/abbrev.c: New file, from dwarf2read.c.
8603 * Makefile.in (COMMON_SFILES): Add dwarf2/abbrev.c.
8604
8605 2020-02-08 Tom Tromey <tom@tromey.com>
8606
8607 * dwarf2read.c (dwarf2_section_buffer_overflow_complaint)
8608 (dwarf2_section_size, dwarf2_get_section_info)
8609 (create_signatured_type_table_from_debug_names)
8610 (create_addrmap_from_aranges, read_debug_names_from_section)
8611 (get_gdb_index_contents_from_section, read_comp_unit_head)
8612 (error_check_comp_unit_head, read_abbrev_offset)
8613 (create_debug_type_hash_table, init_cu_die_reader)
8614 (read_cutu_die_from_dwo, dwarf2_build_psymtabs_hard)
8615 (read_comp_units_from_section, create_cus_hash_table)
8616 (create_dwp_hash_table, create_dwo_unit_in_dwp_v1)
8617 (create_dwp_v2_section, dwarf2_rnglists_process)
8618 (dwarf2_ranges_process, read_die_and_siblings, read_full_die)
8619 (abbrev_table_read_table, read_indirect_string_at_offset_from)
8620 (read_indirect_string_from_dwz, read_addr_index_1)
8621 (read_str_index, dwarf_decode_line_header, skip_form_bytes)
8622 (dwarf_decode_macro_bytes, dwarf_decode_macros)
8623 (fill_in_loclist_baton): Update.
8624 * dwarf2/section.h (struct dwarf2_section_info) <get_name,
8625 get_containing_section, get_bfd_owner, get_bfd_section,
8626 get_file_name, get_id, get_flags, empty, read>: Declare methods.
8627 (dwarf2_read_section, get_section_name, get_section_file_name)
8628 (get_containing_section, get_section_bfd_owner)
8629 (get_section_bfd_section, get_section_name, get_section_file_name)
8630 (get_section_id, get_section_flags, dwarf2_section_empty_p): Don't
8631 declare.
8632 * dwarf2/section.c (dwarf2_section_info::get_containing_section)
8633 (dwarf2_section_info::get_bfd_owner)
8634 (dwarf2_section_info::get_bfd_section)
8635 (dwarf2_section_info::get_name)
8636 (dwarf2_section_info::get_file_name, dwarf2_section_info::get_id)
8637 (dwarf2_section_info::get_flags, dwarf2_section_info::empty)
8638 (dwarf2_section_info::read): Now methods.
8639 * dwarf-index-write.c (class debug_names): Update.
8640
8641 2020-02-08 Tom Tromey <tom@tromey.com>
8642
8643 * dwarf2read.h (struct dwarf2_section_info, dwarf2_read_section):
8644 Move to dwarf2/section.h.
8645 * dwarf2read.c (get_containing_section, get_section_bfd_owner)
8646 (get_section_bfd_section, get_section_name)
8647 (get_section_file_name, get_section_id, get_section_flags)
8648 (dwarf2_section_empty_p, dwarf2_read_section): Moe to
8649 dwarf2/section.c.
8650 * dwarf2/section.h: New file.
8651 * dwarf2/section.c: New file, from dwarf2read.c.
8652 * Makefile.in (COMMON_SFILES): Add dwarf2/section.c.
8653
8654 2020-02-08 Tom Tromey <tom@tromey.com>
8655
8656 * dwarf2read.h (read_unsigned_leb128): Don't declare.
8657 * dwarf2read.c (read_1_byte, read_1_signed_byte, read_2_bytes)
8658 (read_2_signed_bytes, read_3_bytes, read_4_bytes)
8659 (read_4_signed_bytes, read_8_bytes): Move to dwarf2/leb.h.
8660 (read_unsigned_leb128, read_signed_leb128): Move to dwarf2/leb.c.
8661 * dwarf2/leb.h: New file, from dwarf2read.c.
8662 * dwarf2/leb.c: New file, from dwarf2read.c.
8663 * dwarf2-frame.c (read_1_byte, read_4_bytes, read_8_bytes):
8664 Remove.
8665 * Makefile.in (CONFIG_SRC_SUBDIR): Add dwarf2.
8666 (COMMON_SFILES): Add dwarf2/leb.c.
8667
8668 2020-02-08 Joel Brobecker <brobecker@adacore.com>
8669
8670 GDB 9.1 released.
8671
8672 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
8673
8674 PR gdb/25190:
8675 * gdb/remote-sim.c (gdb_os_write_stderr): Update.
8676 * gdb/remote.c (remote_console_output): Update.
8677 * gdb/ui-file.c (fputs_unfiltered): Rename to...
8678 (ui_file_puts): ...this.
8679 * gdb/ui-file.h (ui_file_puts): Add declaration.
8680 * gdb/utils.c (emit_style_escape): Update.
8681 (flush_wrap_buffer): Update.
8682 (fputs_maybe_filtered): Update.
8683 (fputs_unfiltered): Add function.
8684
8685 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
8686
8687 * gdb/event-loop.c (gdb_wait_for_event): Update.
8688 * gdb/printcmd.c (printf_command): Update.
8689 * gdb/remote-fileio.c (remote_fileio_func_write): Update.
8690 * gdb/remote-sim.c (gdb_os_flush_stdout): Update.
8691 (gdb_os_flush_stderr): Update.
8692 * gdb/remote.c (remote_console_output): Update.
8693 * gdb/ui-file.c (gdb_flush): Rename to...
8694 (ui_file_flush): ...this.
8695 (stderr_file::write): Update.
8696 (stderr_file::puts): Update.
8697 * gdb/ui-file.h (gdb_flush): Rename to...
8698 (ui_file_flush): ...this.
8699 * gdb/utils.c (gdb_flush): Add function.
8700 * gdb/utils.h (gdb_flush): Add declaration.
8701
8702 2020-02-07 Tom Tromey <tromey@adacore.com>
8703
8704 PR breakpoints/24915:
8705 * source.c (find_and_open_source): Do not check basenames_may_differ.
8706
8707 2020-02-07 Tom Tromey <tom@tromey.com>
8708
8709 * README: Update gdbserver documentation.
8710 * gdbserver: Move to top level.
8711 * configure.tgt (build_gdbserver): Remove.
8712 * configure.ac: Remove --enable-gdbserver.
8713 * configure: Rebuild.
8714 * Makefile.in (distclean): Don't mention gdbserver.
8715
8716 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
8717
8718 * source-cache.c (source_cache::ensure): Surround
8719 get_plain_source_lines with a try/catch.
8720 (source_cache::get_line_charpos): Get rid of try/catch
8721 and only check for the return value of "ensure".
8722 * tui/tui-source.c (tui_source_window::set_contents):
8723 Simplify "nlines" calculation.
8724
8725 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
8726
8727 * MAINTAINERS (Write After Approval): Add myself.
8728
8729 2020-02-05 Christian Biesinger <cbiesinger@google.com>
8730
8731 * sparc-nat.h (struct sparc_target) <xfer_partial>: Fix base class
8732 function call.
8733
8734 2020-02-05 Christian Biesinger <cbiesinger@google.com>
8735
8736 * ppc-nbsd-tdep.h: Fix macro name in #endif comment.
8737
8738 2020-02-05 Maciej W. Rozycki <macro@wdc.com>
8739
8740 * nat/riscv-linux-tdesc.h: New file.
8741 * nat/riscv-linux-tdesc.c: New file, taking code from...
8742 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
8743 ... here.
8744 * configure.nat <linux> <riscv*>: Add nat/riscv-linux-tdesc.o to
8745 NATDEPFILES.
8746
8747 2020-02-04 Andrew Burgess <andrew.burgess@embecosm.com>
8748
8749 * remote-sim.c (sim_inferior_data::sim_inferior_data): Assert that
8750 we don't set the fake simulator ptid to the null_ptid.
8751
8752 2020-02-03 Simon Marchi <simon.marchi@efficios.com>
8753
8754 * fork-child.c (gdb_startup_inferior): Use bool instead of int.
8755 * gdbthread.h (class thread_info) <resumed>: Likewise.
8756 * infrun.c (resume_1): Likewise.
8757 (proceed): Likewise.
8758 (infrun_thread_stop_requested): Likewise.
8759 (stop_all_threads): Likewise.
8760 (handle_inferior_event): Likewise.
8761 (restart_threads): Likewise.
8762 (finish_step_over): Likewise.
8763 (keep_going_stepped_thread): Likewise.
8764 * linux-nat.c (attach_proc_task_lwp_callback): Likewise.
8765 (linux_handle_extended_wait): Likewise.
8766 * record-btrace.c (get_thread_current_frame_id): Likewise.
8767 * record-full.c (record_full_wait_1): Likewise.
8768 * remote.c (remote_target::process_initial_stop_replies): Likewise.
8769 * target.c (target_resume): Likewise.
8770 * thread.c (set_running_thread): Likewise.
8771
8772 2020-02-03 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
8773
8774 * f-valprint.c (f77_print_array_1): Changed datatype of index
8775 variable to LONGEST from int to enable it to contain bound
8776 values correctly.
8777
8778 2020-02-03 Maciej W. Rozycki <macro@wdc.com>
8779
8780 * riscv-linux-nat.c [!NFPREG] (NFPREG): New macro.
8781 (supply_fpregset_regnum, fill_fpregset): Handle regset buffer
8782 offsets according to FLEN determined.
8783 (riscv_linux_nat_target::read_description): Determine FLEN
8784 dynamically.
8785 (riscv_linux_nat_target::fetch_registers): Size regset buffer
8786 according to FLEN determined.
8787 (riscv_linux_nat_target::store_registers): Likewise.
8788
8789 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
8790
8791 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
8792 when reg->group is empty and reggroup is not.
8793
8794 2020-01-31 Tom Tromey <tromey@adacore.com>
8795
8796 * ravenscar-thread.c (ravenscar_thread_target::mourn_inferior):
8797 Call beneath target's mourn_inferior after unpushing.
8798
8799 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
8800
8801 PR tui/9765
8802 * tui/tui-disasm.c (tui_find_disassembly_address): If we don't
8803 have enough lines to fill the screen, still return the lowest
8804 address we found.
8805
8806 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
8807
8808 * tui/tui-win.c (_initialize_tui_win): Update help text for '+',
8809 '-', '<', and '>' commands.
8810
8811 2020-01-29 Pedro Alves <palves@redhat.com>
8812 Sergio Durigan Junior <sergiodj@redhat.com>
8813
8814 * infcmd.c (construct_inferior_arguments): Assert that
8815 'argc' is greater than 0.
8816
8817 2020-01-29 Luis Machado <luis.machado@linaro.org>
8818
8819 * aarch64-tdep.c (BRK_INSN_MASK): Define to 0xffe0001f.
8820 (BRK_INSN_MASK): Define to 0xd4200000.
8821 (aarch64_program_breakpoint_here_p): New function.
8822 (aarch64_gdbarch_init): Set gdbarch_program_breakpoint_here_p hook.
8823 * arch-utils.c (default_program_breakpoint_here_p): Moved from
8824 breakpoint.c.
8825 * arch-utils.h (default_program_breakpoint_here_p): Moved from
8826 breakpoint.h
8827 * breakpoint.c (bp_loc_is_permanent): Changed return type to bool and
8828 call gdbarch_program_breakpoint_here_p.
8829 (program_breakpoint_here): Moved to arch-utils.c, renamed to
8830 default_program_breakpoint_here_p, changed return type to bool and
8831 simplified.
8832 * breakpoint.h (program_breakpoint_here): Moved prototype to
8833 arch-utils.h, renamed to default_program_breakpoint_here_p and changed
8834 return type to bool.
8835 * gdbarch.c: Regenerate.
8836 * gdbarch.h: Regenerate.
8837 * gdbarch.sh (program_breakpoint_here_p): New method.
8838 * infrun.c (handle_signal_stop): Call
8839 gdbarch_program_breakpoint_here_p.
8840
8841 2020-01-26 Tom Tromey <tom@tromey.com>
8842
8843 * ctfread.c (struct ctf_fp_info): Reindent.
8844 (_initialize_ctfread): Remove.
8845
8846 2020-01-26 Tom Tromey <tom@tromey.com>
8847
8848 * psymtab.c (partial_map_expand_apply)
8849 (psym_find_pc_sect_compunit_symtab, psym_lookup_symbol)
8850 (psymtab_to_symtab, psym_find_last_source_symtab, dump_psymtab)
8851 (psym_print_stats, psym_expand_symtabs_for_function)
8852 (psym_map_symbol_filenames, psym_map_matching_symbols)
8853 (psym_expand_symtabs_matching)
8854 (partial_symtab::read_dependencies, maintenance_info_psymtabs)
8855 (maintenance_check_psymtabs): Use new methods.
8856 * psympriv.h (struct partial_symtab) <readin_p,
8857 get_compunit_symtab>: New methods.
8858 <readin, compunit_symtab>: Remove members.
8859 (struct standard_psymtab): New.
8860 (struct legacy_psymtab): Derive from standard_psymtab.
8861 * dwarf2read.h (struct dwarf2_psymtab): Derive from
8862 standard_psymtab.
8863 * ctfread.c (struct ctf_psymtab): Derive from standard_psymtab.
8864
8865 2020-01-26 Tom Tromey <tom@tromey.com>
8866
8867 * xcoffread.c (xcoff_psymtab_to_symtab_1): Call
8868 read_dependencies. Add assert.
8869 * psymtab.c (partial_symtab::read_dependencies): New method.
8870 * psympriv.h (struct partial_symtab) <read_dependencies>: New
8871 method.
8872 * mdebugread.c (psymtab_to_symtab_1): Call read_dependencies.
8873 * dwarf2read.c (dwarf2_psymtab::expand_psymtab): Call
8874 read_dependencies.
8875 * dbxread.c (dbx_psymtab_to_symtab_1): Call read_dependencies.
8876 Add assert.
8877
8878 2020-01-26 Tom Tromey <tom@tromey.com>
8879
8880 * xcoffread.c (xcoff_psymtab_to_symtab_1): Change argument order.
8881 Call expand_psymtab.
8882 (xcoff_read_symtab): Call expand_psymtab.
8883 (xcoff_start_psymtab, xcoff_end_psymtab): Set
8884 legacy_expand_psymtab.
8885 * psympriv.h (struct partial_symtab) <expand_psymtab>: New
8886 method.
8887 (struct legacy_psymtab) <expand_psymtab>: Implement.
8888 <legacy_expand_psymtab>: New member.
8889 * mdebugread.c (mdebug_read_symtab): Call expand_psymtab.
8890 (parse_partial_symbols): Set legacy_expand_psymtab.
8891 (psymtab_to_symtab_1): Change argument order. Call
8892 expand_psymtab.
8893 (new_psymtab): Set legacy_expand_psymtab.
8894 * dwarf2read.h (struct dwarf2_psymtab) <expand_psymtab>: Declare.
8895 * dwarf2read.c (dwarf2_psymtab::read_symtab): Call
8896 expand_psymtab.
8897 (dwarf2_psymtab::expand_psymtab): Rename from
8898 psymtab_to_symtab_1. Call expand_psymtab.
8899 * dbxread.c (start_psymtab): Set legacy_expand_psymtab.
8900 (dbx_end_psymtab): Likewise.
8901 (dbx_psymtab_to_symtab_1): Change argument order. Call
8902 expand_psymtab.
8903 (dbx_read_symtab): Call expand_psymtab.
8904 * ctfread.c (struct ctf_psymtab) <expand_psymtab>: Declare.
8905 (ctf_psymtab::expand_psymtab): Rename from psymtab_to_symtab.
8906 (ctf_psymtab::read_symtab): Call expand_psymtab.
8907
8908 2020-01-26 Tom Tromey <tom@tromey.com>
8909
8910 * xcoffread.c (xcoff_read_symtab): Remove prints. Add assert.
8911 * psymtab.c (psymtab_to_symtab): Print verbose "Reading"
8912 messages.
8913 * mdebugread.c (mdebug_read_symtab): Remove prints.
8914 * dwarf2read.c (dwarf2_psymtab::read_symtab): Remove prints. Add
8915 assert.
8916 * dbxread.c (dbx_read_symtab): Remove prints. Add assert.
8917
8918 2020-01-26 Tom Tromey <tom@tromey.com>
8919
8920 * xcoffread.c (this_symtab_psymtab, read_xcoff_symtab)
8921 (xcoff_psymtab_to_symtab_1, xcoff_read_symtab)
8922 (xcoff_start_psymtab, xcoff_end_psymtab, scan_xcoff_symtab): Use
8923 legacy_symtab.
8924 * stabsread.h (dbx_end_psymtab): Use legacy_symtab.
8925 * psymtab.c (psymtab_to_symtab): Call method.
8926 (dump_psymtab): Update.
8927 * psympriv.h (struct partial_symtab): Add virtual destructor.
8928 <read_symtab>: New method.
8929 (struct legacy_symtab): New.
8930 * mdebugread.c (mdebug_read_symtab): Use legacy_psymtab.
8931 (struct pst_map) <pst>: Now a legacy_psymtab.
8932 (parse_procedure, parse_partial_symbols, psymtab_to_symtab_1)
8933 (new_psymtab): Use legacy_psymtab.
8934 * dwarf2read.h (struct dwarf2_psymtab): New.
8935 (struct dwarf2_per_cu_data) <psymtab>: Use it.
8936 * dwarf2read.c (dwarf2_create_include_psymtab)
8937 (dwarf2_build_include_psymtabs, create_type_unit_group)
8938 (create_partial_symtab, process_psymtab_comp_unit_reader)
8939 (build_type_psymtabs_reader, build_type_psymtab_dependencies)
8940 (set_partial_user): Use dwarf2_psymtab.
8941 (dwarf2_psymtab::read_symtab): Rename from dwarf2_read_symtab.
8942 (psymtab_to_symtab_1, process_full_comp_unit)
8943 (process_full_type_unit, dwarf2_ranges_read)
8944 (dwarf2_get_pc_bounds, psymtab_include_file_name)
8945 (dwarf_decode_lines): Use dwarf2_psymtab.
8946 * dwarf-index-write.c (psym_index_map): Use dwarf2_psymtab.
8947 (add_address_entry_worker, write_one_signatured_type)
8948 (recursively_count_psymbols, recursively_write_psymbols)
8949 (write_one_signatured_type, psyms_seen_size, write_gdbindex)
8950 (write_debug_names): Likewise.
8951 * dbxread.c (struct header_file_location): Take a legacy_psymtab.
8952 <pst>: Now a legacy_psymtab.
8953 (find_corresponding_bincl_psymtab): Return a legacy_psymtab.
8954 (read_dbx_symtab, start_psymtab, dbx_end_psymtab)
8955 (dbx_psymtab_to_symtab_1, read_ofile_symtab): Use legacy_psymtab.
8956 * ctfread.c (struct ctf_psymtab): New.
8957 (ctf_start_symtab, ctf_end_symtab, psymtab_to_symtab): Take a
8958 ctf_psymtab.
8959 (ctf_psymtab::read_symtab): Rename from ctf_read_symtab.
8960 (create_partial_symtab): Return a ctf_psymtab.
8961 (scan_partial_symbols): Update.
8962
8963 2020-01-26 Tom Tromey <tom@tromey.com>
8964
8965 * xcoffread.c (xcoff_start_psymtab): Use new.
8966 * psymtab.c (partial_symtab::partial_symtab): New constructor,
8967 renamed from start_psymtab_common.
8968 * psympriv.h (struct partial_symtab): Add new constructor.
8969 (start_psymtab_common): Don't declare.
8970 * mdebugread.c (parse_partial_symbols): Use new.
8971 * dwarf2read.c (create_partial_symtab): Use new.
8972 * dbxread.c (start_psymtab): Use new.
8973 * ctfread.c (create_partial_symtab): Use new.
8974
8975 2020-01-26 Tom Tromey <tom@tromey.com>
8976
8977 * xcoffread.c (xcoff_end_psymtab): Use new.
8978 * psymtab.c (start_psymtab_common): Use new.
8979 (partial_symtab::partial_symtab): Rename from allocate_psymtab.
8980 Update.
8981 * psympriv.h (struct partial_symtab): Add parameters to
8982 constructor. Don't inline.
8983 (allocate_psymtab): Don't declare.
8984 * mdebugread.c (new_psymtab): Use new.
8985 * dwarf2read.c (dwarf2_create_include_psymtab): Use new.
8986 * dbxread.c (dbx_end_psymtab): Use new.
8987
8988 2020-01-26 Tom Tromey <tom@tromey.com>
8989
8990 * psymtab.h (class psymtab_storage) <install_psymtab>: Rename from
8991 allocate_psymtab. Update documentation.
8992 * psymtab.c (psymtab_storage::install_psymtab): Rename from
8993 allocate_psymtab. Do not use new.
8994 (allocate_psymtab): Use new. Update.
8995
8996 2020-01-26 Tom Tromey <tom@tromey.com>
8997
8998 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
8999 * psymtab.c (psym_print_stats): Update.
9000 * psympriv.h (struct partial_symtab) <readin,
9001 psymtabs_addrmap_supported, anonymous>: Now bool.
9002 * mdebugread.c (psymtab_to_symtab_1): Update.
9003 * dwarf2read.c (create_type_unit_group, create_partial_symtab)
9004 (build_type_psymtabs_reader, psymtab_to_symtab_1)
9005 (process_full_comp_unit, process_full_type_unit): Update.
9006 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
9007 * ctfread.c (psymtab_to_symtab): Update.
9008
9009 2020-01-26 Tom Tromey <tom@tromey.com>
9010
9011 * mdebugread.c (parse_partial_symbols): Use discard_psymtab.
9012 * psymtab.h (class psymtab_storage) <free_psymtabs>: Remove.
9013 * psymtab.c (psymtab_storage): Delete psymtabs.
9014 (psymtab_storage::allocate_psymtab): Use new.
9015 (psymtab_storage::discard_psymtab): Use delete.
9016 * psympriv.h (struct partial_symtab): Add constructor and
9017 initializers.
9018
9019 2020-01-26 Tom Tromey <tom@tromey.com>
9020
9021 * machoread.c: Do not include psympriv.h.
9022
9023 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9024
9025 * NEWS: Mention the new option and the set/show commands.
9026
9027 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9028
9029 * exec.c (exec_file_mismatch_names, exec_file_mismatch_mode)
9030 (show_exec_file_mismatch_command, set_exec_file_mismatch_command)
9031 (validate_exec_file): New variables, enums, functions.
9032 (exec_file_locate_attach, print_section_info): Style the filenames.
9033 (_initialize_exec): Install show_exec_file_mismatch_command and
9034 set_exec_file_mismatch_command.
9035 * gdbcore.h (validate_exec_file): Declare.
9036 * infcmd.c (attach_command): Call validate_exec_file.
9037 * remote.c ( remote_target::remote_add_inferior): Likewise.
9038
9039 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
9040
9041 * frame.c (find_frame_sal): Move call to get_next_frame into more
9042 inner scope.
9043 * inline-frame.c (inilne_state) <inline_state>: Update argument
9044 types.
9045 (inilne_state) <skipped_symbol>: Rename to...
9046 (inilne_state) <skipped_symbols>: ...this, and change to a vector.
9047 (skip_inline_frames): Build vector of skipped symbols and use this
9048 to reate the inline_state.
9049 (inline_skipped_symbol): Add a comment and some assertions, fetch
9050 skipped symbol from the list.
9051
9052 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
9053
9054 * buildsym.c (lte_is_less_than): Delete.
9055 (buildsym_compunit::end_symtab_with_blockvector): Create local
9056 lambda function to sort line table entries, and use
9057 std::stable_sort instead of std::sort.
9058 * symtab.c (find_pc_sect_line): Skip backward over end of sequence
9059 markers when looking for a previous line.
9060
9061 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
9062
9063 * dwarf2read.c (lnp_state_machine::record_line): Include
9064 end_sequence parameter in debug print out. Record the line if we
9065 are at an end_sequence marker even if it's not the start of a
9066 statement.
9067 * symmisc.c (maintenance_print_one_line_table): Print end of
9068 sequence markers with 'END' not '0'.
9069
9070 2020-01-24 Pedro Alves <palves@redhat.com>
9071
9072 PR gdb/25410
9073 * thread.c (scoped_restore_current_thread::restore): Use
9074 switch_to_inferior_no_thread.
9075 * exec.c: Include "progspace-and-thread.h".
9076 (add_target_sections, remove_target_sections):
9077 scoped_restore_current_pspace_and_thread instead of
9078 scoped_restore_current_thread.
9079 * infrun.c (handle_vfork_child_exec_or_exit): Assign the pspace
9080 and aspace to the inferior before calling clone_program_space.
9081 Remove stale comment.
9082
9083 2020-01-24 Christian Biesinger <cbiesinger@google.com>
9084
9085 * arm-nbsd-nat.c (arm_nbsd_nat_target::fetch_registers): Rename to...
9086 (arm_netbsd_nat_target::fetch_registers): ...this.
9087 (arm_nbsd_nat_target::store_registers): Rename to...
9088 (arm_netbsd_nat_target::store_registers): ...this.
9089
9090 2020-01-24 Christian Biesinger <cbiesinger@google.com>
9091
9092 * arm-nbsd-nat.c: Define _KERNTYPES to get the declaration of
9093 register_t.
9094
9095 2020-01-24 Christian Biesinger <cbiesinger@google.com>
9096
9097 * aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections):
9098 Update comment.
9099 * aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections):
9100 Likewise.
9101 * arm-fbsd-tdep.c (arm_fbsd_iterate_over_regset_sections): Likewise.
9102 * gdbcore.h (deprecated_add_core_fns): Update comment to point to
9103 the correct replacement (iterate_over_regset_sections).
9104 * riscv-fbsd-tdep.c (riscv_fbsd_iterate_over_regset_sections):
9105 Update comment.
9106
9107 2020-01-24 Graham Markall <graham.markall@embecosm.com>
9108
9109 PR gdb/23718
9110 * gdb/python/python.c (execute_gdb_command): Call
9111 async_enable_stdin in catch block.
9112
9113 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
9114
9115 * event-loop.c (start_event_loop): Wrap async_enable_stdin with
9116 SWITCH_THRU_ALL_UIS.
9117
9118 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
9119
9120 PR tui/9765
9121 * minsyms.c (lookup_minimal_symbol_by_pc_section): Update header
9122 comment, add extra parameter, and update to store previous symbol
9123 when appropriate.
9124 * minsyms.h (lookup_minimal_symbol_by_pc_section): Update comment,
9125 add extra parameter.
9126 * tui/tui-disasm.c (tui_disassemble): Update header comment,
9127 remove unneeded parameter, add try/catch around gdb_print_insn,
9128 rewrite to add items to asm_lines vector.
9129 (tui_find_backward_disassembly_start_address): New function.
9130 (tui_find_disassembly_address): Updated throughout.
9131 (tui_disasm_window::set_contents): Update for changes to
9132 tui_disassemble.
9133 (tui_disasm_window::do_scroll_vertical): No need to adjust the
9134 number of lines to scroll.
9135
9136 2020-01-23 Simon Marchi <simon.marchi@polymtl.ca>
9137
9138 * objfiles.h (ALL_OBJFILE_OSECTIONS): Move up.
9139 (SECT_OFF_DATA): Likewise.
9140 (SECT_OFF_RODATA): Likewise.
9141 (SECT_OFF_TEXT): Likewise.
9142 (SECT_OFF_BSS): Likewise.
9143 (struct objfile) <text_section_offset, data_section_offset>: New
9144 methods.
9145 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Use
9146 objfile::text_section_offset.
9147 * coff-pe-read.c (add_pe_forwarded_sym): Likewise.
9148 * coffread.c (coff_symtab_read): Likewise.
9149 (enter_linenos): Likewise.
9150 (process_coff_symbol): Likewise.
9151 * ctfread.c (get_objfile_text_range): Likewise.
9152 * dtrace-probe.c (dtrace_probe::get_relocated_address):
9153 Use objfile::data_section_offset.
9154 * dwarf2-frame.c (execute_cfa_program): Use
9155 objfile::text_section_offset.
9156 (dwarf2_frame_find_fde): Likewise.
9157 * dwarf2read.c (create_addrmap_from_index): Likewise.
9158 (create_addrmap_from_aranges): Likewise.
9159 (dw2_find_pc_sect_compunit_symtab): Likewise.
9160 (process_psymtab_comp_unit_reader): Likewise.
9161 (add_partial_symbol): Likewise.
9162 (add_partial_subprogram): Likewise.
9163 (process_full_comp_unit): Likewise.
9164 (read_file_scope): Likewise.
9165 (read_func_scope): Likewise.
9166 (read_lexical_block_scope): Likewise.
9167 (read_call_site_scope): Likewise.
9168 (dwarf2_rnglists_process): Likewise.
9169 (dwarf2_ranges_process): Likewise.
9170 (dwarf2_ranges_read): Likewise.
9171 (dwarf_decode_lines_1): Likewise.
9172 (new_symbol): Likewise.
9173 (dwarf2_fetch_die_loc_sect_off): Likewise.
9174 (dwarf2_per_cu_text_offset): Likewise.
9175 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Likewise.
9176 * hppa-tdep.c (read_unwind_info): Likewise.
9177 * ia64-tdep.c (ia64_find_unwind_table): Likewise.
9178 * psympriv.h (struct partial_symtab): Likewise.
9179 * psymtab.c (find_pc_sect_psymtab): Likewise.
9180 * solib-svr4.c (enable_break): Likewise.
9181 * stap-probe.c (relocate_address): Use
9182 objfile::data_section_offset.
9183 * xcoffread.c (enter_line_range): Use
9184 objfile::text_section_offset.
9185 (read_xcoff_symtab): Likewise.
9186
9187 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
9188
9189 * darwin-nat.c (darwin_nat_target::wait_1): Move `inf`
9190 declaration to narrower scopes.
9191
9192 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
9193
9194 * darwin-nat.h (struct darwin_exception_msg, enum
9195 darwin_msg_state, struct darwin_thread_info, darwin_thread_t):
9196 Move up.
9197 (class darwin_nat_target) <wait_1, check_new_threads,
9198 decode_exception_message, decode_message, stop_inferior,
9199 init_thread_list, ptrace_him, cancel_breakpoint>: Declare.
9200 * darwin-nat.c (darwin_check_new_threads): Rename to...
9201 (darwin_nat_target::check_new_threads): ... this.
9202 (darwin_suspend_inferior_it): Remove.
9203 (darwin_decode_exception_message): Rename to...
9204 (darwin_nat_target::decode_exception_message): ... this.
9205 (darwin_nat_target::resume): Pass target to find_inferior_ptid.
9206 (darwin_decode_message): Rename to...
9207 (darwin_nat_target::decode_message): ... this.
9208 (cancel_breakpoint): Rename to...
9209 (darwin_nat_target::cancel_breakpoint): ... this.
9210 (darwin_wait): Rename to...
9211 (darwin_nat_target::wait_1): ... this. Use range-based for loop
9212 instead of iterate_over_inferiors.
9213 (darwin_nat_target::wait): Call wait_1 instead of darwin_wait.
9214 (darwin_stop_inferior): Rename to...
9215 (darwin_nat_target::stop_inferior): ... this.
9216 (darwin_nat_target::kill): Call wait_1 instead of darwin_wait.
9217 (darwin_init_thread_list): Rename to...
9218 (darwin_nat_target::init_thread_list): ... this.
9219 (darwin_ptrace_him): Rename to...
9220 (darwin_nat_target::ptrace_him): ... this.
9221 (darwin_nat_target::create_inferior): Pass lambda function to
9222 fork_inferior.
9223 (darwin_nat_target::detach): Call stop_inferior instead of
9224 darwin_stop_inferior.
9225 * fork-inferior.h (fork_inferior): Change init_trace_fun
9226 parameter to gdb::function_view.
9227 * fork-inferior.c (fork_inferior): Likewise.
9228
9229 2020-01-23 Hannes Domani <ssbssa@yahoo.de>
9230
9231 * i386-cygwin-tdep.c (core_process_module_section): Update.
9232 * windows-nat.c (struct lm_info_windows): Add text_offset.
9233 (windows_xfer_shared_libraries): Update.
9234 * windows-tdep.c (windows_xfer_shared_library):
9235 Add text_offset_cached argument.
9236 * windows-tdep.h (windows_xfer_shared_library): Update.
9237
9238 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
9239
9240 * gdbarch.sh: Add declaration for _initialize_gdbarch.
9241
9242 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
9243
9244 * remote-sim.c (check_for_duplicate_sim_descriptor): Remove.
9245 (get_sim_inferior_data): Remove use of iterate_over_inferiors,
9246 replace with range-based for.
9247 (gdbsim_interrupt_inferior): Remove.
9248 (gdbsim_target::interrupt): Replace iterate_over_inferiors use
9249 with a range-based for. Inline code from
9250 gdbsim_interrupt_inferior.
9251
9252 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
9253
9254 * infrun.c (proceed): Fix indentation.
9255
9256 2020-01-21 Tom Tromey <tromey@adacore.com>
9257
9258 * source-cache.c (source_cache::ensure): Call ext_lang_colorize.
9259 * python/python.c (python_extension_ops): Update.
9260 (gdbpy_colorize): New function.
9261 * python/lib/gdb/__init__.py (colorize): New function.
9262 * extension.h (ext_lang_colorize): Declare.
9263 * extension.c (ext_lang_colorize): New function.
9264 * extension-priv.h (struct extension_language_ops) <colorize>: New
9265 member.
9266 * cli/cli-style.c (_initialize_cli_style): Update help text.
9267
9268 2020-01-21 Luis Machado <luis.machado@linaro.org>
9269
9270 * aarch64-tdep.c (struct aarch64_displaced_step_closure)
9271 <cond>: Change type to bool.
9272 (aarch64_displaced_step_b_cond): Update cond to use bool type.
9273 (aarch64_displaced_step_cb): Likewise.
9274 (aarch64_displaced_step_tb): Likewise.
9275
9276 2020-01-21 Luis Machado <luis.machado@linaro.org>
9277
9278 * aarch64-tdep.c (aarch64_displaced_step_fixup): Add more debugging
9279 output.
9280
9281 2020-01-21 Luis Machado <luis.machado@linaro.org>
9282
9283 * aarch64-tdep.c (struct aarch64_displaced_step_closure )
9284 <pc_adjust>: Adjust the documentation.
9285 (aarch64_displaced_step_fixup): Check if PC really moved before
9286 adjusting it.
9287
9288 2020-01-19 Tom Tromey <tom@tromey.com>
9289
9290 * disasm.c (~gdb_disassembler): New destructor.
9291 (gdb_buffered_insn_length): Call disassemble_free_target.
9292 * disasm.h (class gdb_disassembler): Declare destructor. Use
9293 DISABLE_COPY_AND_ASSIGN.
9294
9295 2020-01-19 Tom Tromey <tom@tromey.com>
9296
9297 * dwarf2read.c (abbrev_table_up): Move typedef earlier.
9298 (die_reader_func_ftype): Remove.
9299 (cutu_reader): New class.
9300 (dw2_get_file_names_reader): Remove "data" parameter.
9301 (dw2_get_file_names): Use cutu_reader.
9302 (create_debug_type_hash_table): Update.
9303 (read_cutu_die_from_dwo): Update comment.
9304 (lookup_dwo_unit): Add dwo_name parameter.
9305 (cutu_reader::init_tu_and_read_dwo_dies): Now a method. Remove
9306 die_reader_func_ftype and data parameters.
9307 (cutu_reader::cutu_reader): Rename from init_cutu_and_read_dies.
9308 Remove die_reader_func_ftype and data parameters.
9309 (~cutu_reader): New; from init_cutu_and_read_dies.
9310 (cutu_reader::cutu_reader): Rename from
9311 init_cutu_and_read_dies_no_follow. Remove die_reader_func_ftype
9312 and data parameters.
9313 (init_cutu_and_read_dies_simple): Remove.
9314 (struct process_psymtab_comp_unit_data): Remove.
9315 (process_psymtab_comp_unit_reader): Remove data parameter; add
9316 want_partial_unit and pretend_language parameters.
9317 (process_psymtab_comp_unit): Use cutu_reader.
9318 (build_type_psymtabs_reader): Remove data parameter.
9319 (build_type_psymtabs_1): Use cutu_reader.
9320 (process_skeletonless_type_unit): Likewise.
9321 (load_partial_comp_unit_reader): Remove.
9322 (load_partial_comp_unit): Use cutu_reader.
9323 (load_full_comp_unit_reader): Remove.
9324 (load_full_comp_unit): Use cutu_reader.
9325 (struct create_dwo_cu_data): Remove.
9326 (create_dwo_cu_reader): Remove datap parameter; add dwo_file and
9327 dwo_unit parameters.
9328 (create_cus_hash_table): Use cutu_reader.
9329 (struct dwarf2_read_addr_index_data): Remove.
9330 (dwarf2_read_addr_index_reader): Remove.
9331 (dwarf2_read_addr_index): Use cutu_reader.
9332 (read_signatured_type_reader): Remove.
9333 (read_signatured_type): Use cutu_reader.
9334
9335 2020-01-19 Tom Tromey <tom@tromey.com>
9336
9337 * tui/tui.c (tui_show_assembly): Use tui_suppress_output.
9338 * tui/tui-wingeneral.h (class tui_suppress_output): New.
9339 (tui_wrefresh): Declare.
9340 * tui/tui-wingeneral.c (suppress_output): New global.
9341 (tui_suppress_output, ~tui_suppress_output): New constructor and
9342 destructor.
9343 (tui_wrefresh): New function.
9344 (tui_gen_win_info::refresh_window): Use tui_wrefresh.
9345 (tui_gen_win_info::make_window): Call wnoutrefresh when needed.
9346 * tui/tui-regs.h (struct tui_data_window) <no_refresh>: Declare
9347 method.
9348 * tui/tui-regs.c (tui_data_window::erase_data_content): Call
9349 tui_wrefresh.
9350 (tui_data_window::no_refresh): New method.
9351 (tui_data_item_window::refresh_window): Call tui_wrefresh.
9352 (tui_reg_command): Use tui_suppress_output
9353 * tui/tui-layout.c (tui_set_layout): Use tui_suppress_output.
9354 * tui/tui-data.h (struct tui_gen_win_info) <no_refresh>: New
9355 method.
9356 * tui/tui-command.c (tui_refresh_cmd_win): Call tui_wrefresh.
9357
9358 2020-01-19 Tom Tromey <tom@tromey.com>
9359
9360 * tui/tui-winsource.c (tui_update_source_windows_with_line):
9361 Handle case where symtab is null.
9362
9363 2020-01-19 Simon Marchi <simon.marchi@polymtl.ca>
9364
9365 * linux-fork.c (one_fork_p): Simplify.
9366
9367 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
9368
9369 * top.c (struct qt_args): Remove.
9370 (kill_or_detach): Change return type to void, replace `void *`
9371 parameter with a proper one.
9372 (print_inferior_quit_action): Likewise.
9373 (quit_confirm): Use range-based for loop to iterate over inferiors.
9374 (quit_force): Likewise.
9375
9376 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
9377
9378 * mi/mi-main.c (run_one_inferior): Change return type to void, replace
9379 `void *` parameter with proper parameters.
9380 (mi_cmd_exec_run): Use range-based loop to iterate over inferiors.
9381 (print_one_inferior): Change return type to void, replace `void *`
9382 parameter with proper parameters.
9383 (mi_cmd_list_thread_groups): Use range-based loop to iterate over
9384 inferiors.
9385 (get_other_inferior): Remove.
9386 (mi_cmd_remove_inferior): Use range-based loop to iterate over
9387 inferiors.
9388
9389 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
9390
9391 * mi/mi-interp.c (report_initial_inferior): Remove.
9392 (mi_interp::init): Use range-based for to iterate over inferiors.
9393
9394 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
9395
9396 * python/py-inferior.c (build_inferior_list): Remove.
9397 (gdbpy_ref): Use range-based for loop to iterate over inferiors.
9398
9399 2020-01-16 Christian Biesinger <cbiesinger@google.com>
9400
9401 * btrace.c (btrace_compute_ftrace_1): Fix spelling error (Unkown).
9402 (btrace_stitch_trace): Likewise.
9403 * charset.c (intermediate_encoding): Likewise (vaild).
9404 * nat/linux-btrace.c (linux_read_pt): Likewise (Unkown).
9405 * python/py-record-btrace.c (struct PyMethodDef): Likewise (occurences).
9406 * record-btrace.c (record_btrace_print_conf): Likewise (unkown).
9407
9408 2020-01-16 Hannes Domani <ssbssa@yahoo.de>
9409
9410 * windows-tdep.c (windows_get_tlb_type):
9411 Add rtl_user_process_parameters type.
9412
9413 2020-01-16 Pedro Alves <palves@redhat.com>
9414 Norbert Lange <nolange79@gmail.com>
9415
9416 PR build/24805
9417 * gdbsupport/gdb_proc_service.h (PS_EXPORT): New.
9418 (ps_get_thread_area, ps_getpid, ps_lcontinue, ps_lgetfpregs)
9419 (ps_lgetregs, ps_lsetfpregs, ps_lsetregs, ps_lstop, ps_pcontinue)
9420 (ps_pdread, ps_pdwrite, ps_pglobal_lookup, ps_pstop, ps_ptread)
9421 (ps_ptwrite, ps_lgetxregs, ps_lgetxregsize, ps_lsetxregs)
9422 (ps_plog): Redeclare exported functions with default visibility.
9423
9424 2020-01-16 Nitika Achra <Nitika.Achra@amd.com>
9425
9426 * dwarf2loc.c (decode_debug_loclists_addresses): Handle
9427 DW_LLE_base_addressx, DW_LLE_startx_length, DW_LLE_start_length.
9428
9429 2020-01-15 Simon Marchi <simon.marchi@efficios.com>
9430
9431 * infcmd.c (post_create_inferior): Use get_thread_regcache
9432 instead of get_current_regcache.
9433
9434 2020-01-14 Tom Tromey <tom@tromey.com>
9435
9436 PR symtab/12535:
9437 * python/python.c (gdbpy_decode_line): Treat empty string the same
9438 as no argument.
9439
9440 2020-01-14 Tom Tromey <tom@tromey.com>
9441
9442 * Makefile.in (CLIBS): Remove second use of $(LIBIBERTY).
9443
9444 2020-01-14 Tom Tromey <tom@tromey.com>
9445
9446 * nat/linux-btrace.c: Don't include <config.h>.
9447 * nat/linux-ptrace.c: Don't include <config.h>.
9448 * nat/x86-linux-dregs.c: Don't include <config.h>.
9449
9450 2020-01-14 Tom Tromey <tom@tromey.com>
9451
9452 * configure: Rebuild.
9453 * configure.ac: Move many checks to ../gdbsupport/common.m4.
9454
9455 2020-01-14 Tom Tromey <tom@tromey.com>
9456
9457 * nat/x86-linux-dregs.c: Include configh.h.
9458 * nat/linux-ptrace.c: Include configh.h.
9459 * nat/linux-btrace.c: Include configh.h.
9460 * defs.h: Include config.h, bfd.h.
9461 * configure.ac: Don't source common.host.
9462 (CONFIG_OBS, CONFIG_SRCS): Remove gdbsupport files.
9463 * configure: Rebuild.
9464 * acinclude.m4: Update path.
9465 * Makefile.in (SUPPORT, LIBSUPPORT, INCSUPPORT): New variables.
9466 (CONFIG_SRC_SUBDIR): Remove gdbsupport.
9467 (INTERNAL_CFLAGS_BASE): Add INCSUPPORT.
9468 (CLIBS): Add LIBSUPPORT.
9469 (CDEPS): Likewise.
9470 (COMMON_SFILES): Remove gdbsupport files.
9471 (HFILES_NO_SRCDIR): Likewise.
9472 (stamp-version): Update path to create-version.sh.
9473 (ALLDEPFILES): Remove gdbsupport files.
9474
9475 2020-01-14 Tom Tromey <tom@tromey.com>
9476
9477 * gdbsupport/common.m4 (GDB_AC_COMMON): Define WIN32APILIBS and
9478 USE_WIN32API when needed.
9479 * configure.ac (USE_WIN32API): Don't define.
9480 (WIN32LIBS): Use WIN32APILIBS.
9481 * configure: Rebuild.
9482
9483 2020-01-14 Tom Tromey <tom@tromey.com>
9484
9485 * configure: Rebuild.
9486 * gdbsupport/common.m4 (GDB_AC_COMMON): Fix indentation.
9487
9488 2020-01-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
9489
9490 * skip.c (skip_function_command): Make skip w/o arguments use the
9491 name of the inlined function if pc is inside any inlined function.
9492
9493 2020-01-14 Luis Machado <luis.machado@linaro.org>
9494
9495 * inf-ptrace.c (inf_ptrace_target::resume): Update comments.
9496 * infrun.c (resume_1): Likewise.
9497 (handle_inferior_event): Remove stale comment.
9498 * linux-nat.c (linux_nat_target::resume): Update comments.
9499 (save_stop_reason): Likewise.
9500 (linux_nat_filter_event): Likewise.
9501 * linux-nat.h (struct lwp_info) <stop_pc>, <stop_reason>: Likewise.
9502
9503 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
9504
9505 * elfread.c (record_minimal_symbol): Set section index to 0 for
9506 non-allocatable sections.
9507
9508
9509 2020-01-13 Ali Tamur <tamur@google.com>
9510
9511 * dwarf2read.c (dwarf2_debug_sections): Add debug_str_offsets sections.
9512 (dwarf2_cu): Add str_offsets_base field. Change the type of addr_base
9513 to gdb::optional. Update comments.
9514 (dwo_file): Update comments.
9515 (read_attribute): Update API to take an additional out parameter,
9516 need_reprocess. This is used to mark attributes that need other
9517 attributes (e.g. str_offsets_base) for correct computation which may not
9518 have been read yet.
9519 (read_attribute_reprocess): New function declaration.
9520 (read_addr_index): Likewise.
9521 (read_dwo_str_index): Likewise.
9522 (read_stub_str_index): Likewise.
9523 (dwarf2_per_objfile::locate_sections): Handle debug_str_offsets section.
9524 (lookup_addr_base): New function definition.
9525 (lookup_ranges_base): Likewise.
9526 (read_cutu_die_from_dwo): Use the new functions: lookup_addr_base,
9527 lookup_ranges_base.
9528 (init_cutu_and_read_dies): Update comments.
9529 (init_cutu_and_read_dies_no_follow): Change API to take parent compile
9530 unit. This is used to inherit parent's str_offsets_base and addr_base.
9531 Update comments.
9532 (init_cutu_and_read_dies_simple): Reflect API changes.
9533 (skip_one_die): Reflect API changes. Handle DW_FORM_rnglistx.
9534 (create_cus_hash_table): Change API to take parent compile unit.
9535 Reflect API changes.
9536 (open_and_init_dwo_file): Reflect API changes.
9537 (dwarf2_get_pc_bounds): Update comments.
9538 (dwarf2_record_block_ranges): Likewise.
9539 (read_full_die_1): Change implementation to reprocess attributes that
9540 need str_offsets_base and addr_base.
9541 (partial_die_info::read): Likewise.
9542 (read_attribute_reprocess): New function definition.
9543 (read_attribute_value): Change API to take an additional out parameter,
9544 need_reprocess. Handle DW_FORM_rnglistx. No longer trigger an error
9545 when a non-dwo compile unit has index based attributes.
9546 (read_attribute): Reflect API changes.
9547 (read_addr_index_1): Reflect API changes. Update comments.
9548 (dwarf2_read_addr_index_data): Reflect API changes.
9549 (dwarf2_read_addr_index): Likewise.
9550 (read_str_index): Change API and implementation. This becomes a helper
9551 to be used by the new string index related methods. Update error
9552 message and comments.
9553 (read_dwo_str_index): New function definition.
9554 (read_stub_str_index): Likewise.
9555 * dwarf2read.h (dwarf2_per_objfile): Add str_offsets field.
9556 * symfile.h (dwarf2_debug_sections): Likewise.
9557 * xcoffread.c (dwarf2_debug_sections): Likewise.
9558
9559 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
9560
9561 * gdbcore.h (struct core_fns) <core_read_registers>: Change
9562 core_reg_sect type to gdb_byte *.
9563 * arm-nbsd-nat.c (fetch_elfcore_registers): Likewise.
9564 * cris-tdep.c (fetch_core_registers): Likewise.
9565 * corelow.c (core_target::get_core_register_section): Change
9566 type of `contents` to gdb::byte_vector.
9567
9568 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
9569
9570 * tui/tui-wingeneral.c (box_win): Position the title in the center
9571 of the border.
9572
9573 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
9574
9575 * corelow.c (core_target::get_core_register_section): Use
9576 std::vector instead of alloca.
9577
9578 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
9579
9580 * warning.m4: Add -Wmissing-declarations to build_warnings.
9581 * configure: Re-generate.
9582
9583 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
9584
9585 * python/python.c (init__gdb_module): Add declaration.
9586
9587 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
9588
9589 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Add declaration.
9590 * aarch64-fbsd-tdep.c (_initialize_aarch64_fbsd_tdep): Add declaration.
9591 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Add declaration.
9592 * aarch64-linux-tdep.c (_initialize_aarch64_linux_tdep): Add declaration.
9593 * aarch64-newlib-tdep.c (_initialize_aarch64_newlib_tdep): Add declaration.
9594 * aarch64-tdep.c (_initialize_aarch64_tdep): Add declaration.
9595 * ada-exp.y (_initialize_ada_exp): Add declaration.
9596 * ada-lang.c (_initialize_ada_language): Add declaration.
9597 * ada-tasks.c (_initialize_tasks): Add declaration.
9598 * agent.c (_initialize_agent): Add declaration.
9599 * aix-thread.c (_initialize_aix_thread): Add declaration.
9600 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Add declaration.
9601 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Add declaration.
9602 * alpha-linux-tdep.c (_initialize_alpha_linux_tdep): Add declaration.
9603 * alpha-nbsd-tdep.c (_initialize_alphanbsd_tdep): Add declaration.
9604 * alpha-obsd-tdep.c (_initialize_alphaobsd_tdep): Add declaration.
9605 * alpha-tdep.c (_initialize_alpha_tdep): Add declaration.
9606 * amd64-darwin-tdep.c (_initialize_amd64_darwin_tdep): Add declaration.
9607 * amd64-dicos-tdep.c (_initialize_amd64_dicos_tdep): Add declaration.
9608 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Add declaration.
9609 * amd64-fbsd-tdep.c (_initialize_amd64fbsd_tdep): Add declaration.
9610 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Add declaration.
9611 * amd64-linux-tdep.c (_initialize_amd64_linux_tdep): Add declaration.
9612 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Add declaration.
9613 * amd64-nbsd-tdep.c (_initialize_amd64nbsd_tdep): Add declaration.
9614 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Add declaration.
9615 * amd64-obsd-tdep.c (_initialize_amd64obsd_tdep): Add declaration.
9616 * amd64-sol2-tdep.c (_initialize_amd64_sol2_tdep): Add declaration.
9617 * amd64-tdep.c (_initialize_amd64_tdep): Add declaration.
9618 * amd64-windows-nat.c (_initialize_amd64_windows_nat): Add declaration.
9619 * amd64-windows-tdep.c (_initialize_amd64_windows_tdep): Add declaration.
9620 * annotate.c (_initialize_annotate): Add declaration.
9621 * arc-newlib-tdep.c (_initialize_arc_newlib_tdep): Add declaration.
9622 * arc-tdep.c (_initialize_arc_tdep): Add declaration.
9623 * arch-utils.c (_initialize_gdbarch_utils): Add declaration.
9624 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Add declaration.
9625 * arm-fbsd-tdep.c (_initialize_arm_fbsd_tdep): Add declaration.
9626 * arm-linux-nat.c (_initialize_arm_linux_nat): Add declaration.
9627 * arm-linux-tdep.c (_initialize_arm_linux_tdep): Add declaration.
9628 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Add declaration.
9629 * arm-nbsd-tdep.c (_initialize_arm_netbsd_tdep): Add declaration.
9630 * arm-obsd-tdep.c (_initialize_armobsd_tdep): Add declaration.
9631 * arm-pikeos-tdep.c (_initialize_arm_pikeos_tdep): Add declaration.
9632 * arm-symbian-tdep.c (_initialize_arm_symbian_tdep): Add declaration.
9633 * arm-tdep.c (_initialize_arm_tdep): Add declaration.
9634 * arm-wince-tdep.c (_initialize_arm_wince_tdep): Add declaration.
9635 * auto-load.c (_initialize_auto_load): Add declaration.
9636 * auxv.c (_initialize_auxv): Add declaration.
9637 * avr-tdep.c (_initialize_avr_tdep): Add declaration.
9638 * ax-gdb.c (_initialize_ax_gdb): Add declaration.
9639 * bfin-linux-tdep.c (_initialize_bfin_linux_tdep): Add declaration.
9640 * bfin-tdep.c (_initialize_bfin_tdep): Add declaration.
9641 * break-catch-sig.c (_initialize_break_catch_sig): Add declaration.
9642 * break-catch-syscall.c (_initialize_break_catch_syscall): Add declaration.
9643 * break-catch-throw.c (_initialize_break_catch_throw): Add declaration.
9644 * breakpoint.c (_initialize_breakpoint): Add declaration.
9645 * bsd-uthread.c (_initialize_bsd_uthread): Add declaration.
9646 * btrace.c (_initialize_btrace): Add declaration.
9647 * charset.c (_initialize_charset): Add declaration.
9648 * cli/cli-cmds.c (_initialize_cli_cmds): Add declaration.
9649 * cli/cli-dump.c (_initialize_cli_dump): Add declaration.
9650 * cli/cli-interp.c (_initialize_cli_interp): Add declaration.
9651 * cli/cli-logging.c (_initialize_cli_logging): Add declaration.
9652 * cli/cli-script.c (_initialize_cli_script): Add declaration.
9653 * cli/cli-style.c (_initialize_cli_style): Add declaration.
9654 * coff-pe-read.c (_initialize_coff_pe_read): Add declaration.
9655 * coffread.c (_initialize_coffread): Add declaration.
9656 * compile/compile-cplus-types.c (_initialize_compile_cplus_types): Add declaration.
9657 * compile/compile.c (_initialize_compile): Add declaration.
9658 * complaints.c (_initialize_complaints): Add declaration.
9659 * completer.c (_initialize_completer): Add declaration.
9660 * copying.c (_initialize_copying): Add declaration.
9661 * corefile.c (_initialize_core): Add declaration.
9662 * corelow.c (_initialize_corelow): Add declaration.
9663 * cp-abi.c (_initialize_cp_abi): Add declaration.
9664 * cp-namespace.c (_initialize_cp_namespace): Add declaration.
9665 * cp-support.c (_initialize_cp_support): Add declaration.
9666 * cp-valprint.c (_initialize_cp_valprint): Add declaration.
9667 * cris-linux-tdep.c (_initialize_cris_linux_tdep): Add declaration.
9668 * cris-tdep.c (_initialize_cris_tdep): Add declaration.
9669 * csky-linux-tdep.c (_initialize_csky_linux_tdep): Add declaration.
9670 * csky-tdep.c (_initialize_csky_tdep): Add declaration.
9671 * ctfread.c (_initialize_ctfread): Add declaration.
9672 * d-lang.c (_initialize_d_language): Add declaration.
9673 * darwin-nat-info.c (_initialize_darwin_info_commands): Add declaration.
9674 * darwin-nat.c (_initialize_darwin_nat): Add declaration.
9675 * dbxread.c (_initialize_dbxread): Add declaration.
9676 * dcache.c (_initialize_dcache): Add declaration.
9677 * disasm-selftests.c (_initialize_disasm_selftests): Add declaration.
9678 * disasm.c (_initialize_disasm): Add declaration.
9679 * dtrace-probe.c (_initialize_dtrace_probe): Add declaration.
9680 * dummy-frame.c (_initialize_dummy_frame): Add declaration.
9681 * dwarf-index-cache.c (_initialize_index_cache): Add declaration.
9682 * dwarf-index-write.c (_initialize_dwarf_index_write): Add declaration.
9683 * dwarf2-frame-tailcall.c (_initialize_tailcall_frame): Add declaration.
9684 * dwarf2-frame.c (_initialize_dwarf2_frame): Add declaration.
9685 * dwarf2expr.c (_initialize_dwarf2expr): Add declaration.
9686 * dwarf2loc.c (_initialize_dwarf2loc): Add declaration.
9687 * dwarf2read.c (_initialize_dwarf2_read): Add declaration.
9688 * elfread.c (_initialize_elfread): Add declaration.
9689 * exec.c (_initialize_exec): Add declaration.
9690 * extension.c (_initialize_extension): Add declaration.
9691 * f-lang.c (_initialize_f_language): Add declaration.
9692 * f-valprint.c (_initialize_f_valprint): Add declaration.
9693 * fbsd-nat.c (_initialize_fbsd_nat): Add declaration.
9694 * fbsd-tdep.c (_initialize_fbsd_tdep): Add declaration.
9695 * filesystem.c (_initialize_filesystem): Add declaration.
9696 * findcmd.c (_initialize_mem_search): Add declaration.
9697 * findvar.c (_initialize_findvar): Add declaration.
9698 * fork-child.c (_initialize_fork_child): Add declaration.
9699 * frame-base.c (_initialize_frame_base): Add declaration.
9700 * frame-unwind.c (_initialize_frame_unwind): Add declaration.
9701 * frame.c (_initialize_frame): Add declaration.
9702 * frv-linux-tdep.c (_initialize_frv_linux_tdep): Add declaration.
9703 * frv-tdep.c (_initialize_frv_tdep): Add declaration.
9704 * ft32-tdep.c (_initialize_ft32_tdep): Add declaration.
9705 * gcore.c (_initialize_gcore): Add declaration.
9706 * gdb-demangle.c (_initialize_gdb_demangle): Add declaration.
9707 * gdb_bfd.c (_initialize_gdb_bfd): Add declaration.
9708 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Add declaration.
9709 * gdbarch.c (_initialize_gdbarch): Add declaration.
9710 * gdbtypes.c (_initialize_gdbtypes): Add declaration.
9711 * gnu-nat.c (_initialize_gnu_nat): Add declaration.
9712 * gnu-v2-abi.c (_initialize_gnu_v2_abi): Add declaration.
9713 * gnu-v3-abi.c (_initialize_gnu_v3_abi): Add declaration.
9714 * go-lang.c (_initialize_go_language): Add declaration.
9715 * go32-nat.c (_initialize_go32_nat): Add declaration.
9716 * guile/guile.c (_initialize_guile): Add declaration.
9717 * h8300-tdep.c (_initialize_h8300_tdep): Add declaration.
9718 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Add declaration.
9719 * hppa-linux-tdep.c (_initialize_hppa_linux_tdep): Add declaration.
9720 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Add declaration.
9721 * hppa-nbsd-tdep.c (_initialize_hppanbsd_tdep): Add declaration.
9722 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Add declaration.
9723 * hppa-obsd-tdep.c (_initialize_hppabsd_tdep): Add declaration.
9724 * hppa-tdep.c (_initialize_hppa_tdep): Add declaration.
9725 * i386-bsd-nat.c (_initialize_i386bsd_nat): Add declaration.
9726 * i386-cygwin-tdep.c (_initialize_i386_cygwin_tdep): Add declaration.
9727 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Add declaration.
9728 * i386-darwin-tdep.c (_initialize_i386_darwin_tdep): Add declaration.
9729 * i386-dicos-tdep.c (_initialize_i386_dicos_tdep): Add declaration.
9730 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Add declaration.
9731 * i386-fbsd-tdep.c (_initialize_i386fbsd_tdep): Add declaration.
9732 * i386-gnu-nat.c (_initialize_i386gnu_nat): Add declaration.
9733 * i386-gnu-tdep.c (_initialize_i386gnu_tdep): Add declaration.
9734 * i386-go32-tdep.c (_initialize_i386_go32_tdep): Add declaration.
9735 * i386-linux-nat.c (_initialize_i386_linux_nat): Add declaration.
9736 * i386-linux-tdep.c (_initialize_i386_linux_tdep): Add declaration.
9737 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Add declaration.
9738 * i386-nbsd-tdep.c (_initialize_i386nbsd_tdep): Add declaration.
9739 * i386-nto-tdep.c (_initialize_i386nto_tdep): Add declaration.
9740 * i386-obsd-nat.c (_initialize_i386obsd_nat): Add declaration.
9741 * i386-obsd-tdep.c (_initialize_i386obsd_tdep): Add declaration.
9742 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Add declaration.
9743 * i386-sol2-tdep.c (_initialize_i386_sol2_tdep): Add declaration.
9744 * i386-tdep.c (_initialize_i386_tdep): Add declaration.
9745 * i386-windows-nat.c (_initialize_i386_windows_nat): Add declaration.
9746 * ia64-libunwind-tdep.c (_initialize_libunwind_frame): Add declaration.
9747 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Add declaration.
9748 * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Add declaration.
9749 * ia64-tdep.c (_initialize_ia64_tdep): Add declaration.
9750 * ia64-vms-tdep.c (_initialize_ia64_vms_tdep): Add declaration.
9751 * infcall.c (_initialize_infcall): Add declaration.
9752 * infcmd.c (_initialize_infcmd): Add declaration.
9753 * inflow.c (_initialize_inflow): Add declaration.
9754 * infrun.c (_initialize_infrun): Add declaration.
9755 * interps.c (_initialize_interpreter): Add declaration.
9756 * iq2000-tdep.c (_initialize_iq2000_tdep): Add declaration.
9757 * jit.c (_initialize_jit): Add declaration.
9758 * language.c (_initialize_language): Add declaration.
9759 * linux-fork.c (_initialize_linux_fork): Add declaration.
9760 * linux-nat.c (_initialize_linux_nat): Add declaration.
9761 * linux-tdep.c (_initialize_linux_tdep): Add declaration.
9762 * linux-thread-db.c (_initialize_thread_db): Add declaration.
9763 * lm32-tdep.c (_initialize_lm32_tdep): Add declaration.
9764 * m2-lang.c (_initialize_m2_language): Add declaration.
9765 * m32c-tdep.c (_initialize_m32c_tdep): Add declaration.
9766 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Add declaration.
9767 * m32r-linux-tdep.c (_initialize_m32r_linux_tdep): Add declaration.
9768 * m32r-tdep.c (_initialize_m32r_tdep): Add declaration.
9769 * m68hc11-tdep.c (_initialize_m68hc11_tdep): Add declaration.
9770 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Add declaration.
9771 * m68k-bsd-tdep.c (_initialize_m68kbsd_tdep): Add declaration.
9772 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Add declaration.
9773 * m68k-linux-tdep.c (_initialize_m68k_linux_tdep): Add declaration.
9774 * m68k-tdep.c (_initialize_m68k_tdep): Add declaration.
9775 * machoread.c (_initialize_machoread): Add declaration.
9776 * macrocmd.c (_initialize_macrocmd): Add declaration.
9777 * macroscope.c (_initialize_macroscope): Add declaration.
9778 * maint-test-options.c (_initialize_maint_test_options): Add declaration.
9779 * maint-test-settings.c (_initialize_maint_test_settings): Add declaration.
9780 * maint.c (_initialize_maint_cmds): Add declaration.
9781 * mdebugread.c (_initialize_mdebugread): Add declaration.
9782 * memattr.c (_initialize_mem): Add declaration.
9783 * mep-tdep.c (_initialize_mep_tdep): Add declaration.
9784 * mi/mi-cmd-env.c (_initialize_mi_cmd_env): Add declaration.
9785 * mi/mi-cmds.c (_initialize_mi_cmds): Add declaration.
9786 * mi/mi-interp.c (_initialize_mi_interp): Add declaration.
9787 * mi/mi-main.c (_initialize_mi_main): Add declaration.
9788 * microblaze-linux-tdep.c (_initialize_microblaze_linux_tdep): Add declaration.
9789 * microblaze-tdep.c (_initialize_microblaze_tdep): Add declaration.
9790 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Add declaration.
9791 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Add declaration.
9792 * mips-linux-nat.c (_initialize_mips_linux_nat): Add declaration.
9793 * mips-linux-tdep.c (_initialize_mips_linux_tdep): Add declaration.
9794 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Add declaration.
9795 * mips-nbsd-tdep.c (_initialize_mipsnbsd_tdep): Add declaration.
9796 * mips-sde-tdep.c (_initialize_mips_sde_tdep): Add declaration.
9797 * mips-tdep.c (_initialize_mips_tdep): Add declaration.
9798 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Add declaration.
9799 * mips64-obsd-tdep.c (_initialize_mips64obsd_tdep): Add declaration.
9800 * mipsread.c (_initialize_mipsread): Add declaration.
9801 * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Add declaration.
9802 * mn10300-tdep.c (_initialize_mn10300_tdep): Add declaration.
9803 * moxie-tdep.c (_initialize_moxie_tdep): Add declaration.
9804 * msp430-tdep.c (_initialize_msp430_tdep): Add declaration.
9805 * nds32-tdep.c (_initialize_nds32_tdep): Add declaration.
9806 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Add declaration.
9807 * nios2-tdep.c (_initialize_nios2_tdep): Add declaration.
9808 * nto-procfs.c (_initialize_procfs): Add declaration.
9809 * objc-lang.c (_initialize_objc_language): Add declaration.
9810 * observable.c (_initialize_observer): Add declaration.
9811 * opencl-lang.c (_initialize_opencl_language): Add declaration.
9812 * or1k-linux-tdep.c (_initialize_or1k_linux_tdep): Add declaration.
9813 * or1k-tdep.c (_initialize_or1k_tdep): Add declaration.
9814 * osabi.c (_initialize_gdb_osabi): Add declaration.
9815 * osdata.c (_initialize_osdata): Add declaration.
9816 * p-valprint.c (_initialize_pascal_valprint): Add declaration.
9817 * parse.c (_initialize_parse): Add declaration.
9818 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Add declaration.
9819 * ppc-fbsd-tdep.c (_initialize_ppcfbsd_tdep): Add declaration.
9820 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Add declaration.
9821 * ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Add declaration.
9822 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Add declaration.
9823 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Add declaration.
9824 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Add declaration.
9825 * ppc-obsd-tdep.c (_initialize_ppcobsd_tdep): Add declaration.
9826 * printcmd.c (_initialize_printcmd): Add declaration.
9827 * probe.c (_initialize_probe): Add declaration.
9828 * proc-api.c (_initialize_proc_api): Add declaration.
9829 * proc-events.c (_initialize_proc_events): Add declaration.
9830 * proc-service.c (_initialize_proc_service): Add declaration.
9831 * procfs.c (_initialize_procfs): Add declaration.
9832 * producer.c (_initialize_producer): Add declaration.
9833 * psymtab.c (_initialize_psymtab): Add declaration.
9834 * python/python.c (_initialize_python): Add declaration.
9835 * ravenscar-thread.c (_initialize_ravenscar): Add declaration.
9836 * record-btrace.c (_initialize_record_btrace): Add declaration.
9837 * record-full.c (_initialize_record_full): Add declaration.
9838 * record.c (_initialize_record): Add declaration.
9839 * regcache-dump.c (_initialize_regcache_dump): Add declaration.
9840 * regcache.c (_initialize_regcache): Add declaration.
9841 * reggroups.c (_initialize_reggroup): Add declaration.
9842 * remote-notif.c (_initialize_notif): Add declaration.
9843 * remote-sim.c (_initialize_remote_sim): Add declaration.
9844 * remote.c (_initialize_remote): Add declaration.
9845 * reverse.c (_initialize_reverse): Add declaration.
9846 * riscv-fbsd-nat.c (_initialize_riscv_fbsd_nat): Add declaration.
9847 * riscv-fbsd-tdep.c (_initialize_riscv_fbsd_tdep): Add declaration.
9848 * riscv-linux-nat.c (_initialize_riscv_linux_nat): Add declaration.
9849 * riscv-linux-tdep.c (_initialize_riscv_linux_tdep): Add declaration.
9850 * riscv-tdep.c (_initialize_riscv_tdep): Add declaration.
9851 * rl78-tdep.c (_initialize_rl78_tdep): Add declaration.
9852 * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Add declaration.
9853 * rs6000-lynx178-tdep.c (_initialize_rs6000_lynx178_tdep):
9854 Add declaration.
9855 * rs6000-nat.c (_initialize_rs6000_nat): Add declaration.
9856 * rs6000-tdep.c (_initialize_rs6000_tdep): Add declaration.
9857 * run-on-main-thread.c (_initialize_run_on_main_thread): Add declaration.
9858 * rust-exp.y (_initialize_rust_exp): Add declaration.
9859 * rx-tdep.c (_initialize_rx_tdep): Add declaration.
9860 * s12z-tdep.c (_initialize_s12z_tdep): Add declaration.
9861 * s390-linux-nat.c (_initialize_s390_nat): Add declaration.
9862 * s390-linux-tdep.c (_initialize_s390_linux_tdep): Add declaration.
9863 * s390-tdep.c (_initialize_s390_tdep): Add declaration.
9864 * score-tdep.c (_initialize_score_tdep): Add declaration.
9865 * ser-go32.c (_initialize_ser_dos): Add declaration.
9866 * ser-mingw.c (_initialize_ser_windows): Add declaration.
9867 * ser-pipe.c (_initialize_ser_pipe): Add declaration.
9868 * ser-tcp.c (_initialize_ser_tcp): Add declaration.
9869 * ser-uds.c (_initialize_ser_socket): Add declaration.
9870 * ser-unix.c (_initialize_ser_hardwire): Add declaration.
9871 * serial.c (_initialize_serial): Add declaration.
9872 * sh-linux-tdep.c (_initialize_sh_linux_tdep): Add declaration.
9873 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Add declaration.
9874 * sh-nbsd-tdep.c (_initialize_shnbsd_tdep): Add declaration.
9875 * sh-tdep.c (_initialize_sh_tdep): Add declaration.
9876 * skip.c (_initialize_step_skip): Add declaration.
9877 * sol-thread.c (_initialize_sol_thread): Add declaration.
9878 * solib-aix.c (_initialize_solib_aix): Add declaration.
9879 * solib-darwin.c (_initialize_darwin_solib): Add declaration.
9880 * solib-dsbt.c (_initialize_dsbt_solib): Add declaration.
9881 * solib-frv.c (_initialize_frv_solib): Add declaration.
9882 * solib-svr4.c (_initialize_svr4_solib): Add declaration.
9883 * solib-target.c (_initialize_solib_target): Add declaration.
9884 * solib.c (_initialize_solib): Add declaration.
9885 * source-cache.c (_initialize_source_cache): Add declaration.
9886 * source.c (_initialize_source): Add declaration.
9887 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Add declaration.
9888 * sparc-linux-tdep.c (_initialize_sparc_linux_tdep): Add declaration.
9889 * sparc-nat.c (_initialize_sparc_nat): Add declaration.
9890 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Add declaration.
9891 * sparc-nbsd-tdep.c (_initialize_sparcnbsd_tdep): Add declaration.
9892 * sparc-obsd-tdep.c (_initialize_sparc32obsd_tdep): Add declaration.
9893 * sparc-sol2-tdep.c (_initialize_sparc_sol2_tdep): Add declaration.
9894 * sparc-tdep.c (_initialize_sparc_tdep): Add declaration.
9895 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Add declaration.
9896 * sparc64-fbsd-tdep.c (_initialize_sparc64fbsd_tdep): Add declaration.
9897 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Add declaration.
9898 * sparc64-linux-tdep.c (_initialize_sparc64_linux_tdep): Add declaration.
9899 * sparc64-nat.c (_initialize_sparc64_nat): Add declaration.
9900 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Add declaration.
9901 * sparc64-nbsd-tdep.c (_initialize_sparc64nbsd_tdep): Add declaration.
9902 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Add declaration.
9903 * sparc64-obsd-tdep.c (_initialize_sparc64obsd_tdep): Add declaration.
9904 * sparc64-sol2-tdep.c (_initialize_sparc64_sol2_tdep): Add declaration.
9905 * sparc64-tdep.c (_initialize_sparc64_adi_tdep): Add declaration.
9906 * stabsread.c (_initialize_stabsread): Add declaration.
9907 * stack.c (_initialize_stack): Add declaration.
9908 * stap-probe.c (_initialize_stap_probe): Add declaration.
9909 * std-regs.c (_initialize_frame_reg): Add declaration.
9910 * symfile-debug.c (_initialize_symfile_debug): Add declaration.
9911 * symfile-mem.c (_initialize_symfile_mem): Add declaration.
9912 * symfile.c (_initialize_symfile): Add declaration.
9913 * symmisc.c (_initialize_symmisc): Add declaration.
9914 * symtab.c (_initialize_symtab): Add declaration.
9915 * target.c (_initialize_target): Add declaration.
9916 * target-connection.c (_initialize_target_connection): Add
9917 declaration.
9918 * target-dcache.c (_initialize_target_dcache): Add declaration.
9919 * target-descriptions.c (_initialize_target_descriptions): Add declaration.
9920 * thread.c (_initialize_thread): Add declaration.
9921 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Add declaration.
9922 * tic6x-tdep.c (_initialize_tic6x_tdep): Add declaration.
9923 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Add declaration.
9924 * tilegx-linux-tdep.c (_initialize_tilegx_linux_tdep): Add declaration.
9925 * tilegx-tdep.c (_initialize_tilegx_tdep): Add declaration.
9926 * tracectf.c (_initialize_ctf): Add declaration.
9927 * tracefile-tfile.c (_initialize_tracefile_tfile): Add declaration.
9928 * tracefile.c (_initialize_tracefile): Add declaration.
9929 * tracepoint.c (_initialize_tracepoint): Add declaration.
9930 * tui/tui-hooks.c (_initialize_tui_hooks): Add declaration.
9931 * tui/tui-interp.c (_initialize_tui_interp): Add declaration.
9932 * tui/tui-layout.c (_initialize_tui_layout): Add declaration.
9933 * tui/tui-regs.c (_initialize_tui_regs): Add declaration.
9934 * tui/tui-stack.c (_initialize_tui_stack): Add declaration.
9935 * tui/tui-win.c (_initialize_tui_win): Add declaration.
9936 * tui/tui.c (_initialize_tui): Add declaration.
9937 * typeprint.c (_initialize_typeprint): Add declaration.
9938 * ui-style.c (_initialize_ui_style): Add declaration.
9939 * unittests/array-view-selftests.c (_initialize_array_view_selftests): Add declaration.
9940 * unittests/child-path-selftests.c (_initialize_child_path_selftests): Add declaration.
9941 * unittests/cli-utils-selftests.c (_initialize_cli_utils_selftests): Add declaration.
9942 * unittests/common-utils-selftests.c (_initialize_common_utils_selftests): Add declaration.
9943 * unittests/copy_bitwise-selftests.c (_initialize_copy_bitwise_utils_selftests): Add declaration.
9944 * unittests/environ-selftests.c (_initialize_environ_selftests): Add declaration.
9945 * unittests/filtered_iterator-selftests.c
9946 (_initialize_filtered_iterator_selftests): Add declaration.
9947 * unittests/format_pieces-selftests.c (_initialize_format_pieces_selftests): Add declaration.
9948 * unittests/function-view-selftests.c (_initialize_function_view_selftests): Add declaration.
9949 * unittests/help-doc-selftests.c (_initialize_help_doc_selftests): Add declaration.
9950 * unittests/lookup_name_info-selftests.c (_initialize_lookup_name_info_selftests): Add declaration.
9951 * unittests/main-thread-selftests.c
9952 (_initialize_main_thread_selftests): Add declaration.
9953 * unittests/memory-map-selftests.c (_initialize_memory_map_selftests): Add declaration.
9954 * unittests/memrange-selftests.c (_initialize_memrange_selftests): Add declaration.
9955 * unittests/mkdir-recursive-selftests.c (_initialize_mkdir_recursive_selftests): Add declaration.
9956 * unittests/observable-selftests.c (_initialize_observer_selftest): Add declaration.
9957 * unittests/offset-type-selftests.c (_initialize_offset_type_selftests): Add declaration.
9958 * unittests/optional-selftests.c (_initialize_optional_selftests): Add declaration.
9959 * unittests/parse-connection-spec-selftests.c (_initialize_parse_connection_spec_selftests): Add declaration.
9960 * unittests/rsp-low-selftests.c (_initialize_rsp_low_selftests): Add declaration.
9961 * unittests/scoped_fd-selftests.c (_initialize_scoped_fd_selftests): Add declaration.
9962 * unittests/scoped_mmap-selftests.c (_initialize_scoped_mmap_selftests): Add declaration.
9963 * unittests/scoped_restore-selftests.c (_initialize_scoped_restore_selftests): Add declaration.
9964 * unittests/string_view-selftests.c (_initialize_string_view_selftests): Add declaration.
9965 * unittests/style-selftests.c (_initialize_style_selftest): Add declaration.
9966 * unittests/tracepoint-selftests.c (_initialize_tracepoint_selftests): Add declaration.
9967 * unittests/tui-selftests.c (_initialize_tui_selftest): Add
9968 declaration.
9969 * unittests/unpack-selftests.c (_initialize_unpack_selftests): Add declaration.
9970 * unittests/utils-selftests.c (_initialize_utils_selftests): Add declaration.
9971 * unittests/vec-utils-selftests.c (_initialize_vec_utils_selftests): Add declaration.
9972 * unittests/xml-utils-selftests.c (_initialize_xml_utils): Add declaration.
9973 * user-regs.c (_initialize_user_regs): Add declaration.
9974 * utils.c (_initialize_utils): Add declaration.
9975 * v850-tdep.c (_initialize_v850_tdep): Add declaration.
9976 * valops.c (_initialize_valops): Add declaration.
9977 * valprint.c (_initialize_valprint): Add declaration.
9978 * value.c (_initialize_values): Add declaration.
9979 * varobj.c (_initialize_varobj): Add declaration.
9980 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Add declaration.
9981 * vax-nbsd-tdep.c (_initialize_vaxnbsd_tdep): Add declaration.
9982 * vax-tdep.c (_initialize_vax_tdep): Add declaration.
9983 * windows-nat.c (_initialize_windows_nat): Add declaration.
9984 (_initialize_check_for_gdb_ini): Add declaration.
9985 (_initialize_loadable): Add declaration.
9986 * windows-tdep.c (_initialize_windows_tdep): Add declaration.
9987 * x86-bsd-nat.c (_initialize_x86_bsd_nat): Add declaration.
9988 * x86-linux-nat.c (_initialize_x86_linux_nat): Add declaration.
9989 * xcoffread.c (_initialize_xcoffread): Add declaration.
9990 * xml-support.c (_initialize_xml_support): Add declaration.
9991 * xstormy16-tdep.c (_initialize_xstormy16_tdep): Add declaration.
9992 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Add declaration.
9993 * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Add declaration.
9994 * xtensa-tdep.c (_initialize_xtensa_tdep): Add declaration.
9995
9996 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
9997
9998 * regformats/regdat.sh: Generate declaration for init function.
9999
10000 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
10001
10002 * remote-sim.c (next_pid, INITIAL_PID, sim_inferior_data): Move
10003 up.
10004 (gdbsim_target) <get_inferior_data_by_ptid, resume_one_inferior,
10005 close_one_inferior>: New methods.
10006 (get_sim_inferior_data_by_ptid): Move to gdbsim_target,
10007 pass down target to find_inferior_pid.
10008 (gdbsim_target::fetch_registers, gdbsim_target::store_registers):
10009 Pass down target to find_inferior_ptid.
10010 (gdbsim_target::create_inferior): Pass down target to
10011 add_thread_silent.
10012 (gdbsim_close_inferior): Move to gdbsim_close_inferior, pass
10013 target down to find_inferior_ptid and switch_to_thread.
10014 (gdbsim_target::close): Update to call close_one_inferior.
10015 (struct resume_data): Remove.
10016 (gdbsim_resume_inferior): Move to gdbsim_target. Take arguments
10017 directly, rather than through a void pointer.
10018 (gdbsim_target::resume): Update to call resume_one_inferior.
10019
10020 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
10021
10022 * gdbsupport/gdb_wait.c: Include gdb_wait.h.
10023
10024 2020-01-12 Pedro Alves <palves@redhat.com>
10025
10026 * bsd-kvm.c (bsd_kvm_target::close): Call exit_inferior_silent
10027 directly for the current inferior instead of
10028 discard_all_inferiors.
10029 (discard_all_inferiors): Delete.
10030
10031 2020-01-11 Tom Tromey <tom@tromey.com>
10032
10033 * tui/tui-wingeneral.c (box_win): Check cli_styling.
10034 * tui/tui-winsource.c (tui_source_window_base::refill): Use
10035 deprecated_safe_get_selected_frame.
10036
10037 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
10038
10039 * inferior.c (print_inferior): Switch inferior before printing it.
10040
10041 2020-01-10 Aleksandar Paunovic <aleksandar.paunovic@intel.com>
10042 Pedro Alves <palves@redhat.com>
10043
10044 * progspace-and-thread.c (switch_to_program_space_and_thread):
10045 Assert there's an inferior for PSPACE. Use
10046 switch_to_inferior_no_thread to switch the inferior too.
10047 * progspace.c (program_space::~program_space): Call
10048 clear_symtab_users here, with SYMFILE_DEFER_BP_RESET.
10049 (program_space::free_all_objfiles): Don't call clear_symtab_users
10050 here.
10051 * symfile.c (symbol_file_clear): Call clear_symtab_users here.
10052
10053 2020-01-10 Pedro Alves <palves@redhat.com>
10054
10055 * NEWS: Mention multi-target debugging, "info connections", and
10056 "add-inferior -no-connection".
10057
10058 2020-01-10 Pedro Alves <palves@redhat.com>
10059
10060 * infrun.c: Include "target-connection.h".
10061 (check_multi_target_resumption): New.
10062 (proceed): Call it.
10063 * target-connection.c (make_target_connection_string): Make
10064 extern.
10065 * target-connection.h (make_target_connection_string): Declare.
10066
10067 2020-01-10 Pedro Alves <palves@redhat.com>
10068
10069 * Makefile.in (COMMON_SFILES): Add target-connection.c.
10070 * inferior.c (uiout_field_connection): New function.
10071 (print_inferior): Add new "connection-id" column.
10072 (add_inferior_command): Show connection number/string of added
10073 inferior.
10074 * process-stratum-target.h
10075 (process_stratum_target::connection_string): New virtual method.
10076 (process_stratum_target::connection_number): New field.
10077 * remote.c (remote_target::connection_string): New override.
10078 * target-connection.c: New file.
10079 * target-connection.h: New file.
10080 * target.c (decref_target): Remove process_stratum targets from
10081 the connection list.
10082 (target_stack::push): Add process_stratum targets to the
10083 connection list.
10084
10085 2020-01-10 Pedro Alves <palves@redhat.com>
10086
10087 Revert:
10088 2016-04-12 Pedro Alves <palves@redhat.com>
10089 * serial.c (serial_open, serial_fdopen_ops, do_serial_close):
10090 Remove references to name.
10091 * serial.h (struct serial) <name>: Delete.
10092
10093 2020-01-10 Pedro Alves <palves@redhat.com>
10094
10095 * gdbarch-selftests.c (register_to_value_test): Remove "target
10096 already pushed" check.
10097
10098 2020-01-10 Pedro Alves <palves@redhat.com>
10099 John Baldwin <jhb@FreeBSD.org>
10100
10101 * aarch64-linux-nat.c
10102 (aarch64_linux_nat_target::thread_architecture): Adjust.
10103 * ada-tasks.c (print_ada_task_info): Adjust find_thread_ptid call.
10104 (task_command_1): Likewise.
10105 * aix-thread.c (sync_threadlists, aix_thread_target::resume)
10106 (aix_thread_target::wait, aix_thread_target::fetch_registers)
10107 (aix_thread_target::store_registers)
10108 (aix_thread_target::thread_alive): Adjust.
10109 * amd64-fbsd-tdep.c: Include "inferior.h".
10110 (amd64fbsd_get_thread_local_address): Pass down target.
10111 * amd64-linux-nat.c (ps_get_thread_area): Use ps_prochandle
10112 thread's gdbarch instead of target_gdbarch.
10113 * break-catch-sig.c (signal_catchpoint_print_it): Adjust call to
10114 get_last_target_status.
10115 * break-catch-syscall.c (print_it_catch_syscall): Likewise.
10116 * breakpoint.c (breakpoints_should_be_inserted_now): Consider all
10117 inferiors.
10118 (update_inserted_breakpoint_locations): Skip if inferiors with no
10119 execution.
10120 (update_global_location_list): When handling moribund locations,
10121 find representative inferior for location's pspace, and use thread
10122 count of its process_stratum target.
10123 * bsd-kvm.c (bsd_kvm_target_open): Pass target down.
10124 * bsd-uthread.c (bsd_uthread_target::wait): Use
10125 as_process_stratum_target and adjust thread_change_ptid and
10126 add_thread calls.
10127 (bsd_uthread_target::update_thread_list): Use
10128 as_process_stratum_target and adjust find_thread_ptid,
10129 thread_change_ptid and add_thread calls.
10130 * btrace.c (maint_btrace_packet_history_cmd): Adjust
10131 find_thread_ptid call.
10132 * corelow.c (add_to_thread_list): Adjust add_thread call.
10133 (core_target_open): Adjust add_thread_silent and thread_count
10134 calls.
10135 (core_target::pid_to_str): Adjust find_inferior_ptid call.
10136 * ctf.c (ctf_target_open): Adjust add_thread_silent call.
10137 * event-top.c (async_disconnect): Pop targets from all inferiors.
10138 * exec.c (add_target_sections): Push exec target on all inferiors
10139 sharing the program space.
10140 (remove_target_sections): Remove the exec target from all
10141 inferiors sharing the program space.
10142 (exec_on_vfork): New.
10143 * exec.h (exec_on_vfork): Declare.
10144 * fbsd-nat.c (fbsd_add_threads): Add fbsd_nat_target parameter.
10145 Pass it down.
10146 (fbsd_nat_target::update_thread_list): Adjust.
10147 (fbsd_nat_target::resume): Adjust.
10148 (fbsd_handle_debug_trap): Add fbsd_nat_target parameter. Pass it
10149 down.
10150 (fbsd_nat_target::wait, fbsd_nat_target::post_attach): Adjust.
10151 * fbsd-tdep.c (fbsd_corefile_thread): Adjust
10152 get_thread_arch_regcache call.
10153 * fork-child.c (gdb_startup_inferior): Pass target down to
10154 startup_inferior and set_executing.
10155 * gdbthread.h (struct process_stratum_target): Forward declare.
10156 (add_thread, add_thread_silent, add_thread_with_info)
10157 (in_thread_list): Add process_stratum_target parameter.
10158 (find_thread_ptid(inferior*, ptid_t)): New overload.
10159 (find_thread_ptid, thread_change_ptid): Add process_stratum_target
10160 parameter.
10161 (all_threads()): Delete overload.
10162 (all_threads, all_non_exited_threads): Add process_stratum_target
10163 parameter.
10164 (all_threads_safe): Use brace initialization.
10165 (thread_count): Add process_stratum_target parameter.
10166 (set_resumed, set_running, set_stop_requested, set_executing)
10167 (threads_are_executing, finish_thread_state): Add
10168 process_stratum_target parameter.
10169 (switch_to_thread): Use is_current_thread.
10170 * i386-fbsd-tdep.c: Include "inferior.h".
10171 (i386fbsd_get_thread_local_address): Pass down target.
10172 * i386-linux-nat.c (i386_linux_nat_target::low_resume): Adjust.
10173 * inf-child.c (inf_child_target::maybe_unpush_target): Remove
10174 have_inferiors check.
10175 * inf-ptrace.c (inf_ptrace_target::create_inferior)
10176 (inf_ptrace_target::attach): Adjust.
10177 * infcall.c (run_inferior_call): Adjust.
10178 * infcmd.c (run_command_1): Pass target to
10179 scoped_finish_thread_state.
10180 (proceed_thread_callback): Skip inferiors with no execution.
10181 (continue_command): Rename 'all_threads' local to avoid hiding
10182 'all_threads' function. Adjust get_last_target_status call.
10183 (prepare_one_step): Adjust set_running call.
10184 (signal_command): Use user_visible_resume_target. Compare thread
10185 pointers instead of inferior_ptid.
10186 (info_program_command): Adjust to pass down target.
10187 (attach_command): Mark target's 'thread_executing' flag.
10188 (stop_current_target_threads_ns): New, factored out from ...
10189 (interrupt_target_1): ... this. Switch inferior before making
10190 target calls.
10191 * inferior-iter.h
10192 (struct all_inferiors_iterator, struct all_inferiors_range)
10193 (struct all_inferiors_safe_range)
10194 (struct all_non_exited_inferiors_range): Filter on
10195 process_stratum_target too. Remove explicit.
10196 * inferior.c (inferior::inferior): Push dummy target on target
10197 stack.
10198 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors):
10199 Add process_stratum_target parameter, and pass it down.
10200 (have_live_inferiors): Adjust.
10201 (switch_to_inferior_and_push_target): New.
10202 (add_inferior_command, clone_inferior_command): Handle
10203 "-no-connection" parameter. Use
10204 switch_to_inferior_and_push_target.
10205 (_initialize_inferior): Mention "-no-connection" option in
10206 the help of "add-inferior" and "clone-inferior" commands.
10207 * inferior.h: Include "process-stratum-target.h".
10208 (interrupt_target_1): Use bool.
10209 (struct inferior) <push_target, unpush_target, target_is_pushed,
10210 find_target_beneath, top_target, process_target, target_at,
10211 m_stack>: New.
10212 (discard_all_inferiors): Delete.
10213 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors)
10214 (all_inferiors, all_non_exited_inferiors): Add
10215 process_stratum_target parameter.
10216 * infrun.c: Include "gdb_select.h" and <unordered_map>.
10217 (target_last_proc_target): New global.
10218 (follow_fork_inferior): Push target on new inferior. Pass target
10219 to add_thread_silent. Call exec_on_vfork. Handle target's
10220 reference count.
10221 (follow_fork): Adjust get_last_target_status call. Also consider
10222 target.
10223 (follow_exec): Push target on new inferior.
10224 (struct execution_control_state) <target>: New field.
10225 (user_visible_resume_target): New.
10226 (do_target_resume): Call target_async.
10227 (resume_1): Set target's threads_executing flag. Consider resume
10228 target.
10229 (commit_resume_all_targets): New.
10230 (proceed): Also consider resume target. Skip threads of inferiors
10231 with no execution. Commit resumtion in all targets.
10232 (start_remote): Pass current inferior to wait_for_inferior.
10233 (infrun_thread_stop_requested): Consider target as well. Pass
10234 thread_info pointer to clear_inline_frame_state instead of ptid.
10235 (infrun_thread_thread_exit): Consider target as well.
10236 (random_pending_event_thread): New inferior parameter. Use it.
10237 (do_target_wait): Rename to ...
10238 (do_target_wait_1): ... this. Add inferior parameter, and pass it
10239 down.
10240 (threads_are_resumed_pending_p, do_target_wait): New.
10241 (prepare_for_detach): Adjust calls.
10242 (wait_for_inferior): New inferior parameter. Handle it. Use
10243 do_target_wait_1 instead of do_target_wait.
10244 (fetch_inferior_event): Adjust. Switch to representative
10245 inferior. Pass target down.
10246 (set_last_target_status): Add process_stratum_target parameter.
10247 Save target in global.
10248 (get_last_target_status): Add process_stratum_target parameter and
10249 handle it.
10250 (nullify_last_target_wait_ptid): Clear 'target_last_proc_target'.
10251 (context_switch): Check inferior_ptid == null_ptid before calling
10252 inferior_thread().
10253 (get_inferior_stop_soon): Pass down target.
10254 (wait_one): Rename to ...
10255 (poll_one_curr_target): ... this.
10256 (struct wait_one_event): New.
10257 (wait_one): New.
10258 (stop_all_threads): Adjust.
10259 (handle_no_resumed, handle_inferior_event): Adjust to consider the
10260 event's target.
10261 (switch_back_to_stepped_thread): Also consider target.
10262 (print_stop_event): Update.
10263 (normal_stop): Update. Also consider the resume target.
10264 * infrun.h (wait_for_inferior): Remove declaration.
10265 (user_visible_resume_target): New declaration.
10266 (get_last_target_status, set_last_target_status): New
10267 process_stratum_target parameter.
10268 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
10269 process_stratum_target parameter, and use it.
10270 (clear_inline_frame_state (thread_info*)): New.
10271 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
10272 process_stratum_target parameter.
10273 (clear_inline_frame_state (thread_info*)): Declare.
10274 * linux-fork.c (delete_checkpoint_command): Pass target down to
10275 find_thread_ptid.
10276 (checkpoint_command): Adjust.
10277 * linux-nat.c (linux_nat_target::follow_fork): Switch to thread
10278 instead of just tweaking inferior_ptid.
10279 (linux_nat_switch_fork): Pass target down to thread_change_ptid.
10280 (exit_lwp): Pass target down to find_thread_ptid.
10281 (attach_proc_task_lwp_callback): Pass target down to
10282 add_thread/set_running/set_executing.
10283 (linux_nat_target::attach): Pass target down to
10284 thread_change_ptid.
10285 (get_detach_signal): Pass target down to find_thread_ptid.
10286 Consider last target status's target.
10287 (linux_resume_one_lwp_throw, resume_lwp)
10288 (linux_handle_syscall_trap, linux_handle_extended_wait, wait_lwp)
10289 (stop_wait_callback, save_stop_reason, linux_nat_filter_event)
10290 (linux_nat_wait_1, resume_stopped_resumed_lwps): Pass target down.
10291 (linux_nat_target::async_wait_fd): New.
10292 (linux_nat_stop_lwp, linux_nat_target::thread_address_space): Pass
10293 target down.
10294 * linux-nat.h (linux_nat_target::async_wait_fd): Declare.
10295 * linux-tdep.c (get_thread_arch_regcache): Pass target down.
10296 * linux-thread-db.c (struct thread_db_info::process_target): New
10297 field.
10298 (add_thread_db_info): Save target.
10299 (get_thread_db_info): New process_stratum_target parameter. Also
10300 match target.
10301 (delete_thread_db_info): New process_stratum_target parameter.
10302 Also match target.
10303 (thread_from_lwp): Adjust to pass down target.
10304 (thread_db_notice_clone): Pass down target.
10305 (check_thread_db_callback): Pass down target.
10306 (try_thread_db_load_1): Always push the thread_db target.
10307 (try_thread_db_load, record_thread): Pass target down.
10308 (thread_db_target::detach): Pass target down. Always unpush the
10309 thread_db target.
10310 (thread_db_target::wait, thread_db_target::mourn_inferior): Pass
10311 target down. Always unpush the thread_db target.
10312 (find_new_threads_callback, thread_db_find_new_threads_2)
10313 (thread_db_target::update_thread_list): Pass target down.
10314 (thread_db_target::pid_to_str): Pass current inferior down.
10315 (thread_db_target::get_thread_local_address): Pass target down.
10316 (thread_db_target::resume, maintenance_check_libthread_db): Pass
10317 target down.
10318 * nto-procfs.c (nto_procfs_target::update_thread_list): Adjust.
10319 * procfs.c (procfs_target::procfs_init_inferior): Declare.
10320 (proc_set_current_signal, do_attach, procfs_target::wait): Adjust.
10321 (procfs_init_inferior): Rename to ...
10322 (procfs_target::procfs_init_inferior): ... this and adjust.
10323 (procfs_target::create_inferior, procfs_notice_thread)
10324 (procfs_do_thread_registers): Adjust.
10325 * ppc-fbsd-tdep.c: Include "inferior.h".
10326 (ppcfbsd_get_thread_local_address): Pass down target.
10327 * proc-service.c (ps_xfer_memory): Switch current inferior and
10328 program space as well.
10329 (get_ps_regcache): Pass target down.
10330 * process-stratum-target.c
10331 (process_stratum_target::thread_address_space)
10332 (process_stratum_target::thread_architecture): Pass target down.
10333 * process-stratum-target.h
10334 (process_stratum_target::threads_executing): New field.
10335 (as_process_stratum_target): New.
10336 * ravenscar-thread.c
10337 (ravenscar_thread_target::update_inferior_ptid): Pass target down.
10338 (ravenscar_thread_target::wait, ravenscar_add_thread): Pass target
10339 down.
10340 * record-btrace.c (record_btrace_target::info_record): Adjust.
10341 (record_btrace_target::record_method)
10342 (record_btrace_target::record_is_replaying)
10343 (record_btrace_target::fetch_registers)
10344 (get_thread_current_frame_id, record_btrace_target::resume)
10345 (record_btrace_target::wait, record_btrace_target::stop): Pass
10346 target down.
10347 * record-full.c (record_full_wait_1): Switch to event thread.
10348 Pass target down.
10349 * regcache.c (regcache::regcache)
10350 (get_thread_arch_aspace_regcache, get_thread_arch_regcache): Add
10351 process_stratum_target parameter and handle it.
10352 (current_thread_target): New global.
10353 (get_thread_regcache): Add process_stratum_target parameter and
10354 handle it. Switch inferior before calling target method.
10355 (get_thread_regcache): Pass target down.
10356 (get_thread_regcache_for_ptid): Pass target down.
10357 (registers_changed_ptid): Add process_stratum_target parameter and
10358 handle it.
10359 (registers_changed_thread, registers_changed): Pass target down.
10360 (test_get_thread_arch_aspace_regcache): New.
10361 (current_regcache_test): Define a couple local test_target_ops
10362 instances and use them for testing.
10363 (readwrite_regcache): Pass process_stratum_target parameter.
10364 (cooked_read_test, cooked_write_test): Pass mock_target down.
10365 * regcache.h (get_thread_regcache, get_thread_arch_regcache)
10366 (get_thread_arch_aspace_regcache): Add process_stratum_target
10367 parameter.
10368 (regcache::target): New method.
10369 (regcache::regcache, regcache::get_thread_arch_aspace_regcache)
10370 (regcache::registers_changed_ptid): Add process_stratum_target
10371 parameter.
10372 (regcache::m_target): New field.
10373 (registers_changed_ptid): Add process_stratum_target parameter.
10374 * remote.c (remote_state::supports_vCont_probed): New field.
10375 (remote_target::async_wait_fd): New method.
10376 (remote_unpush_and_throw): Add remote_target parameter.
10377 (get_current_remote_target): Adjust.
10378 (remote_target::remote_add_inferior): Push target.
10379 (remote_target::remote_add_thread)
10380 (remote_target::remote_notice_new_inferior)
10381 (get_remote_thread_info): Pass target down.
10382 (remote_target::update_thread_list): Skip threads of inferiors
10383 bound to other targets. (remote_target::close): Don't discard
10384 inferiors. (remote_target::add_current_inferior_and_thread)
10385 (remote_target::process_initial_stop_replies)
10386 (remote_target::start_remote)
10387 (remote_target::remote_serial_quit_handler): Pass down target.
10388 (remote_target::remote_unpush_target): New remote_target
10389 parameter. Unpush the target from all inferiors.
10390 (remote_target::remote_unpush_and_throw): New remote_target
10391 parameter. Pass it down.
10392 (remote_target::open_1): Check whether the current inferior has
10393 execution instead of checking whether any inferior is live. Pass
10394 target down.
10395 (remote_target::remote_detach_1): Pass down target. Use
10396 remote_unpush_target.
10397 (extended_remote_target::attach): Pass down target.
10398 (remote_target::remote_vcont_probe): Set supports_vCont_probed.
10399 (remote_target::append_resumption): Pass down target.
10400 (remote_target::append_pending_thread_resumptions)
10401 (remote_target::remote_resume_with_hc, remote_target::resume)
10402 (remote_target::commit_resume): Pass down target.
10403 (remote_target::remote_stop_ns): Check supports_vCont_probed.
10404 (remote_target::interrupt_query)
10405 (remote_target::remove_new_fork_children)
10406 (remote_target::check_pending_events_prevent_wildcard_vcont)
10407 (remote_target::remote_parse_stop_reply)
10408 (remote_target::process_stop_reply): Pass down target.
10409 (first_remote_resumed_thread): New remote_target parameter. Pass
10410 it down.
10411 (remote_target::wait_as): Pass down target.
10412 (unpush_and_perror): New remote_target parameter. Pass it down.
10413 (remote_target::readchar, remote_target::remote_serial_write)
10414 (remote_target::getpkt_or_notif_sane_1)
10415 (remote_target::kill_new_fork_children, remote_target::kill): Pass
10416 down target.
10417 (remote_target::mourn_inferior): Pass down target. Use
10418 remote_unpush_target.
10419 (remote_target::core_of_thread)
10420 (remote_target::remote_btrace_maybe_reopen): Pass down target.
10421 (remote_target::pid_to_exec_file)
10422 (remote_target::thread_handle_to_thread_info): Pass down target.
10423 (remote_target::async_wait_fd): New.
10424 * riscv-fbsd-tdep.c: Include "inferior.h".
10425 (riscv_fbsd_get_thread_local_address): Pass down target.
10426 * sol2-tdep.c (sol2_core_pid_to_str): Pass down target.
10427 * sol-thread.c (sol_thread_target::wait, ps_lgetregs, ps_lsetregs)
10428 (ps_lgetfpregs, ps_lsetfpregs, sol_update_thread_list_callback):
10429 Adjust.
10430 * solib-spu.c (spu_skip_standalone_loader): Pass down target.
10431 * solib-svr4.c (enable_break): Pass down target.
10432 * spu-multiarch.c (parse_spufs_run): Pass down target.
10433 * spu-tdep.c (spu2ppu_sniffer): Pass down target.
10434 * target-delegates.c: Regenerate.
10435 * target.c (g_target_stack): Delete.
10436 (current_top_target): Return the current inferior's top target.
10437 (target_has_execution_1): Refer to the passed-in inferior's top
10438 target.
10439 (target_supports_terminal_ours): Check whether the initial
10440 inferior was already created.
10441 (decref_target): New.
10442 (target_stack::push): Incref/decref the target.
10443 (push_target, push_target, unpush_target): Adjust.
10444 (target_stack::unpush): Defref target.
10445 (target_is_pushed): Return bool. Adjust to refer to the current
10446 inferior's target stack.
10447 (dispose_inferior): Delete, and inline parts ...
10448 (target_preopen): ... here. Only dispose of the current inferior.
10449 (target_detach): Hold strong target reference while detaching.
10450 Pass target down.
10451 (target_thread_name): Add assertion.
10452 (target_resume): Pass down target.
10453 (target_ops::beneath, find_target_at): Adjust to refer to the
10454 current inferior's target stack.
10455 (get_dummy_target): New.
10456 (target_pass_ctrlc): Pass the Ctrl-C to the first inferior that
10457 has a thread running.
10458 (initialize_targets): Rename to ...
10459 (_initialize_target): ... this.
10460 * target.h: Include "gdbsupport/refcounted-object.h".
10461 (struct target_ops): Inherit refcounted_object.
10462 (target_ops::shortname, target_ops::longname): Make const.
10463 (target_ops::async_wait_fd): New method.
10464 (decref_target): Declare.
10465 (struct target_ops_ref_policy): New.
10466 (target_ops_ref): New typedef.
10467 (get_dummy_target): Declare function.
10468 (target_is_pushed): Return bool.
10469 * thread-iter.c (all_matching_threads_iterator::m_inf_matches)
10470 (all_matching_threads_iterator::all_matching_threads_iterator):
10471 Handle filter target.
10472 * thread-iter.h (struct all_matching_threads_iterator, struct
10473 all_matching_threads_range, class all_non_exited_threads_range):
10474 Filter by target too. Remove explicit.
10475 * thread.c (threads_executing): Delete.
10476 (inferior_thread): Pass down current inferior.
10477 (clear_thread_inferior_resources): Pass down thread pointer
10478 instead of ptid_t.
10479 (add_thread_silent, add_thread_with_info, add_thread): Add
10480 process_stratum_target parameter. Use it for thread and inferior
10481 searches.
10482 (is_current_thread): New.
10483 (thread_info::deletable): Use it.
10484 (find_thread_ptid, thread_count, in_thread_list)
10485 (thread_change_ptid, set_resumed, set_running): New
10486 process_stratum_target parameter. Pass it down.
10487 (set_executing): New process_stratum_target parameter. Pass it
10488 down. Adjust reference to 'threads_executing'.
10489 (threads_are_executing): New process_stratum_target parameter.
10490 Adjust reference to 'threads_executing'.
10491 (set_stop_requested, finish_thread_state): New
10492 process_stratum_target parameter. Pass it down.
10493 (switch_to_thread): Also match inferior.
10494 (switch_to_thread): New process_stratum_target parameter. Pass it
10495 down.
10496 (update_threads_executing): Reimplement.
10497 * top.c (quit_force): Pop targets from all inferior.
10498 (gdb_init): Don't call initialize_targets.
10499 * windows-nat.c (windows_nat_target) <get_windows_debug_event>:
10500 Declare.
10501 (windows_add_thread, windows_delete_thread): Adjust.
10502 (get_windows_debug_event): Rename to ...
10503 (windows_nat_target::get_windows_debug_event): ... this. Adjust.
10504 * tracefile-tfile.c (tfile_target_open): Pass down target.
10505 * gdbsupport/common-gdbthread.h (struct process_stratum_target):
10506 Forward declare.
10507 (switch_to_thread): Add process_stratum_target parameter.
10508 * mi/mi-interp.c (mi_on_resume_1): Add process_stratum_target
10509 parameter. Use it.
10510 (mi_on_resume): Pass target down.
10511 * nat/fork-inferior.c (startup_inferior): Add
10512 process_stratum_target parameter. Pass it down.
10513 * nat/fork-inferior.h (startup_inferior): Add
10514 process_stratum_target parameter.
10515 * python/py-threadevent.c (py_get_event_thread): Pass target down.
10516
10517 2020-01-10 Pedro Alves <palves@redhat.com>
10518
10519 * remote.c (remote_target::start_remote): Don't set inferior_ptid
10520 directly. Instead find the first thread in the thread list and
10521 use switch_to_thread.
10522
10523 2020-01-10 Pedro Alves <palves@redhat.com>
10524
10525 * remote.c (remote_target::remote_add_inferior): Don't bind a
10526 process to the current inferior if the current inferior is already
10527 bound to a process.
10528
10529 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
10530 Pedro Alves <palves@redhat.com>
10531
10532 * remote.c (remote_target::remote_parse_stop_reply) <W/X packets>:
10533 If no process is specified, return null_ptid instead of
10534 inferior_ptid.
10535 (remote_target::wait_as): Handle TARGET_WAITKIND_EXITED /
10536 TARGET_WAITKIND_SIGNALLED with no pid.
10537
10538 2020-01-10 Pedro Alves <palves@redhat.com>
10539
10540 * remote.c (first_remote_resumed_thread): New.
10541 (remote_target::wait_as): Use it as default event_ptid instead of
10542 inferior_ptid.
10543
10544 2020-01-10 Pedro Alves <palves@redhat.com>
10545
10546 * infrun.c (handle_no_resumed): Use all_non_exited_inferiors.
10547
10548 2020-01-10 Pedro Alves <palves@redhat.com>
10549
10550 * tracefile-tfile.c (tfile_target::close): Assert that trace_fd is
10551 not -1.
10552
10553 2020-01-10 Pedro Alves <palves@redhat.com>
10554
10555 * break-catch-sig.c (signal_catchpoint_print_it): Don't pass a
10556 ptid to get_last_target_status.
10557 * break-catch-syscall.c (print_it_catch_syscall): Don't pass a
10558 ptid to get_last_target_status.
10559 * infcmd.c (continue_command): Don't pass a target_waitstatus to
10560 get_last_target_status.
10561 (info_program_command): Don't pass a target_waitstatus to
10562 get_last_target_status.
10563 * infrun.c (init_wait_for_inferior): Use
10564 nullify_last_target_wait_ptid.
10565 (get_last_target_status): Handle nullptr arguments.
10566 (nullify_last_target_wait_ptid): Clear target_last_waitstatus.
10567 (print_stop_event): Don't pass a ptid to get_last_target_status.
10568 (normal_stop): Don't pass a ptid to get_last_target_status.
10569 * infrun.h (get_last_target_status, set_last_target_status): Move
10570 comments here and update.
10571 (nullify_last_target_wait_ptid): Declare.
10572 * linux-fork.c (fork_load_infrun_state): Remove local extern
10573 declaration of nullify_last_target_wait_ptid.
10574 * linux-nat.c (get_detach_signal): Don't pass a target_waitstatus
10575 to get_last_target_status.
10576
10577 2020-01-10 Pedro Alves <palves@redhat.com>
10578
10579 * gdbthread.h (scoped_restore_current_thread)
10580 <dont_restore, restore, m_dont_restore>: Declare.
10581 * thread.c (thread_alive): Add assertion. Return bool.
10582 (switch_to_thread_if_alive): New.
10583 (prune_threads): Switch inferior/thread.
10584 (print_thread_info_1): Switch thread before calling target methods.
10585 (scoped_restore_current_thread::restore): New, factored out from
10586 ...
10587 (scoped_restore_current_thread::~scoped_restore_current_thread):
10588 ... this.
10589 (scoped_restore_current_thread::scoped_restore_current_thread):
10590 Add assertion.
10591 (thread_apply_all_command, thread_select): Use
10592 switch_to_thread_if_alive.
10593 * infrun.c (proceed, restart_threads, handle_signal_stop)
10594 (switch_back_to_stepped_thread): Switch current thread before
10595 calling target methods.
10596
10597 2020-01-10 Pedro Alves <palves@redhat.com>
10598
10599 * inferior.c (switch_to_inferior_no_thread): New function,
10600 factored out from ...
10601 (inferior_command): ... here.
10602 * inferior.h (switch_to_inferior_no_thread): Declare.
10603 * mi/mi-main.c (run_one_inferior): Use
10604 switch_to_inferior_no_thread.
10605
10606 2020-01-10 Pedro Alves <palves@redhat.com>
10607
10608 * infcmd.c (kill_command): Remove dead code.
10609
10610 2020-01-10 Pedro Alves <palves@redhat.com>
10611
10612 * remote.c (remote_target::mourn_inferior): No longer check
10613 whether the target is running.
10614
10615 2020-01-10 Pedro Alves <palves@redhat.com>
10616
10617 * corelow.c (core_target::has_execution): Change parameter type to
10618 inferior pointer.
10619 * inferior.c (number_of_live_inferiors): Use
10620 inferior::has_execution instead of target_has_execution_1.
10621 * inferior.h (inferior::has_execution): New.
10622 * linux-thread-db.c (thread_db_target::update_thread_list): Use
10623 inferior::has_execution instead of target_has_execution_1.
10624 * process-stratum-target.c
10625 (process_stratum_target::has_execution): Change parameter type to
10626 inferior pointer. Check the inferior's PID instead of
10627 inferior_ptid.
10628 * process-stratum-target.h
10629 (process_stratum_target::has_execution): Change parameter type to
10630 inferior pointer.
10631 * record-full.c (record_full_core_target::has_execution): Change
10632 parameter type to inferior pointer.
10633 * target.c (target_has_execution_1): Change parameter type to
10634 inferior pointer.
10635 (target_has_execution_current): Adjust.
10636 * target.h (target_ops::has_execution): Change parameter type to
10637 inferior pointer.
10638 (target_has_execution_1): Change parameter type to inferior
10639 pointer. Change return type to bool.
10640 * tracefile.h (tracefile_target::has_execution): Change parameter
10641 type to inferior pointer.
10642
10643 2020-01-10 Pedro Alves <palves@redhat.com>
10644
10645 * exceptions.c (print_flush): Remove current_top_target() check.
10646
10647 2020-01-10 Pedro Alves <palves@redhat.com>
10648
10649 * remote.c (show_remote_exec_file): Show the current inferior's
10650 exec-file instead of the command variable's value.
10651
10652 2020-01-10 Pedro Alves <palves@redhat.com>
10653
10654 * record-full.c (record_full_resume_ptid): New global.
10655 (record_full_target::resume): Set it.
10656 (record_full_wait_1): Use record_full_resume_ptid instead of
10657 inferior_ptid.
10658
10659 2020-01-10 Pedro Alves <palves@redhat.com>
10660
10661 * gdbthread.h (scoped_restore_current_thread)
10662 <dont_restore, restore, m_dont_restore>: Declare.
10663 * thread.c (thread_alive): Add assertion. Return bool.
10664 (switch_to_thread_if_alive): New.
10665 (prune_threads): Switch inferior/thread.
10666 (print_thread_info_1): Switch thread before calling target methods.
10667 (scoped_restore_current_thread::restore): New, factored out from
10668 ...
10669 (scoped_restore_current_thread::~scoped_restore_current_thread):
10670 ... this.
10671 (scoped_restore_current_thread::scoped_restore_current_thread):
10672 Add assertion.
10673 (thread_apply_all_command, thread_select): Use
10674 switch_to_thread_if_alive.
10675
10676 2020-01-10 George Barrett <bob@bob131.so>
10677
10678 * stap-probe.c (stap_modify_semaphore): Don't check for null
10679 semaphores.
10680 (stap_probe::set_semaphore, stap_probe::clear_semaphore): Check
10681 for null semaphores.
10682
10683 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
10684
10685 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Update
10686 all source windows, and maintain horizontal scroll status while
10687 doing so.
10688
10689 2020-01-09 Tom Tromey <tom@tromey.com>
10690
10691 PR tui/18932:
10692 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Call
10693 update_source_window, not print_source_lines.
10694
10695 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
10696
10697 * tui/tui.c (tui_enable): Register tui hooks after calling
10698 tui_display_main.
10699
10700 2020-01-09 Christian Biesinger <cbiesinger@google.com>
10701
10702 * gdbsupport/common-defs.h: Don't define _FORTIFY_SOURCE on MinGW.
10703
10704 2020-01-08 Simon Marchi <simon.marchi@efficios.com>
10705
10706 * thread.c (print_thread_info_1): Fix indentation.
10707
10708 2020-01-09 Christian Biesinger <cbiesinger@google.com>
10709
10710 * symtab.c (general_symbol_info::compute_and_set_names): Move the
10711 unique_xmalloc_ptr outside the if to always free the demangled name.
10712
10713 2020-01-08 Tom Tromey <tromey@adacore.com>
10714
10715 * xcoffread.c (enter_line_range, read_xcoff_symtab)
10716 (process_xcoff_symbol, xcoff_symfile_offsets): Update.
10717 * symtab.h (MSYMBOL_VALUE_ADDRESS): Update.
10718 (struct section_offsets, ANOFFSET, SIZEOF_N_SECTION_OFFSETS):
10719 Remove.
10720 (section_offsets): New typedef.
10721 * symtab.c (fixup_section, get_msymbol_address): Update.
10722 * symmisc.c (dump_msymbols): Update.
10723 * symfile.h (relative_addr_info_to_section_offsets)
10724 (symfile_map_offsets_to_segments): Update.
10725 * symfile.c (build_section_addr_info_from_objfile)
10726 (init_objfile_sect_indices): Update.
10727 (struct place_section_arg): Change type of "offsets".
10728 (place_section): Update.
10729 (relative_addr_info_to_section_offsets): Change type of
10730 "section_offsets". Remove "num_sections" parameter.
10731 (default_symfile_offsets, syms_from_objfile_1)
10732 (set_objfile_default_section_offset): Update.
10733 (reread_symbols): No need to preserve section offsets by hand.
10734 (symfile_map_offsets_to_segments): Change type of "offsets".
10735 * stap-probe.c (relocate_address): Update.
10736 * stabsread.h (process_one_symbol): Update.
10737 * solib-target.c (struct lm_info_target) <offsets>: Change type.
10738 (solib_target_relocate_section_addresses): Update.
10739 * solib-svr4.c (enable_break, svr4_relocate_main_executable):
10740 Update.
10741 * solib-frv.c (frv_relocate_main_executable): Update.
10742 * solib-dsbt.c (dsbt_relocate_main_executable): Update.
10743 * solib-aix.c (solib_aix_get_section_offsets): Change return
10744 type.
10745 (solib_aix_solib_create_inferior_hook): Update.
10746 * remote.c (remote_target::get_offsets): Update.
10747 * psymtab.c (find_pc_sect_psymtab): Update.
10748 * psympriv.h (struct partial_symbol) <address, text_low,
10749 text_high>: Update.
10750 * objfiles.h (obj_section_offset): Update.
10751 (struct objfile) <section_offsets>: Change type.
10752 <num_sections>: Remove.
10753 (objfile_relocate): Update.
10754 * objfiles.c (entry_point_address_query): Update
10755 (relocate_one_symbol): Change type of "section_offsets".
10756 (objfile_relocate1, objfile_relocate1): Change type of
10757 "new_offsets".
10758 (objfile_rebase1): Update.
10759 * mipsread.c (mipscoff_symfile_read): Update.
10760 (read_alphacoff_dynamic_symtab): Remove "section_offsets"
10761 parameter.
10762 * mdebugread.c (parse_symbol): Change type of "section_offsets".
10763 (parse_external, psymtab_to_symtab_1): Update.
10764 * machoread.c (macho_symfile_offsets): Update.
10765 * ia64-tdep.c (ia64_find_unwind_table): Update.
10766 * hppa-tdep.c (read_unwind_info): Update.
10767 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Update.
10768 * dwarf2read.c (create_addrmap_from_index)
10769 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
10770 (process_psymtab_comp_unit_reader, add_partial_symbol)
10771 (add_partial_subprogram, process_full_comp_unit)
10772 (read_file_scope, read_func_scope, read_lexical_block_scope)
10773 (read_call_site_scope, dwarf2_rnglists_process)
10774 (dwarf2_ranges_process, dwarf2_ranges_read)
10775 (dwarf_decode_lines_1, var_decode_location, new_symbol)
10776 (dwarf2_fetch_die_loc_sect_off, dwarf2_per_cu_text_offset):
10777 Update.
10778 * dwarf2-frame.c (execute_cfa_program, dwarf2_frame_find_fde):
10779 Update.
10780 * dtrace-probe.c (dtrace_probe::get_relocated_address): Update.
10781 * dbxread.c (read_dbx_symtab, read_ofile_symtab): Update.
10782 (process_one_symbol): Change type of "section_offsets".
10783 * ctfread.c (get_objfile_text_range): Update.
10784 * coffread.c (coff_symtab_read, enter_linenos)
10785 (process_coff_symbol): Update.
10786 * coff-pe-read.c (add_pe_forwarded_sym): Update.
10787 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Update.
10788
10789 2020-01-08 Tom Tromey <tromey@adacore.com>
10790
10791 * dwarf2read.c (parse_macro_definition): Use std::string.
10792 (parse_macro_definition): Likewise.
10793
10794 2020-01-08 Tom Tromey <tromey@adacore.com>
10795
10796 * dwarf2read.c (abbrev_table_read_table): Use std::vector.
10797 (ATTR_ALLOC_CHUNK): Remove.
10798
10799 2020-01-08 Tom Tromey <tromey@adacore.com>
10800
10801 * dwarf2read.c (fixup_go_packaging): Use unique_xmalloc_ptr.
10802
10803 2020-01-08 Tom Tromey <tromey@adacore.com>
10804
10805 * dwarf2read.c (add_partial_symbol): Use unique_xmalloc_ptr.
10806 (dwarf2_compute_name, open_dwo_file): Likewise.
10807 (process_enumeration_scope): Use std::vector.
10808 (guess_partial_die_structure_name): Use unique_xmalloc_ptr.
10809 (partial_die_info::fixup, dwarf2_start_subfile)
10810 (guess_full_die_structure_name, dwarf2_name): Likewise.
10811 (determine_prefix): Update.
10812 (guess_full_die_structure_name): Make return type const.
10813 (partial_die_full_name): Return unique_xmalloc_ptr.
10814 (DW_FIELD_ALLOC_CHUNK): Remove.
10815
10816 2020-01-07 Tom Tromey <tromey@adacore.com>
10817
10818 PR build/24937:
10819 * stap-probe.c (class stap_static_probe_ops): Add constructor.
10820
10821 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
10822
10823 * cli/cli-style.c: Set cli_styling to 'true' in the Cygwin build.
10824
10825 2020-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
10826
10827 * stack.c (print_frame_info): Move disassemble_next_line code
10828 inside source_print block.
10829
10830 2020-01-06 Eli Zaretskii <eliz@gnu.org>
10831
10832 * gdbsupport/gdb_wait.c: Include <signal.h> instead of
10833 gdb/signals.h, as we are now using native signal symbols.
10834
10835 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
10836
10837 * tui/tui-disasm.c (tui_disasm_window::addr_is_displayed): Avoid
10838 overflow by an early check of content vs threshold.
10839 * tui/tui-source.c (tui_source_window::line_is_displayed):
10840 Likewise.
10841
10842 2020-01-06 Eli Zaretskii <eliz@gnu.org>
10843
10844 * NEWS: Mention the recent fix of $_exitsignal on MS-Windows.
10845
10846 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
10847
10848 * coff-pe-read.c (read_pe_exported_syms): Don't try to read the
10849 export table if no section contains it's RVA.
10850
10851 2020-01-06 Eli Zaretskii <eliz@gnu.org>
10852
10853 * windows-tdep.c: Fix a typo in WINDOWS_SIGABRT.
10854
10855 2020-01-06 Hannes Domani <ssbssa@yahoo.de>
10856
10857 * source.c (print_source_lines_base): Set last_line_listed.
10858
10859 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
10860
10861 * tui/tui-disasm.c: Remove trailing spaces.
10862
10863 2020-01-06 Eli Zaretskii <eliz@gnu.org>
10864 Pedro Alves <palves@redhat.com>
10865
10866 * Makefile.in (COMMON_SFILES): Add gdbsupport/gdb_wait.c.
10867 * windows-tdep.c: New enumeration of WINDOWS_SIG* signals.
10868 (windows_gdb_signal_to_target): New function, uses the above
10869 enumeration to convert GDB internal signal codes to equivalent
10870 Windows codes.
10871 (windows_init_abi): Call set_gdbarch_gdb_signal_to_target.
10872 * windows-nat.c: Include "gdb_wait.h".
10873 (get_windows_debug_event): Extract the fatal exception from the
10874 exit status and convert to the equivalent Posix signal number.
10875 * cli/cli-cmds.c (exit_status_set_internal_vars): Account for the
10876 possibility that WTERMSIG returns GDB_SIGNAL_UNKNOWN.
10877 * gdbsupport/gdb_wait.c: New file, implements
10878 windows_status_to_termsig.
10879 * gdbsupport/gdb_wait.h (WIFEXITED, WIFSIGNALED, WEXITSTATUS)
10880 (WTERMSIG) [__MINGW32__]: Separate definitions for MinGW.
10881
10882 2020-01-05 Andrew Burgess <andrew.burgess@embecosm.com>
10883
10884 * tui/tui-layout.c (tui_add_win_to_layout): Use tui_set_layout not
10885 show_layout.
10886
10887 2020-01-05 Luis Machado <luis.machado@linaro.org>
10888
10889 * aarch64-linux-nat.c
10890 (aarch64_linux_nat_target::thread_architecture): Use bfd_arch_aarch64
10891 and bfd_mach_aarch64.
10892
10893 2020-01-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10894
10895 * ui-file.c (stdio_file::can_emit_style_escape)
10896 (tee_file::can_emit_style_escape): Ensure style is used also on
10897 gdb_stderr when gdb_stderr is a tty supporting styling, similarly
10898 to gdb_stdout.
10899 * main.c (set_gdb_data_directory): Use file style to output the
10900 warning that the given pathname is not a directory.
10901 * top.c (show_history_filename, gdb_safe_append_history)
10902 (show_gdb_datadir): Use file style.
10903
10904 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
10905
10906 * solib-target.c (struct lm_info_target):
10907 Change offsets to be a unique_xmalloc_ptr.
10908 (solib_target_relocate_section_addresses): Update.
10909
10910 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
10911
10912 * windows-nat.c (windows_clear_solib): Free so_list linked list.
10913
10914 2020-01-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
10915
10916 * MAINTAINERS (Write After Approval): Add myself.
10917
10918 2020-01-02 Luis Machado <luis.machado@linaro.org>
10919
10920 * proc-service.c (get_ps_regcache): Remove reference to obsolete
10921 Cell BE architecture.
10922 * target.h (struct target_ops) <thread_architecture>: Likewise.
10923
10924 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
10925
10926 * Makefile.in: Use INSTALL_PROGRAM_ENV.
10927
10928 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
10929
10930 * MAINTAINERS (Write After Approval): Add myself.
10931
10932 2020-01-01 Joel Brobecker <brobecker@adacore.com>
10933
10934 * gdbarch.sh: Update copyright year range of generated files.
10935
10936 2020-01-01 Joel Brobecker <brobecker@adacore.com>
10937
10938 Update copyright year range in all GDB files.
10939
10940 2020-01-01 Joel Brobecker <brobecker@adacore.com>
10941
10942 * copyright.py: Convert to Python 3.
10943
10944 2020-01-01 Joel Brobecker <brobecker@adacore.com>
10945
10946 * copyright.py: Adapt after move of gnulib directory from gdb
10947 directory to toplevel directory.
10948
10949 2020-01-01 Joel Brobecker <brobecker@adacore.com>
10950
10951 * copyright.py (main): Exit if run from the wrong directory.
10952
10953 2020-01-01 Joel Brobecker <brobecker@adacore.com>
10954
10955 * top.c (print_gdb_version): Change copyright year to 2020.
10956
10957 2020-01-01 Joel Brobecker <brobecker@adacore.com>
10958
10959 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2019.
10960
10961 For older changes see ChangeLog-2019.
10962 \f
10963 Local Variables:
10964 mode: change-log
10965 left-margin: 8
10966 fill-column: 74
10967 version-control: never
10968 coding: utf-8
10969 End:
This page took 0.271898 seconds and 3 git commands to generate.