1 2018-07-05 Tom de Vries <tdevries@suse.de>
3 * macroexp.c (macro_buffer) <operator=>: New member function.
5 2018-07-04 Tom Tromey <tom@tromey.com>
7 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
9 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
11 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
12 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
16 2018-07-04 Joel Brobecker <brobecker@adacore.com>
18 * NEWS: Create a new section for the next release branch.
19 Rename the section of the current branch, now that it has
22 2018-07-04 Joel Brobecker <brobecker@adacore.com>
24 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
25 * version.in: Bump version to 8.2.50.DATE-git.
27 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
28 Pedro Alves <palves@redhat.com>
30 * linux-nat.c (linux_init_ptrace): Rename to ...
31 (linux_init_ptrace_procfs): ... this. Call
32 linux_proc_init_warnings.
33 (linux_nat_target::post_attach)
34 (linux_nat_target::post_startup_inferior): Adjust.
35 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
36 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
38 2018-07-04 Tom de Vries <tdevries@suse.de>
40 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
42 (read_comp_unit_head): ... here.
44 2018-07-03 Tom Tromey <tom@tromey.com>
46 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
47 (stop_tracing, tstatus_command)
48 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
49 (print_one_static_tracepoint_marker): Update.
50 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
52 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
54 (all_tracepoints, static_tracepoints_here): Return std::vector.
56 2018-07-03 Tom Tromey <tom@tromey.com>
58 * common/ptid.c (ptid_equal): Remove.
59 * common/ptid.h (ptid_equal): Don't declare.
60 * ada-tasks.c: Update.
61 * breakpoint.c: Update.
62 * common/agent.c: Update.
64 * darwin-nat-info.c: Update.
65 * darwin-nat.c: Update.
67 * dtrace-probe.c: Update.
68 * dummy-frame.c: Update.
71 * gdbthread.h: Update.
75 * inf-ptrace.c: Update.
80 * linux-fork.c: Update.
81 * linux-nat.c: Update.
82 * linux-thread-db.c: Update.
83 * mi/mi-cmd-var.c: Update.
84 * mi/mi-interp.c: Update.
85 * mi/mi-main.c: Update.
86 * nto-procfs.c: Update.
87 * ppc-linux-tdep.c: Update.
89 * python/py-inferior.c: Update.
90 * python/py-record-btrace.c: Update.
91 * python/py-record.c: Update.
92 * ravenscar-thread.c: Update.
94 * remote-sim.c: Update.
96 * sol-thread.c: Update.
99 * tui/tui-stack.c: Update.
101 * windows-nat.c: Update.
102 * windows-tdep.c: Update.
104 2018-07-03 Tom Tromey <tom@tromey.com>
106 * common/ptid.c (ptid_match): Remove.
107 * common/ptid.h (ptid_match): Don't declare.
108 * fbsd-nat.c: Update.
111 * linux-nat.c: Update.
112 * record-btrace.c: Update.
113 * regcache.c: Update.
116 2018-07-03 Tom Tromey <tom@tromey.com>
118 * common/ptid.c (ptid_tid_p): Remove.
119 * common/ptid.h (ptid_tid_p): Don't declare.
120 * sol-thread.c: Update.
122 2018-07-03 Tom Tromey <tom@tromey.com>
124 * common/ptid.c (ptid_lwp_p): Remove.
125 * common/ptid.h (ptid_lwp_p): Don't declare.
126 * fbsd-nat.c: Update.
127 * linux-nat.c: Update.
128 * nat/linux-procfs.c: Update.
129 * nat/x86-linux-dregs.c: Update.
130 * sol-thread.c: Update.
132 2018-07-03 Tom Tromey <tom@tromey.com>
134 * common/ptid.c (ptid_is_pid): Remove.
135 * common/ptid.h (ptid_is_pid): Don't declare.
137 * linux-nat.c: Update.
138 * mi/mi-interp.c: Update.
142 2018-07-03 Tom Tromey <tom@tromey.com>
144 * common/ptid.c (ptid_get_tid): Remove.
145 * common/ptid.h (ptid_get_tid): Don't declare.
146 * ada-tasks.c: Update.
147 * aix-thread.c: Update.
148 * bsd-uthread.c: Update.
149 * darwin-nat.c: Update.
150 * fbsd-nat.c: Update.
151 * i386-darwin-nat.c: Update.
153 * linux-tdep.c: Update.
154 * nto-procfs.c: Update.
155 * ppc-ravenscar-thread.c: Update.
156 * python/py-infthread.c: Update.
157 * ravenscar-thread.c: Update.
158 * sol-thread.c: Update.
159 * sparc-ravenscar-thread.c: Update.
160 * windows-nat.c: Update.
162 2018-07-03 Tom Tromey <tom@tromey.com>
164 * common/ptid.c (ptid_get_lwp): Remove.
165 * common/ptid.h (ptid_get_lwp): Don't declare.
166 * aarch64-linux-nat.c: Update.
167 * ada-tasks.c: Update.
168 * aix-thread.c: Update.
169 * amd64-linux-nat.c: Update.
170 * arm-linux-nat.c: Update.
172 * fbsd-nat.c: Update.
173 * fbsd-tdep.c: Update.
175 * i386-cygwin-tdep.c: Update.
176 * i386-gnu-nat.c: Update.
177 * i386-linux-nat.c: Update.
178 * ia64-linux-nat.c: Update.
179 * inf-ptrace.c: Update.
181 * linux-fork.c: Update.
182 * linux-nat.c: Update.
183 * linux-tdep.c: Update.
184 * linux-thread-db.c: Update.
185 * mips-linux-nat.c: Update.
186 * nat/aarch64-linux-hw-point.c: Update.
187 * nat/aarch64-linux.c: Update.
188 * nat/linux-btrace.c: Update.
189 * nat/linux-osdata.c: Update.
190 * nat/linux-procfs.c: Update.
191 * nat/x86-linux-dregs.c: Update.
192 * obsd-nat.c: Update.
193 * ppc-fbsd-nat.c: Update.
194 * ppc-linux-nat.c: Update.
196 * python/py-infthread.c: Update.
197 * ravenscar-thread.c: Update.
199 * s390-linux-nat.c: Update.
200 * sol-thread.c: Update.
201 * sol2-tdep.c: Update.
202 * spu-linux-nat.c: Update.
203 * x86-linux-nat.c: Update.
204 * xtensa-linux-nat.c: Update.
206 2018-07-03 Tom Tromey <tom@tromey.com>
208 * common/ptid.c (ptid_get_pid): Remove.
209 * common/ptid.h (ptid_get_pid): Don't declare.
210 * aarch64-linux-nat.c: Update.
211 * ada-lang.c: Update.
212 * aix-thread.c: Update.
213 * alpha-bsd-nat.c: Update.
214 * amd64-fbsd-nat.c: Update.
215 * amd64-linux-nat.c: Update.
216 * arm-linux-nat.c: Update.
217 * arm-nbsd-nat.c: Update.
219 * break-catch-syscall.c: Update.
220 * breakpoint.c: Update.
221 * bsd-uthread.c: Update.
224 * darwin-nat.c: Update.
225 * fbsd-nat.c: Update.
226 * fbsd-tdep.c: Update.
229 * hppa-nbsd-nat.c: Update.
230 * hppa-obsd-nat.c: Update.
231 * i386-fbsd-nat.c: Update.
232 * ia64-linux-nat.c: Update.
233 * inf-ptrace.c: Update.
235 * inferior.c: Update.
236 * inferior.h: Update.
239 * linux-fork.c: Update.
240 * linux-nat.c: Update.
241 * linux-tdep.c: Update.
242 * linux-thread-db.c: Update.
243 * m68k-bsd-nat.c: Update.
244 * mi/mi-interp.c: Update.
245 * mi/mi-main.c: Update.
246 * mips-linux-nat.c: Update.
247 * mips-nbsd-nat.c: Update.
248 * mips64-obsd-nat.c: Update.
249 * nat/aarch64-linux-hw-point.c: Update.
250 * nat/aarch64-linux.c: Update.
251 * nat/linux-btrace.c: Update.
252 * nat/linux-osdata.c: Update.
253 * nat/linux-procfs.c: Update.
254 * nat/x86-linux-dregs.c: Update.
255 * nto-procfs.c: Update.
256 * obsd-nat.c: Update.
257 * ppc-linux-nat.c: Update.
258 * ppc-nbsd-nat.c: Update.
259 * ppc-obsd-nat.c: Update.
260 * proc-service.c: Update.
262 * python/py-inferior.c: Update.
263 * python/py-infthread.c: Update.
264 * ravenscar-thread.c: Update.
266 * remote-sim.c: Update.
268 * rs6000-nat.c: Update.
269 * s390-linux-nat.c: Update.
270 * sh-nbsd-nat.c: Update.
271 * sol-thread.c: Update.
272 * sparc-nat.c: Update.
273 * sparc64-tdep.c: Update.
274 * spu-linux-nat.c: Update.
275 * spu-tdep.c: Update.
276 * target-debug.h: Update.
279 * tid-parse.c: Update.
280 * tracefile-tfile.c: Update.
281 * vax-bsd-nat.c: Update.
282 * windows-nat.c: Update.
283 * x86-linux-nat.c: Update.
286 2018-07-03 Tom Tromey <tom@tromey.com>
288 * common/ptid.c (pid_to_ptid): Remove.
289 * common/ptid.h (pid_to_ptid): Don't declare.
290 * aix-thread.c: Update.
291 * arm-linux-nat.c: Update.
292 * common/ptid.c: Update.
293 * common/ptid.h: Update.
296 * darwin-nat.c: Update.
297 * fbsd-nat.c: Update.
298 * fork-child.c: Update.
300 * go32-nat.c: Update.
301 * inf-ptrace.c: Update.
303 * inferior.c: Update.
305 * linux-fork.c: Update.
306 * linux-nat.c: Update.
307 * nat/aarch64-linux-hw-point.c: Update.
308 * nat/fork-inferior.c: Update.
309 * nat/x86-linux-dregs.c: Update.
310 * nto-procfs.c: Update.
311 * obsd-nat.c: Update.
313 * progspace.c: Update.
315 * rs6000-nat.c: Update.
316 * s390-linux-nat.c: Update.
317 * sol-thread.c: Update.
318 * spu-linux-nat.c: Update.
321 * tracefile-tfile.c: Update.
322 * windows-nat.c: Update.
324 2018-07-03 Tom Tromey <tom@tromey.com>
326 * common/ptid.h (ptid_build): Don't declare.
327 * common/ptid.c (ptid_build): Remove.
328 * aix-thread.c: Update.
330 * bsd-uthread.c: Update.
331 * common/agent.c: Update.
332 * common/ptid.c: Update.
333 * common/ptid.h: Update.
335 * darwin-nat.c: Update.
336 * fbsd-nat.c: Update.
338 * linux-fork.c: Update.
339 * linux-nat.c: Update.
340 * linux-thread-db.c: Update.
341 * nat/linux-osdata.c: Update.
342 * nat/linux-procfs.c: Update.
343 * nto-procfs.c: Update.
344 * obsd-nat.c: Update.
345 * proc-service.c: Update.
347 * ravenscar-thread.c: Update.
348 * remote-sim.c: Update.
350 * sol-thread.c: Update.
352 * windows-nat.c: Update.
354 2018-07-03 Tom Tromey <tom@tromey.com>
356 * infrun.c (follow_exec): Use exit_inferior_silent.
357 * inferior.c (exit_inferior_num_silent): Remove.
358 * inferior.h (exit_inferior_num_silent): Don't declare.
360 2018-07-03 Tom Tromey <tom@tromey.com>
363 * darwin-nat.c (darwin_attach_pid): Reset inferior and
364 inferior_ptid on error.
366 2018-07-02 Maciej W. Rozycki <macro@mips.com>
367 Simon Marchi <simon.marchi@polymtl.ca>
370 * disasm.h (gdb_disassembler): Add
371 `m_disassembler_options_holder'. member
372 * disasm.c (get_all_disassembler_options): New function.
373 (gdb_disassembler::gdb_disassembler): Use it.
374 (gdb_buffered_insn_length_init_dis): Likewise.
375 (gdb_buffered_insn_length): Adjust accordingly.
376 (set_disassembler_options): Handle options with arguments.
377 (show_disassembler_options_sfunc): Likewise. Add a leading new
378 line if showing options with descriptions.
379 (disassembler_options_completer): Adapt to using the
380 `disasm_options_and_args_t' structure.
381 * mips-tdep.c (mips_disassembler_options): New variable.
382 (mips_disassembler_options_o32): Likewise.
383 (mips_disassembler_options_n32): Likewise.
384 (mips_disassembler_options_n64): Likewise.
385 (gdb_print_insn_mips): Don't set `disassembler_options'.
386 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
388 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
389 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
390 `gdbarch_disassembler_options_implicit' and
391 `gdbarch_valid_disassembler_options'.
392 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
393 `disasm_options_and_args_t' structure.
394 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
396 (valid_disassembler_options): Switch from `disasm_options_t' to
397 the `disasm_options_and_args_t' structure.
398 * NEWS: Document `set disassembler-options' support for the MIPS
400 * gdbarch.h: Regenerate.
401 * gdbarch.c: Regenerate.
403 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
405 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
407 2018-06-29 Joel Brobecker <brobecker@adacore.com>
409 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
410 parameter in call to amd64_target_description.
411 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
412 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
413 (amd64fbsd_init_abi): Likewise.
414 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
415 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
416 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
417 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
419 2018-06-29 Pedro Alves <palves@redhat.com>
421 * gdb/amd64-tdep.h (amd64_create_target_description): Add
422 "segments" parameter.
423 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
424 (_initialize_amd64_tdep): Update call to
425 amd64_create_target_description.
426 (amd64_target_description): Add "segments" parameter. Adjust
427 the implementation to use it.
428 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
429 call to amd64_create_target_description.
430 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
431 * gdb/arch/amd64.h (amd64_create_target_description): Add
433 * gdb/arch/amd64.c (amd64_create_target_description): Add
434 "segments" parameter. Call create_feature_i386_64bit_segments
435 only if SEGMENTS is true.
436 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
437 call to amd64_create_target_description.
439 2018-06-29 Pedro Alves <palves@redhat.com>
441 * thread.c (thread_target_id_str): New, factored out from ...
442 (print_thread_info_1): ... here. Use it to compute the max
443 "Target Id" column width.
445 2018-06-29 Pedro Alves <palves@redhat.com>
447 * remote.c (remote_target::extra_thread_info): Delete
448 'display_buf' and 'n' locals. from the cache, regardless of
449 packet mechanims is in use. Use cache for qThreadExtra and qP
452 2018-06-29 Pedro Alves <palves@redhat.com>
454 * blockframe.c (find_pc_sect_containing_function): New function.
455 * breakpoint.c (print_breakpoint_location): Don't call
456 find_pc_sect_function.
457 * linespec.c (create_sals_line_offset): Record the location's
459 * linespec.c (convert_address_location_to_sals): Fill in sal's
460 symbol with find_pc_sect_containing_function.
461 * symtab.c (find_function_start_sal): Rename to ...
462 (find_function_start_sal_1): ... this.
463 (find_function_start_sal): Reimplement as wrapper around
464 find_function_start_sal_1, and use
465 find_pc_sect_containing_function to fill in the sal's symbol.
466 (find_function_start_sal(symbol*, bool)): Adjust.
467 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
469 (find_pc_sect_containing_function): Declare.
471 2018-06-29 Pedro Alves <palves@redhat.com>
473 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
474 true if the the location has no symbol.
476 2018-06-28 Tom Tromey <tom@tromey.com>
478 * NEWS: Mention --enable-codesign.
479 * silent-rules.mk (ECHO_SIGN): New variable.
480 * configure.ac: Add --enable-codesign.
481 * configure: Rebuild.
482 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
483 (gdb$(EXEEXT)): Optionally invoke codesign.
485 2018-06-28 Pedro Alves <palves@redhat.com>
487 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
489 (switch_to_thread_no_regs): Adjust comment.
490 * infcmd.c (stop_pc): Delete.
491 (post_create_inferior, info_program_command): Replace references
492 to stop_pc with references to thread_info->suspend.stop_pc.
493 * inferior.h (stop_pc): Delete declaration.
494 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
495 (handle_inferior_event_1, handle_signal_stop)
496 (process_event_stop_test, keep_going_stepped_thread)
497 (handle_step_into_function, handle_step_into_function_backward)
498 (print_stop_location): Replace references to stop_pc with
499 references to thread_info->suspend.stop_pc.
500 (struct infcall_suspend_state) <stop_pc>: Delete field.
501 (save_infcall_suspend_state, restore_infcall_suspend_state):
502 Remove references to inf_stat->stop_pc.
503 * linux-fork.c (fork_load_infrun_state): Likewise.
504 * record-btrace.c (record_btrace_set_replay): Likewise.
505 * record-full.c (record_full_goto_entry): Likewise.
506 * remote.c (print_one_stopped_thread): Likewise.
507 * target.c (target_resume): Extend comment.
508 * thread.c (set_executing_thread): New.
509 (set_executing): Use it.
510 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
511 Remove references to stop_pc.
513 2018-06-28 Pedro Alves <palves@redhat.com>
515 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
516 Moving fetching stop_pc until after ecs->event_thread is refreshed.
518 2018-06-28 Tom Tromey <tom@tromey.com>
520 * coffread.c (coff_symfile_finish): Update.
521 * xcoffread.c (xcoff_symfile_finish): Update.
522 * elfread.c (elf_symfile_finish): Update.
523 * symfile.h (dwarf2_free_objfile): Don't declare.
524 * dwarf2read.c (_initialize_dwarf2_read): Use
525 register_objfile_data_with_cleanup.
526 (dwarf2_free_objfile): Now static. Change signature.
528 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
530 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
531 option "-o" to add-symbol-file-load to add an offset to each
532 section's load address.
533 * symfile.c (set_objfile_default_section_offset): New function.
535 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
537 * symfile.c (add_symbol_file_command): Make sure that sections
538 with the same name are sorted in the same order.
540 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
542 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
543 require the second argument. If omitted, load sections at the
544 addresses specified in the file.
546 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
548 * symfile.c (symbol_file_command, symbol_file_add_main_1)
549 (_initialize_symfile): Add option "-o" to symbol-file to add an
550 offset to each section of the symbol file.
552 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
554 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
556 2018-06-27 Tom Tromey <tom@tromey.com>
558 * stack.c (_initialize_stack): Update "func" help text.
560 2018-06-27 Tom Tromey <tom@tromey.com>
562 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
564 (unwind_infopy_str, pyuw_create_unwind_info)
565 (unwind_infopy_add_saved_register, pyuw_sniffer)
566 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
568 (struct saved_reg): Add constructor.
569 <value>: Now a gdbpy_ref<>.
571 2018-06-27 Tom Tromey <tom@tromey.com>
573 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
575 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
577 * gdb-gdb.py.in: Format using autopep8.
579 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
581 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
582 (type_lookup_function): Recognize CORE_ADDR values.
584 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
586 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
589 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
591 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
594 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
596 * gdb-gdb.py: Move to...
597 * gdb-gdb.py.in: ... here.
598 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
599 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
601 (distclean): Remove gdb-gdb.py when cleaning.
602 (gdb-gdb.py, gdb-gdb.gdb): New rules.
603 * configure: Re-generate.
605 2018-06-27 Pedro Alves <palves@redhat.com>
607 * proc-service.c (get_ps_regcache): New.
608 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
609 (ps_lsetfpregs): Use it.
611 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
614 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
615 (dwarf_decode_lines_1): Adjust.
617 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
619 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
621 <info_proc>: Likewise.
623 2018-06-26 Joel Brobecker <brobecker@adacore.com>
625 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
626 to windows_fetch_one_register, and only handle the case of
627 fetching one register. Move the code that reloads the context
628 and iterates over all registers if R is negative to...
629 (windows_nat_target::fetch_registers): ... here.
630 (do_windows_store_inferior_registers): Rename to
631 windows_store_one_register, and only handle the case of storing
632 one register. Move the code that handles the case where r is
634 (windows_nat_target::store_registers) ... here.
636 2018-06-26 Tom Tromey <tom@tromey.com>
639 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
640 * rust-lang.c (rust_print_struct_def): Add podata parameter.
642 (rust_internal_print_type): Add podata parameter.
643 (rust_print_type): Update.
645 2018-06-26 Tom Tromey <tom@tromey.com>
647 * typeprint.h (struct print_offset_data) <update, finish,
648 maybe_print_hole>: New methods.
649 <indentation>: New constant.
650 * typeprint.c (print_offset_data::indentation): Define.
651 (print_offset_data::maybe_print_hole, print_offset_data::update)
652 (print_offset_data::finish): Move from c-typeprint.c and rename.
653 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
654 (print_spaces_filtered_with_print_options): Update.
655 (c_print_type_union_field_offset, maybe_print_hole)
656 (c_print_type_struct_field_offset): Move to typeprint.c and
658 (c_type_print_base_struct_union): Update.
660 2018-06-25 Pedro Alves <palves@redhat.com>
662 * gdbthread.h (thread_info_ref, delete_thread)
663 (delete_thread_silent, first_thread_of_inferior)
664 (any_thread_of_inferior, switch_to_thread)
665 (enable_thread_stack_temporaries)
666 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
667 (get_last_thread_stack_temporary)
668 (value_in_thread_stack_temporaries, can_access_registers_thread):
669 Spell out "struct thread_info" instead of just "thread_info".
670 * inferior.h (notice_new_inferior): Likewise.
672 2018-06-25 Pedro Alves <palves@redhat.com>
674 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
675 pass thread_info pointer to delete_thread.
676 (windows_nat_target::detach): Pass inferior pointer to
678 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
680 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
681 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
682 and pass a thread_info pointer to delete_thread.
683 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
684 pass thread_info pointer to delete_thread.
685 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
686 delete_thread_silent call.
687 * procfs.c (procfs_target::detach): Pass inferior pointer to
689 (procfs_target::wait): Pass thread_info pointer to delete_thread.
690 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
691 delete_thread_silent call.
692 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
693 pass thread_info pointer to delete_thread.
694 (windows_nat_target::detach): Pass inferior pointer to
697 2018-06-22 Alan Hayward <alan.hayward@arm.com>
699 * regcache.c (readable_regcache::read_part): Fix asserts.
700 (reg_buffer::raw_collect_part): New function.
701 (regcache::write_part): Fix asserts.
702 (reg_buffer::raw_supply_part): New function.
703 (regcache::transfer_regset_register): New helper function.
704 (regcache::transfer_regset): Call new functions.
705 (regcache_supply_regset): Use gdb_byte*.
706 (regcache::supply_regset): Likewise.
707 (regcache_collect_regset): Likewise.
708 (regcache::collect_regset): Likewise.
709 * regcache.h (reg_buffer::raw_collect_part): New declaration.
710 (reg_buffer::raw_supply_part): Likewise.
711 (regcache::transfer_regset_register): Likewise.
712 (regcache::transfer_regset): Use gdb_byte*.
714 2018-06-22 Alan Hayward <alan.hayward@arm.com>
716 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
718 2018-06-21 Pedro Alves <palves@redhat.com>
720 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
721 instead of a ptid_t. All callers adjusted.
722 * ada-tasks.c (ada_get_task_number): Likewise. All callers
724 (print_ada_task_info, display_current_task_id, task_command_1):
726 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
728 (breakpoint_kind): Adjust.
729 (remove_breakpoints_pid): Rename to ...
730 (remove_breakpoints_inf): ... this. Adjust to take an inferior
731 pointer. All callers adjusted.
732 (bpstat_clear_actions): Use inferior_thread.
733 (get_bpstat_thread): New.
734 (bpstat_do_actions): Use it.
735 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
736 to take a thread_info pointer. All callers adjusted.
737 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
738 (breakpoint_re_set_thread): Use inferior_thread.
739 * breakpoint.h (struct inferior): Forward declare.
740 (bpstat_stop_status): Update.
741 (remove_breakpoints_pid): Delete.
742 (remove_breakpoints_inf): New.
743 * bsd-uthread.c (bsd_uthread_target::wait)
744 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
745 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
746 (maint_btrace_packet_history_cmd)
747 (maint_btrace_clear_packet_history_cmd): Adjust.
748 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
750 * cli/cli-interp.c: Include "inferior.h".
751 * common/refcounted-object.h (struct
752 refcounted_object_ref_policy): New.
753 * compile/compile-object-load.c: Include gdbthread.h.
754 (store_regs): Use inferior_thread.
755 * corelow.c (core_target::close): Use current_inferior.
756 (core_target_open): Adjust to use first_thread_of_inferior and use
757 the current inferior.
758 * ctf.c (ctf_target::close): Adjust to use current_inferior.
759 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
760 <thread>: ... this new field. All references adjusted.
761 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
762 Take a thread_info pointer instead of a ptid_t.
763 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
764 (dummy_frame_discard, register_dummy_frame_dtor): Take a
765 thread_info pointer instead of a ptid_t.
766 * elfread.c: Include "inferior.h".
767 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
769 * eval.c (evaluate_subexp): Likewise.
770 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
772 * gdb_proc_service.h (struct thread_info): Forward declare.
773 (struct ps_prochandle) <ptid>: Delete, replaced by ...
774 <thread>: ... this new field. All references adjusted.
775 * gdbarch.h, gdbarch.c: Regenerate.
776 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
777 'thread' parameter. All implementations and callers adjusted.
778 * gdbthread.h (thread_info) <set_running>: New method.
779 (delete_thread, delete_thread_silent): Take a thread_info pointer
781 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
782 (first_thread_of_process): Delete, replaced by ...
783 (first_thread_of_inferior): ... this new function. All callers
785 (any_live_thread_of_process): Delete, replaced by ...
786 (any_live_thread_of_inferior): ... this new function. All callers
788 (switch_to_thread, switch_to_no_thread): Declare.
789 (is_executing): Delete.
790 (enable_thread_stack_temporaries): Update comment.
791 <enable_thread_stack_temporaries>: Take a thread_info pointer
792 instead of a ptid_t. Incref the thread.
793 <~enable_thread_stack_temporaries>: Decref the thread.
796 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
797 (get_last_thread_stack_temporary)
798 (value_in_thread_stack_temporaries, can_access_registers_thread):
799 Take a thread_info pointer instead of a ptid_t. All callers
801 * infcall.c (get_call_return_value): Use inferior_thread.
802 (run_inferior_call): Work with thread pointers instead of ptid_t.
803 (call_function_by_hand_dummy): Work with thread pointers instead
804 of ptid_t. Use thread_info_ref.
805 * infcmd.c (proceed_thread_callback): Access thread's state
807 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
808 access thread's state directly.
809 (continue_command): Use inferior_thread.
810 (info_program_command): Use find_thread_ptid and access thread
812 (proceed_after_attach_callback): Use thread state directly.
813 (notice_new_inferior): Take a thread_info pointer instead of a
814 ptid_t. All callers adjusted.
815 (exit_inferior): Take an inferior pointer instead of a pid. All
817 (exit_inferior_silent): New.
818 (detach_inferior): Delete.
819 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
820 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
821 (detach_inferior_command, kill_inferior_command): Use
822 find_inferior_id instead of valid_gdb_inferior_id and
823 gdb_inferior_id_to_pid.
824 (inferior_command): Use inferior and thread pointers.
825 * inferior.h (struct thread_info): Forward declare.
826 (notice_new_inferior): Take a thread_info pointer instead of a
827 ptid_t. All callers adjusted.
828 (detach_inferior): Delete declaration.
829 (exit_inferior, exit_inferior_silent): Take an inferior pointer
830 instead of a pid. All callers adjusted.
831 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
832 (valid_gdb_inferior_id): Delete.
833 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
834 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
835 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
837 <inf>: ... this new field.
838 <step_ptid>: Delete, replaced by ...
839 <step_thread>: ... this new field.
840 (get_displaced_stepping_state): Take an inferior pointer instead
841 of a pid. All callers adjusted.
842 (displaced_step_in_progress_any_inferior): Adjust.
843 (displaced_step_in_progress_thread): Take a thread pointer instead
844 of a ptid_t. All callers adjusted.
845 (displaced_step_in_progress, add_displaced_stepping_state): Take
846 an inferior pointer instead of a pid. All callers adjusted.
847 (get_displaced_step_closure_by_addr): Adjust.
848 (remove_displaced_stepping_state): Take an inferior pointer
849 instead of a pid. All callers adjusted.
850 (displaced_step_prepare_throw, displaced_step_prepare)
851 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
852 All callers adjusted.
853 (start_step_over): Adjust.
854 (infrun_thread_ptid_changed): Remove bit updating ptids in the
855 displaced step queue.
856 (do_target_resume): Adjust.
857 (fetch_inferior_event): Use inferior_thread.
858 (context_switch, get_inferior_stop_soon): Take an
859 execution_control_state pointer instead of a ptid_t. All callers
861 (switch_to_thread_cleanup): Delete.
862 (stop_all_threads): Use scoped_restore_current_thread.
863 * inline-frame.c: Include "gdbthread.h".
864 (inline_state) <inline_state>: Take a thread pointer instead of a
865 ptid_t. All callers adjusted.
866 <ptid>: Delete, replaced by ...
867 <thread>: ... this new field.
868 (find_inline_frame_state): Take a thread pointer instead of a
869 ptid_t. All callers adjusted.
870 (skip_inline_frames, step_into_inline_frame)
871 (inline_skipped_frames, inline_skipped_symbol): Take a thread
872 pointer instead of a ptid_t. All callers adjusted.
873 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
874 (inline_skipped_frames, inline_skipped_symbol): Likewise.
875 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
877 * linux-nat.c (get_detach_signal): Likewise.
878 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
879 (thread_db_notice_clone): Adjust.
880 (thread_db_find_new_threads_silently)
881 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
882 a thread pointer instead of a ptid_t. All callers adjusted.
883 * mi/mi-cmd-var.c: Include "inferior.h".
884 (mi_cmd_var_update_iter): Update to use thread pointers.
885 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
887 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
889 (mi_output_running): ... this new function.
890 (mi_on_resume_1): Adjust to use it.
891 (mi_user_selected_context_changed): Adjust to use inferior_thread.
892 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
894 (interrupt_thread_callback): : Adjust to use thread and inferior
896 * proc-service.c: Include "gdbthread.h".
897 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
898 * progspace-and-thread.c: Include "inferior.h".
899 * progspace.c: Include "inferior.h".
900 * python/py-exitedevent.c (create_exited_event_object): Adjust to
901 hold a reference to an inferior_object.
902 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
904 * python/py-inferior.c (struct inferior_object): Give the type a
905 tag name instead of a typedef.
906 (python_on_normal_stop): No need to check if the current thread is
908 (inferior_to_inferior_object): Change return type to
909 inferior_object. All callers adjusted.
910 (find_thread_object): Delete, bits factored out to ...
911 (thread_to_thread_object): ... this new function.
912 * python/py-infthread.c (create_thread_object): Use
913 inferior_to_inferior_object.
914 (thpy_is_stopped): Use thread pointer directly.
915 (gdbpy_selected_thread): Use inferior_thread.
916 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
917 field, replaced with ...
918 <thread>: ... this new field. All users adjusted.
919 (btpy_insn_or_gap_new): Drop const.
920 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
922 * python/py-record.c: Include "gdbthread.h".
923 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
924 a ptid_t. All callers adjusted.
925 (gdbpy_current_recording): Use inferior_thread.
926 * python/py-record.h (recpy_record_object) <ptid>: Delete
927 field, replaced with ...
928 <thread>: ... this new field. All users adjusted.
929 (recpy_element_object) <ptid>: Delete
930 field, replaced with ...
931 <thread>: ... this new field. All users adjusted.
932 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
933 a ptid_t. All callers adjusted.
934 * python/py-threadevent.c: Include "gdbthread.h".
935 (get_event_thread): Use thread_to_thread_object.
936 * python/python-internal.h (struct inferior_object): Forward
938 (find_thread_object, find_inferior_object): Delete declarations.
939 (thread_to_thread_object, inferior_to_inferior_object): New
941 * record-btrace.c: Include "inferior.h".
942 (require_btrace_thread): Use inferior_thread.
943 (record_btrace_frame_sniffer)
944 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
945 (get_thread_current_frame): Use scoped_restore_current_thread and
947 (get_thread_current_frame): Use thread pointer directly.
948 (record_btrace_replay_at_breakpoint): Use thread's inferior
950 * record-full.c: Include "inferior.h".
951 * regcache.c: Include "gdbthread.h".
952 (get_thread_arch_regcache): Use the inferior's address space
954 (get_thread_regcache, registers_changed_thread): New.
955 * regcache.h (get_thread_regcache(thread_info *thread)): New
957 (registers_changed_thread): New.
958 (remote_target) <remote_detach_1>: Swap order of parameters.
959 (remote_add_thread): <remote_add_thread>: Return the new thread.
960 (get_remote_thread_info(ptid_t)): New overload.
961 (remote_target::remote_notice_new_inferior): Use thread pointers
963 (remote_target::process_initial_stop_replies): Use
964 thread_info::set_running.
965 (remote_target::remote_detach_1, remote_target::detach)
966 (extended_remote_target::detach): Adjust.
967 * stack.c (frame_show_address): Use inferior_thread.
968 * target-debug.h (target_debug_print_thread_info_pp): New.
969 * target-delegates.c: Regenerate.
970 * target.c (default_thread_address_space): Delete.
971 (memory_xfer_partial_1): Use current_inferior.
972 (target_detach): Use current_inferior.
973 (target_thread_address_space): Delete.
974 (generic_mourn_inferior): Use current_inferior.
975 * target.h (struct target_ops) <thread_address_space>: Delete.
976 (target_thread_address_space): Delete.
977 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
979 (delete_thread_1, delete_thread, delete_thread_silent): Take a
980 thread pointer instead of a ptid_t. Adjust all callers.
981 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
982 (first_thread_of_process): Delete, replaced by ...
983 (first_thread_of_inferior): ... this new function. All callers
985 (any_thread_of_process): Rename to ...
986 (any_thread_of_inferior): ... this, and take an inferior pointer.
987 (any_live_thread_of_process): Rename to ...
988 (any_live_thread_of_inferior): ... this, and take an inferior
990 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
991 (value_in_thread_stack_temporaries)
992 (get_last_thread_stack_temporary): Take a thread pointer instead
993 of a ptid_t. Adjust all callers.
994 (thread_info::set_running): New.
995 (validate_registers_access): Use inferior_thread.
996 (can_access_registers_ptid): Rename to ...
997 (can_access_registers_thread): ... this, and take a thread
999 (print_thread_info_1): Adjust to compare thread pointers instead
1001 (switch_to_no_thread, switch_to_thread): Make extern.
1002 (scoped_restore_current_thread::~scoped_restore_current_thread):
1003 Use m_thread pointer directly.
1004 (scoped_restore_current_thread::scoped_restore_current_thread):
1005 Use inferior_thread.
1006 (thread_command): Use thread pointer directly.
1007 (thread_num_make_value_helper): Use inferior_thread.
1008 * top.c (execute_command): Use inferior_thread.
1009 * tui/tui-interp.c: Include "inferior.h".
1010 * varobj.c (varobj_create): Use inferior_thread.
1011 (value_of_root_1): Use find_thread_global_id instead of
1012 global_thread_id_to_ptid.
1014 2018-06-21 Alan Hayward <alan.hayward@arm.com>
1016 * regcache.c (readable_regcache::read_part): Avoid memcpy when
1018 (regcache::write_part): Likewise.
1019 (readable_regcache::cooked_read_part): Update comment.
1020 (readable_regcache::cooked_write_part): Likewise.
1021 * regcache.h: (readable_regcache::read_part): Likewise.
1022 (regcache::write_part): Likewise.
1024 2018-06-21 Richard Bunt <richard.bunt@arm.com>
1025 Dirk Schubert <dirk.schubert@arm.com>
1027 * aarch64-linux-nat.c (post_attach): New.
1028 (aarch64_linux_nat_target::post_attach): Override post_attach to
1029 record the number of hardware debug registers.
1031 2018-06-20 Tom Tromey <tom@tromey.com>
1033 * python/py-param.c (add_setshow_generic): Make parameters const.
1034 (parmpy_init): Update.
1036 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1038 * regcache.h (regcache_cooked_read_ftype): Rename to...
1039 (register_read_ftype): ...this, change type to function_view.
1040 (class reg_buffer) <save>: Remove src parameter.
1041 (readonly_detached_regcache) <readonly_detached_regcache>: Make
1042 parameter non-const in first overload. Remove src parameter in
1044 * regcache.c (do_cooked_read): Remove.
1045 (readonly_detached_regcache::readonly_detached_regcache): Make
1046 parameter non-const, adjust call to other constructor.
1047 (reg_buffer::save): Remove src parameter.
1048 * frame.c (do_frame_register_read): Remove.
1049 (frame_save_as_regcache): Use lambda function.
1050 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1051 parameter to ppu2spu_data *.
1052 (ppu2spu_sniffer): Use lambda function.
1054 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1056 * record-full.c (record_full_target::insert_breakpoint): Remove
1057 "struct" keyword, add const.
1059 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1061 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1062 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1063 * configure.ac: Remove AC_PREREQ, add missing quoting.
1064 * gnulib/configure.ac: Modernize usage of
1065 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
1066 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1067 (AUTOMAKE_VERSION): Bump to 1.15.1.
1068 * configure: Re-generate.
1069 * config.in: Re-generate.
1070 * aclocal.m4: Re-generate.
1071 * gnulib/aclocal.m4: Re-generate.
1072 * gnulib/config.in: Re-generate.
1073 * gnulib/configure: Re-generate.
1074 * gnulib/import/Makefile.in: Re-generate.
1076 2018-06-19 Pedro Alves <palves@redhat.com>
1078 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1079 (lookup_minimal_symbol_by_pc_section): ... here with
1080 gdb_assert_not_reached added.
1082 2018-06-19 Pedro Alves <palves@redhat.com>
1084 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1085 parameter with a block parameter. Compare location's block symbol
1086 with the frame's block instead of addresses.
1087 (skip_inline_frames): Pass the current block instead of the
1088 frame's address. Break out as soon as we determine the frame
1089 should not be skipped.
1091 2018-06-18 Tom Tromey <tom@tromey.com>
1093 * solib-aix.c (solib_aix_get_section_offsets): Return
1095 (solib_aix_solib_create_inferior_hook): Update.
1097 2018-06-18 Tom Tromey <tom@tromey.com>
1099 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
1101 2018-06-18 Tom Tromey <tom@tromey.com>
1103 * solib-frv.c (frv_relocate_main_executable): Use
1105 * solib-dsbt.c (dsbt_relocate_main_executable): Use
1108 2018-06-18 Tom Tromey <tom@tromey.com>
1110 * objfiles.h (inhibit_section_map_updates): Update.
1111 (resume_section_map_updates, resume_section_map_updates_cleanup):
1113 * solib-svr4.c (svr4_handle_solib_event): Update.
1114 * objfiles.c (inhibit_section_map_updates): Return
1115 scoped_restore_tmpl<int>.
1116 (resume_section_map_updates, resume_section_map_updates_cleanup):
1119 2018-06-18 Tom Tromey <tom@tromey.com>
1121 * valprint.h (read_string): Update.
1122 * valprint.c (read_string): Change type of "buffer".
1123 (val_print_string): Update.
1124 * python/py-value.c (valpy_string): Update.
1125 * language.h (struct language_defn) <la_get_string>: Change
1127 (default_get_string, c_get_string): Update.
1128 * language.c (default_get_string): Change type of "buffer".
1129 * guile/scm-value.c (gdbscm_value_to_string): Update.
1130 * c-lang.c (c_get_string): Change type of "buffer".
1132 2018-06-18 Tom Tromey <tom@tromey.com>
1134 * ser-mingw.c (struct pipe_state_destroyer): New.
1135 (pipe_state_up): New typedef.
1136 (cleanup_pipe_state): Remove.
1137 (pipe_windows_open): Use pipe_state_up. Don't release argv.
1139 2018-06-18 Tom Tromey <tom@tromey.com>
1141 * rust-lang.h (rust_yyerror): Don't declare.
1142 * rust-lang.c (rust_language_defn): Update.
1143 * rust-exp.y (yyerror): Now static.
1144 * parse.c (parse_exp_in_context_1): Update.
1145 * p-lang.h (p_yyerror): Don't declare.
1146 * p-lang.c (p_language_defn): Update.
1147 * p-exp.y (yyerror): Now static.
1148 * opencl-lang.c (opencl_language_defn): Update.
1149 * objc-lang.c (objc_language_defn): Update.
1150 * m2-lang.h (m2_yyerror): Don't declare.
1151 * m2-lang.c (m2_language_defn): Update.
1152 * m2-exp.y (yyerror): Now static.
1153 * language.h (struct language_defn) <la_error>: Remove.
1154 * language.c (unk_lang_error): Remove.
1155 (unknown_language_defn, auto_language_defn): Remove.
1156 * go-lang.h (go_yyerror): Don't declare.
1157 * go-lang.c (go_language_defn): Update.
1158 * go-exp.y (yyerror): Now static.
1159 * f-lang.h (f_yyerror): Don't declare.
1160 * f-lang.c (f_language_defn): Update.
1161 * f-exp.y (yyerror): Now static.
1162 * d-lang.h (d_yyerror): Don't declare.
1163 * d-lang.c (d_language_defn): Update.
1164 * d-exp.y (yyerror): Now static.
1165 * c-lang.h (c_yyerror): Don't declare.
1166 * c-lang.c (c_language_defn, cplus_language_defn)
1167 (asm_language_defn, minimal_language_defn): Update.
1168 * c-exp.y (yyerror): Now static.
1169 * ada-lang.h (ada_yyerror): Don't declare.
1170 * ada-lang.c (ada_language_defn): Update.
1171 * ada-exp.y (yyerror): Now static.
1173 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1175 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1176 (store_sveregs_to_thread): Likewise.
1177 (aarch64_linux_fetch_inferior_registers): Check for SVE.
1178 (aarch64_linux_store_inferior_registers): Likewise.
1179 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1181 (aarch64_sve_regs_copy_to_regcache): Likewise.
1182 (aarch64_sve_regs_copy_from_regcache): Likewise.
1183 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1185 (aarch64_sve_regs_copy_to_regcache): Likewise.
1186 (aarch64_sve_regs_copy_from_regcache): Likewise.
1187 (sve_context): Structure from Linux headers.
1188 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1189 (SVE_SIG_ZREG_SIZE): Likewise.
1190 (SVE_SIG_PREG_SIZE): Likewise.
1191 (SVE_SIG_FFR_SIZE): Likewise.
1192 (SVE_SIG_REGS_OFFSET): Likewise.
1193 (SVE_SIG_ZREGS_OFFSET): Likewise.
1194 (SVE_SIG_ZREG_OFFSET): Likewise.
1195 (SVE_SIG_ZREGS_SIZE): Likewise.
1196 (SVE_SIG_PREGS_OFFSET): Likewise.
1197 (SVE_SIG_PREG_OFFSET): Likewise.
1198 (SVE_SIG_PREGS_SIZE): Likewise.
1199 (SVE_SIG_FFR_OFFSET): Likewise.
1200 (SVE_SIG_REGS_SIZE): Likewise.
1201 (SVE_SIG_CONTEXT_SIZE): Likewise.
1202 (SVE_PT_REGS_MASK): Likewise.
1203 (SVE_PT_REGS_FPSIMD): Likewise.
1204 (SVE_PT_REGS_SVE): Likewise.
1205 (SVE_PT_VL_INHERIT): Likewise.
1206 (SVE_PT_VL_ONEXEC): Likewise.
1207 (SVE_PT_REGS_OFFSET): Likewise.
1208 (SVE_PT_FPSIMD_OFFSET): Likewise.
1209 (SVE_PT_FPSIMD_SIZE): Likewise.
1210 (SVE_PT_SVE_ZREG_SIZE): Likewise.
1211 (SVE_PT_SVE_PREG_SIZE): Likewise.
1212 (SVE_PT_SVE_FFR_SIZE): Likewise.
1213 (SVE_PT_SVE_FPSR_SIZE): Likewise.
1214 (SVE_PT_SVE_FPCR_SIZE): Likewise.
1215 (__SVE_SIG_TO_PT): Likewise.
1216 (SVE_PT_SVE_OFFSET): Likewise.
1217 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1218 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1219 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1220 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1221 (SVE_PT_SVE_PREG_OFFSET): Likewise.
1222 (SVE_PT_SVE_PREGS_SIZE): Likewise.
1223 (SVE_PT_SVE_FFR_OFFSET): Likewise.
1224 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1225 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1226 (SVE_PT_SVE_SIZE): Likewise.
1227 (SVE_PT_SIZE): Likewise.
1228 (HAS_SVE_STATE): New define.
1230 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1232 * nat/aarch64-sve-linux-sigcontext.h: New file.
1233 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1235 (SVE_VQ_MIN): Likewise.
1236 (SVE_VQ_MAX): Likewise.
1237 (SVE_VL_MIN): Likewise.
1238 (SVE_VL_MAX): Likewise.
1239 (SVE_NUM_ZREGS): Likewise.
1240 (SVE_NUM_PREGS): Likewise.
1241 (sve_vl_valid): Likewise.
1242 (struct user_sve_header): Likewise.
1244 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
1245 Richard Bunt <Richard.Bunt@arm.com>
1247 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
1248 was requested by GDB.
1250 2018-06-15 Tom de Vries <tdevries@suse.de>
1252 * MAINTAINERS (Write After Approval): Add Tom de Vries.
1254 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
1256 * gnulib/update-gnulib.sh: Print expected versions of
1259 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
1261 * arch-utils.c (default_type_align): Use type_length_units.
1262 * gdbtypes.c (type_align): Use type_length_units.
1264 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1266 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
1267 of 'define' command.
1269 2018-06-14 Tom de Vries <tdevries@suse.de>
1272 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
1273 get_no_prettyformat_print_options.
1275 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
1277 * sparc-nat.h: Include target.h.
1278 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
1279 <fetch_registers>: Remove this argument in function call.
1280 <store_registers>: Remove this argument in function call, remove
1282 <low_forget_process>: Call sparc64_forget_process instead of
1283 sparc_forget_process.
1285 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1287 * procfs.c (_initialize_procfs): Use add_inf_child_target.
1288 (procfs_target::make_corefile_notes): Adjust to new
1289 target_read_alloc return type.
1291 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1292 Stephen Roberts <stephen.roberts@arm.com>
1295 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
1296 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
1297 Move should_notify_stop local into more inner scope.
1299 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1300 Stephen Roberts <stephen.roberts@arm.com>
1303 * infrun.c (resume_1): Add call to mark_async_event_handler.
1305 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1307 * infrun.c (do_target_wait): Change old version of $pc printed.
1309 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
1311 * dwarf2read.c (read_index_from_section): Rename to...
1312 (read_gdb_index_from_section): ... this, update all callers.
1313 (dwarf2_read_index): Rename to...
1314 (dwarf2_read_gdb_index): ... this, update all callers.
1316 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
1318 * gdb/hppa-linux-nat.c
1319 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
1320 hppa_linux_nat_target::fetch_registers.
1322 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1324 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
1325 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
1326 (AARCH64_DWARF_SVE_FFR): Likewise.
1327 (AARCH64_DWARF_SVE_P0): Likewise.
1328 (AARCH64_DWARF_SVE_Z0): Likewise.
1330 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1332 * common/common-regcache.h (raw_compare): New function.
1333 * regcache.c (regcache::raw_compare): Likewise.
1334 * regcache.h (regcache::raw_compare): New declaration.
1336 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1338 * common/common-regcache.h (reg_buffer_common): New structure.
1339 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
1340 (reg_buffer::raw_supply): Likewise.
1341 (reg_buffer::raw_supply_integer): Likewise.
1342 (reg_buffer::raw_supply_zeroed): Likewise.
1343 (reg_buffer::raw_collect): Likewise.
1344 (reg_buffer::raw_collect_integer): Likewise.
1345 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
1346 (reg_buffer::raw_supply): Likewise.
1347 (reg_buffer::raw_supply_integer): Likewise.
1348 (reg_buffer::raw_supply_zeroed): Likewise.
1349 (reg_buffer::raw_collect): Likewise.
1350 (reg_buffer::raw_collect_integer): Likewise.
1352 2018-06-10 Tom Tromey <tom@tromey.com>
1354 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
1355 (class remote_state) <stop_reply_queue>: Now std::vector.
1356 (remote_state::~remote_state)
1357 (remote_target::stop_reply_queue_length): Update.
1358 (struct queue_iter_param, remove_child_of_pending_fork)
1359 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
1360 (check_pending_event_prevents_wildcard_vcont_callback)
1361 (remove_stop_reply_for_inferior)
1362 (remove_stop_reply_of_remote_state)
1363 (remote_notif_remove_once_on_match)
1364 (stop_reply_match_ptid_and_ws)
1365 (remote_kill_child_of_pending_fork): Remove.
1366 (remote_target::remove_new_fork_children)
1367 (remote_target::check_pending_events_prevent_wildcard_vcont)
1368 (remote_target::discard_pending_stop_replies)
1369 (remote_target::discard_pending_stop_replies_in_queue)
1370 (remote_target::remote_notif_remove_queued_reply)
1371 (remote_target::queued_stop_reply)
1372 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
1373 (remote_target::wait, remote_target::kill_new_fork_children)
1374 (remote_target::async): Update.
1376 2018-06-10 Tom Tromey <tom@tromey.com>
1378 * record-full.c (record_full_arch_list_cleanups): Remove.
1379 (record_full_message): Use try/catch.
1380 (record_full_wait_cleanups): Remove.
1381 (record_full_wait_1): Use try/catch.
1382 (record_full_restore): Likewise.
1384 2018-06-10 Tom Tromey <tom@tromey.com>
1386 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
1387 declare VEC. Add constructor.
1388 <in_target_beneath>: Now bool.
1389 (record_full_breakpoints): Now a std::vector, static.
1390 (record_full_sync_record_breakpoints)
1391 (record_full_init_record_breakpoints)
1392 (record_full_target::insert_breakpoint)
1393 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
1395 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
1397 * dwarf2read.c (process_cu_includes): Remove struct keyword.
1398 * serial.c (serial_interface_lookup): Remove struct keyword.
1400 2018-06-10 Tom Tromey <tom@tromey.com>
1402 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
1404 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
1406 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
1408 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
1409 "beneath" as a method.
1410 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
1411 Use "beneath" as a method.
1413 2018-06-10 Tom Tromey <tom@tromey.com>
1415 * tracefile.c (struct trace_file_writer_deleter): New.
1416 <operator()>: Rename from trace_file_writer_xfree.
1417 (trace_file_writer_up): New typedef.
1418 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
1420 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1422 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
1423 <m_registers, m_register_status>: Change type to
1425 * regcache.c (reg_buffer::reg_buffer): Use new instead of
1428 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1430 * common/common-regcache.h (enum register_status): Add
1431 underlying type "signed char".
1432 * regcache.h (reg_buffer) <m_register_status>: Change type to
1434 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
1435 register_status instead of signed char.
1436 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
1437 (reg_buffer::get_register_status): Remove cast.
1438 (readable_regcache::raw_read): Remove cast.
1439 (readable_regcache::cooked_read): Remove cast.
1441 2018-06-09 Tom Tromey <tom@tromey.com>
1443 * source.c (reverse_search_command, forward_search_command): Use
1446 2018-06-09 Tom Tromey <tom@tromey.com>
1448 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
1449 (serial_ops_list): Now static, std::vector.
1450 (serial_interface_lookup, serial_add_interface): Update.
1452 2018-06-09 Tom Tromey <tom@tromey.com>
1454 * dwarf2read.c (process_cu_includes): Update.
1455 (process_full_comp_unit): Update.
1456 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
1459 2018-06-08 Paul Koning <paul_koning@dell.com>
1463 * python/python.c (do_start_initialization):
1464 Avoid call to internal Python API.
1465 (init__gdb_module): New function.
1467 2018-06-08 Gary Benson <gbenson@redhat.com>
1469 * linux-thread-db.c (valprint.h): New include.
1470 (struct check_thread_db_info): New structure.
1471 (check_thread_db_on_load, tdb_testinfo): New static globals.
1472 (check_thread_db, check_thread_db_callback): New functions.
1473 (try_thread_db_load_1): Run integrity checks if requested.
1474 (maintenance_check_libthread_db): New function.
1475 (_initialize_thread_db): Register "maint check libthread-db"
1476 and "maint set/show check-libthread-db".
1477 * NEWS: Mention the above new commands.
1479 2018-06-08 Tom Tromey <tom@tromey.com>
1481 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
1484 2018-06-08 Tom Tromey <tom@tromey.com>
1486 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
1488 2018-06-08 Tom Tromey <tom@tromey.com>
1490 * common/btrace-common.h (struct btrace_data): Add constructor,
1491 destructor, move assignment operator.
1492 <empty, clear, fini>: New methods.
1493 <format>: Initialize.
1494 (btrace_data_init, btrace_data_fini, btrace_data_clear)
1495 (btrace_data_empty): Don't declare.
1496 * common/btrace-common.c (btrace_data_init): Remove.
1497 (btrace_data::fini): Rename from btrace_data_fini.
1498 (btrace_data::empty): Rename from btrace_data_empty.
1499 (btrace_data::clear): Rename from btrace_data_clear. Return
1501 * btrace.h (make_cleanup_btrace_data): Don't declare.
1502 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
1503 (parse_xml_btrace): Update.
1504 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
1505 (maint_btrace_clear_packet_history_cmd): Update.
1507 2018-06-07 Pedro Alves <palves@redhat.com>
1509 * target.h (target_ops) <beneath>: Now a method. All references
1511 (class target_stack): New.
1512 * target.c (g_target_stack): New.
1513 (g_current_top_target): Delete.
1514 (current_top_target): Get the top target out of g_target_stack.
1515 (target_stack::push, target_stack::unpush): New.
1516 (push_target, unpush_target): Reimplement.
1517 (target_is_pushed): Reimplement in terms of g_target_stack.
1518 (target_ops::beneath, target_stack::find_beneath): New.
1520 2018-06-07 Pedro Alves <palves@redhat.com>
1522 * target.h (find_target_beneath): Delete declaration.
1523 * target.c (find_target_beneath): Delete definition.
1524 * aix-thread.c: All callers of find_target_beneath adjusted to
1525 call target_ops::beneath instead.
1526 * bsd-uthread.c: Likewise.
1527 * linux-thread-db.c: Likewise.
1528 * ravenscar-thread.c: Likewise.
1529 * sol-thread.c: Likewise.
1530 * spu-multiarch.c: Likewise.
1532 2018-06-07 Pedro Alves <palves@redhat.com>
1534 * target.h (target_ops) <beneath>: Now a method. All references
1536 (target_ops) <m_beneath>: New.
1537 * target.c (target_ops::beneath): New.
1538 * corelow.c: Adjust all references to target_ops::beneath.
1539 * linux-thread-db.c: Likewise.
1540 * make-target-delegates: Likewise.
1541 * record-btrace.c: Likewise.
1542 * record-full.c: Likewise.
1543 * remote.c: Likewise.
1544 * target.c: Likewise.
1545 * target-delegates.c: Regenerate.
1547 2018-06-07 Pedro Alves <palves@redhat.com>
1549 * target.h (target_stack): Delete.
1550 (current_top_target): Declare function.
1551 * target.c (target_stack): Delete.
1552 (g_current_top_target): New.
1553 (current_top_target): New function.
1554 * auxv.c: Use current_top_target instead of target_stack
1556 * avr-tdep.c: Likewise.
1557 * breakpoint.c: Likewise.
1558 * corefile.c: Likewise.
1559 * elfread.c: Likewise.
1561 * exceptions.c: Likewise.
1562 * frame.c: Likewise.
1563 * gdbarch-selftests.c: Likewise.
1564 * gnu-v3-abi.c: Likewise.
1565 * ia64-tdep.c: Likewise.
1566 * ia64-vms-tdep.c: Likewise.
1567 * infcall.c: Likewise.
1568 * infcmd.c: Likewise.
1569 * infrun.c: Likewise.
1570 * linespec.c: Likewise.
1571 * linux-tdep.c: Likewise.
1572 * minsyms.c: Likewise.
1573 * ppc-linux-nat.c: Likewise.
1574 * ppc-linux-tdep.c: Likewise.
1575 * procfs.c: Likewise.
1576 * regcache.c: Likewise.
1577 * remote.c: Likewise.
1578 * rs6000-tdep.c: Likewise.
1579 * s390-linux-nat.c: Likewise.
1580 * s390-tdep.c: Likewise.
1581 * solib-aix.c: Likewise.
1582 * solib-darwin.c: Likewise.
1583 * solib-dsbt.c: Likewise.
1584 * solib-spu.c: Likewise.
1585 * solib-svr4.c: Likewise.
1586 * solib-target.c: Likewise.
1587 * sparc-tdep.c: Likewise.
1588 * sparc64-tdep.c: Likewise.
1589 * spu-tdep.c: Likewise.
1590 * symfile.c: Likewise.
1591 * symtab.c: Likewise.
1592 * target-descriptions.c: Likewise.
1593 * target-memory.c: Likewise.
1594 * target.c: Likewise.
1595 * target.h: Likewise.
1596 * tracefile-tfile.c: Likewise.
1597 * tracepoint.c: Likewise.
1598 * valops.c: Likewise.
1599 * valprint.c: Likewise.
1600 * value.c: Likewise.
1601 * windows-tdep.c: Likewise.
1602 * mi/mi-main.c: Likewise.
1604 2018-06-07 Tom Tromey <tom@tromey.com>
1606 * valprint.h (build_address_symbolic): Declare.
1607 * printcmd.c (print_address_symbolic): Update.
1608 (build_address_symbolic): Change "name" and "filename" to
1610 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
1612 * defs.h (build_address_symbolic): Remove declaration.
1614 2018-06-07 Alan Hayward <alan.hayward@arm.com>
1616 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
1617 (aarch64_vnv_type): Add function.
1618 (aarch64_pseudo_register_name): Add V regs for SVE.
1619 (aarch64_pseudo_register_type): Likewise.
1620 (aarch64_pseudo_register_reggroup_p): Likewise.
1621 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
1622 (aarch64_pseudo_read_value): Add V regs for SVE.
1623 (aarch64_pseudo_write_2): Use V0 offset for SVE
1624 (aarch64_pseudo_write): Add V regs for SVE.
1625 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
1627 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
1629 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
1630 (sve_vl_from_vq): Likewise.
1632 2018-06-05 Tom Tromey <tom@tromey.com>
1634 * cli/cli-cmds.c (show_version): Update.
1635 * top.c (print_gdb_version): Add "interactive" parameter.
1637 * main.c (captured_main_1): Update.
1638 * top.h (print_gdb_version): Add "interactive" parameter and a
1641 2018-06-05 David Malcolm <dmalcolm@redhat.com>
1643 * common/enum-flags.h: Add trailing semicolon to example in
1646 2018-06-05 Tom Tromey <tom@tromey.com>
1649 * NEWS: Add entry about pager.
1650 * utils.c (pagination_disabled_for_command): New global.
1651 (prompt_for_continue): Allow "c" response to prompt.
1652 (reinitialize_more_filter): Clear
1653 pagination_disabled_for_command.
1654 (fputs_maybe_filtered): Check pagination_disabled_for_command.
1656 2018-06-04 Tom Tromey <tom@tromey.com>
1658 * ada-lang.h (ada_lookup_symbol_list): Update.
1659 * ada-lang.c (resolve_subexp): Update.
1660 (symbols_are_identical_enums): Change type of syms. Remove nsyms
1662 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
1663 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
1664 results parameter to std::vector.
1665 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
1667 * ada-exp.y (block_lookup): Update.
1668 (select_possible_type_sym): Change type of syms. Remove nsyms
1670 (write_var_or_type, write_name_assoc): Update.
1672 2018-06-04 Joel Brobecker <brobecker@adacore.com>
1674 * windows-nat.c (windows_nat_target::xfer_partial): Return
1675 TARGET_XFER_E_IO if we need to delegate to the target beneath
1676 but BENEATH is NULL.
1678 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
1680 * Makefile.in (config.status): Add configure.nat as a
1683 2018-06-04 Tom Tromey <tom@tromey.com>
1685 * cp-name-parser.y (cpname_state): Add method declarations.
1686 (HANDLE_QUAL): Update.
1687 (cpname_state::d_grab, cpname_state::fill_comp)
1688 (cpname_state::make_operator, cpname_state::make_dtor)
1689 (cpname_state::make_builtin_type, cpname_state::make_name)
1690 (cpname_state::d_qualify, cpname_state::d_int_type)
1691 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
1692 (%union): Move earlier.
1694 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1696 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
1698 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1700 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
1701 (aarch64_pseudo_write_1): Likewise.
1702 (aarch64_pseudo_read_value): Use helper.
1703 (aarch64_pseudo_write): Likewise.
1705 2018-06-04 Pedro Alves <palves@redhat.com>
1707 * darwin-nat.c (darwin_ops): Delete.
1708 (darwin_attach_pid): Use get_native_target.
1710 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1712 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
1713 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
1715 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1717 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
1718 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
1719 (aarch64_gdbarch_init): Check for SVE.
1720 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
1722 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1724 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
1725 * aarch64-tdep.h (aarch64_read_description): Likewise.
1726 * arch/aarch64.c (aarch64_create_target_description): Likewise.
1727 * arch/aarch64.h (aarch64_create_target_description): Likewise.
1728 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
1729 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
1730 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
1732 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
1734 * value.c (value_fetch_lazy_bitfield): New.
1735 (value_fetch_lazy_memory): New.
1736 (value_fetch_lazy_register): New.
1737 (value_fetch_lazy): Factor out to smaller functions.
1739 2018-06-01 Tom Tromey <tom@tromey.com>
1741 * cp-name-parser.y (backslashable, represented): Now const.
1743 2018-06-01 Tom Tromey <tom@tromey.com>
1745 * cp-name-parser.y: Include parser-defs.h.
1746 (parser_fprintf): Remove declaration.
1748 2018-06-01 Tom Tromey <tom@tromey.com>
1750 * cp-name-parser.y: Use %pure-parser, %lex-param, and
1752 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
1753 (global_result): Remove globals.
1754 (struct cpname_state): New.
1755 (yyparse): Don't declare.
1756 (yylex, yyerror): Move declarations after %union.
1757 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
1758 (make_name): Add state parameter.
1760 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
1762 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
1764 (yylex): Add lvalp, state parameters.
1765 (yyerror): Add state parameter.
1766 (cp_demangled_name_to_comp): Update.
1768 2018-06-01 Tom Tromey <tom@tromey.com>
1770 * cp-name-parser.y (parser_fprintf): Declare.
1771 (GDB_YY_REMAP_PREFIX): Define.
1772 Include yy-remap.h. Don't redefine yy* identifiers.
1774 2018-06-01 Tom Tromey <tom@tromey.com>
1776 * python/py-type.c (typy_legacy_template_argument): Update.
1777 * cp-support.h (cp_demangled_name_to_comp): Update.
1778 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
1779 parameter to be a "std::string *".
1782 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1784 * ada-lex.l: Include "diagnostics.h" instead of
1785 "common/diagnostics.h".
1786 * unittests/environ-selftests.c: Likewise.
1787 * common/diagnostics.h: Moved to ../include.
1789 2018-06-01 Joel Brobecker <brobecker@adacore.com>
1791 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
1792 to language_mode_manual while calling breakpoint_re_set_one.
1794 2018-06-01 Tom Tromey <tom@tromey.com>
1796 * valops.c (value_cast_structs, destructor_name_p): Update.
1797 * symtab.c (gdb_mangle_name): Update.
1798 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
1800 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
1801 (pascal_object_print_value_fields, pascal_object_print_value):
1803 * p-typeprint.c (pascal_type_print_derivation_info): Update.
1804 * linespec.c (find_methods): Update.
1805 * gdbtypes.h (type_name_no_tag): Remove.
1806 (type_name_or_error): Rename from type_name_no_tag_or_error.
1807 * gdbtypes.c (type_name_no_tag): Remove.
1808 (type_name_or_error): Rename from type_name_no_tag_or_error.
1809 (lookup_struct_elt_type, check_typedef): Update.
1810 * expprint.c (print_subexp_standard): Update.
1811 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
1812 * d-namespace.c (d_lookup_nested_symbol): Update.
1813 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
1814 (cp_print_class_member): Update.
1815 * cp-namespace.c (cp_lookup_nested_symbol): Update.
1816 * completer.c (add_struct_fields): Update.
1817 * c-typeprint.c (cp_type_print_derivation_info)
1818 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
1820 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
1821 (ada_prefer_type, ada_is_exception_sym): Update.
1823 2018-06-01 Tom Tromey <tom@tromey.com>
1825 * valops.c (enum_constant_from_type, value_namespace_elt)
1826 (value_maybe_namespace_elt): Update.
1827 * valarith.c (find_size_for_pointer_math): Update.
1828 * target-descriptions.c (make_gdb_type): Update.
1829 * symmisc.c (print_symbol): Update.
1830 * stabsread.c (define_symbol, read_type)
1831 (complain_about_struct_wipeout, add_undefined_type)
1832 (cleanup_undefined_types_1): Update.
1833 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
1834 (rust_range_type_p, val_print_struct, rust_print_struct_def)
1835 (rust_internal_print_type, rust_composite_type)
1836 (rust_evaluate_funcall, rust_evaluate_subexp)
1837 (rust_inclusive_range_type_p): Update.
1838 * python/py-type.c (typy_get_tag): Update.
1839 * p-typeprint.c (pascal_type_print_base): Update.
1840 * mdebugread.c (parse_symbol, parse_type): Update.
1841 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
1843 * guile/scm-type.c (gdbscm_type_tag): Update.
1844 * go-lang.c (sixg_string_p): Update.
1845 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
1847 * gdbtypes.h (struct main_type) <tag_name>: Remove.
1848 (TYPE_TAG_NAME): Remove.
1849 * gdbtypes.c (type_name_no_tag): Simplify.
1850 (check_typedef, check_types_equal, recursive_dump_type)
1851 (copy_type_recursive, arch_composite_type): Update.
1852 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
1853 in summary mode when needed.
1854 * eval.c (evaluate_funcall): Update.
1855 * dwarf2read.c (fixup_go_packaging, read_structure_type)
1856 (process_structure_scope, read_enumeration_type)
1857 (read_namespace_type, read_module_type, determine_prefix): Update.
1858 * cp-support.c (inspect_type): Update.
1859 * coffread.c (process_coff_symbol, decode_base_type): Update.
1860 * c-varobj.c (c_is_path_expr_parent): Update.
1861 * c-typeprint.c (c_type_print_base_struct_union): Update.
1862 (c_type_print_base_1): Update. Print struct/class/union/enum in
1863 summary when using C language.
1864 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
1865 (gen_maybe_namespace_elt): Update.
1866 * ada-lang.c (ada_type_name): Simplify.
1867 (empty_record, ada_template_to_fixed_record_type_1)
1868 (template_to_static_fixed_type)
1869 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
1871 2018-06-01 Tom Tromey <tom@tromey.com>
1873 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
1875 * c-typeprint.c (c_print_type_1): Add "language" parameter.
1876 (c_print_type): Update.
1877 (c_print_type): New overload.
1878 (c_type_print_varspec_prefix, c_type_print_args)
1879 (c_type_print_varspec_suffix, c_print_type_no_offsets)
1880 (c_type_print_base_struct_union, c_type_print_base_1)
1881 (cp_type_print_method_args): Add "language" parameter.
1882 (c_type_print_base): Update.
1883 * c-lang.h (c_print_type): Add new overload.
1885 2018-06-01 Tom Tromey <tom@tromey.com>
1887 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
1888 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
1890 2018-06-01 Alan Hayward <alan.hayward@arm.com>
1892 * aarch64-tdep.c (aarch64_sve_register_names): New const
1894 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
1895 (AARCH64_SVE_Z_REGS_NUM): New define.
1896 (AARCH64_SVE_P_REGS_NUM): Likewise.
1897 (AARCH64_SVE_NUM_REGS): Likewise.
1899 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
1901 * nat/linux-ptrace.h [__alpha__]
1902 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
1905 2018-05-31 Maciej W. Rozycki <macro@mips.com>
1907 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
1908 the endianness selected.
1909 * NEWS: Document `set endian auto' mode operation update.
1911 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1913 * Makefile.in: Add new header.
1914 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
1915 (sve_vl_from_vg): Likewise.
1916 (sve_vq_from_vl): Likewise.
1917 (sve_vl_from_vq): Likewise.
1918 (sve_vq_from_vg): Likewise.
1919 (sve_vg_from_vq): Likewise.
1920 * configure.nat: Add new c file.
1921 * nat/aarch64-sve-linux-ptrace.c: New file.
1922 * nat/aarch64-sve-linux-ptrace.h: New file.
1924 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1926 * aarch64-linux-nat.c (aarch64_linux_read_description):
1928 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1930 * aarch64-tdep.c (tdesc_aarch64_list): Add.
1931 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
1932 (aarch64_gdbarch_init): Add parmeter zero.
1933 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
1934 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
1935 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
1937 * doc/gdb.texinfo: Describe SVE feature
1938 * features/aarch64-sve.c: New file.
1940 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
1943 * gdbarch.sh (significant_addr_bit): Default to zero when
1944 not set by target architecture.
1945 * gdbarch.c: Re-generated.
1946 * utils.c (address_significant): Update.
1948 2018-05-30 Joel Brobecker <brobecker@adacore.com>
1950 * stack.c (func_command): Remove trailing newline in call to error.
1952 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1954 * regcache.h (regcache_raw_collect): Remove, update callers to
1955 use regcache::raw_collect.
1956 * regcache.c (regcache_raw_collect): Remove.
1958 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1960 * regcache.h (regcache_raw_supply): Remove, update callers to
1961 use detached_regcache::raw_supply.
1962 * regcache.c (regcache_raw_supply): Remove.
1964 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1966 * regcache.h (regcache_cooked_write_part): Remove, update
1967 callers to use regcache::cooked_write_part.
1968 * regcache.c (regcache_cooked_write_part): Remove.
1970 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1972 * regcache.h (regcache_cooked_read_part): Remove, update callers
1973 to use readable_regcache::cooked_read_part.
1974 * regcache.c (regcache_cooked_read_part): Remove.
1976 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1978 * regcache.h (regcache_cooked_read_value): Remove, update
1979 callers to use readable_regcache::cooked_read_value.
1980 * regcache.c (regcache_cooked_read_value): Remove.
1982 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1984 * regcache.h (regcache_cooked_write): Remove, update callers to
1985 use regcache::cooked_write.
1986 * regcache.c (regcache_cooked_write): Remove.
1988 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1990 * regcache.h (regcache_invalidate): Remove, update callers to
1991 use detached_regcache::invalidate instead.
1992 * regcache.c (regcache_invalidate): Remove.
1994 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1996 * regcache.h (regcache_raw_write_part): Remove, update callers
1997 to use regcache::raw_write_part instead.
1998 * regcache.c (regcache_raw_write_part): Remove.
2000 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2002 * regcache.h (regcache_raw_read_part): Remove, update callers to
2003 use readable_regcache::raw_read_part instead.
2004 * regcache.c (regcache_raw_read_part): Remove.
2006 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2008 * regcache.h (regcache_cooked_read): Remove, update callers to
2009 use readable_regcache::cooked_read instead.
2010 * regcache.c (regcache_cooked_read): Remove.
2012 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2014 * regcache.h (regcache_raw_write): Remove, update callers to use
2015 regcache::raw_write instead.
2016 * regcache.c (regcache_raw_write): Remove.
2018 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2020 * regcache.h (regcache_raw_read): Remove, update callers to use
2021 readable_regcache::raw_read instead.
2022 * regcache.c (regcache_raw_read): Remove.
2024 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2026 * regcache.h (regcache_raw_update): Remove, update callers to
2027 use readable_regcache::raw_update instead.
2028 * regcache.c (regcache_raw_update): Remove.
2030 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2032 * regcache.h (regcache_register_status): Remove, update callers
2033 to use reg_buffer::get_register_status directly instead.
2034 * regcache.c (regcache_register_status): Remove.
2036 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2038 * regcache.h (regcache_get_ptid): Remove, update all callers to
2039 call regcache::ptid instead.
2040 * regcache.c (regcache_get_ptid): Remove.
2042 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2044 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2046 2018-05-30 Pedro Alves <palves@redhat.com>
2048 * common/common-exceptions.h (exception_rethrow): Use
2051 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
2053 * breakpoint.c (print_solib_event, check_status_catch_solib):
2054 Remove struct keyword in range-based for loops.
2055 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2056 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2058 * linespec.c (find_superclass_methods, search_minsyms_for_name):
2060 * symfile.c (addr_info_make_relative): Likewise.
2061 * thread.c (value_in_thread_stack_temporaries): Likewise.
2063 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
2066 * valops.c (value_struct_elt_for_reference): Call check_typedef on
2067 aggregate type to get its real type before accessing it.
2069 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
2071 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2072 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2073 * coff-pe-read.c (add_pe_forwarded_sym): Replace
2074 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2075 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2076 * jit.c (jit_breakpoint_re_set_internal): Likewise.
2077 * printcmd.c (info_address_command): Likewise.
2079 2018-05-29 Tom Tromey <tom@tromey.com>
2081 * windows-nat.c (handle_exception): Update fall-through comment.
2083 2018-05-29 Tom Tromey <tom@tromey.com>
2085 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
2086 (struct program_space) <added_solibs>: Now a std::vector.
2087 * breakpoint.c (print_solib_event): Update.
2088 (check_status_catch_solib): Update.
2089 * progspace.c (clear_program_space_solib_cache): Update.
2090 * solib.c (update_solib_list): Update.
2092 2018-05-29 Tom Tromey <tom@tromey.com>
2094 * python/py-type.c (typy_richcompare): Update.
2095 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
2096 * gdbtypes.h (types_deeply_equal): Return bool.
2097 (types_equal): Likewise.
2098 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
2100 (check_types_equal): Change worklist to std::vector. Return
2102 (struct type_equality_entry): Add constructor.
2103 (compare_maybe_null_strings): Return bool.
2104 (check_types_worklist): Return bool. Change worklist to
2106 (types_deeply_equal): Use std::vector.
2107 (types_equal): Return bool.
2108 (compare_maybe_null_strings): Simplify.
2110 2018-05-29 Tom Tromey <tom@tromey.com>
2112 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
2114 2018-05-29 Tom Tromey <tom@tromey.com>
2116 * objc-lang.h: Don't include cp-support.h.
2117 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
2120 2018-05-27 Tom Tromey <tom@tromey.com>
2122 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
2124 2018-05-25 Tom Tromey <tom@tromey.com>
2126 * value.c (value::location): Initialize.
2128 2018-05-25 Tom Tromey <tom@tromey.com>
2130 * dbxread.c (init_bincl_list): Remove.
2131 (bincl_list): Now a std::vector.
2132 (bincls_allocated, next_bincl): Remove.
2133 (free_bincl_list, do_free_bincl_list_cleanup)
2134 (make_cleanup_free_bincl_list): Remove.
2135 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2137 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2138 (struct header_file_location): Add constructor.
2139 (add_bincl_to_list): Remove.
2141 2018-05-25 Tom Tromey <tom@tromey.com>
2143 * tui/tui.c (tui_enable): Update.
2144 * mi/mi-interp.c (mi_interp::init): Update.
2145 * interps.h (class interp) <name>: New method.
2146 <m_name>: Rename from name.
2147 (~scoped_restore_interp): Update.
2148 * interps.c (interp::interp): Update.
2149 (interp_add, interp_set, interp_lookup_existing)
2150 (current_interp_named_p): Update.
2152 2018-05-25 Tom Tromey <tom@tromey.com>
2154 * interps.c (interp_name): Remove.
2155 * mi/mi-interp.c (mi_interp::init): Update.
2156 * interps.h (interp_name): Remove.
2157 (~scoped_restore_interp): Update.
2158 * tui/tui.c (tui_enable): Update.
2160 2018-05-25 Tom Tromey <tom@tromey.com>
2162 * utils.c (fputs_maybe_filtered): Update.
2163 * linespec.c (decode_line_full): Update.
2164 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2165 (mi_print_breakpoint_for_event, mi_solib_loaded)
2166 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2167 (mi_user_selected_context_changed): Update.
2168 * mi/mi-main.c (mi_execute_command): Update.
2169 * cli/cli-script.c (execute_control_command): Update.
2170 * python/python.c (execute_gdb_command): Update.
2171 * solib.c (info_sharedlibrary_command): Update.
2172 * interps.c (interp_ui_out): Remove.
2173 * interps.h (interp_ui_out): Remove.
2175 2018-05-25 Tom Tromey <tom@tromey.com>
2177 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2178 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2179 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2181 2018-05-25 Tom Tromey <tom@tromey.com>
2183 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2184 * interps.c (interp_exec): Use scoped_restore.
2186 2018-05-25 Tom Tromey <tom@tromey.com>
2188 * remote.c (remote_target::remote_file_get): Use
2190 (remote_target::remote_file_put): Likewise.
2192 2018-05-25 Tom Tromey <tom@tromey.com>
2194 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2196 (get_pe_section_index, add_pe_exported_sym): Update.
2197 (read_pe_exported_syms): Use gdb::def_vector.
2199 2018-05-25 Tom Tromey <tom@tromey.com>
2201 * frame.c (remove_prev_frame): Remove.
2202 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2204 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2206 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2208 * mips-linux-nat.c (supply_fpregset): Always call
2209 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2210 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2211 `mips_fill_fpregset'.
2212 * mips-linux-tdep.c (mips_supply_fpregset)
2213 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2214 (mips_fill_fpregset_wrapper): Remove functions.
2215 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2216 (mips_linux_fpregset): Remove variable.
2217 (mips_linux_iterate_over_regset_sections): Use
2218 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2219 (mips_linux_o32_sigframe_init): Remove comment.
2221 2018-05-25 Pedro Alves <palves@redhat.com>
2223 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2224 (struct readahead_cache, struct packet_reg, struct
2225 remote_arch_state, class remote_state): Move higher up in the
2227 (remote_target::m_remote_state): Now an object instead of a pointer.
2228 (remote_target::get_remote_state): Adjust.
2230 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2232 * stack.c (select_and_print_frame): Delete.
2233 (struct function_bounds): Move struct within function.
2234 (func_command): Most content moved into new function
2235 find_frame_for_function, use new function, print result, add
2237 (find_frame_for_function): New function, now returns a result.
2239 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2241 * stack.c (iterate_over_block_arg_vars): Fix comment.
2242 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2244 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2248 (scoped_restore_selected_frame::scoped_restore_selected_frame):
2250 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
2252 * frame.h (class scoped_restore_selected_frame): New class.
2253 * stack.c (print_frame_local_vars): Remove catching and rethrowing
2254 of any exception, use scoped_restore_selected_frame to restore the
2257 2018-05-24 Pedro Alves <palves@redhat.com>
2259 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
2262 2018-05-23 Tom Tromey <tom@tromey.com>
2264 * complaints.c (struct complaints): Remove.
2265 (symfile_complaint_book): Remove.
2266 (series): New global.
2267 (complaint_internal): Update.
2268 (clear_complaints): Update.
2270 2018-05-23 Tom Tromey <tom@tromey.com>
2272 * complaints.c (counters): New global.
2273 (struct complain): Remove.
2274 (struct complaints) <root>: Remove.
2275 (complaint_sentinel): Remove.
2276 (symfile_complaint_book): Update.
2277 (find_complaint) Remove.
2278 (complaint_internal, clear_complaints): Update.
2280 2018-05-23 Tom Tromey <tom@tromey.com>
2282 * complaints.c (struct complain) <file, line>: Remove.
2283 (find_complaint): Remove file, line parameters.
2284 (complaint_internal): Update.
2286 2018-05-23 Tom Tromey <tom@tromey.com>
2288 * complaints.c (vcomplaint): Remove.
2289 (complaint_internal) Merge in contents of vcomplaint.
2291 2018-05-23 Tom Tromey <tom@tromey.com>
2293 * complaints.c (struct complaints) <explanation>: Remove.
2294 (symfile_explanations): Remove.
2295 (symfile_complaint_book): Update.
2296 (vcomplaint): Update.
2297 (struct explanation): Remove.
2299 2018-05-23 Tom Tromey <tom@tromey.com>
2301 * complaints.c (symfile_complaints): Remove.
2302 (complaint_internal): Remove "complaints" parameter.
2303 (clear_complaints, vcomplaint): Remove "c" parameter.
2304 (get_complaints): Remove.
2305 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
2306 (dwarf2_debug_line_missing_file_complaint)
2307 (dwarf2_debug_line_missing_end_sequence_complaint)
2308 (dwarf2_complex_location_expr_complaint)
2309 (dwarf2_const_value_length_mismatch_complaint)
2310 (dwarf2_section_buffer_overflow_complaint)
2311 (dwarf2_macro_malformed_definition_complaint)
2312 (dwarf2_invalid_attrib_class_complaint)
2313 (create_addrmap_from_index, dw2_symtab_iter_next)
2314 (dw2_expand_marked_cus)
2315 (dw2_debug_names_iterator::find_vec_in_debug_names)
2316 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
2317 (create_debug_type_hash_table, init_cutu_and_read_dies)
2318 (partial_die_parent_scope, add_partial_enumeration)
2319 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
2320 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
2321 (read_import_statement, read_file_scope, create_dwo_cu_reader)
2322 (create_cus_hash_table, create_dwp_hash_table)
2323 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
2324 (dwarf2_rnglists_process, dwarf2_ranges_process)
2325 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
2326 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
2327 (handle_struct_member_die, process_structure_scope)
2328 (read_array_type, read_common_block, read_module_type)
2329 (read_tag_pointer_type, read_typedef, read_base_type)
2330 (read_subrange_type, load_partial_dies, partial_die_info::read)
2331 (partial_die_info::read, partial_die_info::read)
2332 (partial_die_info::read, read_checked_initial_length_and_offset)
2333 (dwarf2_string_attr, read_formatted_entries)
2334 (dwarf_decode_line_header)
2335 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2336 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
2337 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
2338 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2339 (get_signatured_type, get_DW_AT_signature_type)
2340 (decode_locdesc, file_file_name, consume_improper_spaces)
2341 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
2342 (dwarf_decode_macro_bytes, dwarf_decode_macros)
2343 (dwarf2_symbol_mark_computed, set_die_type)
2344 (read_attribute_value): Update.
2345 * stap-probe.c (handle_stap_probe, get_stap_base_address):
2347 * dbxread.c (unknown_symtype_complaint)
2348 (lbrac_mismatch_complaint, repeated_header_complaint)
2349 (set_namestring, function_outside_compilation_unit_complaint)
2350 (read_dbx_symtab, process_one_symbol): Update.
2351 * gdbtypes.c (stub_noname_complaint): Update.
2352 * windows-nat.c (handle_unload_dll): Update.
2353 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
2354 (decode_base_type): Update.
2355 * xcoffread.c (bf_notfound_complaint, ef_complaint)
2356 (eb_complaint, record_include_begin, record_include_end)
2357 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
2358 (process_xcoff_symbol, read_symbol)
2359 (function_outside_compilation_unit_complaint)
2360 (scan_xcoff_symtab): Update.
2361 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
2362 * buildsym.c (finish_block_internal, make_blockvector)
2363 (end_symtab_get_static_block, augment_type_symtab): Update.
2364 * dtrace-probe.c (dtrace_process_dof)
2365 (dtrace_static_probe_ops::get_probes): Update.
2366 * complaints.h (struct complaint): Don't declare.
2367 (symfile_complaints): Remove.
2368 (complaint_internal): Remove "complaints" parameter.
2369 (complaint): Likewise.
2370 (clear_complaints): Likewise.
2371 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2372 (reread_symbols): Update.
2373 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2374 (dwarf2_frame_cache, decode_frame_entry): Update.
2375 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
2376 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2377 (info_selectors_command): Update.
2378 * macrotab.c (macro_include, check_for_redefinition)
2379 (macro_undef): Update.
2380 * objfiles.c (filter_overlapping_sections): Update.
2381 * stabsread.c (invalid_cpp_abbrev_complaint)
2382 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
2383 (define_symbol, error_type, read_type, rs6000_builtin_type)
2384 (stabs_method_name_from_physname, read_member_functions)
2385 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
2386 (attach_fields_to_type, complain_about_struct_wipeout)
2387 (read_range_type, read_args, common_block_start)
2388 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
2390 * mdebugread.c (index_complaint, unknown_ext_complaint)
2391 (basic_type_complaint, bad_tag_guess_complaint)
2392 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
2393 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
2394 (parse_procedure, parse_lines)
2395 (function_outside_compilation_unit_complaint)
2396 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
2397 (bad_tag_guess_complaint, reg_value_complaint): Update.
2398 * cp-support.c (demangled_name_complaint): Update.
2399 * macroscope.c (sal_macro_scope): Update.
2400 * dwarf-index-write.c (class debug_names): Update.
2402 2018-05-23 Tom Tromey <tom@tromey.com>
2404 * complaints.c (clear_complaints): Remove "noisy" parameter.
2405 * complaints.h (clear_complaints): Update.
2406 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2407 (reread_symbols): Update.
2409 2018-05-23 Tom Tromey <tom@tromey.com>
2411 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
2413 (vcomplaint, clear_complaints): Update.
2414 (symfile_explanations): Remove some messages.
2416 2018-05-23 Tom Tromey <tom@tromey.com>
2418 * complaints.c (internal_complaint): Remove.
2419 * complaints.h (internal_complaint): Remove.
2421 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2423 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
2425 2018-05-22 Pedro Alves <palves@redhat.com>
2427 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
2428 (remote_fileio_badfd, remote_fileio_return_errno)
2429 (remote_fileio_return_success, remote_fileio_func_open)
2430 (remote_fileio_func_open, remote_fileio_func_close)
2431 (remote_fileio_func_read, remote_fileio_func_write)
2432 (remote_fileio_func_lseek, remote_fileio_func_rename)
2433 (remote_fileio_func_unlink, remote_fileio_func_stat)
2434 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
2435 (remote_fileio_func_isatty, remote_fileio_func_system): Add
2436 remote_target parameter.
2437 (remote_fio_func_map) <func>: Add remote_target parameter.
2438 (do_remote_fileio_request, remote_fileio_request):
2439 * remote-fileio.h (remote_fileio_request):
2440 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
2441 remote_target parameter.
2442 (remote_notif_process, handle_notification): Adjust to pass down
2444 (remote_notif_state_allocate): Add remote_target parameter. Save
2446 * remote-notif.h (struct remote_target): Forward declare.
2447 (struct notif_client) <parse, ack, can_get_pending_events>: Add
2448 remote_target parameter.
2449 (struct remote_notif_state) <remote>: New field.
2450 (remote_notif_ack, remote_notif_parse): Add remote_target
2452 (remote_notif_state_allocate, remote_notif_state_allocate): Add
2453 remote_target parameter.
2454 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
2455 (threads_listing_context, rmt_thread_action, protocol_feature)
2456 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
2457 (packet_result, struct threads_listing_context, remote_state):
2458 Move definitions and declarations higher up.
2459 (remote_target) <~remote_target>: Declare.
2460 (remote_download_command_source, remote_file_put, remote_file_get)
2461 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
2462 (remote_hostio_pread_vFile, remote_hostio_send_command)
2463 (remote_hostio_set_filesystem, remote_hostio_open)
2464 (remote_hostio_close, remote_hostio_unlink, remote_state)
2465 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
2466 (get_memory_write_packet_size, get_memory_read_packet_size)
2467 (append_pending_thread_resumptions, remote_detach_1)
2468 (append_resumption, remote_resume_with_vcont)
2469 (add_current_inferior_and_thread, wait_ns, wait_as)
2470 (process_stop_reply, remote_notice_new_inferior)
2471 (process_initial_stop_replies, remote_add_thread)
2472 (btrace_sync_conf, remote_btrace_maybe_reopen)
2473 (remove_new_fork_children, kill_new_fork_children)
2474 (discard_pending_stop_replies, stop_reply_queue_length)
2475 (check_pending_events_prevent_wildcard_vcont)
2476 (discard_pending_stop_replies_in_queue, stop_reply)
2477 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
2478 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
2479 (remote_interrupt_as, remote_interrupt_ns)
2480 (remote_get_noisy_reply, remote_query_attached)
2481 (remote_add_inferior, remote_current_thread, get_current_thread)
2482 (set_thread, set_general_thread, set_continue_thread)
2483 (set_general_process, write_ptid)
2484 (remote_unpack_thread_info_response, remote_get_threadinfo)
2485 (parse_threadlist_response, remote_get_threadlist)
2486 (remote_threadlist_iterator, remote_get_threads_with_ql)
2487 (remote_get_threads_with_qxfer)
2488 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
2489 (get_offsets, remote_check_symbols, remote_supported_packet)
2490 (remote_query_supported, remote_packet_size)
2491 (remote_serial_quit_handler, remote_detach_pid)
2492 (remote_vcont_probe, remote_resume_with_hc)
2493 (send_interrupt_sequence, interrupt_query)
2494 (remote_notif_get_pending_events, fetch_register_using_p)
2495 (send_g_packet, process_g_packet, fetch_registers_using_g)
2496 (store_register_using_P, store_registers_using_G)
2497 (set_remote_traceframe, check_binary_download)
2498 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
2499 (remote_xfer_live_readonly_partial, remote_read_bytes)
2500 (remote_send_printf, remote_flash_write, readchar)
2501 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
2502 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
2503 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
2504 (extended_remote_disable_randomization, extended_remote_run)
2505 (send_environment_packet, extended_remote_environment_support)
2506 (extended_remote_set_inferior_cwd, remote_write_qxfer)
2507 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
2508 (packet_command): Now methods of ...
2509 (remote_target): ... this class.
2510 (m_remote_state) <remote_target>: New field.
2511 (struct remote_state) <stop_reply_queue,
2512 remote_async_inferior_event_token, wait_forever_enabled_p>: New
2514 (remote_state::remote_state): Allocate stop_reply_queue.
2515 (remote_state): Delete global.
2516 (get_remote_state_raw): Delete.
2517 (remote_target::get_remote_state): Allocate m_remote_state on
2519 (get_current_remote_target): New.
2520 (remote_ops, extended_remote_ops): Delete.
2521 (wait_forever_enabled_p, remote_async_inferior_event_token):
2522 Delete, moved to struct remote_state.
2523 (remote_target::close): Delete self. Destruction bits split to
2525 (remote_target::~remote_target): ... this.
2526 (show_memory_packet_size): Adjust to use
2527 get_current_remote_target.
2528 (struct protocol_feature) <func>: Add remote_target parameter.
2529 All callers adjusted.
2530 (curr_quit_handler_target): New.
2531 (remote_serial_quit_handler): Reimplement.
2532 (remote_target::open_1): Adjust to use get_current_remote_target.
2533 Heap-allocate remote_target/extended_remote_target instances.
2534 (vcont_builder::vcont_builder): Add remote_target parameter, and
2535 save it in m_remote. All callers adjusted.
2536 (vcont_builder::m_remote): New field.
2537 (vcont_builder::restart, vcont_builder::flush)
2538 (vcont_builder::push_action): Use it.
2539 (remote_target::commit_resume): Use it.
2540 (struct queue_iter_param) <remote>: New field.
2541 (remote_target::remove_new_fork_children): Fill in 'remote' field.
2542 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
2543 (check_pending_event_prevents_wildcard_vcont_callback)
2544 (remote_target::check_pending_events_prevent_wildcard_vcont)
2545 (remote_target::discard_pending_stop_replies)
2546 (remote_target::discard_pending_stop_replies_in_queue)
2547 (remote_target::remote_notif_remove_queued_reply): Fill in
2549 (remote_notif_get_pending_events): New.
2550 (remote_target::readchar, remote_target::remote_serial_write):
2551 Save/restore curr_quit_handler_target.
2553 (kill_new_fork_children): Fill in 'remote' field.
2554 (packet_command): Use get_current_remote_target, defer to
2555 remote_target method of same name.
2556 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
2557 parameter, and save it in m_remote. All callers adjusted.
2558 (scoped_remote_fd::release): Use m_remote.
2559 (scoped_remote_fd::m_remote): New field.
2560 (remote_file_put, remote_file_get, remote_file_delete): Use
2561 get_current_remote_target, defer to remote_target method of same
2563 (remote_btrace_reset): Add remote_state paremeter. Update all
2565 (remote_async_inferior_event_handler). Pass down 'data'.
2566 (remote_new_objfile): Use get_current_remote_target.
2567 (remote_target::vcont_r_supported): New.
2568 (set_range_stepping): Use get_current_remote_target and
2569 remote_target::vcont_r_supported.
2570 (_initialize_remote): Don't allocate 'remote_state' and
2571 'stop_reply_queue' globals.
2572 * remote.h (struct remote_target): Forward declare.
2573 (getpkt, putpkt, remote_notif_get_pending_events): Add
2574 'remote_target' parameter.
2576 2018-05-22 Pedro Alves <palves@redhat.com>
2578 * remote.c (vcont_builder): Now a class. Make all data members
2580 (vcont_builder) <vcont_builder, restart, flush, push_action>:
2582 (vcont_builder_restart): Rename to ...
2583 (vcont_builder::restart): ... this.
2584 (vcont_builder_flush): Rename to ...
2585 (vcont_builder::flush): ... this.
2586 (vcont_builder_push_action): Rename to ...
2587 (vcont_builder::push_action): ... this.
2588 (remote_target::commit_resume): Adjust.
2590 2018-05-22 Pedro Alves <palves@redhat.com>
2592 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
2593 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
2594 (get_fixed_memory_packet_size): New.
2595 (get_memory_packet_size): Use it.
2596 (set_memory_packet_size): Don't override the config size with
2597 DEFAULT_MAX_MEMORY_PACKET_SIZE.
2598 (show_memory_packet_size): Use get_fixed_memory_packet_size.
2599 Don't refer to get_memory_packet_size if not connected to a remote
2600 target. Show "(default)" if configured size is 0.
2602 2018-05-22 Pedro Alves <palves@redhat.com>
2604 * remote.c (remote_target::mourn_inferior): Move
2605 discard_pending_stop_replies call here from ...
2606 (_initialize_remote): ... here.
2608 2018-05-22 Pedro Alves <palves@redhat.com>
2610 * remote.c (compare_section_command): Remove set_general_process
2613 2018-05-22 Pedro Alves <palves@redhat.com>
2615 * remote.c (struct packet_reg, struct remote_arch_state):
2616 Move higher up in the file.
2617 (remote_state) <m_arch_states>: Store remote_arch_state values
2618 instead of remote_arch_state pointers.
2619 (remote_state::get_remote_arch_state): Adjust.
2621 2018-05-22 Pedro Alves <palves@redhat.com>
2623 * remote.c: Include <unordered_map>.
2624 (remote_state): Now a class.
2625 (remote_state) <get_remote_arch_state>: Declare method.
2626 <get_remote_arch_state>: New field.
2627 (remote_arch_state) <remote_arch_state>: Declare ctor.
2628 <regs>: Now a unique_ptr.
2629 (remote_gdbarch_data_handle): Delete.
2630 (get_remote_arch_state): Delete.
2631 (remote_state::get_remote_arch_state): New.
2632 (get_remote_state): Adjust to call remote_state's
2633 get_remote_arch_state method.
2634 (init_remote_state): Delete, bits factored out to ...
2635 (remote_arch_state::remote_arch_state): ... this new method.
2636 (get_remote_packet_size, get_memory_packet_size)
2637 (process_g_packet, remote_target::fetch_registers)
2638 (remote_target::prepare_to_store, store_registers_using_G)
2639 (remote_target::store_registers, remote_target::get_trace_status):
2640 Adjust to call remote_state's method.
2641 (_initialize_remote): Remove reference to
2642 remote_gdbarch_data_handle.
2644 2018-05-22 Pedro Alves <palves@redhat.com>
2646 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
2647 pread>: New method declarations.
2648 (remote_target::open_1): Adjust.
2649 (readahead_cache_invalidate): Rename to ...
2650 (readahead_cache::invalidate): ... this, and adjust to be a class
2652 (readahead_cache_invalidate_fd): Rename to ...
2653 (readahead_cache::invalidate_fd): ... this, and adjust to be a
2655 (remote_hostio_pwrite): Adjust.
2656 (remote_hostio_pread_from_cache): Rename to ...
2657 (readahead_cache::pread): ... this, and adjust to be a class
2659 (remote_hostio_close): Adjust.
2661 2018-05-22 Pedro Alves <palves@redhat.com>
2663 * remote.c (remote_hostio_close_cleanup): Delete.
2664 (class scoped_remote_fd): New.
2665 (remote_file_put, remote_file_get): Use it.
2667 2018-05-22 Pedro Alves <palves@redhat.com>
2669 (struct vCont_action_support): Use bool and initialize all fields.
2670 (struct readahead_cache): Initialize all fields.
2671 (remote_state): Use bool and initialize all fields.
2672 (remote_state::remote_state, remote_state::~remote_state): New.
2673 (new_remote_state): Delete.
2674 (_initialize_remote): Use new to allocate remote_state.
2676 2018-05-22 Pedro Alves <palves@redhat.com>
2680 * c-exp.y: Include "c-support.h".
2681 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
2682 of tolower. Use c_ident_is_alpha to scan names.
2683 * c-lang.c: Include "c-support.h".
2684 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
2685 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
2686 * c-support.h: New file, with bits factored out from ...
2687 * cp-name-parser.y: ... this file.
2688 Include "c-support.h".
2689 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
2690 c-support.h and renamed.
2691 (symbol_end, yylex): Adjust.
2693 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2695 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
2696 parameter type to CORE_ADDR.
2697 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
2698 parameter type in declaration to CORE_ADDR.
2699 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
2700 target_auxv_search to get AT_HWCAP and use the result to get the
2702 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
2703 to CORE_ADDR. Remove the cast of the return value to unsigned
2704 long. Fix error predicate of target_auxv_search.
2705 (ppc_linux_nat_target::read_description): Change the type of the
2706 hwcap variable to CORE_ADDR.
2708 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2710 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
2711 if the size of fpscr is larger than 32 bits.
2713 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2715 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
2716 (ppc32_linux_vsxregmap): New global.
2717 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
2718 regcache_supply_regset, and regcache_collect_regset.
2719 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
2720 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
2721 (fetch_vsx_register, store_vsx_register): Remove.
2722 (fetch_vsx_registers): Add regno parameter. Get regset using
2723 ppc_linux_vsxregset. Use regset to supply registers.
2724 (store_vsx_registers): Add regno parameter. Get regset using
2725 ppc_linux_vsxregset. Use regset to collect registers.
2726 (fetch_register): Call fetch_vsx_registers instead of
2728 (store_register): Call store_vsx_registers instead of
2730 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
2731 new regno parameter.
2732 (store_ppc_registers): Call store_vsx_registers with -1 for the
2733 new regno parameter.
2734 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
2735 (ppc_collect_vsxregset): Remove.
2737 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2739 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
2741 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
2742 for vector register offset fields.
2743 (ppc64_fbsd_reg_offsets): Likewise.
2744 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2745 to vector register offset fields.
2746 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2747 to vector register offset fields.
2748 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
2749 vector register offset fields.
2750 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
2751 initializers for vector register offset fields.
2752 (rs6000_aix64_reg_offsets): Likewise.
2753 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
2754 (ppc_supply_vrregset): Remove.
2755 (ppc_collect_vrregset): Remove.
2756 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
2757 (ppc_linux_vrregset) : New function.
2758 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
2759 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
2760 (ppc32_linux_vrregset): Remove.
2761 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
2762 and use result instead of ppc32_linux_vrregset.
2763 (ppc32_linux_reg_offsets): Remove initializers for vector register
2765 (ppc64_linux_reg_offsets): Likewise.
2766 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
2767 * ppc-linux-nat.c: Include regset.h.
2768 (gdb_vrregset_t): Adjust comment to account for little-endian
2770 (supply_vrregset, fill_vrregset): Remove.
2771 (fetch_altivec_register, store_altivec_register): Remove.
2772 (fetch_altivec_registers): Add regno parameter. Get regset using
2773 ppc_linux_vrregset. Use regset to supply registers.
2774 (store_altivec_registers): Add regno parameter. Get regset using
2775 ppc_linux_vrregset. Use regset to collect registers.
2776 (fetch_register): Call fetch_altivec_registers instead of
2777 fetch_altivec_register.
2778 (store_register): Call store_altivec_registers instead of
2779 store_altivec_register.
2780 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
2781 the new regno parameter.
2782 (store_ppc_registers): Call store_altivec_registers with -1 for
2783 the new regno parameter.
2785 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2787 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
2788 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
2789 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2790 (gdb_vrregset_t): Change array type size to
2791 PPC_LINUX_SIZEOF_VRREGSET.
2792 (gdb_vsxregset_t): Change array type size to
2793 PPC_LINUX_SIZEOF_VSXREGSET.
2794 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
2795 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
2796 PPC_LINUX_SIZEOF_VSXREGSET.
2798 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2800 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
2801 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
2803 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
2804 ppc_linux_target_wordsize with tid.
2805 (ppc_linux_nat_target::read_description): Call ppc_linux_target
2807 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
2808 (ppc64_64bit_inferior_p): Add static and inline specifiers.
2809 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
2810 tid parameter. Remove static specifier.
2811 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
2812 (ppc_linux_target_wordsize): New declaration.
2814 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2816 * arch/ppc-linux-common.c: New file.
2817 * arch/ppc-linux-common.h: New file.
2818 * arch/ppc-linux-tdesc.h: New file.
2819 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
2820 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
2821 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
2822 arch/ppc-linux-tdesc.h.
2823 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
2824 arch/ppc-linux-tdesc.h.
2825 (ppc_linux_nat_target::read_description): Remove target
2826 description matching code. Fill a ppc_linux_features struct and
2827 call ppc_linux_match_description with it. Move comment about ISA
2828 2.05 to ppc-linux-common.c.
2829 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
2830 arch/ppc-linux-tdesc.h.
2831 (ppc_linux_core_read_description): Remove target description
2832 matching code. Fill a ppc_linux_features struct and call
2833 ppc_linux_match_description with it.
2834 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2835 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2836 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2837 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2838 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2839 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2840 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2841 (tdesc_powerpc_e500l): Remove.
2843 2018-05-22 Joel Brobecker <brobecker@adacore.com>
2845 * ada-lang.c (catch_assert_command): Pass empty string instead
2846 of NULL for excep_string argument.
2848 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2850 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
2851 the width of the requested register exceeds the width of the
2854 2018-05-21 Tom Tromey <tom@tromey.com>
2856 * printcmd.c (output_command): Remove.
2857 (output_command_const): Rename to output_command.
2858 * valprint.h (output_command): Rename from output_command_const.
2859 * tracepoint.c (trace_dump_actions): Call output_command.
2861 2018-05-21 Tom Tromey <tom@tromey.com>
2863 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2864 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
2865 * ada-lang.h (create_ada_exception_catchpoint): Update.
2866 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
2868 (create_excep_cond_exprs, ~ada_catchpoint)
2869 (should_stop_exception, print_one_exception)
2870 (print_mention_exception, print_recreate_exception): Update.
2871 (ada_get_next_arg): Remove.
2872 (catch_ada_exception_command_split): Use std::string. Change type
2873 of "excep_string", "cond_string".
2874 (catch_ada_exception_command): Update.
2875 (create_ada_exception_catchpoint): Change type of excep_string.
2876 (ada_exception_sal): Remove excep_string parameter.
2877 (~ada_catchpoint): Remove.
2879 2018-05-21 Tom Tromey <tom@tromey.com>
2881 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
2884 2018-05-21 Tom Tromey <tom@tromey.com>
2886 * ada-lang.c (ada_exception_message_1, ada_exception_message):
2887 Return unique_xmalloc_ptr.
2888 (print_it_exception): Update.
2890 2018-05-21 Tom Tromey <tom@tromey.com>
2892 * tracepoint.c (trace_dump_actions): Use std::string.
2894 2018-05-21 Tom Tromey <tom@tromey.com>
2896 * symfile.c (reread_symbols): Use std::string for original_name.
2898 2018-05-21 Tom Tromey <tom@tromey.com>
2900 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
2901 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
2904 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
2906 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
2908 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
2909 * objfiles.c (get_objfile_bfd_data): Allocate
2910 objfile_per_bfd_storage with obstack_new when allocating on
2913 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
2915 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
2917 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
2918 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
2919 * mdebugread.c (mdebug_build_psymtabs): Likewise.
2920 (add_pending): Likewise.
2921 (parse_symbol): Likewise.
2922 (parse_partial_symbols): Likewise.
2923 (psymtab_to_symtab_1): Likewise.
2924 (new_psymtab): Likewise.
2925 (elfmdebug_build_psymtabs): Likewise.
2926 * minsyms.c (terminate_minimal_symbol_table): Likewise.
2927 * objfiles.c (get_objfile_bfd_data): Likewise.
2928 (objfile_register_static_link): Likewise.
2929 * psymtab.c (allocate_psymtab): Likewise.
2930 * stabsread.c (read_member_functions): Likewise.
2931 * xcoffread.c (xcoff_end_psymtab): Likewise.
2933 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
2935 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
2936 compiler supports std::is_trivially_constructible.
2937 * common/poison.h: Include obstack.h.
2938 (IsMallocable): Define to is_trivially_constructible if the
2939 compiler supports it, define to true_type otherwise.
2943 (XOBNEWVEC): Redefine.
2944 * gdb_obstack.h (obstack_zalloc): New.
2945 (OBSTACK_ZALLOC): Redefine.
2946 (obstack_calloc): New.
2947 (OBSTACK_CALLOC): Redefine.
2949 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
2950 (gdbarch_obstack): New declaration in gdbarch.h, definition in
2952 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
2953 obstack_calloc/obstack_zalloc.
2954 (gdbarch_obstack_zalloc): Remove.
2955 * target-descriptions.c (tdesc_data_init): Use obstack_new.
2957 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2959 * stack.c (backtrace_command_1): Remove useless variable int i.
2961 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2963 * stack.c (print_frame_info): Fix comment.
2965 2018-05-18 Tom Tromey <tom@tromey.com>
2967 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
2968 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
2969 (~dwarf2_per_objfile): Update
2970 (dwarf2_get_dwz_file): Use new.
2971 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
2974 2018-05-18 Tom Tromey <tom@tromey.com>
2976 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
2978 * dwarf2read.c (struct dwp_file): Add constructor and
2980 (open_and_init_dwp_file): Return a unique_ptr.
2981 (dwarf2_per_objfile, create_dwp_hash_table)
2982 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
2983 (lookup_dwo_unit_in_dwp): Update.
2984 (open_and_init_dwp_file, get_dwp_file): Update.
2986 2018-05-18 Tom Tromey <tom@tromey.com>
2988 * dwarf2read.c (dwarf2_per_objfile): Update.
2989 (struct mapped_index): Add initializers.
2990 (dwarf2_read_index): Use new.
2991 (dw2_symtab_iter_init): Update.
2992 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
2995 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
2997 * dwarf2read.c (mapped_index) <total_size>: Remove.
2999 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3001 * unittests/format_pieces-selftests.c (test_format_specifier):
3004 2018-05-18 Tom Tromey <tom@tromey.com>
3006 * c-typeprint.c (maybe_print_hole): New function.
3007 (c_print_type_struct_field_offset): Update.
3008 (c_type_print_base_struct_union): Call maybe_print_hole.
3010 2018-05-17 Keith Seitz <keiths@redhat.com>
3012 * breakpoint.c (build_bpstat_chain): New function, moved from
3014 (bpstat_stop_status): Add optional parameter, `stop_chain'.
3015 If no stop chain is passed, call build_bpstat_chain to build it.
3016 * breakpoint.h (build_bpstat_chain): Declare.
3017 (bpstat_stop_status): Move documentation here from breakpoint.c.
3018 * infrun.c (handle_signal_stop): Before eliding inlined frames,
3019 build the stop chain and pass it to skip_inline_frames.
3020 Pass this stop chain to bpstat_stop_status.
3021 * inline-frame.c: Include breakpoint.h.
3022 (stopped_by_user_bp_inline_frame): New function.
3023 (skip_inline_frames): Add parameter `stop_chain'.
3024 Move documention to inline-frame.h.
3025 If non-NULL, use stopped_by_user_bp_inline_frame to determine
3026 whether the frame should be elided.
3027 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3028 Add moved documentation and update for new parameter.
3030 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3033 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3034 unittests/format_pieces-selftests.c.
3035 * common/format.h (format_piece) <operator==>: New.
3036 (format_pieces) <operator[]>: Remove.
3037 * common/format.c (format_pieces::format_pieces): Handle \e.
3038 * unittests/format_pieces-selftests.c: New.
3040 2018-05-17 Tom Tromey <tom@tromey.com>
3043 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3044 (dw2_instantiate_symtab): Add skip_partial parameter.
3045 (dw2_find_last_source_symtab, dw2_map_expand_apply)
3046 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3047 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3048 (dw2_expand_symtabs_matching_one)
3049 (dw2_find_pc_sect_compunit_symtab)
3050 (dw2_debug_names_lookup_symbol)
3051 (dw2_debug_names_expand_symtabs_for_function): Update.
3052 (init_cutu_and_read_dies): Add skip_partial parameter.
3053 (process_psymtab_comp_unit, build_type_psymtabs_1)
3054 (process_skeletonless_type_unit, load_partial_comp_unit)
3055 (psymtab_to_symtab_1): Update.
3056 (load_full_comp_unit): Add skip_partial parameter.
3057 (process_imported_unit_die, dwarf2_read_addr_index)
3058 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3059 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3060 (read_signatured_type): Update.
3062 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3064 * value.c (release_value): Remove unused variable.
3065 (record_latest_value): Likewise.
3066 (access_value_history): Likewise.
3067 (preserve_values): Likewise.
3069 2018-05-17 Tom Tromey <tom@tromey.com>
3071 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3074 2018-05-16 Maciej W. Rozycki <macro@mips.com>
3077 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3078 Also handle registers whose width is not a multiple of
3080 (linux_nat_trad_target::store_register): Likewise.
3082 2018-05-16 Tom Tromey <tom@tromey.com>
3084 * gdbcore.h (core_bfd): Redefine.
3085 * corelow.c (core_target::close): Update.
3086 (core_target_open): Update.
3087 * progspace.h (struct program_space) <cbfd>: Now a
3090 2018-05-16 Tom Tromey <tom@tromey.com>
3093 * symfile-add-flags.h (enum symfile_add_flags)
3094 <SYMFILE_NOT_FILENAME>: New constant.
3095 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
3096 objfile name from BFD.
3097 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
3098 * minidebug.c (find_separate_debug_file_in_section): Put
3099 ".gnu_debugdata" into BFD's file name.
3101 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
3103 * regcache.c (regcache_read_ftype, regcache_write_ftype):
3106 2018-05-15 Tamar Christina <tamar.christina@arm.com>
3109 * aarch64-tdep.c (aarch64_analyze_prologue,
3110 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
3111 Indicate not interested in errors.
3113 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3115 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
3116 Supply the MIPS_ZERO_REGNUM register.
3118 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3120 * mips-tdep.c (mask_address_var): Make variable static.
3122 2018-05-14 Tom Tromey <tom@tromey.com>
3124 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
3126 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
3128 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
3129 FXSAVE_ADDR for the mxcsr register.
3131 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
3133 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3135 2018-05-11 Pedro Alves <palves@redhat.com>
3137 * corelow.c (core_target) <core_target>: No longer inline.
3138 Initialize m_core_gdbarch, m_core_vec and build the section table
3140 <~core_target>: New.
3141 <core_gdbarch, get_core_register_section>: New methods.
3142 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3143 factored out from ...
3144 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3146 (sniff_core_bfd): Add gdbarch parameter.
3147 (core_close): Delete, merged into ...
3148 (core_target::close): ... here. Delete self.
3149 (core_close_cleanup): Delete.
3150 (core_target_open): Allocate a core_target on the heap. Use a
3151 unique_ptr instead of a cleanup. Bits moved into the core_target
3152 ctor. Adjust to use core_target methods instead of globals.
3153 (get_core_register_section): Rename to ...
3154 (core_target::get_core_register_section): ... this and adjust.
3155 (struct get_core_registers_cb_data): New.
3156 (get_core_registers_cb): Use it. Use bool.
3157 (core_target::fetch_registers, core_target::files_info)
3158 (core_target::xfer_partial, core_target::read_description)
3159 (core_target::pid_to, core_target::thread_name): Adjust to
3160 reference class fields instead of globals.
3161 * target.h (struct target_ops_deleter, target_ops_up): New.
3163 2018-05-11 Pedro Alves <palves@redhat.com>
3165 * corefile.c (core_file_command): Move to corelow.c.
3166 * corelow.c (the_core_target): Delete.
3167 (core_file_command): Moved from corefile.c. Check exec_bfd
3168 instead of the_core_target. Use target_detach instead of calling
3169 into the_core_target directly.
3170 (maybe_say_no_core_file_now): New.
3171 (core_target::detach): Use it.
3172 (_initialize_corelow): Remove references to the_core_target.
3173 * gdbcore.h (the_core_target): Delete.
3175 2018-05-11 Tom Tromey <tromey@redhat.com>
3176 Pedro Alves <palves@redhat.com>
3178 * corefile.c (core_bfd): Remove.
3179 * gdbcore.h (core_bfd): Now a macro.
3180 * progspace.h (struct program_space) <cbfd>: New field.
3182 2018-05-11 Tom Tromey <tom@tromey.com>
3184 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3187 2018-05-10 Tom Tromey <tom@tromey.com>
3189 * configure: Rebuild.
3190 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3192 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3195 * regformats/regdat.sh: Adjust script, following the addition
3196 of the new expedite_regs parameter to init_target_desc.
3198 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
3201 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3202 set_gdbarch_significant_addr_bit.
3203 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3204 set_gdbarch_significant_addr_bit.
3205 * utils.c (address_significant): Update to sign extend addr.
3207 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
3209 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3210 (xtensa_linux_init_abi): Limit tdep->num_regs by
3211 tdep->num_nopriv_regs.
3212 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3213 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3216 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
3218 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3220 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3222 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3223 (I387_MXCSR_INIT_VAL): New constant.
3224 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3225 buffer if it was supplied by the inferior.
3226 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3227 (i387_xsave_get_clear_bv): New function.
3228 (i387_supply_xsave): Only read x87 control registers from the
3229 xsave buffer if the feature is enabled, and the state will have
3230 been written, otherwise, provide a suitable default.
3231 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3232 including x87 control registers. Update control registers if they
3233 have changed from the default value, and mark features as enabled
3235 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3237 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3239 * spu-tdep.c (info_spu_event_command): Fix output formatting.
3241 2018-05-07 Tom Tromey <tom@tromey.com>
3243 * configure: Rebuild.
3244 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
3246 2018-05-07 Tom Tromey <tom@tromey.com>
3249 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
3250 bit. Use correct value for VDIV.
3252 2018-05-04 Tom Tromey <tom@tromey.com>
3254 * configure: Rebuild.
3255 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
3257 2018-05-04 Tom Tromey <tom@tromey.com>
3259 * linux-record.c (record_linux_system_call) <case
3260 RECORD_SYS_RECVFROM>: Add "break".
3262 2018-05-04 Tom Tromey <tom@tromey.com>
3264 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
3265 Add missing "break".
3266 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
3267 Add missing "break".
3269 2018-05-04 Tom Tromey <tom@tromey.com>
3271 * rs6000-tdep.c (ppc_process_record_op4)
3272 (ppc_process_record_op63): Add fall-through comment.
3274 2018-05-04 Tom Tromey <tom@tromey.com>
3276 * i386-tdep.c (i386_process_record): Add fall-through comment.
3278 2018-05-04 Tom Tromey <tom@tromey.com>
3280 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
3283 2018-05-04 Tom Tromey <tom@tromey.com>
3285 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
3286 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
3287 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
3289 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
3291 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
3294 2018-05-04 Tom Tromey <tom@tromey.com>
3296 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
3298 2018-05-04 Tom Tromey <tom@tromey.com>
3300 * s390-tdep.c (s390_process_record): Fix fall-through comments.
3301 * xcoffread.c (scan_xcoff_symtab): Move comment later.
3302 * symfile.c (section_is_mapped): Fix fall-through comment.
3303 * stabsread.c (define_symbol, read_member_functions): Fix
3304 fall-through comment.
3305 * s390-linux-tdep.c (s390_process_record): Fix fall-through
3307 * remote.c (remote_wait_as): Fix fall-through comment.
3308 * p-exp.y (yylex): Fix fall-through comment.
3309 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
3311 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
3312 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
3313 * jv-exp.y (yylex): Fix fall-through comment.
3314 * go-exp.y (lex_one_token): Fix fall-through comment.
3315 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
3316 fall-through comment.
3317 * f-exp.y (yylex): Fix fall-through comment.
3318 * dwarf2read.c (process_die): Fix fall-through comments.
3319 * dbxread.c (process_one_symbol): Fix fall-through comment.
3320 * d-exp.y (lex_one_token): Fix fall-through comment.
3321 * cp-name-parser.y (yylex): Fix fall-through comment.
3322 * coffread.c (coff_symtab_read): Fix fall-through comment.
3323 * c-exp.y (lex_one_token): Fix fall-through comment.
3324 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
3326 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
3329 2018-05-04 Tom Tromey <tom@tromey.com>
3332 * NEWS: Mention gdb.execute change.
3333 * gdbcmd.h (execute_control_command): Don't declare.
3334 * python/python.c (execute_gdb_command): Use read_command_lines_1,
3335 execute_control_commands, execute_control_commands_to_string.
3336 * cli/cli-script.h (execute_control_commands)
3337 (execute_control_commands_to_string): Declare.
3338 (execute_control_command): Add from_tty parameter.
3339 * cli/cli-script.c (execute_control_commands)
3340 (execute_control_commands_to_string): New functions.
3341 (execute_user_command): Use execute_control_commands.
3342 (execute_control_command_1): Add "from_tty" parameter. Update.
3343 (execute_control_command): Likewise.
3345 2018-05-04 Tom Tromey <tom@tromey.com>
3348 * NEWS: Mention that breakpoint commands are writable.
3349 * python/py-breakpoint.c (bppy_set_commands): New function.
3350 (breakpoint_object_getset) <"commands">: Use it.
3352 2018-05-04 Tom Tromey <tom@tromey.com>
3354 * tracepoint.c (actions_command): Update.
3355 * mi/mi-cmd-break.c (mi_command_line_array)
3356 (mi_command_line_array_cnt, mi_command_line_array_ptr)
3357 (mi_read_next_line): Remove.
3358 (mi_cmd_break_commands): Update.
3359 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
3361 * cli/cli-script.c (get_command_line): Update.
3362 (process_next_line): Use function_view. Constify.
3363 (recurse_read_control_structure, read_command_lines)
3364 (read_command_lines_1): Change argument types to function_view.
3365 (do_define_command, document_command): Update.
3366 * breakpoint.h (check_tracepoint_command): Don't declare.
3367 * breakpoint.c (check_tracepoint_command): Remove.
3368 (commands_command_1, create_tracepoint_from_upload): Update.
3370 2018-05-04 Tom Tromey <tom@tromey.com>
3373 * cli/cli-script.h (enum command_control_type) <define_control>:
3375 * cli/cli-script.c (multi_line_command_p): Handle define_control.
3376 (build_command_line, execute_control_command_1)
3377 (process_next_line): Likewise.
3378 (do_define_command): New function, extracted from define_command.
3379 (define_command): Use it.
3381 2018-05-04 Tom Tromey <tom@tromey.com>
3383 * tracepoint.c (actions_command): Update.
3384 * cli/cli-script.h (read_command_lines): Update.
3385 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
3386 (MAX_TMPBUF): Remove define.
3387 (define_command): Use string_printf.
3388 (document_command): Likewise.
3389 * breakpoint.c (commands_command_1): Update.
3391 2018-05-04 Tom Tromey <tom@tromey.com>
3393 * top.c (execute_command): Update.
3394 * cli/cli-script.h (print_command_lines): Now varargs.
3395 * cli/cli-script.c (print_command_lines): Now varargs.
3396 (execute_control_command_1) <case while_control, case if_control>:
3399 2018-05-04 Tom Tromey <tom@tromey.com>
3401 * tracepoint.c (all_tracepoint_actions): Rename from
3402 all_tracepoint_actions_and_cleanup. Change return type.
3403 (actions_command, encode_actions_1, encode_actions)
3404 (trace_dump_actions, tdump_command): Update.
3405 * remote.c (remote_download_command_source): Update.
3406 * python/python.c (gdbpy_eval_from_control_command)
3407 (python_command, python_interactive_command): Update.
3408 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3409 * guile/guile.c (guile_command)
3410 (gdbscm_eval_from_control_command, guile_command): Update.
3411 * compile/compile.c (compile_code_command)
3412 (compile_print_command, compile_to_object): Update.
3413 * cli/cli-script.h (struct command_lines_deleter): New.
3414 (counted_command_line): New typedef.
3415 (struct command_line): Add constructor, destructor.
3416 <body_list>: Remove.
3417 <body_list_0, body_list_1>: New members.
3418 (command_line_up): Remove typedef.
3419 (read_command_lines, read_command_lines_1, get_command_line):
3421 (copy_command_lines): Don't declare.
3422 * cli/cli-script.c (build_command_line): Use "new".
3423 (get_command_line): Return counted_command_line.
3424 (print_command_lines, execute_user_command)
3425 (execute_control_command_1, while_command, if_command): Update.
3426 (realloc_body_list): Remove.
3427 (process_next_line, recurse_read_control_structure): Update.
3428 (read_command_lines, read_command_lines_1): Return counted_command_line.
3429 (free_command_lines): Use "delete".
3430 (copy_command_lines): Remove.
3431 (define_command, document_command, show_user_1): Update.
3432 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
3433 a counted_command_line.
3434 * breakpoint.h (counted_command_line): Remove typedef.
3435 (breakpoint_set_commands): Update.
3436 * breakpoint.c (check_no_tracepoint_commands)
3437 (validate_commands_for_breakpoint): Update.
3438 (breakpoint_set_commands): Change commands to be a
3439 counted_command_line.
3440 (commands_command_1, update_dprintf_command_list)
3441 (create_tracepoint_from_upload): Update.
3443 2018-05-04 Tom Tromey <tom@tromey.com>
3445 * cli/cli-decode.h (cmd_list_element): New constructor.
3446 (~cmd_list_element): New destructor.
3447 (struct cmd_list_element): Add initializers.
3448 * cli/cli-decode.c (do_add_cmd): Use "new".
3449 (delete_cmd): Use "delete".
3451 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3452 Pedro Alves <palves@redhat.com>
3454 PR breakpoints/19806 and support for PR external/20207.
3455 * NEWS: Mention Aarch64 watchpoint improvements.
3456 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
3457 watchpoints and PR external/20207 watchpoints.
3458 * nat/aarch64-linux-hw-point.c
3459 (kernel_supports_any_contiguous_range): New.
3460 (aarch64_watchpoint_offset): New.
3461 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
3462 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
3463 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
3464 (aarch64_align_watchpoint): New parameters aligned_offset_p and
3465 next_addr_orig_p. Support PR external/20207 watchpoints.
3466 (aarch64_downgrade_regs): New.
3467 (aarch64_dr_state_insert_one_point): New parameters offset and
3469 (aarch64_dr_state_remove_one_point): Likewise.
3470 (aarch64_handle_breakpoint): Update caller.
3471 (aarch64_handle_aligned_watchpoint): Likewise.
3472 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
3474 (aarch64_linux_set_debug_regs): Remove const from state. Call
3475 aarch64_downgrade_regs.
3476 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
3477 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
3478 (DR_CONTROL_MASK): ... this.
3479 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
3480 (unsigned int aarch64_watchpoint_offset): New prototype.
3481 (aarch64_linux_set_debug_regs): Remove const from state.
3482 * utils.c (align_up, align_down): Move to ...
3483 * common/common-utils.c (align_up, align_down): ... here.
3484 * utils.h (align_up, align_down): Move to ...
3485 * common/common-utils.h (align_up, align_down): ... here.
3487 2018-05-04 Joel Brobecker <brobecker@adacore.com>
3489 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
3490 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
3491 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
3492 Re-implement to match the ABI as summarized in GCC's
3493 gcc/config/sparc/sparc.c. All callers updated.
3494 (sparc32_store_arguments): Remove assertion.
3496 2018-05-04 Tom Tromey <tom@tromey.com>
3498 * printcmd.c: Don't include tui.h.
3499 (decode_format): Use skip_spaces.
3501 2018-05-04 Tom Tromey <tom@tromey.com>
3504 * printcmd.c (last_count): New global.
3505 (x_command): Use saved count when repeating.
3507 2018-05-04 Tom Tromey <tom@tromey.com>
3509 * nto-procfs.c (do_closedir_cleanup): Remove.
3510 (procfs_pidlist): Use gdb_dir_up.
3511 * procfs.c (do_closedir_cleanup): Remove.
3512 (proc_update_threads): Use gdb_dir_up.
3513 * common/filestuff.h (struct gdb_dir_deleter): New.
3514 (gdb_dir_up): New typedef.
3516 2018-05-04 Tom Tromey <tom@tromey.com>
3518 * ada-lang.c (print_mention_exception): Use std::string.
3520 2018-05-04 Tom Tromey <tom@tromey.com>
3522 * ada-lang.c (create_excep_cond_exprs): Update.
3523 (ada_exception_catchpoint_cond_string): Use std::string.
3525 2018-05-04 Tom Tromey <tom@tromey.com>
3527 * ada-lang.c (xget_renaming_scope): Return std::string.
3528 (old_renaming_is_invisible): Update.
3530 2018-05-04 Tom Tromey <tom@tromey.com>
3532 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
3533 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
3535 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
3537 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
3539 2018-05-04 Tom Tromey <tom@tromey.com>
3541 * remote.c (remote_query_supported_append): Change type.
3542 (remote_check_symbols): Update.
3544 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
3547 * configure.ac: Prepend libpython.
3548 * python/python-config.py: Likewise.
3549 * configure: Regenerate.
3551 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
3553 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
3555 2018-05-03 Pedro Alves <palves@redhat.com>
3558 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
3559 override. Write 'true' instead of '1'.
3560 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
3563 2018-05-02 Pedro Alves <palves@redhat.com>
3565 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
3566 add_inf_child_target.
3567 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
3568 add_inf_child_target.
3569 * aix-thread.c (aix_thread_target_info): New.
3570 (aix_thread_target) <shortname, longname, doc>: Delete.
3572 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
3573 add_inf_child_target.
3574 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
3575 add_inf_child_target.
3576 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
3577 add_inf_child_target.
3578 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
3579 add_inf_child_target.
3580 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
3581 add_inf_child_target.
3582 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
3583 add_inf_child_target.
3584 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
3585 add_inf_child_target.
3586 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
3587 add_inf_child_target.
3588 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
3589 add_inf_child_target.
3590 * bfd-target.c (target_bfd_target_info): New.
3591 (target_bfd) <shortname, longname, doc>: Delete.
3593 * bsd-kvm.c (bsd_kvm_target_info): New.
3594 (bsd_kvm_target) <shortname, longname, doc>: Delete.
3596 (bsd_kvm_target::open): Rename to ...
3597 (bsd_kvm_target_open): ... this. Adjust.
3598 * bsd-uthread.c (bsd_uthread_target_info): New.
3599 (bsd_uthread_target) <shortname, longname, doc>: Delete.
3601 * corefile.c (core_file_command): Adjust.
3602 * corelow.c (core_target_info): New.
3603 (core_target) <shortname, longname, doc>: Delete.
3605 (core_target::open): Rename to ...
3606 (core_target_open): ... this. Adjust.
3607 * ctf.c (ctf_target_info): New.
3608 (ctf_target) <shortname, longname, doc>: Delete.
3610 (ctf_target::open): Rename to ...
3611 (ctf_target_open): ... this.
3612 (_initialize_ctf): Adjust.
3613 * exec.c (exec_target_info): New.
3614 (exec_target) <shortname, longname, doc>: Delete.
3616 (exec_target::open): Rename to ...
3617 (exec_target_open): ... this.
3618 * gdbcore.h (core_target_open): Declare.
3619 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
3620 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
3621 add_inf_child_target.
3622 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
3623 add_inf_child_target.
3624 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
3625 add_inf_child_target.
3626 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
3627 add_inf_child_target.
3628 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
3629 add_inf_child_target.
3630 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
3631 add_inf_child_target.
3632 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
3633 add_inf_child_target.
3634 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
3635 add_inf_child_target.
3636 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
3637 add_inf_child_target.
3638 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
3639 add_inf_child_target.
3640 * inf-child.c (inf_child_target_info): New.
3641 (inf_child_target::info): New.
3642 (inf_child_open_target): Remove 'target' parameter. Use
3643 get_native_target instead.
3644 (inf_child_target::open): Delete.
3645 (add_inf_child_target): New.
3646 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
3649 (add_inf_child_target): Declare.
3650 (inf_child_open_target): Declare.
3651 * linux-thread-db.c (thread_db_target_info): New.
3652 (thread_db_target) <shortname, longname, doc>: Delete.
3654 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
3655 add_inf_child_target.
3656 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
3657 add_inf_child_target.
3658 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
3659 add_inf_child_target.
3660 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
3661 add_inf_child_target.
3662 * make-target-delegates (print_class): Adjust.
3663 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
3664 add_inf_child_target.
3665 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
3666 add_inf_child_target.
3667 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
3668 add_inf_child_target.
3669 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
3670 add_inf_child_target.
3671 * nto-procfs.c (nto_native_target_info): New.
3672 (nto_procfs_target_native) <shortname, longname, doc>:
3675 (nto_procfs_target_info): New.
3676 (nto_procfs_target_procfs) <shortname, longname, doc>:
3679 (init_procfs_targets): Adjust.
3680 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
3681 add_inf_child_target.
3682 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
3683 add_inf_child_target.
3684 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
3685 add_inf_child_target.
3686 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
3687 add_inf_child_target.
3688 * ravenscar-thread.c (ravenscar_target_info): New.
3689 (ravenscar_thread_target) <shortname, longname, doc>:
3692 * record-btrace.c (record_btrace_target_info):
3693 (record_btrace_target) <shortname, longname, doc>: Delete.
3695 (record_btrace_target::open): Rename to ...
3696 (record_btrace_target_open): ... this. Adjust.
3697 * record-full.c (record_longname, record_doc): New.
3698 (record_full_base_target) <shortname, longname, doc>: Delete.
3700 (record_full_target_info): New.
3701 (record_full_target): <shortname>: Delete.
3703 (record_full_core_open_1, record_full_open_1): Update comments.
3704 (record_full_base_target::open): Rename to ...
3705 (record_full_open): ... this.
3706 (cmd_record_full_restore): Update.
3707 (_initialize_record_full): Update.
3708 * remote-sim.c (remote_sim_target_info): New.
3709 (gdbsim_target) <shortname, longname, doc>: Delete.
3711 (gdbsim_target::open): Rename to ...
3712 (gdbsim_target_open): ... this.
3713 (_initialize_remote_sim): Adjust.
3714 * remote.c (remote_doc): New.
3715 (remote_target_info): New.
3716 (remote_target) <shortname, longname, doc>: Delete.
3718 (extended_remote_target_info): New.
3719 (extended_remote_target) <shortname, longname, doc>: Delete.
3721 (remote_target::open_1): Make static. Adjust.
3722 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
3723 * s390-linux-nat.c (_initialize_s390_nat): Use
3724 add_inf_child_target.
3725 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
3726 add_inf_child_target.
3727 * sol-thread.c (thread_db_target_info): New.
3728 (sol_thread_target) <shortname, longname, doc>: Delete.
3730 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
3731 add_inf_child_target.
3732 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
3733 add_inf_child_target.
3734 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
3735 add_inf_child_target.
3736 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
3737 add_inf_child_target.
3738 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
3739 add_inf_child_target.
3740 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
3741 add_inf_child_target.
3742 * spu-linux-nat.c (_initialize_spu_nat): Use
3743 add_inf_child_target.
3744 * spu-multiarch.c (spu_multiarch_target_info): New.
3745 (spu_multiarch_target) <shortname, longname, doc>: Delete.
3747 * target-delegates.c: Regenerate.
3748 * target.c: Include <unordered_map>.
3749 (target_ops_p): Delete.
3750 (DEF_VEC_P(target_ops_p)): Delete.
3751 (target_factories): New.
3752 (test_target_info): New.
3753 (test_target_ops::info): New.
3754 (open_target): Adjust to use target_factories.
3755 (add_target_with_completer): Rename to ...
3756 (add_target): ... this. Change prototype. Register target_info
3757 and open callback in target_factories. Register target_info in
3758 command context instead of target_ops.
3759 (add_target): Delete old implementation.
3760 (add_deprecated_target_alias): Change prototype. Adjust.
3761 (the_native_target): New.
3762 (set_native_target, get_native_target): New.
3763 (find_default_run_target): Use the_native_target.
3764 (find_attach_target, find_run_target): Simplify.
3765 (target_ops::open): Delete.
3766 (dummy_target_info): New.
3767 (dummy_target::shortname, dummy_target::longname)
3768 (dummy_target::doc): Delete.
3769 (dummy_target::info): New.
3770 (debug_target::shortname, debug_target::longname)
3771 (debug_target::doc): Delete.
3772 (debug_target::info): New.
3773 * target.h (struct target_info): New.
3774 (target_ops::~target_ops): Add comment.
3775 (target_ops::info): New.
3776 (target_ops::shortname, target_ops::longname, target_ops::doc): No
3777 longer virtual. Implement in terms of target_info.
3778 (set_native_target, get_native_target): Declare.
3779 (target_open_ftype): New.
3780 (add_target, add_target_with_completer)
3781 (add_deprecated_target_alias): Change prototype.
3782 (test_target) <shortname, longname, doc>: Delete.
3784 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
3785 add_inf_child_target.
3786 * tracefile-tfile.c (tfile_target_info): New.
3787 (tfile_target) <shortname, longname, doc>: Delete.
3789 (tfile_target::open): Rename to ...
3790 (tfile_target_open): ... this.
3791 (_initialize_tracefile_tfile): Adjust.
3792 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
3793 add_inf_child_target.
3794 * windows-nat.c (_initialize_windows_nat): Use
3795 add_inf_child_target.
3796 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
3797 add_inf_child_target.
3799 2018-05-02 Pedro Alves <palves@redhat.com>
3801 * linux-nat.h (linux_nat_target) <low_new_thread,
3802 low_delete_thread, low_new_fork, low_forget_process,
3803 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
3804 New virtual methods.
3805 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3806 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
3807 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
3808 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3809 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
3811 * linux-fork.c (delete_fork): Adjust to call low method.
3812 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
3813 (linux_nat_new_fork, linux_nat_forget_process_hook)
3814 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
3815 (linux_nat_status_is_event):
3816 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
3817 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
3819 (sigtrap_is_event): Rename to ...
3820 (linux_nat_target::low_status_is_event): ... this.
3821 (linux_nat_set_status_is_event): Delete.
3822 (save_stop_reason, linux_nat_wait_1)
3823 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
3825 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3826 (linux_nat_set_new_fork, linux_nat_set_forget_process)
3827 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3828 (linux_nat_set_prepare_to_resume): Delete.
3829 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
3830 low virtual methods.
3831 * amd64-linux-nat.c: Likewise.
3832 * arm-linux-nat.c: Likewise.
3833 * i386-linux-nat.c: Likewise.
3834 * ia64-linux-nat.c: Likewise.
3835 * mips-linux-nat.c: Likewise.
3836 * ppc-linux-nat.c: Likewise.
3837 * s390-linux-nat.c: Likewise.
3838 * sparc64-linux-nat.c: Likewise.
3839 * x86-linux-nat.c: Likewise.
3840 * x86-linux-nat.h: Include "nat/x86-linux.h".
3841 (x86_linux_nat_target) <low_new_fork, low_forget_process,
3842 low_prepare_to_resume, low_new_thread, low_delete_thread>:
3845 2018-05-02 Pedro Alves <palves@redhat.com>
3847 * target.h (target_ops)
3848 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3849 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
3850 stopped_by_watchpoint, have_continuable_watchpoint,
3851 stopped_data_address, watchpoint_addr_within_range,
3852 can_accel_watchpoint_condition, can_run, thread_alive,
3853 has_all_memory, has_memory, has_stack, has_registers,
3854 has_execution, can_async_p, is_async_p, supports_non_stop,
3855 always_non_stop_p, can_execute_reverse, supports_multi_process,
3856 supports_enable_disable_tracepoint,
3857 supports_disable_randomization, supports_string_tracing,
3858 supports_evaluation_of_breakpoint_conditions,
3859 can_run_breakpoint_commands, filesystem_is_local,
3860 can_download_tracepoint, get_trace_state_variable_value,
3861 set_trace_notes, get_tib_address, use_agent, can_use_agent,
3862 record_is_replaying, record_will_replay,
3863 augmented_libraries_svr4_read>: Adjust to return bool.
3864 * aarch64-linux-nat.c: All implementations adjusted.
3865 * aix-thread.c: All implementations adjusted.
3866 * arm-linux-nat.c: All implementations adjusted.
3867 * breakpoint.c: All implementations adjusted.
3868 * bsd-kvm.c: All implementations adjusted.
3869 * bsd-uthread.c: All implementations adjusted.
3870 * corelow.c: All implementations adjusted.
3871 * ctf.c: All implementations adjusted.
3872 * darwin-nat.c: All implementations adjusted.
3873 * darwin-nat.h: All implementations adjusted.
3874 * exec.c: All implementations adjusted.
3875 * fbsd-nat.c: All implementations adjusted.
3876 * fbsd-nat.h: All implementations adjusted.
3877 * gnu-nat.c: All implementations adjusted.
3878 * gnu-nat.h: All implementations adjusted.
3879 * go32-nat.c: All implementations adjusted.
3880 * ia64-linux-nat.c: All implementations adjusted.
3881 * inf-child.c: All implementations adjusted.
3882 * inf-child.h: All implementations adjusted.
3883 * inf-ptrace.c: All implementations adjusted.
3884 * inf-ptrace.h: All implementations adjusted.
3885 * linux-nat.c: All implementations adjusted.
3886 * linux-nat.h: All implementations adjusted.
3887 * mips-linux-nat.c: All implementations adjusted.
3888 * nto-procfs.c: All implementations adjusted.
3889 * ppc-linux-nat.c: All implementations adjusted.
3890 * procfs.c: All implementations adjusted.
3891 * ravenscar-thread.c: All implementations adjusted.
3892 * record-btrace.c: All implementations adjusted.
3893 * record-full.c: All implementations adjusted.
3894 * remote-sim.c: All implementations adjusted.
3895 * remote.c: All implementations adjusted.
3896 * s390-linux-nat.c: All implementations adjusted.
3897 * sol-thread.c: All implementations adjusted.
3898 * spu-multiarch.c: All implementations adjusted.
3899 * target-delegates.c: All implementations adjusted.
3900 * target.c: All implementations adjusted.
3901 * target.h: All implementations adjusted.
3902 * tracefile-tfile.c: All implementations adjusted.
3903 * tracefile.c: All implementations adjusted.
3904 * tracefile.h: All implementations adjusted.
3905 * windows-nat.c: All implementations adjusted.
3906 * x86-linux-nat.h: All implementations adjusted.
3907 * x86-nat.h: All implementations adjusted.
3909 2018-05-02 Pedro Alves <palves@redhat.com>
3911 * make-target-delegates (scan_target_h): Don't trim lines here.
3912 Replace sequences of tabs and/or whitespace with a single
3914 (top level, parsing methods): Trim each line before processing it
3917 2018-05-02 Pedro Alves <palves@redhat.com>
3918 John Baldwin <jhb@freebsd.org>
3920 * target.h (enum strata) <debug_stratum>: New.
3921 (struct target_ops) <all delegation methods>: Replace by C++
3922 virtual methods, and drop "to_" prefix. All references updated
3924 <to_shortname, to_longname, to_doc, to_data,
3925 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
3926 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
3927 virtual methods. All references updated throughout.
3928 <can_attach, supports_terminal_ours, can_create_inferior,
3929 get_thread_control_capabilities, attach_no_wait>: New
3931 <insert_breakpoint, remove_breakpoint>: Now
3932 TARGET_DEFAULT_NORETURN methods.
3933 <info_proc>: Now returns bool.
3935 (OPS_MAGIC): Delete.
3936 (current_target): Delete. All references replaced by references
3938 (target_stack): ... this. New.
3939 (target_shortname, target_longname): Adjust.
3940 (target_can_run): Now a function declaration.
3941 (default_child_has_all_memory, default_child_has_memory)
3942 (default_child_has_stack, default_child_has_registers)
3943 (default_child_has_execution): Remove target_ops parameter.
3944 (complete_target_initialization): Delete.
3945 (memory_breakpoint_target): New template class.
3946 (test_target_ops): Refactor as a C++ class with virtual methods.
3947 * make-target-delegates (NAME_PART): Tighten.
3948 (POINTER_PART, CP_SYMBOL): New.
3949 (SIMPLE_RETURN_PART): Reimplement.
3950 (VEC_RETURN_PART): Expect less.
3951 (RETURN_PART, VIRTUAL_PART): New.
3952 (METHOD): Adjust to C++ virtual methods.
3953 (scan_target_h): Remove reference to C99.
3954 (dname): Output "target_ops::" prefix.
3955 (write_function_header): Adjust to output a C++ class method.
3956 (write_declaration): New.
3957 (write_delegator): Adjust to output a C++ class method.
3958 (tdname): Output "dummy_target::" prefix.
3959 (write_tdefault, write_debugmethod): Adjust to output a C++ class
3961 (tdefault_names, debug_names): Delete.
3962 (return_types, tdefaults, styles, argtypes_array): New.
3963 (top level): All methods are delegators.
3965 (top level): Print dummy_target and debug_target classes.
3966 * target-delegates.c: Regenerate.
3967 * target-debug.h (target_debug_print_enum_info_proc_what)
3968 (target_debug_print_thread_control_capabilities)
3969 (target_debug_print_thread_info_p): New.
3970 * target.c (dummy_target): Delete.
3971 (the_dummy_target, the_debug_target): New.
3972 (target_stack): Now extern.
3973 (set_targetdebug): Push/unpush debug target.
3974 (default_child_has_all_memory, default_child_has_memory)
3975 (default_child_has_stack, default_child_has_registers)
3976 (default_child_has_execution): Remove target_ops parameter.
3977 (complete_target_initialization): Delete.
3978 (add_target_with_completer): No longer call
3979 complete_target_initialization.
3980 (target_supports_terminal_ours): Use regular delegation.
3981 (update_current_target): Delete.
3982 (push_target): No longer check magic number. Don't call
3983 update_current_target.
3984 (unpush_target): Don't call update_current_target.
3985 (target_is_pushed): No longer check magic number.
3986 (target_require_runnable): Skip for all stratums over
3988 (target_ops::info_proc): New.
3989 (target_info_proc): Use find_target_at and
3990 find_default_run_target.
3991 (target_supports_disable_randomization): Use regular delegation.
3992 (target_get_osdata): Use find_target_at.
3993 (target_ops::open, target_ops::close, target_ops::can_attach)
3994 (target_ops::attach, target_ops::can_create_inferior)
3995 (target_ops::create_inferior, target_ops::can_run)
3996 (target_can_run): New.
3997 (default_fileio_target): Use regular delegation.
3998 (target_ops::fileio_open, target_ops::fileio_pwrite)
3999 (target_ops::fileio_pread, target_ops::fileio_fstat)
4000 (target_ops::fileio_close, target_ops::fileio_unlink)
4001 (target_ops::fileio_readlink): New.
4002 (target_fileio_open_1, target_fileio_unlink)
4003 (target_fileio_readlink): Always call the target method. Handle
4005 (return_zero, return_zero_has_execution): Delete.
4006 (init_dummy_target): Delete.
4007 (dummy_target::dummy_target, dummy_target::shortname)
4008 (dummy_target::longname, dummy_target::doc)
4009 (debug_target::debug_target, debug_target::shortname)
4010 (debug_target::longname, debug_target::doc): New.
4011 (target_supports_delete_record): Use regular delegation.
4012 (setup_target_debug): Delete.
4013 (maintenance_print_target_stack): Skip debug_stratum.
4014 (initialize_targets): Instantiate the_dummy_target and
4016 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
4018 (target_auxv_search, fprint_target_auxv): Adjust.
4019 (info_auxv_command): Adjust to use target_stack.
4020 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4021 * exceptions.c (print_flush): Handle a NULL target_stack.
4022 * regcache.c (target_ops_no_register): Refactor as class with
4025 * exec.c (exec_target): New class.
4026 (exec_ops): Now an exec_target.
4027 (exec_open, exec_close_1, exec_get_section_table)
4028 (exec_xfer_partial, exec_files_info, exec_has_memory)
4029 (exec_make_note_section): Refactor as exec_target methods.
4030 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4032 (exec_target::find_memory_regions): New.
4033 (_initialize_exec): Don't call init_exec_ops.
4034 * gdbcore.h (exec_file_clear): Delete.
4036 * corefile.c (core_target): Delete.
4037 (core_file_command): Adjust.
4038 * corelow.c (core_target): New class.
4039 (the_core_target): New.
4040 (core_close): Remove target_ops parameter.
4041 (core_close_cleanup): Adjust.
4042 (core_target::close): New.
4043 (core_open, core_detach, get_core_registers, core_files_info)
4044 (core_xfer_partial, core_thread_alive, core_read_description)
4045 (core_pid_to_str, core_thread_name, core_has_memory)
4046 (core_has_stack, core_has_registers, core_info_proc): Rework as
4047 core_target methods.
4048 (ignore, core_remove_breakpoint, init_core_ops): Delete.
4049 (_initialize_corelow): Initialize the_core_target.
4050 * gdbcore.h (core_target): Delete.
4051 (the_core_target): New.
4053 * ctf.c: (ctf_target): New class.
4054 (ctf_ops): Now a ctf_target.
4055 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4056 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4057 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4059 (init_ctf_ops): Delete.
4060 (_initialize_ctf): Don't call it.
4061 * tracefile-tfile.c (tfile_target): New class.
4062 (tfile_ops): Now a tfile_target.
4063 (tfile_open, tfile_close, tfile_files_info)
4064 (tfile_get_tracepoint_status, tfile_trace_find)
4065 (tfile_fetch_registers, tfile_xfer_partial)
4066 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4067 Refactor as tfile_target methods.
4068 (tfile_xfer_partial_features): Remove target_ops parameter.
4069 (init_tfile_ops): Delete.
4070 (_initialize_tracefile_tfile): Don't call it.
4071 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4072 (tracefile_has_stack, tracefile_has_registers)
4073 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4074 tracefile_target methods.
4075 (init_tracefile_ops): Delete.
4076 (tracefile_target::tracefile_target): New.
4077 * tracefile.h: Include "target.h".
4078 (tracefile_target): New class.
4079 (init_tracefile_ops): Delete.
4081 * spu-multiarch.c (spu_multiarch_target): New class.
4082 (spu_ops): Now a spu_multiarch_target.
4083 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4084 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4085 (spu_search_memory, spu_mourn_inferior): Refactor as
4086 spu_multiarch_target methods.
4087 (init_spu_ops): Delete.
4088 (_initialize_spu_multiarch): Remove references to init_spu_ops,
4089 complete_target_initialization.
4091 * ravenscar-thread.c (ravenscar_thread_target): New class.
4092 (ravenscar_ops): Now a ravenscar_thread_target.
4093 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4094 (ravenscar_thread_alive, ravenscar_pid_to_str)
4095 (ravenscar_fetch_registers, ravenscar_store_registers)
4096 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
4097 (ravenscar_stopped_by_hw_breakpoint)
4098 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
4099 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
4100 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
4102 (init_ravenscar_thread_ops): Delete.
4103 (_initialize_ravenscar): Remove references to
4104 init_ravenscar_thread_ops and complete_target_initialization.
4106 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
4107 (bsd_uthread_target): New class.
4108 (bsd_uthread_ops): Now a bsd_uthread_target.
4109 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
4110 (bsd_uthread_close, bsd_uthread_mourn_inferior)
4111 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
4112 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
4113 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
4114 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
4115 (bsd_uthread_target): Delete function.
4116 (_initialize_bsd_uthread): Remove reference to
4117 complete_target_initialization.
4119 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
4120 (target_bfd): ... this new class.
4121 (target_bfd_xfer_partial, target_bfd_get_section_table)
4122 (target_bfd_close): Refactor as target_bfd methods.
4123 (target_bfd::~target_bfd): New.
4124 (target_bfd_reopen): Adjust.
4125 (target_bfd::close): New.
4127 * record-btrace.c (record_btrace_target): New class.
4128 (record_btrace_ops): Now a record_btrace_target.
4129 (record_btrace_open, record_btrace_stop_recording)
4130 (record_btrace_disconnect, record_btrace_close)
4131 (record_btrace_async, record_btrace_info)
4132 (record_btrace_insn_history, record_btrace_insn_history_range)
4133 (record_btrace_insn_history_from, record_btrace_call_history)
4134 (record_btrace_call_history_range)
4135 (record_btrace_call_history_from, record_btrace_record_method)
4136 (record_btrace_is_replaying, record_btrace_will_replay)
4137 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4138 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4139 (record_btrace_store_registers, record_btrace_prepare_to_store)
4140 (record_btrace_to_get_unwinder)
4141 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4142 (record_btrace_commit_resume, record_btrace_wait)
4143 (record_btrace_stop, record_btrace_can_execute_reverse)
4144 (record_btrace_stopped_by_sw_breakpoint)
4145 (record_btrace_supports_stopped_by_sw_breakpoint)
4146 (record_btrace_stopped_by_hw_breakpoint)
4147 (record_btrace_supports_stopped_by_hw_breakpoint)
4148 (record_btrace_update_thread_list, record_btrace_thread_alive)
4149 (record_btrace_goto_begin, record_btrace_goto_end)
4150 (record_btrace_goto, record_btrace_stop_replaying_all)
4151 (record_btrace_execution_direction)
4152 (record_btrace_prepare_to_generate_core)
4153 (record_btrace_done_generating_core): Refactor as
4154 record_btrace_target methods.
4155 (init_record_btrace_ops): Delete.
4156 (_initialize_record_btrace): Remove reference to
4157 init_record_btrace_ops.
4158 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4159 the execution_direction global.
4160 (record_full_base_target, record_full_target)
4161 (record_full_core_target): New classes.
4162 (record_full_ops): Now a record_full_target.
4163 (record_full_core_ops): Now a record_full_core_target.
4164 (record_full_target::detach, record_full_target::disconnect)
4165 (record_full_core_target::disconnect)
4166 (record_full_target::mourn_inferior, record_full_target::kill):
4168 (record_full_open, record_full_close, record_full_async): Refactor
4169 as methods of the record_full_base_target class.
4170 (record_full_resume, record_full_commit_resume): Refactor
4171 as methods of the record_full_target class.
4172 (record_full_wait, record_full_stopped_by_watchpoint)
4173 (record_full_stopped_data_address)
4174 (record_full_stopped_by_sw_breakpoint)
4175 (record_full_supports_stopped_by_sw_breakpoint)
4176 (record_full_stopped_by_hw_breakpoint)
4177 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4178 methods of the record_full_base_target class.
4179 (record_full_store_registers, record_full_xfer_partial)
4180 (record_full_insert_breakpoint, record_full_remove_breakpoint):
4181 Refactor as methods of the record_full_target class.
4182 (record_full_can_execute_reverse, record_full_get_bookmark)
4183 (record_full_goto_bookmark, record_full_execution_direction)
4184 (record_full_record_method, record_full_info, record_full_delete)
4185 (record_full_is_replaying, record_full_will_replay)
4186 (record_full_goto_begin, record_full_goto_end, record_full_goto)
4187 (record_full_stop_replaying): Refactor as methods of the
4188 record_full_base_target class.
4189 (record_full_core_resume, record_full_core_kill)
4190 (record_full_core_fetch_registers)
4191 (record_full_core_prepare_to_store)
4192 (record_full_core_store_registers, record_full_core_xfer_partial)
4193 (record_full_core_insert_breakpoint)
4194 (record_full_core_remove_breakpoint)
4195 (record_full_core_has_execution): Refactor
4196 as methods of the record_full_core_target class.
4197 (record_full_base_target::supports_delete_record): New.
4198 (init_record_full_ops): Delete.
4199 (init_record_full_core_ops): Delete.
4200 (record_full_save): Refactor as method of the
4201 record_full_base_target class.
4202 (_initialize_record_full): Remove references to
4203 init_record_full_ops and init_record_full_core_ops.
4205 * remote.c (remote_target, extended_remote_target): New classes.
4206 (remote_ops): Now a remote_target.
4207 (extended_remote_ops): Now an extended_remote_target.
4208 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4209 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4210 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4211 (remote_pass_signals, remote_set_syscall_catchpoint)
4212 (remote_program_signals, )
4213 (remote_thread_always_alive): Remove target_ops parameter.
4214 (remote_thread_alive, remote_thread_name)
4215 (remote_update_thread_list, remote_threads_extra_info)
4216 (remote_static_tracepoint_marker_at)
4217 (remote_static_tracepoint_markers_by_strid)
4218 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4219 (remote_open): Refactor as methods of remote_target.
4220 (extended_remote_open, extended_remote_detach)
4221 (extended_remote_attach, extended_remote_post_attach):
4222 (extended_remote_supports_disable_randomization)
4223 (extended_remote_create_inferior): : Refactor as method of
4224 extended_remote_target.
4225 (remote_set_permissions, remote_open_1, remote_detach)
4226 (remote_follow_fork, remote_follow_exec, remote_disconnect)
4227 (remote_resume, remote_commit_resume, remote_stop)
4228 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4229 (remote_terminal_ours, remote_wait, remote_fetch_registers)
4230 (remote_prepare_to_store, remote_store_registers)
4231 (remote_flash_erase, remote_flash_done, remote_files_info)
4232 (remote_kill, remote_mourn, remote_insert_breakpoint)
4233 (remote_remove_breakpoint, remote_insert_watchpoint)
4234 (remote_watchpoint_addr_within_range)
4235 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4236 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4237 (remote_supports_stopped_by_sw_breakpoint)
4238 (remote_stopped_by_hw_breakpoint)
4239 (remote_supports_stopped_by_hw_breakpoint)
4240 (remote_stopped_by_watchpoint, remote_stopped_data_address)
4241 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4242 (remote_verify_memory): Refactor as methods of remote_target.
4243 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4245 (remote_xfer_partial, remote_get_memory_xfer_limit)
4246 (remote_search_memory, remote_rcmd, remote_memory_map)
4247 (remote_pid_to_str, remote_get_thread_local_address)
4248 (remote_get_tib_address, remote_read_description): Refactor as
4249 methods of remote_target.
4250 (remote_target::fileio_open, remote_target::fileio_pwrite)
4251 (remote_target::fileio_pread, remote_target::fileio_close): New.
4252 (remote_hostio_readlink, remote_hostio_fstat)
4253 (remote_filesystem_is_local, remote_can_execute_reverse)
4254 (remote_supports_non_stop, remote_supports_disable_randomization)
4255 (remote_supports_multi_process, remote_supports_cond_breakpoints)
4256 (remote_supports_enable_disable_tracepoint)
4257 (remote_supports_string_tracing)
4258 (remote_can_run_breakpoint_commands, remote_trace_init)
4259 (remote_download_tracepoint, remote_can_download_tracepoint)
4260 (remote_download_trace_state_variable, remote_enable_tracepoint)
4261 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
4262 (remote_trace_start, remote_get_trace_status)
4263 (remote_get_tracepoint_status, remote_trace_stop)
4264 (remote_trace_find, remote_get_trace_state_variable_value)
4265 (remote_save_trace_data, remote_get_raw_trace_data)
4266 (remote_set_disconnected_tracing, remote_core_of_thread)
4267 (remote_set_circular_trace_buffer, remote_traceframe_info)
4268 (remote_get_min_fast_tracepoint_insn_len)
4269 (remote_set_trace_buffer_size, remote_set_trace_notes)
4270 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
4271 (remote_disable_btrace, remote_teardown_btrace)
4272 (remote_read_btrace, remote_btrace_conf)
4273 (remote_augmented_libraries_svr4_read, remote_load)
4274 (remote_pid_to_exec_file, remote_can_do_single_step)
4275 (remote_execution_direction, remote_thread_handle_to_thread_info):
4276 Refactor as methods of remote_target.
4277 (init_remote_ops, init_extended_remote_ops): Delete.
4278 (remote_can_async_p, remote_is_async_p, remote_async)
4279 (remote_thread_events, remote_upload_tracepoints)
4280 (remote_upload_trace_state_variables): Refactor as methods of
4282 (_initialize_remote): Remove references to init_remote_ops and
4283 init_extended_remote_ops.
4285 * remote-sim.c (gdbsim_target): New class.
4286 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
4287 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
4288 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
4289 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
4290 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
4291 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
4292 Refactor as methods of gdbsim_target.
4293 (gdbsim_ops): Now a gdbsim_target.
4294 (init_gdbsim_ops): Delete.
4295 (gdbsim_cntrl_c): Adjust.
4296 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
4298 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
4299 (the_amd64_linux_nat_target): New.
4300 (amd64_linux_fetch_inferior_registers)
4301 (amd64_linux_store_inferior_registers): Refactor as methods of
4302 amd64_linux_nat_target.
4303 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
4304 * i386-linux-nat.c: Don't include "linux-nat.h".
4305 (i386_linux_nat_target): New class.
4306 (the_i386_linux_nat_target): New.
4307 (i386_linux_fetch_inferior_registers)
4308 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
4309 as methods of i386_linux_nat_target.
4310 (_initialize_i386_linux_nat): Adjust. Set linux_target.
4311 * inf-child.c (inf_child_ops): Delete.
4312 (inf_child_fetch_inferior_registers)
4313 (inf_child_store_inferior_registers): Delete.
4314 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
4315 methods of inf_child_target.
4316 (inf_child_target::supports_terminal_ours)
4317 (inf_child_target::terminal_init)
4318 (inf_child_target::terminal_inferior)
4319 (inf_child_target::terminal_ours_for_output)
4320 (inf_child_target::terminal_ours, inf_child_target::interrupt)
4321 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
4323 (inf_child_open, inf_child_disconnect, inf_child_close)
4324 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
4325 (inf_child_post_startup_inferior, inf_child_can_run)
4326 (inf_child_pid_to_exec_file): Refactor as methods of
4328 (inf_child_follow_fork): Delete.
4329 (inf_child_target::can_create_inferior)
4330 (inf_child_target::can_attach): New.
4331 (inf_child_target::has_all_memory, inf_child_target::has_memory)
4332 (inf_child_target::has_stack, inf_child_target::has_registers)
4333 (inf_child_target::has_execution): New.
4334 (inf_child_fileio_open, inf_child_fileio_pwrite)
4335 (inf_child_fileio_pread, inf_child_fileio_fstat)
4336 (inf_child_fileio_close, inf_child_fileio_unlink)
4337 (inf_child_fileio_readlink, inf_child_use_agent)
4338 (inf_child_can_use_agent): Refactor as methods of
4340 (return_zero, inf_child_target): Delete.
4341 (inf_child_target::inf_child_target): New.
4342 * inf-child.h: Include "target.h".
4343 (inf_child_target): Delete function prototype.
4344 (inf_child_target): New class.
4345 (inf_child_open_target, inf_child_mourn_inferior)
4346 (inf_child_maybe_unpush_target): Delete.
4347 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
4348 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
4349 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
4350 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
4351 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
4352 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
4353 (inf_ptrace_wait, inf_ptrace_xfer_partial)
4354 (inf_ptrace_thread_alive, inf_ptrace_files_info)
4355 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
4356 methods of inf_ptrace_target.
4357 (inf_ptrace_target): Delete function.
4358 * inf-ptrace.h: Include "inf-child.h".
4359 (inf_ptrace_target): Delete function declaration.
4360 (inf_ptrace_target): New class.
4361 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
4362 * linux-nat.c (linux_target): New.
4363 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
4364 (linux_nat_target::~linux_nat_target): New.
4365 (linux_child_post_attach, linux_child_post_startup_inferior)
4366 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
4367 (linux_child_remove_fork_catchpoint)
4368 (linux_child_insert_vfork_catchpoint)
4369 (linux_child_remove_vfork_catchpoint)
4370 (linux_child_insert_exec_catchpoint)
4371 (linux_child_remove_exec_catchpoint)
4372 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
4373 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
4374 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
4375 (linux_nat_stopped_data_address)
4376 (linux_nat_stopped_by_sw_breakpoint)
4377 (linux_nat_supports_stopped_by_sw_breakpoint)
4378 (linux_nat_stopped_by_hw_breakpoint)
4379 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
4380 (linux_nat_kill, linux_nat_mourn_inferior)
4381 (linux_nat_xfer_partial, linux_nat_thread_alive)
4382 (linux_nat_update_thread_list, linux_nat_pid_to_str)
4383 (linux_nat_thread_name, linux_child_pid_to_exec_file)
4384 (linux_child_static_tracepoint_markers_by_strid)
4385 (linux_nat_is_async_p, linux_nat_can_async_p)
4386 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
4387 (linux_nat_supports_multi_process)
4388 (linux_nat_supports_disable_randomization, linux_nat_async)
4389 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
4390 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
4391 (linux_nat_fileio_open, linux_nat_fileio_readlink)
4392 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
4393 methods of linux_nat_target.
4394 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
4395 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
4397 (check_stopped_by_watchpoint): Adjust.
4398 (linux_xfer_partial): Delete.
4399 (linux_target_install_ops, linux_target, linux_nat_add_target):
4401 (linux_nat_target::linux_nat_target): New.
4402 * linux-nat.h: Include "inf-ptrace.h".
4403 (linux_nat_target): New.
4404 (linux_target, linux_target_install_ops, linux_nat_add_target):
4405 Delete function declarations.
4406 (linux_target): Declare global.
4407 * linux-thread-db.c (thread_db_target): New.
4408 (thread_db_target::thread_db_target): New.
4409 (thread_db_ops): Delete.
4410 (the_thread_db_target): New.
4411 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
4412 (thread_db_update_thread_list, thread_db_pid_to_str)
4413 (thread_db_extra_thread_info)
4414 (thread_db_thread_handle_to_thread_info)
4415 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
4416 (thread_db_resume): Refactor as methods of thread_db_target.
4417 (init_thread_db_ops): Delete.
4418 (_initialize_thread_db): Remove reference to init_thread_db_ops.
4419 * x86-linux-nat.c: Don't include "linux-nat.h".
4420 (super_post_startup_inferior): Delete.
4421 (x86_linux_nat_target::~x86_linux_nat_target): New.
4422 (x86_linux_child_post_startup_inferior)
4423 (x86_linux_read_description, x86_linux_enable_btrace)
4424 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
4425 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
4426 methods of x86_linux_nat_target.
4427 (x86_linux_create_target): Delete. Bits folded ...
4428 (x86_linux_add_target): ... here. Now takes a linux_nat_target
4430 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
4431 (x86_linux_nat_target): New class.
4432 (x86_linux_create_target): Delete.
4433 (x86_linux_add_target): Now takes a linux_nat_target pointer.
4434 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
4435 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
4436 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
4437 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
4438 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
4440 (x86_use_watchpoints): Delete.
4441 * x86-nat.h: Include "breakpoint.h" and "target.h".
4442 (x86_use_watchpoints): Delete.
4443 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
4444 (x86_stopped_by_watchpoint, x86_stopped_data_address)
4445 (x86_insert_watchpoint, x86_remove_watchpoint)
4446 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
4447 (x86_stopped_by_hw_breakpoint): New declarations.
4448 (x86_nat_target): New template class.
4450 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
4451 (the_ppc_linux_nat_target): New.
4452 (ppc_linux_fetch_inferior_registers)
4453 (ppc_linux_can_use_hw_breakpoint)
4454 (ppc_linux_region_ok_for_hw_watchpoint)
4455 (ppc_linux_ranged_break_num_registers)
4456 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
4457 (ppc_linux_insert_mask_watchpoint)
4458 (ppc_linux_remove_mask_watchpoint)
4459 (ppc_linux_can_accel_watchpoint_condition)
4460 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
4461 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
4462 (ppc_linux_watchpoint_addr_within_range)
4463 (ppc_linux_masked_watch_num_registers)
4464 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
4465 (ppc_linux_read_description): Refactor as methods of
4466 ppc_linux_nat_target.
4467 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
4469 * procfs.c (procfs_xfer_partial): Delete forward declaration.
4470 (procfs_target): New class.
4471 (the_procfs_target): New.
4472 (procfs_target): Delete function.
4473 (procfs_auxv_parse, procfs_attach, procfs_detach)
4474 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
4475 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
4476 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
4477 (procfs_create_inferior, procfs_update_thread_list)
4478 (procfs_thread_alive, procfs_pid_to_str)
4479 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
4480 (procfs_stopped_data_address, procfs_insert_watchpoint)
4481 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
4482 (proc_find_memory_regions, procfs_info_proc)
4483 (procfs_make_note_section): Refactor as methods of procfs_target.
4484 (_initialize_procfs): Adjust.
4485 * sol-thread.c (sol_thread_target): New class.
4486 (sol_thread_ops): Now a sol_thread_target.
4487 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
4488 (sol_thread_fetch_registers, sol_thread_store_registers)
4489 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
4490 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
4491 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
4492 (init_sol_thread_ops): Delete.
4493 (_initialize_sol_thread): Adjust. Remove references to
4494 init_sol_thread_ops and complete_target_initialization.
4496 * windows-nat.c (windows_nat_target): New class.
4497 (windows_fetch_inferior_registers)
4498 (windows_store_inferior_registers, windows_resume, windows_wait)
4499 (windows_attach, windows_detach, windows_pid_to_exec_file)
4500 (windows_files_info, windows_create_inferior)
4501 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
4502 (windows_close, windows_pid_to_str, windows_xfer_partial)
4503 (windows_get_tib_address, windows_get_ada_task_ptid)
4504 (windows_thread_name, windows_thread_alive): Refactor as
4505 windows_nat_target methods.
4506 (do_initial_windows_stuff): Adjust.
4507 (windows_target): Delete function.
4508 (_initialize_windows_nat): Adjust.
4510 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
4511 (darwin_mourn_inferior, darwin_kill_inferior)
4512 (darwin_create_inferior, darwin_attach, darwin_detach)
4513 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
4514 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
4515 (darwin_supports_multi_process): Refactor as darwin_nat_target
4517 (darwin_resume_to, darwin_files_info): Delete.
4518 (_initialize_darwin_inferior): Rename to ...
4519 (_initialize_darwin_nat): ... this. Adjust to C++ification.
4520 * darwin-nat.h: Include "inf-child.h".
4521 (darwin_nat_target): New class.
4522 (darwin_complete_target): Delete.
4523 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
4524 (darwin_target): New.
4525 (i386_darwin_fetch_inferior_registers)
4526 (i386_darwin_store_inferior_registers): Refactor as methods of
4528 (darwin_complete_target): Delete, with ...
4529 (_initialize_i386_darwin_nat): ... bits factored out here.
4531 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
4532 (the_alpha_linux_nat_target): New.
4533 (alpha_linux_register_u_offset): Refactor as
4534 alpha_linux_nat_target method.
4535 (_initialize_alpha_linux_nat): Adjust.
4536 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
4537 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4538 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
4539 methods of linux_nat_trad_target.
4540 (linux_trad_target): Delete.
4541 * linux-nat-trad.h (linux_trad_target): Delete function.
4542 (linux_nat_trad_target): New class.
4543 * mips-linux-nat.c (mips_linux_nat_target): New class.
4544 (super_fetch_registers, super_store_registers, super_close):
4546 (the_mips_linux_nat_target): New.
4547 (mips64_linux_regsets_fetch_registers)
4548 (mips64_linux_regsets_store_registers)
4549 (mips64_linux_fetch_registers, mips64_linux_store_registers)
4550 (mips_linux_register_u_offset, mips_linux_read_description)
4551 (mips_linux_can_use_hw_breakpoint)
4552 (mips_linux_stopped_by_watchpoint)
4553 (mips_linux_stopped_data_address)
4554 (mips_linux_region_ok_for_hw_watchpoint)
4555 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
4556 (mips_linux_close): Refactor as methods of mips_linux_nat.
4557 (_initialize_mips_linux_nat): Adjust to C++ification.
4559 * aix-thread.c (aix_thread_target): New class.
4560 (aix_thread_ops): Now an aix_thread_target.
4561 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
4562 (aix_thread_fetch_registers, aix_thread_store_registers)
4563 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
4564 (aix_thread_thread_alive, aix_thread_pid_to_str)
4565 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
4566 Refactor as methods of aix_thread_target.
4567 (init_aix_thread_ops): Delete.
4568 (_initialize_aix_thread): Remove references to init_aix_thread_ops
4569 and complete_target_initialization.
4570 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
4571 (rs6000_nat_target): New class.
4572 (the_rs6000_nat_target): New.
4573 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
4574 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
4575 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
4576 (super_create_inferior): Delete.
4577 (_initialize_rs6000_nat): Adjust to C++ification.
4579 * arm-linux-nat.c (arm_linux_nat_target): New class.
4580 (the_arm_linux_nat_target): New.
4581 (arm_linux_fetch_inferior_registers)
4582 (arm_linux_store_inferior_registers, arm_linux_read_description)
4583 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
4584 (arm_linux_remove_hw_breakpoint)
4585 (arm_linux_region_ok_for_hw_watchpoint)
4586 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
4587 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
4588 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
4589 arm_linux_nat_target.
4590 (_initialize_arm_linux_nat): Adjust to C++ification.
4592 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
4593 (the_aarch64_linux_nat_target): New.
4594 (aarch64_linux_fetch_inferior_registers)
4595 (aarch64_linux_store_inferior_registers)
4596 (aarch64_linux_child_post_startup_inferior)
4597 (aarch64_linux_read_description)
4598 (aarch64_linux_can_use_hw_breakpoint)
4599 (aarch64_linux_insert_hw_breakpoint)
4600 (aarch64_linux_remove_hw_breakpoint)
4601 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
4602 (aarch64_linux_region_ok_for_hw_watchpoint)
4603 (aarch64_linux_stopped_data_address)
4604 (aarch64_linux_stopped_by_watchpoint)
4605 (aarch64_linux_watchpoint_addr_within_range)
4606 (aarch64_linux_can_do_single_step): Refactor as methods of
4607 aarch64_linux_nat_target.
4608 (super_post_startup_inferior): Delete.
4609 (_initialize_aarch64_linux_nat): Adjust to C++ification.
4611 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
4612 (the_hppa_linux_nat_target): New.
4613 (hppa_linux_fetch_inferior_registers)
4614 (hppa_linux_store_inferior_registers): Refactor as methods of
4615 hppa_linux_nat_target.
4616 (_initialize_hppa_linux_nat): Adjust to C++ification.
4618 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
4619 (the_ia64_linux_nat_target): New.
4620 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
4621 (ia64_linux_stopped_data_address)
4622 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
4623 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
4624 ia64_linux_nat_target methods.
4625 (super_xfer_partial): Delete.
4626 (_initialize_ia64_linux_nat): Adjust to C++ification.
4628 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
4629 (the_m32r_linux_nat_target): New.
4630 (m32r_linux_fetch_inferior_registers)
4631 (m32r_linux_store_inferior_registers): Refactor as
4632 m32r_linux_nat_target methods.
4633 (_initialize_m32r_linux_nat): Adjust to C++ification.
4635 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
4636 (the_m68k_linux_nat_target): New.
4637 (m68k_linux_fetch_inferior_registers)
4638 (m68k_linux_store_inferior_registers): Refactor as
4639 m68k_linux_nat_target methods.
4640 (_initialize_m68k_linux_nat): Adjust to C++ification.
4642 * s390-linux-nat.c (s390_linux_nat_target): New class.
4643 (the_s390_linux_nat_target): New.
4644 (s390_linux_fetch_inferior_registers)
4645 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
4646 (s390_insert_watchpoint, s390_remove_watchpoint)
4647 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
4648 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
4649 (s390_auxv_parse, s390_read_description): Refactor as methods of
4650 s390_linux_nat_target.
4651 (_initialize_s390_nat): Adjust to C++ification.
4653 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
4654 (the_sparc_linux_nat_target): New.
4655 (_initialize_sparc_linux_nat): Adjust to C++ification.
4656 * sparc-nat.c (sparc_fetch_inferior_registers)
4657 (sparc_store_inferior_registers): Remove target_ops parameter.
4658 * sparc-nat.h (sparc_fetch_inferior_registers)
4659 (sparc_store_inferior_registers): Remove target_ops parameter.
4660 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
4661 (the_sparc64_linux_nat_target): New.
4662 (_initialize_sparc64_linux_nat): Adjust to C++ification.
4664 * spu-linux-nat.c (spu_linux_nat_target): New class.
4665 (the_spu_linux_nat_target): New.
4666 (spu_child_post_startup_inferior, spu_child_post_attach)
4667 (spu_child_wait, spu_fetch_inferior_registers)
4668 (spu_store_inferior_registers, spu_xfer_partial)
4669 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
4671 (_initialize_spu_nat): Adjust to C++ification.
4673 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
4674 (the_tilegx_linux_nat_target): New.
4675 (fetch_inferior_registers, store_inferior_registers):
4676 Refactor as methods.
4677 (_initialize_tile_linux_nat): Adjust to C++ification.
4679 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
4680 (the_xtensa_linux_nat_target): New.
4681 (xtensa_linux_fetch_inferior_registers)
4682 (xtensa_linux_store_inferior_registers): Refactor as
4683 xtensa_linux_nat_target methods.
4684 (_initialize_xtensa_linux_nat): Adjust to C++ification.
4686 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
4687 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
4688 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
4689 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
4690 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
4691 (fbsd_stopped_by_sw_breakpoint)
4692 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
4693 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
4694 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
4695 (fbsd_post_startup_inferior, fbsd_post_attach)
4696 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
4697 (fbsd_set_syscall_catchpoint)
4698 (super_xfer_partial, super_resume, super_wait)
4699 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
4700 (fbsd_handle_debug_trap): Remove target_ops parameter.
4701 (fbsd_nat_add_target): Delete.
4702 * fbsd-nat.h: Include "inf-ptrace.h".
4703 (fbsd_nat_add_target): Delete.
4704 (USE_SIGTRAP_SIGINFO): Define.
4705 (fbsd_nat_target): New class.
4707 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
4708 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
4709 (amd64bsd_target): Delete.
4710 * amd64-bsd-nat.h: New file.
4711 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
4713 (amd64_fbsd_nat_target): New class.
4714 (the_amd64_fbsd_nat_target): New.
4715 (amd64fbsd_read_description): Refactor as method of
4716 amd64_fbsd_nat_target.
4717 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4718 (_initialize_amd64fbsd_nat): Adjust to C++ification.
4719 * amd64-nat.h (amd64bsd_target): Delete function declaration.
4720 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
4721 (i386bsd_store_inferior_registers): Remove target_ops parameter.
4722 (i386bsd_target): Delete.
4723 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
4724 (i386bsd_fetch_inferior_registers)
4725 (i386bsd_store_inferior_registers): Declare.
4726 (i386_bsd_nat_target): New class.
4727 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
4728 (the_i386_fbsd_nat_target): New.
4729 (i386fbsd_resume, i386fbsd_read_description): Refactor as
4730 i386_fbsd_nat_target methods.
4731 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4732 (_initialize_i386fbsd_nat): Adjust to C++ification.
4733 * x86-bsd-nat.c (super_mourn_inferior): Delete.
4734 (x86bsd_mourn_inferior, x86bsd_target): Delete.
4735 (_initialize_x86_bsd_nat): Adjust to C++ification.
4736 * x86-bsd-nat.h: Include "x86-nat.h".
4737 (x86bsd_target): Delete declaration.
4738 (x86bsd_nat_target): New class.
4740 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
4741 (the_aarch64_fbsd_nat_target): New.
4742 (aarch64_fbsd_fetch_inferior_registers)
4743 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
4744 aarch64_fbsd_nat_target.
4745 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
4746 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
4747 (the_alpha_bsd_nat_target): New.
4748 (alphabsd_fetch_inferior_registers)
4749 (alphabsd_store_inferior_registers): Refactor as
4750 alpha_bsd_nat_target methods.
4751 (_initialize_alphabsd_nat): Refactor as methods of
4752 alpha_bsd_nat_target.
4753 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
4754 (the_amd64_nbsd_nat_target): New.
4755 (_initialize_amd64nbsd_nat): Adjust to C++ification.
4756 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
4757 (the_amd64_obsd_nat_target): New.
4758 (_initialize_amd64obsd_nat): Adjust to C++ification.
4759 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
4760 (the_arm_fbsd_nat_target): New.
4761 (arm_fbsd_fetch_inferior_registers)
4762 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
4763 (_initialize_arm_fbsd_nat): Refactor as methods of
4764 arm_fbsd_nat_target.
4765 (_initialize_arm_fbsd_nat): Adjust to C++ification.
4766 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
4767 (the_arm_netbsd_nat_target): New.
4768 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
4769 arm_netbsd_nat_target.
4770 (_initialize_arm_netbsd_nat): Adjust to C++ification.
4771 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
4772 (the_hppa_nbsd_nat_target): New.
4773 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
4774 hppa_nbsd_nat_target methods.
4775 (_initialize_hppanbsd_nat): Adjust to C++ification.
4776 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
4777 (the_hppa_obsd_nat_target): New.
4778 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
4779 methods of hppa_obsd_nat_target.
4780 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
4782 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
4783 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
4785 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
4786 (_initialize_i386obsd_nat): Use add_target.
4787 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
4788 (the_m68k_bsd_nat_target): New.
4789 (m68kbsd_fetch_inferior_registers)
4790 (m68kbsd_store_inferior_registers): Refactor as methods of
4791 m68k_bsd_nat_target.
4792 (_initialize_m68kbsd_nat): Adjust to C++ification.
4793 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
4794 (the_mips_fbsd_nat_target): New.
4795 (mips_fbsd_fetch_inferior_registers)
4796 (mips_fbsd_store_inferior_registers): Refactor as methods of
4797 mips_fbsd_nat_target.
4798 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
4800 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
4801 (the_mips_nbsd_nat_target): New.
4802 (mipsnbsd_fetch_inferior_registers)
4803 (mipsnbsd_store_inferior_registers): Refactor as methods of
4804 mips_nbsd_nat_target.
4805 (_initialize_mipsnbsd_nat): Adjust to C++ification.
4806 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
4807 (the_mips64_obsd_nat_target): New.
4808 (mips64obsd_fetch_inferior_registers)
4809 (mips64obsd_store_inferior_registers): Refactor as methods of
4810 mips64_obsd_nat_target.
4811 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
4813 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
4815 * nbsd-nat.h: Include "inf-ptrace.h".
4816 (nbsd_nat_target): New class.
4817 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
4818 (obsd_wait): Refactor as methods of obsd_nat_target.
4819 (obsd_add_target): Delete.
4820 * obsd-nat.h: Include "inf-ptrace.h".
4821 (obsd_nat_target): New class.
4822 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
4823 (the_ppc_fbsd_nat_target): New.
4824 (ppcfbsd_fetch_inferior_registers)
4825 (ppcfbsd_store_inferior_registers): Refactor as methods of
4826 ppc_fbsd_nat_target.
4827 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
4829 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
4830 (the_ppc_nbsd_nat_target): New.
4831 (ppcnbsd_fetch_inferior_registers)
4832 (ppcnbsd_store_inferior_registers): Refactor as methods of
4833 ppc_nbsd_nat_target.
4834 (_initialize_ppcnbsd_nat): Adjust to C++ification.
4835 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
4836 (the_ppc_obsd_nat_target): New.
4837 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
4838 methods of ppc_obsd_nat_target.
4839 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
4841 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
4842 (the_sh_nbsd_nat_target): New.
4843 (shnbsd_fetch_inferior_registers)
4844 (shnbsd_store_inferior_registers): Refactor as methods of
4846 (_initialize_shnbsd_nat): Adjust to C++ification.
4847 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
4848 (inf_ptrace_xfer_partial): Delete.
4849 (sparc_xfer_partial, sparc_target): Delete.
4850 * sparc-nat.h (sparc_fetch_inferior_registers)
4851 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
4852 (sparc_target): Delete function declaration.
4853 (sparc_target): New template class.
4854 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
4855 (_initialize_sparcnbsd_nat): Adjust to C++ification.
4856 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
4857 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
4859 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
4860 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
4861 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
4862 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
4864 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
4865 (the_vax_bsd_nat_target): New.
4866 (vaxbsd_fetch_inferior_registers)
4867 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
4869 (_initialize_vaxbsd_nat): Adjust to C++ification.
4871 * bsd-kvm.c (bsd_kvm_target): New class.
4872 (bsd_kvm_ops): Now a bsd_kvm_target.
4873 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
4874 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
4875 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
4877 (bsd_kvm_return_one): Delete.
4878 (bsd_kvm_add_target): Adjust to C++ification.
4880 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
4881 (nto_procfs_target_procfs): New classes.
4882 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
4883 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
4884 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
4885 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
4886 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
4887 (procfs_remove_hw_breakpoint, procfs_resume)
4888 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
4889 (procfs_kill_inferior, procfs_store_registers)
4890 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
4891 as methods of nto_procfs_target.
4892 (nto_procfs_ops): Now an nto_procfs_target_procfs.
4893 (nto_native_ops): Delete.
4894 (procfs_open, procfs_native_open): Delete.
4895 (nto_native_ops): Now an nto_procfs_target_native.
4896 (init_procfs_targets): Adjust to C++ification.
4897 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
4898 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
4899 Refactor as methods of nto_procfs_target.
4901 * go32-nat.c (go32_nat_target): New class.
4902 (the_go32_nat_target): New.
4903 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
4904 (go32_store_registers, go32_xfer_partial, go32_files_info)
4905 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
4906 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
4907 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
4908 (go32_pid_to_str): Refactor as methods of go32_nat_target.
4909 (go32_target): Delete.
4910 (_initialize_go32_nat): Adjust to C++ification.
4912 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
4913 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
4914 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
4915 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
4917 (gnu_target): Delete.
4918 * gnu-nat.h (gnu_target): Delete.
4919 (gnu_nat_target): New class.
4920 * i386-gnu-nat.c (gnu_base_target): New.
4921 (i386_gnu_nat_target): New class.
4922 (the_i386_gnu_nat_target): New.
4923 (_initialize_i386gnu_nat): Adjust to C++ification.
4925 2018-05-02 Pedro Alves <palves@redhat.com>
4927 * bfd-target.c (target_bfd_xclose): Rename to ...
4928 (target_bfd_close): ... this.
4929 (target_bfd_reopen): Adjust.
4930 * target.c (target_close): Remove references to to_xclose.
4931 * target.h (target_ops::to_xclose): Delete.
4932 (target_ops::to_close): Update comments.
4934 2018-05-02 Pedro Alves <palves@redhat.com>
4936 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
4938 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
4939 * inf-ptrace.c (inf_ptrace_register_u_offset)
4940 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4941 (inf_ptrace_store_register, inf_ptrace_store_registers)
4942 (inf_ptrace_trad_target): Move to ...
4943 * linux-nat-trad.c: ... this new file.
4944 * linux-nat-trad.h: New file.
4945 * linux-nat.c (linux_target_install_ops): Make extern.
4946 (linux_trad_target): Delete.
4947 * linux-nat.h (linux_trad_target): Delete declaration.
4948 (linux_target_install_ops): Declare.
4949 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
4952 2018-05-02 Pedro Alves <palves@redhat.com>
4954 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
4955 procfs_target/add_target here.
4956 * procfs.c (procfs_target): Make static.
4957 (_initialize_procfs): Call add_target here.
4958 * procfs.h (struct target_ops): Remove forward declaration.
4959 (procfs_target): Remove declaration.
4960 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
4962 2018-05-02 Pedro Alves <palves@redhat.com>
4964 * procfs.c (procfs_stopped_by_watchpoint)
4965 (procfs_insert_watchpoint, procfs_remove_watchpoint)
4966 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
4968 (procfs_use_watchpoints): Delete, move contents...
4969 (procfs_target): ... here.
4970 * procfs.h (procfs_use_watchpoints): Delete declaration.
4971 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
4972 procfs_use_watchpoints.
4973 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
4974 procfs_use_watchpoints.
4976 2018-05-02 Tom Tromey <tom@tromey.com>
4979 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
4980 and var_zuinteger_unlimited.
4981 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
4982 and PARAM_ZUINTEGER_UNLIMITED.
4983 (set_parameter_value): Handle var_zuinteger and
4984 var_zuinteger_unlimited.
4985 (add_setshow_generic): Likewise.
4986 (parmpy_init): Likewise.
4988 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
4991 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
4992 pointer is not null before dereferencing it.
4994 2018-04-30 Tom Tromey <tom@tromey.com>
4996 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
4999 2018-04-30 Tom Tromey <tom@tromey.com>
5001 * breakpoint.c (mention): Remove use of is_mi_like_p.
5002 (print_mention_ranged_breakpoint): Likewise.
5003 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
5006 2018-04-30 Tom Tromey <tom@tromey.com>
5008 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5010 2018-04-30 Tom Tromey <tom@tromey.com>
5012 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5013 (info_spu_event_command): Remove some uses of is_mi_like_p.
5015 2018-04-30 Tom Tromey <tom@tromey.com>
5017 * python/py-framefilter.c (py_print_single_arg)
5018 (enumerate_locals, py_print_args, py_print_frame): Remove some
5019 uses of is_mi_like_p.
5021 2018-04-30 Tom Tromey <tom@tromey.com>
5024 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5025 * ui-out.h (ui_out::is_mi_like_p): Now const.
5026 (ui_out::do_is_mi_like_p): Now const.
5027 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5029 2018-04-30 Tom Tromey <tom@tromey.com>
5031 * varobj.c (varobj_set_visualizer): Use new_reference.
5032 * python/python.c (gdbpy_decode_line): Use new_reference.
5033 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5036 2018-04-30 Tom Tromey <tom@tromey.com>
5038 * varobj.c (install_new_value): Use new_reference.
5039 * value.h (value_incref): Return void. Swap intro comment with
5041 * value.c (set_value_parent): Use new_reference.
5042 (value_incref): Return void. Update intro comment.
5043 (release_value): Use new_reference.
5044 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5046 2018-04-30 Tom Tromey <tom@tromey.com>
5048 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5049 * gdb_bfd.h (new_bfd_ref): Remove.
5050 (gdb_bfd_open): Update comment.
5051 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5052 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5053 (gdb_bfd_fdopenr): Use new_reference.
5054 * exec.c (exec_file_attach): Use new_reference.
5056 2018-04-30 Tom Tromey <tom@tromey.com>
5058 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5061 2018-04-30 Tom Tromey <tom@tromey.com>
5063 * jit.c (jit_read_code_entry): Use type_align.
5064 * i386-tdep.c (i386_gdbarch_init): Don't call
5065 set_gdbarch_long_long_align_bit.
5066 * gdbarch.sh: Remove long_long_align_bit.
5067 * gdbarch.c, gdbarch.h: Rebuild.
5068 * arc-tdep.c (arc_type_align): New function.
5069 (arc_gdbarch_init): Use arc_type_align. Don't call
5070 set_gdbarch_long_long_align_bit.
5072 2018-04-30 Tom Tromey <tom@tromey.com>
5074 * rust-lang.c (rust_type_alignment): Remove.
5075 (rust_composite_type): Use type_align.
5077 2018-04-30 Tom Tromey <tom@tromey.com>
5079 * NEWS: Mention Type.align.
5080 * python/py-type.c (typy_get_alignof): New function.
5081 (type_object_getset): Add "alignof".
5083 2018-04-30 Tom Tromey <tom@tromey.com>
5087 * std-operator.def (UNOP_ALIGNOF): New operator.
5088 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5090 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5091 * c-lang.c (c_op_print_tab): Add alignof.
5092 * c-exp.y (ALIGNOF): New token.
5093 (exp): Add "ALIGNOF" production.
5094 (ident_tokens): Add _Alignof and alignof.
5096 2018-04-30 Tom Tromey <tom@tromey.com>
5098 * i386-tdep.c (i386_type_align): New function.
5099 (i386_gdbarch_init): Update.
5100 * gdbarch.sh (type_align): New method.
5101 * gdbarch.c, gdbarch.h: Rebuild.
5102 * arch-utils.h (default_type_align): Declare.
5103 * arch-utils.c (default_type_align): New function.
5104 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
5105 (struct type) <align_log2>: New field.
5106 <instance_flags>: Now a bitfield.
5107 (TYPE_RAW_ALIGN): New macro.
5108 (type_align, type_raw_align, set_type_align): Declare.
5109 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
5111 * dwarf2read.c (quirk_rust_enum): Set type alignment.
5112 (get_alignment, maybe_set_alignment): New functions.
5113 (read_structure_type, read_enumeration_type, read_array_type)
5114 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
5115 (read_subrange_type, read_base_type): Set type alignment.
5117 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
5119 * dwarf2read.c (read_index_from_section): Use bool.
5121 2018-04-29 Fabian Groffen <grobian@gentoo.org>
5124 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
5127 2018-04-29 John Reiser <jreiser@BitWagon.com>
5130 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5131 last step, and do it atomically.
5133 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
5135 * compile/compile-c-types.c (convert_int, convert_float):
5138 2018-04-27 Tom Tromey <tom@tromey.com>
5141 * rust-lang.c (rust_inclusive_range_type_p): New function.
5142 (rust_range): Handle inclusive ranges.
5143 (rust_compute_range): Likewise.
5144 * rust-exp.y (struct rust_op) <inclusive>: New field.
5145 (DOTDOTEQ): New constant.
5146 (range_expr): Add "..=" productions.
5147 (operator_tokens): Add "..=" token.
5148 (ast_range): Add "inclusive" parameter.
5149 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5151 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5153 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5154 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5156 * expprint.c (print_subexp_standard): Handle new bounds values.
5157 (dump_subexp_body_standard): Likewise.
5159 2018-04-27 Tom Tromey <tom@tromey.com>
5161 * configure: Rebuild.
5162 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5163 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5165 (class symbol_needs_eval_context): Likewise.
5166 * dwarf2read.c (mock_mapped_index::symbol_name_count)
5167 (mock_mapped_index::symbol_name_at): Use "override". Remove
5169 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5171 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5172 * aarch64-tdep.c (instruction_reader::read): Use "override".
5173 (instruction_reader_test::read): Likewise.
5174 * arm-tdep.c (instruction_reader::read): Use "override".
5175 (instruction_reader_thumb::read): Likewise.
5177 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
5180 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5181 instead of remote_send.
5182 (remote_send): Remove.
5184 2018-04-26 Pedro Alves <palves@redhat.com>
5186 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5187 find_function_start_sal instead of find_pc_line.
5189 2018-04-26 Pedro Alves <palves@redhat.com>
5191 * breakpoint.c (set_breakpoint_location_function): Handle
5193 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5194 * elfread.c (elf_symtab_read): Give data symbols with
5195 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5196 (elf_rel_plt_read): Update comment.
5197 * linespec.c (convert_linespec_to_sals): Handle
5199 (minsym_found): Handle mst_data_gnu_ifunc.
5200 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5201 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5202 * parse.c (find_minsym_type_and_address): Handle
5204 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5205 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5206 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5208 <mst_data_gnu_ifunc>: New enumerator.
5210 2018-04-26 Pedro Alves <palves@redhat.com>
5212 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5213 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5214 'want_trampoline' parameter by a lookup_msym_prefer parameter.
5216 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5217 (lookup_minimal_symbol_by_pc): Adjust.
5218 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5219 (lookup_solib_trampoline_symbol_by_pc): Adjust.
5220 * minsyms.h (lookup_msym_prefer): New enum.
5221 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5222 parameter by a lookup_msym_prefer parameter.
5224 2018-04-26 Pedro Alves <palves@redhat.com>
5226 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5227 ends in "@plt" instead of looking at the symbol's section.
5229 2018-04-26 Pedro Alves <palves@redhat.com>
5231 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
5233 (find_pc_partial_function_gnu_ifunc): Rename to ...
5234 (find_pc_partial_function): ... this, and remove references to
5236 (find_pc_partial_function): Delete old implementation.
5237 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5239 2018-04-26 Pedro Alves <palves@redhat.com>
5241 * linespec.c (struct bound_minimal_symbol_search_key): New.
5242 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
5243 skip first line if we found a GNU ifunc minimal symbol by name.
5244 (compare_msymbols): Change parameters to work with a destructured
5246 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
5249 2018-04-26 Pedro Alves <palves@redhat.com>
5251 * breakpoint.c (set_breakpoint_location_function): Don't resolve
5252 ifunc targets here. Instead, if we have an ifunc minsym, use its
5254 (add_location_to_breakpoint): Store the minsym and the objfile in
5255 the breakpoint location.
5256 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
5257 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
5258 Record the minsym in the sal.
5259 * symtab.h (symtab_and_line) <msymbol>: New field.
5261 2018-04-26 Pedro Alves <palves@redhat.com>
5263 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
5264 unless we actually resolved the ifunc.
5266 2018-04-26 Pedro Alves <palves@redhat.com>
5268 * c-exp.y (variable production): Prefer ifunc minsyms over
5269 regular function symbols.
5270 * symtab.c (find_gnu_ifunc): New function.
5271 * minsyms.h (lookup_msym_prefer): New enum.
5272 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5273 parameter by a lookup_msym_prefer parameter.
5274 * symtab.h (find_gnu_ifunc): New declaration.
5276 2018-04-26 Pedro Alves <palves@redhat.com>
5278 * blockframe.c (find_gnu_ifunc_target_type): New function.
5279 (find_function_type): New.
5280 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
5281 return a value with a memory address.
5282 (eval_call): For calls to GNU ifunc functions, try to find the
5283 type of the target function from the type that the resolver
5285 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
5287 * infcall.c (find_function_return_type): Delete.
5288 (find_function_addr): Add 'function_type' parameter. For calls to
5289 GNU ifunc functions, try to find the type of the target function
5290 from the type that the resolver returns, and return it via
5292 (call_function_by_hand_dummy): Adjust to use the function type
5293 returned by find_function_addr.
5294 (find_function_addr): Add 'function_type' parameter and move
5296 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
5299 2018-04-26 Pedro Alves <palves@redhat.com>
5301 * c-exp.y (variable production): Skip finding an alias for ifunc
5304 2018-04-26 Pedro Alves <palves@redhat.com>
5306 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
5308 2018-04-25 Pedro Alves <palves@redhat.com>
5310 * infcmd.c (kill_command): Print the pid as string, not the whole
5311 thread's ptid. Add comment. s/has been killed/killed/ in output
5313 * remote.c (remote_detach_1): Print the pid as string, not the
5314 whole thread's ptid.
5316 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5317 Sergio Durigan Junior <sergiodj@redhat.com>
5318 Pedro Alves <palves@redhat.com>
5320 * infcmd.c (kill_command): Print message when inferior has
5322 * inferior.c (print_inferior_events): Remove 'static'. Set as
5324 (add_inferior): Improve message printed when
5325 'print_inferior_events' is on.
5326 (exit_inferior): Remove message printed when
5327 'print_inferior_events' is on.
5328 (detach_inferior): Improve message printed when
5329 'print_inferior_events' is on.
5330 (initialize_inferiors): Use 'add_inferior_silent' to set
5331 'current_inferior_'.
5332 * inferior.h (print_inferior_events): Declare here as
5334 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
5335 '[Detaching...]' messages when 'print_inferior_events' is on.
5336 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
5337 as prefix/suffix for messages. Remove periods. Fix erroneous
5338 'Detaching after fork from child...', replace it by '... from
5340 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
5341 prefix/suffix when printing 'Detaching...' messages. Print
5342 them when 'print_inferior_events' is on.
5343 * remote.c (remote_detach_1): Print message when detaching
5344 from inferior and '!is_fork_parent'.
5346 2018-04-24 Tom Tromey <tom@tromey.com>
5348 * cli-out.h: Reindent.
5350 2018-04-24 Tom Tromey <tom@tromey.com>
5352 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
5353 (cli_ui_out::do_field_string): Use fputs_filtered.
5354 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
5356 2018-04-23 Tom Tromey <tom@tromey.com>
5358 * guile/scm-frame.c (gdbscm_frame_read_var): Use
5359 gdb::unique_xmalloc_ptr.
5361 2018-04-23 Tom Tromey <tom@tromey.com>
5363 * configure: Rebuild.
5365 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
5368 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
5369 prepare_for_testing. Set normal_bp to r_debug_state if target
5372 2018-04-21 Pedro Alves <palves@redhat.com>
5373 Rajendra SY <rajendra.sy@gmail.com>
5375 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
5376 * remote.c (extended_remote_attach): In all-stop mode, mark the
5377 thread as executing.
5379 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5381 * thread.c (thread_apply_all_command): Fix comment.
5382 (thread_command): Fix comment.
5384 2018-04-10 Alan Hayward <alan.hayward@arm.com>
5386 * common/tdesc.h (tdesc_create_feature): Remove xml filename
5388 * features/aarch64-core.c (create_feature_aarch64_core):
5390 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
5392 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
5394 * features/i386/32bit-avx512.c
5395 (create_feature_i386_32bit_avx512): Likewise.
5396 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
5398 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
5400 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
5402 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
5404 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
5406 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
5408 * features/i386/64bit-avx512.c
5409 (create_feature_i386_64bit_avx512): Likewise.
5410 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
5412 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
5414 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
5416 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
5418 * features/i386/64bit-segments.c
5419 (create_feature_i386_64bit_segments): Likewise.
5420 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
5422 * features/i386/x32-core.c
5423 (create_feature_i386_x32_core): Likewise.
5424 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
5425 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
5426 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
5427 * target-descriptions.c: In generated code, don't pass xml
5430 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5432 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
5433 (print_xml_feature::visit_post): Likewise.
5434 (print_xml_feature::visit): Likewise.
5435 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
5436 (print_xml_feature): Add new class.
5437 * regformats/regdat.sh: Null xmltarget on feature targets.
5438 * target-descriptions.c (struct target_desc): Add xmltarget.
5439 (maintenance_check_tdesc_xml_convert): Add unittest function.
5440 (tdesc_get_features_xml): Add function to get xml.
5441 (maintenance_check_xml_descriptions): Test xml generation.
5442 * xml-tdesc.c (string_read_description_xml): Add function.
5443 * xml-tdesc.h (string_read_description_xml): Add declaration.
5445 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5447 * features/Makefile: Add feature marker to targets with new style
5448 target descriptions.
5449 * regformats/aarch64.dat: Regenerate.
5450 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
5451 * regformats/i386/amd64-avx-linux.dat: Likewise.
5452 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
5453 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
5454 * regformats/i386/amd64-linux.dat: Likewise.
5455 * regformats/i386/amd64-mpx-linux.dat: Likewise.
5456 * regformats/i386/amd64.dat: Likewise.
5457 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
5458 * regformats/i386/i386-avx-linux.dat: Likewise.
5459 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
5460 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
5461 * regformats/i386/i386-linux.dat: Likewise.
5462 * regformats/i386/i386-mmx-linux.dat: Likewise.
5463 * regformats/i386/i386-mpx-linux.dat: Likewise.
5464 * regformats/i386/i386.dat: Likewise.
5465 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
5466 * regformats/i386/x32-avx-linux.dat: Likewise.
5467 * regformats/i386/x32-linux.dat: Likewise.
5468 * regformats/tic6x-c62x-linux.dat: Likewise.
5469 * regformats/tic6x-c64x-linux.dat: Likewise.
5470 * regformats/tic6x-c64xp-linux.dat: Likewise.
5471 * regformats/regdat.sh: Parse feature marker.
5473 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5475 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
5476 (tdesc_osabi_name): Likewise.
5477 * target-descriptions.c (tdesc_architecture_name): Add new
5479 (tdesc_osabi_name): Likewise.
5481 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5483 * common/tdesc.c (tdesc_predefined_type): Move to here.
5484 (tdesc_named_type): Likewise.
5485 (tdesc_create_vector): Likewise.
5486 (tdesc_create_struct): Likewise.
5487 (tdesc_set_struct_size): Likewise.
5488 (tdesc_create_union): Likewise.
5489 (tdesc_create_flags): Likewise.
5490 (tdesc_create_enum): Likewise.
5491 (tdesc_add_field): Likewise.
5492 (tdesc_add_typed_bitfield): Likewise.
5493 (tdesc_add_bitfield): Likewise.
5494 (tdesc_add_flag): Likewise.
5495 (tdesc_add_enum_value): Likewise.
5496 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
5497 (struct tdesc_type_vector): Likewise.
5498 (struct tdesc_type_field): Likewise.
5499 (struct tdesc_type_with_fields): Likewise.
5500 (tdesc_create_enum): Add declaration.
5501 (tdesc_add_typed_bitfield): Likewise.
5502 (tdesc_add_enum_value): Likewise.
5503 * target-descriptions.c (tdesc_type_field): Move from here.
5504 (tdesc_type_builtin): Likewise.
5505 (tdesc_type_vector): Likewise.
5506 (tdesc_type_with_fields): Likewise.
5507 (tdesc_predefined_types): Likewise.
5508 (tdesc_named_type): Likewise.
5509 (tdesc_create_vector): Likewise.
5510 (tdesc_create_struct): Likewise.
5511 (tdesc_set_struct_size): Likewise.
5512 (tdesc_create_union): Likewise.
5513 (tdesc_create_flags): Likewise.
5514 (tdesc_create_enum): Likewise.
5515 (tdesc_add_field): Likewise.
5516 (tdesc_add_typed_bitfield): Likewise.
5517 (tdesc_add_bitfield): Likewise.
5518 (tdesc_add_flag): Likewise.
5519 (tdesc_add_enum_value): Likewise.
5520 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
5521 (tdesc_add_typed_bitfield): Likewise.
5522 (tdesc_add_enum_value): Likewise.
5524 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5526 * common/tdesc.c (tdesc_feature::accept): Move to here.
5527 (tdesc_feature::operator==): Likewise.
5528 (tdesc_create_reg): Likewise.
5529 * common/tdesc.h (tdesc_type_kind): Likewise.
5530 (struct tdesc_type): Likewise.
5531 (struct tdesc_feature): Likewise.
5532 * regformats/regdat.sh: Create a feature.
5533 * target-descriptions.c (tdesc_type_kind): Move from here.
5534 (tdesc_type): Likewise.
5535 (tdesc_type_up): Likewise.
5536 (tdesc_feature): Likewise.
5537 (tdesc_create_reg): Likewise.
5539 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5541 * Makefile.in: Add arch/tdesc.c
5542 * common/tdesc.c: New file.
5543 * common/tdesc.h (tdesc_element_visitor): Move to here.
5544 (tdesc_element): Likewise.
5545 (tdesc_reg): Likewise.
5546 (tdesc_reg_up): Likewise.
5547 * regformats/regdef.h (reg): Add offset to constructors.
5548 * target-descriptions.c (tdesc_element_visitor): Move from here.
5549 (tdesc_element): Likewise.
5550 (tdesc_reg): Likewise.
5551 (tdesc_reg_up): Likewise.
5553 2018-04-17 Tom Tromey <tom@tromey.com>
5555 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
5558 2018-04-17 Tom Tromey <tom@tromey.com>
5560 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
5562 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
5564 * symtab.c (print_symbol_info): Skip printing filename and line
5565 number when `last' is NULL.
5566 (symtab_symbol_info): Use empty string instead of NULL for first
5567 invocation of print_symbol_info.
5568 (rbreak_command): Pass NULL to `last' parameter of
5571 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
5573 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
5576 2018-04-16 Pedro Alves <palves@redhat.com>
5578 * MAINTAINERS (sh): Remove.
5579 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
5580 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
5581 (ALLDEPFILES): Remove sh64-tdep.c.
5582 * NEWS: Mentions that support for SH-5/SH64 is removed.
5583 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
5584 (sh*-*-openbsd*): Ditto.
5585 (sh64-*-elf*): Remove.
5587 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
5588 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
5589 * sh-tdep.c: No longer include "sh64-tdep.h".
5590 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
5591 * sh64-tdep.c, sh64-tdep.h: Remove files.
5593 2018-04-16 Pedro Alves <palves@redhat.com>
5595 * MAINTAINERS: Remove m88k.
5596 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
5597 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
5598 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
5599 * NEWS: Mention that support for m88k was removed.
5600 * configure.host (m88*-*-*): Remove support.
5601 * configure.nat (m88k-*-*): Remove support.
5602 * configure.tgt (m88*-*-openbsd*): Remove.
5603 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
5605 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
5607 * configure.tgt (x86_tobjs): New variable.
5608 (amd64_tobjs, i386_tobjs): Use it.
5610 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5612 * symtab.c (print_symbol_info): Precede the symbol definition by
5613 the line number when available.
5614 * NEWS: Advertise this enhancement.
5616 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5618 * NEWS (New options): announce set/show record btrace cpu.
5619 * btrace.c: Include record-btrace.h.
5620 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
5621 the vendor is unknown.
5622 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
5623 Maybe overwrite the btrace configuration's cpu.
5624 (btrace_compute_ftrace): Add cpu parameter. Update callers.
5625 (btrace_fetch): Add cpu parameter. Update callers.
5626 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
5627 Maybe overwrite the btrace configuration's cpu. Skip enabling
5628 errata workarounds if the vendor is unknown.
5629 * python/py-record-btrace.c: Include record-btrace.h.
5630 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
5631 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
5632 * record-btrace.c (record_btrace_cpu_state_kind): New.
5633 (record_btrace_cpu): New.
5634 (set_record_btrace_cpu_cmdlist): New.
5635 (record_btrace_get_cpu): New.
5636 (require_btrace_thread, record_btrace_info)
5637 (record_btrace_resume_thread): Call record_btrace_get_cpu.
5638 (cmd_set_record_btrace_cpu_none): New.
5639 (cmd_set_record_btrace_cpu_auto): New.
5640 (cmd_set_record_btrace_cpu): New.
5641 (cmd_show_record_btrace_cpu): New.
5642 (_initialize_record_btrace): Initialize set/show record btrace cpu
5644 * record-btrace.h (record_btrace_get_cpu): New.
5646 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5648 * record.c (set_record_command): Fix typo in message.
5650 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5652 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
5654 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5656 * infrun.c (process_event_stop_test): Call
5657 gdbarch_in_indirect_branch_thunk.
5658 * gdbarch.sh (in_indirect_branch_thunk): New.
5659 * gdbarch.c: Regenerated.
5660 * gdbarch.h: Regenerated.
5663 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
5664 (HFILES_NO_SRCDIR): Add x86-tdep.h.
5665 (ALLDEPFILES): Add x86-tdep.c.
5666 * arch-utils.h (default_in_indirect_branch_thunk): New.
5667 * arch-utils.c (default_in_indirect_branch_thunk): New.
5668 * i386-tdep: Include x86-tdep.h.
5669 (i386_in_indirect_branch_thunk): New.
5670 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
5672 * amd64-tdep: Include x86-tdep.h.
5673 (amd64_in_indirect_branch_thunk): New.
5674 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
5676 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5679 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
5680 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
5681 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
5684 2018-04-12 Tom Tromey <tom@tromey.com>
5686 * rust-lang.c (rust_print_struct_def): Remove univariant code.
5687 (rust_evaluate_subexp): Likewise.
5689 2018-04-12 Pedro Alves <palves@redhat.com>
5691 * procfs.c (procfs_detach): Make forward declaration's prototype
5692 match definition's protototype.
5693 (proc_get_LDT_entry): Remove stale do_cleanups call.
5695 2018-04-12 Pedro Alves <palves@redhat.com>
5697 * target.h (target_ops::to_has_exited): Delete.
5698 (target_has_exited): Delete.
5699 * target-delegates.c: Regenerate.
5701 2018-04-11 Pedro Alves <palves@redhat.com>
5703 * target.c (fileio_fh_t::t): Add comment.
5704 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5705 (target_fileio_close): Handle a NULL target.
5706 (invalidate_fileio_fh): New.
5707 (target_close): Call it.
5708 * remote.c (remote_hostio_send_command): No longer check whether
5709 remote_desc is open.
5711 2018-04-11 Pedro Alves <palves@redhat.com>
5713 * target.c (fileio_fh_t): Make it a named struct instead of a
5715 (fileio_fh_t::is_closed): New method.
5716 (DEF_VEC_O (fileio_fh_t)): Remove.
5717 (fileio_fhandles): Now a std::vector.
5718 (is_closed_fileio_fh): Delete.
5719 (acquire_fileio_fd): Adjust. Rename parameters.
5720 (release_fileio_fd): Adjust.
5721 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
5722 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5723 (target_fileio_close): Adjust.
5725 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
5727 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
5730 2018-04-10 Pedro Alves <palves@redhat.com>
5732 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
5733 (scoped_finish_thread_state): New class.
5734 * infcmd.c (run_command_1): Use it instead of finish_thread_state
5736 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
5737 (fetch_inferior_event, normal_stop): Likewise.
5738 * thread.c (finish_thread_state_cleanup): Delete.
5740 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5741 Pedro Alves <palves@redhat.com>
5743 * value.c: Include "selftest.h" and "common/array-view.h".
5744 (struct range) <operator ==>: New.
5745 (test_ranges_contain): New.
5746 (check_ranges_vector): New.
5747 (test_insert_into_bit_range_vector): New.
5748 (_initialize_values): Register selftests.
5749 * common/array-view.h (operator==, operator!=): New.
5751 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5753 * common/gdb_vecs.h (unordered_remove): Add overload that takes
5755 * inline-frame.c: Include <algorithm>.
5756 (struct inline_state): Add constructor.
5757 (inline_state_s): Remove.
5758 (DEF_VEC_O(inline_state_s)): Remove.
5759 (inline_states): Change type to std::vector.
5760 (find_inline_frame_state): Adjust to std::vector.
5761 (allocate_inline_frame_state): Remove.
5762 (clear_inline_frame_state): Adjust to std::vector.
5763 (skip_inline_frames): Adjust to std::vector.
5765 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5767 * tracepoint.h (struct trace_state_variable): Add constructor.
5768 <name>: Change type to std::string.
5769 * tracepoint.c (tsv_s): Remove.
5770 (DEF_VEC_O(tsv_s)): Remove.
5771 (tvariables): Change to std::vector.
5772 (create_trace_state_variable): Adjust to std::vector.
5773 (find_trace_state_variable): Likewise.
5774 (find_trace_state_variable_by_number): Likewise.
5775 (delete_trace_state_variable): Likewise.
5776 (trace_variable_command): Adjust to std::string.
5777 (delete_trace_variable_command): Likewise.
5778 (tvariables_info_1): Adjust to std::vector.
5779 (save_trace_state_variables): Likewise.
5780 (start_tracing): Likewise.
5781 (merge_uploaded_trace_state_variables): Adjust to std::vector
5783 * target.h (struct target_ops)
5784 <to_download_trace_state_variable>: Pass reference to
5785 trace_state_variable.
5786 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
5787 * target-delegates.c: Re-generate.
5788 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
5789 (mi_tsv_deleted): Likewise.
5790 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
5791 * remote.c (remote_download_trace_state_variable): Change
5792 pointer to reference and adjust.
5793 * make-target-delegates (parse_argtypes): Handle references.
5794 (write_function_header): Likewise.
5795 (munge_type): Likewise.
5797 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5799 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5800 string_view-selftests.c.
5801 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
5803 * unittests/basic_string_view/cons/char/1.cc: Likewise.
5804 * unittests/basic_string_view/cons/char/2.cc: Likewise.
5805 * unittests/basic_string_view/cons/char/3.cc: Likewise.
5806 * unittests/basic_string_view/element_access/char/1.cc:
5808 * unittests/basic_string_view/element_access/char/empty.cc:
5810 * unittests/basic_string_view/element_access/char/front_back.cc:
5812 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
5813 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
5815 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
5817 * unittests/basic_string_view/modifiers/swap/char/1.cc:
5819 * unittests/basic_string_view/operations/compare/char/1.cc:
5821 * unittests/basic_string_view/operations/compare/char/13650.cc:
5823 * unittests/basic_string_view/operations/copy/char/1.cc:
5825 * unittests/basic_string_view/operations/data/char/1.cc:
5827 * unittests/basic_string_view/operations/find/char/1.cc:
5829 * unittests/basic_string_view/operations/find/char/2.cc:
5831 * unittests/basic_string_view/operations/find/char/3.cc:
5833 * unittests/basic_string_view/operations/find/char/4.cc:
5835 * unittests/basic_string_view/operations/rfind/char/1.cc:
5837 * unittests/basic_string_view/operations/rfind/char/2.cc:
5839 * unittests/basic_string_view/operations/rfind/char/3.cc:
5841 * unittests/basic_string_view/operations/substr/char/1.cc:
5843 * unittests/basic_string_view/operators/char/2.cc: Likewise.
5844 * unittests/string_view-selftests.c: New file.
5846 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5848 * unittests/basic_string_view/capacity/1.cc: New file.
5849 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
5850 * unittests/basic_string_view/cons/char/1.cc: New file.
5851 * unittests/basic_string_view/cons/char/2.cc: New file.
5852 * unittests/basic_string_view/cons/char/3.cc: New file.
5853 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
5854 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
5855 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
5856 * unittests/basic_string_view/element_access/char/1.cc: New file.
5857 * unittests/basic_string_view/element_access/char/2.cc: New file.
5858 * unittests/basic_string_view/element_access/char/empty.cc: New file.
5859 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
5860 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
5861 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
5862 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
5863 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
5864 * unittests/basic_string_view/include.cc: New file.
5865 * unittests/basic_string_view/inserters/char/1.cc: New file.
5866 * unittests/basic_string_view/inserters/char/2.cc: New file.
5867 * unittests/basic_string_view/inserters/char/3.cc: New file.
5868 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
5869 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
5870 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
5871 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
5872 * unittests/basic_string_view/literals/types.cc: New file.
5873 * unittests/basic_string_view/literals/values.cc: New file.
5874 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
5875 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
5876 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
5877 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
5878 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
5879 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
5880 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
5881 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
5882 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
5883 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
5884 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
5885 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
5886 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
5887 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
5888 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
5889 * unittests/basic_string_view/operations/data/char/1.cc: New file.
5890 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
5891 * unittests/basic_string_view/operations/find/char/1.cc: New file.
5892 * unittests/basic_string_view/operations/find/char/2.cc: New file.
5893 * unittests/basic_string_view/operations/find/char/3.cc: New file.
5894 * unittests/basic_string_view/operations/find/char/4.cc: New file.
5895 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
5896 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
5897 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
5898 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
5899 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
5900 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
5901 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
5902 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
5903 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
5904 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
5905 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
5906 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
5907 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
5908 * unittests/basic_string_view/operators/char/2.cc: New file.
5909 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
5910 * unittests/basic_string_view/range_access/char/1.cc: New file.
5911 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
5912 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
5913 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
5914 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
5915 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
5916 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
5917 * unittests/basic_string_view/requirements/typedefs.cc: New file.
5918 * unittests/basic_string_view/typedefs.cc: New file.
5919 * unittests/basic_string_view/types/1.cc: New file.
5921 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5923 * common/gdb_string_view.h: Remove libstdc++ implementation
5924 details, adjust to gdb reality.
5925 * common/gdb_string_view.tcc: Likewise.
5926 * cli/cli-script.c (struct string_view): Remove.
5927 (user_args) <m_args>: Change element type to gdb::string_view.
5928 (user_args::insert_args): Adjust.
5930 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5932 * common/gdb_string_view.h: New file.
5933 * common/gdb_string_view.tcc: New file.
5935 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5937 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
5938 * configure: Re-generate.
5940 2018-04-09 Pedro Alves <palves@redhat.com>
5942 * gdbarch.sh: Include "observable.h" instead of "observer.h".
5943 (set_target_gdbarch): Call
5944 gdb::observers::architecture_changed.notify instead of
5945 observer_notify_architecture_changed.
5947 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5949 * tracepoint.c (struct current_traceframe_cleanup): Remove.
5950 (do_restore_current_traceframe_cleanup): Remove.
5951 (restore_current_traceframe_cleanup_dtor): Remove.
5952 (make_cleanup_restore_current_traceframe): Remove.
5953 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
5955 * tracepoint.h (struct scoped_restore_current_traceframe): New.
5956 * infrun.c (fetch_inferior_event): Use
5957 scoped_restore_current_traceframe.
5959 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5961 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
5963 <n_allocated_type_units>: Remove.
5964 <all_type_units>: Change to std::vector.
5965 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
5966 to std::vector change.
5967 (dwarf2_per_objfile::get_cutu): Likewise.
5968 (dwarf2_per_objfile::get_tu): Likewise.
5969 (create_signatured_type_table_from_index): Likewise.
5970 (create_signatured_type_table_from_debug_names): Likewise.
5971 (dw2_symtab_iter_next): Likewise.
5972 (dw2_print_stats): Likewise.
5973 (dw2_expand_all_symtabs): Likewise.
5974 (dw2_expand_marked_cus): Likewise.
5975 (dw2_debug_names_iterator::next): Likewise.
5976 (dwarf2_initialize_objfile): Likewise.
5977 (add_signatured_type_cu_to_table): Likewise.
5978 (create_all_type_units): Likewise.
5979 (add_type_unit): Likewise.
5980 (struct tu_abbrev_offset): Add constructor.
5981 (build_type_psymtabs_1): Adjust to std::vector change.
5982 (print_tu_stats): Likewise.
5983 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
5984 (write_debug_names): Likewise.
5986 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5988 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
5989 Make an std::vector.
5990 <n_comp_units>: Remove.
5991 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
5992 to std::vector change.
5993 (dwarf2_per_objfile::get_cutu): Likewise.
5994 (dwarf2_per_objfile::get_cu): Likewise.
5995 (create_cus_from_index): Likewise.
5996 (create_addrmap_from_index): Likewise.
5997 (create_addrmap_from_aranges): Likewise.
5998 (dwarf2_read_index): Likewise.
5999 (dw2_find_last_source_symtab): Likewise.
6000 (dw2_map_symtabs_matching_filename): Likewise.
6001 (dw2_symtab_iter_next): Likewise.
6002 (dw2_print_stats): Likewise.
6003 (dw2_expand_all_symtabs): Likewise.
6004 (dw2_expand_symtabs_with_fullname): Likewise.
6005 (dw2_expand_marked_cus): Likewise.
6006 (dw2_map_symbol_filenames): Likewise.
6007 (create_cus_from_debug_names): Likewise.
6008 (dwarf2_read_debug_names): Likewise.
6009 (dw2_debug_names_iterator::next): Likewise.
6010 (dwarf2_initialize_objfile): Likewise.
6011 (set_partial_user): Likewise.
6012 (dwarf2_build_psymtabs_hard): Likewise.
6013 (read_comp_units_from_section): Remove arguments, adjust to
6015 (create_all_comp_units): Adjust to std::vector and
6016 read_comp_units_from_section changes.
6017 (dwarf2_find_containing_comp_unit): Adjust to std::vector
6019 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6020 (psyms_seen_size): Likewise.
6021 (write_gdbindex): Likewise.
6022 (write_debug_names): Likewise.
6024 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6026 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6027 with dwarf2_per_objfile.
6028 (create_cus_from_index): Likewise.
6029 (create_signatured_type_table_from_index): Likewise.
6030 (dwarf2_read_index): Likewise.
6031 (dwarf2_initialize_objfile): Likewise.
6032 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
6033 per_cu rather than get_dwarf2_per_objfile.
6035 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6037 * dwarf2read.h (struct signatured_type): Forward declare.
6038 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6040 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6041 (dw2_get_cutu): ...this.
6042 (dwarf2_per_objfile::get_cu): Rename from...
6043 (dw2_get_cu): ...this.
6044 (dwarf2_per_objfile::get_tu): New.
6045 (create_addrmap_from_index): Adjust.
6046 (create_addrmap_from_aranges): Adjust.
6047 (dw2_find_last_source_symtab): Adjust.
6048 (dw2_map_symtabs_matching_filename): Adjust.
6049 (dw2_symtab_iter_next): Adjust.
6050 (dw2_print_stats): Adjust.
6051 (dw2_expand_all_symtabs): Adjust.
6052 (dw2_expand_symtabs_with_fullname): Adjust.
6053 (dw2_expand_marked_cus): Adjust.
6054 (dw_expand_symtabs_matching_file_matcher): Adjust.
6055 (dw2_map_symbol_filenames): Adjust.
6056 (dw2_debug_names_iterator::next): Adjust.
6057 (dwarf2_initialize_objfile): Adjust.
6058 (set_partial_user): Adjust.
6059 (dwarf2_build_psymtabs_hard): Adjust.
6061 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6063 * dwarf2read.c (create_signatured_type_table_from_debug_names):
6064 Remove unused variables.
6065 (dw2_map_symtabs_matching_filename): Likewise.
6066 (dwarf2_record_block_ranges): Likewise.
6067 (dwarf2_read_addr_index): Likewise.
6068 (follow_die_offset): Likewise.
6070 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6072 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6073 to symbol_file_add_main.
6075 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6078 * mi/mi-console.c (do_fputc_async_safe): New.
6079 (mi_console_file::write_async_safe): New.
6080 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6081 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6083 * ui-file.c (ui_file::putstrn): Adjust call to
6084 fputstrn_unfiltered.
6085 * utils.c (printchar): Replace do_fputs and do_fprintf
6086 parameters by do_fputc.
6087 (fputstr_filtered): Adjust call to printchar.
6088 (fputstr_unfiltered): Likewise.
6089 (fputstrn_filtered): Likewise.
6090 (fputstrn_unfiltered): Add do_fputc parameter, pass to
6092 * utils.h (do_fputc_ftype): New typedef.
6093 (fputstrn_unfiltered): Add do_fputc parameter.
6095 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6097 * regformats/i386/i386-avx.dat: Remove.
6099 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6102 * amd64-tdep.c (amd64_none_init_abi): New function.
6103 (amd64_x32_none_init_abi): New function.
6104 (_initialize_amd64_tdep): Register handlers for x86-64 and
6105 x64_32 with GDB_OSABI_NONE.
6106 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
6107 GDB_OSABI_NONE osabi.
6109 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6112 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
6114 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
6115 * osabi.c (gdb_osabi_names): Add "unknown" entry.
6117 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6119 * common/byte-vector.h (char_vector): New type.
6120 * target.h (target_read_alloc): Return
6121 gdb::optional<byte_vector>.
6122 (target_read_stralloc): Return gdb::optional<char_vector>.
6123 (target_get_osdata): Return gdb::optional<char_vector>.
6124 * target.c (target_read_alloc_1): Templatize. Replacement
6125 manual memory management with vector.
6126 (target_read_alloc): Change return type, adjust.
6127 (target_read_stralloc): Change return type, adjust.
6128 (target_get_osdata): Change return type, adjust.
6129 * auxv.c (struct auxv_info) <length>: Remove.
6130 <data>: Change type to gdb::optional<byte_vector>.
6131 (auxv_inferior_data_cleanup): Free auxv_info with delete.
6132 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6133 (target_auxv_search): Adjust.
6134 (fprint_target_auxv): Adjust.
6135 * avr-tdep.c (avr_io_reg_read_command): Adjust.
6136 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6137 (linux_make_corefile_notes): Adjust.
6138 * osdata.c (get_osdata): Adjust.
6139 * remote.c (remote_get_threads_with_qxfer): Adjust.
6140 (remote_memory_map): Adjust.
6141 (remote_traceframe_info): Adjust.
6142 (btrace_read_config): Adjust.
6143 (remote_read_btrace): Adjust.
6144 (remote_pid_to_exec_file): Adjust.
6145 * solib-aix.c (solib_aix_get_library_list): Adjust.
6146 * solib-dsbt.c (decode_loadmap): Don't free buf.
6147 (dsbt_get_initial_loadmaps): Adjust.
6148 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6149 * solib-target.c (solib_target_current_sos): Adjust.
6150 * tracepoint.c (sdata_make_value): Adjust.
6151 * xml-support.c (xinclude_start_include): Adjust.
6152 (xml_fetch_content_from_file): Adjust.
6153 * xml-support.h (xml_fetch_another): Change return type.
6154 (xml_fetch_content_from_file): Change return type.
6155 * xml-syscall.c (xml_init_syscalls_info): Adjust.
6156 * xml-tdesc.c (file_read_description_xml): Adjust.
6157 (fetch_available_features_from_target): Change return type.
6158 (target_fetch_description_xml): Adjust.
6159 (target_read_description_xml): Adjust.
6161 2018-04-06 Tom Tromey <tom@tromey.com>
6163 * value.c (~value): Update.
6164 (struct value) <contents>: Now unique_xmalloc_ptr.
6165 (value_contents_bits_eq, allocate_value_contents)
6166 (value_contents_raw, value_contents_all_raw)
6167 (value_contents_for_printing, value_contents_for_printing_const)
6168 (set_value_enclosing_type): Update.
6170 2018-04-06 Tom Tromey <tom@tromey.com>
6172 * value.c (range_s): Remove typedef, VEC.
6173 (struct range): Add operator<.
6174 (range_lessthan): Remove.
6175 (ranges_contain): Change type.
6177 (struct value) <unavailable, optimized_out>: Now std::vector.
6178 (value_entirely_available)
6179 (value_entirely_covered_by_range_vector)
6180 (value_entirely_unavailable, value_entirely_optimized_out):
6182 (insert_into_bit_range_vector): Change argument type.
6183 (find_first_range_overlap): Likewise.
6184 (struct ranges_and_idx, value_contents_bits_eq)
6185 (require_not_optimized_out, require_available): Update.
6186 (ranges_copy_adjusted): Change argument types.
6187 (value_optimized_out, value_copy, value_fetch_lazy): Update.
6189 2018-04-06 Tom Tromey <tom@tromey.com>
6191 * value.c (~value): Update.
6192 (struct value) <parent>: Now a value_ref_ptr.
6193 (value_parent, set_value_parent, value_address, value_copy):
6196 2018-04-06 Tom Tromey <tom@tromey.com>
6198 * value.c (struct value): Add constructor, destructor, and member
6200 (allocate_value_lazy, value_decref): Update.
6202 2018-04-06 Tom Tromey <tom@tromey.com>
6204 * value.c (struct value) <released, next>: Remove.
6205 (all_values): Now a std::vector.
6206 (allocate_value_lazy): Update.
6207 (value_next): Remove.
6208 (value_mark, value_free_to_mark, release_value)
6209 (value_release_to_mark): Update.
6211 2018-04-06 Tom Tromey <tom@tromey.com>
6213 * value.h (fetch_subexp_value, value_release_to_mark): Update.
6214 (free_value_chain): Remove.
6215 * value.c (free_value_chain): Remove.
6216 (value_release_to_mark): Return a std::vector.
6217 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6219 (check_condition): Update.
6220 * eval.c (fetch_subexp_value): Change "val_chain" to a
6222 * breakpoint.c (update_watchpoint): Update.
6223 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6225 2018-04-06 Tom Tromey <tom@tromey.com>
6227 * value.h (free_all_values): Remove.
6228 * value.c (free_all_values): Remove.
6230 2018-04-06 Tom Tromey <tom@tromey.com>
6232 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6233 (value_history_chain, value_history_count): Remove.
6234 (value_history): New global.
6235 (record_latest_value, access_value_history, show_values)
6236 (preserve_values): Update.
6238 2018-04-06 Tom Tromey <tom@tromey.com>
6240 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6241 * varobj.c (varobj_set_display_format, varobj_set_value)
6242 (install_default_visualizer, construct_visualizer)
6243 (install_new_value, ~varobj, varobj_get_value_type)
6244 (my_value_of_variable, varobj_editable_p): Update.
6245 * c-varobj.c (c_describe_child, c_value_of_variable)
6246 (cplus_number_of_children, cplus_describe_child): Update.
6247 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
6248 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
6249 (ada_value_of_variable, ada_value_is_changeable_p): Update.
6251 2018-04-06 Tom Tromey <tom@tromey.com>
6253 * printcmd.c (last_examine_address): Change type to
6255 (do_examine, x_command): Update.
6257 2018-04-06 Tom Tromey <tom@tromey.com>
6259 * value.c (release_value): Update.
6260 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
6261 (struct bpstats) <val>: Now a value_ref_ptr.
6262 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6263 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6264 (~watchpoint, print_it_watchpoint, watch_command_1)
6265 (invalidate_bp_value_on_memory_change): Update.
6267 2018-04-06 Tom Tromey <tom@tromey.com>
6269 * varobj.c (varobj_clear_saved_item)
6270 (update_dynamic_varobj_children, install_new_value, ~varobj):
6272 * value.h (value_incref): Move declaration earlier.
6273 (value_decref): Rename from value_free.
6274 (struct value_ref_policy): New.
6275 (value_ref_ptr): New typedef.
6276 (struct value_deleter): Remove.
6277 (gdb_value_up): Remove typedef.
6278 (release_value): Change return type.
6279 (release_value_or_incref): Remove.
6280 * value.c (set_value_parent): Update.
6281 (value_incref): Change return type.
6282 (value_decref): Rename from value_free.
6283 (value_free_to_mark, free_all_values, free_value_chain): Update.
6284 (release_value): Return value_ref_ptr.
6285 (release_value_or_incref): Remove.
6286 (record_latest_value, set_internalvar, clear_internalvar):
6288 * stack.c (info_frame_command): Don't call value_free.
6289 * python/py-value.c (valpy_dealloc, valpy_new)
6290 (value_to_value_object): Update.
6291 * printcmd.c (do_examine): Update.
6292 * opencl-lang.c (lval_func_free_closure): Update.
6293 * mi/mi-main.c (register_changed_p): Don't call value_free.
6294 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
6295 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
6296 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
6298 * guile/scm-value.c (vlscm_free_value_smob)
6299 (vlscm_scm_from_value): Update.
6300 * frame.c (frame_register_unwind, frame_unwind_register_signed)
6301 (frame_unwind_register_unsigned, get_frame_register_bytes)
6302 (put_frame_register_bytes): Don't call value_free.
6303 * findvar.c (address_from_register): Don't call value_free.
6304 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
6305 * dwarf2loc.c (entry_data_value_free_closure)
6306 (value_of_dwarf_reg_entry, free_pieced_value_closure)
6307 (dwarf2_evaluate_loc_desc_full): Update.
6308 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6309 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6310 (~watchpoint, watch_command_1)
6311 (invalidate_bp_value_on_memory_change): Update.
6312 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
6314 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
6317 * warning.m4: Add -Wno-error=deprecated-register.
6318 * configure: Re-generate.
6320 2018-04-05 Tom Tromey <tom@tromey.com>
6322 * linespec.h: Remove include of "vec.h".
6324 2018-04-05 Tom Tromey <tom@tromey.com>
6326 * linespec.c (typep): Remove typedef.
6327 (find_methods, find_superclass_methods): Take a std::vector.
6328 (find_method): Use std::vector.
6330 2018-04-05 Tom Tromey <tom@tromey.com>
6332 * utils.c (compare_strings): Remove.
6333 * utils.h (compare_strings): Remove.
6334 * objc-lang.h (find_imps): Update.
6335 * objc-lang.c (find_methods): Take a std::vector.
6336 (uniquify_strings, find_imps): Likewise.
6337 * linespec.c (find_methods): Take a std::vector.
6338 (decode_objc): Use std::vector.
6339 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
6341 (find_method, find_function_symbols): Use std::vector.
6343 2018-04-05 Tom Tromey <tom@tromey.com>
6345 * completer.c (completion_tracker::completion_tracker): Remove
6347 (completion_tracker::discard_completions): Likewise.
6348 * breakpoint.c (ambiguous_names_p): Remove cast.
6349 * ada-lang.c (_initialize_ada_language): Remove cast.
6350 * utils.h (streq): Update.
6351 (streq_hash): Add new declaration.
6352 * utils.c (streq): Return bool.
6353 (streq_hash): New function.
6355 2018-04-05 Tom Tromey <tom@tromey.com>
6357 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
6358 Remove a string copy.
6360 2018-04-05 Tom Tromey <tom@tromey.com>
6362 * linespec.c (filter_results): Use std::vector.
6363 (decode_line_2, decode_line_full): Update.
6365 2018-04-05 Tom Tromey <tom@tromey.com>
6367 * linespec.c (canonical_to_fullform): Return std::string.
6368 (filter_results): Update.
6369 (struct decode_line_2_item): Add constructor.
6370 <fullform, displayform>: Now std::string.
6371 (decode_line_2_compare_items): Now a std::sort comparator.
6372 (decode_line_2): Update.
6374 2018-04-05 Tom Tromey <tom@tromey.com>
6376 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
6377 (unexpected_linespec_error): Update.
6378 (linespec_parse_basic, parse_linespec): Update.
6380 2018-04-05 Tom Tromey <tom@tromey.com>
6382 * linespec.c (linespec_parse_basic): Reindent.
6384 2018-04-05 Tom Tromey <tom@tromey.com>
6386 * minsyms.h (iterate_over_minimal_symbols): Update.
6387 * minsyms.c (iterate_over_minimal_symbols): Take a
6389 * linespec.c (struct collect_minsyms): Remove.
6390 (compare_msyms): Now a std::sort comparator.
6391 (add_minsym): Add parameters.
6392 (search_minsyms_for_name): Update. Use std::vector.
6394 2018-04-03 Tom Tromey <tom@tromey.com>
6396 * mipsread.c (read_alphacoff_dynamic_symtab): Use
6399 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6401 * MAINTAINERS (Write After Approval): Add Weimin Pan.
6403 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6406 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
6407 printing static type.
6409 2018-04-01 Tom Tromey <tom@tromey.com>
6411 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
6412 (rs6000_xfer_shared_libraries): Update.
6414 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
6416 * common/gdb_vecs.h (char_ptr): Remove.
6417 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
6419 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6421 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
6423 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
6425 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6427 * tracepoint.h (struct uploaded_tp): Initialize fields.
6428 <actions, step_actions, cmd_strings>: Change type to
6429 std::vector<char *>.
6430 * tracepoint.c (get_uploaded_tp): Allocate with new.
6431 (free_uploaded_tps): Free with delete.
6432 (parse_tracepoint_definition): Adjust to std::vector change.
6433 * breakpoint.c (read_uploaded_action): Likewise.
6434 (create_tracepoint_from_upload): Likewise.
6435 * ctf.c (ctf_write_uploaded_tp): Likewise.
6436 (SET_ARRAY_FIELD): Likewise.
6437 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
6439 2018-03-30 Tom Tromey <tom@tromey.com>
6441 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
6443 (svr4_keep_data_in_core): Update.
6444 (svr4_read_so_list): Update.
6446 2018-03-30 Tom Tromey <tom@tromey.com>
6448 * windows-nat.c (handle_output_debug_string, handle_exception):
6450 * target.h (target_read_string): Update.
6451 * target.c (target_read_string): Change "string" to
6453 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
6455 * solib-frv.c (frv_current_sos): Update.
6456 * solib-dsbt.c (dsbt_current_sos): Update.
6457 * solib-darwin.c (darwin_current_sos): Update.
6458 * linux-thread-db.c (inferior_has_bug): Update.
6459 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
6460 Update. Remove alloca.
6461 * ada-lang.c (ada_main_name): Update.
6463 2018-03-30 Tom Tromey <tom@tromey.com>
6465 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
6466 (struct dwo_file_deleter): New.
6467 (dwo_file_up): New typedef.
6468 (open_and_init_dwo_file): Use dwo_file_up.
6469 (free_dwo_file_cleanup): Remove.
6471 2018-03-30 Tom Tromey <tom@tromey.com>
6473 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
6474 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
6476 2018-03-30 Tom Tromey <tom@tromey.com>
6478 * dwarf2read.c (class free_cached_comp_units): New class.
6479 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
6480 (free_cached_comp_units): Remove function.
6482 2018-03-30 Tom Tromey <tom@tromey.com>
6484 * utils.h (make_cleanup_unpush_target): Remove.
6485 * inf-ptrace.c (struct target_unpusher): New.
6486 (target_unpush_up) New typedef.
6487 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
6489 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
6491 2018-03-27 Tom Tromey <tom@tromey.com>
6493 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
6495 2018-03-27 Pedro Alves <palves@redhat.com>
6496 Tom Tromey <tom@tromey.com>
6498 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
6499 destructor. Now a class.
6500 (gdb_readline_wrapper_cleanup): Remove function.
6501 (gdb_readline_wrapper): Remove cleanups.
6503 2018-03-27 Tom Tromey <tom@tromey.com>
6505 * typeprint.h (struct type_print_options) <local_typedefs,
6506 global_typedefs>: Remove "struct" keyword.
6507 (class typedef_hash_table): New class.
6508 (recursively_update_typedef_hash, add_template_parameters)
6509 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
6510 (find_typedef_in_hash): Don't declare.
6511 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
6512 (typedef_hash_table::recursively_update): Rename from
6513 recursively_update_typedef_hash. Now a member.
6514 (typedef_hash_table::add_template_parameters): Rename from
6515 add_template_parameters. Now a member.
6516 (typedef_hash_table::typedef_hash_table): Now a constructor;
6517 rename from create_typedef_hash.
6518 (typedef_hash_table::~typedef_hash_table): Now a destructor;
6519 rename from free_typedef_hash.
6520 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
6521 (do_free_global_table): Remove.
6522 (typedef_hash_table::typedef_hash_table): New constructor; renamed
6523 from copy_type_recursive.
6524 (create_global_typedef_table): Remove.
6525 (typedef_hash_table::find_global_typedef): Now a member of
6527 (typedef_hash_table::find_typedef): Rename from
6528 find_typedef_in_hash; now a member.
6529 (whatis_exp): Update.
6530 * extension.h (struct ext_lang_type_printers): Add constructor and
6532 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
6534 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
6535 Now a constructor; rename from start_ext_lang_type_printers.
6536 (ext_lang_type_printers): Now a destructor; rename from
6537 free_ext_lang_type_printers.
6538 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
6540 (c_type_print_base_struct_union): Update. Remove cleanups.
6542 2018-03-27 Tom Tromey <tom@tromey.com>
6544 * dwarf-index-write.c: Include <cmath>.
6546 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6548 * NEWS: Add entry describing new "set|show varsize-limit" command.
6549 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
6551 * printcmd.c (_initialize_printcmd): Add "set var" alias of
6554 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
6556 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
6558 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
6559 * dwarf-index-common.c: New file.
6560 * dwarf-index-common.h: New file.
6561 * dwarf-index-write.c: New file.
6562 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
6563 (struct dwarf2_section_info): Move from here.
6564 (dwarf2_section_info_def): Likewise.
6565 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
6566 (offset_type): Likewise.
6567 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
6568 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
6569 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
6570 (byte_swap): Likewise.
6571 (MAYBE_SWAP): Likewise.
6572 (dwarf2_per_cu_ptr): Likewise.
6573 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
6574 (struct tu_stats): Likewise.
6575 (struct dwarf2_per_objfile): Likewise.
6576 (struct dwarf2_per_cu_data): Likewise.
6577 (struct signatured_type): Likewise.
6578 (sig_type_ptr): Likewise.
6579 (DEF_VEC_P (sig_type_ptr)): Likewise.
6580 (INDEX4_SUFFIX): Likewise.
6581 (INDEX5_SUFFIX): Likewise.
6582 (DEBUG_STR_SUFFIX): Likewise.
6583 (dwarf2_read_section): Make non-static.
6584 (mapped_index_string_hash): Move from here.
6585 (dwarf5_djb_hash): Likewise.
6586 (file_write): Likewise.
6587 (class data_buf): Likewise.
6588 (struct symtab_index_entry): Likewise.
6589 (struct mapped_symtab): Likewise.
6590 (find_slot): Likewise.
6591 (hash_expand): Likewise.
6592 (add_index_entry): Likewise.
6593 (uniquify_cu_indices): Likewise.
6594 (class c_str_view): Likewise.
6595 (class c_str_view_hasher): Likewise.
6596 (class vector_hasher): Likewise.
6597 (write_hash_table): Likewise.
6598 (psym_index_map): Likewise.
6599 (struct addrmap_index_data): Likewise.
6600 (add_address_entry): Likewise.
6601 (add_address_entry_worker): Likewise.
6602 (write_address_map): Likewise.
6603 (symbol_kind): Likewise.
6604 (write_psymbols): Likewise.
6605 (struct signatured_type_index_data): Likewise.
6606 (write_one_signatured_type): Likewise.
6607 (recursively_count_psymbols): Likewise.
6608 (recursively_write_psymbols): Likewise.
6609 (class debug_names): Likewise.
6610 (check_dwarf64_offsets): Likewise.
6611 (psyms_seen_size): Likewise.
6612 (write_gdbindex): Likewise.
6613 (write_debug_names): Likewise.
6614 (assert_file_size): Likewise.
6615 (write_psymtabs_to_index): Likewise.
6616 (save_gdb_index_command): Likewise.
6617 (_initialize_dwarf2_read): Don't register the "save gdb-index"
6619 * dwarf2read.h: New file.
6621 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6624 * dwarf2read.c (dwarf2_physname): Do not return the demangled
6625 symbol name if the CU's language stores symbol names in linkage
6627 * language.h (struct language_defn)
6628 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
6629 all instances of this struct.
6631 2018-03-26 Tom Tromey <tom@tromey.com>
6633 * stack.c (backtrace_command_1): Remove verbose code.
6635 2018-03-26 Tom Tromey <tom@tromey.com>
6637 * python/py-framefilter.c (py_print_type): Don't catch
6638 exceptions. Return void.
6639 (py_print_value): Likewise.
6640 (py_print_single_arg): Likewise.
6641 (enumerate_args): Don't catch exceptions.
6642 (py_print_args): Likewise.
6643 (py_print_frame): Likewise.
6644 (gdbpy_apply_frame_filter): Catch exceptions here.
6646 2018-03-26 Tom Tromey <tom@tromey.com>
6648 * stack.c (_initialize_stack): Remove trailing newlines from help
6649 text. Add "Usage" line to "backtrace" help.
6651 2018-03-26 Tom Tromey <tom@tromey.com>
6654 * python/py-framefilter.c (py_print_args): Call wrap_hint.
6656 2018-03-26 Tom Tromey <tom@tromey.com>
6658 * python/py-framefilter.c (py_print_single_arg): Return
6659 EXT_LANG_BT_ERROR from catch.
6661 2018-03-26 Tom Tromey <tom@tromey.com>
6664 * stack.c (backtrace_command_1): Move some code into no-filters
6667 2018-03-26 Tom Tromey <tom@tromey.com>
6669 * python/py-framefilter.c (throw_quit_or_print_exception): New
6671 (gdbpy_apply_frame_filter): Use it.
6673 2018-03-26 Tom Tromey <tom@tromey.com>
6676 * python/py-framefilter.c (py_print_type, py_print_value)
6677 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
6680 2018-03-26 Tom Tromey <tom@tromey.com>
6682 * python/py-framefilter.c (enumerate_args): Use
6683 gdb::unique_xmalloc_ptr.
6685 2018-03-26 Tom Tromey <tom@tromey.com>
6687 * python/py-framefilter.c (py_print_frame): Return
6689 (gdbpy_apply_frame_filter): Update comment.
6690 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
6692 <EXT_LANG_BT_NO_FILTERS>: Change value.
6694 2018-03-26 Tom Tromey <tom@tromey.com>
6697 * stack.c (backtrace_command): Parse "hide" argument.
6698 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
6699 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
6702 2018-03-26 Tom Tromey <tom@tromey.com>
6704 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
6706 (backtrace_command): Remove "fulltrace", add "flags".
6708 2018-03-26 Tom Tromey <tom@tromey.com>
6710 * stack.c (backtrace_command): Rewrite command line parsing.
6712 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6714 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
6716 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6718 * filename-seen-cache.h: Add include guard.
6720 2018-03-26 Keith Seitz <keiths@redhat.com>
6722 * symfile.c (place_section): Remove "struct" from section_addr_info
6724 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
6725 "struct" keyword from section_addr_info.
6727 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6729 * regformats/regdef.h (reg): Add constructors.
6731 2018-03-25 Pedro Alves <palves@redhat.com>
6733 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
6734 if then/else bodies in var_func_name extraction.
6736 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
6738 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
6739 lookup_minimal_symbol() to find symbol entry.
6740 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
6742 2018-03-23 Keith Seitz <keiths@redhat.com>
6745 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
6746 nested type definitions for C++, too.
6748 2018-03-23 Tom Tromey <tom@tromey.com>
6750 * machoread.c (struct oso_el): Add a constructor. Don't define as
6752 (macho_register_oso): Remove.
6753 (macho_symtab_read): Take a std::vector.
6754 (oso_el_compare_name): Now a std::sort comparator.
6755 (macho_symfile_read_all_oso): Take a std::vector.
6756 (macho_symfile_read): Use std::vector. Remove cleanups.
6758 2018-03-22 Tom Tromey <tom@tromey.com>
6760 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
6761 (record_full_goto_bookmark): Use std::string.
6763 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6766 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
6769 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6771 * rs6000-tdep.c (store_insn_p): New function.
6772 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
6773 and cr_reg to their unshifted values. Use store_insn_p to
6774 match LR saves using either R1 or fdata->alloca_reg. Use
6775 store_insn_p to match CR saves. Set alloca_reg_offset
6776 when alloca_reg and framep are set. Remove lr_reg shift
6777 when assigning to fdata->lr_register.
6779 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6781 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
6782 command line args instead of emitting a warning.
6784 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6786 * tracepoint.h (struct static_tracepoint_marker): Initialize
6787 fields, define default constructor, move constructor and move
6788 assignment, disable the rest.
6789 <str_id, extra>: Make std::string.
6790 (release_static_tracepoint_marker): Remove.
6791 (free_current_marker): Remove.
6792 * tracepoint.c (free_current_marker): Remove.
6793 (parse_static_tracepoint_marker_definition): Adjust to
6794 std::string, use new hex2str overload.
6795 (release_static_tracepoint_marker): Remove.
6796 (print_one_static_tracepoint_marker): Get marker by reference
6797 and adjust to std::string.
6798 (info_static_tracepoint_markers_command): Adjust to std::vector
6800 * target.h (static_tracepoint_marker_p): Remove typedef.
6801 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
6802 (struct target_ops) <to_static_tracepoint_marker_at>: Return
6804 <to_static_tracepoint_markers_by_strid>: Return std::vector.
6806 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
6807 (target_debug_print_std_vector_static_tracepoint_marker): New.
6808 (target_debug_print_struct_static_tracepoint_marker_p): Rename
6810 (target_debug_print_static_tracepoint_marker_p): ... this.
6811 * target-delegates.c: Re-generate.
6812 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
6814 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
6815 (decode_static_tracepoint_spec): Adjust to std::vector.
6816 (tracepoint_print_one_detail): Adjust to std::string.
6817 (strace_marker_decode_location): Adjust to std::string.
6818 (update_static_tracepoint): Adjust to std::string, remove call
6819 to release_static_tracepoint_marker.
6820 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6821 Adjust to std::vector.
6822 * remote.c (remote_static_tracepoint_marker_at): Return bool.
6823 (remote_static_tracepoint_markers_by_strid): Adjust to
6825 * common/rsp-low.h (hex2str): New overload with explicit count
6827 * common/rsp-low.c (hex2str): New overload with explicit count
6829 * unittests/rsp-low-selftests.c (test_hex2str): New function.
6830 (_initialize_rsp_low_selftests): Add test_hex2str test.
6831 * unittests/tracepoint-selftests.c
6832 (test_parse_static_tracepoint_marker_definition): Adjust to
6835 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6837 * tracepoint.c (parse_static_tracepoint_marker_definition):
6838 Consider case where the definition is followed by more
6840 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6841 tracepoint-selftests.c.
6842 * unittests/tracepoint-selftests.c: New.
6844 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6846 * MAINTAINERS (Write After Approval): Add Pedro Franco de
6849 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6851 * symtab.c (find_pc_sect_line): fixed indentation.
6853 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6855 * symtab.c (find_pc_sect_line): now uses binary search.
6857 2018-03-19 Tom Tromey <tom@tromey.com>
6859 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
6862 2018-03-19 Pedro Alves <palves@redhat.com>
6863 Tom Tromey <tom@tromey.com>
6865 * unittests/observable-selftests.c: New file.
6866 * common/observable.h: New file.
6867 * observable.h: New file.
6868 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
6869 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
6870 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
6871 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
6872 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
6873 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
6874 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
6875 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
6876 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
6877 python/py-breakpoint.c, python/py-finishbreakpoint.c,
6878 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
6879 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
6880 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
6881 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
6882 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
6883 tui/tui-interp.c, valops.c: Update all users.
6884 * tui/tui-hooks.c (tui_bp_created_observer)
6885 (tui_bp_deleted_observer, tui_bp_modified_observer)
6886 (tui_inferior_exit_observer, tui_before_prompt_observer)
6887 (tui_normal_stop_observer, tui_register_changed_observer):
6889 (tui_observers_token): New global.
6890 (attach_or_detach, tui_attach_detach_observers): New functions.
6891 (tui_install_hooks, tui_remove_hooks): Use
6892 tui_attach_detach_observers.
6893 * record-btrace.c (record_btrace_thread_observer): Remove.
6894 (record_btrace_thread_observer_token): New global.
6895 * observer.sh: Remove.
6896 * observer.c: Rename to observable.c.
6897 * observable.c (namespace gdb_observers): Define new objects.
6898 (observer_debug): Move into gdb_observers namespace.
6899 (struct observer, struct observer_list, xalloc_observer_list_node)
6900 (xfree_observer_list_node, generic_observer_attach)
6901 (generic_observer_detach, generic_observer_notify): Remove.
6902 (_initialize_observer): Update.
6903 Don't include observer.inc.
6904 * Makefile.in (generated_files): Remove observer.h, observer.inc.
6905 (clean mostlyclean): Likewise.
6906 (observer.h, observer.inc): Remove targets.
6907 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
6908 (COMMON_SFILES): Use observable.c, not observer.c.
6909 * .gitignore: Remove observer.h.
6911 2018-03-18 Tom Tromey <tom@tromey.com>
6913 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
6915 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
6917 2018-03-17 Tom Tromey <tom@tromey.com>
6919 * auto-load.c (auto_load_objfile_script_1): Use std::string.
6921 2018-03-17 Tom Tromey <tom@tromey.com>
6923 * target.c (class scoped_target_fd): New.
6924 (target_fileio_close_cleanup): Remove.
6925 (target_fileio_read_alloc_1): Use scoped_target_fd.
6927 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
6929 * silent-rules.mk: New.
6930 * Makefile.in: Include silent-rules.mk
6931 (srcdir, VPATH, top_srcdir): Move up.
6932 (COMPILE): Add ECHO_CXX.
6933 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
6934 (init.c): Add ECHO_INIT_C.
6935 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6936 (version.c): Add ECHO_GEN.
6937 (printcmd.o): Add ECHO_CXX.
6938 (target-float.o): Add ECHO_CXX.
6939 (ada-exp.o): Add ECHO_CXX.
6940 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
6941 (insight$(EXEEXT)): Add ECHO_CXXLD.
6942 * gnulib/configure.ac: Add AM_SILENT_RULES.
6943 * gnulib/aclocal.m4: Re-generate.
6944 * gnulib/configure: Re-generate.
6945 * gnulib/import/Makefile.in: Re-generate.
6947 2018-03-16 Tom Tromey <tom@tromey.com>
6949 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
6950 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
6951 * utils.c (do_free_section_addr_info)
6952 (make_cleanup_free_section_addr_info): Remove.
6953 * symfile.h (struct other_sections): Add constructor.
6954 (struct section_addr_info): Remove.
6955 (section_addr_info): New typedef.
6956 (struct sym_fns) <sym_offsets>: Change type of parameter.
6957 (build_section_addr_info_from_objfile)
6958 (relative_addr_info_to_section_offsets, addr_info_make_relative)
6959 (default_symfile_offsets, symbol_file_add)
6960 (symbol_file_add_from_bfd)
6961 (build_section_addr_info_from_section_table): Update.
6962 (alloc_section_addr_info, free_section_addr_info): Don't declare.
6963 * symfile.c (alloc_section_addr_info): Remove.
6964 (build_section_addr_info_from_section_table): Change return type.
6966 (build_section_addr_info_from_bfd)
6967 (build_section_addr_info_from_objfile): Likewise.
6968 (free_section_addr_info): Remove.
6969 (relative_addr_info_to_section_offsets): Change type of "addrs".
6970 (addrs_section_compar): Now a std::sort comparator.
6971 (addrs_section_sort): Change return type.
6972 (addr_info_make_relative): Change type of "addrs". Update.
6973 (default_symfile_offsets, syms_from_objfile_1)
6974 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
6975 (symbol_file_add_separate): Update.
6976 (symbol_file_add): Change type of "addrs". Update.
6977 (add_symbol_file_command): Update. Remove cleanups.
6978 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
6980 * symfile-debug.c (debug_sym_offsets): Change type of "info".
6981 * solib.c (solib_read_symbols): Update.
6982 * objfiles.c (objfile_relocate): Update. Remove cleanups.
6983 * machoread.c (macho_symfile_offsets): Update.
6984 * jit.c (jit_bfd_try_read_symtab): Update.
6986 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
6988 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6989 unittests/utils-selftests.c.
6990 * unittests/utils-selftests.c: New file.
6992 2018-03-14 Tom Tromey <tom@tromey.com>
6995 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
6998 2018-03-14 Tom Tromey <tom@tromey.com>
7001 * printcmd.c (printf_pointer): Allow "-" in format.
7003 2018-03-14 Tom Tromey <tom@tromey.com>
7005 * printcmd.c (_initialize_printcmd): Add usage to printf.
7007 2018-03-14 Yao Qi <qiyao@sourceware.org>
7009 * MAINTAINERS: Update my email address.
7011 2018-03-13 Tom Tromey <tom@tromey.com>
7013 * machoread.c (macho_check_dsym): Change filenamep to a
7015 (macho_symfile_read): Update.
7016 * symfile.c (load_command): Use std::string.
7018 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
7020 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7021 to error message string.
7022 (riscv_register_name): Use xsnprintf instead of sprintf.
7023 (riscv_insn::fetch_instruction): Use gdb_assert instead of
7025 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7027 (riscv_push_dummy_call): Likewise.
7029 2018-03-12 Tom Tromey <tom@tromey.com>
7031 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7032 Use gdb::byte_vector.
7033 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7035 2018-03-12 Yao Qi <yao.qi@linaro.org>
7037 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7038 parameter type to readable_regcache.
7039 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7042 2018-03-11 Tom Tromey <tom@tromey.com>
7044 * dwarf2read.c (struct nextfield): Add initializers.
7045 (struct nextfnfield): Remove.
7046 (struct fnfieldlist): Add initializers. Remove "length" and
7047 "head", use std::vector.
7048 (struct decl_field_list): Remove.
7049 (struct field_info): Add initializers.
7050 <fields, baseclasses>: Now std::vector.
7051 <nbaseclasses, nfnfields, typedef_field_list_count,
7052 nested_types_list_count>: Remove.
7053 (dwarf2_add_field, dwarf2_add_type_defn)
7054 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7055 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7056 (process_structure_scope): Update.
7058 2018-03-11 Tom Tromey <tom@tromey.com>
7060 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7061 for use by std::sort.
7062 (build_type_psymtabs_1): Use std::vector.
7064 2018-03-09 Eli Zaretskii <eliz@gnu.org>
7066 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7067 and LIBMPFR in the printed configuration.
7069 2018-03-08 Tom Tromey <tom@tromey.com>
7071 * source.c (get_filename_and_charpos): Use scoped_fd.
7072 * nto-procfs.c (procfs_open_1): Use scoped_fd.
7073 (procfs_pidlist): Likewise.
7074 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7075 (iterate_over_mappings): Likewise.
7077 2018-03-08 Tom Tromey <tom@tromey.com>
7079 * infcall.c (struct call_return_meta_info)
7080 <stack_temporaries_enabled>: Remove.
7081 (get_call_return_value, call_function_by_hand_dummy): Update.
7082 * thread.c (disable_thread_stack_temporaries): Remove.
7083 (enable_thread_stack_temporaries): Remove.
7084 (thread_stack_temporaries_enabled_p): Return bool.
7085 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7086 (get_last_thread_stack_temporary): Update.
7087 * eval.c (evaluate_subexp): Update.
7088 * gdbthread.h (class enable_thread_stack_temporaries): Now a
7089 class, not a function.
7090 (value_ptr, value_vec): Remove typedefs.
7091 (class thread_info) <stack_temporaries_enabled>: Now bool.
7092 <stack_temporaries>: Now a std::vector.
7093 (thread_stack_temporaries_enabled_p)
7094 (value_in_thread_stack_temporaries): Return bool.
7096 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
7098 * remote.c (putpkt_binary): Fix omitted bytes reporting.
7099 (getpkt_or_notif_sane_1): Likewise.
7101 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7103 * build-id.c (build_id_to_debug_bfd): Use std::string.
7105 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7107 * build-id.c (find_separate_debug_file_by_buildid): Return
7109 * build-id.h (find_separate_debug_file_by_buildid): Return
7111 * coffread.c (coff_symfile_read): Adjust to std::string.
7112 * elfread.c (elf_symfile_read): Adjust to std::string.
7113 * symfile.c (separate_debug_file_exists): Change parameter to
7115 (find_separate_debug_file): Return std::string.
7116 (find_separate_debug_file_by_debuglink): Return std::string.
7117 * symfile.h (find_separate_debug_file_by_debuglink): Return
7120 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7122 * common/xml-utils.c (xml_escape_text): Move code to...
7123 (xml_escape_text_append): ... this new function.
7124 * common/xml-utils.h (xml_escape_text_append): New declaration.
7125 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
7127 (_initialize_xml_utils): register test_xml_escape_text_append as
7130 2018-03-07 Alan Hayward <alan.hayward@arm.com>
7132 * defs.h: Remove MAX_REGISTER_SIZE.
7133 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7135 * python/py-unwind.c (pyuw_sniffer): Likewise.
7137 2018-03-07 Tom Tromey <tom@tromey.com>
7139 * linux-tdep.c (linux_info_proc): Update.
7140 * target.h (struct target_ops) <to_fileio_readlink>: Return
7142 (target_fileio_readlink): Return optional<string>.
7143 * remote.c (remote_hostio_readlink): Return optional<string>.
7144 * inf-child.c (inf_child_fileio_readlink): Return
7146 * target.c (target_fileio_readlink): Return optional<string>.
7148 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
7150 * regcache.c (cooked_read_test): Add riscv to the list of
7151 architectures that have a save_reggroup.
7153 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
7155 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7156 value is not a dynamic class object.
7158 2018-03-06 Tom Tromey <tom@tromey.com>
7160 * rust-exp.y: Formatting fixes.
7162 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7164 * riscv-tdep.c (riscv_register_name): Remove target description
7166 (riscv_gdbarch_init): Remove target description check.
7168 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7170 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7172 * riscv-tdep.h: Likewise.
7174 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7176 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7177 (riscv_pseudo_register_write): Delete.
7178 (riscv_gdbarch_init): Remove all use of pseudo registers.
7180 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7182 * record-btrace.c (btrace_print_lines): Replace cleanup
7183 parameter with RAII equivalents.
7184 (btrace_insn_history): Replace cleanup with RAII equivalents.
7185 * ui-out.h (make_cleanup_ui_out_list_begin_end,
7186 make_cleanup_ui_out_tuple_begin_end): Remove.
7187 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7188 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7189 make_cleanup_ui_out_list_begin_end): Remove.
7191 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7193 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7194 parameter types to std::vector. Use bool.
7195 (record_btrace_wait): Replace VEC(tp_t) with
7196 std::vector<thread_info *>.
7197 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7199 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7201 * record-btrace.c (record_btrace_disable_callback): Remove.
7202 (struct scoped_btrace_disable): New.
7203 (record_btrace_open): Use scoped_btrace_disable.
7205 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7207 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7208 reading values from registers.
7210 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7212 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7215 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7217 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7218 change parameter type. Use GDB's print functions, and use
7219 core_addr_to_string where appropriate.
7220 (riscv_push_dummy_call): Use core_addr_to_string where
7221 appropriate, update call to riscv_print_arg_location, and reindent
7223 (riscv_return_value): Update call to riscv_print_arg_location.
7225 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7226 Tim Newsome <tim@sifive.com>
7227 Albert Ou <a0u@eecs.berkeley.edu>
7228 Darius Rad <darius@bluespec.com>
7230 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7231 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7232 (ALLDEPFILES): Add riscv-tdep.c
7233 * configure.tgt: Add riscv support.
7234 * riscv-tdep.c: New file.
7235 * riscv-tdep.h: New file.
7236 * NEWS: Mention new target.
7237 * MAINTAINERS: Add entry for riscv.
7239 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7241 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7242 fields within aggregates.
7244 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
7246 * record-btrace.c (btrace_print_lines): Change type of flags to
7247 gdb_disassembly_flags.
7249 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7251 * fbsd-nat.c: Include "inf-ptrace.h".
7252 (USE_SIGTRAP_SIGINFO): Conditionally define.
7253 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
7254 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
7255 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
7257 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
7259 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
7261 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
7262 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
7263 "supports_stopped_by_hw_breakpoint" target methods.
7265 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7267 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
7268 * fbsd-nat.c (debug_fbsd_nat): New variable.
7269 (show_fbsd_nat_debug): New function.
7270 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
7271 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
7273 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7275 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
7276 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
7278 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
7279 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
7282 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7284 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
7285 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
7287 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7289 * charset.c (struct charset_vector): New.
7290 (charsets): Change type to charset_vector.
7291 (find_charset_names): Adjust.
7293 (_initialize_charset): Adjust.
7295 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7297 * progspace.h (struct program_space) <deleted_solibs>: Change
7298 type to std::vector<std::string>.
7299 * progspace.c (clear_program_space_solib_cache): Adjust.
7300 * breakpoint.c (print_solib_event): Adjust.
7301 (check_status_catch_solib): Adjust.
7302 * solib.c (update_solib_list): Adjust.
7303 * ui-out.h (class ui_out) <field_string>: New overload.
7304 * ui-out.c (ui_out::field_string): New overload.
7306 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7308 * progspace.h (struct program_space): Add constructor and
7309 destructor, initialize fields.
7310 (add_program_space): Remove.
7311 * progspace.c (add_program_space): Rename to...
7312 (program_space::program_space): ... this.
7313 (release_program_space): Rename to...
7314 (program_space::~program_space): ... this.
7315 (delete_program_space): Use delete to delete program_space.
7316 (initialize_progspace): Use new to allocate program_space.
7317 * inferior.c (add_inferior_with_spaces): Likewise.
7318 (clone_inferior_command): Likewise.
7319 * infrun.c (follow_fork_inferior): Likewise.
7320 (handle_vfork_child_exec_or_exit): Likewise.
7322 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7324 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
7325 (delim_string_to_char_ptr_vec): Return std::vector of
7326 gdb::unique_xmalloc_ptr.
7327 (dirnames_to_char_ptr_vec_append): Take std::vector of
7328 gdb::unique_xmalloc_ptr.
7329 (dirnames_to_char_ptr_vec): Return std::vector of
7330 gdb::unique_xmalloc_ptr.
7331 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
7332 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
7333 (delim_string_to_char_ptr_vec): Return an std::vector of
7334 gdb::unique_xmalloc_ptr, adjust the code.
7335 (dirnames_to_char_ptr_vec_append): Take an std::vector of
7336 gdb::unique_xmalloc_ptr, adjust the code.
7337 (dirnames_to_char_ptr_vec): Return an std::vector of
7338 gdb::unique_xmalloc_ptr, adjust the code.
7339 * auto-load.c (auto_load_safe_path_vec): Change type to
7340 std::vector of gdb::unique_xmalloc_ptr.
7341 (auto_load_expand_dir_vars): Return an std::vector of
7342 gdb::unique_xmalloc_ptr, adjust the code.
7343 (auto_load_safe_path_vec_update): Adjust.
7344 (filename_is_in_auto_load_safe_path_vec): Adjust.
7345 (auto_load_objfile_script_1): Adjust.
7346 * build-id.c (build_id_to_debug_bfd): Adjust.
7347 * linux-thread-db.c (thread_db_load_search): Adjust.
7348 * source.c (add_path): Adjust.
7350 * symfile.c (find_separate_debug_file): Adjust.
7351 * utils.c (do_free_char_ptr_vec): Remove.
7352 (make_cleanup_free_char_ptr_vec): Remove.
7354 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
7357 * common/pathstuff.c: Conditionally include "<windows.h>".
7359 2018-03-01 Georg Sauthoff <mail@georg.so>
7362 * gcore.in: Quote variables and switch interpreter to bash.
7364 2018-03-01 Tom Tromey <tom@tromey.com>
7366 * dwarf2read.c (alloc_discriminant_info): Fix default_index
7367 assertion. Add assertion for discriminant_index.
7368 (quirk_rust_enum): Use correct base type name in univariant case.
7370 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
7372 * record.c (get_call_history_modifiers): Return a
7374 (cmd_record_call_history): Adjust.
7375 * record-btrace.c (record_btrace_call_history): Adjust.
7376 (record_btrace_call_history_range): Adjust.
7377 (record_btrace_call_history_from): Adjust.
7378 * target-debug.h (target_debug_print_record_print_flags): New.
7379 * target-delegates.c: Re-generate.
7380 * target.c (target_call_history): Change flags type.
7381 (target_call_history_from): Likewise.
7382 (target_call_history_range): Likewise.
7383 * target.h (struct target_ops) <target_call_history>: Likewise.
7384 (target_call_history_from): Likewise.
7385 (target_call_history_range): Likewise.
7387 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7388 Simon Marchi <simon.marchi@polymtl.ca>
7390 * common/common-utils.c: Include "sys/stat.h".
7391 (is_regular_file): Move here from "source.c"; change return
7393 * common/common-utils.h (is_regular_file): New prototype.
7394 * common/pathstuff.c (contains_dir_separator): New function.
7395 * common/pathstuff.h (contains_dir_separator): New prototype.
7396 * source.c: Don't include "sys/stat.h".
7397 (is_regular_file): Move to "common/common-utils.c".
7399 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7401 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
7402 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
7403 * auto-load.c: Include "common/pathstuff.h".
7404 * common/common-def.h (current_directory): Move here.
7405 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
7407 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
7409 * common/pathstuff.c: New file.
7410 * common/pathstuff.h: New file.
7411 * compile/compile.c: Include "common/pathstuff.h".
7412 * defs.h (current_directory): Move to "common/common-defs.h".
7413 * dwarf2read.c: Include "common/pathstuff.h".
7415 * guile/scm-safe-call.c: Likewise.
7416 * linux-thread-db.c: Likewise.
7418 * nto-tdep.c: Likewise.
7419 * objfiles.c: Likewise.
7420 * source.c: Likewise.
7421 * symtab.c: Likewise.
7422 * utils.c: Include "common/pathstuff.h".
7423 (gdb_realpath): Move to "common/pathstuff.c".
7424 (gdb_realpath_keepfile): Likewise.
7425 (gdb_abspath): Likewise.
7426 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
7427 (gdb_realpath_keepfile): Likewise.
7428 (gdb_abspath): Likewise.
7430 2018-02-28 John Baldwin <jhb@FreeBSD.org>
7432 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
7433 wildcard process pid for super_resume for kernels with a
7436 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
7438 * compile/compile.c (get_args): Add additional comments
7439 explaining function.
7441 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
7442 Tom Tromey <tom@tromey.com>
7444 * target.h (memory_write_request_s): Remove typedef. Don't define
7446 (target_write_memory_blocks): Change argument to std::vector.
7447 (struct memory_write_request): Add constructor.
7448 * target-memory.c (compare_block_starting_address): Return bool.
7449 Change argument types.
7450 (claim_memory): Change arguments to use std::vector.
7451 (split_regular_and_flash_blocks, blocks_to_erase)
7452 (compute_garbled_blocks): Likewise.
7453 (cleanup_request_data, cleanup_write_requests_vector): Remove.
7454 (target_write_memory_blocks): Change argument to std::vector.
7455 * symfile.c (struct load_section_data): Add constructor and
7456 destructor. Use std::vector for "requests".
7457 (struct load_progress_data): Add initializers.
7458 (load_section_callback): Update. Use "new".
7459 (clear_memory_write_data): Remove.
7460 (generic_load): Update.
7462 2018-02-27 Alan Hayward <alan.hayward@arm.com>
7464 * arch/aarch64.h: Use common/tdesc.h.
7466 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7468 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
7469 architecture with a 64-bit ABI.
7471 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7473 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
7474 ahead of target description loading.
7476 2018-02-26 Tom Tromey <tom@tromey.com>
7478 * stack.c (backtrace_command_1): Update.
7479 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
7481 * python/py-framefilter.c (py_print_frame)
7482 (gdbpy_apply_frame_filter): Change type of "flags".
7483 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
7485 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
7486 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
7487 * extension.h (enum frame_filter_flag): Rename from
7489 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
7490 (apply_ext_lang_frame_filter): Change type of "flags".
7491 * extension.c (apply_ext_lang_frame_filter): Change type of
7493 * extension-priv.h (struct extension_language_ops)
7494 <apply_frame_filter>: Change type of "flags".
7496 2018-02-26 Tom Tromey <tom@tromey.com>
7499 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
7500 off-by-one in py_end computation.
7501 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
7503 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
7506 2018-02-26 Tom Tromey <tom@tromey.com>
7508 * dwarf2read.c (struct variant_field): New.
7509 (struct nextfield) <variant>: New field.
7510 (dwarf2_add_field): Handle DW_TAG_variant_part.
7511 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
7512 discriminated union.
7513 (read_structure_type): Handle DW_TAG_variant_part.
7514 (handle_struct_member_die): New function, extracted from
7515 process_structure_scope. Handle DW_TAG_variant.
7516 (process_structure_scope): Handle discriminated unions. Call
7517 handle_struct_member_die.
7519 2018-02-26 Tom Tromey <tom@tromey.com>
7521 * rust-lang.h (rust_last_path_segment): Declare.
7522 * rust-lang.c (rust_last_path_segment): Now public. Change
7524 (struct disr_info): Remove.
7525 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
7526 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
7527 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
7528 (rust_enum_p, rust_enum_variant): New function.
7529 (rust_underscore_fields): Remove "offset" parameter.
7530 (rust_print_enum): New function.
7531 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
7532 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
7533 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
7535 (rust_internal_print_type): New function, from rust_print_type.
7537 (rust_print_type): Call rust_internal_print_type.
7538 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
7539 Update enum handling.
7540 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
7541 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
7542 (rust_union_quirks): New functions.
7543 (process_full_comp_unit, process_full_type_unit): Call
7545 (process_structure_scope): Update rust_unions if necessary.
7547 2018-02-26 Tom Tromey <tom@tromey.com>
7549 * value.h (value_union_variant): Declare.
7550 * valops.c (value_union_variant): New function.
7551 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
7552 (struct discriminant_info): New.
7553 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
7555 (struct main_type) <flag_discriminated_union>: New field.
7557 2018-02-26 Tom Tromey <tom@tromey.com>
7559 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7560 unittests/unpack-selftests.c.
7561 * unittests/unpack-selftests.c: New file.
7562 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
7564 2018-02-26 Yao Qi <yao.qi@linaro.org>
7566 * dwarf2read.c (struct partial_die_info) <read>: New method.
7567 (read_partial_die): Remove the declaration.
7568 (load_partial_dies): Update.
7569 (partial_die_info::partial_die_info):
7570 (read_partial_die): Change it to partial_die_info::read.
7572 2018-02-26 Yao Qi <yao.qi@linaro.org>
7574 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
7575 (fixup_partial_die): Remove declaration.
7576 (scan_partial_symbols): Update.
7577 (partial_die_parent_scope): Likewise.
7578 (partial_die_full_name): Likewise.
7579 (fixup_partial_die): Change it to partial_die_info::fixup.
7581 2018-02-26 Yao Qi <yao.qi@linaro.org>
7583 * dwarf2read.c (read_partial_die): Update the declaration.
7584 (load_partial_dies): Caller update.
7585 (read_partial_die): Remove one argument abbrev_len.
7587 2018-02-26 Yao Qi <yao.qi@linaro.org>
7589 * dwarf2read.c (struct partial_die_info): Add ctor, delete
7590 assignment operator.
7591 (load_partial_dies): Use ctor and copy ctor.
7592 (read_partial_die): Update.
7593 (dwarf2_cu::find_partial_die): Use ctor.
7595 2018-02-26 Yao Qi <yao.qi@linaro.org>
7597 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
7598 (find_partial_die_in_comp_unit): Change it to
7599 dwarf2_cu::find_partial_die.
7600 (find_partial_die): Update.
7602 2018-02-26 Yao Qi <yao.qi@linaro.org>
7604 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
7607 2018-02-26 Yao Qi <yao.qi@linaro.org>
7609 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
7611 2018-02-26 Alan Hayward <alan.hayward@arm.com>
7613 * arch/amd64.h: Use common/tdesc.h.
7614 * arch/i386.c: Likewise.
7615 * arch/i386.h: Likewise.
7616 * arch/tic6x.c: Likewise.
7617 * arch/tdesc.h: Move file from here...
7618 * common/tdesc.h: ...to here.
7619 * features/aarch64-core.c: Regenerate.
7620 * features/aarch64-fpu.c: Regenerate.
7621 * features/i386/32bit-avx.c: Regenerate.
7622 * features/i386/32bit-avx512.c: Regenerate.
7623 * features/i386/32bit-core.c: Regenerate.
7624 * features/i386/32bit-linux.c: Regenerate.
7625 * features/i386/32bit-mpx.c: Regenerate.
7626 * features/i386/32bit-pkeys.c: Regenerate.
7627 * features/i386/32bit-sse.c: Regenerate.
7628 * features/i386/64bit-avx.c: Regenerate.
7629 * features/i386/64bit-avx512.c: Regenerate.
7630 * features/i386/64bit-core.c: Regenerate.
7631 * features/i386/64bit-linux.c: Regenerate.
7632 * features/i386/64bit-mpx.c: Regenerate.
7633 * features/i386/64bit-pkeys.c: Regenerate.
7634 * features/i386/64bit-segments.c: Regenerate.
7635 * features/i386/64bit-sse.c: Regenerate.
7636 * features/i386/x32-core.c: Regenerate.
7637 * features/tic6x-c6xp.c: Regenerate.
7638 * features/tic6x-core.c: Regenerate.
7639 * features/tic6x-gp.c: Regenerate.
7640 * target-descriptions.c: Use common/tdesc.h.
7641 * target-descriptions.h: Likewise.
7643 2018-02-24 Tom Tromey <tom@tromey.com>
7645 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
7646 (try_thread_db_load_from_dir, thread_db_load_search): Use
7648 (info_auto_load_libthread_db_compare): Return bool. Change
7650 (info_auto_load_libthread_db): Use std::vector, std::string.
7653 2018-02-24 Tom Tromey <tom@tromey.com>
7655 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
7657 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
7659 * gdbarch.c: Rebuild.
7660 * gdbarch.h: Rebuild.
7661 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
7662 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
7663 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
7666 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
7668 * gdbtypes.h (sect_offset): Change type to uint64_t.
7669 (sect_offset_str): New function.
7670 * dwarf2read.c (create_addrmap_from_aranges): Use
7672 (error_check_comp_unit_head): Likewise.
7673 (create_debug_type_hash_table): Likewise.
7674 (read_cutu_die_from_dwo): Likewise.
7675 (init_cutu_and_read_dies): Likewise.
7676 (init_cutu_and_read_dies_no_follow): Likewise.
7677 (process_psymtab_comp_unit_reader): Likewise.
7678 (partial_die_parent_scope): Likewise.
7679 (peek_die_abbrev): Likewise.
7680 (process_queue): Likewise.
7681 (dwarf2_physname): Likewise.
7682 (read_namespace_alias): Likewise.
7683 (read_import_statement): Likewise.
7684 (create_dwo_cu_reader): Likewise.
7685 (create_cus_hash_table): Likewise.
7686 (lookup_dwo_cutu): Likewise.
7687 (inherit_abstract_dies): Likewise.
7688 (read_func_scope): Likewise.
7689 (read_call_site_scope): Likewise.
7690 (dwarf2_add_member_fn): Likewise.
7691 (read_common_block): Likewise.
7692 (read_module_type): Likewise.
7693 (read_typedef): Likewise.
7694 (read_subrange_type): Likewise.
7695 (load_partial_dies): Likewise.
7696 (read_partial_die): Likewise.
7697 (find_partial_die): Likewise.
7698 (read_str_index): Likewise.
7699 (dwarf2_string_attr): Likewise.
7700 (build_error_marker_type): Likewise.
7701 (lookup_die_type): Likewise.
7702 (dump_die_shallow): Likewise.
7703 (follow_die_ref): Likewise.
7704 (dwarf2_fetch_die_loc_sect_off): Likewise.
7705 (dwarf2_fetch_constant_bytes): Likewise.
7706 (follow_die_sig): Likewise.
7707 (get_signatured_type): Likewise.
7708 (get_DW_AT_signature_type): Likewise.
7709 (dwarf2_find_containing_comp_unit): Likewise.
7710 (set_die_type): Likewise.
7712 2018-02-21 John Baldwin <jhb@FreeBSD.org>
7714 * arch/aarch64.c: Include "common-defs.h".
7715 * arch/amd64.c: Likewise.
7716 * arch/i386.c: Likewise.
7718 2018-02-21 Tom Tromey <tom@tromey.com>
7720 * value.h: (extract_field_op): Update.
7721 * eval.c (extract_field_op): Return a const char *.
7722 * expression.h (parse_expression_for_completion): Update.
7723 * completer.c (complete_expression): Update.
7724 (add_struct_fields): Make fieldname const.
7725 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
7726 (mark_completion_tag, parse_exp_in_context_1): Update.
7727 (parse_expression_for_completion): Change "name" to
7728 unique_xmalloc_ptr*.
7730 2018-02-21 Tom Tromey <tom@tromey.com>
7732 * infcall.c (call_function_by_hand_dummy): Use std::vector.
7734 2018-02-21 Yao Qi <yao.qi@linaro.org>
7736 * avr-tdep.c (avr_read_pc): Change parameter type to
7738 * gdbarch.sh (read_pc): Likewise.
7739 * gdbarch.c: Re-generated.
7740 * gdbarch.h: Re-generated.
7741 * hppa-tdep.c (hppa_read_pc): Change parameter type to
7743 * ia64-tdep.c (ia64_read_pc): Likewise.
7744 * mips-tdep.c (mips_read_pc): Likewise.
7745 * spu-tdep.c (spu_read_pc): Likewise.
7747 2018-02-21 Yao Qi <yao.qi@linaro.org>
7749 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
7750 * regcache-dump.c: New file.
7751 * regcache.c: Move register_dump to regcache-dump.c.
7752 (maintenance_print_registers): Likewise.
7753 (maintenance_print_raw_registers): Likewise.
7754 (maintenance_print_cooked_registers): Likewise.
7755 (maintenance_print_register_groups): Likewise.
7756 (maintenance_print_remote_registers): Likewise.
7757 (_initialize_regcache): Likewise.
7758 * regcache.h (register_dump): Moved from regcache.c.
7760 2018-02-21 Yao Qi <yao.qi@linaro.org>
7762 * regcache.c (regcache::regcache): Update.
7763 (regcache::invalidate): Move it to detached_regcache::invalidate.
7764 (get_thread_arch_aspace_regcache): Update.
7765 (regcache::raw_update): Update.
7766 (regcache::cooked_read): Remove some code.
7767 (regcache::cooked_read_value): Likewise.
7768 (regcache::raw_write): Remove assert on m_readonly_p.
7769 (regcache::raw_supply_integer): Move it to
7770 detached_regcache::raw_supply_integer.
7771 (regcache::raw_supply_zeroed): Likewise.
7772 * regcache.h (detached_regcache) <raw_supply_integer>: New
7774 <raw_supply_zeroed, invalidate>: Likewise.
7775 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
7776 <invalidate>: Likewise.
7777 <m_readonly_p>: Removed.
7779 2018-02-21 Yao Qi <yao.qi@linaro.org>
7781 * infcmd.c (get_return_value): Let stop_regs point to
7782 get_current_regcache.
7783 * regcache.c (regcache::regcache): Remove.
7784 (register_dump_reg_buffer): New class.
7785 (regcache_print): Adjust.
7786 * regcache.h (regcache): Remove constructors.
7788 2018-02-21 Yao Qi <yao.qi@linaro.org>
7790 * regcache.c (class register_dump): New class.
7791 (register_dump_regcache, register_dump_none): New class.
7792 (register_dump_remote, register_dump_groups): New class.
7793 (regcache_print): Update.
7794 * regcache.h (regcache_dump_what): Move it to regcache.c.
7795 (regcache) <dump>: Remove.
7797 2018-02-21 Yao Qi <yao.qi@linaro.org>
7799 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
7801 (jit_unwind_reg_set_impl): Call raw_supply.
7802 (jit_frame_sniffer): Use reg_buffer_rw.
7803 * record-full.c (record_full_core_regbuf): Change its type.
7804 (record_full_core_open_1): Use reg_buffer_rw.
7805 (record_full_close): Likewise.
7806 (record_full_core_fetch_registers): Use regcache->raw_supply.
7807 (record_full_core_store_registers): Likewise.
7808 * regcache.c (regcache::get_register_status): Move it to
7810 (regcache_raw_set_cached_value): Remove.
7811 (regcache::raw_set_cached_value): Remove.
7812 (regcache::raw_write): Call raw_supply.
7813 (regcache::raw_supply): Move it to reg_buffer_rw.
7814 * regcache.h (regcache_raw_set_cached_value): Remove.
7815 (reg_buffer_rw): New class.
7817 2018-02-21 Yao Qi <yao.qi@linaro.org>
7819 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
7820 readonly_detached_regcache.
7821 (dummy_frame_prev_register): Use regcache->cooked_read.
7822 * frame.c (frame_save_as_regcache): Change return type.
7823 (frame_pop): Update.
7824 * frame.h (frame_save_as_regcache): Update declaration.
7825 * inferior.h (get_infcall_suspend_state_regcache): Update
7827 * infrun.c (infcall_suspend_state) <registers>: use
7828 readonly_detached_regcache.
7829 (save_infcall_suspend_state): Don't use regcache_dup.
7830 (get_infcall_suspend_state_regcache): Change return type.
7831 * linux-fork.c (struct fork_info) <savedregs>: Change to
7832 readonly_detached_regcache.
7834 (fork_save_infrun_state): Don't use regcache_dup.
7835 (info_checkpoints_command): Adjust.
7836 * mi/mi-main.c (register_changed_p): Update declaration.
7837 (mi_cmd_data_list_changed_registers): Use
7838 readonly_detached_regcache.
7839 (register_changed_p): Change parameter type to
7840 readonly_detached_regcache.
7841 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
7842 readonly_detached_regcache.
7843 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
7844 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
7846 (regcache::save): Move it to reg_buffer.
7847 (regcache::restore): Change parameter type.
7848 (regcache_dup): Remove.
7849 * regcache.h (reg_buffer) <save>: New method.
7850 (readonly_detached_regcache): New class.
7851 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
7852 readonly_detached_regcache.
7853 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
7855 2018-02-21 Yao Qi <yao.qi@linaro.org>
7857 * frame.c (frame_save_as_regcache): Use regcache method save.
7858 (frame_pop): Use regcache method restore.
7859 * infrun.c (restore_infcall_suspend_state): Likewise.
7860 * linux-fork.c (fork_load_infrun_state): Likewise.
7861 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
7863 * regcache.c (regcache_save): Remove.
7864 (regcache::restore): More asserts.
7865 (regcache_cpy): Remove.
7866 * regcache.h (regcache_save): Remove the declaration.
7867 (regcache::restore): Move from private to public.
7868 Remove the friend declaration of regcache_cpy.
7869 (regcache_cpy): Remove declaration.
7871 2018-02-21 Yao Qi <yao.qi@linaro.org>
7873 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
7874 parameter type to 'readable_regcache *'.
7875 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
7876 * arm-tdep.c (arm_neon_quad_read): Likewise.
7877 (arm_pseudo_read): Likewise.
7878 * avr-tdep.c (avr_pseudo_register_read): Likewise.
7879 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
7880 * frv-tdep.c (frv_pseudo_register_read): Likewise.
7881 * gdbarch.c: Re-generated.
7882 * gdbarch.h: Re-generated.
7883 * gdbarch.sh (pseudo_register_read): Change parameter type to
7884 'readable_regcache *'.
7885 (pseudo_register_read_value): Likewise.
7886 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
7887 (h8300_pseudo_register_read): Likewise.
7888 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
7889 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
7890 (i386_pseudo_register_read_into_value): Likewise.
7891 (i386_pseudo_register_read_value): Likewise.
7892 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
7894 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
7895 * m32c-tdep.c (m32c_raw_read): Likewise.
7896 (m32c_read_flg): Likewise.
7897 (m32c_banked_register): Likewise.
7898 (m32c_banked_read): Likewise.
7899 (m32c_sb_read): Likewise.
7900 (m32c_part_read): Likewise.
7901 (m32c_cat_read): Likewise.
7902 (m32c_r3r2r1r0_read): Likewise.
7903 (m32c_pseudo_register_read): Likewise.
7904 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
7905 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
7906 (mep_pseudo_cr64_read): Likewise.
7907 (mep_pseudo_register_read): Likewise.
7908 * mips-tdep.c (mips_pseudo_register_read): Likewise.
7909 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
7910 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
7911 * regcache.c (regcache::raw_read): Move it to readable_regcache.
7912 (regcache::cooked_read): Likewise.
7913 (regcache::cooked_read_value): Likewise.
7914 (regcache_cooked_read_signed):
7915 (regcache::cooked_read): Likewise.
7916 * regcache.h (readable_regcache): New class.
7917 (regcache): Inherit readable_regcache. Move some methods to
7919 * rl78-tdep.c (rl78_pseudo_register_read): Change
7920 parameter type to 'readable_regcache *'.
7921 * rs6000-tdep.c (do_regcache_raw_read): Remove.
7922 (e500_pseudo_register_read): Change parameter type to
7923 'readable_regcache *'.
7924 (dfp_pseudo_register_read): Likewise.
7925 (vsx_pseudo_register_read): Likewise.
7926 (efpr_pseudo_register_read): Likewise.
7927 * s390-tdep.c (s390_pseudo_register_read): Likewise.
7928 * sh-tdep.c (sh_pseudo_register_read): Likewise.
7929 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
7930 (sh64_pseudo_register_read): Likewise.
7931 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
7932 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
7933 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
7934 (spu_pseudo_register_read): Likewise.
7935 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
7936 (xtensa_pseudo_register_read): Likewise.
7938 2018-02-21 Yao Qi <yao.qi@linaro.org>
7940 * regcache.c (regcache::regcache): Call reg_buffer ctor.
7941 (regcache::arch): Move it to reg_buffer::arch.
7942 (regcache::register_buffer): Likewise.
7943 (regcache::assert_regnum): Likewise.
7944 (regcache::num_raw_registers): Likewise.
7945 * regcache.h (reg_buffer): New class.
7946 (regcache): Inherit reg_buffer.
7948 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
7950 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
7951 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
7953 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
7955 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
7957 2018-02-19 Alan Hayward <alan.hayward@arm.com>
7959 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
7960 (SFILES): Remove common/*.c files.
7961 (COMMON_OBS): Remove some *.o files built from common/*.c files.
7962 * common/common.host: Add common reference.
7963 * configure.ac: Likewise.
7964 * configure: Regenerate.
7966 2018-02-16 Yao Qi <yao.qi@linaro.org>
7968 * block.c (block_namespace_info): Inherit allocate_on_obstack.
7969 (block_initialize_namespace): Use new.
7970 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
7971 (dwarf2_free_objfile): Use delete.
7972 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
7973 (copy_type_recursive): Use new.
7974 * gdb_obstack.h (allocate_on_obstack): New.
7976 2018-02-15 Yao Qi <yao.qi@linaro.org>
7979 * inferior.c (exit_inferior_1): Reset inf->control.
7981 2018-02-15 Joel Brobecker <brobecker@adacore.com>
7983 * ada-lang.c (ada_to_fixed_value_create): Delete advance
7986 2018-02-14 Pedro Alves <palves@redhat.com>
7988 * frame-unwind.c (frame_unwind_try_unwinder): Always call
7989 frame_cleanup_after_sniffer on exception.
7991 2018-02-14 Tom Tromey <tom@tromey.com>
7993 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
7995 (solib_bfd_open): Make pathname const.
7996 * solib.c (solib_bfd_open): Make pathname const.
7997 * solib-spu.c (spu_bfd_fopen): Make name const.
7998 (spu_bfd_open): Make pathname const.
7999 * solib-darwin.c (darwin_bfd_open): Make pathname const.
8000 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
8002 2018-02-14 Tom Tromey <tom@tromey.com>
8004 * symfile.c (symfile_bfd_open): Update.
8005 * source.h (openp, source_full_path_of, find_and_open_source):
8006 Change argument type to unique_xmalloc_ptr.
8007 * source.c (openp): Take a unique_xmalloc_ptr.
8008 (source_full_path_of, find_and_open_source): Likewise.
8009 (open_source_file, symtab_to_fullname): Update.
8010 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8012 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8013 (exec_file_find): Update.
8014 * psymtab.c (psymtab_to_fullname): Update.
8015 * nto-tdep.h (nto_find_and_open_solib): Update.
8016 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8018 * exec.c (exec_file_attach): Update.
8019 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8020 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8022 2018-02-14 Tom Tromey <tom@tromey.com>
8024 * solib.c: Include source.h.
8025 * nto-tdep.c: Include source.h.
8026 * mi/mi-cmd-env.c: Include source.h.
8027 * infcmd.c: Include source.h.
8028 * exec.c: Include source.h.
8029 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8030 (add_path, directory_switch, source_path, init_source_path): Move
8032 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8033 (add_path, directory_switch, source_path, init_source_path):
8036 2018-02-14 Tom Tromey <tom@tromey.com>
8038 * solist.h (exec_file_find, solib_find): Return
8040 (solib_bfd_fopen): Take a const char *.
8041 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8042 (exec_file_find, solib_find): Likewise.
8043 (solib_bfd_fopen): Do not take ownership of "pathname".
8044 (solib_bfd_open): Use unique_xmalloc_ptr.
8045 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8046 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8047 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8048 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8050 2018-02-14 Joel Brobecker <brobecker@adacore.com>
8052 * ada-lang.c (name_match_type_from_name): Remove reference to
8053 ada_name_for_lookup in function's documentation.
8054 * ada-lang.h (ada_name_for_lookup): Delete declaration.
8056 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8058 * defs.h (enum openp_flags): New enum.
8059 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8060 Move to enum openp_flags.
8061 (openp_flags): New enum flags.
8062 (openp): Change parameter type to openp_flags.
8063 * source.c (openp): Change parameter type to openp_flags.
8064 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8065 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8067 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8069 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8072 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
8074 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8076 (class dwarf2_queue_guard): ...the destructor of this new class.
8077 (dw2_do_instantiate_symtab): Create instance of the new class
8078 dwarf2_queue_guard, remove cleanup.
8080 2018-02-09 Tom Tromey <tom@tromey.com>
8082 * source.c (find_source_lines): Don't reference past the end of
8085 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8087 * remote.c (remote_btrace_maybe_reopen): Change error message.
8088 * btrace.c (btrace_enable): Likewise.
8089 (parse_xml_btrace): Likewise.
8090 (parse_xml_btrace_conf): Likewise.
8092 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8094 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
8095 (linux_enable_pt, linux_enable_bts): Call
8096 diagnose_perf_event_open_fail.
8098 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8100 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
8101 Remove parameter and change return type. Update callers. Move it.
8102 (linux_enable_bts, linux_enable_pt): Improve error message.
8103 (linux_enable_pt): Remove zero buffer size check.
8104 (linux_enable_btrace): Improve error messages. Remove NULL return
8107 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8109 * btrace.c (btrace_enable): Remove target_supports_btrace call.
8110 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
8111 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
8112 (linux_supports_pt, linux_supports_btrace): Remove.
8113 (linux_enable_bts): Call cpu_supports_bts.
8114 * nat/linux-btrace.h (linux_supports_btrace): Remove.
8115 * remote.c (remote_supports_btrace): Remove.
8116 (init_remote_ops): Remove remote_supports_btrace.
8117 * target-delegates.c: Regenerated.
8118 * target.c (target_supports_btrace): Remove.
8119 * target.h (target_ops) <to_supports_btrace>: Remove
8120 (target_supports_btrace): Remove.
8121 * x86-linux-nat.c (x86_linux_create_target): Remove
8122 linux_supports_btrace.
8124 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8126 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
8128 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
8129 exception and use message in own exception.
8131 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8133 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8134 (perf_event_pt_event_type): Use gdb_file_up.
8135 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8136 scoped_fd, and scoped_mmap.
8138 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8140 * common/scoped_mmap.h: New.
8141 * unittests/scoped_mmap-selftest.c: New.
8142 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8143 unittests/scoped_mmap-selftest.c.
8145 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8147 * common/scoped_fd.h: New.
8148 * unittests/scoped_fd-selftest.c: New.
8149 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8150 unittests/scoped_fd-selftest.c.
8152 2018-02-09 Tom Tromey <tom@tromey.com>
8154 * auto-load.c (auto_load_section_scripts): Use
8155 gdb::unique_xmalloc_ptr.
8157 2018-02-09 Tom Tromey <tom@tromey.com>
8159 * auto-load.c (execute_script_contents): Use std::string.
8161 2018-02-09 Joel Brobecker <brobecker@adacore.com>
8163 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8164 Python function, rather than a new command.
8166 2018-02-08 Tom Tromey <tom@tromey.com>
8168 * solib.c (solib_find_1): Use std::string.
8169 (solib_bfd_fopen): Use unique_xmalloc_ptr.
8171 2018-02-08 Tom Tromey <tom@tromey.com>
8173 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8175 2018-02-08 Tom Tromey <tom@tromey.com>
8177 * source.c (find_source_lines): Use gdb::def_vector.
8179 2018-02-08 Tom Tromey <tom@tromey.com>
8181 * macrocmd.c (struct temporary_macro_definition): New.
8182 (macro_define_command): Use temporary_macro_definition. Remove
8184 (free_macro_definition_ptr): Remove.
8186 2018-02-08 Tom Tromey <tom@tromey.com>
8188 * macroexp.c (maybe_expand): Use std::string.
8190 2018-02-08 Tom Tromey <tom@tromey.com>
8192 * macroexp.c (struct macro_buffer): Add initializers for some
8194 (init_buffer, init_shared_buffer, free_buffer)
8195 (free_buffer_return_text): Remove.
8196 (macro_buffer): New constructors.
8197 (~macro_buffer): New destructor.
8198 (macro_buffer::set_shared): New method.
8199 (macro_buffer::resize_buffer, macro_buffer::appendc)
8200 (macro_buffer::appendmem): Now methods, not free functions.
8201 (set_token, append_tokens_without_splicing, stringify)
8202 (macro_stringify): Update.
8203 (gather_arguments): Change return type. Remove argc_p argument,
8204 add args_ptr argument. Use std::vector.
8205 (substitute_args): Remove argc argument. Accept std::vector.
8206 (expand): Update. Use std::vector.
8207 (scan, macro_expand, macro_expand_next): Update.
8209 2018-02-08 Tom Tromey <tom@tromey.com>
8211 * symtab.c (default_collect_symbol_completion_matches_break_on):
8212 Use unique_xmalloc_ptr.
8213 * macroscope.h: (sal_macro_scope, user_macro_scope)
8214 (default_macro_scope): Return unique_xmalloc_ptr.
8215 * macroscope.c (sal_macro_scope, user_macro_scope)
8216 (default_macro_scope): Return unique_xmalloc_ptr.
8217 * macroexp.h (macro_expand, macro_expand_once): Return
8219 * macroexp.c (macro_expand, macro_expand_once): Return
8221 * macrocmd.c (macro_expand_command, macro_expand_once_command)
8222 (info_macro_command, info_macros_command): Use
8224 * compile/compile-c-support.c (write_macro_definitions): Use
8226 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8228 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
8230 * value.c (value_static_field): Assign field type instead of
8231 containing type when returning an optimized out value.
8233 2018-02-06 Yao Qi <yao.qi@linaro.org>
8235 * ft32-tdep.c (ft32_read_pc): Remove.
8236 (ft32_write_pc): Remove.
8237 (ft32_gdbarch_init): Update.
8238 * m32r-tdep.c (m32r_read_pc): Remove.
8239 (m32r_gdbarch_init): Update.
8240 * mep-tdep.c (mep_read_pc): Remove.
8241 (mep_gdbarch_init): Update.
8242 * microblaze-tdep.c (microblaze_write_pc): Remove.
8243 (microblaze_gdbarch_init): Update.
8244 * mn10300-tdep.c (mn10300_read_pc): Remove.
8245 (mn10300_write_pc): Remove.
8246 (mn10300_gdbarch_init): Update.
8247 * moxie-tdep.c (moxie_read_pc): Remove.
8248 (moxie_write_pc): Remove.
8249 (moxie_gdbarch_init): Update.
8251 2018-02-06 Yao Qi <yao.qi@linaro.org>
8253 * expprint.c (print_subexp_standard): Handle
8254 OP_F77_UNDETERMINED_ARGLIST.
8255 (dump_subexp_body_standard): Likewise.
8257 2018-02-05 Alan Hayward <alan.hayward@arm.com>
8259 * target-descriptions.c (tdesc_element_visitor) Add empty
8261 (tdesc_type): Move make_gdb_type from here.
8262 (tdesc_type_builtin): Likewise.
8263 (tdesc_type_vector): Likewise.
8264 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
8265 (make_gdb_type_struct): Move from tdesc_type_with_fields.
8266 (make_gdb_type_union): Likewise.
8267 (make_gdb_type_flags): Likewise.
8268 (make_gdb_type_enum): Likewise.
8269 (make_gdb_type): New function.
8270 (tdesc_register_type): Use static make_gdb_type.
8272 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
8274 * infcmd.c (default_print_one_register_info): Align natural-format
8275 column values consistently one under another.
8276 (pad_to_column): New function.
8278 2018-02-05 Joel Brobecker <brobecker@adacore.com>
8280 * dwarf2read.c (dwarf2_physname): Move commment.
8282 2018-02-01 Leszek Swirski <leszeks@google.com>
8284 * varobj.c (varobj_formatted_print_options): Allow recursive
8285 pretty printing if pretty printing is enabled.
8287 2018-02-01 Leszek Swirski <leszeks@google.com>
8289 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
8290 names after a structop as a filename.
8292 2018-02-01 Yao Qi <yao.qi@linaro.org>
8294 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
8295 (arm_record_coproc_data_proc): Likewise.
8297 2018-02-01 Yao Qi <yao.qi@linaro.org>
8299 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
8301 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
8303 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
8304 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
8306 2018-01-31 Pedro Alves <palves@redhat.com>
8308 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
8309 * inflow.c (child_terminal_save_inferior): Wrap reference to
8310 tcgetpgrp in HAVE_TERMIOS_H.
8311 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
8313 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
8314 always iterate over all inferiors.
8315 (gdbsim_cntrl_c): Adjust.
8316 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
8318 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8320 * gdbtypes.c (lookup_array_range_type): Make sure the array's
8321 index type is objfile-owned if the element type is as well.
8323 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8327 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
8329 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
8330 "features/s390x-linux64.c".
8331 (_initialize_s390_linux_tdep): Remove initialization of tdescs
8332 s390_linux32 and s390x_linux64.
8333 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
8335 * s390-tdep.c: Include "features/s390-linux32.c" and
8336 "features/s390x-linux64.c".
8337 (s390_tdesc_valid): Add check for tdesc_has_registers.
8338 (s390_gdbarch_init): Make sure there is always a valid tdesc.
8339 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
8340 tdesc_s390x_linux64.
8341 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
8342 tdesc_s390x_linux64 to...
8343 * s390-tdep.h: ...here.
8345 2018-01-30 Pedro Alves <palves@redhat.com>
8348 * config.in, configure: Regenerate.
8349 * configure.ac: Check for getpgid.
8350 * go32-nat.c (go32_pass_ctrlc): New.
8351 (go32_target): Install it.
8352 * inf-child.c (inf_child_target): Install
8353 child_terminal_save_inferior, child_pass_ctrlc and
8355 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
8356 (inf_ptrace_target): No longer install it.
8357 * infcmd.c (interrupt_target_1): Adjust.
8358 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
8359 (child_interrupt): Declare.
8360 (inferior::terminal_state): New.
8361 * inflow.c (struct terminal_info): Update comments.
8362 (inferior_process_group): Delete.
8363 (terminal_is_ours): Delete.
8364 (gdb_tty_state): New.
8365 (child_terminal_init): Adjust.
8366 (is_gdb_terminal, sharing_input_terminal_1)
8367 (sharing_input_terminal): New functions.
8368 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
8369 Set the process's actual process group in the foreground if
8370 possible. Handle is_ours_for_output/is_ours distinction. Don't
8371 mark terminal as the inferior's if not sharing GDB's terminal.
8372 Don't check attach_flag.
8373 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
8374 pass down a target_terminal_state.
8375 (child_terminal_save_inferior): New, factored out from ...
8376 (child_terminal_ours_1): ... this. Handle
8377 target_terminal_state::is_ours_for_output.
8378 (child_interrupt, child_pass_ctrlc): New.
8379 (inflow_inferior_exit): Clear the inferior's terminal_state.
8380 (copy_terminal_info): Copy the inferior's terminal state.
8381 (_initialize_inflow): Remove reference to terminal_is_ours.
8382 * inflow.h (inferior_process_group): Delete.
8383 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
8384 * procfs.c (procfs_target): Don't install procfs_interrupt.
8385 (procfs_interrupt): Delete.
8386 * remote.c (remote_serial_quit_handler): Adjust.
8387 (remote_interrupt): Remove ptid parameter. Adjust.
8388 * target-delegates.c: Regenerate.
8389 * target.c: Include "terminal.h".
8390 (target_terminal::terminal_state): Rename to ...
8391 (target_terminal::m_terminal_state): ... this.
8392 (target_terminal::init): Adjust.
8393 (target_terminal::inferior): Adjust to per-inferior
8395 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
8396 (target_terminal::ours, target_terminal::ours_for_output): Use
8397 target_terminal_is_ours_kind.
8398 (target_interrupt): Remove ptid parameter. Adjust.
8399 (default_target_pass_ctrlc): Adjust.
8400 * target.h (target_ops::to_terminal_save_inferior): New field.
8401 (target_ops::to_interrupt): Remove ptid_t parameter.
8402 (target_interrupt): Remove ptid_t parameter. Update comment.
8403 (target_pass_ctrlc): Update comment.
8404 * target/target.h (target_terminal_state): New scoped enum,
8406 (target_terminal::terminal_state): ... here.
8407 (target_terminal::inferior): Update comments.
8408 (target_terminal::restore_inferior): New.
8409 (target_terminal::is_inferior, target_terminal::is_ours)
8410 (target_terminal::is_ours_for_output): Adjust.
8411 (target_terminal::scoped_restore_terminal_state): Adjust to
8412 rename, and call restore_inferior() instead of inferior().
8413 (target_terminal::scoped_restore_terminal_state::m_state): Change
8415 (target_terminal::terminal_state): Rename to ...
8416 (target_terminal::m_terminal_state): ... this and change type.
8418 2018-01-30 Pedro Alves <palves@redhat.com>
8420 * linux-nat.c (wait_for_signal): New function.
8421 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
8423 (async_terminal_is_ours)
8424 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
8425 (linux_nat_add_target): Don't override
8426 to_terminal_inferior/to_terminal_ours.
8428 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
8430 * remote.c (remote_follow_fork): Don't call "detach_inferior".
8432 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
8434 * dwarf2read.c (free_dwo_files): Add forward-declaration.
8435 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
8436 dwarf2_per_objfile_free here.
8437 (dwarf2_per_objfile_free): Remove.
8438 (_initialize_dwarf2_read): Don't register
8439 dwarf2_per_objfile_free as a registry cleanup.
8441 2018-01-27 Eli Zaretskii <eliz@gnu.org>
8443 Avoid compilation errors in MinGW native builds
8445 The error is triggered by including python-internal.h, and the
8448 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
8449 from build-gnulib/import/math.h:27,
8450 from d:/usr/Python26/include/pyport.h:235,
8451 from d:/usr/Python26/include/Python.h:58,
8452 from python/python-internal.h:94,
8453 from python/py-arch.c:24:
8454 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
8458 This happens because Python headers define 'hypot' to expand t
8459 '_hypot' in the Windows builds.
8460 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
8461 'hypoth'. This avoids a compilation error.
8463 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8465 * MAINTAINERS (Write After Approval): Fix ordering.
8467 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8469 * MAINTAINERS (Write After Approval): Add Alan Hayward.
8471 2018-01-26 Alan Modra <amodra@gmail.com>
8473 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
8474 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
8475 Remove nop. Make const. Comment.
8476 (powerpc32_plt_stub_so_2): New.
8477 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
8478 Correct count. Update uses.
8479 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
8480 Move common code reading PLT entry word. Correct
8481 powerpc32_plt_stub PLT address calculation.
8482 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
8483 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
8484 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
8485 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
8486 (ppc64_standard_linkage8): Likewise.
8487 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
8488 Correct insns description.
8489 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
8491 2018-01-24 Pedro Alves <palves@redhat.com>
8493 GCC PR libstdc++/83906
8494 * gdbtypes.c (operator==(const dynamic_prop &,
8495 const dynamic_prop &)): New.
8496 (operator==(const range_bounds &, const range_bounds &)): New.
8497 (check_types_equal): Use them instead of memcmp.
8498 * gdbtypes.h (operator==(const dynamic_prop &,
8499 const dynamic_prop &)): Declare.
8500 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
8501 (operator==(const range_bounds &, const range_bounds &)): Declare.
8502 (operator!=(const range_bounds &, const range_bounds &)): Declare.
8504 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8506 * s390-linux-tdep.c (s390_record_address_mask)
8507 (s390_record_calc_disp_common, s390_record_calc_disp)
8508 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8509 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8510 (s390_process_record): Move to s390-tdep.c.
8511 (s390_linux_init_abi_any): Adjust.
8512 * s390-tdep.c (s390_record_address_mask)
8513 (s390_record_calc_disp_common, s390_record_calc_disp)
8514 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8515 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8516 (s390_process_record): Moved from s390-linux-tdep.c
8517 (s390_gdbarch_init): Adjust.
8519 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8521 * s390-linux-nat.c (s390-tdep.h): New include.
8522 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
8523 (HFILES_NO_SRCDIR): Add s390-tdep.h.
8524 (ALLDEPFILES): Add s390-tdep.c.
8525 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
8526 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
8527 * s390-tdep.h: ...this. New file.
8528 * s390-linux-tdep.c (s390-tdep.h): New include.
8529 (_initialize_s390_tdep): Rename to...
8530 (_initialize_s390_linux_tdep): ...this and adjust.
8531 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
8532 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
8534 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
8535 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
8536 (s390_is_partial_instruction, s390_software_single_step)
8537 (is_non_branch_ril, s390_displaced_step_copy_insn)
8538 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
8539 (s390_prologue_data, s390_addr, s390_store, s390_load)
8540 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
8541 (s390_register_call_saved, s390_guess_tracepoint_registers)
8542 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
8543 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
8544 (s390_pseudo_register_name, s390_pseudo_register_type)
8545 (s390_pseudo_register_read, s390_pseudo_register_write)
8546 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
8547 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
8548 (s390_addr_bits_remove, s390_address_class_type_flags)
8549 (s390_address_class_type_flags_to_name)
8550 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
8551 (s390_function_arg_float, s390_function_arg_vector)
8552 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
8553 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
8554 (s390_frame_align, s390_register_return_value, s390_return_value)
8555 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
8556 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
8557 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
8558 (s390_trad_frame_prev_register, s390_unwind_cache)
8559 (s390_prologue_frame_unwind_cache)
8560 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
8561 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
8562 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
8563 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
8564 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
8565 (s390_frame_base_address, s390_local_base_address)
8566 (s390_frame_base, s390_gcc_target_options)
8567 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
8568 (s390_validate_reg_range, s390_tdesc_valid)
8569 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
8570 * s390-tdep.c: ...this. New file.
8572 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8574 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
8575 (s390_process_record, s390_gdbarch_tdep_alloc)
8576 (s390_linux_init_abi_any): Use/set new hook.
8578 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8580 * s390-linux-tdep.c (osabi.h): New include.
8581 (s390_linux_init_abi_31, s390_linux_init_abi_64)
8582 (s390_linux_init_abi_any): New functions.
8583 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
8585 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8587 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
8588 tdesc_has_registers check
8590 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8592 * s390-linux-tdep.c (s390_tdesc_valid): New function.
8593 (s390_validate_reg_range): New macro.
8594 (s390_gdbarch_init): Adjust.
8596 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8598 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
8599 (s390_gdbarch_tdep_alloc): Adjust.
8600 (s390_gdbarch_init): Adjust.
8602 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8604 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
8605 <have_tdb>: Change type to bool.
8606 (s390_gdbarch_tdep_alloc): Adjust.
8607 (s390_gdbarch_init): Adjust.
8609 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8611 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
8612 (gdbarch_tdep) <have_upper, have_vx>: New fields.
8613 (s390_gdbarch_tdep_alloc): New function.
8614 (s390_gdbarch_init): Allocate tdep at start and use its fields
8615 instead of separate variables.
8617 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8619 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
8620 when looking for cached gdbarch and add comment for remaining.
8622 2018-01-22 Pedro Alves <palves@redhat.com>
8623 Sergio Durigan Junior <sergiodj@redhat.com>
8625 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
8628 2018-01-22 Maciej W. Rozycki <macro@mips.com>
8630 * MAINTAINERS: Update my company e-mail address.
8632 2018-01-22 Yao Qi <yao.qi@linaro.org>
8634 * regcache.c (cooked_write_test): New function.
8635 (_initialize_regcache): Register the test.
8637 2018-01-22 Yao Qi <yao.qi@linaro.org>
8639 * ia64-tdep.c (ia64_pseudo_register_read): Call
8640 regcache->cooked_read instead of regcache_cooked_read_unsigned.
8641 * m32c-tdep.c (m32c_cat_read): Likewise.
8642 (m32c_r3r2r1r0_read): Likewise.
8643 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8644 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8646 2018-01-22 Yao Qi <yao.qi@linaro.org>
8648 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
8649 method raw_read instead of regcache_raw_read.
8650 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8651 * arm-tdep.c (arm_neon_quad_read): Likewise.
8652 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8653 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8654 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8655 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
8656 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8657 (i386_pseudo_register_read_into_value): Likewise.
8658 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8659 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8660 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8661 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
8662 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
8663 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8664 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8665 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8666 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
8668 2018-01-22 Yao Qi <yao.qi@linaro.org>
8670 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
8671 * configure.tgt: Remove target mt.
8672 * mt-tdep.c: Remove.
8673 * regcache.c (cooked_read_test): Remove the check for mt.
8675 2018-01-22 Yao Qi <yao.qi@linaro.org>
8677 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
8678 instead of gdbarch_pseudo_register_read_value.
8680 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8682 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
8685 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8687 * linespec.c (create_sals_line_offset): Remove code that preserved
8688 the symtab_and_line's line number.
8690 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8692 * varobj.c (varobj_create): Don't set valid_block when creating a
8695 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8697 * varobj.c (varobj_create): Remove out of date comment.
8699 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8702 * ada-exp.y (write_var_from_sym): Pass extra parameter when
8703 updating innermost block.
8704 * parse.c (innermost_block_tracker::update): Take extra type
8705 parameter, and check types match before updating innermost block.
8706 (write_dollar_variable): Update innermost block for registers.
8707 * parser-defs.h (enum innermost_block_tracker_type): New enum.
8708 (innermost_block_tracker::innermost_block_tracker): Initialise
8710 (innermost_block_tracker::reset): Take type parameter.
8711 (innermost_block_tracker::update): Take type parameter, and pass
8712 type through as needed.
8713 (innermost_block_tracker::m_types): New member.
8714 * varobj.c (varobj_create): Pass type when reseting innermost
8717 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8719 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
8720 * ada-lang.c (resolve_subexp): Likewise.
8721 * breakpoint.c (set_breakpoint_condition) Likewise.
8722 (watch_command_1) Likewise.
8723 * c-exp.y (variable): Likewise.
8724 * d-exp.y (PrimaryExpression): Likewise.
8725 * f-exp.y (variable): Likewise.
8726 * go-exp.y (variable): Likewise.
8727 * m2-exp.y (variable): Likewise.
8728 * objfiles.c (objfile::~objfile): Likewise.
8729 * p-exp.y (variable): Likewise.
8730 * parse.c (innermost_block): Change type.
8731 * parser-defs.h (class innermost_block_tracker): New.
8732 (innermost_block): Change to innermost_block_tracker.
8733 * printcmd.c (display_command): Switch to innermost_block API.
8734 (do_one_display): Likewise.
8735 * rust-exp.y (do_one_display): Likewise.
8736 * symfile.c (clear_symtab_users): Likewise.
8737 * varobj.c (varobj_create): Switch to innermost_block API, replace
8738 use of innermost_block with block stored on varobj object.
8740 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8742 * expression.h (innermost_block): Remove declaration.
8743 * varobj.c: Add 'parser-defs.h' include.
8745 2018-01-19 Tom Tromey <tom@tromey.com>
8747 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
8748 symbols in the static and global blocks.
8750 2018-01-19 James Clarke <jrtc27@jrtc27.com>
8752 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
8753 gdb_ptrace.h, and move including gdb_wait.h ...
8754 * nat/linux-ptrace.h: ... to here.
8756 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8758 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
8759 inf_ptrace_detach_success.
8760 (inf_ptrace_detach_success): Add inferior parameter, use it
8761 instead of inferior_ptid, pass it to detach_inferior.
8762 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
8764 * inferior.c (detach_inferior): Add overload that takes an
8766 * inferior.h (detach_inferior): Likewise.
8767 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
8768 use inferior_ptid, adjust call to inf_ptrace_detach_success.
8769 * linux-thread-db.c (thread_db_detach): Use inf parameter.
8771 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8773 * target.h (struct target_ops) <to_detach>: Add inferior
8775 (target_detach): Likewise.
8776 * target.c (dispose_inferior): Pass inferior down.
8777 (target_detach): Pass inferior down. Assert that it is equal to
8778 the current inferior.
8779 * aix-thread.c (aix_thread_detach): Pass inferior down.
8780 * corefile.c (core_file_command): Pass current_inferior() down.
8781 * corelow.c (core_detach): Add inferior parameter.
8782 * darwin-nat.c (darwin_detach): Likewise.
8783 * gnu-nat.c (gnu_detach): Likewise.
8784 * inf-ptrace.c (inf_ptrace_detach): Likewise.
8785 * infcmd.c (detach_command): Pass current_inferior() down to
8787 * infrun.c (follow_fork_inferior): Pass parent_inf to
8789 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
8791 * linux-nat.c (linux_nat_detach): Add inferior parameter.
8792 * linux-thread-db.c (thread_db_detach): Likewise.
8793 * nto-procfs.c (procfs_detach): Likewise.
8794 * procfs.c (procfs_detach): Likewise.
8795 * record.c (record_detach): Likewise.
8796 * record.h (struct inferior): Forward-declare.
8797 (record_detach): Add inferior parameter.
8798 * remote-sim.c (gdbsim_detach): Likewise.
8799 * remote.c (remote_detach_1): Likewise.
8800 (remote_detach): Likewise.
8801 (extended_remote_detach): Likewise.
8802 * sol-thread.c (sol_thread_detach): Likewise.
8803 * target-debug.h (target_debug_print_inferior_p): New macro.
8804 * target-delegates.c: Re-generate.
8805 * top.c (kill_or_detach): Pass inferior down to target_detach.
8806 * windows-nat.c (windows_detach): Add inferior parameter.
8808 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8810 * target.h (struct target_ops) <to_detach>: Remove args
8812 (target_detach): Likewise.
8813 * target.c (dispose_inferior): Adjust.
8814 (target_detach): Remove args parameter, adjust.
8815 * aix-thread.c (aix_thread_detach): Adjust.
8816 * corefile.c (core_file_command): Adjust.
8817 * corelow.c (core_detach): Adjust.
8818 * darwin-nat.c (darwin_detach): Adjust.
8819 * gnu-nat.c (gnu_detach): Adjust.
8820 * inf-ptrace.c (inf_ptrace_detach): Adjust.
8821 * infcmd.c (detach_command): Adjust
8822 * infrun.c (follow_fork_inferior): Adjust.
8823 (handle_vfork_child_exec_or_exit): Adjust.
8824 * linux-fork.c (linux_fork_detach): Remove args parameter.
8825 * linux-fork.h (linux_fork_detach): Likewise.
8826 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
8827 * linux-thread-db.c (thread_db_detach): Likewise.
8828 * nto-procfs.c (procfs_detach): Likewise.
8829 * procfs.c (procfs_detach): Likewise.
8830 (do_detach): Remove signo parameter.
8831 * record.c (record_detach): Remove args parameter.
8832 * record.h (record_detach): Likewise.
8833 * remote-sim.c (gdbsim_detach): Likewise.
8834 * remote.c (remote_detach_1): Likewise.
8835 (remote_detach): Likewise.
8836 (extended_remote_detach): Likewise.
8837 * sol-thread.c (sol_thread_detach): Likewise.
8838 * target-delegates.c: Re-generate.
8839 * top.c (struct qt_args) <args>: Remove field.
8840 (kill_or_detach): Don't pass args.
8841 (quit_force): Don't set args.
8842 * windows-nat.c (windows_detach): Remove args parameter.
8844 2018-01-19 Yao Qi <yao.qi@linaro.org>
8846 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
8847 (arm_linux_init_abi): Install it.
8849 2018-01-19 Yao Qi <yao.qi@linaro.org>
8851 * osabi.c (gdb_osabi_names): Extend the regexp for
8852 arm-linux-gnueabihf.
8854 2018-01-18 Yao Qi <yao.qi@linaro.org>
8856 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
8858 (abbrev_table::add_abbrev): Update.
8859 (abbrev_table::lookup_abbrev): Update.
8861 2018-01-18 Yao Qi <yao.qi@linaro.org>
8863 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
8865 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
8867 * compile/compile.c (compile_to_object): Convert "triplet_rx"
8870 2018-01-17 Tom Tromey <tom@tromey.com>
8872 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
8874 2018-01-17 Tom Tromey <tom@tromey.com>
8876 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
8877 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
8878 (create_array_type_with_stride): Update.
8879 * dwarf2read.c (set_die_type): Update.
8881 2018-01-17 Tom Tromey <tom@tromey.com>
8883 * dwarf2read.c (delayed_method_info): Remove typedef.
8884 (dwarf2_cu::method_info): Now a std::vector.
8885 (add_to_method_list): Update.
8886 (free_delayed_list): Remove.
8887 (compute_delayed_physnames): Update.
8888 (process_full_comp_unit, process_full_type_unit): Clear the method
8889 list. Remove cleanups.
8890 (psymtab_include_file_name): Add name_holder parameter. Use
8892 (dwarf_decode_lines): Update.
8894 2018-01-17 Tom Tromey <tom@tromey.com>
8895 Simon Marchi <simon.marchi@ericsson.com>
8897 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
8898 (dwarf2_per_objfile::free_cached_comp_units)
8899 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8900 (init_cutu_and_read_dies_no_follow): Update.
8901 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
8902 (dwarf2_cu::~dwarf2_cu): New.
8903 (free_heap_comp_unit, free_stack_comp_unit): Remove.
8904 (age_cached_comp_units, free_one_cached_comp_unit): Update.
8906 2018-01-17 Tom Tromey <tom@tromey.com>
8907 Simon Marchi <simon.marchi@ericsson.com>
8909 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
8910 (struct die_reader_specs) <abbrev_table>: New member.
8911 (struct abbrev_table): Add constructor.
8912 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
8913 <abbrev_obstack>: Now an auto_obstack.
8914 (abbrev_table_up): New typedef.
8915 (init_cu_die_reader): Add abbrev_table parameter.
8916 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
8917 Add result_dwo_abbrev_table.
8918 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8919 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
8921 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
8923 (skip_children): Update.
8924 (abbrev_table::alloc_abbrev): Rename from
8925 abbrev_table_alloc_abbrev.
8926 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
8927 (abbrev_table::lookup_abbrev): Rename from
8928 abbrev_table_lookup_abbrev.
8929 (abbrev_table_read_table): Return abbrev_table_up.
8930 (abbrev_table_free, abbrev_table_free_cleanup)
8931 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
8932 (load_partial_dies): Update.
8934 2018-01-17 Tom Tromey <tom@tromey.com>
8936 * dwarf2read.c (dwarf2_compute_name): Update comment.
8937 (read_func_scope, read_variable): Update.
8938 (new_symbol): Remove.
8939 (new_symbol_full): Rename to new_symbol.
8941 2018-01-17 Mike Gulick <mgulick@mathworks.com>
8944 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
8945 a warning instead of throwing an error, set section size to 0 and return
8947 * gdb_bfd.h (gdb_bfd_map_section): Update description.
8949 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
8951 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
8953 (linux_ptrace_attach_fail_reason_string): Likewise.
8954 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
8956 (linux_ptrace_attach_fail_reason_string): Likewise.
8957 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
8959 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
8961 * linux-nat.c (linux_nat_attach): Remove xstrdup.
8963 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
8966 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
8967 checking for fs_base/gs_base fields in struct user_regs_struct.
8968 * configure: Regenerate.
8970 2018-01-17 Yao Qi <yao.qi@linaro.org>
8972 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
8974 (aarch64_linux_init_abi): Install it to gdbarch hook
8977 2018-01-15 Pedro Alves <palves@redhat.com>
8979 * common/signals-state-save-restore.c
8980 (save_original_signals_state): Fix typos.
8982 2017-01-12 Tom Tromey <tom@tromey.com>
8983 Sergio Durigan Junior <sergiodj@redhat.com>
8985 * Makefile.in (install-only): Install gdb-add-index.
8987 2018-01-12 John Baldwin <jhb@FreeBSD.org>
8989 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
8991 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8993 * infrun.c (keep_going_pass_signal): Clear step-over info when
8994 insert_breakpoints fails.
8996 2018-01-11 Pedro Alves <palves@redhat.com>
8999 * infrun.c (resume): Rename to ...
9000 (resume_1): ... this.
9001 (resume): Reimplement as wrapper around resume_1.
9003 2018-01-11 Pedro Alves <palves@redhat.com>
9006 * remote.c (remote_parse_stop_reply): Default to the last-set
9007 general thread instead of to 'magic_null_ptid'.
9009 2018-01-10 Pedro Alves <palves@redhat.com>
9011 * language.h (language_get_symbol_name_matcher): Rename ...
9012 (get_symbol_name_matcher): ... this.
9013 * language.c (language_get_symbol_name_matcher): Ditto.
9014 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9017 2018-01-10 Pedro Alves <palves@redhat.com>
9021 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9022 Adjust to use language_get_symbol_name_matcher instead of
9023 language_defn::la_get_symbol_name_matcher.
9024 * language.c (language_get_symbol_name_matcher): If in Ada mode
9025 and the lookup name is a verbatim match, return Ada's matcher.
9026 * language.h (language_get_symbol_name_matcher): Adjust comment.
9027 (ada_lookup_name_info::verbatim_p):: New method.
9029 2018-01-10 Pedro Alves <palves@redhat.com>
9032 * ada-lang.c (ada_collect_symbol_completion_matches): If the
9033 minsym's language is language_auto or language_cplus, pass down
9034 language_ada instead.
9035 * symtab.c (compare_symbol_name): Don't frob symbol language here.
9037 2018-01-10 Pedro Alves <palves@redhat.com>
9040 * minsyms.c (linkage_name_str): New function.
9041 (iterate_over_minimal_symbols): Use it.
9043 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9045 * NEWS: Document that 'info proc' now works on FreeBSD.
9047 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9049 * configure.ac: Check for kinfo_getfile in libutil.
9050 * configure: Regenerate.
9051 * config.in: Regenerate.
9052 * fbsd-nat.c: Include "fbsd-tdep.h".
9053 (fbsd_fetch_cmdline): New.
9054 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9055 rather than calling error.
9056 (fbsd_info_proc): New.
9057 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9058 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9059 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9061 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9063 * fbsd-nat.c (struct free_deleter): Remove.
9064 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9066 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9068 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9069 NULL for an empty pathname.
9071 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9073 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9074 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9075 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9076 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9077 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9078 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9079 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9080 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9081 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9082 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9083 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9084 (fbsd_core_fetch_timeval, fbsd_print_sigset)
9085 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9086 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
9087 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9089 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
9091 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9092 (gnu_xfer_auxv): New function.
9093 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
9096 2018-01-08 Yao Qi <yao.qi@linaro.org>
9097 Simon Marchi <simon.marchi@ericsson.com>
9099 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
9101 (COMMON_OBS): Remove selftest.o.
9102 * configure.ac: Append selftest-arch.c and common/selftest.c to
9103 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
9104 * configure: Re-generated.
9105 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
9107 (maintenance_info_selftests): Likewise.
9109 2018-01-08 Xavier Roirand <roirand@adacore.com>
9111 * ada-valprint.c (val_print_packed_array_elements): Use
9112 proper number of elements when printing an array indexed
9113 by an enumeration type.
9115 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9117 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
9118 (dw2_get_file_names_reader): Adjust.
9119 (lookup_dwo_signatured_type): Adjust.
9120 (lookup_dwp_signatured_type): Adjust.
9121 (lookup_signatured_type): Adjust.
9122 (create_type_unit_group): Adjust.
9123 (get_type_unit_group): Adjust.
9124 (process_psymtab_comp_unit_reader): Adjust.
9125 (build_type_psymtabs_reader): Adjust.
9126 (scan_partial_symbols): Adjust.
9127 (add_partial_symbol): Adjust.
9128 (add_partial_subprogram): Adjust.
9129 (peek_die_abbrev): Adjust.
9130 (fixup_go_packaging): Adjust.
9131 (process_imported_unit_die): Adjust.
9132 (dwarf2_compute_name): Adjust.
9133 (dwarf2_physname): Adjust.
9134 (read_import_statement): Adjust.
9135 (handle_DW_AT_stmt_list): Adjust.
9136 (read_file_scope): Adjust.
9137 (read_func_scope): Adjust.
9138 (read_lexical_block_scope): Adjust.
9139 (read_call_site_scope): Adjust.
9140 (read_variable): Adjust.
9141 (dwarf2_rnglists_process): Adjust.
9142 (dwarf2_ranges_process): Adjust.
9143 (dwarf2_ranges_read): Adjust.
9144 (dwarf2_get_pc_bounds): Adjust.
9145 (dwarf2_record_block_ranges): Adjust.
9146 (dwarf2_add_field): Adjust.
9147 (dwarf2_add_member_fn): Adjust.
9148 (read_structure_type): Adjust.
9149 (process_structure_scope): Adjust.
9150 (read_enumeration_type): Adjust.
9151 (read_array_type): Adjust.
9152 (mark_common_block_symbol_computed): Adjust.
9153 (read_common_block): Adjust.
9154 (read_namespace_type): Adjust.
9155 (read_namespace): Adjust.
9156 (read_module_type): Adjust.
9157 (read_tag_pointer_type): Adjust.
9158 (read_tag_ptr_to_member_type): Adjust.
9159 (read_tag_string_type): Adjust.
9160 (read_subroutine_type): Adjust.
9161 (read_typedef): Adjust.
9162 (read_base_type): Adjust.
9163 (attr_to_dynamic_prop): Adjust.
9164 (read_subrange_type): Adjust.
9165 (read_unspecified_type): Adjust.
9166 (dwarf2_read_abbrevs): Adjust.
9167 (load_partial_dies): Adjust.
9168 (read_partial_die): Adjust.
9169 (find_partial_die): Adjust.
9170 (guess_partial_die_structure_name): Adjust.
9171 (fixup_partial_die): Adjust.
9172 (read_attribute_value): Adjust.
9173 (read_addr_index): Adjust.
9174 (read_addr_index_from_leb128): Adjust.
9175 (read_str_index): Adjust.
9176 (dwarf2_string_attr): Adjust.
9177 (get_debug_line_section): Adjust.
9178 (dwarf_decode_line_header): Adjust.
9179 (lnp_state_machine::check_line_address): Adjust.
9180 (dwarf_decode_lines_1): Adjust.
9181 (dwarf_decode_lines): Adjust.
9182 (dwarf2_start_symtab): Adjust.
9183 (var_decode_location): Adjust.
9184 (new_symbol_full): Adjust.
9185 (dwarf2_const_value_data): Adjust.
9186 (dwarf2_const_value_attr): Adjust.
9187 (dwarf2_const_value): Adjust.
9189 (die_containing_type): Adjust.
9190 (build_error_marker_type): Adjust.
9191 (lookup_die_type): Adjust.
9192 (guess_full_die_structure_name): Adjust.
9193 (anonymous_struct_prefix): Adjust.
9194 (determine_prefix): Adjust.
9195 (dwarf2_name): Adjust.
9196 (follow_die_ref_or_sig): Adjust.
9197 (follow_die_offset): Adjust.
9198 (follow_die_ref): Adjust.
9199 (follow_die_sig_1): Adjust.
9200 (follow_die_sig): Adjust.
9201 (get_signatured_type): Adjust.
9202 (get_DW_AT_signature_type): Adjust.
9203 (decode_locdesc): Adjust.
9204 (dwarf_decode_macros): Adjust.
9205 (cu_debug_loc_section): Adjust.
9206 (fill_in_loclist_baton): Adjust.
9207 (dwarf2_symbol_mark_computed): Adjust.
9208 (init_one_comp_unit): Don't assign
9209 dwarf2_cu::dwarf2_per_objfile.
9210 (set_die_type): Adjust.
9212 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9214 * dwarf2read.c (struct mapped_debug_names): Add constructor.
9215 <dwarf2_per_objfile>: New field.
9216 (dwarf2_per_objfile): Remove global.
9217 (get_dwarf2_per_objfile): New function.
9218 (set_dwarf2_per_objfile): New function.
9219 (dwarf2_build_psymtabs_hard): Change objfile parameter to
9221 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9222 (read_abbrev_offset): Likewise.
9223 (read_indirect_string): Likewise.
9224 (read_indirect_line_string): Likewise.
9225 (read_indirect_string_at_offset): Likewise.
9226 (read_indirect_string_from_dwz): Likewise.
9227 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9229 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9230 (create_all_comp_units): Change objfile parameter to
9232 (create_all_type_units): Likewise.
9233 (process_queue): Add dwarf2_per_objfile parameter.
9234 (read_and_check_comp_unit_head): Likewise.
9235 (lookup_dwo_unit_in_dwp): Likewise.
9236 (get_dwp_file): Likewise.
9237 (process_cu_includes): Likewise.
9238 (struct free_dwo_file_cleanup_data): New struct.
9239 (dwarf2_has_info): Use get_dwarf2_per_objfile and
9240 set_dwarf2_per_objfile.
9241 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9242 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9243 context, adjust calls.
9244 (dw2_instantiate_symtab): Likewise.
9245 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
9246 (dw2_get_cu): Likewise.
9247 (create_cu_from_index_list): Change objfile parameter to
9249 (create_cus_from_index_list): Get dwarf2_per_objfile from
9250 context, adjust calls.
9251 (create_cus_from_index): Likewise.
9252 (create_signatured_type_table_from_index): Change objfile
9253 parameter to dwarf2_per_objfile.
9254 (create_signatured_type_table_from_debug_names): Change objfile
9255 parameter to dwarf2_per_objfile.
9256 (create_addrmap_from_index): Likewise.
9257 (create_addrmap_from_aranges): Likewise.
9258 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
9259 (dw2_setup): Remove.
9260 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
9262 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
9263 get_dwarf2_per_objfile.
9264 (dw2_forget_cached_source_info): Likewise.
9265 (dw2_map_symtabs_matching_filename): Likewise.
9266 (struct dw2_symtab_iterator) <index>: Remove.
9267 <dwarf2_per_objfile>: New field.
9268 (dw2_symtab_iter_init): Replace index parameter with
9270 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
9271 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
9272 (dw2_print_stats): Likewise.
9273 (dw2_dump): Likewise.
9274 (dw2_expand_symtabs_for_function): Likewise.
9275 (dw2_expand_all_symtabs): Likewise.
9276 (dw2_expand_symtabs_with_fullname): Likewise.
9277 (dw2_expand_marked_cus): Replace index and objfile parameters
9278 with dwarf2_per_objfile.
9279 (dw_expand_symtabs_matching_file_matcher): Add
9280 dwarf2_per_objfile parameter and adjust calls.
9281 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
9283 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
9284 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
9286 (create_cus_from_debug_names_list): Replace objfile parameter
9287 with dwarf2_per_objfile and adjust calls.
9288 (create_cus_from_debug_names): Likewise.
9289 (dwarf2_read_debug_names): Likewise.
9290 (mapped_debug_names::namei_to_name): Adjust call.
9291 (dw2_debug_names_iterator::next): Likewise.
9292 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
9293 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
9294 (dw2_debug_names_dump): Likewise.
9295 (dw2_debug_names_expand_symtabs_for_function): Likewise.
9296 (dw2_debug_names_expand_symtabs_matching): Likewise.
9297 (dwarf2_initialize_objfile): Likewise.
9298 (dwarf2_build_psymtabs): Likewise.
9299 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
9301 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
9302 (read_and_check_comp_unit_head): Likewise.
9303 (read_abbrev_offset): Likewise.
9304 (create_debug_type_hash_table): Likewise.
9305 (create_debug_types_hash_table): Likewise.
9306 (create_all_type_units): Replace objfile parameter with
9308 (add_type_unit): Add dwarf2_per_objfile parameter.
9309 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
9310 with dwarf2_per_objfile.
9311 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
9312 (lookup_dwp_signatured_type): Likewise.
9313 (lookup_signatured_type): Likewise.
9314 (read_cutu_die_from_dwo): Likewise.
9315 (init_tu_and_read_dwo_dies): Likewise.
9316 (init_cutu_and_read_dies): Likewise.
9317 (init_cutu_and_read_dies_no_follow): Likewise.
9318 (allocate_type_unit_groups_table): Add objfile parameter.
9319 (create_type_unit_group): Use dwarf2_per_objfile from cu.
9320 (get_type_unit_group): Likewise.
9321 (process_psymtab_comp_unit): Update call.
9322 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
9323 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
9324 (print_tu_stats): Likewise.
9325 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
9327 (build_type_psymtabs): Change objfile parameter to
9329 (process_skeletonless_type_unit): Use dwarf2_per_objfile
9330 passed in void* parameter.
9331 (process_skeletonless_type_units): Change objfile parameter to
9333 (set_partial_user): Likewise.
9334 (dwarf2_build_psymtabs_hard): Likewise.
9335 (read_comp_units_from_section): Likewise.
9336 (create_all_comp_units): Likewise.
9337 (scan_partial_symbols): Update calls.
9338 (add_partial_symbol): Likewise.
9339 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
9340 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
9341 (process_queue): Add dwarf2_per_objfile parameter.
9342 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
9343 (compute_compunit_symtab_includes): Likewise.
9344 (process_cu_includes): Add dwarf2_per_objfile parameter.
9345 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
9346 (process_full_type_unit): Likewise.
9347 (process_imported_unit_die): Update call.
9348 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
9349 (read_file_scope): Likewise.
9350 (allocate_dwo_file_hash_table): Add objfile parameter.
9351 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
9352 (create_cus_hash_table): Likewise.
9353 (create_dwp_hash_table): Likewise.
9354 (create_dwo_unit_in_dwp_v1): Likewise.
9355 (create_dwp_v2_section): Likewise.
9356 (create_dwo_unit_in_dwp_v2): Likewise.
9357 (lookup_dwo_unit_in_dwp): Likewise.
9358 (try_open_dwop_file): Likewise.
9359 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
9360 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
9361 cleanup to include a reference to dwarf2_per_objfile.
9362 (open_dwp_file): Add dwarf2_per_objfile parameter.
9363 (open_and_init_dwp_file): Likewise.
9364 (get_dwp_file): Likewise.
9365 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
9366 (queue_and_load_all_dwo_tus): Update call.
9367 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
9369 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
9370 (dwarf2_ranges_process): Likewise.
9371 (dwarf2_get_pc_bounds): Likewise.
9372 (mark_common_block_symbol_computed): Likewise.
9373 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9374 (dwarf2_read_abbrevs): Update call.
9375 (read_partial_die): Use dwarf2_per_objfile from cu.
9376 (find_partial_die): Likewise.
9377 (fixup_partial_die): Likewise.
9378 (read_attribute_value): Likewise.
9379 (read_indirect_string_at_offset_from): Add objfile parameter.
9380 (read_indirect_string_at_offset): Add dwarf2_per_objfile
9382 (read_indirect_string_from_dwz): Add objfile parameter.
9383 (read_indirect_string): Add objfile parameter.
9384 (read_addr_index_1): Add dwarf2_per_objfile parameter.
9385 (read_addr_index): Use dwarf2_per_objfile from cu.
9386 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
9388 (read_str_index): Use dwarf2_per_objfile from cu.
9389 (get_debug_line_section): Likewise.
9390 (read_formatted_entries): Add dwarf2_per_objfile parameter.
9391 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
9392 (new_symbol_full): Use dwarf2_per_objfile from cu.
9393 (build_error_marker_type): Likewise.
9394 (lookup_die_type): Likewise.
9395 (determine_prefix): Likewise.
9396 (follow_die_offset): Likewise.
9397 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
9398 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
9399 (dwarf2_fetch_die_type_sect_off): Likewise.
9400 (dwarf2_get_die_type): Likewise.
9401 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
9402 (get_signatured_type): Likewise.
9403 (get_DW_AT_signature_type): Likewise.
9404 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
9405 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
9406 (cu_debug_loc_section): Likewise.
9407 (fill_in_loclist_baton): Likewise.
9408 (dwarf2_symbol_mark_computed): Likewise.
9409 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9411 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
9413 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9414 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
9415 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
9416 (set_die_type): Use dwarf2_free_objfile from cu.
9417 (get_die_type_at_offset): Likewise.
9418 (dwarf2_per_objfile_free): Don't assign global variable.
9419 (debug_names) <constructor>: Add dwarf2_per_objfile
9420 parameter, update m_debugstrlookup construction.
9421 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
9423 <m_dwarf2_per_objfile>: New field.
9424 <lookup>: Use m_dwarf2_per_objfile.
9425 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
9426 (psyms_seen_size): Likewise.
9427 (write_gdbindex): Replace objfile parameter with
9429 (write_debug_names): Likewise.
9430 (write_psymtabs_to_index): Likewise.
9431 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
9434 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9436 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
9437 <dwarf2_per_objfile>: New field.
9438 (struct dwarf2_per_cu_data) <objfile>: Remove.
9439 <dwarf2_per_objfile>: New field.
9440 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
9442 (create_signatured_type_table_from_index): Likewise.
9443 (create_debug_type_hash_table): Likewise.
9444 (fill_in_sig_entry_from_dwo_entry): Likewise.
9445 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
9446 (create_type_unit_group): Assign dwarf2_per_objfile instead of
9448 (create_partial_symtab): Access objfile through
9450 (process_psymtab_comp_unit_reader): Likewise.
9451 (read_comp_units_from_section): Likewise.
9452 (scan_partial_symbols): Likewise.
9453 (add_partial_symbol): Likewise.
9454 (add_partial_subprogram): Likewise.
9455 (peek_die_abbrev): Likewise.
9456 (fixup_go_packaging): Likewise.
9457 (process_full_comp_unit): Likewise.
9458 (process_full_type_unit): Likewise.
9459 (process_imported_unit_die): Likewise.
9460 (dwarf2_compute_name): Likewise.
9461 (dwarf2_physname): Likewise.
9462 (read_import_statement): Likewise.
9463 (create_cus_hash_table): Assign dwarf2_physname instead of
9465 (read_func_scope): Access objfile through dwarf2_per_objfile.
9466 (read_lexical_block_scope): Likewise.
9467 (read_call_site_scope): Likewise.
9468 (read_variable): Likewise.
9469 (dwarf2_rnglists_process): Likewise.
9470 (dwarf2_ranges_process): Likewise.
9471 (dwarf2_ranges_read): Likewise.
9472 (dwarf2_record_block_ranges): Likewise.
9473 (dwarf2_add_field): Likewise.
9474 (dwarf2_add_member_fn): Likewise.
9475 (read_structure_type): Likewise.
9476 (process_structure_scope): Likewise.
9477 (read_enumeration_type): Likewise.
9478 (read_array_type): Likewise.
9479 (read_common_block): Likewise.
9480 (read_namespace_type): Likewise.
9481 (read_namespace): Likewise.
9482 (read_module_type): Likewise.
9483 (read_tag_pointer_type): Likewise.
9484 (read_tag_ptr_to_member_type): Likewise.
9485 (read_tag_string_type): Likewise.
9486 (read_subroutine_type): Likewise.
9487 (read_typedef): Likewise.
9488 (read_base_type): Likewise.
9489 (attr_to_dynamic_prop): Likewise.
9490 (read_subrange_type): Likewise.
9491 (read_unspecified_type): Likewise.
9492 (load_partial_dies): Likewise.
9493 (read_partial_die): Likewise.
9494 (find_partial_die): Likewise.
9495 (guess_partial_die_structure_name): Likewise.
9496 (fixup_partial_die): Likewise.
9497 (read_attribute_value): Likewise.
9498 (read_addr_index_from_leb128): Likewise.
9499 (dwarf2_read_addr_index): Likewise.
9500 (dwarf2_string_attr): Likewise.
9501 (lnp_state_machine::check_line_address): Likewise.
9502 (dwarf_decode_lines_1): Likewise.
9503 (dwarf_decode_lines): Likewise.
9504 (dwarf2_start_symtab): Likewise.
9505 (var_decode_location): Likewise.
9506 (new_symbol_full): Likewise.
9507 (dwarf2_const_value_data): Likewise.
9508 (dwarf2_const_value_attr): Likewise.
9509 (dwarf2_const_value): Likewise.
9510 (die_type): Likewise.
9511 (die_containing_type): Likewise.
9512 (lookup_die_type): Likewise.
9513 (guess_full_die_structure_name): Likewise.
9514 (anonymous_struct_prefix): Likewise.
9515 (dwarf2_name): Likewise.
9516 (follow_die_ref_or_sig): Likewise.
9517 (follow_die_offset): Likewise.
9518 (follow_die_ref): Likewise.
9519 (dwarf2_fetch_die_loc_sect_off): Likewise.
9520 (dwarf2_fetch_constant_bytes): Likewise.
9521 (dwarf2_fetch_die_type_sect_off): Likewise.
9522 (dwarf2_get_die_type): Likewise.
9523 (follow_die_sig): Likewise.
9524 (decode_locdesc): Likewise.
9525 (dwarf2_per_cu_objfile): Likewise.
9526 (dwarf2_per_cu_text_offset): Likewise.
9527 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
9529 (set_die_type): Access objfile through
9532 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9534 * valprint.c (converted_character_d): Remove typedef.
9535 (DEF_VEC_O (converted_character_d)): Remove.
9536 (count_next_character): Use std::vector.
9537 (print_converted_chars_to_obstack): Likewise.
9538 (generic_printstr): Likewise.
9540 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9542 * xml-support.h (struct gdb_xml_value): Add constructor.
9543 <value>: Change type to unique_xmalloc_ptr.
9544 (gdb_xml_value_s): Remove typedef.
9545 (DEF_VEC_O (gdb_xml_value_s)): Remove.
9546 (gdb_xml_element_start_handler): Change parameter type to
9548 (xml_find_attribute): Likewise.
9549 * xml-support.c (xml_find_attribute): Change parameter type to
9550 std::vector and adjust.
9551 (gdb_xml_values_cleanup): Remove.
9552 (gdb_xml_parser::start_element): Adjust to std::vector.
9553 (xinclude_start_include): Change paraeter type to std::vector
9555 * btrace.c (check_xml_btrace_version): Likewise.
9556 (parse_xml_btrace_block): Likewise.
9557 (parse_xml_btrace_pt_config_cpu): Likewise.
9558 (parse_xml_btrace_pt): Likewise.
9559 (parse_xml_btrace_conf_bts): Likewise.
9560 (parse_xml_btrace_conf_pt): Likewise.
9561 * memory-map.c (memory_map_start_memory): Likewise.
9562 (memory_map_start_property): Likewise.
9563 * osdata.c (osdata_start_osdata): Likewise.
9564 (osdata_start_item): Likewise.
9565 (osdata_start_column): Likewise.
9566 * remote.c (start_thread): Likewise.
9567 * solib-aix.c (library_list_start_library): Likewise.
9568 (library_list_start_list): Likewise.
9569 * solib-svr4.c (library_list_start_library): Likewise.
9570 (svr4_library_list_start_list): Likewise.
9571 * solib-target.c (library_list_start_segment): Likewise.
9572 (library_list_start_section): Likewise.
9573 (library_list_start_library): Likewise.
9574 (library_list_start_list): Likewise.
9575 * tracepoint.c (traceframe_info_start_memory): Likewise.
9576 (traceframe_info_start_tvar): Likewise.
9577 * xml-syscall.c (syscall_start_syscall): Likewise.
9578 * xml-tdesc.c (tdesc_start_target): Likewise.
9579 (tdesc_start_feature): Likewise.
9580 (tdesc_start_reg): Likewise.
9581 (tdesc_start_union): Likewise.
9582 (tdesc_start_struct): Likewise.
9583 (tdesc_start_flags): Likewise.
9584 (tdesc_start_enum): Likewise.
9585 (tdesc_start_field): Likewise.
9586 (tdesc_start_enum_value): Likewise.
9587 (tdesc_start_vector): Likewise.
9589 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9591 * extension.h (struct xmethod_worker) <clone>: Remove.
9592 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
9594 (python_xmethod_worker::clone): Remove.
9595 * valops.c (find_overload_match): Use std::move instead of
9598 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9600 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
9601 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
9602 <free_xmethod_worker_data>: Remove.
9603 <get_matching_xmethod_workers>: Chance VEC to std::vector.
9604 <get_xmethod_arg_types>: Remove.
9605 <get_xmethod_result_type>: Remove.
9606 <invoke_xmethod>: Remove.
9607 * extension.c (new_xmethod_worker): Remove.
9608 (clone_xmethod_worker): Remove.
9609 (get_matching_xmethod_workers): Return void, pass std::vector by
9611 (get_xmethod_arg_types): Rename to...
9612 (xmethod_worker::get_arg_types): ... this, and adjust.
9613 (get_xmethod_result_type): Rename to...
9614 (xmethod_worker::get_result_type): ... this, and adjust.
9615 (invoke_xmethod): Remove.
9616 (free_xmethod_worker): Remove.
9617 (free_xmethod_worker_vec): Remove.
9618 * extension.h (enum ext_lang_rc): Move here from
9620 (struct xmethod_worker): Add constructor and destructor.
9623 <invoke, clone, do_get_result_type, do_get_arg_types>: New
9624 virtual pure methods.
9625 <get_arg_types, get_result_type>: New methods.
9626 (xmethod_worker_ptr): Remove typedef.
9627 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
9628 (xmethod_worker_vec): Remove typedef.
9629 (xmethod_worker_up): New typedef.
9630 (invoke_xmethod): Remove.
9631 (clone_xmethod_worker): Remove.
9632 (free_xmethod_worker): Remove.
9633 (free_xmethod_worker_vec): Remove.
9634 (get_xmethod_arg_types): Remove.
9635 (get_xmethod_result_type): Remove.
9636 * valops.c (find_method_list): Use std::vector, don't use
9637 intermediate vector.
9638 (value_find_oload_method_list): Use std::vector.
9639 (find_overload_match): Use std::vector.
9640 (find_oload_champ): Use std::vector.
9641 * value.c (value_free): Use operator delete.
9642 (value_of_xmethod): Rename to...
9643 (value_from_xmethod): ... this. Don't assign
9644 xmethod_worker::value, take rvalue-reference.
9645 (result_type_of_xmethod): Adjust.
9646 (call_xmethod): Adjust.
9647 * value.h: Include extension.h.
9648 (struct xmethod_worker): Don't forward-declare.
9649 (value_of_xmethod): Rename to...
9650 (value_from_xmethod): ... this, take rvalue-reference.
9651 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
9652 (struct python_xmethod_worker): ... this, add constructor and
9654 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
9655 (gdbpy_free_xmethod_worker_data): Rename to...
9656 (python_xmethod_worker::~python_xmethod_worker): ... this and
9658 (gdbpy_clone_xmethod_worker_data): Rename to...
9659 (python_xmethod_worker::clone): ... this and adjust.
9660 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
9662 (gdbpy_get_xmethod_arg_types): Rename to...
9663 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
9664 (gdbpy_get_xmethod_result_type): Rename to...
9665 (python_xmethod_worker::do_get_result_type): ... this and
9667 (gdbpy_invoke_xmethod): Rename to...
9668 (python_xmethod_worker::invoke): ... this and adjust.
9669 (new_python_xmethod_worker): Rename to...
9670 (python_xmethod_worker::python_xmethod_worker): ... this and
9672 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
9674 (gdbpy_free_xmethod_worker_data): Remove.
9675 (gdbpy_get_matching_xmethod_workers): Use std::vector.
9676 (gdbpy_get_xmethod_arg_types): Remove.
9677 (gdbpy_get_xmethod_result_type): Remove.
9678 (gdbpy_invoke_xmethod): Remove.
9679 * python/python.c (python_extension_ops): Remove obsolete
9682 2018-01-05 Pedro Alves <palves@redhat.com>
9685 * common/signals-state-save-restore.c
9686 (save_original_signals_state): New parameter 'quiet'. Warn if we
9687 find a custom handler preinstalled, instead of internal erroring.
9688 But only warn if !quiet.
9689 * common/signals-state-save-restore.h
9690 (save_original_signals_state): New parameter 'quiet'.
9691 * main.c (captured_main_1): Move save_original_signals_state call
9692 after option handling, and pass QUIET.
9694 2018-01-05 Pedro Alves <palves@redhat.com>
9696 * spu-tdep.c (spu_catch_start): Pass
9697 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
9699 2018-01-05 Pedro Alves <palves@redhat.com>
9702 * ada-lang.c (literal_symbol_name_matcher): New function.
9703 (ada_get_symbol_name_matcher): Use it for
9704 symbol_name_match_type::SEARCH_NAME.
9705 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
9706 it down instead of assuming symbol_name_match_type::FULL.
9707 * block.h (block_lookup_symbol): New parameter 'match_type'.
9708 * c-valprint.c (print_unpacked_pointer): Use
9709 lookup_symbol_search_name instead of lookup_symbol.
9710 * compile/compile-object-load.c (get_out_value_type): Pass down
9711 symbol_name_match_type::SEARCH_NAME.
9712 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
9713 symbol_name_match_type::FULL.
9714 * cp-support.c (cp_get_symbol_name_matcher): Handle
9715 symbol_name_match_type::SEARCH_NAME.
9716 * infrun.c (insert_exception_resume_breakpoint): Use
9717 lookup_symbol_search_name.
9718 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
9719 * psymtab.c (maintenance_check_psymtabs): Use
9720 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
9721 * stack.c (print_frame_args): Use lookup_symbol_search_name and
9723 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
9724 if symbol_name_match_type::SEARCH_NAME.
9725 (lookup_symbol_in_language): Pass down
9726 symbol_name_match_type::FULL.
9727 (lookup_symbol_search_name): New.
9728 (lookup_language_this): Pass down
9729 symbol_name_match_type::SEARCH_NAME.
9730 (lookup_symbol_aux, lookup_local_symbol): New parameter
9731 'match_type'. Pass it down.
9732 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
9733 (lookup_symbol_search_name): New declaration.
9734 (lookup_symbol_in_block): New 'match_type' parameter.
9736 2018-01-05 Pedro Alves <palves@redhat.com>
9739 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
9741 (ada_lookup_symbol): Reimplement in terms of
9742 ada_lookup_symbol_list, bits factored out from
9743 ada_lookup_encoded_symbol.
9745 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9747 * ada-exp.y (write_object_renaming): When subscripting an array
9748 using a symbol as the index, pass the block in call to
9749 ada_lookup_encoded_symbol when looking that symbol up.
9751 2018-01-05 Jerome Guitton <guitton@adacore.com>
9753 * ada-lang.c (ada_array_length): Use ada_index_type instead of
9756 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9758 * ada-lang.c (ada_to_fixed_value_create): Add handling of
9759 the case where VALUE_LVAL (val0) is not lval_memory.
9761 2018-01-05 Xavier Roirand <roirand@adacore.com>
9763 * ada-valprint.c (print_optional_low_bound): Handle
9764 character-indexed array printing like boolean-indexed array
9767 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9769 * NEWS: Create a new section for the next release branch.
9770 Rename the section of the current branch, now that it has
9773 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9775 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
9776 * version.in: Bump version to 8.1.50.DATE-git.
9778 2018-01-03 Xavier Roirand <roirand@adacore.com>
9780 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
9782 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
9784 (default_exception_support_info) <catch_handlers_sym>: Add field.
9785 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
9786 (ada_exception_name_addr_1): Add "catch handlers" handling.
9787 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
9789 (create_excep_cond_exprs) <ex>: Add parameter.
9790 (re_set_exception): Update create_excep_cond_exprs call.
9791 (print_it_exception, print_one_exception, print_mention_exception)
9792 (print_recreate_exception): Add "catch handler" handling.
9793 (allocate_location_catch_handlers, re_set_catch_handlers)
9794 (check_status_catch_handlers, print_it_catch_handlers)
9795 (print_one_catch_handlers, print_mention_catch_handlers)
9796 (print_recreate_catch_handlers): New function.
9797 (catch_handlers_breakpoint_ops): New variable.
9798 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
9799 Add parameter. Add "catch handler" handling.
9800 (ada_exception_sym_name, ada_exception_breakpoint_ops):
9801 Add "catch handler" handling.
9802 (ada_exception_catchpoint_cond_string): Add "catch handler"
9804 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
9806 (catch_ada_handlers_command): New function.
9807 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
9808 operations structure.
9809 (_initialize_ada_language): Add "catch handlers" command entry.
9810 * NEWS: Document "catch handlers" feature.
9812 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9814 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
9815 account when creating the array type of the slice.
9816 (ada_value_slice): Likewise.
9818 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9820 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
9822 (create_array_type_with_stride): Add byte_stride_prop parameter.
9823 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
9824 New parameter. Update all callers in this file.
9825 (array_type_has_dynamic_stride): New function.
9826 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
9827 of arrays with dynamic byte strides.
9828 * dwarf2read.c (read_array_type): Add support for dynamic
9829 DW_AT_byte_stride attributes.
9831 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9833 * dwarf2read.c (read_unspecified_type): Treat
9834 DW_TAG_enumeration_type DIEs from Ada units as stubs.
9836 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9838 Update copyright year range in all GDB files.
9840 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9842 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
9843 and gdb/testsuite/gdb.base/step-line.c.
9845 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9847 * copyright.py (main): Dump the contents of
9848 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
9849 even if BY_HAND is empty.
9851 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9853 * top.c (print_gdb_version): Update Copyright year in version
9856 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9858 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
9860 For older changes see ChangeLog-2017.
9866 version-control: never