1 2018-07-09 Tom Tromey <tom@tromey.com>
3 * Makefile.in (clean mostlyclean): Remove stamp-version.
4 (version.c): Depend on stamp-version.
5 (stamp-version): New rule, from version.c rule.
7 2018-07-09 Tom Tromey <tom@tromey.com>
9 * Makefile.in (init.c): Depend on stamp-init.
10 (stamp-init): New rule, from init.c rule.
11 (clean mostlyclean): Remove stamp-init.
13 2018-07-09 Tom Tromey <tom@tromey.com>
15 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
16 SUBDIR_GCC_COMPILE_SRCS.
18 2018-07-09 Tom Tromey <tom@tromey.com>
20 * Makefile.in (init.c): Remove some unused sed rules.
22 2018-07-09 Tom Tromey <tom@tromey.com>
24 * Makefile.in (TSOBS): Remove.
27 (COMMON_SFILES): Add inflow.c.
28 (SFILES): Remove inflow.c.
30 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
32 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
34 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
36 * ia64-tdep.c (get_reg_name, get_fpreg_name, get_saveloc_name,
37 is_signal_frame_name, step_name, init_remote_name,
38 create_addr_space_name, destroy_addr_space_name,
39 search_unwind_table_name, find_dyn_list_name): Constify.
41 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
43 * darwin-nat.c (darwin_pthread_kill): New function.
44 (darwin_resume_thread): Use darwin_pthread_kill.
46 2018-07-05 Tom de Vries <tdevries@suse.de>
48 * macroexp.c (macro_buffer) <operator=>: New member function.
50 2018-07-04 Tom Tromey <tom@tromey.com>
52 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
54 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
56 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
57 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
61 2018-07-04 Joel Brobecker <brobecker@adacore.com>
63 * NEWS: Create a new section for the next release branch.
64 Rename the section of the current branch, now that it has
67 2018-07-04 Joel Brobecker <brobecker@adacore.com>
69 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
70 * version.in: Bump version to 8.2.50.DATE-git.
72 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
73 Pedro Alves <palves@redhat.com>
75 * linux-nat.c (linux_init_ptrace): Rename to ...
76 (linux_init_ptrace_procfs): ... this. Call
77 linux_proc_init_warnings.
78 (linux_nat_target::post_attach)
79 (linux_nat_target::post_startup_inferior): Adjust.
80 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
81 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
83 2018-07-04 Tom de Vries <tdevries@suse.de>
85 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
87 (read_comp_unit_head): ... here.
89 2018-07-03 Tom Tromey <tom@tromey.com>
91 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
92 (stop_tracing, tstatus_command)
93 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
94 (print_one_static_tracepoint_marker): Update.
95 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
97 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
99 (all_tracepoints, static_tracepoints_here): Return std::vector.
101 2018-07-03 Tom Tromey <tom@tromey.com>
103 * common/ptid.c (ptid_equal): Remove.
104 * common/ptid.h (ptid_equal): Don't declare.
105 * ada-tasks.c: Update.
106 * breakpoint.c: Update.
107 * common/agent.c: Update.
109 * darwin-nat-info.c: Update.
110 * darwin-nat.c: Update.
112 * dtrace-probe.c: Update.
113 * dummy-frame.c: Update.
114 * fbsd-nat.c: Update.
116 * gdbthread.h: Update.
118 * go32-nat.c: Update.
119 * inf-loop.c: Update.
120 * inf-ptrace.c: Update.
125 * linux-fork.c: Update.
126 * linux-nat.c: Update.
127 * linux-thread-db.c: Update.
128 * mi/mi-cmd-var.c: Update.
129 * mi/mi-interp.c: Update.
130 * mi/mi-main.c: Update.
131 * nto-procfs.c: Update.
132 * ppc-linux-tdep.c: Update.
134 * python/py-inferior.c: Update.
135 * python/py-record-btrace.c: Update.
136 * python/py-record.c: Update.
137 * ravenscar-thread.c: Update.
138 * regcache.c: Update.
139 * remote-sim.c: Update.
141 * sol-thread.c: Update.
144 * tui/tui-stack.c: Update.
146 * windows-nat.c: Update.
147 * windows-tdep.c: Update.
149 2018-07-03 Tom Tromey <tom@tromey.com>
151 * common/ptid.c (ptid_match): Remove.
152 * common/ptid.h (ptid_match): Don't declare.
153 * fbsd-nat.c: Update.
156 * linux-nat.c: Update.
157 * record-btrace.c: Update.
158 * regcache.c: Update.
161 2018-07-03 Tom Tromey <tom@tromey.com>
163 * common/ptid.c (ptid_tid_p): Remove.
164 * common/ptid.h (ptid_tid_p): Don't declare.
165 * sol-thread.c: Update.
167 2018-07-03 Tom Tromey <tom@tromey.com>
169 * common/ptid.c (ptid_lwp_p): Remove.
170 * common/ptid.h (ptid_lwp_p): Don't declare.
171 * fbsd-nat.c: Update.
172 * linux-nat.c: Update.
173 * nat/linux-procfs.c: Update.
174 * nat/x86-linux-dregs.c: Update.
175 * sol-thread.c: Update.
177 2018-07-03 Tom Tromey <tom@tromey.com>
179 * common/ptid.c (ptid_is_pid): Remove.
180 * common/ptid.h (ptid_is_pid): Don't declare.
182 * linux-nat.c: Update.
183 * mi/mi-interp.c: Update.
187 2018-07-03 Tom Tromey <tom@tromey.com>
189 * common/ptid.c (ptid_get_tid): Remove.
190 * common/ptid.h (ptid_get_tid): Don't declare.
191 * ada-tasks.c: Update.
192 * aix-thread.c: Update.
193 * bsd-uthread.c: Update.
194 * darwin-nat.c: Update.
195 * fbsd-nat.c: Update.
196 * i386-darwin-nat.c: Update.
198 * linux-tdep.c: Update.
199 * nto-procfs.c: Update.
200 * ppc-ravenscar-thread.c: Update.
201 * python/py-infthread.c: Update.
202 * ravenscar-thread.c: Update.
203 * sol-thread.c: Update.
204 * sparc-ravenscar-thread.c: Update.
205 * windows-nat.c: Update.
207 2018-07-03 Tom Tromey <tom@tromey.com>
209 * common/ptid.c (ptid_get_lwp): Remove.
210 * common/ptid.h (ptid_get_lwp): Don't declare.
211 * aarch64-linux-nat.c: Update.
212 * ada-tasks.c: Update.
213 * aix-thread.c: Update.
214 * amd64-linux-nat.c: Update.
215 * arm-linux-nat.c: Update.
217 * fbsd-nat.c: Update.
218 * fbsd-tdep.c: Update.
220 * i386-cygwin-tdep.c: Update.
221 * i386-gnu-nat.c: Update.
222 * i386-linux-nat.c: Update.
223 * ia64-linux-nat.c: Update.
224 * inf-ptrace.c: Update.
226 * linux-fork.c: Update.
227 * linux-nat.c: Update.
228 * linux-tdep.c: Update.
229 * linux-thread-db.c: Update.
230 * mips-linux-nat.c: Update.
231 * nat/aarch64-linux-hw-point.c: Update.
232 * nat/aarch64-linux.c: Update.
233 * nat/linux-btrace.c: Update.
234 * nat/linux-osdata.c: Update.
235 * nat/linux-procfs.c: Update.
236 * nat/x86-linux-dregs.c: Update.
237 * obsd-nat.c: Update.
238 * ppc-fbsd-nat.c: Update.
239 * ppc-linux-nat.c: Update.
241 * python/py-infthread.c: Update.
242 * ravenscar-thread.c: Update.
244 * s390-linux-nat.c: Update.
245 * sol-thread.c: Update.
246 * sol2-tdep.c: Update.
247 * spu-linux-nat.c: Update.
248 * x86-linux-nat.c: Update.
249 * xtensa-linux-nat.c: Update.
251 2018-07-03 Tom Tromey <tom@tromey.com>
253 * common/ptid.c (ptid_get_pid): Remove.
254 * common/ptid.h (ptid_get_pid): Don't declare.
255 * aarch64-linux-nat.c: Update.
256 * ada-lang.c: Update.
257 * aix-thread.c: Update.
258 * alpha-bsd-nat.c: Update.
259 * amd64-fbsd-nat.c: Update.
260 * amd64-linux-nat.c: Update.
261 * arm-linux-nat.c: Update.
262 * arm-nbsd-nat.c: Update.
264 * break-catch-syscall.c: Update.
265 * breakpoint.c: Update.
266 * bsd-uthread.c: Update.
269 * darwin-nat.c: Update.
270 * fbsd-nat.c: Update.
271 * fbsd-tdep.c: Update.
274 * hppa-nbsd-nat.c: Update.
275 * hppa-obsd-nat.c: Update.
276 * i386-fbsd-nat.c: Update.
277 * ia64-linux-nat.c: Update.
278 * inf-ptrace.c: Update.
280 * inferior.c: Update.
281 * inferior.h: Update.
284 * linux-fork.c: Update.
285 * linux-nat.c: Update.
286 * linux-tdep.c: Update.
287 * linux-thread-db.c: Update.
288 * m68k-bsd-nat.c: Update.
289 * mi/mi-interp.c: Update.
290 * mi/mi-main.c: Update.
291 * mips-linux-nat.c: Update.
292 * mips-nbsd-nat.c: Update.
293 * mips64-obsd-nat.c: Update.
294 * nat/aarch64-linux-hw-point.c: Update.
295 * nat/aarch64-linux.c: Update.
296 * nat/linux-btrace.c: Update.
297 * nat/linux-osdata.c: Update.
298 * nat/linux-procfs.c: Update.
299 * nat/x86-linux-dregs.c: Update.
300 * nto-procfs.c: Update.
301 * obsd-nat.c: Update.
302 * ppc-linux-nat.c: Update.
303 * ppc-nbsd-nat.c: Update.
304 * ppc-obsd-nat.c: Update.
305 * proc-service.c: Update.
307 * python/py-inferior.c: Update.
308 * python/py-infthread.c: Update.
309 * ravenscar-thread.c: Update.
311 * remote-sim.c: Update.
313 * rs6000-nat.c: Update.
314 * s390-linux-nat.c: Update.
315 * sh-nbsd-nat.c: Update.
316 * sol-thread.c: Update.
317 * sparc-nat.c: Update.
318 * sparc64-tdep.c: Update.
319 * spu-linux-nat.c: Update.
320 * spu-tdep.c: Update.
321 * target-debug.h: Update.
324 * tid-parse.c: Update.
325 * tracefile-tfile.c: Update.
326 * vax-bsd-nat.c: Update.
327 * windows-nat.c: Update.
328 * x86-linux-nat.c: Update.
331 2018-07-03 Tom Tromey <tom@tromey.com>
333 * common/ptid.c (pid_to_ptid): Remove.
334 * common/ptid.h (pid_to_ptid): Don't declare.
335 * aix-thread.c: Update.
336 * arm-linux-nat.c: Update.
337 * common/ptid.c: Update.
338 * common/ptid.h: Update.
341 * darwin-nat.c: Update.
342 * fbsd-nat.c: Update.
343 * fork-child.c: Update.
345 * go32-nat.c: Update.
346 * inf-ptrace.c: Update.
348 * inferior.c: Update.
350 * linux-fork.c: Update.
351 * linux-nat.c: Update.
352 * nat/aarch64-linux-hw-point.c: Update.
353 * nat/fork-inferior.c: Update.
354 * nat/x86-linux-dregs.c: Update.
355 * nto-procfs.c: Update.
356 * obsd-nat.c: Update.
358 * progspace.c: Update.
360 * rs6000-nat.c: Update.
361 * s390-linux-nat.c: Update.
362 * sol-thread.c: Update.
363 * spu-linux-nat.c: Update.
366 * tracefile-tfile.c: Update.
367 * windows-nat.c: Update.
369 2018-07-03 Tom Tromey <tom@tromey.com>
371 * common/ptid.h (ptid_build): Don't declare.
372 * common/ptid.c (ptid_build): Remove.
373 * aix-thread.c: Update.
375 * bsd-uthread.c: Update.
376 * common/agent.c: Update.
377 * common/ptid.c: Update.
378 * common/ptid.h: Update.
380 * darwin-nat.c: Update.
381 * fbsd-nat.c: Update.
383 * linux-fork.c: Update.
384 * linux-nat.c: Update.
385 * linux-thread-db.c: Update.
386 * nat/linux-osdata.c: Update.
387 * nat/linux-procfs.c: Update.
388 * nto-procfs.c: Update.
389 * obsd-nat.c: Update.
390 * proc-service.c: Update.
392 * ravenscar-thread.c: Update.
393 * remote-sim.c: Update.
395 * sol-thread.c: Update.
397 * windows-nat.c: Update.
399 2018-07-03 Tom Tromey <tom@tromey.com>
401 * infrun.c (follow_exec): Use exit_inferior_silent.
402 * inferior.c (exit_inferior_num_silent): Remove.
403 * inferior.h (exit_inferior_num_silent): Don't declare.
405 2018-07-03 Tom Tromey <tom@tromey.com>
408 * darwin-nat.c (darwin_attach_pid): Reset inferior and
409 inferior_ptid on error.
411 2018-07-02 Maciej W. Rozycki <macro@mips.com>
412 Simon Marchi <simon.marchi@polymtl.ca>
415 * disasm.h (gdb_disassembler): Add
416 `m_disassembler_options_holder'. member
417 * disasm.c (get_all_disassembler_options): New function.
418 (gdb_disassembler::gdb_disassembler): Use it.
419 (gdb_buffered_insn_length_init_dis): Likewise.
420 (gdb_buffered_insn_length): Adjust accordingly.
421 (set_disassembler_options): Handle options with arguments.
422 (show_disassembler_options_sfunc): Likewise. Add a leading new
423 line if showing options with descriptions.
424 (disassembler_options_completer): Adapt to using the
425 `disasm_options_and_args_t' structure.
426 * mips-tdep.c (mips_disassembler_options): New variable.
427 (mips_disassembler_options_o32): Likewise.
428 (mips_disassembler_options_n32): Likewise.
429 (mips_disassembler_options_n64): Likewise.
430 (gdb_print_insn_mips): Don't set `disassembler_options'.
431 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
433 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
434 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
435 `gdbarch_disassembler_options_implicit' and
436 `gdbarch_valid_disassembler_options'.
437 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
438 `disasm_options_and_args_t' structure.
439 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
441 (valid_disassembler_options): Switch from `disasm_options_t' to
442 the `disasm_options_and_args_t' structure.
443 * NEWS: Document `set disassembler-options' support for the MIPS
445 * gdbarch.h: Regenerate.
446 * gdbarch.c: Regenerate.
448 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
450 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
452 2018-06-29 Joel Brobecker <brobecker@adacore.com>
454 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
455 parameter in call to amd64_target_description.
456 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
457 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
458 (amd64fbsd_init_abi): Likewise.
459 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
460 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
461 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
462 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
464 2018-06-29 Pedro Alves <palves@redhat.com>
466 * gdb/amd64-tdep.h (amd64_create_target_description): Add
467 "segments" parameter.
468 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
469 (_initialize_amd64_tdep): Update call to
470 amd64_create_target_description.
471 (amd64_target_description): Add "segments" parameter. Adjust
472 the implementation to use it.
473 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
474 call to amd64_create_target_description.
475 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
476 * gdb/arch/amd64.h (amd64_create_target_description): Add
478 * gdb/arch/amd64.c (amd64_create_target_description): Add
479 "segments" parameter. Call create_feature_i386_64bit_segments
480 only if SEGMENTS is true.
481 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
482 call to amd64_create_target_description.
484 2018-06-29 Pedro Alves <palves@redhat.com>
486 * thread.c (thread_target_id_str): New, factored out from ...
487 (print_thread_info_1): ... here. Use it to compute the max
488 "Target Id" column width.
490 2018-06-29 Pedro Alves <palves@redhat.com>
492 * remote.c (remote_target::extra_thread_info): Delete
493 'display_buf' and 'n' locals. from the cache, regardless of
494 packet mechanims is in use. Use cache for qThreadExtra and qP
497 2018-06-29 Pedro Alves <palves@redhat.com>
499 * blockframe.c (find_pc_sect_containing_function): New function.
500 * breakpoint.c (print_breakpoint_location): Don't call
501 find_pc_sect_function.
502 * linespec.c (create_sals_line_offset): Record the location's
504 * linespec.c (convert_address_location_to_sals): Fill in sal's
505 symbol with find_pc_sect_containing_function.
506 * symtab.c (find_function_start_sal): Rename to ...
507 (find_function_start_sal_1): ... this.
508 (find_function_start_sal): Reimplement as wrapper around
509 find_function_start_sal_1, and use
510 find_pc_sect_containing_function to fill in the sal's symbol.
511 (find_function_start_sal(symbol*, bool)): Adjust.
512 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
514 (find_pc_sect_containing_function): Declare.
516 2018-06-29 Pedro Alves <palves@redhat.com>
518 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
519 true if the the location has no symbol.
521 2018-06-28 Tom Tromey <tom@tromey.com>
523 * NEWS: Mention --enable-codesign.
524 * silent-rules.mk (ECHO_SIGN): New variable.
525 * configure.ac: Add --enable-codesign.
526 * configure: Rebuild.
527 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
528 (gdb$(EXEEXT)): Optionally invoke codesign.
530 2018-06-28 Pedro Alves <palves@redhat.com>
532 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
534 (switch_to_thread_no_regs): Adjust comment.
535 * infcmd.c (stop_pc): Delete.
536 (post_create_inferior, info_program_command): Replace references
537 to stop_pc with references to thread_info->suspend.stop_pc.
538 * inferior.h (stop_pc): Delete declaration.
539 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
540 (handle_inferior_event_1, handle_signal_stop)
541 (process_event_stop_test, keep_going_stepped_thread)
542 (handle_step_into_function, handle_step_into_function_backward)
543 (print_stop_location): Replace references to stop_pc with
544 references to thread_info->suspend.stop_pc.
545 (struct infcall_suspend_state) <stop_pc>: Delete field.
546 (save_infcall_suspend_state, restore_infcall_suspend_state):
547 Remove references to inf_stat->stop_pc.
548 * linux-fork.c (fork_load_infrun_state): Likewise.
549 * record-btrace.c (record_btrace_set_replay): Likewise.
550 * record-full.c (record_full_goto_entry): Likewise.
551 * remote.c (print_one_stopped_thread): Likewise.
552 * target.c (target_resume): Extend comment.
553 * thread.c (set_executing_thread): New.
554 (set_executing): Use it.
555 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
556 Remove references to stop_pc.
558 2018-06-28 Pedro Alves <palves@redhat.com>
560 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
561 Moving fetching stop_pc until after ecs->event_thread is refreshed.
563 2018-06-28 Tom Tromey <tom@tromey.com>
565 * coffread.c (coff_symfile_finish): Update.
566 * xcoffread.c (xcoff_symfile_finish): Update.
567 * elfread.c (elf_symfile_finish): Update.
568 * symfile.h (dwarf2_free_objfile): Don't declare.
569 * dwarf2read.c (_initialize_dwarf2_read): Use
570 register_objfile_data_with_cleanup.
571 (dwarf2_free_objfile): Now static. Change signature.
573 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
575 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
576 option "-o" to add-symbol-file-load to add an offset to each
577 section's load address.
578 * symfile.c (set_objfile_default_section_offset): New function.
580 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
582 * symfile.c (add_symbol_file_command): Make sure that sections
583 with the same name are sorted in the same order.
585 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
587 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
588 require the second argument. If omitted, load sections at the
589 addresses specified in the file.
591 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
593 * symfile.c (symbol_file_command, symbol_file_add_main_1)
594 (_initialize_symfile): Add option "-o" to symbol-file to add an
595 offset to each section of the symbol file.
597 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
599 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
601 2018-06-27 Tom Tromey <tom@tromey.com>
603 * stack.c (_initialize_stack): Update "func" help text.
605 2018-06-27 Tom Tromey <tom@tromey.com>
607 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
609 (unwind_infopy_str, pyuw_create_unwind_info)
610 (unwind_infopy_add_saved_register, pyuw_sniffer)
611 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
613 (struct saved_reg): Add constructor.
614 <value>: Now a gdbpy_ref<>.
616 2018-06-27 Tom Tromey <tom@tromey.com>
618 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
620 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
622 * gdb-gdb.py.in: Format using autopep8.
624 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
626 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
627 (type_lookup_function): Recognize CORE_ADDR values.
629 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
631 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
634 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
636 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
639 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
641 * gdb-gdb.py: Move to...
642 * gdb-gdb.py.in: ... here.
643 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
644 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
646 (distclean): Remove gdb-gdb.py when cleaning.
647 (gdb-gdb.py, gdb-gdb.gdb): New rules.
648 * configure: Re-generate.
650 2018-06-27 Pedro Alves <palves@redhat.com>
652 * proc-service.c (get_ps_regcache): New.
653 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
654 (ps_lsetfpregs): Use it.
656 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
659 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
660 (dwarf_decode_lines_1): Adjust.
662 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
664 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
666 <info_proc>: Likewise.
668 2018-06-26 Joel Brobecker <brobecker@adacore.com>
670 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
671 to windows_fetch_one_register, and only handle the case of
672 fetching one register. Move the code that reloads the context
673 and iterates over all registers if R is negative to...
674 (windows_nat_target::fetch_registers): ... here.
675 (do_windows_store_inferior_registers): Rename to
676 windows_store_one_register, and only handle the case of storing
677 one register. Move the code that handles the case where r is
679 (windows_nat_target::store_registers) ... here.
681 2018-06-26 Tom Tromey <tom@tromey.com>
684 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
685 * rust-lang.c (rust_print_struct_def): Add podata parameter.
687 (rust_internal_print_type): Add podata parameter.
688 (rust_print_type): Update.
690 2018-06-26 Tom Tromey <tom@tromey.com>
692 * typeprint.h (struct print_offset_data) <update, finish,
693 maybe_print_hole>: New methods.
694 <indentation>: New constant.
695 * typeprint.c (print_offset_data::indentation): Define.
696 (print_offset_data::maybe_print_hole, print_offset_data::update)
697 (print_offset_data::finish): Move from c-typeprint.c and rename.
698 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
699 (print_spaces_filtered_with_print_options): Update.
700 (c_print_type_union_field_offset, maybe_print_hole)
701 (c_print_type_struct_field_offset): Move to typeprint.c and
703 (c_type_print_base_struct_union): Update.
705 2018-06-25 Pedro Alves <palves@redhat.com>
707 * gdbthread.h (thread_info_ref, delete_thread)
708 (delete_thread_silent, first_thread_of_inferior)
709 (any_thread_of_inferior, switch_to_thread)
710 (enable_thread_stack_temporaries)
711 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
712 (get_last_thread_stack_temporary)
713 (value_in_thread_stack_temporaries, can_access_registers_thread):
714 Spell out "struct thread_info" instead of just "thread_info".
715 * inferior.h (notice_new_inferior): Likewise.
717 2018-06-25 Pedro Alves <palves@redhat.com>
719 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
720 pass thread_info pointer to delete_thread.
721 (windows_nat_target::detach): Pass inferior pointer to
723 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
725 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
726 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
727 and pass a thread_info pointer to delete_thread.
728 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
729 pass thread_info pointer to delete_thread.
730 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
731 delete_thread_silent call.
732 * procfs.c (procfs_target::detach): Pass inferior pointer to
734 (procfs_target::wait): Pass thread_info pointer to delete_thread.
735 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
736 delete_thread_silent call.
737 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
738 pass thread_info pointer to delete_thread.
739 (windows_nat_target::detach): Pass inferior pointer to
742 2018-06-22 Alan Hayward <alan.hayward@arm.com>
744 * regcache.c (readable_regcache::read_part): Fix asserts.
745 (reg_buffer::raw_collect_part): New function.
746 (regcache::write_part): Fix asserts.
747 (reg_buffer::raw_supply_part): New function.
748 (regcache::transfer_regset_register): New helper function.
749 (regcache::transfer_regset): Call new functions.
750 (regcache_supply_regset): Use gdb_byte*.
751 (regcache::supply_regset): Likewise.
752 (regcache_collect_regset): Likewise.
753 (regcache::collect_regset): Likewise.
754 * regcache.h (reg_buffer::raw_collect_part): New declaration.
755 (reg_buffer::raw_supply_part): Likewise.
756 (regcache::transfer_regset_register): Likewise.
757 (regcache::transfer_regset): Use gdb_byte*.
759 2018-06-22 Alan Hayward <alan.hayward@arm.com>
761 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
763 2018-06-21 Pedro Alves <palves@redhat.com>
765 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
766 instead of a ptid_t. All callers adjusted.
767 * ada-tasks.c (ada_get_task_number): Likewise. All callers
769 (print_ada_task_info, display_current_task_id, task_command_1):
771 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
773 (breakpoint_kind): Adjust.
774 (remove_breakpoints_pid): Rename to ...
775 (remove_breakpoints_inf): ... this. Adjust to take an inferior
776 pointer. All callers adjusted.
777 (bpstat_clear_actions): Use inferior_thread.
778 (get_bpstat_thread): New.
779 (bpstat_do_actions): Use it.
780 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
781 to take a thread_info pointer. All callers adjusted.
782 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
783 (breakpoint_re_set_thread): Use inferior_thread.
784 * breakpoint.h (struct inferior): Forward declare.
785 (bpstat_stop_status): Update.
786 (remove_breakpoints_pid): Delete.
787 (remove_breakpoints_inf): New.
788 * bsd-uthread.c (bsd_uthread_target::wait)
789 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
790 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
791 (maint_btrace_packet_history_cmd)
792 (maint_btrace_clear_packet_history_cmd): Adjust.
793 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
795 * cli/cli-interp.c: Include "inferior.h".
796 * common/refcounted-object.h (struct
797 refcounted_object_ref_policy): New.
798 * compile/compile-object-load.c: Include gdbthread.h.
799 (store_regs): Use inferior_thread.
800 * corelow.c (core_target::close): Use current_inferior.
801 (core_target_open): Adjust to use first_thread_of_inferior and use
802 the current inferior.
803 * ctf.c (ctf_target::close): Adjust to use current_inferior.
804 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
805 <thread>: ... this new field. All references adjusted.
806 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
807 Take a thread_info pointer instead of a ptid_t.
808 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
809 (dummy_frame_discard, register_dummy_frame_dtor): Take a
810 thread_info pointer instead of a ptid_t.
811 * elfread.c: Include "inferior.h".
812 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
814 * eval.c (evaluate_subexp): Likewise.
815 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
817 * gdb_proc_service.h (struct thread_info): Forward declare.
818 (struct ps_prochandle) <ptid>: Delete, replaced by ...
819 <thread>: ... this new field. All references adjusted.
820 * gdbarch.h, gdbarch.c: Regenerate.
821 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
822 'thread' parameter. All implementations and callers adjusted.
823 * gdbthread.h (thread_info) <set_running>: New method.
824 (delete_thread, delete_thread_silent): Take a thread_info pointer
826 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
827 (first_thread_of_process): Delete, replaced by ...
828 (first_thread_of_inferior): ... this new function. All callers
830 (any_live_thread_of_process): Delete, replaced by ...
831 (any_live_thread_of_inferior): ... this new function. All callers
833 (switch_to_thread, switch_to_no_thread): Declare.
834 (is_executing): Delete.
835 (enable_thread_stack_temporaries): Update comment.
836 <enable_thread_stack_temporaries>: Take a thread_info pointer
837 instead of a ptid_t. Incref the thread.
838 <~enable_thread_stack_temporaries>: Decref the thread.
841 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
842 (get_last_thread_stack_temporary)
843 (value_in_thread_stack_temporaries, can_access_registers_thread):
844 Take a thread_info pointer instead of a ptid_t. All callers
846 * infcall.c (get_call_return_value): Use inferior_thread.
847 (run_inferior_call): Work with thread pointers instead of ptid_t.
848 (call_function_by_hand_dummy): Work with thread pointers instead
849 of ptid_t. Use thread_info_ref.
850 * infcmd.c (proceed_thread_callback): Access thread's state
852 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
853 access thread's state directly.
854 (continue_command): Use inferior_thread.
855 (info_program_command): Use find_thread_ptid and access thread
857 (proceed_after_attach_callback): Use thread state directly.
858 (notice_new_inferior): Take a thread_info pointer instead of a
859 ptid_t. All callers adjusted.
860 (exit_inferior): Take an inferior pointer instead of a pid. All
862 (exit_inferior_silent): New.
863 (detach_inferior): Delete.
864 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
865 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
866 (detach_inferior_command, kill_inferior_command): Use
867 find_inferior_id instead of valid_gdb_inferior_id and
868 gdb_inferior_id_to_pid.
869 (inferior_command): Use inferior and thread pointers.
870 * inferior.h (struct thread_info): Forward declare.
871 (notice_new_inferior): Take a thread_info pointer instead of a
872 ptid_t. All callers adjusted.
873 (detach_inferior): Delete declaration.
874 (exit_inferior, exit_inferior_silent): Take an inferior pointer
875 instead of a pid. All callers adjusted.
876 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
877 (valid_gdb_inferior_id): Delete.
878 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
879 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
880 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
882 <inf>: ... this new field.
883 <step_ptid>: Delete, replaced by ...
884 <step_thread>: ... this new field.
885 (get_displaced_stepping_state): Take an inferior pointer instead
886 of a pid. All callers adjusted.
887 (displaced_step_in_progress_any_inferior): Adjust.
888 (displaced_step_in_progress_thread): Take a thread pointer instead
889 of a ptid_t. All callers adjusted.
890 (displaced_step_in_progress, add_displaced_stepping_state): Take
891 an inferior pointer instead of a pid. All callers adjusted.
892 (get_displaced_step_closure_by_addr): Adjust.
893 (remove_displaced_stepping_state): Take an inferior pointer
894 instead of a pid. All callers adjusted.
895 (displaced_step_prepare_throw, displaced_step_prepare)
896 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
897 All callers adjusted.
898 (start_step_over): Adjust.
899 (infrun_thread_ptid_changed): Remove bit updating ptids in the
900 displaced step queue.
901 (do_target_resume): Adjust.
902 (fetch_inferior_event): Use inferior_thread.
903 (context_switch, get_inferior_stop_soon): Take an
904 execution_control_state pointer instead of a ptid_t. All callers
906 (switch_to_thread_cleanup): Delete.
907 (stop_all_threads): Use scoped_restore_current_thread.
908 * inline-frame.c: Include "gdbthread.h".
909 (inline_state) <inline_state>: Take a thread pointer instead of a
910 ptid_t. All callers adjusted.
911 <ptid>: Delete, replaced by ...
912 <thread>: ... this new field.
913 (find_inline_frame_state): Take a thread pointer instead of a
914 ptid_t. All callers adjusted.
915 (skip_inline_frames, step_into_inline_frame)
916 (inline_skipped_frames, inline_skipped_symbol): Take a thread
917 pointer instead of a ptid_t. All callers adjusted.
918 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
919 (inline_skipped_frames, inline_skipped_symbol): Likewise.
920 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
922 * linux-nat.c (get_detach_signal): Likewise.
923 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
924 (thread_db_notice_clone): Adjust.
925 (thread_db_find_new_threads_silently)
926 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
927 a thread pointer instead of a ptid_t. All callers adjusted.
928 * mi/mi-cmd-var.c: Include "inferior.h".
929 (mi_cmd_var_update_iter): Update to use thread pointers.
930 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
932 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
934 (mi_output_running): ... this new function.
935 (mi_on_resume_1): Adjust to use it.
936 (mi_user_selected_context_changed): Adjust to use inferior_thread.
937 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
939 (interrupt_thread_callback): : Adjust to use thread and inferior
941 * proc-service.c: Include "gdbthread.h".
942 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
943 * progspace-and-thread.c: Include "inferior.h".
944 * progspace.c: Include "inferior.h".
945 * python/py-exitedevent.c (create_exited_event_object): Adjust to
946 hold a reference to an inferior_object.
947 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
949 * python/py-inferior.c (struct inferior_object): Give the type a
950 tag name instead of a typedef.
951 (python_on_normal_stop): No need to check if the current thread is
953 (inferior_to_inferior_object): Change return type to
954 inferior_object. All callers adjusted.
955 (find_thread_object): Delete, bits factored out to ...
956 (thread_to_thread_object): ... this new function.
957 * python/py-infthread.c (create_thread_object): Use
958 inferior_to_inferior_object.
959 (thpy_is_stopped): Use thread pointer directly.
960 (gdbpy_selected_thread): Use inferior_thread.
961 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
962 field, replaced with ...
963 <thread>: ... this new field. All users adjusted.
964 (btpy_insn_or_gap_new): Drop const.
965 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
967 * python/py-record.c: Include "gdbthread.h".
968 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
969 a ptid_t. All callers adjusted.
970 (gdbpy_current_recording): Use inferior_thread.
971 * python/py-record.h (recpy_record_object) <ptid>: Delete
972 field, replaced with ...
973 <thread>: ... this new field. All users adjusted.
974 (recpy_element_object) <ptid>: Delete
975 field, replaced with ...
976 <thread>: ... this new field. All users adjusted.
977 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
978 a ptid_t. All callers adjusted.
979 * python/py-threadevent.c: Include "gdbthread.h".
980 (get_event_thread): Use thread_to_thread_object.
981 * python/python-internal.h (struct inferior_object): Forward
983 (find_thread_object, find_inferior_object): Delete declarations.
984 (thread_to_thread_object, inferior_to_inferior_object): New
986 * record-btrace.c: Include "inferior.h".
987 (require_btrace_thread): Use inferior_thread.
988 (record_btrace_frame_sniffer)
989 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
990 (get_thread_current_frame): Use scoped_restore_current_thread and
992 (get_thread_current_frame): Use thread pointer directly.
993 (record_btrace_replay_at_breakpoint): Use thread's inferior
995 * record-full.c: Include "inferior.h".
996 * regcache.c: Include "gdbthread.h".
997 (get_thread_arch_regcache): Use the inferior's address space
999 (get_thread_regcache, registers_changed_thread): New.
1000 * regcache.h (get_thread_regcache(thread_info *thread)): New
1002 (registers_changed_thread): New.
1003 (remote_target) <remote_detach_1>: Swap order of parameters.
1004 (remote_add_thread): <remote_add_thread>: Return the new thread.
1005 (get_remote_thread_info(ptid_t)): New overload.
1006 (remote_target::remote_notice_new_inferior): Use thread pointers
1008 (remote_target::process_initial_stop_replies): Use
1009 thread_info::set_running.
1010 (remote_target::remote_detach_1, remote_target::detach)
1011 (extended_remote_target::detach): Adjust.
1012 * stack.c (frame_show_address): Use inferior_thread.
1013 * target-debug.h (target_debug_print_thread_info_pp): New.
1014 * target-delegates.c: Regenerate.
1015 * target.c (default_thread_address_space): Delete.
1016 (memory_xfer_partial_1): Use current_inferior.
1017 (target_detach): Use current_inferior.
1018 (target_thread_address_space): Delete.
1019 (generic_mourn_inferior): Use current_inferior.
1020 * target.h (struct target_ops) <thread_address_space>: Delete.
1021 (target_thread_address_space): Delete.
1022 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
1024 (delete_thread_1, delete_thread, delete_thread_silent): Take a
1025 thread pointer instead of a ptid_t. Adjust all callers.
1026 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
1027 (first_thread_of_process): Delete, replaced by ...
1028 (first_thread_of_inferior): ... this new function. All callers
1030 (any_thread_of_process): Rename to ...
1031 (any_thread_of_inferior): ... this, and take an inferior pointer.
1032 (any_live_thread_of_process): Rename to ...
1033 (any_live_thread_of_inferior): ... this, and take an inferior
1035 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1036 (value_in_thread_stack_temporaries)
1037 (get_last_thread_stack_temporary): Take a thread pointer instead
1038 of a ptid_t. Adjust all callers.
1039 (thread_info::set_running): New.
1040 (validate_registers_access): Use inferior_thread.
1041 (can_access_registers_ptid): Rename to ...
1042 (can_access_registers_thread): ... this, and take a thread
1044 (print_thread_info_1): Adjust to compare thread pointers instead
1046 (switch_to_no_thread, switch_to_thread): Make extern.
1047 (scoped_restore_current_thread::~scoped_restore_current_thread):
1048 Use m_thread pointer directly.
1049 (scoped_restore_current_thread::scoped_restore_current_thread):
1050 Use inferior_thread.
1051 (thread_command): Use thread pointer directly.
1052 (thread_num_make_value_helper): Use inferior_thread.
1053 * top.c (execute_command): Use inferior_thread.
1054 * tui/tui-interp.c: Include "inferior.h".
1055 * varobj.c (varobj_create): Use inferior_thread.
1056 (value_of_root_1): Use find_thread_global_id instead of
1057 global_thread_id_to_ptid.
1059 2018-06-21 Alan Hayward <alan.hayward@arm.com>
1061 * regcache.c (readable_regcache::read_part): Avoid memcpy when
1063 (regcache::write_part): Likewise.
1064 (readable_regcache::cooked_read_part): Update comment.
1065 (readable_regcache::cooked_write_part): Likewise.
1066 * regcache.h: (readable_regcache::read_part): Likewise.
1067 (regcache::write_part): Likewise.
1069 2018-06-21 Richard Bunt <richard.bunt@arm.com>
1070 Dirk Schubert <dirk.schubert@arm.com>
1072 * aarch64-linux-nat.c (post_attach): New.
1073 (aarch64_linux_nat_target::post_attach): Override post_attach to
1074 record the number of hardware debug registers.
1076 2018-06-20 Tom Tromey <tom@tromey.com>
1078 * python/py-param.c (add_setshow_generic): Make parameters const.
1079 (parmpy_init): Update.
1081 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1083 * regcache.h (regcache_cooked_read_ftype): Rename to...
1084 (register_read_ftype): ...this, change type to function_view.
1085 (class reg_buffer) <save>: Remove src parameter.
1086 (readonly_detached_regcache) <readonly_detached_regcache>: Make
1087 parameter non-const in first overload. Remove src parameter in
1089 * regcache.c (do_cooked_read): Remove.
1090 (readonly_detached_regcache::readonly_detached_regcache): Make
1091 parameter non-const, adjust call to other constructor.
1092 (reg_buffer::save): Remove src parameter.
1093 * frame.c (do_frame_register_read): Remove.
1094 (frame_save_as_regcache): Use lambda function.
1095 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1096 parameter to ppu2spu_data *.
1097 (ppu2spu_sniffer): Use lambda function.
1099 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1101 * record-full.c (record_full_target::insert_breakpoint): Remove
1102 "struct" keyword, add const.
1104 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1106 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1107 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1108 * configure.ac: Remove AC_PREREQ, add missing quoting.
1109 * gnulib/configure.ac: Modernize usage of
1110 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
1111 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1112 (AUTOMAKE_VERSION): Bump to 1.15.1.
1113 * configure: Re-generate.
1114 * config.in: Re-generate.
1115 * aclocal.m4: Re-generate.
1116 * gnulib/aclocal.m4: Re-generate.
1117 * gnulib/config.in: Re-generate.
1118 * gnulib/configure: Re-generate.
1119 * gnulib/import/Makefile.in: Re-generate.
1121 2018-06-19 Pedro Alves <palves@redhat.com>
1123 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1124 (lookup_minimal_symbol_by_pc_section): ... here with
1125 gdb_assert_not_reached added.
1127 2018-06-19 Pedro Alves <palves@redhat.com>
1129 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1130 parameter with a block parameter. Compare location's block symbol
1131 with the frame's block instead of addresses.
1132 (skip_inline_frames): Pass the current block instead of the
1133 frame's address. Break out as soon as we determine the frame
1134 should not be skipped.
1136 2018-06-18 Tom Tromey <tom@tromey.com>
1138 * solib-aix.c (solib_aix_get_section_offsets): Return
1140 (solib_aix_solib_create_inferior_hook): Update.
1142 2018-06-18 Tom Tromey <tom@tromey.com>
1144 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
1146 2018-06-18 Tom Tromey <tom@tromey.com>
1148 * solib-frv.c (frv_relocate_main_executable): Use
1150 * solib-dsbt.c (dsbt_relocate_main_executable): Use
1153 2018-06-18 Tom Tromey <tom@tromey.com>
1155 * objfiles.h (inhibit_section_map_updates): Update.
1156 (resume_section_map_updates, resume_section_map_updates_cleanup):
1158 * solib-svr4.c (svr4_handle_solib_event): Update.
1159 * objfiles.c (inhibit_section_map_updates): Return
1160 scoped_restore_tmpl<int>.
1161 (resume_section_map_updates, resume_section_map_updates_cleanup):
1164 2018-06-18 Tom Tromey <tom@tromey.com>
1166 * valprint.h (read_string): Update.
1167 * valprint.c (read_string): Change type of "buffer".
1168 (val_print_string): Update.
1169 * python/py-value.c (valpy_string): Update.
1170 * language.h (struct language_defn) <la_get_string>: Change
1172 (default_get_string, c_get_string): Update.
1173 * language.c (default_get_string): Change type of "buffer".
1174 * guile/scm-value.c (gdbscm_value_to_string): Update.
1175 * c-lang.c (c_get_string): Change type of "buffer".
1177 2018-06-18 Tom Tromey <tom@tromey.com>
1179 * ser-mingw.c (struct pipe_state_destroyer): New.
1180 (pipe_state_up): New typedef.
1181 (cleanup_pipe_state): Remove.
1182 (pipe_windows_open): Use pipe_state_up. Don't release argv.
1184 2018-06-18 Tom Tromey <tom@tromey.com>
1186 * rust-lang.h (rust_yyerror): Don't declare.
1187 * rust-lang.c (rust_language_defn): Update.
1188 * rust-exp.y (yyerror): Now static.
1189 * parse.c (parse_exp_in_context_1): Update.
1190 * p-lang.h (p_yyerror): Don't declare.
1191 * p-lang.c (p_language_defn): Update.
1192 * p-exp.y (yyerror): Now static.
1193 * opencl-lang.c (opencl_language_defn): Update.
1194 * objc-lang.c (objc_language_defn): Update.
1195 * m2-lang.h (m2_yyerror): Don't declare.
1196 * m2-lang.c (m2_language_defn): Update.
1197 * m2-exp.y (yyerror): Now static.
1198 * language.h (struct language_defn) <la_error>: Remove.
1199 * language.c (unk_lang_error): Remove.
1200 (unknown_language_defn, auto_language_defn): Remove.
1201 * go-lang.h (go_yyerror): Don't declare.
1202 * go-lang.c (go_language_defn): Update.
1203 * go-exp.y (yyerror): Now static.
1204 * f-lang.h (f_yyerror): Don't declare.
1205 * f-lang.c (f_language_defn): Update.
1206 * f-exp.y (yyerror): Now static.
1207 * d-lang.h (d_yyerror): Don't declare.
1208 * d-lang.c (d_language_defn): Update.
1209 * d-exp.y (yyerror): Now static.
1210 * c-lang.h (c_yyerror): Don't declare.
1211 * c-lang.c (c_language_defn, cplus_language_defn)
1212 (asm_language_defn, minimal_language_defn): Update.
1213 * c-exp.y (yyerror): Now static.
1214 * ada-lang.h (ada_yyerror): Don't declare.
1215 * ada-lang.c (ada_language_defn): Update.
1216 * ada-exp.y (yyerror): Now static.
1218 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1220 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1221 (store_sveregs_to_thread): Likewise.
1222 (aarch64_linux_fetch_inferior_registers): Check for SVE.
1223 (aarch64_linux_store_inferior_registers): Likewise.
1224 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1226 (aarch64_sve_regs_copy_to_regcache): Likewise.
1227 (aarch64_sve_regs_copy_from_regcache): Likewise.
1228 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1230 (aarch64_sve_regs_copy_to_regcache): Likewise.
1231 (aarch64_sve_regs_copy_from_regcache): Likewise.
1232 (sve_context): Structure from Linux headers.
1233 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1234 (SVE_SIG_ZREG_SIZE): Likewise.
1235 (SVE_SIG_PREG_SIZE): Likewise.
1236 (SVE_SIG_FFR_SIZE): Likewise.
1237 (SVE_SIG_REGS_OFFSET): Likewise.
1238 (SVE_SIG_ZREGS_OFFSET): Likewise.
1239 (SVE_SIG_ZREG_OFFSET): Likewise.
1240 (SVE_SIG_ZREGS_SIZE): Likewise.
1241 (SVE_SIG_PREGS_OFFSET): Likewise.
1242 (SVE_SIG_PREG_OFFSET): Likewise.
1243 (SVE_SIG_PREGS_SIZE): Likewise.
1244 (SVE_SIG_FFR_OFFSET): Likewise.
1245 (SVE_SIG_REGS_SIZE): Likewise.
1246 (SVE_SIG_CONTEXT_SIZE): Likewise.
1247 (SVE_PT_REGS_MASK): Likewise.
1248 (SVE_PT_REGS_FPSIMD): Likewise.
1249 (SVE_PT_REGS_SVE): Likewise.
1250 (SVE_PT_VL_INHERIT): Likewise.
1251 (SVE_PT_VL_ONEXEC): Likewise.
1252 (SVE_PT_REGS_OFFSET): Likewise.
1253 (SVE_PT_FPSIMD_OFFSET): Likewise.
1254 (SVE_PT_FPSIMD_SIZE): Likewise.
1255 (SVE_PT_SVE_ZREG_SIZE): Likewise.
1256 (SVE_PT_SVE_PREG_SIZE): Likewise.
1257 (SVE_PT_SVE_FFR_SIZE): Likewise.
1258 (SVE_PT_SVE_FPSR_SIZE): Likewise.
1259 (SVE_PT_SVE_FPCR_SIZE): Likewise.
1260 (__SVE_SIG_TO_PT): Likewise.
1261 (SVE_PT_SVE_OFFSET): Likewise.
1262 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1263 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1264 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1265 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1266 (SVE_PT_SVE_PREG_OFFSET): Likewise.
1267 (SVE_PT_SVE_PREGS_SIZE): Likewise.
1268 (SVE_PT_SVE_FFR_OFFSET): Likewise.
1269 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1270 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1271 (SVE_PT_SVE_SIZE): Likewise.
1272 (SVE_PT_SIZE): Likewise.
1273 (HAS_SVE_STATE): New define.
1275 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1277 * nat/aarch64-sve-linux-sigcontext.h: New file.
1278 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1280 (SVE_VQ_MIN): Likewise.
1281 (SVE_VQ_MAX): Likewise.
1282 (SVE_VL_MIN): Likewise.
1283 (SVE_VL_MAX): Likewise.
1284 (SVE_NUM_ZREGS): Likewise.
1285 (SVE_NUM_PREGS): Likewise.
1286 (sve_vl_valid): Likewise.
1287 (struct user_sve_header): Likewise.
1289 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
1290 Richard Bunt <Richard.Bunt@arm.com>
1292 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
1293 was requested by GDB.
1295 2018-06-15 Tom de Vries <tdevries@suse.de>
1297 * MAINTAINERS (Write After Approval): Add Tom de Vries.
1299 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
1301 * gnulib/update-gnulib.sh: Print expected versions of
1304 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
1306 * arch-utils.c (default_type_align): Use type_length_units.
1307 * gdbtypes.c (type_align): Use type_length_units.
1309 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1311 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
1312 of 'define' command.
1314 2018-06-14 Tom de Vries <tdevries@suse.de>
1317 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
1318 get_no_prettyformat_print_options.
1320 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
1322 * sparc-nat.h: Include target.h.
1323 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
1324 <fetch_registers>: Remove this argument in function call.
1325 <store_registers>: Remove this argument in function call, remove
1327 <low_forget_process>: Call sparc64_forget_process instead of
1328 sparc_forget_process.
1330 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1332 * procfs.c (_initialize_procfs): Use add_inf_child_target.
1333 (procfs_target::make_corefile_notes): Adjust to new
1334 target_read_alloc return type.
1336 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1337 Stephen Roberts <stephen.roberts@arm.com>
1340 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
1341 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
1342 Move should_notify_stop local into more inner scope.
1344 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1345 Stephen Roberts <stephen.roberts@arm.com>
1348 * infrun.c (resume_1): Add call to mark_async_event_handler.
1350 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1352 * infrun.c (do_target_wait): Change old version of $pc printed.
1354 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
1356 * dwarf2read.c (read_index_from_section): Rename to...
1357 (read_gdb_index_from_section): ... this, update all callers.
1358 (dwarf2_read_index): Rename to...
1359 (dwarf2_read_gdb_index): ... this, update all callers.
1361 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
1363 * gdb/hppa-linux-nat.c
1364 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
1365 hppa_linux_nat_target::fetch_registers.
1367 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1369 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
1370 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
1371 (AARCH64_DWARF_SVE_FFR): Likewise.
1372 (AARCH64_DWARF_SVE_P0): Likewise.
1373 (AARCH64_DWARF_SVE_Z0): Likewise.
1375 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1377 * common/common-regcache.h (raw_compare): New function.
1378 * regcache.c (regcache::raw_compare): Likewise.
1379 * regcache.h (regcache::raw_compare): New declaration.
1381 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1383 * common/common-regcache.h (reg_buffer_common): New structure.
1384 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
1385 (reg_buffer::raw_supply): Likewise.
1386 (reg_buffer::raw_supply_integer): Likewise.
1387 (reg_buffer::raw_supply_zeroed): Likewise.
1388 (reg_buffer::raw_collect): Likewise.
1389 (reg_buffer::raw_collect_integer): Likewise.
1390 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
1391 (reg_buffer::raw_supply): Likewise.
1392 (reg_buffer::raw_supply_integer): Likewise.
1393 (reg_buffer::raw_supply_zeroed): Likewise.
1394 (reg_buffer::raw_collect): Likewise.
1395 (reg_buffer::raw_collect_integer): Likewise.
1397 2018-06-10 Tom Tromey <tom@tromey.com>
1399 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
1400 (class remote_state) <stop_reply_queue>: Now std::vector.
1401 (remote_state::~remote_state)
1402 (remote_target::stop_reply_queue_length): Update.
1403 (struct queue_iter_param, remove_child_of_pending_fork)
1404 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
1405 (check_pending_event_prevents_wildcard_vcont_callback)
1406 (remove_stop_reply_for_inferior)
1407 (remove_stop_reply_of_remote_state)
1408 (remote_notif_remove_once_on_match)
1409 (stop_reply_match_ptid_and_ws)
1410 (remote_kill_child_of_pending_fork): Remove.
1411 (remote_target::remove_new_fork_children)
1412 (remote_target::check_pending_events_prevent_wildcard_vcont)
1413 (remote_target::discard_pending_stop_replies)
1414 (remote_target::discard_pending_stop_replies_in_queue)
1415 (remote_target::remote_notif_remove_queued_reply)
1416 (remote_target::queued_stop_reply)
1417 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
1418 (remote_target::wait, remote_target::kill_new_fork_children)
1419 (remote_target::async): Update.
1421 2018-06-10 Tom Tromey <tom@tromey.com>
1423 * record-full.c (record_full_arch_list_cleanups): Remove.
1424 (record_full_message): Use try/catch.
1425 (record_full_wait_cleanups): Remove.
1426 (record_full_wait_1): Use try/catch.
1427 (record_full_restore): Likewise.
1429 2018-06-10 Tom Tromey <tom@tromey.com>
1431 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
1432 declare VEC. Add constructor.
1433 <in_target_beneath>: Now bool.
1434 (record_full_breakpoints): Now a std::vector, static.
1435 (record_full_sync_record_breakpoints)
1436 (record_full_init_record_breakpoints)
1437 (record_full_target::insert_breakpoint)
1438 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
1440 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
1442 * dwarf2read.c (process_cu_includes): Remove struct keyword.
1443 * serial.c (serial_interface_lookup): Remove struct keyword.
1445 2018-06-10 Tom Tromey <tom@tromey.com>
1447 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
1449 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
1451 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
1453 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
1454 "beneath" as a method.
1455 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
1456 Use "beneath" as a method.
1458 2018-06-10 Tom Tromey <tom@tromey.com>
1460 * tracefile.c (struct trace_file_writer_deleter): New.
1461 <operator()>: Rename from trace_file_writer_xfree.
1462 (trace_file_writer_up): New typedef.
1463 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
1465 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1467 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
1468 <m_registers, m_register_status>: Change type to
1470 * regcache.c (reg_buffer::reg_buffer): Use new instead of
1473 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1475 * common/common-regcache.h (enum register_status): Add
1476 underlying type "signed char".
1477 * regcache.h (reg_buffer) <m_register_status>: Change type to
1479 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
1480 register_status instead of signed char.
1481 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
1482 (reg_buffer::get_register_status): Remove cast.
1483 (readable_regcache::raw_read): Remove cast.
1484 (readable_regcache::cooked_read): Remove cast.
1486 2018-06-09 Tom Tromey <tom@tromey.com>
1488 * source.c (reverse_search_command, forward_search_command): Use
1491 2018-06-09 Tom Tromey <tom@tromey.com>
1493 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
1494 (serial_ops_list): Now static, std::vector.
1495 (serial_interface_lookup, serial_add_interface): Update.
1497 2018-06-09 Tom Tromey <tom@tromey.com>
1499 * dwarf2read.c (process_cu_includes): Update.
1500 (process_full_comp_unit): Update.
1501 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
1504 2018-06-08 Paul Koning <paul_koning@dell.com>
1508 * python/python.c (do_start_initialization):
1509 Avoid call to internal Python API.
1510 (init__gdb_module): New function.
1512 2018-06-08 Gary Benson <gbenson@redhat.com>
1514 * linux-thread-db.c (valprint.h): New include.
1515 (struct check_thread_db_info): New structure.
1516 (check_thread_db_on_load, tdb_testinfo): New static globals.
1517 (check_thread_db, check_thread_db_callback): New functions.
1518 (try_thread_db_load_1): Run integrity checks if requested.
1519 (maintenance_check_libthread_db): New function.
1520 (_initialize_thread_db): Register "maint check libthread-db"
1521 and "maint set/show check-libthread-db".
1522 * NEWS: Mention the above new commands.
1524 2018-06-08 Tom Tromey <tom@tromey.com>
1526 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
1529 2018-06-08 Tom Tromey <tom@tromey.com>
1531 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
1533 2018-06-08 Tom Tromey <tom@tromey.com>
1535 * common/btrace-common.h (struct btrace_data): Add constructor,
1536 destructor, move assignment operator.
1537 <empty, clear, fini>: New methods.
1538 <format>: Initialize.
1539 (btrace_data_init, btrace_data_fini, btrace_data_clear)
1540 (btrace_data_empty): Don't declare.
1541 * common/btrace-common.c (btrace_data_init): Remove.
1542 (btrace_data::fini): Rename from btrace_data_fini.
1543 (btrace_data::empty): Rename from btrace_data_empty.
1544 (btrace_data::clear): Rename from btrace_data_clear. Return
1546 * btrace.h (make_cleanup_btrace_data): Don't declare.
1547 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
1548 (parse_xml_btrace): Update.
1549 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
1550 (maint_btrace_clear_packet_history_cmd): Update.
1552 2018-06-07 Pedro Alves <palves@redhat.com>
1554 * target.h (target_ops) <beneath>: Now a method. All references
1556 (class target_stack): New.
1557 * target.c (g_target_stack): New.
1558 (g_current_top_target): Delete.
1559 (current_top_target): Get the top target out of g_target_stack.
1560 (target_stack::push, target_stack::unpush): New.
1561 (push_target, unpush_target): Reimplement.
1562 (target_is_pushed): Reimplement in terms of g_target_stack.
1563 (target_ops::beneath, target_stack::find_beneath): New.
1565 2018-06-07 Pedro Alves <palves@redhat.com>
1567 * target.h (find_target_beneath): Delete declaration.
1568 * target.c (find_target_beneath): Delete definition.
1569 * aix-thread.c: All callers of find_target_beneath adjusted to
1570 call target_ops::beneath instead.
1571 * bsd-uthread.c: Likewise.
1572 * linux-thread-db.c: Likewise.
1573 * ravenscar-thread.c: Likewise.
1574 * sol-thread.c: Likewise.
1575 * spu-multiarch.c: Likewise.
1577 2018-06-07 Pedro Alves <palves@redhat.com>
1579 * target.h (target_ops) <beneath>: Now a method. All references
1581 (target_ops) <m_beneath>: New.
1582 * target.c (target_ops::beneath): New.
1583 * corelow.c: Adjust all references to target_ops::beneath.
1584 * linux-thread-db.c: Likewise.
1585 * make-target-delegates: Likewise.
1586 * record-btrace.c: Likewise.
1587 * record-full.c: Likewise.
1588 * remote.c: Likewise.
1589 * target.c: Likewise.
1590 * target-delegates.c: Regenerate.
1592 2018-06-07 Pedro Alves <palves@redhat.com>
1594 * target.h (target_stack): Delete.
1595 (current_top_target): Declare function.
1596 * target.c (target_stack): Delete.
1597 (g_current_top_target): New.
1598 (current_top_target): New function.
1599 * auxv.c: Use current_top_target instead of target_stack
1601 * avr-tdep.c: Likewise.
1602 * breakpoint.c: Likewise.
1603 * corefile.c: Likewise.
1604 * elfread.c: Likewise.
1606 * exceptions.c: Likewise.
1607 * frame.c: Likewise.
1608 * gdbarch-selftests.c: Likewise.
1609 * gnu-v3-abi.c: Likewise.
1610 * ia64-tdep.c: Likewise.
1611 * ia64-vms-tdep.c: Likewise.
1612 * infcall.c: Likewise.
1613 * infcmd.c: Likewise.
1614 * infrun.c: Likewise.
1615 * linespec.c: Likewise.
1616 * linux-tdep.c: Likewise.
1617 * minsyms.c: Likewise.
1618 * ppc-linux-nat.c: Likewise.
1619 * ppc-linux-tdep.c: Likewise.
1620 * procfs.c: Likewise.
1621 * regcache.c: Likewise.
1622 * remote.c: Likewise.
1623 * rs6000-tdep.c: Likewise.
1624 * s390-linux-nat.c: Likewise.
1625 * s390-tdep.c: Likewise.
1626 * solib-aix.c: Likewise.
1627 * solib-darwin.c: Likewise.
1628 * solib-dsbt.c: Likewise.
1629 * solib-spu.c: Likewise.
1630 * solib-svr4.c: Likewise.
1631 * solib-target.c: Likewise.
1632 * sparc-tdep.c: Likewise.
1633 * sparc64-tdep.c: Likewise.
1634 * spu-tdep.c: Likewise.
1635 * symfile.c: Likewise.
1636 * symtab.c: Likewise.
1637 * target-descriptions.c: Likewise.
1638 * target-memory.c: Likewise.
1639 * target.c: Likewise.
1640 * target.h: Likewise.
1641 * tracefile-tfile.c: Likewise.
1642 * tracepoint.c: Likewise.
1643 * valops.c: Likewise.
1644 * valprint.c: Likewise.
1645 * value.c: Likewise.
1646 * windows-tdep.c: Likewise.
1647 * mi/mi-main.c: Likewise.
1649 2018-06-07 Tom Tromey <tom@tromey.com>
1651 * valprint.h (build_address_symbolic): Declare.
1652 * printcmd.c (print_address_symbolic): Update.
1653 (build_address_symbolic): Change "name" and "filename" to
1655 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
1657 * defs.h (build_address_symbolic): Remove declaration.
1659 2018-06-07 Alan Hayward <alan.hayward@arm.com>
1661 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
1662 (aarch64_vnv_type): Add function.
1663 (aarch64_pseudo_register_name): Add V regs for SVE.
1664 (aarch64_pseudo_register_type): Likewise.
1665 (aarch64_pseudo_register_reggroup_p): Likewise.
1666 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
1667 (aarch64_pseudo_read_value): Add V regs for SVE.
1668 (aarch64_pseudo_write_2): Use V0 offset for SVE
1669 (aarch64_pseudo_write): Add V regs for SVE.
1670 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
1672 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
1674 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
1675 (sve_vl_from_vq): Likewise.
1677 2018-06-05 Tom Tromey <tom@tromey.com>
1679 * cli/cli-cmds.c (show_version): Update.
1680 * top.c (print_gdb_version): Add "interactive" parameter.
1682 * main.c (captured_main_1): Update.
1683 * top.h (print_gdb_version): Add "interactive" parameter and a
1686 2018-06-05 David Malcolm <dmalcolm@redhat.com>
1688 * common/enum-flags.h: Add trailing semicolon to example in
1691 2018-06-05 Tom Tromey <tom@tromey.com>
1694 * NEWS: Add entry about pager.
1695 * utils.c (pagination_disabled_for_command): New global.
1696 (prompt_for_continue): Allow "c" response to prompt.
1697 (reinitialize_more_filter): Clear
1698 pagination_disabled_for_command.
1699 (fputs_maybe_filtered): Check pagination_disabled_for_command.
1701 2018-06-04 Tom Tromey <tom@tromey.com>
1703 * ada-lang.h (ada_lookup_symbol_list): Update.
1704 * ada-lang.c (resolve_subexp): Update.
1705 (symbols_are_identical_enums): Change type of syms. Remove nsyms
1707 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
1708 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
1709 results parameter to std::vector.
1710 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
1712 * ada-exp.y (block_lookup): Update.
1713 (select_possible_type_sym): Change type of syms. Remove nsyms
1715 (write_var_or_type, write_name_assoc): Update.
1717 2018-06-04 Joel Brobecker <brobecker@adacore.com>
1719 * windows-nat.c (windows_nat_target::xfer_partial): Return
1720 TARGET_XFER_E_IO if we need to delegate to the target beneath
1721 but BENEATH is NULL.
1723 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
1725 * Makefile.in (config.status): Add configure.nat as a
1728 2018-06-04 Tom Tromey <tom@tromey.com>
1730 * cp-name-parser.y (cpname_state): Add method declarations.
1731 (HANDLE_QUAL): Update.
1732 (cpname_state::d_grab, cpname_state::fill_comp)
1733 (cpname_state::make_operator, cpname_state::make_dtor)
1734 (cpname_state::make_builtin_type, cpname_state::make_name)
1735 (cpname_state::d_qualify, cpname_state::d_int_type)
1736 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
1737 (%union): Move earlier.
1739 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1741 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
1743 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1745 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
1746 (aarch64_pseudo_write_1): Likewise.
1747 (aarch64_pseudo_read_value): Use helper.
1748 (aarch64_pseudo_write): Likewise.
1750 2018-06-04 Pedro Alves <palves@redhat.com>
1752 * darwin-nat.c (darwin_ops): Delete.
1753 (darwin_attach_pid): Use get_native_target.
1755 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1757 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
1758 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
1760 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1762 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
1763 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
1764 (aarch64_gdbarch_init): Check for SVE.
1765 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
1767 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1769 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
1770 * aarch64-tdep.h (aarch64_read_description): Likewise.
1771 * arch/aarch64.c (aarch64_create_target_description): Likewise.
1772 * arch/aarch64.h (aarch64_create_target_description): Likewise.
1773 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
1774 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
1775 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
1777 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
1779 * value.c (value_fetch_lazy_bitfield): New.
1780 (value_fetch_lazy_memory): New.
1781 (value_fetch_lazy_register): New.
1782 (value_fetch_lazy): Factor out to smaller functions.
1784 2018-06-01 Tom Tromey <tom@tromey.com>
1786 * cp-name-parser.y (backslashable, represented): Now const.
1788 2018-06-01 Tom Tromey <tom@tromey.com>
1790 * cp-name-parser.y: Include parser-defs.h.
1791 (parser_fprintf): Remove declaration.
1793 2018-06-01 Tom Tromey <tom@tromey.com>
1795 * cp-name-parser.y: Use %pure-parser, %lex-param, and
1797 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
1798 (global_result): Remove globals.
1799 (struct cpname_state): New.
1800 (yyparse): Don't declare.
1801 (yylex, yyerror): Move declarations after %union.
1802 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
1803 (make_name): Add state parameter.
1805 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
1807 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
1809 (yylex): Add lvalp, state parameters.
1810 (yyerror): Add state parameter.
1811 (cp_demangled_name_to_comp): Update.
1813 2018-06-01 Tom Tromey <tom@tromey.com>
1815 * cp-name-parser.y (parser_fprintf): Declare.
1816 (GDB_YY_REMAP_PREFIX): Define.
1817 Include yy-remap.h. Don't redefine yy* identifiers.
1819 2018-06-01 Tom Tromey <tom@tromey.com>
1821 * python/py-type.c (typy_legacy_template_argument): Update.
1822 * cp-support.h (cp_demangled_name_to_comp): Update.
1823 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
1824 parameter to be a "std::string *".
1827 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1829 * ada-lex.l: Include "diagnostics.h" instead of
1830 "common/diagnostics.h".
1831 * unittests/environ-selftests.c: Likewise.
1832 * common/diagnostics.h: Moved to ../include.
1834 2018-06-01 Joel Brobecker <brobecker@adacore.com>
1836 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
1837 to language_mode_manual while calling breakpoint_re_set_one.
1839 2018-06-01 Tom Tromey <tom@tromey.com>
1841 * valops.c (value_cast_structs, destructor_name_p): Update.
1842 * symtab.c (gdb_mangle_name): Update.
1843 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
1845 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
1846 (pascal_object_print_value_fields, pascal_object_print_value):
1848 * p-typeprint.c (pascal_type_print_derivation_info): Update.
1849 * linespec.c (find_methods): Update.
1850 * gdbtypes.h (type_name_no_tag): Remove.
1851 (type_name_or_error): Rename from type_name_no_tag_or_error.
1852 * gdbtypes.c (type_name_no_tag): Remove.
1853 (type_name_or_error): Rename from type_name_no_tag_or_error.
1854 (lookup_struct_elt_type, check_typedef): Update.
1855 * expprint.c (print_subexp_standard): Update.
1856 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
1857 * d-namespace.c (d_lookup_nested_symbol): Update.
1858 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
1859 (cp_print_class_member): Update.
1860 * cp-namespace.c (cp_lookup_nested_symbol): Update.
1861 * completer.c (add_struct_fields): Update.
1862 * c-typeprint.c (cp_type_print_derivation_info)
1863 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
1865 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
1866 (ada_prefer_type, ada_is_exception_sym): Update.
1868 2018-06-01 Tom Tromey <tom@tromey.com>
1870 * valops.c (enum_constant_from_type, value_namespace_elt)
1871 (value_maybe_namespace_elt): Update.
1872 * valarith.c (find_size_for_pointer_math): Update.
1873 * target-descriptions.c (make_gdb_type): Update.
1874 * symmisc.c (print_symbol): Update.
1875 * stabsread.c (define_symbol, read_type)
1876 (complain_about_struct_wipeout, add_undefined_type)
1877 (cleanup_undefined_types_1): Update.
1878 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
1879 (rust_range_type_p, val_print_struct, rust_print_struct_def)
1880 (rust_internal_print_type, rust_composite_type)
1881 (rust_evaluate_funcall, rust_evaluate_subexp)
1882 (rust_inclusive_range_type_p): Update.
1883 * python/py-type.c (typy_get_tag): Update.
1884 * p-typeprint.c (pascal_type_print_base): Update.
1885 * mdebugread.c (parse_symbol, parse_type): Update.
1886 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
1888 * guile/scm-type.c (gdbscm_type_tag): Update.
1889 * go-lang.c (sixg_string_p): Update.
1890 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
1892 * gdbtypes.h (struct main_type) <tag_name>: Remove.
1893 (TYPE_TAG_NAME): Remove.
1894 * gdbtypes.c (type_name_no_tag): Simplify.
1895 (check_typedef, check_types_equal, recursive_dump_type)
1896 (copy_type_recursive, arch_composite_type): Update.
1897 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
1898 in summary mode when needed.
1899 * eval.c (evaluate_funcall): Update.
1900 * dwarf2read.c (fixup_go_packaging, read_structure_type)
1901 (process_structure_scope, read_enumeration_type)
1902 (read_namespace_type, read_module_type, determine_prefix): Update.
1903 * cp-support.c (inspect_type): Update.
1904 * coffread.c (process_coff_symbol, decode_base_type): Update.
1905 * c-varobj.c (c_is_path_expr_parent): Update.
1906 * c-typeprint.c (c_type_print_base_struct_union): Update.
1907 (c_type_print_base_1): Update. Print struct/class/union/enum in
1908 summary when using C language.
1909 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
1910 (gen_maybe_namespace_elt): Update.
1911 * ada-lang.c (ada_type_name): Simplify.
1912 (empty_record, ada_template_to_fixed_record_type_1)
1913 (template_to_static_fixed_type)
1914 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
1916 2018-06-01 Tom Tromey <tom@tromey.com>
1918 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
1920 * c-typeprint.c (c_print_type_1): Add "language" parameter.
1921 (c_print_type): Update.
1922 (c_print_type): New overload.
1923 (c_type_print_varspec_prefix, c_type_print_args)
1924 (c_type_print_varspec_suffix, c_print_type_no_offsets)
1925 (c_type_print_base_struct_union, c_type_print_base_1)
1926 (cp_type_print_method_args): Add "language" parameter.
1927 (c_type_print_base): Update.
1928 * c-lang.h (c_print_type): Add new overload.
1930 2018-06-01 Tom Tromey <tom@tromey.com>
1932 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
1933 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
1935 2018-06-01 Alan Hayward <alan.hayward@arm.com>
1937 * aarch64-tdep.c (aarch64_sve_register_names): New const
1939 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
1940 (AARCH64_SVE_Z_REGS_NUM): New define.
1941 (AARCH64_SVE_P_REGS_NUM): Likewise.
1942 (AARCH64_SVE_NUM_REGS): Likewise.
1944 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
1946 * nat/linux-ptrace.h [__alpha__]
1947 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
1950 2018-05-31 Maciej W. Rozycki <macro@mips.com>
1952 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
1953 the endianness selected.
1954 * NEWS: Document `set endian auto' mode operation update.
1956 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1958 * Makefile.in: Add new header.
1959 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
1960 (sve_vl_from_vg): Likewise.
1961 (sve_vq_from_vl): Likewise.
1962 (sve_vl_from_vq): Likewise.
1963 (sve_vq_from_vg): Likewise.
1964 (sve_vg_from_vq): Likewise.
1965 * configure.nat: Add new c file.
1966 * nat/aarch64-sve-linux-ptrace.c: New file.
1967 * nat/aarch64-sve-linux-ptrace.h: New file.
1969 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1971 * aarch64-linux-nat.c (aarch64_linux_read_description):
1973 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1975 * aarch64-tdep.c (tdesc_aarch64_list): Add.
1976 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
1977 (aarch64_gdbarch_init): Add parmeter zero.
1978 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
1979 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
1980 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
1982 * doc/gdb.texinfo: Describe SVE feature
1983 * features/aarch64-sve.c: New file.
1985 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
1988 * gdbarch.sh (significant_addr_bit): Default to zero when
1989 not set by target architecture.
1990 * gdbarch.c: Re-generated.
1991 * utils.c (address_significant): Update.
1993 2018-05-30 Joel Brobecker <brobecker@adacore.com>
1995 * stack.c (func_command): Remove trailing newline in call to error.
1997 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1999 * regcache.h (regcache_raw_collect): Remove, update callers to
2000 use regcache::raw_collect.
2001 * regcache.c (regcache_raw_collect): Remove.
2003 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2005 * regcache.h (regcache_raw_supply): Remove, update callers to
2006 use detached_regcache::raw_supply.
2007 * regcache.c (regcache_raw_supply): Remove.
2009 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2011 * regcache.h (regcache_cooked_write_part): Remove, update
2012 callers to use regcache::cooked_write_part.
2013 * regcache.c (regcache_cooked_write_part): Remove.
2015 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2017 * regcache.h (regcache_cooked_read_part): Remove, update callers
2018 to use readable_regcache::cooked_read_part.
2019 * regcache.c (regcache_cooked_read_part): Remove.
2021 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2023 * regcache.h (regcache_cooked_read_value): Remove, update
2024 callers to use readable_regcache::cooked_read_value.
2025 * regcache.c (regcache_cooked_read_value): Remove.
2027 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2029 * regcache.h (regcache_cooked_write): Remove, update callers to
2030 use regcache::cooked_write.
2031 * regcache.c (regcache_cooked_write): Remove.
2033 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2035 * regcache.h (regcache_invalidate): Remove, update callers to
2036 use detached_regcache::invalidate instead.
2037 * regcache.c (regcache_invalidate): Remove.
2039 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2041 * regcache.h (regcache_raw_write_part): Remove, update callers
2042 to use regcache::raw_write_part instead.
2043 * regcache.c (regcache_raw_write_part): Remove.
2045 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2047 * regcache.h (regcache_raw_read_part): Remove, update callers to
2048 use readable_regcache::raw_read_part instead.
2049 * regcache.c (regcache_raw_read_part): Remove.
2051 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2053 * regcache.h (regcache_cooked_read): Remove, update callers to
2054 use readable_regcache::cooked_read instead.
2055 * regcache.c (regcache_cooked_read): Remove.
2057 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2059 * regcache.h (regcache_raw_write): Remove, update callers to use
2060 regcache::raw_write instead.
2061 * regcache.c (regcache_raw_write): Remove.
2063 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2065 * regcache.h (regcache_raw_read): Remove, update callers to use
2066 readable_regcache::raw_read instead.
2067 * regcache.c (regcache_raw_read): Remove.
2069 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2071 * regcache.h (regcache_raw_update): Remove, update callers to
2072 use readable_regcache::raw_update instead.
2073 * regcache.c (regcache_raw_update): Remove.
2075 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2077 * regcache.h (regcache_register_status): Remove, update callers
2078 to use reg_buffer::get_register_status directly instead.
2079 * regcache.c (regcache_register_status): Remove.
2081 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2083 * regcache.h (regcache_get_ptid): Remove, update all callers to
2084 call regcache::ptid instead.
2085 * regcache.c (regcache_get_ptid): Remove.
2087 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2089 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2091 2018-05-30 Pedro Alves <palves@redhat.com>
2093 * common/common-exceptions.h (exception_rethrow): Use
2096 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
2098 * breakpoint.c (print_solib_event, check_status_catch_solib):
2099 Remove struct keyword in range-based for loops.
2100 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2101 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2103 * linespec.c (find_superclass_methods, search_minsyms_for_name):
2105 * symfile.c (addr_info_make_relative): Likewise.
2106 * thread.c (value_in_thread_stack_temporaries): Likewise.
2108 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
2111 * valops.c (value_struct_elt_for_reference): Call check_typedef on
2112 aggregate type to get its real type before accessing it.
2114 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
2116 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2117 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2118 * coff-pe-read.c (add_pe_forwarded_sym): Replace
2119 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2120 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2121 * jit.c (jit_breakpoint_re_set_internal): Likewise.
2122 * printcmd.c (info_address_command): Likewise.
2124 2018-05-29 Tom Tromey <tom@tromey.com>
2126 * windows-nat.c (handle_exception): Update fall-through comment.
2128 2018-05-29 Tom Tromey <tom@tromey.com>
2130 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
2131 (struct program_space) <added_solibs>: Now a std::vector.
2132 * breakpoint.c (print_solib_event): Update.
2133 (check_status_catch_solib): Update.
2134 * progspace.c (clear_program_space_solib_cache): Update.
2135 * solib.c (update_solib_list): Update.
2137 2018-05-29 Tom Tromey <tom@tromey.com>
2139 * python/py-type.c (typy_richcompare): Update.
2140 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
2141 * gdbtypes.h (types_deeply_equal): Return bool.
2142 (types_equal): Likewise.
2143 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
2145 (check_types_equal): Change worklist to std::vector. Return
2147 (struct type_equality_entry): Add constructor.
2148 (compare_maybe_null_strings): Return bool.
2149 (check_types_worklist): Return bool. Change worklist to
2151 (types_deeply_equal): Use std::vector.
2152 (types_equal): Return bool.
2153 (compare_maybe_null_strings): Simplify.
2155 2018-05-29 Tom Tromey <tom@tromey.com>
2157 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
2159 2018-05-29 Tom Tromey <tom@tromey.com>
2161 * objc-lang.h: Don't include cp-support.h.
2162 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
2165 2018-05-27 Tom Tromey <tom@tromey.com>
2167 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
2169 2018-05-25 Tom Tromey <tom@tromey.com>
2171 * value.c (value::location): Initialize.
2173 2018-05-25 Tom Tromey <tom@tromey.com>
2175 * dbxread.c (init_bincl_list): Remove.
2176 (bincl_list): Now a std::vector.
2177 (bincls_allocated, next_bincl): Remove.
2178 (free_bincl_list, do_free_bincl_list_cleanup)
2179 (make_cleanup_free_bincl_list): Remove.
2180 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2182 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2183 (struct header_file_location): Add constructor.
2184 (add_bincl_to_list): Remove.
2186 2018-05-25 Tom Tromey <tom@tromey.com>
2188 * tui/tui.c (tui_enable): Update.
2189 * mi/mi-interp.c (mi_interp::init): Update.
2190 * interps.h (class interp) <name>: New method.
2191 <m_name>: Rename from name.
2192 (~scoped_restore_interp): Update.
2193 * interps.c (interp::interp): Update.
2194 (interp_add, interp_set, interp_lookup_existing)
2195 (current_interp_named_p): Update.
2197 2018-05-25 Tom Tromey <tom@tromey.com>
2199 * interps.c (interp_name): Remove.
2200 * mi/mi-interp.c (mi_interp::init): Update.
2201 * interps.h (interp_name): Remove.
2202 (~scoped_restore_interp): Update.
2203 * tui/tui.c (tui_enable): Update.
2205 2018-05-25 Tom Tromey <tom@tromey.com>
2207 * utils.c (fputs_maybe_filtered): Update.
2208 * linespec.c (decode_line_full): Update.
2209 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2210 (mi_print_breakpoint_for_event, mi_solib_loaded)
2211 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2212 (mi_user_selected_context_changed): Update.
2213 * mi/mi-main.c (mi_execute_command): Update.
2214 * cli/cli-script.c (execute_control_command): Update.
2215 * python/python.c (execute_gdb_command): Update.
2216 * solib.c (info_sharedlibrary_command): Update.
2217 * interps.c (interp_ui_out): Remove.
2218 * interps.h (interp_ui_out): Remove.
2220 2018-05-25 Tom Tromey <tom@tromey.com>
2222 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2223 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2224 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2226 2018-05-25 Tom Tromey <tom@tromey.com>
2228 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2229 * interps.c (interp_exec): Use scoped_restore.
2231 2018-05-25 Tom Tromey <tom@tromey.com>
2233 * remote.c (remote_target::remote_file_get): Use
2235 (remote_target::remote_file_put): Likewise.
2237 2018-05-25 Tom Tromey <tom@tromey.com>
2239 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2241 (get_pe_section_index, add_pe_exported_sym): Update.
2242 (read_pe_exported_syms): Use gdb::def_vector.
2244 2018-05-25 Tom Tromey <tom@tromey.com>
2246 * frame.c (remove_prev_frame): Remove.
2247 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2249 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2251 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2253 * mips-linux-nat.c (supply_fpregset): Always call
2254 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2255 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2256 `mips_fill_fpregset'.
2257 * mips-linux-tdep.c (mips_supply_fpregset)
2258 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2259 (mips_fill_fpregset_wrapper): Remove functions.
2260 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2261 (mips_linux_fpregset): Remove variable.
2262 (mips_linux_iterate_over_regset_sections): Use
2263 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2264 (mips_linux_o32_sigframe_init): Remove comment.
2266 2018-05-25 Pedro Alves <palves@redhat.com>
2268 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2269 (struct readahead_cache, struct packet_reg, struct
2270 remote_arch_state, class remote_state): Move higher up in the
2272 (remote_target::m_remote_state): Now an object instead of a pointer.
2273 (remote_target::get_remote_state): Adjust.
2275 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2277 * stack.c (select_and_print_frame): Delete.
2278 (struct function_bounds): Move struct within function.
2279 (func_command): Most content moved into new function
2280 find_frame_for_function, use new function, print result, add
2282 (find_frame_for_function): New function, now returns a result.
2284 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2286 * stack.c (iterate_over_block_arg_vars): Fix comment.
2287 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2289 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2293 (scoped_restore_selected_frame::scoped_restore_selected_frame):
2295 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
2297 * frame.h (class scoped_restore_selected_frame): New class.
2298 * stack.c (print_frame_local_vars): Remove catching and rethrowing
2299 of any exception, use scoped_restore_selected_frame to restore the
2302 2018-05-24 Pedro Alves <palves@redhat.com>
2304 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
2307 2018-05-23 Tom Tromey <tom@tromey.com>
2309 * complaints.c (struct complaints): Remove.
2310 (symfile_complaint_book): Remove.
2311 (series): New global.
2312 (complaint_internal): Update.
2313 (clear_complaints): Update.
2315 2018-05-23 Tom Tromey <tom@tromey.com>
2317 * complaints.c (counters): New global.
2318 (struct complain): Remove.
2319 (struct complaints) <root>: Remove.
2320 (complaint_sentinel): Remove.
2321 (symfile_complaint_book): Update.
2322 (find_complaint) Remove.
2323 (complaint_internal, clear_complaints): Update.
2325 2018-05-23 Tom Tromey <tom@tromey.com>
2327 * complaints.c (struct complain) <file, line>: Remove.
2328 (find_complaint): Remove file, line parameters.
2329 (complaint_internal): Update.
2331 2018-05-23 Tom Tromey <tom@tromey.com>
2333 * complaints.c (vcomplaint): Remove.
2334 (complaint_internal) Merge in contents of vcomplaint.
2336 2018-05-23 Tom Tromey <tom@tromey.com>
2338 * complaints.c (struct complaints) <explanation>: Remove.
2339 (symfile_explanations): Remove.
2340 (symfile_complaint_book): Update.
2341 (vcomplaint): Update.
2342 (struct explanation): Remove.
2344 2018-05-23 Tom Tromey <tom@tromey.com>
2346 * complaints.c (symfile_complaints): Remove.
2347 (complaint_internal): Remove "complaints" parameter.
2348 (clear_complaints, vcomplaint): Remove "c" parameter.
2349 (get_complaints): Remove.
2350 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
2351 (dwarf2_debug_line_missing_file_complaint)
2352 (dwarf2_debug_line_missing_end_sequence_complaint)
2353 (dwarf2_complex_location_expr_complaint)
2354 (dwarf2_const_value_length_mismatch_complaint)
2355 (dwarf2_section_buffer_overflow_complaint)
2356 (dwarf2_macro_malformed_definition_complaint)
2357 (dwarf2_invalid_attrib_class_complaint)
2358 (create_addrmap_from_index, dw2_symtab_iter_next)
2359 (dw2_expand_marked_cus)
2360 (dw2_debug_names_iterator::find_vec_in_debug_names)
2361 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
2362 (create_debug_type_hash_table, init_cutu_and_read_dies)
2363 (partial_die_parent_scope, add_partial_enumeration)
2364 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
2365 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
2366 (read_import_statement, read_file_scope, create_dwo_cu_reader)
2367 (create_cus_hash_table, create_dwp_hash_table)
2368 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
2369 (dwarf2_rnglists_process, dwarf2_ranges_process)
2370 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
2371 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
2372 (handle_struct_member_die, process_structure_scope)
2373 (read_array_type, read_common_block, read_module_type)
2374 (read_tag_pointer_type, read_typedef, read_base_type)
2375 (read_subrange_type, load_partial_dies, partial_die_info::read)
2376 (partial_die_info::read, partial_die_info::read)
2377 (partial_die_info::read, read_checked_initial_length_and_offset)
2378 (dwarf2_string_attr, read_formatted_entries)
2379 (dwarf_decode_line_header)
2380 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2381 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
2382 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
2383 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2384 (get_signatured_type, get_DW_AT_signature_type)
2385 (decode_locdesc, file_file_name, consume_improper_spaces)
2386 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
2387 (dwarf_decode_macro_bytes, dwarf_decode_macros)
2388 (dwarf2_symbol_mark_computed, set_die_type)
2389 (read_attribute_value): Update.
2390 * stap-probe.c (handle_stap_probe, get_stap_base_address):
2392 * dbxread.c (unknown_symtype_complaint)
2393 (lbrac_mismatch_complaint, repeated_header_complaint)
2394 (set_namestring, function_outside_compilation_unit_complaint)
2395 (read_dbx_symtab, process_one_symbol): Update.
2396 * gdbtypes.c (stub_noname_complaint): Update.
2397 * windows-nat.c (handle_unload_dll): Update.
2398 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
2399 (decode_base_type): Update.
2400 * xcoffread.c (bf_notfound_complaint, ef_complaint)
2401 (eb_complaint, record_include_begin, record_include_end)
2402 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
2403 (process_xcoff_symbol, read_symbol)
2404 (function_outside_compilation_unit_complaint)
2405 (scan_xcoff_symtab): Update.
2406 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
2407 * buildsym.c (finish_block_internal, make_blockvector)
2408 (end_symtab_get_static_block, augment_type_symtab): Update.
2409 * dtrace-probe.c (dtrace_process_dof)
2410 (dtrace_static_probe_ops::get_probes): Update.
2411 * complaints.h (struct complaint): Don't declare.
2412 (symfile_complaints): Remove.
2413 (complaint_internal): Remove "complaints" parameter.
2414 (complaint): Likewise.
2415 (clear_complaints): Likewise.
2416 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2417 (reread_symbols): Update.
2418 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2419 (dwarf2_frame_cache, decode_frame_entry): Update.
2420 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
2421 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2422 (info_selectors_command): Update.
2423 * macrotab.c (macro_include, check_for_redefinition)
2424 (macro_undef): Update.
2425 * objfiles.c (filter_overlapping_sections): Update.
2426 * stabsread.c (invalid_cpp_abbrev_complaint)
2427 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
2428 (define_symbol, error_type, read_type, rs6000_builtin_type)
2429 (stabs_method_name_from_physname, read_member_functions)
2430 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
2431 (attach_fields_to_type, complain_about_struct_wipeout)
2432 (read_range_type, read_args, common_block_start)
2433 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
2435 * mdebugread.c (index_complaint, unknown_ext_complaint)
2436 (basic_type_complaint, bad_tag_guess_complaint)
2437 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
2438 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
2439 (parse_procedure, parse_lines)
2440 (function_outside_compilation_unit_complaint)
2441 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
2442 (bad_tag_guess_complaint, reg_value_complaint): Update.
2443 * cp-support.c (demangled_name_complaint): Update.
2444 * macroscope.c (sal_macro_scope): Update.
2445 * dwarf-index-write.c (class debug_names): Update.
2447 2018-05-23 Tom Tromey <tom@tromey.com>
2449 * complaints.c (clear_complaints): Remove "noisy" parameter.
2450 * complaints.h (clear_complaints): Update.
2451 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2452 (reread_symbols): Update.
2454 2018-05-23 Tom Tromey <tom@tromey.com>
2456 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
2458 (vcomplaint, clear_complaints): Update.
2459 (symfile_explanations): Remove some messages.
2461 2018-05-23 Tom Tromey <tom@tromey.com>
2463 * complaints.c (internal_complaint): Remove.
2464 * complaints.h (internal_complaint): Remove.
2466 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2468 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
2470 2018-05-22 Pedro Alves <palves@redhat.com>
2472 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
2473 (remote_fileio_badfd, remote_fileio_return_errno)
2474 (remote_fileio_return_success, remote_fileio_func_open)
2475 (remote_fileio_func_open, remote_fileio_func_close)
2476 (remote_fileio_func_read, remote_fileio_func_write)
2477 (remote_fileio_func_lseek, remote_fileio_func_rename)
2478 (remote_fileio_func_unlink, remote_fileio_func_stat)
2479 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
2480 (remote_fileio_func_isatty, remote_fileio_func_system): Add
2481 remote_target parameter.
2482 (remote_fio_func_map) <func>: Add remote_target parameter.
2483 (do_remote_fileio_request, remote_fileio_request):
2484 * remote-fileio.h (remote_fileio_request):
2485 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
2486 remote_target parameter.
2487 (remote_notif_process, handle_notification): Adjust to pass down
2489 (remote_notif_state_allocate): Add remote_target parameter. Save
2491 * remote-notif.h (struct remote_target): Forward declare.
2492 (struct notif_client) <parse, ack, can_get_pending_events>: Add
2493 remote_target parameter.
2494 (struct remote_notif_state) <remote>: New field.
2495 (remote_notif_ack, remote_notif_parse): Add remote_target
2497 (remote_notif_state_allocate, remote_notif_state_allocate): Add
2498 remote_target parameter.
2499 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
2500 (threads_listing_context, rmt_thread_action, protocol_feature)
2501 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
2502 (packet_result, struct threads_listing_context, remote_state):
2503 Move definitions and declarations higher up.
2504 (remote_target) <~remote_target>: Declare.
2505 (remote_download_command_source, remote_file_put, remote_file_get)
2506 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
2507 (remote_hostio_pread_vFile, remote_hostio_send_command)
2508 (remote_hostio_set_filesystem, remote_hostio_open)
2509 (remote_hostio_close, remote_hostio_unlink, remote_state)
2510 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
2511 (get_memory_write_packet_size, get_memory_read_packet_size)
2512 (append_pending_thread_resumptions, remote_detach_1)
2513 (append_resumption, remote_resume_with_vcont)
2514 (add_current_inferior_and_thread, wait_ns, wait_as)
2515 (process_stop_reply, remote_notice_new_inferior)
2516 (process_initial_stop_replies, remote_add_thread)
2517 (btrace_sync_conf, remote_btrace_maybe_reopen)
2518 (remove_new_fork_children, kill_new_fork_children)
2519 (discard_pending_stop_replies, stop_reply_queue_length)
2520 (check_pending_events_prevent_wildcard_vcont)
2521 (discard_pending_stop_replies_in_queue, stop_reply)
2522 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
2523 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
2524 (remote_interrupt_as, remote_interrupt_ns)
2525 (remote_get_noisy_reply, remote_query_attached)
2526 (remote_add_inferior, remote_current_thread, get_current_thread)
2527 (set_thread, set_general_thread, set_continue_thread)
2528 (set_general_process, write_ptid)
2529 (remote_unpack_thread_info_response, remote_get_threadinfo)
2530 (parse_threadlist_response, remote_get_threadlist)
2531 (remote_threadlist_iterator, remote_get_threads_with_ql)
2532 (remote_get_threads_with_qxfer)
2533 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
2534 (get_offsets, remote_check_symbols, remote_supported_packet)
2535 (remote_query_supported, remote_packet_size)
2536 (remote_serial_quit_handler, remote_detach_pid)
2537 (remote_vcont_probe, remote_resume_with_hc)
2538 (send_interrupt_sequence, interrupt_query)
2539 (remote_notif_get_pending_events, fetch_register_using_p)
2540 (send_g_packet, process_g_packet, fetch_registers_using_g)
2541 (store_register_using_P, store_registers_using_G)
2542 (set_remote_traceframe, check_binary_download)
2543 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
2544 (remote_xfer_live_readonly_partial, remote_read_bytes)
2545 (remote_send_printf, remote_flash_write, readchar)
2546 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
2547 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
2548 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
2549 (extended_remote_disable_randomization, extended_remote_run)
2550 (send_environment_packet, extended_remote_environment_support)
2551 (extended_remote_set_inferior_cwd, remote_write_qxfer)
2552 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
2553 (packet_command): Now methods of ...
2554 (remote_target): ... this class.
2555 (m_remote_state) <remote_target>: New field.
2556 (struct remote_state) <stop_reply_queue,
2557 remote_async_inferior_event_token, wait_forever_enabled_p>: New
2559 (remote_state::remote_state): Allocate stop_reply_queue.
2560 (remote_state): Delete global.
2561 (get_remote_state_raw): Delete.
2562 (remote_target::get_remote_state): Allocate m_remote_state on
2564 (get_current_remote_target): New.
2565 (remote_ops, extended_remote_ops): Delete.
2566 (wait_forever_enabled_p, remote_async_inferior_event_token):
2567 Delete, moved to struct remote_state.
2568 (remote_target::close): Delete self. Destruction bits split to
2570 (remote_target::~remote_target): ... this.
2571 (show_memory_packet_size): Adjust to use
2572 get_current_remote_target.
2573 (struct protocol_feature) <func>: Add remote_target parameter.
2574 All callers adjusted.
2575 (curr_quit_handler_target): New.
2576 (remote_serial_quit_handler): Reimplement.
2577 (remote_target::open_1): Adjust to use get_current_remote_target.
2578 Heap-allocate remote_target/extended_remote_target instances.
2579 (vcont_builder::vcont_builder): Add remote_target parameter, and
2580 save it in m_remote. All callers adjusted.
2581 (vcont_builder::m_remote): New field.
2582 (vcont_builder::restart, vcont_builder::flush)
2583 (vcont_builder::push_action): Use it.
2584 (remote_target::commit_resume): Use it.
2585 (struct queue_iter_param) <remote>: New field.
2586 (remote_target::remove_new_fork_children): Fill in 'remote' field.
2587 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
2588 (check_pending_event_prevents_wildcard_vcont_callback)
2589 (remote_target::check_pending_events_prevent_wildcard_vcont)
2590 (remote_target::discard_pending_stop_replies)
2591 (remote_target::discard_pending_stop_replies_in_queue)
2592 (remote_target::remote_notif_remove_queued_reply): Fill in
2594 (remote_notif_get_pending_events): New.
2595 (remote_target::readchar, remote_target::remote_serial_write):
2596 Save/restore curr_quit_handler_target.
2598 (kill_new_fork_children): Fill in 'remote' field.
2599 (packet_command): Use get_current_remote_target, defer to
2600 remote_target method of same name.
2601 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
2602 parameter, and save it in m_remote. All callers adjusted.
2603 (scoped_remote_fd::release): Use m_remote.
2604 (scoped_remote_fd::m_remote): New field.
2605 (remote_file_put, remote_file_get, remote_file_delete): Use
2606 get_current_remote_target, defer to remote_target method of same
2608 (remote_btrace_reset): Add remote_state paremeter. Update all
2610 (remote_async_inferior_event_handler). Pass down 'data'.
2611 (remote_new_objfile): Use get_current_remote_target.
2612 (remote_target::vcont_r_supported): New.
2613 (set_range_stepping): Use get_current_remote_target and
2614 remote_target::vcont_r_supported.
2615 (_initialize_remote): Don't allocate 'remote_state' and
2616 'stop_reply_queue' globals.
2617 * remote.h (struct remote_target): Forward declare.
2618 (getpkt, putpkt, remote_notif_get_pending_events): Add
2619 'remote_target' parameter.
2621 2018-05-22 Pedro Alves <palves@redhat.com>
2623 * remote.c (vcont_builder): Now a class. Make all data members
2625 (vcont_builder) <vcont_builder, restart, flush, push_action>:
2627 (vcont_builder_restart): Rename to ...
2628 (vcont_builder::restart): ... this.
2629 (vcont_builder_flush): Rename to ...
2630 (vcont_builder::flush): ... this.
2631 (vcont_builder_push_action): Rename to ...
2632 (vcont_builder::push_action): ... this.
2633 (remote_target::commit_resume): Adjust.
2635 2018-05-22 Pedro Alves <palves@redhat.com>
2637 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
2638 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
2639 (get_fixed_memory_packet_size): New.
2640 (get_memory_packet_size): Use it.
2641 (set_memory_packet_size): Don't override the config size with
2642 DEFAULT_MAX_MEMORY_PACKET_SIZE.
2643 (show_memory_packet_size): Use get_fixed_memory_packet_size.
2644 Don't refer to get_memory_packet_size if not connected to a remote
2645 target. Show "(default)" if configured size is 0.
2647 2018-05-22 Pedro Alves <palves@redhat.com>
2649 * remote.c (remote_target::mourn_inferior): Move
2650 discard_pending_stop_replies call here from ...
2651 (_initialize_remote): ... here.
2653 2018-05-22 Pedro Alves <palves@redhat.com>
2655 * remote.c (compare_section_command): Remove set_general_process
2658 2018-05-22 Pedro Alves <palves@redhat.com>
2660 * remote.c (struct packet_reg, struct remote_arch_state):
2661 Move higher up in the file.
2662 (remote_state) <m_arch_states>: Store remote_arch_state values
2663 instead of remote_arch_state pointers.
2664 (remote_state::get_remote_arch_state): Adjust.
2666 2018-05-22 Pedro Alves <palves@redhat.com>
2668 * remote.c: Include <unordered_map>.
2669 (remote_state): Now a class.
2670 (remote_state) <get_remote_arch_state>: Declare method.
2671 <get_remote_arch_state>: New field.
2672 (remote_arch_state) <remote_arch_state>: Declare ctor.
2673 <regs>: Now a unique_ptr.
2674 (remote_gdbarch_data_handle): Delete.
2675 (get_remote_arch_state): Delete.
2676 (remote_state::get_remote_arch_state): New.
2677 (get_remote_state): Adjust to call remote_state's
2678 get_remote_arch_state method.
2679 (init_remote_state): Delete, bits factored out to ...
2680 (remote_arch_state::remote_arch_state): ... this new method.
2681 (get_remote_packet_size, get_memory_packet_size)
2682 (process_g_packet, remote_target::fetch_registers)
2683 (remote_target::prepare_to_store, store_registers_using_G)
2684 (remote_target::store_registers, remote_target::get_trace_status):
2685 Adjust to call remote_state's method.
2686 (_initialize_remote): Remove reference to
2687 remote_gdbarch_data_handle.
2689 2018-05-22 Pedro Alves <palves@redhat.com>
2691 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
2692 pread>: New method declarations.
2693 (remote_target::open_1): Adjust.
2694 (readahead_cache_invalidate): Rename to ...
2695 (readahead_cache::invalidate): ... this, and adjust to be a class
2697 (readahead_cache_invalidate_fd): Rename to ...
2698 (readahead_cache::invalidate_fd): ... this, and adjust to be a
2700 (remote_hostio_pwrite): Adjust.
2701 (remote_hostio_pread_from_cache): Rename to ...
2702 (readahead_cache::pread): ... this, and adjust to be a class
2704 (remote_hostio_close): Adjust.
2706 2018-05-22 Pedro Alves <palves@redhat.com>
2708 * remote.c (remote_hostio_close_cleanup): Delete.
2709 (class scoped_remote_fd): New.
2710 (remote_file_put, remote_file_get): Use it.
2712 2018-05-22 Pedro Alves <palves@redhat.com>
2714 (struct vCont_action_support): Use bool and initialize all fields.
2715 (struct readahead_cache): Initialize all fields.
2716 (remote_state): Use bool and initialize all fields.
2717 (remote_state::remote_state, remote_state::~remote_state): New.
2718 (new_remote_state): Delete.
2719 (_initialize_remote): Use new to allocate remote_state.
2721 2018-05-22 Pedro Alves <palves@redhat.com>
2725 * c-exp.y: Include "c-support.h".
2726 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
2727 of tolower. Use c_ident_is_alpha to scan names.
2728 * c-lang.c: Include "c-support.h".
2729 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
2730 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
2731 * c-support.h: New file, with bits factored out from ...
2732 * cp-name-parser.y: ... this file.
2733 Include "c-support.h".
2734 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
2735 c-support.h and renamed.
2736 (symbol_end, yylex): Adjust.
2738 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2740 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
2741 parameter type to CORE_ADDR.
2742 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
2743 parameter type in declaration to CORE_ADDR.
2744 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
2745 target_auxv_search to get AT_HWCAP and use the result to get the
2747 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
2748 to CORE_ADDR. Remove the cast of the return value to unsigned
2749 long. Fix error predicate of target_auxv_search.
2750 (ppc_linux_nat_target::read_description): Change the type of the
2751 hwcap variable to CORE_ADDR.
2753 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2755 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
2756 if the size of fpscr is larger than 32 bits.
2758 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2760 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
2761 (ppc32_linux_vsxregmap): New global.
2762 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
2763 regcache_supply_regset, and regcache_collect_regset.
2764 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
2765 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
2766 (fetch_vsx_register, store_vsx_register): Remove.
2767 (fetch_vsx_registers): Add regno parameter. Get regset using
2768 ppc_linux_vsxregset. Use regset to supply registers.
2769 (store_vsx_registers): Add regno parameter. Get regset using
2770 ppc_linux_vsxregset. Use regset to collect registers.
2771 (fetch_register): Call fetch_vsx_registers instead of
2773 (store_register): Call store_vsx_registers instead of
2775 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
2776 new regno parameter.
2777 (store_ppc_registers): Call store_vsx_registers with -1 for the
2778 new regno parameter.
2779 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
2780 (ppc_collect_vsxregset): Remove.
2782 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2784 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
2786 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
2787 for vector register offset fields.
2788 (ppc64_fbsd_reg_offsets): Likewise.
2789 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2790 to vector register offset fields.
2791 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2792 to vector register offset fields.
2793 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
2794 vector register offset fields.
2795 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
2796 initializers for vector register offset fields.
2797 (rs6000_aix64_reg_offsets): Likewise.
2798 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
2799 (ppc_supply_vrregset): Remove.
2800 (ppc_collect_vrregset): Remove.
2801 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
2802 (ppc_linux_vrregset) : New function.
2803 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
2804 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
2805 (ppc32_linux_vrregset): Remove.
2806 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
2807 and use result instead of ppc32_linux_vrregset.
2808 (ppc32_linux_reg_offsets): Remove initializers for vector register
2810 (ppc64_linux_reg_offsets): Likewise.
2811 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
2812 * ppc-linux-nat.c: Include regset.h.
2813 (gdb_vrregset_t): Adjust comment to account for little-endian
2815 (supply_vrregset, fill_vrregset): Remove.
2816 (fetch_altivec_register, store_altivec_register): Remove.
2817 (fetch_altivec_registers): Add regno parameter. Get regset using
2818 ppc_linux_vrregset. Use regset to supply registers.
2819 (store_altivec_registers): Add regno parameter. Get regset using
2820 ppc_linux_vrregset. Use regset to collect registers.
2821 (fetch_register): Call fetch_altivec_registers instead of
2822 fetch_altivec_register.
2823 (store_register): Call store_altivec_registers instead of
2824 store_altivec_register.
2825 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
2826 the new regno parameter.
2827 (store_ppc_registers): Call store_altivec_registers with -1 for
2828 the new regno parameter.
2830 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2832 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
2833 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
2834 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2835 (gdb_vrregset_t): Change array type size to
2836 PPC_LINUX_SIZEOF_VRREGSET.
2837 (gdb_vsxregset_t): Change array type size to
2838 PPC_LINUX_SIZEOF_VSXREGSET.
2839 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
2840 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
2841 PPC_LINUX_SIZEOF_VSXREGSET.
2843 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2845 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
2846 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
2848 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
2849 ppc_linux_target_wordsize with tid.
2850 (ppc_linux_nat_target::read_description): Call ppc_linux_target
2852 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
2853 (ppc64_64bit_inferior_p): Add static and inline specifiers.
2854 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
2855 tid parameter. Remove static specifier.
2856 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
2857 (ppc_linux_target_wordsize): New declaration.
2859 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2861 * arch/ppc-linux-common.c: New file.
2862 * arch/ppc-linux-common.h: New file.
2863 * arch/ppc-linux-tdesc.h: New file.
2864 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
2865 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
2866 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
2867 arch/ppc-linux-tdesc.h.
2868 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
2869 arch/ppc-linux-tdesc.h.
2870 (ppc_linux_nat_target::read_description): Remove target
2871 description matching code. Fill a ppc_linux_features struct and
2872 call ppc_linux_match_description with it. Move comment about ISA
2873 2.05 to ppc-linux-common.c.
2874 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
2875 arch/ppc-linux-tdesc.h.
2876 (ppc_linux_core_read_description): Remove target description
2877 matching code. Fill a ppc_linux_features struct and call
2878 ppc_linux_match_description with it.
2879 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2880 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2881 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2882 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2883 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2884 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2885 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2886 (tdesc_powerpc_e500l): Remove.
2888 2018-05-22 Joel Brobecker <brobecker@adacore.com>
2890 * ada-lang.c (catch_assert_command): Pass empty string instead
2891 of NULL for excep_string argument.
2893 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2895 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
2896 the width of the requested register exceeds the width of the
2899 2018-05-21 Tom Tromey <tom@tromey.com>
2901 * printcmd.c (output_command): Remove.
2902 (output_command_const): Rename to output_command.
2903 * valprint.h (output_command): Rename from output_command_const.
2904 * tracepoint.c (trace_dump_actions): Call output_command.
2906 2018-05-21 Tom Tromey <tom@tromey.com>
2908 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2909 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
2910 * ada-lang.h (create_ada_exception_catchpoint): Update.
2911 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
2913 (create_excep_cond_exprs, ~ada_catchpoint)
2914 (should_stop_exception, print_one_exception)
2915 (print_mention_exception, print_recreate_exception): Update.
2916 (ada_get_next_arg): Remove.
2917 (catch_ada_exception_command_split): Use std::string. Change type
2918 of "excep_string", "cond_string".
2919 (catch_ada_exception_command): Update.
2920 (create_ada_exception_catchpoint): Change type of excep_string.
2921 (ada_exception_sal): Remove excep_string parameter.
2922 (~ada_catchpoint): Remove.
2924 2018-05-21 Tom Tromey <tom@tromey.com>
2926 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
2929 2018-05-21 Tom Tromey <tom@tromey.com>
2931 * ada-lang.c (ada_exception_message_1, ada_exception_message):
2932 Return unique_xmalloc_ptr.
2933 (print_it_exception): Update.
2935 2018-05-21 Tom Tromey <tom@tromey.com>
2937 * tracepoint.c (trace_dump_actions): Use std::string.
2939 2018-05-21 Tom Tromey <tom@tromey.com>
2941 * symfile.c (reread_symbols): Use std::string for original_name.
2943 2018-05-21 Tom Tromey <tom@tromey.com>
2945 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
2946 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
2949 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
2951 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
2953 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
2954 * objfiles.c (get_objfile_bfd_data): Allocate
2955 objfile_per_bfd_storage with obstack_new when allocating on
2958 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
2960 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
2962 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
2963 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
2964 * mdebugread.c (mdebug_build_psymtabs): Likewise.
2965 (add_pending): Likewise.
2966 (parse_symbol): Likewise.
2967 (parse_partial_symbols): Likewise.
2968 (psymtab_to_symtab_1): Likewise.
2969 (new_psymtab): Likewise.
2970 (elfmdebug_build_psymtabs): Likewise.
2971 * minsyms.c (terminate_minimal_symbol_table): Likewise.
2972 * objfiles.c (get_objfile_bfd_data): Likewise.
2973 (objfile_register_static_link): Likewise.
2974 * psymtab.c (allocate_psymtab): Likewise.
2975 * stabsread.c (read_member_functions): Likewise.
2976 * xcoffread.c (xcoff_end_psymtab): Likewise.
2978 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
2980 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
2981 compiler supports std::is_trivially_constructible.
2982 * common/poison.h: Include obstack.h.
2983 (IsMallocable): Define to is_trivially_constructible if the
2984 compiler supports it, define to true_type otherwise.
2988 (XOBNEWVEC): Redefine.
2989 * gdb_obstack.h (obstack_zalloc): New.
2990 (OBSTACK_ZALLOC): Redefine.
2991 (obstack_calloc): New.
2992 (OBSTACK_CALLOC): Redefine.
2994 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
2995 (gdbarch_obstack): New declaration in gdbarch.h, definition in
2997 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
2998 obstack_calloc/obstack_zalloc.
2999 (gdbarch_obstack_zalloc): Remove.
3000 * target-descriptions.c (tdesc_data_init): Use obstack_new.
3002 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3004 * stack.c (backtrace_command_1): Remove useless variable int i.
3006 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3008 * stack.c (print_frame_info): Fix comment.
3010 2018-05-18 Tom Tromey <tom@tromey.com>
3012 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
3013 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
3014 (~dwarf2_per_objfile): Update
3015 (dwarf2_get_dwz_file): Use new.
3016 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
3019 2018-05-18 Tom Tromey <tom@tromey.com>
3021 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
3023 * dwarf2read.c (struct dwp_file): Add constructor and
3025 (open_and_init_dwp_file): Return a unique_ptr.
3026 (dwarf2_per_objfile, create_dwp_hash_table)
3027 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
3028 (lookup_dwo_unit_in_dwp): Update.
3029 (open_and_init_dwp_file, get_dwp_file): Update.
3031 2018-05-18 Tom Tromey <tom@tromey.com>
3033 * dwarf2read.c (dwarf2_per_objfile): Update.
3034 (struct mapped_index): Add initializers.
3035 (dwarf2_read_index): Use new.
3036 (dw2_symtab_iter_init): Update.
3037 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
3040 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3042 * dwarf2read.c (mapped_index) <total_size>: Remove.
3044 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3046 * unittests/format_pieces-selftests.c (test_format_specifier):
3049 2018-05-18 Tom Tromey <tom@tromey.com>
3051 * c-typeprint.c (maybe_print_hole): New function.
3052 (c_print_type_struct_field_offset): Update.
3053 (c_type_print_base_struct_union): Call maybe_print_hole.
3055 2018-05-17 Keith Seitz <keiths@redhat.com>
3057 * breakpoint.c (build_bpstat_chain): New function, moved from
3059 (bpstat_stop_status): Add optional parameter, `stop_chain'.
3060 If no stop chain is passed, call build_bpstat_chain to build it.
3061 * breakpoint.h (build_bpstat_chain): Declare.
3062 (bpstat_stop_status): Move documentation here from breakpoint.c.
3063 * infrun.c (handle_signal_stop): Before eliding inlined frames,
3064 build the stop chain and pass it to skip_inline_frames.
3065 Pass this stop chain to bpstat_stop_status.
3066 * inline-frame.c: Include breakpoint.h.
3067 (stopped_by_user_bp_inline_frame): New function.
3068 (skip_inline_frames): Add parameter `stop_chain'.
3069 Move documention to inline-frame.h.
3070 If non-NULL, use stopped_by_user_bp_inline_frame to determine
3071 whether the frame should be elided.
3072 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3073 Add moved documentation and update for new parameter.
3075 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3078 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3079 unittests/format_pieces-selftests.c.
3080 * common/format.h (format_piece) <operator==>: New.
3081 (format_pieces) <operator[]>: Remove.
3082 * common/format.c (format_pieces::format_pieces): Handle \e.
3083 * unittests/format_pieces-selftests.c: New.
3085 2018-05-17 Tom Tromey <tom@tromey.com>
3088 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3089 (dw2_instantiate_symtab): Add skip_partial parameter.
3090 (dw2_find_last_source_symtab, dw2_map_expand_apply)
3091 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3092 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3093 (dw2_expand_symtabs_matching_one)
3094 (dw2_find_pc_sect_compunit_symtab)
3095 (dw2_debug_names_lookup_symbol)
3096 (dw2_debug_names_expand_symtabs_for_function): Update.
3097 (init_cutu_and_read_dies): Add skip_partial parameter.
3098 (process_psymtab_comp_unit, build_type_psymtabs_1)
3099 (process_skeletonless_type_unit, load_partial_comp_unit)
3100 (psymtab_to_symtab_1): Update.
3101 (load_full_comp_unit): Add skip_partial parameter.
3102 (process_imported_unit_die, dwarf2_read_addr_index)
3103 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3104 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3105 (read_signatured_type): Update.
3107 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3109 * value.c (release_value): Remove unused variable.
3110 (record_latest_value): Likewise.
3111 (access_value_history): Likewise.
3112 (preserve_values): Likewise.
3114 2018-05-17 Tom Tromey <tom@tromey.com>
3116 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3119 2018-05-16 Maciej W. Rozycki <macro@mips.com>
3122 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3123 Also handle registers whose width is not a multiple of
3125 (linux_nat_trad_target::store_register): Likewise.
3127 2018-05-16 Tom Tromey <tom@tromey.com>
3129 * gdbcore.h (core_bfd): Redefine.
3130 * corelow.c (core_target::close): Update.
3131 (core_target_open): Update.
3132 * progspace.h (struct program_space) <cbfd>: Now a
3135 2018-05-16 Tom Tromey <tom@tromey.com>
3138 * symfile-add-flags.h (enum symfile_add_flags)
3139 <SYMFILE_NOT_FILENAME>: New constant.
3140 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
3141 objfile name from BFD.
3142 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
3143 * minidebug.c (find_separate_debug_file_in_section): Put
3144 ".gnu_debugdata" into BFD's file name.
3146 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
3148 * regcache.c (regcache_read_ftype, regcache_write_ftype):
3151 2018-05-15 Tamar Christina <tamar.christina@arm.com>
3154 * aarch64-tdep.c (aarch64_analyze_prologue,
3155 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
3156 Indicate not interested in errors.
3158 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3160 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
3161 Supply the MIPS_ZERO_REGNUM register.
3163 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3165 * mips-tdep.c (mask_address_var): Make variable static.
3167 2018-05-14 Tom Tromey <tom@tromey.com>
3169 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
3171 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
3173 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
3174 FXSAVE_ADDR for the mxcsr register.
3176 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
3178 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3180 2018-05-11 Pedro Alves <palves@redhat.com>
3182 * corelow.c (core_target) <core_target>: No longer inline.
3183 Initialize m_core_gdbarch, m_core_vec and build the section table
3185 <~core_target>: New.
3186 <core_gdbarch, get_core_register_section>: New methods.
3187 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3188 factored out from ...
3189 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3191 (sniff_core_bfd): Add gdbarch parameter.
3192 (core_close): Delete, merged into ...
3193 (core_target::close): ... here. Delete self.
3194 (core_close_cleanup): Delete.
3195 (core_target_open): Allocate a core_target on the heap. Use a
3196 unique_ptr instead of a cleanup. Bits moved into the core_target
3197 ctor. Adjust to use core_target methods instead of globals.
3198 (get_core_register_section): Rename to ...
3199 (core_target::get_core_register_section): ... this and adjust.
3200 (struct get_core_registers_cb_data): New.
3201 (get_core_registers_cb): Use it. Use bool.
3202 (core_target::fetch_registers, core_target::files_info)
3203 (core_target::xfer_partial, core_target::read_description)
3204 (core_target::pid_to, core_target::thread_name): Adjust to
3205 reference class fields instead of globals.
3206 * target.h (struct target_ops_deleter, target_ops_up): New.
3208 2018-05-11 Pedro Alves <palves@redhat.com>
3210 * corefile.c (core_file_command): Move to corelow.c.
3211 * corelow.c (the_core_target): Delete.
3212 (core_file_command): Moved from corefile.c. Check exec_bfd
3213 instead of the_core_target. Use target_detach instead of calling
3214 into the_core_target directly.
3215 (maybe_say_no_core_file_now): New.
3216 (core_target::detach): Use it.
3217 (_initialize_corelow): Remove references to the_core_target.
3218 * gdbcore.h (the_core_target): Delete.
3220 2018-05-11 Tom Tromey <tromey@redhat.com>
3221 Pedro Alves <palves@redhat.com>
3223 * corefile.c (core_bfd): Remove.
3224 * gdbcore.h (core_bfd): Now a macro.
3225 * progspace.h (struct program_space) <cbfd>: New field.
3227 2018-05-11 Tom Tromey <tom@tromey.com>
3229 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3232 2018-05-10 Tom Tromey <tom@tromey.com>
3234 * configure: Rebuild.
3235 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3237 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3240 * regformats/regdat.sh: Adjust script, following the addition
3241 of the new expedite_regs parameter to init_target_desc.
3243 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
3246 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3247 set_gdbarch_significant_addr_bit.
3248 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3249 set_gdbarch_significant_addr_bit.
3250 * utils.c (address_significant): Update to sign extend addr.
3252 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
3254 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3255 (xtensa_linux_init_abi): Limit tdep->num_regs by
3256 tdep->num_nopriv_regs.
3257 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3258 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3261 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
3263 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3265 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3267 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3268 (I387_MXCSR_INIT_VAL): New constant.
3269 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3270 buffer if it was supplied by the inferior.
3271 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3272 (i387_xsave_get_clear_bv): New function.
3273 (i387_supply_xsave): Only read x87 control registers from the
3274 xsave buffer if the feature is enabled, and the state will have
3275 been written, otherwise, provide a suitable default.
3276 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3277 including x87 control registers. Update control registers if they
3278 have changed from the default value, and mark features as enabled
3280 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3282 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3284 * spu-tdep.c (info_spu_event_command): Fix output formatting.
3286 2018-05-07 Tom Tromey <tom@tromey.com>
3288 * configure: Rebuild.
3289 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
3291 2018-05-07 Tom Tromey <tom@tromey.com>
3294 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
3295 bit. Use correct value for VDIV.
3297 2018-05-04 Tom Tromey <tom@tromey.com>
3299 * configure: Rebuild.
3300 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
3302 2018-05-04 Tom Tromey <tom@tromey.com>
3304 * linux-record.c (record_linux_system_call) <case
3305 RECORD_SYS_RECVFROM>: Add "break".
3307 2018-05-04 Tom Tromey <tom@tromey.com>
3309 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
3310 Add missing "break".
3311 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
3312 Add missing "break".
3314 2018-05-04 Tom Tromey <tom@tromey.com>
3316 * rs6000-tdep.c (ppc_process_record_op4)
3317 (ppc_process_record_op63): Add fall-through comment.
3319 2018-05-04 Tom Tromey <tom@tromey.com>
3321 * i386-tdep.c (i386_process_record): Add fall-through comment.
3323 2018-05-04 Tom Tromey <tom@tromey.com>
3325 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
3328 2018-05-04 Tom Tromey <tom@tromey.com>
3330 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
3331 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
3332 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
3334 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
3336 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
3339 2018-05-04 Tom Tromey <tom@tromey.com>
3341 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
3343 2018-05-04 Tom Tromey <tom@tromey.com>
3345 * s390-tdep.c (s390_process_record): Fix fall-through comments.
3346 * xcoffread.c (scan_xcoff_symtab): Move comment later.
3347 * symfile.c (section_is_mapped): Fix fall-through comment.
3348 * stabsread.c (define_symbol, read_member_functions): Fix
3349 fall-through comment.
3350 * s390-linux-tdep.c (s390_process_record): Fix fall-through
3352 * remote.c (remote_wait_as): Fix fall-through comment.
3353 * p-exp.y (yylex): Fix fall-through comment.
3354 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
3356 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
3357 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
3358 * jv-exp.y (yylex): Fix fall-through comment.
3359 * go-exp.y (lex_one_token): Fix fall-through comment.
3360 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
3361 fall-through comment.
3362 * f-exp.y (yylex): Fix fall-through comment.
3363 * dwarf2read.c (process_die): Fix fall-through comments.
3364 * dbxread.c (process_one_symbol): Fix fall-through comment.
3365 * d-exp.y (lex_one_token): Fix fall-through comment.
3366 * cp-name-parser.y (yylex): Fix fall-through comment.
3367 * coffread.c (coff_symtab_read): Fix fall-through comment.
3368 * c-exp.y (lex_one_token): Fix fall-through comment.
3369 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
3371 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
3374 2018-05-04 Tom Tromey <tom@tromey.com>
3377 * NEWS: Mention gdb.execute change.
3378 * gdbcmd.h (execute_control_command): Don't declare.
3379 * python/python.c (execute_gdb_command): Use read_command_lines_1,
3380 execute_control_commands, execute_control_commands_to_string.
3381 * cli/cli-script.h (execute_control_commands)
3382 (execute_control_commands_to_string): Declare.
3383 (execute_control_command): Add from_tty parameter.
3384 * cli/cli-script.c (execute_control_commands)
3385 (execute_control_commands_to_string): New functions.
3386 (execute_user_command): Use execute_control_commands.
3387 (execute_control_command_1): Add "from_tty" parameter. Update.
3388 (execute_control_command): Likewise.
3390 2018-05-04 Tom Tromey <tom@tromey.com>
3393 * NEWS: Mention that breakpoint commands are writable.
3394 * python/py-breakpoint.c (bppy_set_commands): New function.
3395 (breakpoint_object_getset) <"commands">: Use it.
3397 2018-05-04 Tom Tromey <tom@tromey.com>
3399 * tracepoint.c (actions_command): Update.
3400 * mi/mi-cmd-break.c (mi_command_line_array)
3401 (mi_command_line_array_cnt, mi_command_line_array_ptr)
3402 (mi_read_next_line): Remove.
3403 (mi_cmd_break_commands): Update.
3404 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
3406 * cli/cli-script.c (get_command_line): Update.
3407 (process_next_line): Use function_view. Constify.
3408 (recurse_read_control_structure, read_command_lines)
3409 (read_command_lines_1): Change argument types to function_view.
3410 (do_define_command, document_command): Update.
3411 * breakpoint.h (check_tracepoint_command): Don't declare.
3412 * breakpoint.c (check_tracepoint_command): Remove.
3413 (commands_command_1, create_tracepoint_from_upload): Update.
3415 2018-05-04 Tom Tromey <tom@tromey.com>
3418 * cli/cli-script.h (enum command_control_type) <define_control>:
3420 * cli/cli-script.c (multi_line_command_p): Handle define_control.
3421 (build_command_line, execute_control_command_1)
3422 (process_next_line): Likewise.
3423 (do_define_command): New function, extracted from define_command.
3424 (define_command): Use it.
3426 2018-05-04 Tom Tromey <tom@tromey.com>
3428 * tracepoint.c (actions_command): Update.
3429 * cli/cli-script.h (read_command_lines): Update.
3430 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
3431 (MAX_TMPBUF): Remove define.
3432 (define_command): Use string_printf.
3433 (document_command): Likewise.
3434 * breakpoint.c (commands_command_1): Update.
3436 2018-05-04 Tom Tromey <tom@tromey.com>
3438 * top.c (execute_command): Update.
3439 * cli/cli-script.h (print_command_lines): Now varargs.
3440 * cli/cli-script.c (print_command_lines): Now varargs.
3441 (execute_control_command_1) <case while_control, case if_control>:
3444 2018-05-04 Tom Tromey <tom@tromey.com>
3446 * tracepoint.c (all_tracepoint_actions): Rename from
3447 all_tracepoint_actions_and_cleanup. Change return type.
3448 (actions_command, encode_actions_1, encode_actions)
3449 (trace_dump_actions, tdump_command): Update.
3450 * remote.c (remote_download_command_source): Update.
3451 * python/python.c (gdbpy_eval_from_control_command)
3452 (python_command, python_interactive_command): Update.
3453 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3454 * guile/guile.c (guile_command)
3455 (gdbscm_eval_from_control_command, guile_command): Update.
3456 * compile/compile.c (compile_code_command)
3457 (compile_print_command, compile_to_object): Update.
3458 * cli/cli-script.h (struct command_lines_deleter): New.
3459 (counted_command_line): New typedef.
3460 (struct command_line): Add constructor, destructor.
3461 <body_list>: Remove.
3462 <body_list_0, body_list_1>: New members.
3463 (command_line_up): Remove typedef.
3464 (read_command_lines, read_command_lines_1, get_command_line):
3466 (copy_command_lines): Don't declare.
3467 * cli/cli-script.c (build_command_line): Use "new".
3468 (get_command_line): Return counted_command_line.
3469 (print_command_lines, execute_user_command)
3470 (execute_control_command_1, while_command, if_command): Update.
3471 (realloc_body_list): Remove.
3472 (process_next_line, recurse_read_control_structure): Update.
3473 (read_command_lines, read_command_lines_1): Return counted_command_line.
3474 (free_command_lines): Use "delete".
3475 (copy_command_lines): Remove.
3476 (define_command, document_command, show_user_1): Update.
3477 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
3478 a counted_command_line.
3479 * breakpoint.h (counted_command_line): Remove typedef.
3480 (breakpoint_set_commands): Update.
3481 * breakpoint.c (check_no_tracepoint_commands)
3482 (validate_commands_for_breakpoint): Update.
3483 (breakpoint_set_commands): Change commands to be a
3484 counted_command_line.
3485 (commands_command_1, update_dprintf_command_list)
3486 (create_tracepoint_from_upload): Update.
3488 2018-05-04 Tom Tromey <tom@tromey.com>
3490 * cli/cli-decode.h (cmd_list_element): New constructor.
3491 (~cmd_list_element): New destructor.
3492 (struct cmd_list_element): Add initializers.
3493 * cli/cli-decode.c (do_add_cmd): Use "new".
3494 (delete_cmd): Use "delete".
3496 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3497 Pedro Alves <palves@redhat.com>
3499 PR breakpoints/19806 and support for PR external/20207.
3500 * NEWS: Mention Aarch64 watchpoint improvements.
3501 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
3502 watchpoints and PR external/20207 watchpoints.
3503 * nat/aarch64-linux-hw-point.c
3504 (kernel_supports_any_contiguous_range): New.
3505 (aarch64_watchpoint_offset): New.
3506 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
3507 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
3508 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
3509 (aarch64_align_watchpoint): New parameters aligned_offset_p and
3510 next_addr_orig_p. Support PR external/20207 watchpoints.
3511 (aarch64_downgrade_regs): New.
3512 (aarch64_dr_state_insert_one_point): New parameters offset and
3514 (aarch64_dr_state_remove_one_point): Likewise.
3515 (aarch64_handle_breakpoint): Update caller.
3516 (aarch64_handle_aligned_watchpoint): Likewise.
3517 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
3519 (aarch64_linux_set_debug_regs): Remove const from state. Call
3520 aarch64_downgrade_regs.
3521 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
3522 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
3523 (DR_CONTROL_MASK): ... this.
3524 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
3525 (unsigned int aarch64_watchpoint_offset): New prototype.
3526 (aarch64_linux_set_debug_regs): Remove const from state.
3527 * utils.c (align_up, align_down): Move to ...
3528 * common/common-utils.c (align_up, align_down): ... here.
3529 * utils.h (align_up, align_down): Move to ...
3530 * common/common-utils.h (align_up, align_down): ... here.
3532 2018-05-04 Joel Brobecker <brobecker@adacore.com>
3534 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
3535 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
3536 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
3537 Re-implement to match the ABI as summarized in GCC's
3538 gcc/config/sparc/sparc.c. All callers updated.
3539 (sparc32_store_arguments): Remove assertion.
3541 2018-05-04 Tom Tromey <tom@tromey.com>
3543 * printcmd.c: Don't include tui.h.
3544 (decode_format): Use skip_spaces.
3546 2018-05-04 Tom Tromey <tom@tromey.com>
3549 * printcmd.c (last_count): New global.
3550 (x_command): Use saved count when repeating.
3552 2018-05-04 Tom Tromey <tom@tromey.com>
3554 * nto-procfs.c (do_closedir_cleanup): Remove.
3555 (procfs_pidlist): Use gdb_dir_up.
3556 * procfs.c (do_closedir_cleanup): Remove.
3557 (proc_update_threads): Use gdb_dir_up.
3558 * common/filestuff.h (struct gdb_dir_deleter): New.
3559 (gdb_dir_up): New typedef.
3561 2018-05-04 Tom Tromey <tom@tromey.com>
3563 * ada-lang.c (print_mention_exception): Use std::string.
3565 2018-05-04 Tom Tromey <tom@tromey.com>
3567 * ada-lang.c (create_excep_cond_exprs): Update.
3568 (ada_exception_catchpoint_cond_string): Use std::string.
3570 2018-05-04 Tom Tromey <tom@tromey.com>
3572 * ada-lang.c (xget_renaming_scope): Return std::string.
3573 (old_renaming_is_invisible): Update.
3575 2018-05-04 Tom Tromey <tom@tromey.com>
3577 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
3578 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
3580 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
3582 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
3584 2018-05-04 Tom Tromey <tom@tromey.com>
3586 * remote.c (remote_query_supported_append): Change type.
3587 (remote_check_symbols): Update.
3589 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
3592 * configure.ac: Prepend libpython.
3593 * python/python-config.py: Likewise.
3594 * configure: Regenerate.
3596 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
3598 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
3600 2018-05-03 Pedro Alves <palves@redhat.com>
3603 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
3604 override. Write 'true' instead of '1'.
3605 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
3608 2018-05-02 Pedro Alves <palves@redhat.com>
3610 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
3611 add_inf_child_target.
3612 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
3613 add_inf_child_target.
3614 * aix-thread.c (aix_thread_target_info): New.
3615 (aix_thread_target) <shortname, longname, doc>: Delete.
3617 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
3618 add_inf_child_target.
3619 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
3620 add_inf_child_target.
3621 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
3622 add_inf_child_target.
3623 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
3624 add_inf_child_target.
3625 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
3626 add_inf_child_target.
3627 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
3628 add_inf_child_target.
3629 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
3630 add_inf_child_target.
3631 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
3632 add_inf_child_target.
3633 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
3634 add_inf_child_target.
3635 * bfd-target.c (target_bfd_target_info): New.
3636 (target_bfd) <shortname, longname, doc>: Delete.
3638 * bsd-kvm.c (bsd_kvm_target_info): New.
3639 (bsd_kvm_target) <shortname, longname, doc>: Delete.
3641 (bsd_kvm_target::open): Rename to ...
3642 (bsd_kvm_target_open): ... this. Adjust.
3643 * bsd-uthread.c (bsd_uthread_target_info): New.
3644 (bsd_uthread_target) <shortname, longname, doc>: Delete.
3646 * corefile.c (core_file_command): Adjust.
3647 * corelow.c (core_target_info): New.
3648 (core_target) <shortname, longname, doc>: Delete.
3650 (core_target::open): Rename to ...
3651 (core_target_open): ... this. Adjust.
3652 * ctf.c (ctf_target_info): New.
3653 (ctf_target) <shortname, longname, doc>: Delete.
3655 (ctf_target::open): Rename to ...
3656 (ctf_target_open): ... this.
3657 (_initialize_ctf): Adjust.
3658 * exec.c (exec_target_info): New.
3659 (exec_target) <shortname, longname, doc>: Delete.
3661 (exec_target::open): Rename to ...
3662 (exec_target_open): ... this.
3663 * gdbcore.h (core_target_open): Declare.
3664 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
3665 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
3666 add_inf_child_target.
3667 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
3668 add_inf_child_target.
3669 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
3670 add_inf_child_target.
3671 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
3672 add_inf_child_target.
3673 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
3674 add_inf_child_target.
3675 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
3676 add_inf_child_target.
3677 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
3678 add_inf_child_target.
3679 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
3680 add_inf_child_target.
3681 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
3682 add_inf_child_target.
3683 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
3684 add_inf_child_target.
3685 * inf-child.c (inf_child_target_info): New.
3686 (inf_child_target::info): New.
3687 (inf_child_open_target): Remove 'target' parameter. Use
3688 get_native_target instead.
3689 (inf_child_target::open): Delete.
3690 (add_inf_child_target): New.
3691 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
3694 (add_inf_child_target): Declare.
3695 (inf_child_open_target): Declare.
3696 * linux-thread-db.c (thread_db_target_info): New.
3697 (thread_db_target) <shortname, longname, doc>: Delete.
3699 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
3700 add_inf_child_target.
3701 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
3702 add_inf_child_target.
3703 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
3704 add_inf_child_target.
3705 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
3706 add_inf_child_target.
3707 * make-target-delegates (print_class): Adjust.
3708 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
3709 add_inf_child_target.
3710 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
3711 add_inf_child_target.
3712 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
3713 add_inf_child_target.
3714 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
3715 add_inf_child_target.
3716 * nto-procfs.c (nto_native_target_info): New.
3717 (nto_procfs_target_native) <shortname, longname, doc>:
3720 (nto_procfs_target_info): New.
3721 (nto_procfs_target_procfs) <shortname, longname, doc>:
3724 (init_procfs_targets): Adjust.
3725 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
3726 add_inf_child_target.
3727 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
3728 add_inf_child_target.
3729 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
3730 add_inf_child_target.
3731 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
3732 add_inf_child_target.
3733 * ravenscar-thread.c (ravenscar_target_info): New.
3734 (ravenscar_thread_target) <shortname, longname, doc>:
3737 * record-btrace.c (record_btrace_target_info):
3738 (record_btrace_target) <shortname, longname, doc>: Delete.
3740 (record_btrace_target::open): Rename to ...
3741 (record_btrace_target_open): ... this. Adjust.
3742 * record-full.c (record_longname, record_doc): New.
3743 (record_full_base_target) <shortname, longname, doc>: Delete.
3745 (record_full_target_info): New.
3746 (record_full_target): <shortname>: Delete.
3748 (record_full_core_open_1, record_full_open_1): Update comments.
3749 (record_full_base_target::open): Rename to ...
3750 (record_full_open): ... this.
3751 (cmd_record_full_restore): Update.
3752 (_initialize_record_full): Update.
3753 * remote-sim.c (remote_sim_target_info): New.
3754 (gdbsim_target) <shortname, longname, doc>: Delete.
3756 (gdbsim_target::open): Rename to ...
3757 (gdbsim_target_open): ... this.
3758 (_initialize_remote_sim): Adjust.
3759 * remote.c (remote_doc): New.
3760 (remote_target_info): New.
3761 (remote_target) <shortname, longname, doc>: Delete.
3763 (extended_remote_target_info): New.
3764 (extended_remote_target) <shortname, longname, doc>: Delete.
3766 (remote_target::open_1): Make static. Adjust.
3767 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
3768 * s390-linux-nat.c (_initialize_s390_nat): Use
3769 add_inf_child_target.
3770 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
3771 add_inf_child_target.
3772 * sol-thread.c (thread_db_target_info): New.
3773 (sol_thread_target) <shortname, longname, doc>: Delete.
3775 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
3776 add_inf_child_target.
3777 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
3778 add_inf_child_target.
3779 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
3780 add_inf_child_target.
3781 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
3782 add_inf_child_target.
3783 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
3784 add_inf_child_target.
3785 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
3786 add_inf_child_target.
3787 * spu-linux-nat.c (_initialize_spu_nat): Use
3788 add_inf_child_target.
3789 * spu-multiarch.c (spu_multiarch_target_info): New.
3790 (spu_multiarch_target) <shortname, longname, doc>: Delete.
3792 * target-delegates.c: Regenerate.
3793 * target.c: Include <unordered_map>.
3794 (target_ops_p): Delete.
3795 (DEF_VEC_P(target_ops_p)): Delete.
3796 (target_factories): New.
3797 (test_target_info): New.
3798 (test_target_ops::info): New.
3799 (open_target): Adjust to use target_factories.
3800 (add_target_with_completer): Rename to ...
3801 (add_target): ... this. Change prototype. Register target_info
3802 and open callback in target_factories. Register target_info in
3803 command context instead of target_ops.
3804 (add_target): Delete old implementation.
3805 (add_deprecated_target_alias): Change prototype. Adjust.
3806 (the_native_target): New.
3807 (set_native_target, get_native_target): New.
3808 (find_default_run_target): Use the_native_target.
3809 (find_attach_target, find_run_target): Simplify.
3810 (target_ops::open): Delete.
3811 (dummy_target_info): New.
3812 (dummy_target::shortname, dummy_target::longname)
3813 (dummy_target::doc): Delete.
3814 (dummy_target::info): New.
3815 (debug_target::shortname, debug_target::longname)
3816 (debug_target::doc): Delete.
3817 (debug_target::info): New.
3818 * target.h (struct target_info): New.
3819 (target_ops::~target_ops): Add comment.
3820 (target_ops::info): New.
3821 (target_ops::shortname, target_ops::longname, target_ops::doc): No
3822 longer virtual. Implement in terms of target_info.
3823 (set_native_target, get_native_target): Declare.
3824 (target_open_ftype): New.
3825 (add_target, add_target_with_completer)
3826 (add_deprecated_target_alias): Change prototype.
3827 (test_target) <shortname, longname, doc>: Delete.
3829 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
3830 add_inf_child_target.
3831 * tracefile-tfile.c (tfile_target_info): New.
3832 (tfile_target) <shortname, longname, doc>: Delete.
3834 (tfile_target::open): Rename to ...
3835 (tfile_target_open): ... this.
3836 (_initialize_tracefile_tfile): Adjust.
3837 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
3838 add_inf_child_target.
3839 * windows-nat.c (_initialize_windows_nat): Use
3840 add_inf_child_target.
3841 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
3842 add_inf_child_target.
3844 2018-05-02 Pedro Alves <palves@redhat.com>
3846 * linux-nat.h (linux_nat_target) <low_new_thread,
3847 low_delete_thread, low_new_fork, low_forget_process,
3848 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
3849 New virtual methods.
3850 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3851 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
3852 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
3853 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3854 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
3856 * linux-fork.c (delete_fork): Adjust to call low method.
3857 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
3858 (linux_nat_new_fork, linux_nat_forget_process_hook)
3859 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
3860 (linux_nat_status_is_event):
3861 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
3862 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
3864 (sigtrap_is_event): Rename to ...
3865 (linux_nat_target::low_status_is_event): ... this.
3866 (linux_nat_set_status_is_event): Delete.
3867 (save_stop_reason, linux_nat_wait_1)
3868 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
3870 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3871 (linux_nat_set_new_fork, linux_nat_set_forget_process)
3872 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3873 (linux_nat_set_prepare_to_resume): Delete.
3874 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
3875 low virtual methods.
3876 * amd64-linux-nat.c: Likewise.
3877 * arm-linux-nat.c: Likewise.
3878 * i386-linux-nat.c: Likewise.
3879 * ia64-linux-nat.c: Likewise.
3880 * mips-linux-nat.c: Likewise.
3881 * ppc-linux-nat.c: Likewise.
3882 * s390-linux-nat.c: Likewise.
3883 * sparc64-linux-nat.c: Likewise.
3884 * x86-linux-nat.c: Likewise.
3885 * x86-linux-nat.h: Include "nat/x86-linux.h".
3886 (x86_linux_nat_target) <low_new_fork, low_forget_process,
3887 low_prepare_to_resume, low_new_thread, low_delete_thread>:
3890 2018-05-02 Pedro Alves <palves@redhat.com>
3892 * target.h (target_ops)
3893 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3894 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
3895 stopped_by_watchpoint, have_continuable_watchpoint,
3896 stopped_data_address, watchpoint_addr_within_range,
3897 can_accel_watchpoint_condition, can_run, thread_alive,
3898 has_all_memory, has_memory, has_stack, has_registers,
3899 has_execution, can_async_p, is_async_p, supports_non_stop,
3900 always_non_stop_p, can_execute_reverse, supports_multi_process,
3901 supports_enable_disable_tracepoint,
3902 supports_disable_randomization, supports_string_tracing,
3903 supports_evaluation_of_breakpoint_conditions,
3904 can_run_breakpoint_commands, filesystem_is_local,
3905 can_download_tracepoint, get_trace_state_variable_value,
3906 set_trace_notes, get_tib_address, use_agent, can_use_agent,
3907 record_is_replaying, record_will_replay,
3908 augmented_libraries_svr4_read>: Adjust to return bool.
3909 * aarch64-linux-nat.c: All implementations adjusted.
3910 * aix-thread.c: All implementations adjusted.
3911 * arm-linux-nat.c: All implementations adjusted.
3912 * breakpoint.c: All implementations adjusted.
3913 * bsd-kvm.c: All implementations adjusted.
3914 * bsd-uthread.c: All implementations adjusted.
3915 * corelow.c: All implementations adjusted.
3916 * ctf.c: All implementations adjusted.
3917 * darwin-nat.c: All implementations adjusted.
3918 * darwin-nat.h: All implementations adjusted.
3919 * exec.c: All implementations adjusted.
3920 * fbsd-nat.c: All implementations adjusted.
3921 * fbsd-nat.h: All implementations adjusted.
3922 * gnu-nat.c: All implementations adjusted.
3923 * gnu-nat.h: All implementations adjusted.
3924 * go32-nat.c: All implementations adjusted.
3925 * ia64-linux-nat.c: All implementations adjusted.
3926 * inf-child.c: All implementations adjusted.
3927 * inf-child.h: All implementations adjusted.
3928 * inf-ptrace.c: All implementations adjusted.
3929 * inf-ptrace.h: All implementations adjusted.
3930 * linux-nat.c: All implementations adjusted.
3931 * linux-nat.h: All implementations adjusted.
3932 * mips-linux-nat.c: All implementations adjusted.
3933 * nto-procfs.c: All implementations adjusted.
3934 * ppc-linux-nat.c: All implementations adjusted.
3935 * procfs.c: All implementations adjusted.
3936 * ravenscar-thread.c: All implementations adjusted.
3937 * record-btrace.c: All implementations adjusted.
3938 * record-full.c: All implementations adjusted.
3939 * remote-sim.c: All implementations adjusted.
3940 * remote.c: All implementations adjusted.
3941 * s390-linux-nat.c: All implementations adjusted.
3942 * sol-thread.c: All implementations adjusted.
3943 * spu-multiarch.c: All implementations adjusted.
3944 * target-delegates.c: All implementations adjusted.
3945 * target.c: All implementations adjusted.
3946 * target.h: All implementations adjusted.
3947 * tracefile-tfile.c: All implementations adjusted.
3948 * tracefile.c: All implementations adjusted.
3949 * tracefile.h: All implementations adjusted.
3950 * windows-nat.c: All implementations adjusted.
3951 * x86-linux-nat.h: All implementations adjusted.
3952 * x86-nat.h: All implementations adjusted.
3954 2018-05-02 Pedro Alves <palves@redhat.com>
3956 * make-target-delegates (scan_target_h): Don't trim lines here.
3957 Replace sequences of tabs and/or whitespace with a single
3959 (top level, parsing methods): Trim each line before processing it
3962 2018-05-02 Pedro Alves <palves@redhat.com>
3963 John Baldwin <jhb@freebsd.org>
3965 * target.h (enum strata) <debug_stratum>: New.
3966 (struct target_ops) <all delegation methods>: Replace by C++
3967 virtual methods, and drop "to_" prefix. All references updated
3969 <to_shortname, to_longname, to_doc, to_data,
3970 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
3971 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
3972 virtual methods. All references updated throughout.
3973 <can_attach, supports_terminal_ours, can_create_inferior,
3974 get_thread_control_capabilities, attach_no_wait>: New
3976 <insert_breakpoint, remove_breakpoint>: Now
3977 TARGET_DEFAULT_NORETURN methods.
3978 <info_proc>: Now returns bool.
3980 (OPS_MAGIC): Delete.
3981 (current_target): Delete. All references replaced by references
3983 (target_stack): ... this. New.
3984 (target_shortname, target_longname): Adjust.
3985 (target_can_run): Now a function declaration.
3986 (default_child_has_all_memory, default_child_has_memory)
3987 (default_child_has_stack, default_child_has_registers)
3988 (default_child_has_execution): Remove target_ops parameter.
3989 (complete_target_initialization): Delete.
3990 (memory_breakpoint_target): New template class.
3991 (test_target_ops): Refactor as a C++ class with virtual methods.
3992 * make-target-delegates (NAME_PART): Tighten.
3993 (POINTER_PART, CP_SYMBOL): New.
3994 (SIMPLE_RETURN_PART): Reimplement.
3995 (VEC_RETURN_PART): Expect less.
3996 (RETURN_PART, VIRTUAL_PART): New.
3997 (METHOD): Adjust to C++ virtual methods.
3998 (scan_target_h): Remove reference to C99.
3999 (dname): Output "target_ops::" prefix.
4000 (write_function_header): Adjust to output a C++ class method.
4001 (write_declaration): New.
4002 (write_delegator): Adjust to output a C++ class method.
4003 (tdname): Output "dummy_target::" prefix.
4004 (write_tdefault, write_debugmethod): Adjust to output a C++ class
4006 (tdefault_names, debug_names): Delete.
4007 (return_types, tdefaults, styles, argtypes_array): New.
4008 (top level): All methods are delegators.
4010 (top level): Print dummy_target and debug_target classes.
4011 * target-delegates.c: Regenerate.
4012 * target-debug.h (target_debug_print_enum_info_proc_what)
4013 (target_debug_print_thread_control_capabilities)
4014 (target_debug_print_thread_info_p): New.
4015 * target.c (dummy_target): Delete.
4016 (the_dummy_target, the_debug_target): New.
4017 (target_stack): Now extern.
4018 (set_targetdebug): Push/unpush debug target.
4019 (default_child_has_all_memory, default_child_has_memory)
4020 (default_child_has_stack, default_child_has_registers)
4021 (default_child_has_execution): Remove target_ops parameter.
4022 (complete_target_initialization): Delete.
4023 (add_target_with_completer): No longer call
4024 complete_target_initialization.
4025 (target_supports_terminal_ours): Use regular delegation.
4026 (update_current_target): Delete.
4027 (push_target): No longer check magic number. Don't call
4028 update_current_target.
4029 (unpush_target): Don't call update_current_target.
4030 (target_is_pushed): No longer check magic number.
4031 (target_require_runnable): Skip for all stratums over
4033 (target_ops::info_proc): New.
4034 (target_info_proc): Use find_target_at and
4035 find_default_run_target.
4036 (target_supports_disable_randomization): Use regular delegation.
4037 (target_get_osdata): Use find_target_at.
4038 (target_ops::open, target_ops::close, target_ops::can_attach)
4039 (target_ops::attach, target_ops::can_create_inferior)
4040 (target_ops::create_inferior, target_ops::can_run)
4041 (target_can_run): New.
4042 (default_fileio_target): Use regular delegation.
4043 (target_ops::fileio_open, target_ops::fileio_pwrite)
4044 (target_ops::fileio_pread, target_ops::fileio_fstat)
4045 (target_ops::fileio_close, target_ops::fileio_unlink)
4046 (target_ops::fileio_readlink): New.
4047 (target_fileio_open_1, target_fileio_unlink)
4048 (target_fileio_readlink): Always call the target method. Handle
4050 (return_zero, return_zero_has_execution): Delete.
4051 (init_dummy_target): Delete.
4052 (dummy_target::dummy_target, dummy_target::shortname)
4053 (dummy_target::longname, dummy_target::doc)
4054 (debug_target::debug_target, debug_target::shortname)
4055 (debug_target::longname, debug_target::doc): New.
4056 (target_supports_delete_record): Use regular delegation.
4057 (setup_target_debug): Delete.
4058 (maintenance_print_target_stack): Skip debug_stratum.
4059 (initialize_targets): Instantiate the_dummy_target and
4061 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
4063 (target_auxv_search, fprint_target_auxv): Adjust.
4064 (info_auxv_command): Adjust to use target_stack.
4065 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4066 * exceptions.c (print_flush): Handle a NULL target_stack.
4067 * regcache.c (target_ops_no_register): Refactor as class with
4070 * exec.c (exec_target): New class.
4071 (exec_ops): Now an exec_target.
4072 (exec_open, exec_close_1, exec_get_section_table)
4073 (exec_xfer_partial, exec_files_info, exec_has_memory)
4074 (exec_make_note_section): Refactor as exec_target methods.
4075 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4077 (exec_target::find_memory_regions): New.
4078 (_initialize_exec): Don't call init_exec_ops.
4079 * gdbcore.h (exec_file_clear): Delete.
4081 * corefile.c (core_target): Delete.
4082 (core_file_command): Adjust.
4083 * corelow.c (core_target): New class.
4084 (the_core_target): New.
4085 (core_close): Remove target_ops parameter.
4086 (core_close_cleanup): Adjust.
4087 (core_target::close): New.
4088 (core_open, core_detach, get_core_registers, core_files_info)
4089 (core_xfer_partial, core_thread_alive, core_read_description)
4090 (core_pid_to_str, core_thread_name, core_has_memory)
4091 (core_has_stack, core_has_registers, core_info_proc): Rework as
4092 core_target methods.
4093 (ignore, core_remove_breakpoint, init_core_ops): Delete.
4094 (_initialize_corelow): Initialize the_core_target.
4095 * gdbcore.h (core_target): Delete.
4096 (the_core_target): New.
4098 * ctf.c: (ctf_target): New class.
4099 (ctf_ops): Now a ctf_target.
4100 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4101 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4102 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4104 (init_ctf_ops): Delete.
4105 (_initialize_ctf): Don't call it.
4106 * tracefile-tfile.c (tfile_target): New class.
4107 (tfile_ops): Now a tfile_target.
4108 (tfile_open, tfile_close, tfile_files_info)
4109 (tfile_get_tracepoint_status, tfile_trace_find)
4110 (tfile_fetch_registers, tfile_xfer_partial)
4111 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4112 Refactor as tfile_target methods.
4113 (tfile_xfer_partial_features): Remove target_ops parameter.
4114 (init_tfile_ops): Delete.
4115 (_initialize_tracefile_tfile): Don't call it.
4116 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4117 (tracefile_has_stack, tracefile_has_registers)
4118 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4119 tracefile_target methods.
4120 (init_tracefile_ops): Delete.
4121 (tracefile_target::tracefile_target): New.
4122 * tracefile.h: Include "target.h".
4123 (tracefile_target): New class.
4124 (init_tracefile_ops): Delete.
4126 * spu-multiarch.c (spu_multiarch_target): New class.
4127 (spu_ops): Now a spu_multiarch_target.
4128 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4129 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4130 (spu_search_memory, spu_mourn_inferior): Refactor as
4131 spu_multiarch_target methods.
4132 (init_spu_ops): Delete.
4133 (_initialize_spu_multiarch): Remove references to init_spu_ops,
4134 complete_target_initialization.
4136 * ravenscar-thread.c (ravenscar_thread_target): New class.
4137 (ravenscar_ops): Now a ravenscar_thread_target.
4138 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4139 (ravenscar_thread_alive, ravenscar_pid_to_str)
4140 (ravenscar_fetch_registers, ravenscar_store_registers)
4141 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
4142 (ravenscar_stopped_by_hw_breakpoint)
4143 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
4144 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
4145 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
4147 (init_ravenscar_thread_ops): Delete.
4148 (_initialize_ravenscar): Remove references to
4149 init_ravenscar_thread_ops and complete_target_initialization.
4151 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
4152 (bsd_uthread_target): New class.
4153 (bsd_uthread_ops): Now a bsd_uthread_target.
4154 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
4155 (bsd_uthread_close, bsd_uthread_mourn_inferior)
4156 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
4157 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
4158 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
4159 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
4160 (bsd_uthread_target): Delete function.
4161 (_initialize_bsd_uthread): Remove reference to
4162 complete_target_initialization.
4164 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
4165 (target_bfd): ... this new class.
4166 (target_bfd_xfer_partial, target_bfd_get_section_table)
4167 (target_bfd_close): Refactor as target_bfd methods.
4168 (target_bfd::~target_bfd): New.
4169 (target_bfd_reopen): Adjust.
4170 (target_bfd::close): New.
4172 * record-btrace.c (record_btrace_target): New class.
4173 (record_btrace_ops): Now a record_btrace_target.
4174 (record_btrace_open, record_btrace_stop_recording)
4175 (record_btrace_disconnect, record_btrace_close)
4176 (record_btrace_async, record_btrace_info)
4177 (record_btrace_insn_history, record_btrace_insn_history_range)
4178 (record_btrace_insn_history_from, record_btrace_call_history)
4179 (record_btrace_call_history_range)
4180 (record_btrace_call_history_from, record_btrace_record_method)
4181 (record_btrace_is_replaying, record_btrace_will_replay)
4182 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4183 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4184 (record_btrace_store_registers, record_btrace_prepare_to_store)
4185 (record_btrace_to_get_unwinder)
4186 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4187 (record_btrace_commit_resume, record_btrace_wait)
4188 (record_btrace_stop, record_btrace_can_execute_reverse)
4189 (record_btrace_stopped_by_sw_breakpoint)
4190 (record_btrace_supports_stopped_by_sw_breakpoint)
4191 (record_btrace_stopped_by_hw_breakpoint)
4192 (record_btrace_supports_stopped_by_hw_breakpoint)
4193 (record_btrace_update_thread_list, record_btrace_thread_alive)
4194 (record_btrace_goto_begin, record_btrace_goto_end)
4195 (record_btrace_goto, record_btrace_stop_replaying_all)
4196 (record_btrace_execution_direction)
4197 (record_btrace_prepare_to_generate_core)
4198 (record_btrace_done_generating_core): Refactor as
4199 record_btrace_target methods.
4200 (init_record_btrace_ops): Delete.
4201 (_initialize_record_btrace): Remove reference to
4202 init_record_btrace_ops.
4203 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4204 the execution_direction global.
4205 (record_full_base_target, record_full_target)
4206 (record_full_core_target): New classes.
4207 (record_full_ops): Now a record_full_target.
4208 (record_full_core_ops): Now a record_full_core_target.
4209 (record_full_target::detach, record_full_target::disconnect)
4210 (record_full_core_target::disconnect)
4211 (record_full_target::mourn_inferior, record_full_target::kill):
4213 (record_full_open, record_full_close, record_full_async): Refactor
4214 as methods of the record_full_base_target class.
4215 (record_full_resume, record_full_commit_resume): Refactor
4216 as methods of the record_full_target class.
4217 (record_full_wait, record_full_stopped_by_watchpoint)
4218 (record_full_stopped_data_address)
4219 (record_full_stopped_by_sw_breakpoint)
4220 (record_full_supports_stopped_by_sw_breakpoint)
4221 (record_full_stopped_by_hw_breakpoint)
4222 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4223 methods of the record_full_base_target class.
4224 (record_full_store_registers, record_full_xfer_partial)
4225 (record_full_insert_breakpoint, record_full_remove_breakpoint):
4226 Refactor as methods of the record_full_target class.
4227 (record_full_can_execute_reverse, record_full_get_bookmark)
4228 (record_full_goto_bookmark, record_full_execution_direction)
4229 (record_full_record_method, record_full_info, record_full_delete)
4230 (record_full_is_replaying, record_full_will_replay)
4231 (record_full_goto_begin, record_full_goto_end, record_full_goto)
4232 (record_full_stop_replaying): Refactor as methods of the
4233 record_full_base_target class.
4234 (record_full_core_resume, record_full_core_kill)
4235 (record_full_core_fetch_registers)
4236 (record_full_core_prepare_to_store)
4237 (record_full_core_store_registers, record_full_core_xfer_partial)
4238 (record_full_core_insert_breakpoint)
4239 (record_full_core_remove_breakpoint)
4240 (record_full_core_has_execution): Refactor
4241 as methods of the record_full_core_target class.
4242 (record_full_base_target::supports_delete_record): New.
4243 (init_record_full_ops): Delete.
4244 (init_record_full_core_ops): Delete.
4245 (record_full_save): Refactor as method of the
4246 record_full_base_target class.
4247 (_initialize_record_full): Remove references to
4248 init_record_full_ops and init_record_full_core_ops.
4250 * remote.c (remote_target, extended_remote_target): New classes.
4251 (remote_ops): Now a remote_target.
4252 (extended_remote_ops): Now an extended_remote_target.
4253 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4254 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4255 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4256 (remote_pass_signals, remote_set_syscall_catchpoint)
4257 (remote_program_signals, )
4258 (remote_thread_always_alive): Remove target_ops parameter.
4259 (remote_thread_alive, remote_thread_name)
4260 (remote_update_thread_list, remote_threads_extra_info)
4261 (remote_static_tracepoint_marker_at)
4262 (remote_static_tracepoint_markers_by_strid)
4263 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4264 (remote_open): Refactor as methods of remote_target.
4265 (extended_remote_open, extended_remote_detach)
4266 (extended_remote_attach, extended_remote_post_attach):
4267 (extended_remote_supports_disable_randomization)
4268 (extended_remote_create_inferior): : Refactor as method of
4269 extended_remote_target.
4270 (remote_set_permissions, remote_open_1, remote_detach)
4271 (remote_follow_fork, remote_follow_exec, remote_disconnect)
4272 (remote_resume, remote_commit_resume, remote_stop)
4273 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4274 (remote_terminal_ours, remote_wait, remote_fetch_registers)
4275 (remote_prepare_to_store, remote_store_registers)
4276 (remote_flash_erase, remote_flash_done, remote_files_info)
4277 (remote_kill, remote_mourn, remote_insert_breakpoint)
4278 (remote_remove_breakpoint, remote_insert_watchpoint)
4279 (remote_watchpoint_addr_within_range)
4280 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4281 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4282 (remote_supports_stopped_by_sw_breakpoint)
4283 (remote_stopped_by_hw_breakpoint)
4284 (remote_supports_stopped_by_hw_breakpoint)
4285 (remote_stopped_by_watchpoint, remote_stopped_data_address)
4286 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4287 (remote_verify_memory): Refactor as methods of remote_target.
4288 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4290 (remote_xfer_partial, remote_get_memory_xfer_limit)
4291 (remote_search_memory, remote_rcmd, remote_memory_map)
4292 (remote_pid_to_str, remote_get_thread_local_address)
4293 (remote_get_tib_address, remote_read_description): Refactor as
4294 methods of remote_target.
4295 (remote_target::fileio_open, remote_target::fileio_pwrite)
4296 (remote_target::fileio_pread, remote_target::fileio_close): New.
4297 (remote_hostio_readlink, remote_hostio_fstat)
4298 (remote_filesystem_is_local, remote_can_execute_reverse)
4299 (remote_supports_non_stop, remote_supports_disable_randomization)
4300 (remote_supports_multi_process, remote_supports_cond_breakpoints)
4301 (remote_supports_enable_disable_tracepoint)
4302 (remote_supports_string_tracing)
4303 (remote_can_run_breakpoint_commands, remote_trace_init)
4304 (remote_download_tracepoint, remote_can_download_tracepoint)
4305 (remote_download_trace_state_variable, remote_enable_tracepoint)
4306 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
4307 (remote_trace_start, remote_get_trace_status)
4308 (remote_get_tracepoint_status, remote_trace_stop)
4309 (remote_trace_find, remote_get_trace_state_variable_value)
4310 (remote_save_trace_data, remote_get_raw_trace_data)
4311 (remote_set_disconnected_tracing, remote_core_of_thread)
4312 (remote_set_circular_trace_buffer, remote_traceframe_info)
4313 (remote_get_min_fast_tracepoint_insn_len)
4314 (remote_set_trace_buffer_size, remote_set_trace_notes)
4315 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
4316 (remote_disable_btrace, remote_teardown_btrace)
4317 (remote_read_btrace, remote_btrace_conf)
4318 (remote_augmented_libraries_svr4_read, remote_load)
4319 (remote_pid_to_exec_file, remote_can_do_single_step)
4320 (remote_execution_direction, remote_thread_handle_to_thread_info):
4321 Refactor as methods of remote_target.
4322 (init_remote_ops, init_extended_remote_ops): Delete.
4323 (remote_can_async_p, remote_is_async_p, remote_async)
4324 (remote_thread_events, remote_upload_tracepoints)
4325 (remote_upload_trace_state_variables): Refactor as methods of
4327 (_initialize_remote): Remove references to init_remote_ops and
4328 init_extended_remote_ops.
4330 * remote-sim.c (gdbsim_target): New class.
4331 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
4332 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
4333 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
4334 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
4335 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
4336 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
4337 Refactor as methods of gdbsim_target.
4338 (gdbsim_ops): Now a gdbsim_target.
4339 (init_gdbsim_ops): Delete.
4340 (gdbsim_cntrl_c): Adjust.
4341 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
4343 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
4344 (the_amd64_linux_nat_target): New.
4345 (amd64_linux_fetch_inferior_registers)
4346 (amd64_linux_store_inferior_registers): Refactor as methods of
4347 amd64_linux_nat_target.
4348 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
4349 * i386-linux-nat.c: Don't include "linux-nat.h".
4350 (i386_linux_nat_target): New class.
4351 (the_i386_linux_nat_target): New.
4352 (i386_linux_fetch_inferior_registers)
4353 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
4354 as methods of i386_linux_nat_target.
4355 (_initialize_i386_linux_nat): Adjust. Set linux_target.
4356 * inf-child.c (inf_child_ops): Delete.
4357 (inf_child_fetch_inferior_registers)
4358 (inf_child_store_inferior_registers): Delete.
4359 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
4360 methods of inf_child_target.
4361 (inf_child_target::supports_terminal_ours)
4362 (inf_child_target::terminal_init)
4363 (inf_child_target::terminal_inferior)
4364 (inf_child_target::terminal_ours_for_output)
4365 (inf_child_target::terminal_ours, inf_child_target::interrupt)
4366 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
4368 (inf_child_open, inf_child_disconnect, inf_child_close)
4369 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
4370 (inf_child_post_startup_inferior, inf_child_can_run)
4371 (inf_child_pid_to_exec_file): Refactor as methods of
4373 (inf_child_follow_fork): Delete.
4374 (inf_child_target::can_create_inferior)
4375 (inf_child_target::can_attach): New.
4376 (inf_child_target::has_all_memory, inf_child_target::has_memory)
4377 (inf_child_target::has_stack, inf_child_target::has_registers)
4378 (inf_child_target::has_execution): New.
4379 (inf_child_fileio_open, inf_child_fileio_pwrite)
4380 (inf_child_fileio_pread, inf_child_fileio_fstat)
4381 (inf_child_fileio_close, inf_child_fileio_unlink)
4382 (inf_child_fileio_readlink, inf_child_use_agent)
4383 (inf_child_can_use_agent): Refactor as methods of
4385 (return_zero, inf_child_target): Delete.
4386 (inf_child_target::inf_child_target): New.
4387 * inf-child.h: Include "target.h".
4388 (inf_child_target): Delete function prototype.
4389 (inf_child_target): New class.
4390 (inf_child_open_target, inf_child_mourn_inferior)
4391 (inf_child_maybe_unpush_target): Delete.
4392 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
4393 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
4394 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
4395 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
4396 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
4397 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
4398 (inf_ptrace_wait, inf_ptrace_xfer_partial)
4399 (inf_ptrace_thread_alive, inf_ptrace_files_info)
4400 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
4401 methods of inf_ptrace_target.
4402 (inf_ptrace_target): Delete function.
4403 * inf-ptrace.h: Include "inf-child.h".
4404 (inf_ptrace_target): Delete function declaration.
4405 (inf_ptrace_target): New class.
4406 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
4407 * linux-nat.c (linux_target): New.
4408 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
4409 (linux_nat_target::~linux_nat_target): New.
4410 (linux_child_post_attach, linux_child_post_startup_inferior)
4411 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
4412 (linux_child_remove_fork_catchpoint)
4413 (linux_child_insert_vfork_catchpoint)
4414 (linux_child_remove_vfork_catchpoint)
4415 (linux_child_insert_exec_catchpoint)
4416 (linux_child_remove_exec_catchpoint)
4417 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
4418 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
4419 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
4420 (linux_nat_stopped_data_address)
4421 (linux_nat_stopped_by_sw_breakpoint)
4422 (linux_nat_supports_stopped_by_sw_breakpoint)
4423 (linux_nat_stopped_by_hw_breakpoint)
4424 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
4425 (linux_nat_kill, linux_nat_mourn_inferior)
4426 (linux_nat_xfer_partial, linux_nat_thread_alive)
4427 (linux_nat_update_thread_list, linux_nat_pid_to_str)
4428 (linux_nat_thread_name, linux_child_pid_to_exec_file)
4429 (linux_child_static_tracepoint_markers_by_strid)
4430 (linux_nat_is_async_p, linux_nat_can_async_p)
4431 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
4432 (linux_nat_supports_multi_process)
4433 (linux_nat_supports_disable_randomization, linux_nat_async)
4434 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
4435 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
4436 (linux_nat_fileio_open, linux_nat_fileio_readlink)
4437 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
4438 methods of linux_nat_target.
4439 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
4440 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
4442 (check_stopped_by_watchpoint): Adjust.
4443 (linux_xfer_partial): Delete.
4444 (linux_target_install_ops, linux_target, linux_nat_add_target):
4446 (linux_nat_target::linux_nat_target): New.
4447 * linux-nat.h: Include "inf-ptrace.h".
4448 (linux_nat_target): New.
4449 (linux_target, linux_target_install_ops, linux_nat_add_target):
4450 Delete function declarations.
4451 (linux_target): Declare global.
4452 * linux-thread-db.c (thread_db_target): New.
4453 (thread_db_target::thread_db_target): New.
4454 (thread_db_ops): Delete.
4455 (the_thread_db_target): New.
4456 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
4457 (thread_db_update_thread_list, thread_db_pid_to_str)
4458 (thread_db_extra_thread_info)
4459 (thread_db_thread_handle_to_thread_info)
4460 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
4461 (thread_db_resume): Refactor as methods of thread_db_target.
4462 (init_thread_db_ops): Delete.
4463 (_initialize_thread_db): Remove reference to init_thread_db_ops.
4464 * x86-linux-nat.c: Don't include "linux-nat.h".
4465 (super_post_startup_inferior): Delete.
4466 (x86_linux_nat_target::~x86_linux_nat_target): New.
4467 (x86_linux_child_post_startup_inferior)
4468 (x86_linux_read_description, x86_linux_enable_btrace)
4469 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
4470 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
4471 methods of x86_linux_nat_target.
4472 (x86_linux_create_target): Delete. Bits folded ...
4473 (x86_linux_add_target): ... here. Now takes a linux_nat_target
4475 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
4476 (x86_linux_nat_target): New class.
4477 (x86_linux_create_target): Delete.
4478 (x86_linux_add_target): Now takes a linux_nat_target pointer.
4479 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
4480 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
4481 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
4482 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
4483 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
4485 (x86_use_watchpoints): Delete.
4486 * x86-nat.h: Include "breakpoint.h" and "target.h".
4487 (x86_use_watchpoints): Delete.
4488 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
4489 (x86_stopped_by_watchpoint, x86_stopped_data_address)
4490 (x86_insert_watchpoint, x86_remove_watchpoint)
4491 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
4492 (x86_stopped_by_hw_breakpoint): New declarations.
4493 (x86_nat_target): New template class.
4495 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
4496 (the_ppc_linux_nat_target): New.
4497 (ppc_linux_fetch_inferior_registers)
4498 (ppc_linux_can_use_hw_breakpoint)
4499 (ppc_linux_region_ok_for_hw_watchpoint)
4500 (ppc_linux_ranged_break_num_registers)
4501 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
4502 (ppc_linux_insert_mask_watchpoint)
4503 (ppc_linux_remove_mask_watchpoint)
4504 (ppc_linux_can_accel_watchpoint_condition)
4505 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
4506 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
4507 (ppc_linux_watchpoint_addr_within_range)
4508 (ppc_linux_masked_watch_num_registers)
4509 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
4510 (ppc_linux_read_description): Refactor as methods of
4511 ppc_linux_nat_target.
4512 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
4514 * procfs.c (procfs_xfer_partial): Delete forward declaration.
4515 (procfs_target): New class.
4516 (the_procfs_target): New.
4517 (procfs_target): Delete function.
4518 (procfs_auxv_parse, procfs_attach, procfs_detach)
4519 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
4520 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
4521 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
4522 (procfs_create_inferior, procfs_update_thread_list)
4523 (procfs_thread_alive, procfs_pid_to_str)
4524 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
4525 (procfs_stopped_data_address, procfs_insert_watchpoint)
4526 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
4527 (proc_find_memory_regions, procfs_info_proc)
4528 (procfs_make_note_section): Refactor as methods of procfs_target.
4529 (_initialize_procfs): Adjust.
4530 * sol-thread.c (sol_thread_target): New class.
4531 (sol_thread_ops): Now a sol_thread_target.
4532 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
4533 (sol_thread_fetch_registers, sol_thread_store_registers)
4534 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
4535 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
4536 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
4537 (init_sol_thread_ops): Delete.
4538 (_initialize_sol_thread): Adjust. Remove references to
4539 init_sol_thread_ops and complete_target_initialization.
4541 * windows-nat.c (windows_nat_target): New class.
4542 (windows_fetch_inferior_registers)
4543 (windows_store_inferior_registers, windows_resume, windows_wait)
4544 (windows_attach, windows_detach, windows_pid_to_exec_file)
4545 (windows_files_info, windows_create_inferior)
4546 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
4547 (windows_close, windows_pid_to_str, windows_xfer_partial)
4548 (windows_get_tib_address, windows_get_ada_task_ptid)
4549 (windows_thread_name, windows_thread_alive): Refactor as
4550 windows_nat_target methods.
4551 (do_initial_windows_stuff): Adjust.
4552 (windows_target): Delete function.
4553 (_initialize_windows_nat): Adjust.
4555 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
4556 (darwin_mourn_inferior, darwin_kill_inferior)
4557 (darwin_create_inferior, darwin_attach, darwin_detach)
4558 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
4559 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
4560 (darwin_supports_multi_process): Refactor as darwin_nat_target
4562 (darwin_resume_to, darwin_files_info): Delete.
4563 (_initialize_darwin_inferior): Rename to ...
4564 (_initialize_darwin_nat): ... this. Adjust to C++ification.
4565 * darwin-nat.h: Include "inf-child.h".
4566 (darwin_nat_target): New class.
4567 (darwin_complete_target): Delete.
4568 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
4569 (darwin_target): New.
4570 (i386_darwin_fetch_inferior_registers)
4571 (i386_darwin_store_inferior_registers): Refactor as methods of
4573 (darwin_complete_target): Delete, with ...
4574 (_initialize_i386_darwin_nat): ... bits factored out here.
4576 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
4577 (the_alpha_linux_nat_target): New.
4578 (alpha_linux_register_u_offset): Refactor as
4579 alpha_linux_nat_target method.
4580 (_initialize_alpha_linux_nat): Adjust.
4581 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
4582 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4583 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
4584 methods of linux_nat_trad_target.
4585 (linux_trad_target): Delete.
4586 * linux-nat-trad.h (linux_trad_target): Delete function.
4587 (linux_nat_trad_target): New class.
4588 * mips-linux-nat.c (mips_linux_nat_target): New class.
4589 (super_fetch_registers, super_store_registers, super_close):
4591 (the_mips_linux_nat_target): New.
4592 (mips64_linux_regsets_fetch_registers)
4593 (mips64_linux_regsets_store_registers)
4594 (mips64_linux_fetch_registers, mips64_linux_store_registers)
4595 (mips_linux_register_u_offset, mips_linux_read_description)
4596 (mips_linux_can_use_hw_breakpoint)
4597 (mips_linux_stopped_by_watchpoint)
4598 (mips_linux_stopped_data_address)
4599 (mips_linux_region_ok_for_hw_watchpoint)
4600 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
4601 (mips_linux_close): Refactor as methods of mips_linux_nat.
4602 (_initialize_mips_linux_nat): Adjust to C++ification.
4604 * aix-thread.c (aix_thread_target): New class.
4605 (aix_thread_ops): Now an aix_thread_target.
4606 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
4607 (aix_thread_fetch_registers, aix_thread_store_registers)
4608 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
4609 (aix_thread_thread_alive, aix_thread_pid_to_str)
4610 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
4611 Refactor as methods of aix_thread_target.
4612 (init_aix_thread_ops): Delete.
4613 (_initialize_aix_thread): Remove references to init_aix_thread_ops
4614 and complete_target_initialization.
4615 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
4616 (rs6000_nat_target): New class.
4617 (the_rs6000_nat_target): New.
4618 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
4619 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
4620 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
4621 (super_create_inferior): Delete.
4622 (_initialize_rs6000_nat): Adjust to C++ification.
4624 * arm-linux-nat.c (arm_linux_nat_target): New class.
4625 (the_arm_linux_nat_target): New.
4626 (arm_linux_fetch_inferior_registers)
4627 (arm_linux_store_inferior_registers, arm_linux_read_description)
4628 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
4629 (arm_linux_remove_hw_breakpoint)
4630 (arm_linux_region_ok_for_hw_watchpoint)
4631 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
4632 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
4633 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
4634 arm_linux_nat_target.
4635 (_initialize_arm_linux_nat): Adjust to C++ification.
4637 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
4638 (the_aarch64_linux_nat_target): New.
4639 (aarch64_linux_fetch_inferior_registers)
4640 (aarch64_linux_store_inferior_registers)
4641 (aarch64_linux_child_post_startup_inferior)
4642 (aarch64_linux_read_description)
4643 (aarch64_linux_can_use_hw_breakpoint)
4644 (aarch64_linux_insert_hw_breakpoint)
4645 (aarch64_linux_remove_hw_breakpoint)
4646 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
4647 (aarch64_linux_region_ok_for_hw_watchpoint)
4648 (aarch64_linux_stopped_data_address)
4649 (aarch64_linux_stopped_by_watchpoint)
4650 (aarch64_linux_watchpoint_addr_within_range)
4651 (aarch64_linux_can_do_single_step): Refactor as methods of
4652 aarch64_linux_nat_target.
4653 (super_post_startup_inferior): Delete.
4654 (_initialize_aarch64_linux_nat): Adjust to C++ification.
4656 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
4657 (the_hppa_linux_nat_target): New.
4658 (hppa_linux_fetch_inferior_registers)
4659 (hppa_linux_store_inferior_registers): Refactor as methods of
4660 hppa_linux_nat_target.
4661 (_initialize_hppa_linux_nat): Adjust to C++ification.
4663 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
4664 (the_ia64_linux_nat_target): New.
4665 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
4666 (ia64_linux_stopped_data_address)
4667 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
4668 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
4669 ia64_linux_nat_target methods.
4670 (super_xfer_partial): Delete.
4671 (_initialize_ia64_linux_nat): Adjust to C++ification.
4673 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
4674 (the_m32r_linux_nat_target): New.
4675 (m32r_linux_fetch_inferior_registers)
4676 (m32r_linux_store_inferior_registers): Refactor as
4677 m32r_linux_nat_target methods.
4678 (_initialize_m32r_linux_nat): Adjust to C++ification.
4680 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
4681 (the_m68k_linux_nat_target): New.
4682 (m68k_linux_fetch_inferior_registers)
4683 (m68k_linux_store_inferior_registers): Refactor as
4684 m68k_linux_nat_target methods.
4685 (_initialize_m68k_linux_nat): Adjust to C++ification.
4687 * s390-linux-nat.c (s390_linux_nat_target): New class.
4688 (the_s390_linux_nat_target): New.
4689 (s390_linux_fetch_inferior_registers)
4690 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
4691 (s390_insert_watchpoint, s390_remove_watchpoint)
4692 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
4693 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
4694 (s390_auxv_parse, s390_read_description): Refactor as methods of
4695 s390_linux_nat_target.
4696 (_initialize_s390_nat): Adjust to C++ification.
4698 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
4699 (the_sparc_linux_nat_target): New.
4700 (_initialize_sparc_linux_nat): Adjust to C++ification.
4701 * sparc-nat.c (sparc_fetch_inferior_registers)
4702 (sparc_store_inferior_registers): Remove target_ops parameter.
4703 * sparc-nat.h (sparc_fetch_inferior_registers)
4704 (sparc_store_inferior_registers): Remove target_ops parameter.
4705 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
4706 (the_sparc64_linux_nat_target): New.
4707 (_initialize_sparc64_linux_nat): Adjust to C++ification.
4709 * spu-linux-nat.c (spu_linux_nat_target): New class.
4710 (the_spu_linux_nat_target): New.
4711 (spu_child_post_startup_inferior, spu_child_post_attach)
4712 (spu_child_wait, spu_fetch_inferior_registers)
4713 (spu_store_inferior_registers, spu_xfer_partial)
4714 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
4716 (_initialize_spu_nat): Adjust to C++ification.
4718 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
4719 (the_tilegx_linux_nat_target): New.
4720 (fetch_inferior_registers, store_inferior_registers):
4721 Refactor as methods.
4722 (_initialize_tile_linux_nat): Adjust to C++ification.
4724 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
4725 (the_xtensa_linux_nat_target): New.
4726 (xtensa_linux_fetch_inferior_registers)
4727 (xtensa_linux_store_inferior_registers): Refactor as
4728 xtensa_linux_nat_target methods.
4729 (_initialize_xtensa_linux_nat): Adjust to C++ification.
4731 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
4732 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
4733 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
4734 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
4735 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
4736 (fbsd_stopped_by_sw_breakpoint)
4737 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
4738 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
4739 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
4740 (fbsd_post_startup_inferior, fbsd_post_attach)
4741 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
4742 (fbsd_set_syscall_catchpoint)
4743 (super_xfer_partial, super_resume, super_wait)
4744 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
4745 (fbsd_handle_debug_trap): Remove target_ops parameter.
4746 (fbsd_nat_add_target): Delete.
4747 * fbsd-nat.h: Include "inf-ptrace.h".
4748 (fbsd_nat_add_target): Delete.
4749 (USE_SIGTRAP_SIGINFO): Define.
4750 (fbsd_nat_target): New class.
4752 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
4753 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
4754 (amd64bsd_target): Delete.
4755 * amd64-bsd-nat.h: New file.
4756 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
4758 (amd64_fbsd_nat_target): New class.
4759 (the_amd64_fbsd_nat_target): New.
4760 (amd64fbsd_read_description): Refactor as method of
4761 amd64_fbsd_nat_target.
4762 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4763 (_initialize_amd64fbsd_nat): Adjust to C++ification.
4764 * amd64-nat.h (amd64bsd_target): Delete function declaration.
4765 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
4766 (i386bsd_store_inferior_registers): Remove target_ops parameter.
4767 (i386bsd_target): Delete.
4768 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
4769 (i386bsd_fetch_inferior_registers)
4770 (i386bsd_store_inferior_registers): Declare.
4771 (i386_bsd_nat_target): New class.
4772 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
4773 (the_i386_fbsd_nat_target): New.
4774 (i386fbsd_resume, i386fbsd_read_description): Refactor as
4775 i386_fbsd_nat_target methods.
4776 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4777 (_initialize_i386fbsd_nat): Adjust to C++ification.
4778 * x86-bsd-nat.c (super_mourn_inferior): Delete.
4779 (x86bsd_mourn_inferior, x86bsd_target): Delete.
4780 (_initialize_x86_bsd_nat): Adjust to C++ification.
4781 * x86-bsd-nat.h: Include "x86-nat.h".
4782 (x86bsd_target): Delete declaration.
4783 (x86bsd_nat_target): New class.
4785 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
4786 (the_aarch64_fbsd_nat_target): New.
4787 (aarch64_fbsd_fetch_inferior_registers)
4788 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
4789 aarch64_fbsd_nat_target.
4790 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
4791 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
4792 (the_alpha_bsd_nat_target): New.
4793 (alphabsd_fetch_inferior_registers)
4794 (alphabsd_store_inferior_registers): Refactor as
4795 alpha_bsd_nat_target methods.
4796 (_initialize_alphabsd_nat): Refactor as methods of
4797 alpha_bsd_nat_target.
4798 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
4799 (the_amd64_nbsd_nat_target): New.
4800 (_initialize_amd64nbsd_nat): Adjust to C++ification.
4801 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
4802 (the_amd64_obsd_nat_target): New.
4803 (_initialize_amd64obsd_nat): Adjust to C++ification.
4804 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
4805 (the_arm_fbsd_nat_target): New.
4806 (arm_fbsd_fetch_inferior_registers)
4807 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
4808 (_initialize_arm_fbsd_nat): Refactor as methods of
4809 arm_fbsd_nat_target.
4810 (_initialize_arm_fbsd_nat): Adjust to C++ification.
4811 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
4812 (the_arm_netbsd_nat_target): New.
4813 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
4814 arm_netbsd_nat_target.
4815 (_initialize_arm_netbsd_nat): Adjust to C++ification.
4816 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
4817 (the_hppa_nbsd_nat_target): New.
4818 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
4819 hppa_nbsd_nat_target methods.
4820 (_initialize_hppanbsd_nat): Adjust to C++ification.
4821 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
4822 (the_hppa_obsd_nat_target): New.
4823 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
4824 methods of hppa_obsd_nat_target.
4825 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
4827 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
4828 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
4830 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
4831 (_initialize_i386obsd_nat): Use add_target.
4832 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
4833 (the_m68k_bsd_nat_target): New.
4834 (m68kbsd_fetch_inferior_registers)
4835 (m68kbsd_store_inferior_registers): Refactor as methods of
4836 m68k_bsd_nat_target.
4837 (_initialize_m68kbsd_nat): Adjust to C++ification.
4838 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
4839 (the_mips_fbsd_nat_target): New.
4840 (mips_fbsd_fetch_inferior_registers)
4841 (mips_fbsd_store_inferior_registers): Refactor as methods of
4842 mips_fbsd_nat_target.
4843 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
4845 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
4846 (the_mips_nbsd_nat_target): New.
4847 (mipsnbsd_fetch_inferior_registers)
4848 (mipsnbsd_store_inferior_registers): Refactor as methods of
4849 mips_nbsd_nat_target.
4850 (_initialize_mipsnbsd_nat): Adjust to C++ification.
4851 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
4852 (the_mips64_obsd_nat_target): New.
4853 (mips64obsd_fetch_inferior_registers)
4854 (mips64obsd_store_inferior_registers): Refactor as methods of
4855 mips64_obsd_nat_target.
4856 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
4858 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
4860 * nbsd-nat.h: Include "inf-ptrace.h".
4861 (nbsd_nat_target): New class.
4862 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
4863 (obsd_wait): Refactor as methods of obsd_nat_target.
4864 (obsd_add_target): Delete.
4865 * obsd-nat.h: Include "inf-ptrace.h".
4866 (obsd_nat_target): New class.
4867 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
4868 (the_ppc_fbsd_nat_target): New.
4869 (ppcfbsd_fetch_inferior_registers)
4870 (ppcfbsd_store_inferior_registers): Refactor as methods of
4871 ppc_fbsd_nat_target.
4872 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
4874 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
4875 (the_ppc_nbsd_nat_target): New.
4876 (ppcnbsd_fetch_inferior_registers)
4877 (ppcnbsd_store_inferior_registers): Refactor as methods of
4878 ppc_nbsd_nat_target.
4879 (_initialize_ppcnbsd_nat): Adjust to C++ification.
4880 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
4881 (the_ppc_obsd_nat_target): New.
4882 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
4883 methods of ppc_obsd_nat_target.
4884 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
4886 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
4887 (the_sh_nbsd_nat_target): New.
4888 (shnbsd_fetch_inferior_registers)
4889 (shnbsd_store_inferior_registers): Refactor as methods of
4891 (_initialize_shnbsd_nat): Adjust to C++ification.
4892 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
4893 (inf_ptrace_xfer_partial): Delete.
4894 (sparc_xfer_partial, sparc_target): Delete.
4895 * sparc-nat.h (sparc_fetch_inferior_registers)
4896 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
4897 (sparc_target): Delete function declaration.
4898 (sparc_target): New template class.
4899 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
4900 (_initialize_sparcnbsd_nat): Adjust to C++ification.
4901 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
4902 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
4904 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
4905 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
4906 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
4907 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
4909 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
4910 (the_vax_bsd_nat_target): New.
4911 (vaxbsd_fetch_inferior_registers)
4912 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
4914 (_initialize_vaxbsd_nat): Adjust to C++ification.
4916 * bsd-kvm.c (bsd_kvm_target): New class.
4917 (bsd_kvm_ops): Now a bsd_kvm_target.
4918 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
4919 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
4920 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
4922 (bsd_kvm_return_one): Delete.
4923 (bsd_kvm_add_target): Adjust to C++ification.
4925 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
4926 (nto_procfs_target_procfs): New classes.
4927 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
4928 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
4929 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
4930 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
4931 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
4932 (procfs_remove_hw_breakpoint, procfs_resume)
4933 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
4934 (procfs_kill_inferior, procfs_store_registers)
4935 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
4936 as methods of nto_procfs_target.
4937 (nto_procfs_ops): Now an nto_procfs_target_procfs.
4938 (nto_native_ops): Delete.
4939 (procfs_open, procfs_native_open): Delete.
4940 (nto_native_ops): Now an nto_procfs_target_native.
4941 (init_procfs_targets): Adjust to C++ification.
4942 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
4943 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
4944 Refactor as methods of nto_procfs_target.
4946 * go32-nat.c (go32_nat_target): New class.
4947 (the_go32_nat_target): New.
4948 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
4949 (go32_store_registers, go32_xfer_partial, go32_files_info)
4950 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
4951 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
4952 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
4953 (go32_pid_to_str): Refactor as methods of go32_nat_target.
4954 (go32_target): Delete.
4955 (_initialize_go32_nat): Adjust to C++ification.
4957 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
4958 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
4959 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
4960 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
4962 (gnu_target): Delete.
4963 * gnu-nat.h (gnu_target): Delete.
4964 (gnu_nat_target): New class.
4965 * i386-gnu-nat.c (gnu_base_target): New.
4966 (i386_gnu_nat_target): New class.
4967 (the_i386_gnu_nat_target): New.
4968 (_initialize_i386gnu_nat): Adjust to C++ification.
4970 2018-05-02 Pedro Alves <palves@redhat.com>
4972 * bfd-target.c (target_bfd_xclose): Rename to ...
4973 (target_bfd_close): ... this.
4974 (target_bfd_reopen): Adjust.
4975 * target.c (target_close): Remove references to to_xclose.
4976 * target.h (target_ops::to_xclose): Delete.
4977 (target_ops::to_close): Update comments.
4979 2018-05-02 Pedro Alves <palves@redhat.com>
4981 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
4983 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
4984 * inf-ptrace.c (inf_ptrace_register_u_offset)
4985 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4986 (inf_ptrace_store_register, inf_ptrace_store_registers)
4987 (inf_ptrace_trad_target): Move to ...
4988 * linux-nat-trad.c: ... this new file.
4989 * linux-nat-trad.h: New file.
4990 * linux-nat.c (linux_target_install_ops): Make extern.
4991 (linux_trad_target): Delete.
4992 * linux-nat.h (linux_trad_target): Delete declaration.
4993 (linux_target_install_ops): Declare.
4994 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
4997 2018-05-02 Pedro Alves <palves@redhat.com>
4999 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5000 procfs_target/add_target here.
5001 * procfs.c (procfs_target): Make static.
5002 (_initialize_procfs): Call add_target here.
5003 * procfs.h (struct target_ops): Remove forward declaration.
5004 (procfs_target): Remove declaration.
5005 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
5007 2018-05-02 Pedro Alves <palves@redhat.com>
5009 * procfs.c (procfs_stopped_by_watchpoint)
5010 (procfs_insert_watchpoint, procfs_remove_watchpoint)
5011 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
5013 (procfs_use_watchpoints): Delete, move contents...
5014 (procfs_target): ... here.
5015 * procfs.h (procfs_use_watchpoints): Delete declaration.
5016 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5017 procfs_use_watchpoints.
5018 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
5019 procfs_use_watchpoints.
5021 2018-05-02 Tom Tromey <tom@tromey.com>
5024 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
5025 and var_zuinteger_unlimited.
5026 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
5027 and PARAM_ZUINTEGER_UNLIMITED.
5028 (set_parameter_value): Handle var_zuinteger and
5029 var_zuinteger_unlimited.
5030 (add_setshow_generic): Likewise.
5031 (parmpy_init): Likewise.
5033 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
5036 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
5037 pointer is not null before dereferencing it.
5039 2018-04-30 Tom Tromey <tom@tromey.com>
5041 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
5044 2018-04-30 Tom Tromey <tom@tromey.com>
5046 * breakpoint.c (mention): Remove use of is_mi_like_p.
5047 (print_mention_ranged_breakpoint): Likewise.
5048 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
5051 2018-04-30 Tom Tromey <tom@tromey.com>
5053 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5055 2018-04-30 Tom Tromey <tom@tromey.com>
5057 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5058 (info_spu_event_command): Remove some uses of is_mi_like_p.
5060 2018-04-30 Tom Tromey <tom@tromey.com>
5062 * python/py-framefilter.c (py_print_single_arg)
5063 (enumerate_locals, py_print_args, py_print_frame): Remove some
5064 uses of is_mi_like_p.
5066 2018-04-30 Tom Tromey <tom@tromey.com>
5069 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5070 * ui-out.h (ui_out::is_mi_like_p): Now const.
5071 (ui_out::do_is_mi_like_p): Now const.
5072 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5074 2018-04-30 Tom Tromey <tom@tromey.com>
5076 * varobj.c (varobj_set_visualizer): Use new_reference.
5077 * python/python.c (gdbpy_decode_line): Use new_reference.
5078 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5081 2018-04-30 Tom Tromey <tom@tromey.com>
5083 * varobj.c (install_new_value): Use new_reference.
5084 * value.h (value_incref): Return void. Swap intro comment with
5086 * value.c (set_value_parent): Use new_reference.
5087 (value_incref): Return void. Update intro comment.
5088 (release_value): Use new_reference.
5089 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5091 2018-04-30 Tom Tromey <tom@tromey.com>
5093 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5094 * gdb_bfd.h (new_bfd_ref): Remove.
5095 (gdb_bfd_open): Update comment.
5096 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5097 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5098 (gdb_bfd_fdopenr): Use new_reference.
5099 * exec.c (exec_file_attach): Use new_reference.
5101 2018-04-30 Tom Tromey <tom@tromey.com>
5103 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5106 2018-04-30 Tom Tromey <tom@tromey.com>
5108 * jit.c (jit_read_code_entry): Use type_align.
5109 * i386-tdep.c (i386_gdbarch_init): Don't call
5110 set_gdbarch_long_long_align_bit.
5111 * gdbarch.sh: Remove long_long_align_bit.
5112 * gdbarch.c, gdbarch.h: Rebuild.
5113 * arc-tdep.c (arc_type_align): New function.
5114 (arc_gdbarch_init): Use arc_type_align. Don't call
5115 set_gdbarch_long_long_align_bit.
5117 2018-04-30 Tom Tromey <tom@tromey.com>
5119 * rust-lang.c (rust_type_alignment): Remove.
5120 (rust_composite_type): Use type_align.
5122 2018-04-30 Tom Tromey <tom@tromey.com>
5124 * NEWS: Mention Type.align.
5125 * python/py-type.c (typy_get_alignof): New function.
5126 (type_object_getset): Add "alignof".
5128 2018-04-30 Tom Tromey <tom@tromey.com>
5132 * std-operator.def (UNOP_ALIGNOF): New operator.
5133 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5135 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5136 * c-lang.c (c_op_print_tab): Add alignof.
5137 * c-exp.y (ALIGNOF): New token.
5138 (exp): Add "ALIGNOF" production.
5139 (ident_tokens): Add _Alignof and alignof.
5141 2018-04-30 Tom Tromey <tom@tromey.com>
5143 * i386-tdep.c (i386_type_align): New function.
5144 (i386_gdbarch_init): Update.
5145 * gdbarch.sh (type_align): New method.
5146 * gdbarch.c, gdbarch.h: Rebuild.
5147 * arch-utils.h (default_type_align): Declare.
5148 * arch-utils.c (default_type_align): New function.
5149 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
5150 (struct type) <align_log2>: New field.
5151 <instance_flags>: Now a bitfield.
5152 (TYPE_RAW_ALIGN): New macro.
5153 (type_align, type_raw_align, set_type_align): Declare.
5154 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
5156 * dwarf2read.c (quirk_rust_enum): Set type alignment.
5157 (get_alignment, maybe_set_alignment): New functions.
5158 (read_structure_type, read_enumeration_type, read_array_type)
5159 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
5160 (read_subrange_type, read_base_type): Set type alignment.
5162 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
5164 * dwarf2read.c (read_index_from_section): Use bool.
5166 2018-04-29 Fabian Groffen <grobian@gentoo.org>
5169 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
5172 2018-04-29 John Reiser <jreiser@BitWagon.com>
5175 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5176 last step, and do it atomically.
5178 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
5180 * compile/compile-c-types.c (convert_int, convert_float):
5183 2018-04-27 Tom Tromey <tom@tromey.com>
5186 * rust-lang.c (rust_inclusive_range_type_p): New function.
5187 (rust_range): Handle inclusive ranges.
5188 (rust_compute_range): Likewise.
5189 * rust-exp.y (struct rust_op) <inclusive>: New field.
5190 (DOTDOTEQ): New constant.
5191 (range_expr): Add "..=" productions.
5192 (operator_tokens): Add "..=" token.
5193 (ast_range): Add "inclusive" parameter.
5194 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5196 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5198 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5199 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5201 * expprint.c (print_subexp_standard): Handle new bounds values.
5202 (dump_subexp_body_standard): Likewise.
5204 2018-04-27 Tom Tromey <tom@tromey.com>
5206 * configure: Rebuild.
5207 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5208 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5210 (class symbol_needs_eval_context): Likewise.
5211 * dwarf2read.c (mock_mapped_index::symbol_name_count)
5212 (mock_mapped_index::symbol_name_at): Use "override". Remove
5214 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5216 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5217 * aarch64-tdep.c (instruction_reader::read): Use "override".
5218 (instruction_reader_test::read): Likewise.
5219 * arm-tdep.c (instruction_reader::read): Use "override".
5220 (instruction_reader_thumb::read): Likewise.
5222 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
5225 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5226 instead of remote_send.
5227 (remote_send): Remove.
5229 2018-04-26 Pedro Alves <palves@redhat.com>
5231 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5232 find_function_start_sal instead of find_pc_line.
5234 2018-04-26 Pedro Alves <palves@redhat.com>
5236 * breakpoint.c (set_breakpoint_location_function): Handle
5238 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5239 * elfread.c (elf_symtab_read): Give data symbols with
5240 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5241 (elf_rel_plt_read): Update comment.
5242 * linespec.c (convert_linespec_to_sals): Handle
5244 (minsym_found): Handle mst_data_gnu_ifunc.
5245 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5246 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5247 * parse.c (find_minsym_type_and_address): Handle
5249 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5250 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5251 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5253 <mst_data_gnu_ifunc>: New enumerator.
5255 2018-04-26 Pedro Alves <palves@redhat.com>
5257 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5258 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5259 'want_trampoline' parameter by a lookup_msym_prefer parameter.
5261 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5262 (lookup_minimal_symbol_by_pc): Adjust.
5263 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5264 (lookup_solib_trampoline_symbol_by_pc): Adjust.
5265 * minsyms.h (lookup_msym_prefer): New enum.
5266 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5267 parameter by a lookup_msym_prefer parameter.
5269 2018-04-26 Pedro Alves <palves@redhat.com>
5271 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5272 ends in "@plt" instead of looking at the symbol's section.
5274 2018-04-26 Pedro Alves <palves@redhat.com>
5276 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
5278 (find_pc_partial_function_gnu_ifunc): Rename to ...
5279 (find_pc_partial_function): ... this, and remove references to
5281 (find_pc_partial_function): Delete old implementation.
5282 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5284 2018-04-26 Pedro Alves <palves@redhat.com>
5286 * linespec.c (struct bound_minimal_symbol_search_key): New.
5287 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
5288 skip first line if we found a GNU ifunc minimal symbol by name.
5289 (compare_msymbols): Change parameters to work with a destructured
5291 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
5294 2018-04-26 Pedro Alves <palves@redhat.com>
5296 * breakpoint.c (set_breakpoint_location_function): Don't resolve
5297 ifunc targets here. Instead, if we have an ifunc minsym, use its
5299 (add_location_to_breakpoint): Store the minsym and the objfile in
5300 the breakpoint location.
5301 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
5302 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
5303 Record the minsym in the sal.
5304 * symtab.h (symtab_and_line) <msymbol>: New field.
5306 2018-04-26 Pedro Alves <palves@redhat.com>
5308 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
5309 unless we actually resolved the ifunc.
5311 2018-04-26 Pedro Alves <palves@redhat.com>
5313 * c-exp.y (variable production): Prefer ifunc minsyms over
5314 regular function symbols.
5315 * symtab.c (find_gnu_ifunc): New function.
5316 * minsyms.h (lookup_msym_prefer): New enum.
5317 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5318 parameter by a lookup_msym_prefer parameter.
5319 * symtab.h (find_gnu_ifunc): New declaration.
5321 2018-04-26 Pedro Alves <palves@redhat.com>
5323 * blockframe.c (find_gnu_ifunc_target_type): New function.
5324 (find_function_type): New.
5325 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
5326 return a value with a memory address.
5327 (eval_call): For calls to GNU ifunc functions, try to find the
5328 type of the target function from the type that the resolver
5330 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
5332 * infcall.c (find_function_return_type): Delete.
5333 (find_function_addr): Add 'function_type' parameter. For calls to
5334 GNU ifunc functions, try to find the type of the target function
5335 from the type that the resolver returns, and return it via
5337 (call_function_by_hand_dummy): Adjust to use the function type
5338 returned by find_function_addr.
5339 (find_function_addr): Add 'function_type' parameter and move
5341 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
5344 2018-04-26 Pedro Alves <palves@redhat.com>
5346 * c-exp.y (variable production): Skip finding an alias for ifunc
5349 2018-04-26 Pedro Alves <palves@redhat.com>
5351 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
5353 2018-04-25 Pedro Alves <palves@redhat.com>
5355 * infcmd.c (kill_command): Print the pid as string, not the whole
5356 thread's ptid. Add comment. s/has been killed/killed/ in output
5358 * remote.c (remote_detach_1): Print the pid as string, not the
5359 whole thread's ptid.
5361 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5362 Sergio Durigan Junior <sergiodj@redhat.com>
5363 Pedro Alves <palves@redhat.com>
5365 * infcmd.c (kill_command): Print message when inferior has
5367 * inferior.c (print_inferior_events): Remove 'static'. Set as
5369 (add_inferior): Improve message printed when
5370 'print_inferior_events' is on.
5371 (exit_inferior): Remove message printed when
5372 'print_inferior_events' is on.
5373 (detach_inferior): Improve message printed when
5374 'print_inferior_events' is on.
5375 (initialize_inferiors): Use 'add_inferior_silent' to set
5376 'current_inferior_'.
5377 * inferior.h (print_inferior_events): Declare here as
5379 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
5380 '[Detaching...]' messages when 'print_inferior_events' is on.
5381 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
5382 as prefix/suffix for messages. Remove periods. Fix erroneous
5383 'Detaching after fork from child...', replace it by '... from
5385 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
5386 prefix/suffix when printing 'Detaching...' messages. Print
5387 them when 'print_inferior_events' is on.
5388 * remote.c (remote_detach_1): Print message when detaching
5389 from inferior and '!is_fork_parent'.
5391 2018-04-24 Tom Tromey <tom@tromey.com>
5393 * cli-out.h: Reindent.
5395 2018-04-24 Tom Tromey <tom@tromey.com>
5397 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
5398 (cli_ui_out::do_field_string): Use fputs_filtered.
5399 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
5401 2018-04-23 Tom Tromey <tom@tromey.com>
5403 * guile/scm-frame.c (gdbscm_frame_read_var): Use
5404 gdb::unique_xmalloc_ptr.
5406 2018-04-23 Tom Tromey <tom@tromey.com>
5408 * configure: Rebuild.
5410 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
5413 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
5414 prepare_for_testing. Set normal_bp to r_debug_state if target
5417 2018-04-21 Pedro Alves <palves@redhat.com>
5418 Rajendra SY <rajendra.sy@gmail.com>
5420 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
5421 * remote.c (extended_remote_attach): In all-stop mode, mark the
5422 thread as executing.
5424 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5426 * thread.c (thread_apply_all_command): Fix comment.
5427 (thread_command): Fix comment.
5429 2018-04-10 Alan Hayward <alan.hayward@arm.com>
5431 * common/tdesc.h (tdesc_create_feature): Remove xml filename
5433 * features/aarch64-core.c (create_feature_aarch64_core):
5435 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
5437 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
5439 * features/i386/32bit-avx512.c
5440 (create_feature_i386_32bit_avx512): Likewise.
5441 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
5443 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
5445 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
5447 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
5449 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
5451 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
5453 * features/i386/64bit-avx512.c
5454 (create_feature_i386_64bit_avx512): Likewise.
5455 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
5457 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
5459 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
5461 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
5463 * features/i386/64bit-segments.c
5464 (create_feature_i386_64bit_segments): Likewise.
5465 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
5467 * features/i386/x32-core.c
5468 (create_feature_i386_x32_core): Likewise.
5469 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
5470 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
5471 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
5472 * target-descriptions.c: In generated code, don't pass xml
5475 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5477 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
5478 (print_xml_feature::visit_post): Likewise.
5479 (print_xml_feature::visit): Likewise.
5480 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
5481 (print_xml_feature): Add new class.
5482 * regformats/regdat.sh: Null xmltarget on feature targets.
5483 * target-descriptions.c (struct target_desc): Add xmltarget.
5484 (maintenance_check_tdesc_xml_convert): Add unittest function.
5485 (tdesc_get_features_xml): Add function to get xml.
5486 (maintenance_check_xml_descriptions): Test xml generation.
5487 * xml-tdesc.c (string_read_description_xml): Add function.
5488 * xml-tdesc.h (string_read_description_xml): Add declaration.
5490 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5492 * features/Makefile: Add feature marker to targets with new style
5493 target descriptions.
5494 * regformats/aarch64.dat: Regenerate.
5495 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
5496 * regformats/i386/amd64-avx-linux.dat: Likewise.
5497 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
5498 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
5499 * regformats/i386/amd64-linux.dat: Likewise.
5500 * regformats/i386/amd64-mpx-linux.dat: Likewise.
5501 * regformats/i386/amd64.dat: Likewise.
5502 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
5503 * regformats/i386/i386-avx-linux.dat: Likewise.
5504 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
5505 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
5506 * regformats/i386/i386-linux.dat: Likewise.
5507 * regformats/i386/i386-mmx-linux.dat: Likewise.
5508 * regformats/i386/i386-mpx-linux.dat: Likewise.
5509 * regformats/i386/i386.dat: Likewise.
5510 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
5511 * regformats/i386/x32-avx-linux.dat: Likewise.
5512 * regformats/i386/x32-linux.dat: Likewise.
5513 * regformats/tic6x-c62x-linux.dat: Likewise.
5514 * regformats/tic6x-c64x-linux.dat: Likewise.
5515 * regformats/tic6x-c64xp-linux.dat: Likewise.
5516 * regformats/regdat.sh: Parse feature marker.
5518 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5520 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
5521 (tdesc_osabi_name): Likewise.
5522 * target-descriptions.c (tdesc_architecture_name): Add new
5524 (tdesc_osabi_name): Likewise.
5526 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5528 * common/tdesc.c (tdesc_predefined_type): Move to here.
5529 (tdesc_named_type): Likewise.
5530 (tdesc_create_vector): Likewise.
5531 (tdesc_create_struct): Likewise.
5532 (tdesc_set_struct_size): Likewise.
5533 (tdesc_create_union): Likewise.
5534 (tdesc_create_flags): Likewise.
5535 (tdesc_create_enum): Likewise.
5536 (tdesc_add_field): Likewise.
5537 (tdesc_add_typed_bitfield): Likewise.
5538 (tdesc_add_bitfield): Likewise.
5539 (tdesc_add_flag): Likewise.
5540 (tdesc_add_enum_value): Likewise.
5541 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
5542 (struct tdesc_type_vector): Likewise.
5543 (struct tdesc_type_field): Likewise.
5544 (struct tdesc_type_with_fields): Likewise.
5545 (tdesc_create_enum): Add declaration.
5546 (tdesc_add_typed_bitfield): Likewise.
5547 (tdesc_add_enum_value): Likewise.
5548 * target-descriptions.c (tdesc_type_field): Move from here.
5549 (tdesc_type_builtin): Likewise.
5550 (tdesc_type_vector): Likewise.
5551 (tdesc_type_with_fields): Likewise.
5552 (tdesc_predefined_types): Likewise.
5553 (tdesc_named_type): Likewise.
5554 (tdesc_create_vector): Likewise.
5555 (tdesc_create_struct): Likewise.
5556 (tdesc_set_struct_size): Likewise.
5557 (tdesc_create_union): Likewise.
5558 (tdesc_create_flags): Likewise.
5559 (tdesc_create_enum): Likewise.
5560 (tdesc_add_field): Likewise.
5561 (tdesc_add_typed_bitfield): Likewise.
5562 (tdesc_add_bitfield): Likewise.
5563 (tdesc_add_flag): Likewise.
5564 (tdesc_add_enum_value): Likewise.
5565 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
5566 (tdesc_add_typed_bitfield): Likewise.
5567 (tdesc_add_enum_value): Likewise.
5569 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5571 * common/tdesc.c (tdesc_feature::accept): Move to here.
5572 (tdesc_feature::operator==): Likewise.
5573 (tdesc_create_reg): Likewise.
5574 * common/tdesc.h (tdesc_type_kind): Likewise.
5575 (struct tdesc_type): Likewise.
5576 (struct tdesc_feature): Likewise.
5577 * regformats/regdat.sh: Create a feature.
5578 * target-descriptions.c (tdesc_type_kind): Move from here.
5579 (tdesc_type): Likewise.
5580 (tdesc_type_up): Likewise.
5581 (tdesc_feature): Likewise.
5582 (tdesc_create_reg): Likewise.
5584 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5586 * Makefile.in: Add arch/tdesc.c
5587 * common/tdesc.c: New file.
5588 * common/tdesc.h (tdesc_element_visitor): Move to here.
5589 (tdesc_element): Likewise.
5590 (tdesc_reg): Likewise.
5591 (tdesc_reg_up): Likewise.
5592 * regformats/regdef.h (reg): Add offset to constructors.
5593 * target-descriptions.c (tdesc_element_visitor): Move from here.
5594 (tdesc_element): Likewise.
5595 (tdesc_reg): Likewise.
5596 (tdesc_reg_up): Likewise.
5598 2018-04-17 Tom Tromey <tom@tromey.com>
5600 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
5603 2018-04-17 Tom Tromey <tom@tromey.com>
5605 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
5607 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
5609 * symtab.c (print_symbol_info): Skip printing filename and line
5610 number when `last' is NULL.
5611 (symtab_symbol_info): Use empty string instead of NULL for first
5612 invocation of print_symbol_info.
5613 (rbreak_command): Pass NULL to `last' parameter of
5616 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
5618 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
5621 2018-04-16 Pedro Alves <palves@redhat.com>
5623 * MAINTAINERS (sh): Remove.
5624 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
5625 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
5626 (ALLDEPFILES): Remove sh64-tdep.c.
5627 * NEWS: Mentions that support for SH-5/SH64 is removed.
5628 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
5629 (sh*-*-openbsd*): Ditto.
5630 (sh64-*-elf*): Remove.
5632 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
5633 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
5634 * sh-tdep.c: No longer include "sh64-tdep.h".
5635 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
5636 * sh64-tdep.c, sh64-tdep.h: Remove files.
5638 2018-04-16 Pedro Alves <palves@redhat.com>
5640 * MAINTAINERS: Remove m88k.
5641 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
5642 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
5643 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
5644 * NEWS: Mention that support for m88k was removed.
5645 * configure.host (m88*-*-*): Remove support.
5646 * configure.nat (m88k-*-*): Remove support.
5647 * configure.tgt (m88*-*-openbsd*): Remove.
5648 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
5650 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
5652 * configure.tgt (x86_tobjs): New variable.
5653 (amd64_tobjs, i386_tobjs): Use it.
5655 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5657 * symtab.c (print_symbol_info): Precede the symbol definition by
5658 the line number when available.
5659 * NEWS: Advertise this enhancement.
5661 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5663 * NEWS (New options): announce set/show record btrace cpu.
5664 * btrace.c: Include record-btrace.h.
5665 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
5666 the vendor is unknown.
5667 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
5668 Maybe overwrite the btrace configuration's cpu.
5669 (btrace_compute_ftrace): Add cpu parameter. Update callers.
5670 (btrace_fetch): Add cpu parameter. Update callers.
5671 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
5672 Maybe overwrite the btrace configuration's cpu. Skip enabling
5673 errata workarounds if the vendor is unknown.
5674 * python/py-record-btrace.c: Include record-btrace.h.
5675 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
5676 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
5677 * record-btrace.c (record_btrace_cpu_state_kind): New.
5678 (record_btrace_cpu): New.
5679 (set_record_btrace_cpu_cmdlist): New.
5680 (record_btrace_get_cpu): New.
5681 (require_btrace_thread, record_btrace_info)
5682 (record_btrace_resume_thread): Call record_btrace_get_cpu.
5683 (cmd_set_record_btrace_cpu_none): New.
5684 (cmd_set_record_btrace_cpu_auto): New.
5685 (cmd_set_record_btrace_cpu): New.
5686 (cmd_show_record_btrace_cpu): New.
5687 (_initialize_record_btrace): Initialize set/show record btrace cpu
5689 * record-btrace.h (record_btrace_get_cpu): New.
5691 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5693 * record.c (set_record_command): Fix typo in message.
5695 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5697 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
5699 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5701 * infrun.c (process_event_stop_test): Call
5702 gdbarch_in_indirect_branch_thunk.
5703 * gdbarch.sh (in_indirect_branch_thunk): New.
5704 * gdbarch.c: Regenerated.
5705 * gdbarch.h: Regenerated.
5708 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
5709 (HFILES_NO_SRCDIR): Add x86-tdep.h.
5710 (ALLDEPFILES): Add x86-tdep.c.
5711 * arch-utils.h (default_in_indirect_branch_thunk): New.
5712 * arch-utils.c (default_in_indirect_branch_thunk): New.
5713 * i386-tdep: Include x86-tdep.h.
5714 (i386_in_indirect_branch_thunk): New.
5715 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
5717 * amd64-tdep: Include x86-tdep.h.
5718 (amd64_in_indirect_branch_thunk): New.
5719 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
5721 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5724 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
5725 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
5726 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
5729 2018-04-12 Tom Tromey <tom@tromey.com>
5731 * rust-lang.c (rust_print_struct_def): Remove univariant code.
5732 (rust_evaluate_subexp): Likewise.
5734 2018-04-12 Pedro Alves <palves@redhat.com>
5736 * procfs.c (procfs_detach): Make forward declaration's prototype
5737 match definition's protototype.
5738 (proc_get_LDT_entry): Remove stale do_cleanups call.
5740 2018-04-12 Pedro Alves <palves@redhat.com>
5742 * target.h (target_ops::to_has_exited): Delete.
5743 (target_has_exited): Delete.
5744 * target-delegates.c: Regenerate.
5746 2018-04-11 Pedro Alves <palves@redhat.com>
5748 * target.c (fileio_fh_t::t): Add comment.
5749 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5750 (target_fileio_close): Handle a NULL target.
5751 (invalidate_fileio_fh): New.
5752 (target_close): Call it.
5753 * remote.c (remote_hostio_send_command): No longer check whether
5754 remote_desc is open.
5756 2018-04-11 Pedro Alves <palves@redhat.com>
5758 * target.c (fileio_fh_t): Make it a named struct instead of a
5760 (fileio_fh_t::is_closed): New method.
5761 (DEF_VEC_O (fileio_fh_t)): Remove.
5762 (fileio_fhandles): Now a std::vector.
5763 (is_closed_fileio_fh): Delete.
5764 (acquire_fileio_fd): Adjust. Rename parameters.
5765 (release_fileio_fd): Adjust.
5766 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
5767 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5768 (target_fileio_close): Adjust.
5770 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
5772 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
5775 2018-04-10 Pedro Alves <palves@redhat.com>
5777 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
5778 (scoped_finish_thread_state): New class.
5779 * infcmd.c (run_command_1): Use it instead of finish_thread_state
5781 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
5782 (fetch_inferior_event, normal_stop): Likewise.
5783 * thread.c (finish_thread_state_cleanup): Delete.
5785 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5786 Pedro Alves <palves@redhat.com>
5788 * value.c: Include "selftest.h" and "common/array-view.h".
5789 (struct range) <operator ==>: New.
5790 (test_ranges_contain): New.
5791 (check_ranges_vector): New.
5792 (test_insert_into_bit_range_vector): New.
5793 (_initialize_values): Register selftests.
5794 * common/array-view.h (operator==, operator!=): New.
5796 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5798 * common/gdb_vecs.h (unordered_remove): Add overload that takes
5800 * inline-frame.c: Include <algorithm>.
5801 (struct inline_state): Add constructor.
5802 (inline_state_s): Remove.
5803 (DEF_VEC_O(inline_state_s)): Remove.
5804 (inline_states): Change type to std::vector.
5805 (find_inline_frame_state): Adjust to std::vector.
5806 (allocate_inline_frame_state): Remove.
5807 (clear_inline_frame_state): Adjust to std::vector.
5808 (skip_inline_frames): Adjust to std::vector.
5810 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5812 * tracepoint.h (struct trace_state_variable): Add constructor.
5813 <name>: Change type to std::string.
5814 * tracepoint.c (tsv_s): Remove.
5815 (DEF_VEC_O(tsv_s)): Remove.
5816 (tvariables): Change to std::vector.
5817 (create_trace_state_variable): Adjust to std::vector.
5818 (find_trace_state_variable): Likewise.
5819 (find_trace_state_variable_by_number): Likewise.
5820 (delete_trace_state_variable): Likewise.
5821 (trace_variable_command): Adjust to std::string.
5822 (delete_trace_variable_command): Likewise.
5823 (tvariables_info_1): Adjust to std::vector.
5824 (save_trace_state_variables): Likewise.
5825 (start_tracing): Likewise.
5826 (merge_uploaded_trace_state_variables): Adjust to std::vector
5828 * target.h (struct target_ops)
5829 <to_download_trace_state_variable>: Pass reference to
5830 trace_state_variable.
5831 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
5832 * target-delegates.c: Re-generate.
5833 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
5834 (mi_tsv_deleted): Likewise.
5835 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
5836 * remote.c (remote_download_trace_state_variable): Change
5837 pointer to reference and adjust.
5838 * make-target-delegates (parse_argtypes): Handle references.
5839 (write_function_header): Likewise.
5840 (munge_type): Likewise.
5842 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5844 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5845 string_view-selftests.c.
5846 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
5848 * unittests/basic_string_view/cons/char/1.cc: Likewise.
5849 * unittests/basic_string_view/cons/char/2.cc: Likewise.
5850 * unittests/basic_string_view/cons/char/3.cc: Likewise.
5851 * unittests/basic_string_view/element_access/char/1.cc:
5853 * unittests/basic_string_view/element_access/char/empty.cc:
5855 * unittests/basic_string_view/element_access/char/front_back.cc:
5857 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
5858 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
5860 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
5862 * unittests/basic_string_view/modifiers/swap/char/1.cc:
5864 * unittests/basic_string_view/operations/compare/char/1.cc:
5866 * unittests/basic_string_view/operations/compare/char/13650.cc:
5868 * unittests/basic_string_view/operations/copy/char/1.cc:
5870 * unittests/basic_string_view/operations/data/char/1.cc:
5872 * unittests/basic_string_view/operations/find/char/1.cc:
5874 * unittests/basic_string_view/operations/find/char/2.cc:
5876 * unittests/basic_string_view/operations/find/char/3.cc:
5878 * unittests/basic_string_view/operations/find/char/4.cc:
5880 * unittests/basic_string_view/operations/rfind/char/1.cc:
5882 * unittests/basic_string_view/operations/rfind/char/2.cc:
5884 * unittests/basic_string_view/operations/rfind/char/3.cc:
5886 * unittests/basic_string_view/operations/substr/char/1.cc:
5888 * unittests/basic_string_view/operators/char/2.cc: Likewise.
5889 * unittests/string_view-selftests.c: New file.
5891 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5893 * unittests/basic_string_view/capacity/1.cc: New file.
5894 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
5895 * unittests/basic_string_view/cons/char/1.cc: New file.
5896 * unittests/basic_string_view/cons/char/2.cc: New file.
5897 * unittests/basic_string_view/cons/char/3.cc: New file.
5898 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
5899 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
5900 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
5901 * unittests/basic_string_view/element_access/char/1.cc: New file.
5902 * unittests/basic_string_view/element_access/char/2.cc: New file.
5903 * unittests/basic_string_view/element_access/char/empty.cc: New file.
5904 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
5905 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
5906 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
5907 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
5908 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
5909 * unittests/basic_string_view/include.cc: New file.
5910 * unittests/basic_string_view/inserters/char/1.cc: New file.
5911 * unittests/basic_string_view/inserters/char/2.cc: New file.
5912 * unittests/basic_string_view/inserters/char/3.cc: New file.
5913 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
5914 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
5915 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
5916 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
5917 * unittests/basic_string_view/literals/types.cc: New file.
5918 * unittests/basic_string_view/literals/values.cc: New file.
5919 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
5920 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
5921 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
5922 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
5923 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
5924 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
5925 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
5926 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
5927 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
5928 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
5929 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
5930 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
5931 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
5932 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
5933 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
5934 * unittests/basic_string_view/operations/data/char/1.cc: New file.
5935 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
5936 * unittests/basic_string_view/operations/find/char/1.cc: New file.
5937 * unittests/basic_string_view/operations/find/char/2.cc: New file.
5938 * unittests/basic_string_view/operations/find/char/3.cc: New file.
5939 * unittests/basic_string_view/operations/find/char/4.cc: New file.
5940 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
5941 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
5942 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
5943 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
5944 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
5945 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
5946 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
5947 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
5948 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
5949 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
5950 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
5951 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
5952 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
5953 * unittests/basic_string_view/operators/char/2.cc: New file.
5954 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
5955 * unittests/basic_string_view/range_access/char/1.cc: New file.
5956 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
5957 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
5958 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
5959 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
5960 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
5961 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
5962 * unittests/basic_string_view/requirements/typedefs.cc: New file.
5963 * unittests/basic_string_view/typedefs.cc: New file.
5964 * unittests/basic_string_view/types/1.cc: New file.
5966 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5968 * common/gdb_string_view.h: Remove libstdc++ implementation
5969 details, adjust to gdb reality.
5970 * common/gdb_string_view.tcc: Likewise.
5971 * cli/cli-script.c (struct string_view): Remove.
5972 (user_args) <m_args>: Change element type to gdb::string_view.
5973 (user_args::insert_args): Adjust.
5975 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5977 * common/gdb_string_view.h: New file.
5978 * common/gdb_string_view.tcc: New file.
5980 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5982 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
5983 * configure: Re-generate.
5985 2018-04-09 Pedro Alves <palves@redhat.com>
5987 * gdbarch.sh: Include "observable.h" instead of "observer.h".
5988 (set_target_gdbarch): Call
5989 gdb::observers::architecture_changed.notify instead of
5990 observer_notify_architecture_changed.
5992 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5994 * tracepoint.c (struct current_traceframe_cleanup): Remove.
5995 (do_restore_current_traceframe_cleanup): Remove.
5996 (restore_current_traceframe_cleanup_dtor): Remove.
5997 (make_cleanup_restore_current_traceframe): Remove.
5998 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
6000 * tracepoint.h (struct scoped_restore_current_traceframe): New.
6001 * infrun.c (fetch_inferior_event): Use
6002 scoped_restore_current_traceframe.
6004 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6006 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
6008 <n_allocated_type_units>: Remove.
6009 <all_type_units>: Change to std::vector.
6010 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6011 to std::vector change.
6012 (dwarf2_per_objfile::get_cutu): Likewise.
6013 (dwarf2_per_objfile::get_tu): Likewise.
6014 (create_signatured_type_table_from_index): Likewise.
6015 (create_signatured_type_table_from_debug_names): Likewise.
6016 (dw2_symtab_iter_next): Likewise.
6017 (dw2_print_stats): Likewise.
6018 (dw2_expand_all_symtabs): Likewise.
6019 (dw2_expand_marked_cus): Likewise.
6020 (dw2_debug_names_iterator::next): Likewise.
6021 (dwarf2_initialize_objfile): Likewise.
6022 (add_signatured_type_cu_to_table): Likewise.
6023 (create_all_type_units): Likewise.
6024 (add_type_unit): Likewise.
6025 (struct tu_abbrev_offset): Add constructor.
6026 (build_type_psymtabs_1): Adjust to std::vector change.
6027 (print_tu_stats): Likewise.
6028 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6029 (write_debug_names): Likewise.
6031 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6033 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
6034 Make an std::vector.
6035 <n_comp_units>: Remove.
6036 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6037 to std::vector change.
6038 (dwarf2_per_objfile::get_cutu): Likewise.
6039 (dwarf2_per_objfile::get_cu): Likewise.
6040 (create_cus_from_index): Likewise.
6041 (create_addrmap_from_index): Likewise.
6042 (create_addrmap_from_aranges): Likewise.
6043 (dwarf2_read_index): Likewise.
6044 (dw2_find_last_source_symtab): Likewise.
6045 (dw2_map_symtabs_matching_filename): Likewise.
6046 (dw2_symtab_iter_next): Likewise.
6047 (dw2_print_stats): Likewise.
6048 (dw2_expand_all_symtabs): Likewise.
6049 (dw2_expand_symtabs_with_fullname): Likewise.
6050 (dw2_expand_marked_cus): Likewise.
6051 (dw2_map_symbol_filenames): Likewise.
6052 (create_cus_from_debug_names): Likewise.
6053 (dwarf2_read_debug_names): Likewise.
6054 (dw2_debug_names_iterator::next): Likewise.
6055 (dwarf2_initialize_objfile): Likewise.
6056 (set_partial_user): Likewise.
6057 (dwarf2_build_psymtabs_hard): Likewise.
6058 (read_comp_units_from_section): Remove arguments, adjust to
6060 (create_all_comp_units): Adjust to std::vector and
6061 read_comp_units_from_section changes.
6062 (dwarf2_find_containing_comp_unit): Adjust to std::vector
6064 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6065 (psyms_seen_size): Likewise.
6066 (write_gdbindex): Likewise.
6067 (write_debug_names): Likewise.
6069 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6071 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6072 with dwarf2_per_objfile.
6073 (create_cus_from_index): Likewise.
6074 (create_signatured_type_table_from_index): Likewise.
6075 (dwarf2_read_index): Likewise.
6076 (dwarf2_initialize_objfile): Likewise.
6077 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
6078 per_cu rather than get_dwarf2_per_objfile.
6080 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6082 * dwarf2read.h (struct signatured_type): Forward declare.
6083 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6085 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6086 (dw2_get_cutu): ...this.
6087 (dwarf2_per_objfile::get_cu): Rename from...
6088 (dw2_get_cu): ...this.
6089 (dwarf2_per_objfile::get_tu): New.
6090 (create_addrmap_from_index): Adjust.
6091 (create_addrmap_from_aranges): Adjust.
6092 (dw2_find_last_source_symtab): Adjust.
6093 (dw2_map_symtabs_matching_filename): Adjust.
6094 (dw2_symtab_iter_next): Adjust.
6095 (dw2_print_stats): Adjust.
6096 (dw2_expand_all_symtabs): Adjust.
6097 (dw2_expand_symtabs_with_fullname): Adjust.
6098 (dw2_expand_marked_cus): Adjust.
6099 (dw_expand_symtabs_matching_file_matcher): Adjust.
6100 (dw2_map_symbol_filenames): Adjust.
6101 (dw2_debug_names_iterator::next): Adjust.
6102 (dwarf2_initialize_objfile): Adjust.
6103 (set_partial_user): Adjust.
6104 (dwarf2_build_psymtabs_hard): Adjust.
6106 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6108 * dwarf2read.c (create_signatured_type_table_from_debug_names):
6109 Remove unused variables.
6110 (dw2_map_symtabs_matching_filename): Likewise.
6111 (dwarf2_record_block_ranges): Likewise.
6112 (dwarf2_read_addr_index): Likewise.
6113 (follow_die_offset): Likewise.
6115 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6117 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6118 to symbol_file_add_main.
6120 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6123 * mi/mi-console.c (do_fputc_async_safe): New.
6124 (mi_console_file::write_async_safe): New.
6125 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6126 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6128 * ui-file.c (ui_file::putstrn): Adjust call to
6129 fputstrn_unfiltered.
6130 * utils.c (printchar): Replace do_fputs and do_fprintf
6131 parameters by do_fputc.
6132 (fputstr_filtered): Adjust call to printchar.
6133 (fputstr_unfiltered): Likewise.
6134 (fputstrn_filtered): Likewise.
6135 (fputstrn_unfiltered): Add do_fputc parameter, pass to
6137 * utils.h (do_fputc_ftype): New typedef.
6138 (fputstrn_unfiltered): Add do_fputc parameter.
6140 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6142 * regformats/i386/i386-avx.dat: Remove.
6144 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6147 * amd64-tdep.c (amd64_none_init_abi): New function.
6148 (amd64_x32_none_init_abi): New function.
6149 (_initialize_amd64_tdep): Register handlers for x86-64 and
6150 x64_32 with GDB_OSABI_NONE.
6151 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
6152 GDB_OSABI_NONE osabi.
6154 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6157 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
6159 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
6160 * osabi.c (gdb_osabi_names): Add "unknown" entry.
6162 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6164 * common/byte-vector.h (char_vector): New type.
6165 * target.h (target_read_alloc): Return
6166 gdb::optional<byte_vector>.
6167 (target_read_stralloc): Return gdb::optional<char_vector>.
6168 (target_get_osdata): Return gdb::optional<char_vector>.
6169 * target.c (target_read_alloc_1): Templatize. Replacement
6170 manual memory management with vector.
6171 (target_read_alloc): Change return type, adjust.
6172 (target_read_stralloc): Change return type, adjust.
6173 (target_get_osdata): Change return type, adjust.
6174 * auxv.c (struct auxv_info) <length>: Remove.
6175 <data>: Change type to gdb::optional<byte_vector>.
6176 (auxv_inferior_data_cleanup): Free auxv_info with delete.
6177 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6178 (target_auxv_search): Adjust.
6179 (fprint_target_auxv): Adjust.
6180 * avr-tdep.c (avr_io_reg_read_command): Adjust.
6181 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6182 (linux_make_corefile_notes): Adjust.
6183 * osdata.c (get_osdata): Adjust.
6184 * remote.c (remote_get_threads_with_qxfer): Adjust.
6185 (remote_memory_map): Adjust.
6186 (remote_traceframe_info): Adjust.
6187 (btrace_read_config): Adjust.
6188 (remote_read_btrace): Adjust.
6189 (remote_pid_to_exec_file): Adjust.
6190 * solib-aix.c (solib_aix_get_library_list): Adjust.
6191 * solib-dsbt.c (decode_loadmap): Don't free buf.
6192 (dsbt_get_initial_loadmaps): Adjust.
6193 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6194 * solib-target.c (solib_target_current_sos): Adjust.
6195 * tracepoint.c (sdata_make_value): Adjust.
6196 * xml-support.c (xinclude_start_include): Adjust.
6197 (xml_fetch_content_from_file): Adjust.
6198 * xml-support.h (xml_fetch_another): Change return type.
6199 (xml_fetch_content_from_file): Change return type.
6200 * xml-syscall.c (xml_init_syscalls_info): Adjust.
6201 * xml-tdesc.c (file_read_description_xml): Adjust.
6202 (fetch_available_features_from_target): Change return type.
6203 (target_fetch_description_xml): Adjust.
6204 (target_read_description_xml): Adjust.
6206 2018-04-06 Tom Tromey <tom@tromey.com>
6208 * value.c (~value): Update.
6209 (struct value) <contents>: Now unique_xmalloc_ptr.
6210 (value_contents_bits_eq, allocate_value_contents)
6211 (value_contents_raw, value_contents_all_raw)
6212 (value_contents_for_printing, value_contents_for_printing_const)
6213 (set_value_enclosing_type): Update.
6215 2018-04-06 Tom Tromey <tom@tromey.com>
6217 * value.c (range_s): Remove typedef, VEC.
6218 (struct range): Add operator<.
6219 (range_lessthan): Remove.
6220 (ranges_contain): Change type.
6222 (struct value) <unavailable, optimized_out>: Now std::vector.
6223 (value_entirely_available)
6224 (value_entirely_covered_by_range_vector)
6225 (value_entirely_unavailable, value_entirely_optimized_out):
6227 (insert_into_bit_range_vector): Change argument type.
6228 (find_first_range_overlap): Likewise.
6229 (struct ranges_and_idx, value_contents_bits_eq)
6230 (require_not_optimized_out, require_available): Update.
6231 (ranges_copy_adjusted): Change argument types.
6232 (value_optimized_out, value_copy, value_fetch_lazy): Update.
6234 2018-04-06 Tom Tromey <tom@tromey.com>
6236 * value.c (~value): Update.
6237 (struct value) <parent>: Now a value_ref_ptr.
6238 (value_parent, set_value_parent, value_address, value_copy):
6241 2018-04-06 Tom Tromey <tom@tromey.com>
6243 * value.c (struct value): Add constructor, destructor, and member
6245 (allocate_value_lazy, value_decref): Update.
6247 2018-04-06 Tom Tromey <tom@tromey.com>
6249 * value.c (struct value) <released, next>: Remove.
6250 (all_values): Now a std::vector.
6251 (allocate_value_lazy): Update.
6252 (value_next): Remove.
6253 (value_mark, value_free_to_mark, release_value)
6254 (value_release_to_mark): Update.
6256 2018-04-06 Tom Tromey <tom@tromey.com>
6258 * value.h (fetch_subexp_value, value_release_to_mark): Update.
6259 (free_value_chain): Remove.
6260 * value.c (free_value_chain): Remove.
6261 (value_release_to_mark): Return a std::vector.
6262 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6264 (check_condition): Update.
6265 * eval.c (fetch_subexp_value): Change "val_chain" to a
6267 * breakpoint.c (update_watchpoint): Update.
6268 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6270 2018-04-06 Tom Tromey <tom@tromey.com>
6272 * value.h (free_all_values): Remove.
6273 * value.c (free_all_values): Remove.
6275 2018-04-06 Tom Tromey <tom@tromey.com>
6277 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6278 (value_history_chain, value_history_count): Remove.
6279 (value_history): New global.
6280 (record_latest_value, access_value_history, show_values)
6281 (preserve_values): Update.
6283 2018-04-06 Tom Tromey <tom@tromey.com>
6285 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6286 * varobj.c (varobj_set_display_format, varobj_set_value)
6287 (install_default_visualizer, construct_visualizer)
6288 (install_new_value, ~varobj, varobj_get_value_type)
6289 (my_value_of_variable, varobj_editable_p): Update.
6290 * c-varobj.c (c_describe_child, c_value_of_variable)
6291 (cplus_number_of_children, cplus_describe_child): Update.
6292 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
6293 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
6294 (ada_value_of_variable, ada_value_is_changeable_p): Update.
6296 2018-04-06 Tom Tromey <tom@tromey.com>
6298 * printcmd.c (last_examine_address): Change type to
6300 (do_examine, x_command): Update.
6302 2018-04-06 Tom Tromey <tom@tromey.com>
6304 * value.c (release_value): Update.
6305 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
6306 (struct bpstats) <val>: Now a value_ref_ptr.
6307 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6308 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6309 (~watchpoint, print_it_watchpoint, watch_command_1)
6310 (invalidate_bp_value_on_memory_change): Update.
6312 2018-04-06 Tom Tromey <tom@tromey.com>
6314 * varobj.c (varobj_clear_saved_item)
6315 (update_dynamic_varobj_children, install_new_value, ~varobj):
6317 * value.h (value_incref): Move declaration earlier.
6318 (value_decref): Rename from value_free.
6319 (struct value_ref_policy): New.
6320 (value_ref_ptr): New typedef.
6321 (struct value_deleter): Remove.
6322 (gdb_value_up): Remove typedef.
6323 (release_value): Change return type.
6324 (release_value_or_incref): Remove.
6325 * value.c (set_value_parent): Update.
6326 (value_incref): Change return type.
6327 (value_decref): Rename from value_free.
6328 (value_free_to_mark, free_all_values, free_value_chain): Update.
6329 (release_value): Return value_ref_ptr.
6330 (release_value_or_incref): Remove.
6331 (record_latest_value, set_internalvar, clear_internalvar):
6333 * stack.c (info_frame_command): Don't call value_free.
6334 * python/py-value.c (valpy_dealloc, valpy_new)
6335 (value_to_value_object): Update.
6336 * printcmd.c (do_examine): Update.
6337 * opencl-lang.c (lval_func_free_closure): Update.
6338 * mi/mi-main.c (register_changed_p): Don't call value_free.
6339 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
6340 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
6341 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
6343 * guile/scm-value.c (vlscm_free_value_smob)
6344 (vlscm_scm_from_value): Update.
6345 * frame.c (frame_register_unwind, frame_unwind_register_signed)
6346 (frame_unwind_register_unsigned, get_frame_register_bytes)
6347 (put_frame_register_bytes): Don't call value_free.
6348 * findvar.c (address_from_register): Don't call value_free.
6349 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
6350 * dwarf2loc.c (entry_data_value_free_closure)
6351 (value_of_dwarf_reg_entry, free_pieced_value_closure)
6352 (dwarf2_evaluate_loc_desc_full): Update.
6353 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6354 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6355 (~watchpoint, watch_command_1)
6356 (invalidate_bp_value_on_memory_change): Update.
6357 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
6359 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
6362 * warning.m4: Add -Wno-error=deprecated-register.
6363 * configure: Re-generate.
6365 2018-04-05 Tom Tromey <tom@tromey.com>
6367 * linespec.h: Remove include of "vec.h".
6369 2018-04-05 Tom Tromey <tom@tromey.com>
6371 * linespec.c (typep): Remove typedef.
6372 (find_methods, find_superclass_methods): Take a std::vector.
6373 (find_method): Use std::vector.
6375 2018-04-05 Tom Tromey <tom@tromey.com>
6377 * utils.c (compare_strings): Remove.
6378 * utils.h (compare_strings): Remove.
6379 * objc-lang.h (find_imps): Update.
6380 * objc-lang.c (find_methods): Take a std::vector.
6381 (uniquify_strings, find_imps): Likewise.
6382 * linespec.c (find_methods): Take a std::vector.
6383 (decode_objc): Use std::vector.
6384 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
6386 (find_method, find_function_symbols): Use std::vector.
6388 2018-04-05 Tom Tromey <tom@tromey.com>
6390 * completer.c (completion_tracker::completion_tracker): Remove
6392 (completion_tracker::discard_completions): Likewise.
6393 * breakpoint.c (ambiguous_names_p): Remove cast.
6394 * ada-lang.c (_initialize_ada_language): Remove cast.
6395 * utils.h (streq): Update.
6396 (streq_hash): Add new declaration.
6397 * utils.c (streq): Return bool.
6398 (streq_hash): New function.
6400 2018-04-05 Tom Tromey <tom@tromey.com>
6402 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
6403 Remove a string copy.
6405 2018-04-05 Tom Tromey <tom@tromey.com>
6407 * linespec.c (filter_results): Use std::vector.
6408 (decode_line_2, decode_line_full): Update.
6410 2018-04-05 Tom Tromey <tom@tromey.com>
6412 * linespec.c (canonical_to_fullform): Return std::string.
6413 (filter_results): Update.
6414 (struct decode_line_2_item): Add constructor.
6415 <fullform, displayform>: Now std::string.
6416 (decode_line_2_compare_items): Now a std::sort comparator.
6417 (decode_line_2): Update.
6419 2018-04-05 Tom Tromey <tom@tromey.com>
6421 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
6422 (unexpected_linespec_error): Update.
6423 (linespec_parse_basic, parse_linespec): Update.
6425 2018-04-05 Tom Tromey <tom@tromey.com>
6427 * linespec.c (linespec_parse_basic): Reindent.
6429 2018-04-05 Tom Tromey <tom@tromey.com>
6431 * minsyms.h (iterate_over_minimal_symbols): Update.
6432 * minsyms.c (iterate_over_minimal_symbols): Take a
6434 * linespec.c (struct collect_minsyms): Remove.
6435 (compare_msyms): Now a std::sort comparator.
6436 (add_minsym): Add parameters.
6437 (search_minsyms_for_name): Update. Use std::vector.
6439 2018-04-03 Tom Tromey <tom@tromey.com>
6441 * mipsread.c (read_alphacoff_dynamic_symtab): Use
6444 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6446 * MAINTAINERS (Write After Approval): Add Weimin Pan.
6448 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6451 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
6452 printing static type.
6454 2018-04-01 Tom Tromey <tom@tromey.com>
6456 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
6457 (rs6000_xfer_shared_libraries): Update.
6459 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
6461 * common/gdb_vecs.h (char_ptr): Remove.
6462 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
6464 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6466 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
6468 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
6470 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6472 * tracepoint.h (struct uploaded_tp): Initialize fields.
6473 <actions, step_actions, cmd_strings>: Change type to
6474 std::vector<char *>.
6475 * tracepoint.c (get_uploaded_tp): Allocate with new.
6476 (free_uploaded_tps): Free with delete.
6477 (parse_tracepoint_definition): Adjust to std::vector change.
6478 * breakpoint.c (read_uploaded_action): Likewise.
6479 (create_tracepoint_from_upload): Likewise.
6480 * ctf.c (ctf_write_uploaded_tp): Likewise.
6481 (SET_ARRAY_FIELD): Likewise.
6482 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
6484 2018-03-30 Tom Tromey <tom@tromey.com>
6486 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
6488 (svr4_keep_data_in_core): Update.
6489 (svr4_read_so_list): Update.
6491 2018-03-30 Tom Tromey <tom@tromey.com>
6493 * windows-nat.c (handle_output_debug_string, handle_exception):
6495 * target.h (target_read_string): Update.
6496 * target.c (target_read_string): Change "string" to
6498 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
6500 * solib-frv.c (frv_current_sos): Update.
6501 * solib-dsbt.c (dsbt_current_sos): Update.
6502 * solib-darwin.c (darwin_current_sos): Update.
6503 * linux-thread-db.c (inferior_has_bug): Update.
6504 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
6505 Update. Remove alloca.
6506 * ada-lang.c (ada_main_name): Update.
6508 2018-03-30 Tom Tromey <tom@tromey.com>
6510 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
6511 (struct dwo_file_deleter): New.
6512 (dwo_file_up): New typedef.
6513 (open_and_init_dwo_file): Use dwo_file_up.
6514 (free_dwo_file_cleanup): Remove.
6516 2018-03-30 Tom Tromey <tom@tromey.com>
6518 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
6519 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
6521 2018-03-30 Tom Tromey <tom@tromey.com>
6523 * dwarf2read.c (class free_cached_comp_units): New class.
6524 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
6525 (free_cached_comp_units): Remove function.
6527 2018-03-30 Tom Tromey <tom@tromey.com>
6529 * utils.h (make_cleanup_unpush_target): Remove.
6530 * inf-ptrace.c (struct target_unpusher): New.
6531 (target_unpush_up) New typedef.
6532 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
6534 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
6536 2018-03-27 Tom Tromey <tom@tromey.com>
6538 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
6540 2018-03-27 Pedro Alves <palves@redhat.com>
6541 Tom Tromey <tom@tromey.com>
6543 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
6544 destructor. Now a class.
6545 (gdb_readline_wrapper_cleanup): Remove function.
6546 (gdb_readline_wrapper): Remove cleanups.
6548 2018-03-27 Tom Tromey <tom@tromey.com>
6550 * typeprint.h (struct type_print_options) <local_typedefs,
6551 global_typedefs>: Remove "struct" keyword.
6552 (class typedef_hash_table): New class.
6553 (recursively_update_typedef_hash, add_template_parameters)
6554 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
6555 (find_typedef_in_hash): Don't declare.
6556 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
6557 (typedef_hash_table::recursively_update): Rename from
6558 recursively_update_typedef_hash. Now a member.
6559 (typedef_hash_table::add_template_parameters): Rename from
6560 add_template_parameters. Now a member.
6561 (typedef_hash_table::typedef_hash_table): Now a constructor;
6562 rename from create_typedef_hash.
6563 (typedef_hash_table::~typedef_hash_table): Now a destructor;
6564 rename from free_typedef_hash.
6565 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
6566 (do_free_global_table): Remove.
6567 (typedef_hash_table::typedef_hash_table): New constructor; renamed
6568 from copy_type_recursive.
6569 (create_global_typedef_table): Remove.
6570 (typedef_hash_table::find_global_typedef): Now a member of
6572 (typedef_hash_table::find_typedef): Rename from
6573 find_typedef_in_hash; now a member.
6574 (whatis_exp): Update.
6575 * extension.h (struct ext_lang_type_printers): Add constructor and
6577 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
6579 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
6580 Now a constructor; rename from start_ext_lang_type_printers.
6581 (ext_lang_type_printers): Now a destructor; rename from
6582 free_ext_lang_type_printers.
6583 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
6585 (c_type_print_base_struct_union): Update. Remove cleanups.
6587 2018-03-27 Tom Tromey <tom@tromey.com>
6589 * dwarf-index-write.c: Include <cmath>.
6591 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6593 * NEWS: Add entry describing new "set|show varsize-limit" command.
6594 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
6596 * printcmd.c (_initialize_printcmd): Add "set var" alias of
6599 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
6601 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
6603 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
6604 * dwarf-index-common.c: New file.
6605 * dwarf-index-common.h: New file.
6606 * dwarf-index-write.c: New file.
6607 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
6608 (struct dwarf2_section_info): Move from here.
6609 (dwarf2_section_info_def): Likewise.
6610 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
6611 (offset_type): Likewise.
6612 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
6613 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
6614 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
6615 (byte_swap): Likewise.
6616 (MAYBE_SWAP): Likewise.
6617 (dwarf2_per_cu_ptr): Likewise.
6618 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
6619 (struct tu_stats): Likewise.
6620 (struct dwarf2_per_objfile): Likewise.
6621 (struct dwarf2_per_cu_data): Likewise.
6622 (struct signatured_type): Likewise.
6623 (sig_type_ptr): Likewise.
6624 (DEF_VEC_P (sig_type_ptr)): Likewise.
6625 (INDEX4_SUFFIX): Likewise.
6626 (INDEX5_SUFFIX): Likewise.
6627 (DEBUG_STR_SUFFIX): Likewise.
6628 (dwarf2_read_section): Make non-static.
6629 (mapped_index_string_hash): Move from here.
6630 (dwarf5_djb_hash): Likewise.
6631 (file_write): Likewise.
6632 (class data_buf): Likewise.
6633 (struct symtab_index_entry): Likewise.
6634 (struct mapped_symtab): Likewise.
6635 (find_slot): Likewise.
6636 (hash_expand): Likewise.
6637 (add_index_entry): Likewise.
6638 (uniquify_cu_indices): Likewise.
6639 (class c_str_view): Likewise.
6640 (class c_str_view_hasher): Likewise.
6641 (class vector_hasher): Likewise.
6642 (write_hash_table): Likewise.
6643 (psym_index_map): Likewise.
6644 (struct addrmap_index_data): Likewise.
6645 (add_address_entry): Likewise.
6646 (add_address_entry_worker): Likewise.
6647 (write_address_map): Likewise.
6648 (symbol_kind): Likewise.
6649 (write_psymbols): Likewise.
6650 (struct signatured_type_index_data): Likewise.
6651 (write_one_signatured_type): Likewise.
6652 (recursively_count_psymbols): Likewise.
6653 (recursively_write_psymbols): Likewise.
6654 (class debug_names): Likewise.
6655 (check_dwarf64_offsets): Likewise.
6656 (psyms_seen_size): Likewise.
6657 (write_gdbindex): Likewise.
6658 (write_debug_names): Likewise.
6659 (assert_file_size): Likewise.
6660 (write_psymtabs_to_index): Likewise.
6661 (save_gdb_index_command): Likewise.
6662 (_initialize_dwarf2_read): Don't register the "save gdb-index"
6664 * dwarf2read.h: New file.
6666 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6669 * dwarf2read.c (dwarf2_physname): Do not return the demangled
6670 symbol name if the CU's language stores symbol names in linkage
6672 * language.h (struct language_defn)
6673 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
6674 all instances of this struct.
6676 2018-03-26 Tom Tromey <tom@tromey.com>
6678 * stack.c (backtrace_command_1): Remove verbose code.
6680 2018-03-26 Tom Tromey <tom@tromey.com>
6682 * python/py-framefilter.c (py_print_type): Don't catch
6683 exceptions. Return void.
6684 (py_print_value): Likewise.
6685 (py_print_single_arg): Likewise.
6686 (enumerate_args): Don't catch exceptions.
6687 (py_print_args): Likewise.
6688 (py_print_frame): Likewise.
6689 (gdbpy_apply_frame_filter): Catch exceptions here.
6691 2018-03-26 Tom Tromey <tom@tromey.com>
6693 * stack.c (_initialize_stack): Remove trailing newlines from help
6694 text. Add "Usage" line to "backtrace" help.
6696 2018-03-26 Tom Tromey <tom@tromey.com>
6699 * python/py-framefilter.c (py_print_args): Call wrap_hint.
6701 2018-03-26 Tom Tromey <tom@tromey.com>
6703 * python/py-framefilter.c (py_print_single_arg): Return
6704 EXT_LANG_BT_ERROR from catch.
6706 2018-03-26 Tom Tromey <tom@tromey.com>
6709 * stack.c (backtrace_command_1): Move some code into no-filters
6712 2018-03-26 Tom Tromey <tom@tromey.com>
6714 * python/py-framefilter.c (throw_quit_or_print_exception): New
6716 (gdbpy_apply_frame_filter): Use it.
6718 2018-03-26 Tom Tromey <tom@tromey.com>
6721 * python/py-framefilter.c (py_print_type, py_print_value)
6722 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
6725 2018-03-26 Tom Tromey <tom@tromey.com>
6727 * python/py-framefilter.c (enumerate_args): Use
6728 gdb::unique_xmalloc_ptr.
6730 2018-03-26 Tom Tromey <tom@tromey.com>
6732 * python/py-framefilter.c (py_print_frame): Return
6734 (gdbpy_apply_frame_filter): Update comment.
6735 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
6737 <EXT_LANG_BT_NO_FILTERS>: Change value.
6739 2018-03-26 Tom Tromey <tom@tromey.com>
6742 * stack.c (backtrace_command): Parse "hide" argument.
6743 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
6744 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
6747 2018-03-26 Tom Tromey <tom@tromey.com>
6749 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
6751 (backtrace_command): Remove "fulltrace", add "flags".
6753 2018-03-26 Tom Tromey <tom@tromey.com>
6755 * stack.c (backtrace_command): Rewrite command line parsing.
6757 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6759 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
6761 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6763 * filename-seen-cache.h: Add include guard.
6765 2018-03-26 Keith Seitz <keiths@redhat.com>
6767 * symfile.c (place_section): Remove "struct" from section_addr_info
6769 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
6770 "struct" keyword from section_addr_info.
6772 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6774 * regformats/regdef.h (reg): Add constructors.
6776 2018-03-25 Pedro Alves <palves@redhat.com>
6778 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
6779 if then/else bodies in var_func_name extraction.
6781 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
6783 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
6784 lookup_minimal_symbol() to find symbol entry.
6785 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
6787 2018-03-23 Keith Seitz <keiths@redhat.com>
6790 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
6791 nested type definitions for C++, too.
6793 2018-03-23 Tom Tromey <tom@tromey.com>
6795 * machoread.c (struct oso_el): Add a constructor. Don't define as
6797 (macho_register_oso): Remove.
6798 (macho_symtab_read): Take a std::vector.
6799 (oso_el_compare_name): Now a std::sort comparator.
6800 (macho_symfile_read_all_oso): Take a std::vector.
6801 (macho_symfile_read): Use std::vector. Remove cleanups.
6803 2018-03-22 Tom Tromey <tom@tromey.com>
6805 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
6806 (record_full_goto_bookmark): Use std::string.
6808 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6811 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
6814 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6816 * rs6000-tdep.c (store_insn_p): New function.
6817 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
6818 and cr_reg to their unshifted values. Use store_insn_p to
6819 match LR saves using either R1 or fdata->alloca_reg. Use
6820 store_insn_p to match CR saves. Set alloca_reg_offset
6821 when alloca_reg and framep are set. Remove lr_reg shift
6822 when assigning to fdata->lr_register.
6824 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6826 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
6827 command line args instead of emitting a warning.
6829 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6831 * tracepoint.h (struct static_tracepoint_marker): Initialize
6832 fields, define default constructor, move constructor and move
6833 assignment, disable the rest.
6834 <str_id, extra>: Make std::string.
6835 (release_static_tracepoint_marker): Remove.
6836 (free_current_marker): Remove.
6837 * tracepoint.c (free_current_marker): Remove.
6838 (parse_static_tracepoint_marker_definition): Adjust to
6839 std::string, use new hex2str overload.
6840 (release_static_tracepoint_marker): Remove.
6841 (print_one_static_tracepoint_marker): Get marker by reference
6842 and adjust to std::string.
6843 (info_static_tracepoint_markers_command): Adjust to std::vector
6845 * target.h (static_tracepoint_marker_p): Remove typedef.
6846 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
6847 (struct target_ops) <to_static_tracepoint_marker_at>: Return
6849 <to_static_tracepoint_markers_by_strid>: Return std::vector.
6851 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
6852 (target_debug_print_std_vector_static_tracepoint_marker): New.
6853 (target_debug_print_struct_static_tracepoint_marker_p): Rename
6855 (target_debug_print_static_tracepoint_marker_p): ... this.
6856 * target-delegates.c: Re-generate.
6857 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
6859 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
6860 (decode_static_tracepoint_spec): Adjust to std::vector.
6861 (tracepoint_print_one_detail): Adjust to std::string.
6862 (strace_marker_decode_location): Adjust to std::string.
6863 (update_static_tracepoint): Adjust to std::string, remove call
6864 to release_static_tracepoint_marker.
6865 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6866 Adjust to std::vector.
6867 * remote.c (remote_static_tracepoint_marker_at): Return bool.
6868 (remote_static_tracepoint_markers_by_strid): Adjust to
6870 * common/rsp-low.h (hex2str): New overload with explicit count
6872 * common/rsp-low.c (hex2str): New overload with explicit count
6874 * unittests/rsp-low-selftests.c (test_hex2str): New function.
6875 (_initialize_rsp_low_selftests): Add test_hex2str test.
6876 * unittests/tracepoint-selftests.c
6877 (test_parse_static_tracepoint_marker_definition): Adjust to
6880 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6882 * tracepoint.c (parse_static_tracepoint_marker_definition):
6883 Consider case where the definition is followed by more
6885 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6886 tracepoint-selftests.c.
6887 * unittests/tracepoint-selftests.c: New.
6889 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6891 * MAINTAINERS (Write After Approval): Add Pedro Franco de
6894 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6896 * symtab.c (find_pc_sect_line): fixed indentation.
6898 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6900 * symtab.c (find_pc_sect_line): now uses binary search.
6902 2018-03-19 Tom Tromey <tom@tromey.com>
6904 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
6907 2018-03-19 Pedro Alves <palves@redhat.com>
6908 Tom Tromey <tom@tromey.com>
6910 * unittests/observable-selftests.c: New file.
6911 * common/observable.h: New file.
6912 * observable.h: New file.
6913 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
6914 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
6915 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
6916 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
6917 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
6918 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
6919 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
6920 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
6921 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
6922 python/py-breakpoint.c, python/py-finishbreakpoint.c,
6923 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
6924 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
6925 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
6926 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
6927 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
6928 tui/tui-interp.c, valops.c: Update all users.
6929 * tui/tui-hooks.c (tui_bp_created_observer)
6930 (tui_bp_deleted_observer, tui_bp_modified_observer)
6931 (tui_inferior_exit_observer, tui_before_prompt_observer)
6932 (tui_normal_stop_observer, tui_register_changed_observer):
6934 (tui_observers_token): New global.
6935 (attach_or_detach, tui_attach_detach_observers): New functions.
6936 (tui_install_hooks, tui_remove_hooks): Use
6937 tui_attach_detach_observers.
6938 * record-btrace.c (record_btrace_thread_observer): Remove.
6939 (record_btrace_thread_observer_token): New global.
6940 * observer.sh: Remove.
6941 * observer.c: Rename to observable.c.
6942 * observable.c (namespace gdb_observers): Define new objects.
6943 (observer_debug): Move into gdb_observers namespace.
6944 (struct observer, struct observer_list, xalloc_observer_list_node)
6945 (xfree_observer_list_node, generic_observer_attach)
6946 (generic_observer_detach, generic_observer_notify): Remove.
6947 (_initialize_observer): Update.
6948 Don't include observer.inc.
6949 * Makefile.in (generated_files): Remove observer.h, observer.inc.
6950 (clean mostlyclean): Likewise.
6951 (observer.h, observer.inc): Remove targets.
6952 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
6953 (COMMON_SFILES): Use observable.c, not observer.c.
6954 * .gitignore: Remove observer.h.
6956 2018-03-18 Tom Tromey <tom@tromey.com>
6958 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
6960 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
6962 2018-03-17 Tom Tromey <tom@tromey.com>
6964 * auto-load.c (auto_load_objfile_script_1): Use std::string.
6966 2018-03-17 Tom Tromey <tom@tromey.com>
6968 * target.c (class scoped_target_fd): New.
6969 (target_fileio_close_cleanup): Remove.
6970 (target_fileio_read_alloc_1): Use scoped_target_fd.
6972 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
6974 * silent-rules.mk: New.
6975 * Makefile.in: Include silent-rules.mk
6976 (srcdir, VPATH, top_srcdir): Move up.
6977 (COMPILE): Add ECHO_CXX.
6978 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
6979 (init.c): Add ECHO_INIT_C.
6980 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6981 (version.c): Add ECHO_GEN.
6982 (printcmd.o): Add ECHO_CXX.
6983 (target-float.o): Add ECHO_CXX.
6984 (ada-exp.o): Add ECHO_CXX.
6985 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
6986 (insight$(EXEEXT)): Add ECHO_CXXLD.
6987 * gnulib/configure.ac: Add AM_SILENT_RULES.
6988 * gnulib/aclocal.m4: Re-generate.
6989 * gnulib/configure: Re-generate.
6990 * gnulib/import/Makefile.in: Re-generate.
6992 2018-03-16 Tom Tromey <tom@tromey.com>
6994 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
6995 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
6996 * utils.c (do_free_section_addr_info)
6997 (make_cleanup_free_section_addr_info): Remove.
6998 * symfile.h (struct other_sections): Add constructor.
6999 (struct section_addr_info): Remove.
7000 (section_addr_info): New typedef.
7001 (struct sym_fns) <sym_offsets>: Change type of parameter.
7002 (build_section_addr_info_from_objfile)
7003 (relative_addr_info_to_section_offsets, addr_info_make_relative)
7004 (default_symfile_offsets, symbol_file_add)
7005 (symbol_file_add_from_bfd)
7006 (build_section_addr_info_from_section_table): Update.
7007 (alloc_section_addr_info, free_section_addr_info): Don't declare.
7008 * symfile.c (alloc_section_addr_info): Remove.
7009 (build_section_addr_info_from_section_table): Change return type.
7011 (build_section_addr_info_from_bfd)
7012 (build_section_addr_info_from_objfile): Likewise.
7013 (free_section_addr_info): Remove.
7014 (relative_addr_info_to_section_offsets): Change type of "addrs".
7015 (addrs_section_compar): Now a std::sort comparator.
7016 (addrs_section_sort): Change return type.
7017 (addr_info_make_relative): Change type of "addrs". Update.
7018 (default_symfile_offsets, syms_from_objfile_1)
7019 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
7020 (symbol_file_add_separate): Update.
7021 (symbol_file_add): Change type of "addrs". Update.
7022 (add_symbol_file_command): Update. Remove cleanups.
7023 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
7025 * symfile-debug.c (debug_sym_offsets): Change type of "info".
7026 * solib.c (solib_read_symbols): Update.
7027 * objfiles.c (objfile_relocate): Update. Remove cleanups.
7028 * machoread.c (macho_symfile_offsets): Update.
7029 * jit.c (jit_bfd_try_read_symtab): Update.
7031 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
7033 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7034 unittests/utils-selftests.c.
7035 * unittests/utils-selftests.c: New file.
7037 2018-03-14 Tom Tromey <tom@tromey.com>
7040 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
7043 2018-03-14 Tom Tromey <tom@tromey.com>
7046 * printcmd.c (printf_pointer): Allow "-" in format.
7048 2018-03-14 Tom Tromey <tom@tromey.com>
7050 * printcmd.c (_initialize_printcmd): Add usage to printf.
7052 2018-03-14 Yao Qi <qiyao@sourceware.org>
7054 * MAINTAINERS: Update my email address.
7056 2018-03-13 Tom Tromey <tom@tromey.com>
7058 * machoread.c (macho_check_dsym): Change filenamep to a
7060 (macho_symfile_read): Update.
7061 * symfile.c (load_command): Use std::string.
7063 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
7065 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7066 to error message string.
7067 (riscv_register_name): Use xsnprintf instead of sprintf.
7068 (riscv_insn::fetch_instruction): Use gdb_assert instead of
7070 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7072 (riscv_push_dummy_call): Likewise.
7074 2018-03-12 Tom Tromey <tom@tromey.com>
7076 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7077 Use gdb::byte_vector.
7078 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7080 2018-03-12 Yao Qi <yao.qi@linaro.org>
7082 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7083 parameter type to readable_regcache.
7084 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7087 2018-03-11 Tom Tromey <tom@tromey.com>
7089 * dwarf2read.c (struct nextfield): Add initializers.
7090 (struct nextfnfield): Remove.
7091 (struct fnfieldlist): Add initializers. Remove "length" and
7092 "head", use std::vector.
7093 (struct decl_field_list): Remove.
7094 (struct field_info): Add initializers.
7095 <fields, baseclasses>: Now std::vector.
7096 <nbaseclasses, nfnfields, typedef_field_list_count,
7097 nested_types_list_count>: Remove.
7098 (dwarf2_add_field, dwarf2_add_type_defn)
7099 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7100 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7101 (process_structure_scope): Update.
7103 2018-03-11 Tom Tromey <tom@tromey.com>
7105 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7106 for use by std::sort.
7107 (build_type_psymtabs_1): Use std::vector.
7109 2018-03-09 Eli Zaretskii <eliz@gnu.org>
7111 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7112 and LIBMPFR in the printed configuration.
7114 2018-03-08 Tom Tromey <tom@tromey.com>
7116 * source.c (get_filename_and_charpos): Use scoped_fd.
7117 * nto-procfs.c (procfs_open_1): Use scoped_fd.
7118 (procfs_pidlist): Likewise.
7119 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7120 (iterate_over_mappings): Likewise.
7122 2018-03-08 Tom Tromey <tom@tromey.com>
7124 * infcall.c (struct call_return_meta_info)
7125 <stack_temporaries_enabled>: Remove.
7126 (get_call_return_value, call_function_by_hand_dummy): Update.
7127 * thread.c (disable_thread_stack_temporaries): Remove.
7128 (enable_thread_stack_temporaries): Remove.
7129 (thread_stack_temporaries_enabled_p): Return bool.
7130 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7131 (get_last_thread_stack_temporary): Update.
7132 * eval.c (evaluate_subexp): Update.
7133 * gdbthread.h (class enable_thread_stack_temporaries): Now a
7134 class, not a function.
7135 (value_ptr, value_vec): Remove typedefs.
7136 (class thread_info) <stack_temporaries_enabled>: Now bool.
7137 <stack_temporaries>: Now a std::vector.
7138 (thread_stack_temporaries_enabled_p)
7139 (value_in_thread_stack_temporaries): Return bool.
7141 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
7143 * remote.c (putpkt_binary): Fix omitted bytes reporting.
7144 (getpkt_or_notif_sane_1): Likewise.
7146 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7148 * build-id.c (build_id_to_debug_bfd): Use std::string.
7150 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7152 * build-id.c (find_separate_debug_file_by_buildid): Return
7154 * build-id.h (find_separate_debug_file_by_buildid): Return
7156 * coffread.c (coff_symfile_read): Adjust to std::string.
7157 * elfread.c (elf_symfile_read): Adjust to std::string.
7158 * symfile.c (separate_debug_file_exists): Change parameter to
7160 (find_separate_debug_file): Return std::string.
7161 (find_separate_debug_file_by_debuglink): Return std::string.
7162 * symfile.h (find_separate_debug_file_by_debuglink): Return
7165 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7167 * common/xml-utils.c (xml_escape_text): Move code to...
7168 (xml_escape_text_append): ... this new function.
7169 * common/xml-utils.h (xml_escape_text_append): New declaration.
7170 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
7172 (_initialize_xml_utils): register test_xml_escape_text_append as
7175 2018-03-07 Alan Hayward <alan.hayward@arm.com>
7177 * defs.h: Remove MAX_REGISTER_SIZE.
7178 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7180 * python/py-unwind.c (pyuw_sniffer): Likewise.
7182 2018-03-07 Tom Tromey <tom@tromey.com>
7184 * linux-tdep.c (linux_info_proc): Update.
7185 * target.h (struct target_ops) <to_fileio_readlink>: Return
7187 (target_fileio_readlink): Return optional<string>.
7188 * remote.c (remote_hostio_readlink): Return optional<string>.
7189 * inf-child.c (inf_child_fileio_readlink): Return
7191 * target.c (target_fileio_readlink): Return optional<string>.
7193 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
7195 * regcache.c (cooked_read_test): Add riscv to the list of
7196 architectures that have a save_reggroup.
7198 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
7200 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7201 value is not a dynamic class object.
7203 2018-03-06 Tom Tromey <tom@tromey.com>
7205 * rust-exp.y: Formatting fixes.
7207 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7209 * riscv-tdep.c (riscv_register_name): Remove target description
7211 (riscv_gdbarch_init): Remove target description check.
7213 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7215 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7217 * riscv-tdep.h: Likewise.
7219 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7221 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7222 (riscv_pseudo_register_write): Delete.
7223 (riscv_gdbarch_init): Remove all use of pseudo registers.
7225 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7227 * record-btrace.c (btrace_print_lines): Replace cleanup
7228 parameter with RAII equivalents.
7229 (btrace_insn_history): Replace cleanup with RAII equivalents.
7230 * ui-out.h (make_cleanup_ui_out_list_begin_end,
7231 make_cleanup_ui_out_tuple_begin_end): Remove.
7232 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7233 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7234 make_cleanup_ui_out_list_begin_end): Remove.
7236 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7238 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7239 parameter types to std::vector. Use bool.
7240 (record_btrace_wait): Replace VEC(tp_t) with
7241 std::vector<thread_info *>.
7242 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7244 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7246 * record-btrace.c (record_btrace_disable_callback): Remove.
7247 (struct scoped_btrace_disable): New.
7248 (record_btrace_open): Use scoped_btrace_disable.
7250 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7252 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7253 reading values from registers.
7255 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7257 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7260 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7262 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7263 change parameter type. Use GDB's print functions, and use
7264 core_addr_to_string where appropriate.
7265 (riscv_push_dummy_call): Use core_addr_to_string where
7266 appropriate, update call to riscv_print_arg_location, and reindent
7268 (riscv_return_value): Update call to riscv_print_arg_location.
7270 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7271 Tim Newsome <tim@sifive.com>
7272 Albert Ou <a0u@eecs.berkeley.edu>
7273 Darius Rad <darius@bluespec.com>
7275 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7276 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7277 (ALLDEPFILES): Add riscv-tdep.c
7278 * configure.tgt: Add riscv support.
7279 * riscv-tdep.c: New file.
7280 * riscv-tdep.h: New file.
7281 * NEWS: Mention new target.
7282 * MAINTAINERS: Add entry for riscv.
7284 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7286 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7287 fields within aggregates.
7289 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
7291 * record-btrace.c (btrace_print_lines): Change type of flags to
7292 gdb_disassembly_flags.
7294 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7296 * fbsd-nat.c: Include "inf-ptrace.h".
7297 (USE_SIGTRAP_SIGINFO): Conditionally define.
7298 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
7299 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
7300 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
7302 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
7304 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
7306 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
7307 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
7308 "supports_stopped_by_hw_breakpoint" target methods.
7310 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7312 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
7313 * fbsd-nat.c (debug_fbsd_nat): New variable.
7314 (show_fbsd_nat_debug): New function.
7315 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
7316 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
7318 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7320 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
7321 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
7323 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
7324 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
7327 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7329 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
7330 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
7332 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7334 * charset.c (struct charset_vector): New.
7335 (charsets): Change type to charset_vector.
7336 (find_charset_names): Adjust.
7338 (_initialize_charset): Adjust.
7340 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7342 * progspace.h (struct program_space) <deleted_solibs>: Change
7343 type to std::vector<std::string>.
7344 * progspace.c (clear_program_space_solib_cache): Adjust.
7345 * breakpoint.c (print_solib_event): Adjust.
7346 (check_status_catch_solib): Adjust.
7347 * solib.c (update_solib_list): Adjust.
7348 * ui-out.h (class ui_out) <field_string>: New overload.
7349 * ui-out.c (ui_out::field_string): New overload.
7351 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7353 * progspace.h (struct program_space): Add constructor and
7354 destructor, initialize fields.
7355 (add_program_space): Remove.
7356 * progspace.c (add_program_space): Rename to...
7357 (program_space::program_space): ... this.
7358 (release_program_space): Rename to...
7359 (program_space::~program_space): ... this.
7360 (delete_program_space): Use delete to delete program_space.
7361 (initialize_progspace): Use new to allocate program_space.
7362 * inferior.c (add_inferior_with_spaces): Likewise.
7363 (clone_inferior_command): Likewise.
7364 * infrun.c (follow_fork_inferior): Likewise.
7365 (handle_vfork_child_exec_or_exit): Likewise.
7367 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7369 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
7370 (delim_string_to_char_ptr_vec): Return std::vector of
7371 gdb::unique_xmalloc_ptr.
7372 (dirnames_to_char_ptr_vec_append): Take std::vector of
7373 gdb::unique_xmalloc_ptr.
7374 (dirnames_to_char_ptr_vec): Return std::vector of
7375 gdb::unique_xmalloc_ptr.
7376 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
7377 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
7378 (delim_string_to_char_ptr_vec): Return an std::vector of
7379 gdb::unique_xmalloc_ptr, adjust the code.
7380 (dirnames_to_char_ptr_vec_append): Take an std::vector of
7381 gdb::unique_xmalloc_ptr, adjust the code.
7382 (dirnames_to_char_ptr_vec): Return an std::vector of
7383 gdb::unique_xmalloc_ptr, adjust the code.
7384 * auto-load.c (auto_load_safe_path_vec): Change type to
7385 std::vector of gdb::unique_xmalloc_ptr.
7386 (auto_load_expand_dir_vars): Return an std::vector of
7387 gdb::unique_xmalloc_ptr, adjust the code.
7388 (auto_load_safe_path_vec_update): Adjust.
7389 (filename_is_in_auto_load_safe_path_vec): Adjust.
7390 (auto_load_objfile_script_1): Adjust.
7391 * build-id.c (build_id_to_debug_bfd): Adjust.
7392 * linux-thread-db.c (thread_db_load_search): Adjust.
7393 * source.c (add_path): Adjust.
7395 * symfile.c (find_separate_debug_file): Adjust.
7396 * utils.c (do_free_char_ptr_vec): Remove.
7397 (make_cleanup_free_char_ptr_vec): Remove.
7399 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
7402 * common/pathstuff.c: Conditionally include "<windows.h>".
7404 2018-03-01 Georg Sauthoff <mail@georg.so>
7407 * gcore.in: Quote variables and switch interpreter to bash.
7409 2018-03-01 Tom Tromey <tom@tromey.com>
7411 * dwarf2read.c (alloc_discriminant_info): Fix default_index
7412 assertion. Add assertion for discriminant_index.
7413 (quirk_rust_enum): Use correct base type name in univariant case.
7415 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
7417 * record.c (get_call_history_modifiers): Return a
7419 (cmd_record_call_history): Adjust.
7420 * record-btrace.c (record_btrace_call_history): Adjust.
7421 (record_btrace_call_history_range): Adjust.
7422 (record_btrace_call_history_from): Adjust.
7423 * target-debug.h (target_debug_print_record_print_flags): New.
7424 * target-delegates.c: Re-generate.
7425 * target.c (target_call_history): Change flags type.
7426 (target_call_history_from): Likewise.
7427 (target_call_history_range): Likewise.
7428 * target.h (struct target_ops) <target_call_history>: Likewise.
7429 (target_call_history_from): Likewise.
7430 (target_call_history_range): Likewise.
7432 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7433 Simon Marchi <simon.marchi@polymtl.ca>
7435 * common/common-utils.c: Include "sys/stat.h".
7436 (is_regular_file): Move here from "source.c"; change return
7438 * common/common-utils.h (is_regular_file): New prototype.
7439 * common/pathstuff.c (contains_dir_separator): New function.
7440 * common/pathstuff.h (contains_dir_separator): New prototype.
7441 * source.c: Don't include "sys/stat.h".
7442 (is_regular_file): Move to "common/common-utils.c".
7444 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7446 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
7447 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
7448 * auto-load.c: Include "common/pathstuff.h".
7449 * common/common-def.h (current_directory): Move here.
7450 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
7452 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
7454 * common/pathstuff.c: New file.
7455 * common/pathstuff.h: New file.
7456 * compile/compile.c: Include "common/pathstuff.h".
7457 * defs.h (current_directory): Move to "common/common-defs.h".
7458 * dwarf2read.c: Include "common/pathstuff.h".
7460 * guile/scm-safe-call.c: Likewise.
7461 * linux-thread-db.c: Likewise.
7463 * nto-tdep.c: Likewise.
7464 * objfiles.c: Likewise.
7465 * source.c: Likewise.
7466 * symtab.c: Likewise.
7467 * utils.c: Include "common/pathstuff.h".
7468 (gdb_realpath): Move to "common/pathstuff.c".
7469 (gdb_realpath_keepfile): Likewise.
7470 (gdb_abspath): Likewise.
7471 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
7472 (gdb_realpath_keepfile): Likewise.
7473 (gdb_abspath): Likewise.
7475 2018-02-28 John Baldwin <jhb@FreeBSD.org>
7477 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
7478 wildcard process pid for super_resume for kernels with a
7481 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
7483 * compile/compile.c (get_args): Add additional comments
7484 explaining function.
7486 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
7487 Tom Tromey <tom@tromey.com>
7489 * target.h (memory_write_request_s): Remove typedef. Don't define
7491 (target_write_memory_blocks): Change argument to std::vector.
7492 (struct memory_write_request): Add constructor.
7493 * target-memory.c (compare_block_starting_address): Return bool.
7494 Change argument types.
7495 (claim_memory): Change arguments to use std::vector.
7496 (split_regular_and_flash_blocks, blocks_to_erase)
7497 (compute_garbled_blocks): Likewise.
7498 (cleanup_request_data, cleanup_write_requests_vector): Remove.
7499 (target_write_memory_blocks): Change argument to std::vector.
7500 * symfile.c (struct load_section_data): Add constructor and
7501 destructor. Use std::vector for "requests".
7502 (struct load_progress_data): Add initializers.
7503 (load_section_callback): Update. Use "new".
7504 (clear_memory_write_data): Remove.
7505 (generic_load): Update.
7507 2018-02-27 Alan Hayward <alan.hayward@arm.com>
7509 * arch/aarch64.h: Use common/tdesc.h.
7511 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7513 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
7514 architecture with a 64-bit ABI.
7516 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7518 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
7519 ahead of target description loading.
7521 2018-02-26 Tom Tromey <tom@tromey.com>
7523 * stack.c (backtrace_command_1): Update.
7524 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
7526 * python/py-framefilter.c (py_print_frame)
7527 (gdbpy_apply_frame_filter): Change type of "flags".
7528 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
7530 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
7531 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
7532 * extension.h (enum frame_filter_flag): Rename from
7534 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
7535 (apply_ext_lang_frame_filter): Change type of "flags".
7536 * extension.c (apply_ext_lang_frame_filter): Change type of
7538 * extension-priv.h (struct extension_language_ops)
7539 <apply_frame_filter>: Change type of "flags".
7541 2018-02-26 Tom Tromey <tom@tromey.com>
7544 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
7545 off-by-one in py_end computation.
7546 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
7548 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
7551 2018-02-26 Tom Tromey <tom@tromey.com>
7553 * dwarf2read.c (struct variant_field): New.
7554 (struct nextfield) <variant>: New field.
7555 (dwarf2_add_field): Handle DW_TAG_variant_part.
7556 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
7557 discriminated union.
7558 (read_structure_type): Handle DW_TAG_variant_part.
7559 (handle_struct_member_die): New function, extracted from
7560 process_structure_scope. Handle DW_TAG_variant.
7561 (process_structure_scope): Handle discriminated unions. Call
7562 handle_struct_member_die.
7564 2018-02-26 Tom Tromey <tom@tromey.com>
7566 * rust-lang.h (rust_last_path_segment): Declare.
7567 * rust-lang.c (rust_last_path_segment): Now public. Change
7569 (struct disr_info): Remove.
7570 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
7571 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
7572 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
7573 (rust_enum_p, rust_enum_variant): New function.
7574 (rust_underscore_fields): Remove "offset" parameter.
7575 (rust_print_enum): New function.
7576 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
7577 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
7578 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
7580 (rust_internal_print_type): New function, from rust_print_type.
7582 (rust_print_type): Call rust_internal_print_type.
7583 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
7584 Update enum handling.
7585 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
7586 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
7587 (rust_union_quirks): New functions.
7588 (process_full_comp_unit, process_full_type_unit): Call
7590 (process_structure_scope): Update rust_unions if necessary.
7592 2018-02-26 Tom Tromey <tom@tromey.com>
7594 * value.h (value_union_variant): Declare.
7595 * valops.c (value_union_variant): New function.
7596 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
7597 (struct discriminant_info): New.
7598 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
7600 (struct main_type) <flag_discriminated_union>: New field.
7602 2018-02-26 Tom Tromey <tom@tromey.com>
7604 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7605 unittests/unpack-selftests.c.
7606 * unittests/unpack-selftests.c: New file.
7607 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
7609 2018-02-26 Yao Qi <yao.qi@linaro.org>
7611 * dwarf2read.c (struct partial_die_info) <read>: New method.
7612 (read_partial_die): Remove the declaration.
7613 (load_partial_dies): Update.
7614 (partial_die_info::partial_die_info):
7615 (read_partial_die): Change it to partial_die_info::read.
7617 2018-02-26 Yao Qi <yao.qi@linaro.org>
7619 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
7620 (fixup_partial_die): Remove declaration.
7621 (scan_partial_symbols): Update.
7622 (partial_die_parent_scope): Likewise.
7623 (partial_die_full_name): Likewise.
7624 (fixup_partial_die): Change it to partial_die_info::fixup.
7626 2018-02-26 Yao Qi <yao.qi@linaro.org>
7628 * dwarf2read.c (read_partial_die): Update the declaration.
7629 (load_partial_dies): Caller update.
7630 (read_partial_die): Remove one argument abbrev_len.
7632 2018-02-26 Yao Qi <yao.qi@linaro.org>
7634 * dwarf2read.c (struct partial_die_info): Add ctor, delete
7635 assignment operator.
7636 (load_partial_dies): Use ctor and copy ctor.
7637 (read_partial_die): Update.
7638 (dwarf2_cu::find_partial_die): Use ctor.
7640 2018-02-26 Yao Qi <yao.qi@linaro.org>
7642 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
7643 (find_partial_die_in_comp_unit): Change it to
7644 dwarf2_cu::find_partial_die.
7645 (find_partial_die): Update.
7647 2018-02-26 Yao Qi <yao.qi@linaro.org>
7649 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
7652 2018-02-26 Yao Qi <yao.qi@linaro.org>
7654 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
7656 2018-02-26 Alan Hayward <alan.hayward@arm.com>
7658 * arch/amd64.h: Use common/tdesc.h.
7659 * arch/i386.c: Likewise.
7660 * arch/i386.h: Likewise.
7661 * arch/tic6x.c: Likewise.
7662 * arch/tdesc.h: Move file from here...
7663 * common/tdesc.h: ...to here.
7664 * features/aarch64-core.c: Regenerate.
7665 * features/aarch64-fpu.c: Regenerate.
7666 * features/i386/32bit-avx.c: Regenerate.
7667 * features/i386/32bit-avx512.c: Regenerate.
7668 * features/i386/32bit-core.c: Regenerate.
7669 * features/i386/32bit-linux.c: Regenerate.
7670 * features/i386/32bit-mpx.c: Regenerate.
7671 * features/i386/32bit-pkeys.c: Regenerate.
7672 * features/i386/32bit-sse.c: Regenerate.
7673 * features/i386/64bit-avx.c: Regenerate.
7674 * features/i386/64bit-avx512.c: Regenerate.
7675 * features/i386/64bit-core.c: Regenerate.
7676 * features/i386/64bit-linux.c: Regenerate.
7677 * features/i386/64bit-mpx.c: Regenerate.
7678 * features/i386/64bit-pkeys.c: Regenerate.
7679 * features/i386/64bit-segments.c: Regenerate.
7680 * features/i386/64bit-sse.c: Regenerate.
7681 * features/i386/x32-core.c: Regenerate.
7682 * features/tic6x-c6xp.c: Regenerate.
7683 * features/tic6x-core.c: Regenerate.
7684 * features/tic6x-gp.c: Regenerate.
7685 * target-descriptions.c: Use common/tdesc.h.
7686 * target-descriptions.h: Likewise.
7688 2018-02-24 Tom Tromey <tom@tromey.com>
7690 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
7691 (try_thread_db_load_from_dir, thread_db_load_search): Use
7693 (info_auto_load_libthread_db_compare): Return bool. Change
7695 (info_auto_load_libthread_db): Use std::vector, std::string.
7698 2018-02-24 Tom Tromey <tom@tromey.com>
7700 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
7702 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
7704 * gdbarch.c: Rebuild.
7705 * gdbarch.h: Rebuild.
7706 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
7707 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
7708 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
7711 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
7713 * gdbtypes.h (sect_offset): Change type to uint64_t.
7714 (sect_offset_str): New function.
7715 * dwarf2read.c (create_addrmap_from_aranges): Use
7717 (error_check_comp_unit_head): Likewise.
7718 (create_debug_type_hash_table): Likewise.
7719 (read_cutu_die_from_dwo): Likewise.
7720 (init_cutu_and_read_dies): Likewise.
7721 (init_cutu_and_read_dies_no_follow): Likewise.
7722 (process_psymtab_comp_unit_reader): Likewise.
7723 (partial_die_parent_scope): Likewise.
7724 (peek_die_abbrev): Likewise.
7725 (process_queue): Likewise.
7726 (dwarf2_physname): Likewise.
7727 (read_namespace_alias): Likewise.
7728 (read_import_statement): Likewise.
7729 (create_dwo_cu_reader): Likewise.
7730 (create_cus_hash_table): Likewise.
7731 (lookup_dwo_cutu): Likewise.
7732 (inherit_abstract_dies): Likewise.
7733 (read_func_scope): Likewise.
7734 (read_call_site_scope): Likewise.
7735 (dwarf2_add_member_fn): Likewise.
7736 (read_common_block): Likewise.
7737 (read_module_type): Likewise.
7738 (read_typedef): Likewise.
7739 (read_subrange_type): Likewise.
7740 (load_partial_dies): Likewise.
7741 (read_partial_die): Likewise.
7742 (find_partial_die): Likewise.
7743 (read_str_index): Likewise.
7744 (dwarf2_string_attr): Likewise.
7745 (build_error_marker_type): Likewise.
7746 (lookup_die_type): Likewise.
7747 (dump_die_shallow): Likewise.
7748 (follow_die_ref): Likewise.
7749 (dwarf2_fetch_die_loc_sect_off): Likewise.
7750 (dwarf2_fetch_constant_bytes): Likewise.
7751 (follow_die_sig): Likewise.
7752 (get_signatured_type): Likewise.
7753 (get_DW_AT_signature_type): Likewise.
7754 (dwarf2_find_containing_comp_unit): Likewise.
7755 (set_die_type): Likewise.
7757 2018-02-21 John Baldwin <jhb@FreeBSD.org>
7759 * arch/aarch64.c: Include "common-defs.h".
7760 * arch/amd64.c: Likewise.
7761 * arch/i386.c: Likewise.
7763 2018-02-21 Tom Tromey <tom@tromey.com>
7765 * value.h: (extract_field_op): Update.
7766 * eval.c (extract_field_op): Return a const char *.
7767 * expression.h (parse_expression_for_completion): Update.
7768 * completer.c (complete_expression): Update.
7769 (add_struct_fields): Make fieldname const.
7770 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
7771 (mark_completion_tag, parse_exp_in_context_1): Update.
7772 (parse_expression_for_completion): Change "name" to
7773 unique_xmalloc_ptr*.
7775 2018-02-21 Tom Tromey <tom@tromey.com>
7777 * infcall.c (call_function_by_hand_dummy): Use std::vector.
7779 2018-02-21 Yao Qi <yao.qi@linaro.org>
7781 * avr-tdep.c (avr_read_pc): Change parameter type to
7783 * gdbarch.sh (read_pc): Likewise.
7784 * gdbarch.c: Re-generated.
7785 * gdbarch.h: Re-generated.
7786 * hppa-tdep.c (hppa_read_pc): Change parameter type to
7788 * ia64-tdep.c (ia64_read_pc): Likewise.
7789 * mips-tdep.c (mips_read_pc): Likewise.
7790 * spu-tdep.c (spu_read_pc): Likewise.
7792 2018-02-21 Yao Qi <yao.qi@linaro.org>
7794 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
7795 * regcache-dump.c: New file.
7796 * regcache.c: Move register_dump to regcache-dump.c.
7797 (maintenance_print_registers): Likewise.
7798 (maintenance_print_raw_registers): Likewise.
7799 (maintenance_print_cooked_registers): Likewise.
7800 (maintenance_print_register_groups): Likewise.
7801 (maintenance_print_remote_registers): Likewise.
7802 (_initialize_regcache): Likewise.
7803 * regcache.h (register_dump): Moved from regcache.c.
7805 2018-02-21 Yao Qi <yao.qi@linaro.org>
7807 * regcache.c (regcache::regcache): Update.
7808 (regcache::invalidate): Move it to detached_regcache::invalidate.
7809 (get_thread_arch_aspace_regcache): Update.
7810 (regcache::raw_update): Update.
7811 (regcache::cooked_read): Remove some code.
7812 (regcache::cooked_read_value): Likewise.
7813 (regcache::raw_write): Remove assert on m_readonly_p.
7814 (regcache::raw_supply_integer): Move it to
7815 detached_regcache::raw_supply_integer.
7816 (regcache::raw_supply_zeroed): Likewise.
7817 * regcache.h (detached_regcache) <raw_supply_integer>: New
7819 <raw_supply_zeroed, invalidate>: Likewise.
7820 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
7821 <invalidate>: Likewise.
7822 <m_readonly_p>: Removed.
7824 2018-02-21 Yao Qi <yao.qi@linaro.org>
7826 * infcmd.c (get_return_value): Let stop_regs point to
7827 get_current_regcache.
7828 * regcache.c (regcache::regcache): Remove.
7829 (register_dump_reg_buffer): New class.
7830 (regcache_print): Adjust.
7831 * regcache.h (regcache): Remove constructors.
7833 2018-02-21 Yao Qi <yao.qi@linaro.org>
7835 * regcache.c (class register_dump): New class.
7836 (register_dump_regcache, register_dump_none): New class.
7837 (register_dump_remote, register_dump_groups): New class.
7838 (regcache_print): Update.
7839 * regcache.h (regcache_dump_what): Move it to regcache.c.
7840 (regcache) <dump>: Remove.
7842 2018-02-21 Yao Qi <yao.qi@linaro.org>
7844 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
7846 (jit_unwind_reg_set_impl): Call raw_supply.
7847 (jit_frame_sniffer): Use reg_buffer_rw.
7848 * record-full.c (record_full_core_regbuf): Change its type.
7849 (record_full_core_open_1): Use reg_buffer_rw.
7850 (record_full_close): Likewise.
7851 (record_full_core_fetch_registers): Use regcache->raw_supply.
7852 (record_full_core_store_registers): Likewise.
7853 * regcache.c (regcache::get_register_status): Move it to
7855 (regcache_raw_set_cached_value): Remove.
7856 (regcache::raw_set_cached_value): Remove.
7857 (regcache::raw_write): Call raw_supply.
7858 (regcache::raw_supply): Move it to reg_buffer_rw.
7859 * regcache.h (regcache_raw_set_cached_value): Remove.
7860 (reg_buffer_rw): New class.
7862 2018-02-21 Yao Qi <yao.qi@linaro.org>
7864 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
7865 readonly_detached_regcache.
7866 (dummy_frame_prev_register): Use regcache->cooked_read.
7867 * frame.c (frame_save_as_regcache): Change return type.
7868 (frame_pop): Update.
7869 * frame.h (frame_save_as_regcache): Update declaration.
7870 * inferior.h (get_infcall_suspend_state_regcache): Update
7872 * infrun.c (infcall_suspend_state) <registers>: use
7873 readonly_detached_regcache.
7874 (save_infcall_suspend_state): Don't use regcache_dup.
7875 (get_infcall_suspend_state_regcache): Change return type.
7876 * linux-fork.c (struct fork_info) <savedregs>: Change to
7877 readonly_detached_regcache.
7879 (fork_save_infrun_state): Don't use regcache_dup.
7880 (info_checkpoints_command): Adjust.
7881 * mi/mi-main.c (register_changed_p): Update declaration.
7882 (mi_cmd_data_list_changed_registers): Use
7883 readonly_detached_regcache.
7884 (register_changed_p): Change parameter type to
7885 readonly_detached_regcache.
7886 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
7887 readonly_detached_regcache.
7888 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
7889 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
7891 (regcache::save): Move it to reg_buffer.
7892 (regcache::restore): Change parameter type.
7893 (regcache_dup): Remove.
7894 * regcache.h (reg_buffer) <save>: New method.
7895 (readonly_detached_regcache): New class.
7896 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
7897 readonly_detached_regcache.
7898 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
7900 2018-02-21 Yao Qi <yao.qi@linaro.org>
7902 * frame.c (frame_save_as_regcache): Use regcache method save.
7903 (frame_pop): Use regcache method restore.
7904 * infrun.c (restore_infcall_suspend_state): Likewise.
7905 * linux-fork.c (fork_load_infrun_state): Likewise.
7906 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
7908 * regcache.c (regcache_save): Remove.
7909 (regcache::restore): More asserts.
7910 (regcache_cpy): Remove.
7911 * regcache.h (regcache_save): Remove the declaration.
7912 (regcache::restore): Move from private to public.
7913 Remove the friend declaration of regcache_cpy.
7914 (regcache_cpy): Remove declaration.
7916 2018-02-21 Yao Qi <yao.qi@linaro.org>
7918 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
7919 parameter type to 'readable_regcache *'.
7920 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
7921 * arm-tdep.c (arm_neon_quad_read): Likewise.
7922 (arm_pseudo_read): Likewise.
7923 * avr-tdep.c (avr_pseudo_register_read): Likewise.
7924 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
7925 * frv-tdep.c (frv_pseudo_register_read): Likewise.
7926 * gdbarch.c: Re-generated.
7927 * gdbarch.h: Re-generated.
7928 * gdbarch.sh (pseudo_register_read): Change parameter type to
7929 'readable_regcache *'.
7930 (pseudo_register_read_value): Likewise.
7931 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
7932 (h8300_pseudo_register_read): Likewise.
7933 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
7934 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
7935 (i386_pseudo_register_read_into_value): Likewise.
7936 (i386_pseudo_register_read_value): Likewise.
7937 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
7939 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
7940 * m32c-tdep.c (m32c_raw_read): Likewise.
7941 (m32c_read_flg): Likewise.
7942 (m32c_banked_register): Likewise.
7943 (m32c_banked_read): Likewise.
7944 (m32c_sb_read): Likewise.
7945 (m32c_part_read): Likewise.
7946 (m32c_cat_read): Likewise.
7947 (m32c_r3r2r1r0_read): Likewise.
7948 (m32c_pseudo_register_read): Likewise.
7949 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
7950 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
7951 (mep_pseudo_cr64_read): Likewise.
7952 (mep_pseudo_register_read): Likewise.
7953 * mips-tdep.c (mips_pseudo_register_read): Likewise.
7954 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
7955 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
7956 * regcache.c (regcache::raw_read): Move it to readable_regcache.
7957 (regcache::cooked_read): Likewise.
7958 (regcache::cooked_read_value): Likewise.
7959 (regcache_cooked_read_signed):
7960 (regcache::cooked_read): Likewise.
7961 * regcache.h (readable_regcache): New class.
7962 (regcache): Inherit readable_regcache. Move some methods to
7964 * rl78-tdep.c (rl78_pseudo_register_read): Change
7965 parameter type to 'readable_regcache *'.
7966 * rs6000-tdep.c (do_regcache_raw_read): Remove.
7967 (e500_pseudo_register_read): Change parameter type to
7968 'readable_regcache *'.
7969 (dfp_pseudo_register_read): Likewise.
7970 (vsx_pseudo_register_read): Likewise.
7971 (efpr_pseudo_register_read): Likewise.
7972 * s390-tdep.c (s390_pseudo_register_read): Likewise.
7973 * sh-tdep.c (sh_pseudo_register_read): Likewise.
7974 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
7975 (sh64_pseudo_register_read): Likewise.
7976 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
7977 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
7978 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
7979 (spu_pseudo_register_read): Likewise.
7980 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
7981 (xtensa_pseudo_register_read): Likewise.
7983 2018-02-21 Yao Qi <yao.qi@linaro.org>
7985 * regcache.c (regcache::regcache): Call reg_buffer ctor.
7986 (regcache::arch): Move it to reg_buffer::arch.
7987 (regcache::register_buffer): Likewise.
7988 (regcache::assert_regnum): Likewise.
7989 (regcache::num_raw_registers): Likewise.
7990 * regcache.h (reg_buffer): New class.
7991 (regcache): Inherit reg_buffer.
7993 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
7995 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
7996 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
7998 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
8000 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
8002 2018-02-19 Alan Hayward <alan.hayward@arm.com>
8004 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
8005 (SFILES): Remove common/*.c files.
8006 (COMMON_OBS): Remove some *.o files built from common/*.c files.
8007 * common/common.host: Add common reference.
8008 * configure.ac: Likewise.
8009 * configure: Regenerate.
8011 2018-02-16 Yao Qi <yao.qi@linaro.org>
8013 * block.c (block_namespace_info): Inherit allocate_on_obstack.
8014 (block_initialize_namespace): Use new.
8015 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
8016 (dwarf2_free_objfile): Use delete.
8017 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
8018 (copy_type_recursive): Use new.
8019 * gdb_obstack.h (allocate_on_obstack): New.
8021 2018-02-15 Yao Qi <yao.qi@linaro.org>
8024 * inferior.c (exit_inferior_1): Reset inf->control.
8026 2018-02-15 Joel Brobecker <brobecker@adacore.com>
8028 * ada-lang.c (ada_to_fixed_value_create): Delete advance
8031 2018-02-14 Pedro Alves <palves@redhat.com>
8033 * frame-unwind.c (frame_unwind_try_unwinder): Always call
8034 frame_cleanup_after_sniffer on exception.
8036 2018-02-14 Tom Tromey <tom@tromey.com>
8038 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
8040 (solib_bfd_open): Make pathname const.
8041 * solib.c (solib_bfd_open): Make pathname const.
8042 * solib-spu.c (spu_bfd_fopen): Make name const.
8043 (spu_bfd_open): Make pathname const.
8044 * solib-darwin.c (darwin_bfd_open): Make pathname const.
8045 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
8047 2018-02-14 Tom Tromey <tom@tromey.com>
8049 * symfile.c (symfile_bfd_open): Update.
8050 * source.h (openp, source_full_path_of, find_and_open_source):
8051 Change argument type to unique_xmalloc_ptr.
8052 * source.c (openp): Take a unique_xmalloc_ptr.
8053 (source_full_path_of, find_and_open_source): Likewise.
8054 (open_source_file, symtab_to_fullname): Update.
8055 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8057 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8058 (exec_file_find): Update.
8059 * psymtab.c (psymtab_to_fullname): Update.
8060 * nto-tdep.h (nto_find_and_open_solib): Update.
8061 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8063 * exec.c (exec_file_attach): Update.
8064 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8065 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8067 2018-02-14 Tom Tromey <tom@tromey.com>
8069 * solib.c: Include source.h.
8070 * nto-tdep.c: Include source.h.
8071 * mi/mi-cmd-env.c: Include source.h.
8072 * infcmd.c: Include source.h.
8073 * exec.c: Include source.h.
8074 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8075 (add_path, directory_switch, source_path, init_source_path): Move
8077 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8078 (add_path, directory_switch, source_path, init_source_path):
8081 2018-02-14 Tom Tromey <tom@tromey.com>
8083 * solist.h (exec_file_find, solib_find): Return
8085 (solib_bfd_fopen): Take a const char *.
8086 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8087 (exec_file_find, solib_find): Likewise.
8088 (solib_bfd_fopen): Do not take ownership of "pathname".
8089 (solib_bfd_open): Use unique_xmalloc_ptr.
8090 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8091 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8092 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8093 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8095 2018-02-14 Joel Brobecker <brobecker@adacore.com>
8097 * ada-lang.c (name_match_type_from_name): Remove reference to
8098 ada_name_for_lookup in function's documentation.
8099 * ada-lang.h (ada_name_for_lookup): Delete declaration.
8101 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8103 * defs.h (enum openp_flags): New enum.
8104 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8105 Move to enum openp_flags.
8106 (openp_flags): New enum flags.
8107 (openp): Change parameter type to openp_flags.
8108 * source.c (openp): Change parameter type to openp_flags.
8109 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8110 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8112 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8114 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8117 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
8119 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8121 (class dwarf2_queue_guard): ...the destructor of this new class.
8122 (dw2_do_instantiate_symtab): Create instance of the new class
8123 dwarf2_queue_guard, remove cleanup.
8125 2018-02-09 Tom Tromey <tom@tromey.com>
8127 * source.c (find_source_lines): Don't reference past the end of
8130 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8132 * remote.c (remote_btrace_maybe_reopen): Change error message.
8133 * btrace.c (btrace_enable): Likewise.
8134 (parse_xml_btrace): Likewise.
8135 (parse_xml_btrace_conf): Likewise.
8137 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8139 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
8140 (linux_enable_pt, linux_enable_bts): Call
8141 diagnose_perf_event_open_fail.
8143 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8145 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
8146 Remove parameter and change return type. Update callers. Move it.
8147 (linux_enable_bts, linux_enable_pt): Improve error message.
8148 (linux_enable_pt): Remove zero buffer size check.
8149 (linux_enable_btrace): Improve error messages. Remove NULL return
8152 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8154 * btrace.c (btrace_enable): Remove target_supports_btrace call.
8155 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
8156 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
8157 (linux_supports_pt, linux_supports_btrace): Remove.
8158 (linux_enable_bts): Call cpu_supports_bts.
8159 * nat/linux-btrace.h (linux_supports_btrace): Remove.
8160 * remote.c (remote_supports_btrace): Remove.
8161 (init_remote_ops): Remove remote_supports_btrace.
8162 * target-delegates.c: Regenerated.
8163 * target.c (target_supports_btrace): Remove.
8164 * target.h (target_ops) <to_supports_btrace>: Remove
8165 (target_supports_btrace): Remove.
8166 * x86-linux-nat.c (x86_linux_create_target): Remove
8167 linux_supports_btrace.
8169 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8171 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
8173 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
8174 exception and use message in own exception.
8176 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8178 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8179 (perf_event_pt_event_type): Use gdb_file_up.
8180 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8181 scoped_fd, and scoped_mmap.
8183 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8185 * common/scoped_mmap.h: New.
8186 * unittests/scoped_mmap-selftest.c: New.
8187 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8188 unittests/scoped_mmap-selftest.c.
8190 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8192 * common/scoped_fd.h: New.
8193 * unittests/scoped_fd-selftest.c: New.
8194 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8195 unittests/scoped_fd-selftest.c.
8197 2018-02-09 Tom Tromey <tom@tromey.com>
8199 * auto-load.c (auto_load_section_scripts): Use
8200 gdb::unique_xmalloc_ptr.
8202 2018-02-09 Tom Tromey <tom@tromey.com>
8204 * auto-load.c (execute_script_contents): Use std::string.
8206 2018-02-09 Joel Brobecker <brobecker@adacore.com>
8208 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8209 Python function, rather than a new command.
8211 2018-02-08 Tom Tromey <tom@tromey.com>
8213 * solib.c (solib_find_1): Use std::string.
8214 (solib_bfd_fopen): Use unique_xmalloc_ptr.
8216 2018-02-08 Tom Tromey <tom@tromey.com>
8218 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8220 2018-02-08 Tom Tromey <tom@tromey.com>
8222 * source.c (find_source_lines): Use gdb::def_vector.
8224 2018-02-08 Tom Tromey <tom@tromey.com>
8226 * macrocmd.c (struct temporary_macro_definition): New.
8227 (macro_define_command): Use temporary_macro_definition. Remove
8229 (free_macro_definition_ptr): Remove.
8231 2018-02-08 Tom Tromey <tom@tromey.com>
8233 * macroexp.c (maybe_expand): Use std::string.
8235 2018-02-08 Tom Tromey <tom@tromey.com>
8237 * macroexp.c (struct macro_buffer): Add initializers for some
8239 (init_buffer, init_shared_buffer, free_buffer)
8240 (free_buffer_return_text): Remove.
8241 (macro_buffer): New constructors.
8242 (~macro_buffer): New destructor.
8243 (macro_buffer::set_shared): New method.
8244 (macro_buffer::resize_buffer, macro_buffer::appendc)
8245 (macro_buffer::appendmem): Now methods, not free functions.
8246 (set_token, append_tokens_without_splicing, stringify)
8247 (macro_stringify): Update.
8248 (gather_arguments): Change return type. Remove argc_p argument,
8249 add args_ptr argument. Use std::vector.
8250 (substitute_args): Remove argc argument. Accept std::vector.
8251 (expand): Update. Use std::vector.
8252 (scan, macro_expand, macro_expand_next): Update.
8254 2018-02-08 Tom Tromey <tom@tromey.com>
8256 * symtab.c (default_collect_symbol_completion_matches_break_on):
8257 Use unique_xmalloc_ptr.
8258 * macroscope.h: (sal_macro_scope, user_macro_scope)
8259 (default_macro_scope): Return unique_xmalloc_ptr.
8260 * macroscope.c (sal_macro_scope, user_macro_scope)
8261 (default_macro_scope): Return unique_xmalloc_ptr.
8262 * macroexp.h (macro_expand, macro_expand_once): Return
8264 * macroexp.c (macro_expand, macro_expand_once): Return
8266 * macrocmd.c (macro_expand_command, macro_expand_once_command)
8267 (info_macro_command, info_macros_command): Use
8269 * compile/compile-c-support.c (write_macro_definitions): Use
8271 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8273 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
8275 * value.c (value_static_field): Assign field type instead of
8276 containing type when returning an optimized out value.
8278 2018-02-06 Yao Qi <yao.qi@linaro.org>
8280 * ft32-tdep.c (ft32_read_pc): Remove.
8281 (ft32_write_pc): Remove.
8282 (ft32_gdbarch_init): Update.
8283 * m32r-tdep.c (m32r_read_pc): Remove.
8284 (m32r_gdbarch_init): Update.
8285 * mep-tdep.c (mep_read_pc): Remove.
8286 (mep_gdbarch_init): Update.
8287 * microblaze-tdep.c (microblaze_write_pc): Remove.
8288 (microblaze_gdbarch_init): Update.
8289 * mn10300-tdep.c (mn10300_read_pc): Remove.
8290 (mn10300_write_pc): Remove.
8291 (mn10300_gdbarch_init): Update.
8292 * moxie-tdep.c (moxie_read_pc): Remove.
8293 (moxie_write_pc): Remove.
8294 (moxie_gdbarch_init): Update.
8296 2018-02-06 Yao Qi <yao.qi@linaro.org>
8298 * expprint.c (print_subexp_standard): Handle
8299 OP_F77_UNDETERMINED_ARGLIST.
8300 (dump_subexp_body_standard): Likewise.
8302 2018-02-05 Alan Hayward <alan.hayward@arm.com>
8304 * target-descriptions.c (tdesc_element_visitor) Add empty
8306 (tdesc_type): Move make_gdb_type from here.
8307 (tdesc_type_builtin): Likewise.
8308 (tdesc_type_vector): Likewise.
8309 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
8310 (make_gdb_type_struct): Move from tdesc_type_with_fields.
8311 (make_gdb_type_union): Likewise.
8312 (make_gdb_type_flags): Likewise.
8313 (make_gdb_type_enum): Likewise.
8314 (make_gdb_type): New function.
8315 (tdesc_register_type): Use static make_gdb_type.
8317 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
8319 * infcmd.c (default_print_one_register_info): Align natural-format
8320 column values consistently one under another.
8321 (pad_to_column): New function.
8323 2018-02-05 Joel Brobecker <brobecker@adacore.com>
8325 * dwarf2read.c (dwarf2_physname): Move commment.
8327 2018-02-01 Leszek Swirski <leszeks@google.com>
8329 * varobj.c (varobj_formatted_print_options): Allow recursive
8330 pretty printing if pretty printing is enabled.
8332 2018-02-01 Leszek Swirski <leszeks@google.com>
8334 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
8335 names after a structop as a filename.
8337 2018-02-01 Yao Qi <yao.qi@linaro.org>
8339 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
8340 (arm_record_coproc_data_proc): Likewise.
8342 2018-02-01 Yao Qi <yao.qi@linaro.org>
8344 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
8346 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
8348 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
8349 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
8351 2018-01-31 Pedro Alves <palves@redhat.com>
8353 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
8354 * inflow.c (child_terminal_save_inferior): Wrap reference to
8355 tcgetpgrp in HAVE_TERMIOS_H.
8356 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
8358 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
8359 always iterate over all inferiors.
8360 (gdbsim_cntrl_c): Adjust.
8361 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
8363 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8365 * gdbtypes.c (lookup_array_range_type): Make sure the array's
8366 index type is objfile-owned if the element type is as well.
8368 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8372 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
8374 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
8375 "features/s390x-linux64.c".
8376 (_initialize_s390_linux_tdep): Remove initialization of tdescs
8377 s390_linux32 and s390x_linux64.
8378 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
8380 * s390-tdep.c: Include "features/s390-linux32.c" and
8381 "features/s390x-linux64.c".
8382 (s390_tdesc_valid): Add check for tdesc_has_registers.
8383 (s390_gdbarch_init): Make sure there is always a valid tdesc.
8384 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
8385 tdesc_s390x_linux64.
8386 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
8387 tdesc_s390x_linux64 to...
8388 * s390-tdep.h: ...here.
8390 2018-01-30 Pedro Alves <palves@redhat.com>
8393 * config.in, configure: Regenerate.
8394 * configure.ac: Check for getpgid.
8395 * go32-nat.c (go32_pass_ctrlc): New.
8396 (go32_target): Install it.
8397 * inf-child.c (inf_child_target): Install
8398 child_terminal_save_inferior, child_pass_ctrlc and
8400 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
8401 (inf_ptrace_target): No longer install it.
8402 * infcmd.c (interrupt_target_1): Adjust.
8403 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
8404 (child_interrupt): Declare.
8405 (inferior::terminal_state): New.
8406 * inflow.c (struct terminal_info): Update comments.
8407 (inferior_process_group): Delete.
8408 (terminal_is_ours): Delete.
8409 (gdb_tty_state): New.
8410 (child_terminal_init): Adjust.
8411 (is_gdb_terminal, sharing_input_terminal_1)
8412 (sharing_input_terminal): New functions.
8413 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
8414 Set the process's actual process group in the foreground if
8415 possible. Handle is_ours_for_output/is_ours distinction. Don't
8416 mark terminal as the inferior's if not sharing GDB's terminal.
8417 Don't check attach_flag.
8418 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
8419 pass down a target_terminal_state.
8420 (child_terminal_save_inferior): New, factored out from ...
8421 (child_terminal_ours_1): ... this. Handle
8422 target_terminal_state::is_ours_for_output.
8423 (child_interrupt, child_pass_ctrlc): New.
8424 (inflow_inferior_exit): Clear the inferior's terminal_state.
8425 (copy_terminal_info): Copy the inferior's terminal state.
8426 (_initialize_inflow): Remove reference to terminal_is_ours.
8427 * inflow.h (inferior_process_group): Delete.
8428 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
8429 * procfs.c (procfs_target): Don't install procfs_interrupt.
8430 (procfs_interrupt): Delete.
8431 * remote.c (remote_serial_quit_handler): Adjust.
8432 (remote_interrupt): Remove ptid parameter. Adjust.
8433 * target-delegates.c: Regenerate.
8434 * target.c: Include "terminal.h".
8435 (target_terminal::terminal_state): Rename to ...
8436 (target_terminal::m_terminal_state): ... this.
8437 (target_terminal::init): Adjust.
8438 (target_terminal::inferior): Adjust to per-inferior
8440 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
8441 (target_terminal::ours, target_terminal::ours_for_output): Use
8442 target_terminal_is_ours_kind.
8443 (target_interrupt): Remove ptid parameter. Adjust.
8444 (default_target_pass_ctrlc): Adjust.
8445 * target.h (target_ops::to_terminal_save_inferior): New field.
8446 (target_ops::to_interrupt): Remove ptid_t parameter.
8447 (target_interrupt): Remove ptid_t parameter. Update comment.
8448 (target_pass_ctrlc): Update comment.
8449 * target/target.h (target_terminal_state): New scoped enum,
8451 (target_terminal::terminal_state): ... here.
8452 (target_terminal::inferior): Update comments.
8453 (target_terminal::restore_inferior): New.
8454 (target_terminal::is_inferior, target_terminal::is_ours)
8455 (target_terminal::is_ours_for_output): Adjust.
8456 (target_terminal::scoped_restore_terminal_state): Adjust to
8457 rename, and call restore_inferior() instead of inferior().
8458 (target_terminal::scoped_restore_terminal_state::m_state): Change
8460 (target_terminal::terminal_state): Rename to ...
8461 (target_terminal::m_terminal_state): ... this and change type.
8463 2018-01-30 Pedro Alves <palves@redhat.com>
8465 * linux-nat.c (wait_for_signal): New function.
8466 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
8468 (async_terminal_is_ours)
8469 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
8470 (linux_nat_add_target): Don't override
8471 to_terminal_inferior/to_terminal_ours.
8473 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
8475 * remote.c (remote_follow_fork): Don't call "detach_inferior".
8477 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
8479 * dwarf2read.c (free_dwo_files): Add forward-declaration.
8480 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
8481 dwarf2_per_objfile_free here.
8482 (dwarf2_per_objfile_free): Remove.
8483 (_initialize_dwarf2_read): Don't register
8484 dwarf2_per_objfile_free as a registry cleanup.
8486 2018-01-27 Eli Zaretskii <eliz@gnu.org>
8488 Avoid compilation errors in MinGW native builds
8490 The error is triggered by including python-internal.h, and the
8493 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
8494 from build-gnulib/import/math.h:27,
8495 from d:/usr/Python26/include/pyport.h:235,
8496 from d:/usr/Python26/include/Python.h:58,
8497 from python/python-internal.h:94,
8498 from python/py-arch.c:24:
8499 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
8503 This happens because Python headers define 'hypot' to expand t
8504 '_hypot' in the Windows builds.
8505 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
8506 'hypoth'. This avoids a compilation error.
8508 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8510 * MAINTAINERS (Write After Approval): Fix ordering.
8512 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8514 * MAINTAINERS (Write After Approval): Add Alan Hayward.
8516 2018-01-26 Alan Modra <amodra@gmail.com>
8518 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
8519 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
8520 Remove nop. Make const. Comment.
8521 (powerpc32_plt_stub_so_2): New.
8522 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
8523 Correct count. Update uses.
8524 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
8525 Move common code reading PLT entry word. Correct
8526 powerpc32_plt_stub PLT address calculation.
8527 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
8528 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
8529 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
8530 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
8531 (ppc64_standard_linkage8): Likewise.
8532 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
8533 Correct insns description.
8534 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
8536 2018-01-24 Pedro Alves <palves@redhat.com>
8538 GCC PR libstdc++/83906
8539 * gdbtypes.c (operator==(const dynamic_prop &,
8540 const dynamic_prop &)): New.
8541 (operator==(const range_bounds &, const range_bounds &)): New.
8542 (check_types_equal): Use them instead of memcmp.
8543 * gdbtypes.h (operator==(const dynamic_prop &,
8544 const dynamic_prop &)): Declare.
8545 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
8546 (operator==(const range_bounds &, const range_bounds &)): Declare.
8547 (operator!=(const range_bounds &, const range_bounds &)): Declare.
8549 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8551 * s390-linux-tdep.c (s390_record_address_mask)
8552 (s390_record_calc_disp_common, s390_record_calc_disp)
8553 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8554 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8555 (s390_process_record): Move to s390-tdep.c.
8556 (s390_linux_init_abi_any): Adjust.
8557 * s390-tdep.c (s390_record_address_mask)
8558 (s390_record_calc_disp_common, s390_record_calc_disp)
8559 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8560 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8561 (s390_process_record): Moved from s390-linux-tdep.c
8562 (s390_gdbarch_init): Adjust.
8564 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8566 * s390-linux-nat.c (s390-tdep.h): New include.
8567 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
8568 (HFILES_NO_SRCDIR): Add s390-tdep.h.
8569 (ALLDEPFILES): Add s390-tdep.c.
8570 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
8571 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
8572 * s390-tdep.h: ...this. New file.
8573 * s390-linux-tdep.c (s390-tdep.h): New include.
8574 (_initialize_s390_tdep): Rename to...
8575 (_initialize_s390_linux_tdep): ...this and adjust.
8576 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
8577 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
8579 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
8580 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
8581 (s390_is_partial_instruction, s390_software_single_step)
8582 (is_non_branch_ril, s390_displaced_step_copy_insn)
8583 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
8584 (s390_prologue_data, s390_addr, s390_store, s390_load)
8585 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
8586 (s390_register_call_saved, s390_guess_tracepoint_registers)
8587 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
8588 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
8589 (s390_pseudo_register_name, s390_pseudo_register_type)
8590 (s390_pseudo_register_read, s390_pseudo_register_write)
8591 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
8592 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
8593 (s390_addr_bits_remove, s390_address_class_type_flags)
8594 (s390_address_class_type_flags_to_name)
8595 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
8596 (s390_function_arg_float, s390_function_arg_vector)
8597 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
8598 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
8599 (s390_frame_align, s390_register_return_value, s390_return_value)
8600 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
8601 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
8602 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
8603 (s390_trad_frame_prev_register, s390_unwind_cache)
8604 (s390_prologue_frame_unwind_cache)
8605 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
8606 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
8607 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
8608 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
8609 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
8610 (s390_frame_base_address, s390_local_base_address)
8611 (s390_frame_base, s390_gcc_target_options)
8612 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
8613 (s390_validate_reg_range, s390_tdesc_valid)
8614 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
8615 * s390-tdep.c: ...this. New file.
8617 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8619 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
8620 (s390_process_record, s390_gdbarch_tdep_alloc)
8621 (s390_linux_init_abi_any): Use/set new hook.
8623 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8625 * s390-linux-tdep.c (osabi.h): New include.
8626 (s390_linux_init_abi_31, s390_linux_init_abi_64)
8627 (s390_linux_init_abi_any): New functions.
8628 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
8630 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8632 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
8633 tdesc_has_registers check
8635 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8637 * s390-linux-tdep.c (s390_tdesc_valid): New function.
8638 (s390_validate_reg_range): New macro.
8639 (s390_gdbarch_init): Adjust.
8641 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8643 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
8644 (s390_gdbarch_tdep_alloc): Adjust.
8645 (s390_gdbarch_init): Adjust.
8647 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8649 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
8650 <have_tdb>: Change type to bool.
8651 (s390_gdbarch_tdep_alloc): Adjust.
8652 (s390_gdbarch_init): Adjust.
8654 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8656 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
8657 (gdbarch_tdep) <have_upper, have_vx>: New fields.
8658 (s390_gdbarch_tdep_alloc): New function.
8659 (s390_gdbarch_init): Allocate tdep at start and use its fields
8660 instead of separate variables.
8662 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8664 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
8665 when looking for cached gdbarch and add comment for remaining.
8667 2018-01-22 Pedro Alves <palves@redhat.com>
8668 Sergio Durigan Junior <sergiodj@redhat.com>
8670 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
8673 2018-01-22 Maciej W. Rozycki <macro@mips.com>
8675 * MAINTAINERS: Update my company e-mail address.
8677 2018-01-22 Yao Qi <yao.qi@linaro.org>
8679 * regcache.c (cooked_write_test): New function.
8680 (_initialize_regcache): Register the test.
8682 2018-01-22 Yao Qi <yao.qi@linaro.org>
8684 * ia64-tdep.c (ia64_pseudo_register_read): Call
8685 regcache->cooked_read instead of regcache_cooked_read_unsigned.
8686 * m32c-tdep.c (m32c_cat_read): Likewise.
8687 (m32c_r3r2r1r0_read): Likewise.
8688 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8689 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8691 2018-01-22 Yao Qi <yao.qi@linaro.org>
8693 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
8694 method raw_read instead of regcache_raw_read.
8695 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8696 * arm-tdep.c (arm_neon_quad_read): Likewise.
8697 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8698 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8699 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8700 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
8701 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8702 (i386_pseudo_register_read_into_value): Likewise.
8703 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8704 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8705 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8706 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
8707 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
8708 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8709 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8710 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8711 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
8713 2018-01-22 Yao Qi <yao.qi@linaro.org>
8715 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
8716 * configure.tgt: Remove target mt.
8717 * mt-tdep.c: Remove.
8718 * regcache.c (cooked_read_test): Remove the check for mt.
8720 2018-01-22 Yao Qi <yao.qi@linaro.org>
8722 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
8723 instead of gdbarch_pseudo_register_read_value.
8725 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8727 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
8730 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8732 * linespec.c (create_sals_line_offset): Remove code that preserved
8733 the symtab_and_line's line number.
8735 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8737 * varobj.c (varobj_create): Don't set valid_block when creating a
8740 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8742 * varobj.c (varobj_create): Remove out of date comment.
8744 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8747 * ada-exp.y (write_var_from_sym): Pass extra parameter when
8748 updating innermost block.
8749 * parse.c (innermost_block_tracker::update): Take extra type
8750 parameter, and check types match before updating innermost block.
8751 (write_dollar_variable): Update innermost block for registers.
8752 * parser-defs.h (enum innermost_block_tracker_type): New enum.
8753 (innermost_block_tracker::innermost_block_tracker): Initialise
8755 (innermost_block_tracker::reset): Take type parameter.
8756 (innermost_block_tracker::update): Take type parameter, and pass
8757 type through as needed.
8758 (innermost_block_tracker::m_types): New member.
8759 * varobj.c (varobj_create): Pass type when reseting innermost
8762 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8764 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
8765 * ada-lang.c (resolve_subexp): Likewise.
8766 * breakpoint.c (set_breakpoint_condition) Likewise.
8767 (watch_command_1) Likewise.
8768 * c-exp.y (variable): Likewise.
8769 * d-exp.y (PrimaryExpression): Likewise.
8770 * f-exp.y (variable): Likewise.
8771 * go-exp.y (variable): Likewise.
8772 * m2-exp.y (variable): Likewise.
8773 * objfiles.c (objfile::~objfile): Likewise.
8774 * p-exp.y (variable): Likewise.
8775 * parse.c (innermost_block): Change type.
8776 * parser-defs.h (class innermost_block_tracker): New.
8777 (innermost_block): Change to innermost_block_tracker.
8778 * printcmd.c (display_command): Switch to innermost_block API.
8779 (do_one_display): Likewise.
8780 * rust-exp.y (do_one_display): Likewise.
8781 * symfile.c (clear_symtab_users): Likewise.
8782 * varobj.c (varobj_create): Switch to innermost_block API, replace
8783 use of innermost_block with block stored on varobj object.
8785 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8787 * expression.h (innermost_block): Remove declaration.
8788 * varobj.c: Add 'parser-defs.h' include.
8790 2018-01-19 Tom Tromey <tom@tromey.com>
8792 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
8793 symbols in the static and global blocks.
8795 2018-01-19 James Clarke <jrtc27@jrtc27.com>
8797 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
8798 gdb_ptrace.h, and move including gdb_wait.h ...
8799 * nat/linux-ptrace.h: ... to here.
8801 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8803 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
8804 inf_ptrace_detach_success.
8805 (inf_ptrace_detach_success): Add inferior parameter, use it
8806 instead of inferior_ptid, pass it to detach_inferior.
8807 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
8809 * inferior.c (detach_inferior): Add overload that takes an
8811 * inferior.h (detach_inferior): Likewise.
8812 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
8813 use inferior_ptid, adjust call to inf_ptrace_detach_success.
8814 * linux-thread-db.c (thread_db_detach): Use inf parameter.
8816 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8818 * target.h (struct target_ops) <to_detach>: Add inferior
8820 (target_detach): Likewise.
8821 * target.c (dispose_inferior): Pass inferior down.
8822 (target_detach): Pass inferior down. Assert that it is equal to
8823 the current inferior.
8824 * aix-thread.c (aix_thread_detach): Pass inferior down.
8825 * corefile.c (core_file_command): Pass current_inferior() down.
8826 * corelow.c (core_detach): Add inferior parameter.
8827 * darwin-nat.c (darwin_detach): Likewise.
8828 * gnu-nat.c (gnu_detach): Likewise.
8829 * inf-ptrace.c (inf_ptrace_detach): Likewise.
8830 * infcmd.c (detach_command): Pass current_inferior() down to
8832 * infrun.c (follow_fork_inferior): Pass parent_inf to
8834 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
8836 * linux-nat.c (linux_nat_detach): Add inferior parameter.
8837 * linux-thread-db.c (thread_db_detach): Likewise.
8838 * nto-procfs.c (procfs_detach): Likewise.
8839 * procfs.c (procfs_detach): Likewise.
8840 * record.c (record_detach): Likewise.
8841 * record.h (struct inferior): Forward-declare.
8842 (record_detach): Add inferior parameter.
8843 * remote-sim.c (gdbsim_detach): Likewise.
8844 * remote.c (remote_detach_1): Likewise.
8845 (remote_detach): Likewise.
8846 (extended_remote_detach): Likewise.
8847 * sol-thread.c (sol_thread_detach): Likewise.
8848 * target-debug.h (target_debug_print_inferior_p): New macro.
8849 * target-delegates.c: Re-generate.
8850 * top.c (kill_or_detach): Pass inferior down to target_detach.
8851 * windows-nat.c (windows_detach): Add inferior parameter.
8853 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8855 * target.h (struct target_ops) <to_detach>: Remove args
8857 (target_detach): Likewise.
8858 * target.c (dispose_inferior): Adjust.
8859 (target_detach): Remove args parameter, adjust.
8860 * aix-thread.c (aix_thread_detach): Adjust.
8861 * corefile.c (core_file_command): Adjust.
8862 * corelow.c (core_detach): Adjust.
8863 * darwin-nat.c (darwin_detach): Adjust.
8864 * gnu-nat.c (gnu_detach): Adjust.
8865 * inf-ptrace.c (inf_ptrace_detach): Adjust.
8866 * infcmd.c (detach_command): Adjust
8867 * infrun.c (follow_fork_inferior): Adjust.
8868 (handle_vfork_child_exec_or_exit): Adjust.
8869 * linux-fork.c (linux_fork_detach): Remove args parameter.
8870 * linux-fork.h (linux_fork_detach): Likewise.
8871 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
8872 * linux-thread-db.c (thread_db_detach): Likewise.
8873 * nto-procfs.c (procfs_detach): Likewise.
8874 * procfs.c (procfs_detach): Likewise.
8875 (do_detach): Remove signo parameter.
8876 * record.c (record_detach): Remove args parameter.
8877 * record.h (record_detach): Likewise.
8878 * remote-sim.c (gdbsim_detach): Likewise.
8879 * remote.c (remote_detach_1): Likewise.
8880 (remote_detach): Likewise.
8881 (extended_remote_detach): Likewise.
8882 * sol-thread.c (sol_thread_detach): Likewise.
8883 * target-delegates.c: Re-generate.
8884 * top.c (struct qt_args) <args>: Remove field.
8885 (kill_or_detach): Don't pass args.
8886 (quit_force): Don't set args.
8887 * windows-nat.c (windows_detach): Remove args parameter.
8889 2018-01-19 Yao Qi <yao.qi@linaro.org>
8891 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
8892 (arm_linux_init_abi): Install it.
8894 2018-01-19 Yao Qi <yao.qi@linaro.org>
8896 * osabi.c (gdb_osabi_names): Extend the regexp for
8897 arm-linux-gnueabihf.
8899 2018-01-18 Yao Qi <yao.qi@linaro.org>
8901 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
8903 (abbrev_table::add_abbrev): Update.
8904 (abbrev_table::lookup_abbrev): Update.
8906 2018-01-18 Yao Qi <yao.qi@linaro.org>
8908 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
8910 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
8912 * compile/compile.c (compile_to_object): Convert "triplet_rx"
8915 2018-01-17 Tom Tromey <tom@tromey.com>
8917 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
8919 2018-01-17 Tom Tromey <tom@tromey.com>
8921 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
8922 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
8923 (create_array_type_with_stride): Update.
8924 * dwarf2read.c (set_die_type): Update.
8926 2018-01-17 Tom Tromey <tom@tromey.com>
8928 * dwarf2read.c (delayed_method_info): Remove typedef.
8929 (dwarf2_cu::method_info): Now a std::vector.
8930 (add_to_method_list): Update.
8931 (free_delayed_list): Remove.
8932 (compute_delayed_physnames): Update.
8933 (process_full_comp_unit, process_full_type_unit): Clear the method
8934 list. Remove cleanups.
8935 (psymtab_include_file_name): Add name_holder parameter. Use
8937 (dwarf_decode_lines): Update.
8939 2018-01-17 Tom Tromey <tom@tromey.com>
8940 Simon Marchi <simon.marchi@ericsson.com>
8942 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
8943 (dwarf2_per_objfile::free_cached_comp_units)
8944 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8945 (init_cutu_and_read_dies_no_follow): Update.
8946 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
8947 (dwarf2_cu::~dwarf2_cu): New.
8948 (free_heap_comp_unit, free_stack_comp_unit): Remove.
8949 (age_cached_comp_units, free_one_cached_comp_unit): Update.
8951 2018-01-17 Tom Tromey <tom@tromey.com>
8952 Simon Marchi <simon.marchi@ericsson.com>
8954 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
8955 (struct die_reader_specs) <abbrev_table>: New member.
8956 (struct abbrev_table): Add constructor.
8957 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
8958 <abbrev_obstack>: Now an auto_obstack.
8959 (abbrev_table_up): New typedef.
8960 (init_cu_die_reader): Add abbrev_table parameter.
8961 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
8962 Add result_dwo_abbrev_table.
8963 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8964 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
8966 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
8968 (skip_children): Update.
8969 (abbrev_table::alloc_abbrev): Rename from
8970 abbrev_table_alloc_abbrev.
8971 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
8972 (abbrev_table::lookup_abbrev): Rename from
8973 abbrev_table_lookup_abbrev.
8974 (abbrev_table_read_table): Return abbrev_table_up.
8975 (abbrev_table_free, abbrev_table_free_cleanup)
8976 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
8977 (load_partial_dies): Update.
8979 2018-01-17 Tom Tromey <tom@tromey.com>
8981 * dwarf2read.c (dwarf2_compute_name): Update comment.
8982 (read_func_scope, read_variable): Update.
8983 (new_symbol): Remove.
8984 (new_symbol_full): Rename to new_symbol.
8986 2018-01-17 Mike Gulick <mgulick@mathworks.com>
8989 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
8990 a warning instead of throwing an error, set section size to 0 and return
8992 * gdb_bfd.h (gdb_bfd_map_section): Update description.
8994 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
8996 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
8998 (linux_ptrace_attach_fail_reason_string): Likewise.
8999 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
9001 (linux_ptrace_attach_fail_reason_string): Likewise.
9002 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
9004 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9006 * linux-nat.c (linux_nat_attach): Remove xstrdup.
9008 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
9011 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
9012 checking for fs_base/gs_base fields in struct user_regs_struct.
9013 * configure: Regenerate.
9015 2018-01-17 Yao Qi <yao.qi@linaro.org>
9017 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
9019 (aarch64_linux_init_abi): Install it to gdbarch hook
9022 2018-01-15 Pedro Alves <palves@redhat.com>
9024 * common/signals-state-save-restore.c
9025 (save_original_signals_state): Fix typos.
9027 2017-01-12 Tom Tromey <tom@tromey.com>
9028 Sergio Durigan Junior <sergiodj@redhat.com>
9030 * Makefile.in (install-only): Install gdb-add-index.
9032 2018-01-12 John Baldwin <jhb@FreeBSD.org>
9034 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
9036 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9038 * infrun.c (keep_going_pass_signal): Clear step-over info when
9039 insert_breakpoints fails.
9041 2018-01-11 Pedro Alves <palves@redhat.com>
9044 * infrun.c (resume): Rename to ...
9045 (resume_1): ... this.
9046 (resume): Reimplement as wrapper around resume_1.
9048 2018-01-11 Pedro Alves <palves@redhat.com>
9051 * remote.c (remote_parse_stop_reply): Default to the last-set
9052 general thread instead of to 'magic_null_ptid'.
9054 2018-01-10 Pedro Alves <palves@redhat.com>
9056 * language.h (language_get_symbol_name_matcher): Rename ...
9057 (get_symbol_name_matcher): ... this.
9058 * language.c (language_get_symbol_name_matcher): Ditto.
9059 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9062 2018-01-10 Pedro Alves <palves@redhat.com>
9066 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9067 Adjust to use language_get_symbol_name_matcher instead of
9068 language_defn::la_get_symbol_name_matcher.
9069 * language.c (language_get_symbol_name_matcher): If in Ada mode
9070 and the lookup name is a verbatim match, return Ada's matcher.
9071 * language.h (language_get_symbol_name_matcher): Adjust comment.
9072 (ada_lookup_name_info::verbatim_p):: New method.
9074 2018-01-10 Pedro Alves <palves@redhat.com>
9077 * ada-lang.c (ada_collect_symbol_completion_matches): If the
9078 minsym's language is language_auto or language_cplus, pass down
9079 language_ada instead.
9080 * symtab.c (compare_symbol_name): Don't frob symbol language here.
9082 2018-01-10 Pedro Alves <palves@redhat.com>
9085 * minsyms.c (linkage_name_str): New function.
9086 (iterate_over_minimal_symbols): Use it.
9088 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9090 * NEWS: Document that 'info proc' now works on FreeBSD.
9092 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9094 * configure.ac: Check for kinfo_getfile in libutil.
9095 * configure: Regenerate.
9096 * config.in: Regenerate.
9097 * fbsd-nat.c: Include "fbsd-tdep.h".
9098 (fbsd_fetch_cmdline): New.
9099 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9100 rather than calling error.
9101 (fbsd_info_proc): New.
9102 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9103 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9104 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9106 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9108 * fbsd-nat.c (struct free_deleter): Remove.
9109 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9111 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9113 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9114 NULL for an empty pathname.
9116 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9118 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9119 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9120 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9121 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9122 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9123 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9124 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9125 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9126 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9127 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9128 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9129 (fbsd_core_fetch_timeval, fbsd_print_sigset)
9130 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9131 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
9132 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9134 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
9136 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9137 (gnu_xfer_auxv): New function.
9138 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
9141 2018-01-08 Yao Qi <yao.qi@linaro.org>
9142 Simon Marchi <simon.marchi@ericsson.com>
9144 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
9146 (COMMON_OBS): Remove selftest.o.
9147 * configure.ac: Append selftest-arch.c and common/selftest.c to
9148 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
9149 * configure: Re-generated.
9150 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
9152 (maintenance_info_selftests): Likewise.
9154 2018-01-08 Xavier Roirand <roirand@adacore.com>
9156 * ada-valprint.c (val_print_packed_array_elements): Use
9157 proper number of elements when printing an array indexed
9158 by an enumeration type.
9160 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9162 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
9163 (dw2_get_file_names_reader): Adjust.
9164 (lookup_dwo_signatured_type): Adjust.
9165 (lookup_dwp_signatured_type): Adjust.
9166 (lookup_signatured_type): Adjust.
9167 (create_type_unit_group): Adjust.
9168 (get_type_unit_group): Adjust.
9169 (process_psymtab_comp_unit_reader): Adjust.
9170 (build_type_psymtabs_reader): Adjust.
9171 (scan_partial_symbols): Adjust.
9172 (add_partial_symbol): Adjust.
9173 (add_partial_subprogram): Adjust.
9174 (peek_die_abbrev): Adjust.
9175 (fixup_go_packaging): Adjust.
9176 (process_imported_unit_die): Adjust.
9177 (dwarf2_compute_name): Adjust.
9178 (dwarf2_physname): Adjust.
9179 (read_import_statement): Adjust.
9180 (handle_DW_AT_stmt_list): Adjust.
9181 (read_file_scope): Adjust.
9182 (read_func_scope): Adjust.
9183 (read_lexical_block_scope): Adjust.
9184 (read_call_site_scope): Adjust.
9185 (read_variable): Adjust.
9186 (dwarf2_rnglists_process): Adjust.
9187 (dwarf2_ranges_process): Adjust.
9188 (dwarf2_ranges_read): Adjust.
9189 (dwarf2_get_pc_bounds): Adjust.
9190 (dwarf2_record_block_ranges): Adjust.
9191 (dwarf2_add_field): Adjust.
9192 (dwarf2_add_member_fn): Adjust.
9193 (read_structure_type): Adjust.
9194 (process_structure_scope): Adjust.
9195 (read_enumeration_type): Adjust.
9196 (read_array_type): Adjust.
9197 (mark_common_block_symbol_computed): Adjust.
9198 (read_common_block): Adjust.
9199 (read_namespace_type): Adjust.
9200 (read_namespace): Adjust.
9201 (read_module_type): Adjust.
9202 (read_tag_pointer_type): Adjust.
9203 (read_tag_ptr_to_member_type): Adjust.
9204 (read_tag_string_type): Adjust.
9205 (read_subroutine_type): Adjust.
9206 (read_typedef): Adjust.
9207 (read_base_type): Adjust.
9208 (attr_to_dynamic_prop): Adjust.
9209 (read_subrange_type): Adjust.
9210 (read_unspecified_type): Adjust.
9211 (dwarf2_read_abbrevs): Adjust.
9212 (load_partial_dies): Adjust.
9213 (read_partial_die): Adjust.
9214 (find_partial_die): Adjust.
9215 (guess_partial_die_structure_name): Adjust.
9216 (fixup_partial_die): Adjust.
9217 (read_attribute_value): Adjust.
9218 (read_addr_index): Adjust.
9219 (read_addr_index_from_leb128): Adjust.
9220 (read_str_index): Adjust.
9221 (dwarf2_string_attr): Adjust.
9222 (get_debug_line_section): Adjust.
9223 (dwarf_decode_line_header): Adjust.
9224 (lnp_state_machine::check_line_address): Adjust.
9225 (dwarf_decode_lines_1): Adjust.
9226 (dwarf_decode_lines): Adjust.
9227 (dwarf2_start_symtab): Adjust.
9228 (var_decode_location): Adjust.
9229 (new_symbol_full): Adjust.
9230 (dwarf2_const_value_data): Adjust.
9231 (dwarf2_const_value_attr): Adjust.
9232 (dwarf2_const_value): Adjust.
9234 (die_containing_type): Adjust.
9235 (build_error_marker_type): Adjust.
9236 (lookup_die_type): Adjust.
9237 (guess_full_die_structure_name): Adjust.
9238 (anonymous_struct_prefix): Adjust.
9239 (determine_prefix): Adjust.
9240 (dwarf2_name): Adjust.
9241 (follow_die_ref_or_sig): Adjust.
9242 (follow_die_offset): Adjust.
9243 (follow_die_ref): Adjust.
9244 (follow_die_sig_1): Adjust.
9245 (follow_die_sig): Adjust.
9246 (get_signatured_type): Adjust.
9247 (get_DW_AT_signature_type): Adjust.
9248 (decode_locdesc): Adjust.
9249 (dwarf_decode_macros): Adjust.
9250 (cu_debug_loc_section): Adjust.
9251 (fill_in_loclist_baton): Adjust.
9252 (dwarf2_symbol_mark_computed): Adjust.
9253 (init_one_comp_unit): Don't assign
9254 dwarf2_cu::dwarf2_per_objfile.
9255 (set_die_type): Adjust.
9257 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9259 * dwarf2read.c (struct mapped_debug_names): Add constructor.
9260 <dwarf2_per_objfile>: New field.
9261 (dwarf2_per_objfile): Remove global.
9262 (get_dwarf2_per_objfile): New function.
9263 (set_dwarf2_per_objfile): New function.
9264 (dwarf2_build_psymtabs_hard): Change objfile parameter to
9266 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9267 (read_abbrev_offset): Likewise.
9268 (read_indirect_string): Likewise.
9269 (read_indirect_line_string): Likewise.
9270 (read_indirect_string_at_offset): Likewise.
9271 (read_indirect_string_from_dwz): Likewise.
9272 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9274 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9275 (create_all_comp_units): Change objfile parameter to
9277 (create_all_type_units): Likewise.
9278 (process_queue): Add dwarf2_per_objfile parameter.
9279 (read_and_check_comp_unit_head): Likewise.
9280 (lookup_dwo_unit_in_dwp): Likewise.
9281 (get_dwp_file): Likewise.
9282 (process_cu_includes): Likewise.
9283 (struct free_dwo_file_cleanup_data): New struct.
9284 (dwarf2_has_info): Use get_dwarf2_per_objfile and
9285 set_dwarf2_per_objfile.
9286 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9287 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9288 context, adjust calls.
9289 (dw2_instantiate_symtab): Likewise.
9290 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
9291 (dw2_get_cu): Likewise.
9292 (create_cu_from_index_list): Change objfile parameter to
9294 (create_cus_from_index_list): Get dwarf2_per_objfile from
9295 context, adjust calls.
9296 (create_cus_from_index): Likewise.
9297 (create_signatured_type_table_from_index): Change objfile
9298 parameter to dwarf2_per_objfile.
9299 (create_signatured_type_table_from_debug_names): Change objfile
9300 parameter to dwarf2_per_objfile.
9301 (create_addrmap_from_index): Likewise.
9302 (create_addrmap_from_aranges): Likewise.
9303 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
9304 (dw2_setup): Remove.
9305 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
9307 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
9308 get_dwarf2_per_objfile.
9309 (dw2_forget_cached_source_info): Likewise.
9310 (dw2_map_symtabs_matching_filename): Likewise.
9311 (struct dw2_symtab_iterator) <index>: Remove.
9312 <dwarf2_per_objfile>: New field.
9313 (dw2_symtab_iter_init): Replace index parameter with
9315 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
9316 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
9317 (dw2_print_stats): Likewise.
9318 (dw2_dump): Likewise.
9319 (dw2_expand_symtabs_for_function): Likewise.
9320 (dw2_expand_all_symtabs): Likewise.
9321 (dw2_expand_symtabs_with_fullname): Likewise.
9322 (dw2_expand_marked_cus): Replace index and objfile parameters
9323 with dwarf2_per_objfile.
9324 (dw_expand_symtabs_matching_file_matcher): Add
9325 dwarf2_per_objfile parameter and adjust calls.
9326 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
9328 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
9329 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
9331 (create_cus_from_debug_names_list): Replace objfile parameter
9332 with dwarf2_per_objfile and adjust calls.
9333 (create_cus_from_debug_names): Likewise.
9334 (dwarf2_read_debug_names): Likewise.
9335 (mapped_debug_names::namei_to_name): Adjust call.
9336 (dw2_debug_names_iterator::next): Likewise.
9337 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
9338 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
9339 (dw2_debug_names_dump): Likewise.
9340 (dw2_debug_names_expand_symtabs_for_function): Likewise.
9341 (dw2_debug_names_expand_symtabs_matching): Likewise.
9342 (dwarf2_initialize_objfile): Likewise.
9343 (dwarf2_build_psymtabs): Likewise.
9344 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
9346 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
9347 (read_and_check_comp_unit_head): Likewise.
9348 (read_abbrev_offset): Likewise.
9349 (create_debug_type_hash_table): Likewise.
9350 (create_debug_types_hash_table): Likewise.
9351 (create_all_type_units): Replace objfile parameter with
9353 (add_type_unit): Add dwarf2_per_objfile parameter.
9354 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
9355 with dwarf2_per_objfile.
9356 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
9357 (lookup_dwp_signatured_type): Likewise.
9358 (lookup_signatured_type): Likewise.
9359 (read_cutu_die_from_dwo): Likewise.
9360 (init_tu_and_read_dwo_dies): Likewise.
9361 (init_cutu_and_read_dies): Likewise.
9362 (init_cutu_and_read_dies_no_follow): Likewise.
9363 (allocate_type_unit_groups_table): Add objfile parameter.
9364 (create_type_unit_group): Use dwarf2_per_objfile from cu.
9365 (get_type_unit_group): Likewise.
9366 (process_psymtab_comp_unit): Update call.
9367 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
9368 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
9369 (print_tu_stats): Likewise.
9370 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
9372 (build_type_psymtabs): Change objfile parameter to
9374 (process_skeletonless_type_unit): Use dwarf2_per_objfile
9375 passed in void* parameter.
9376 (process_skeletonless_type_units): Change objfile parameter to
9378 (set_partial_user): Likewise.
9379 (dwarf2_build_psymtabs_hard): Likewise.
9380 (read_comp_units_from_section): Likewise.
9381 (create_all_comp_units): Likewise.
9382 (scan_partial_symbols): Update calls.
9383 (add_partial_symbol): Likewise.
9384 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
9385 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
9386 (process_queue): Add dwarf2_per_objfile parameter.
9387 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
9388 (compute_compunit_symtab_includes): Likewise.
9389 (process_cu_includes): Add dwarf2_per_objfile parameter.
9390 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
9391 (process_full_type_unit): Likewise.
9392 (process_imported_unit_die): Update call.
9393 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
9394 (read_file_scope): Likewise.
9395 (allocate_dwo_file_hash_table): Add objfile parameter.
9396 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
9397 (create_cus_hash_table): Likewise.
9398 (create_dwp_hash_table): Likewise.
9399 (create_dwo_unit_in_dwp_v1): Likewise.
9400 (create_dwp_v2_section): Likewise.
9401 (create_dwo_unit_in_dwp_v2): Likewise.
9402 (lookup_dwo_unit_in_dwp): Likewise.
9403 (try_open_dwop_file): Likewise.
9404 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
9405 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
9406 cleanup to include a reference to dwarf2_per_objfile.
9407 (open_dwp_file): Add dwarf2_per_objfile parameter.
9408 (open_and_init_dwp_file): Likewise.
9409 (get_dwp_file): Likewise.
9410 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
9411 (queue_and_load_all_dwo_tus): Update call.
9412 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
9414 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
9415 (dwarf2_ranges_process): Likewise.
9416 (dwarf2_get_pc_bounds): Likewise.
9417 (mark_common_block_symbol_computed): Likewise.
9418 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9419 (dwarf2_read_abbrevs): Update call.
9420 (read_partial_die): Use dwarf2_per_objfile from cu.
9421 (find_partial_die): Likewise.
9422 (fixup_partial_die): Likewise.
9423 (read_attribute_value): Likewise.
9424 (read_indirect_string_at_offset_from): Add objfile parameter.
9425 (read_indirect_string_at_offset): Add dwarf2_per_objfile
9427 (read_indirect_string_from_dwz): Add objfile parameter.
9428 (read_indirect_string): Add objfile parameter.
9429 (read_addr_index_1): Add dwarf2_per_objfile parameter.
9430 (read_addr_index): Use dwarf2_per_objfile from cu.
9431 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
9433 (read_str_index): Use dwarf2_per_objfile from cu.
9434 (get_debug_line_section): Likewise.
9435 (read_formatted_entries): Add dwarf2_per_objfile parameter.
9436 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
9437 (new_symbol_full): Use dwarf2_per_objfile from cu.
9438 (build_error_marker_type): Likewise.
9439 (lookup_die_type): Likewise.
9440 (determine_prefix): Likewise.
9441 (follow_die_offset): Likewise.
9442 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
9443 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
9444 (dwarf2_fetch_die_type_sect_off): Likewise.
9445 (dwarf2_get_die_type): Likewise.
9446 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
9447 (get_signatured_type): Likewise.
9448 (get_DW_AT_signature_type): Likewise.
9449 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
9450 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
9451 (cu_debug_loc_section): Likewise.
9452 (fill_in_loclist_baton): Likewise.
9453 (dwarf2_symbol_mark_computed): Likewise.
9454 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9456 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
9458 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9459 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
9460 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
9461 (set_die_type): Use dwarf2_free_objfile from cu.
9462 (get_die_type_at_offset): Likewise.
9463 (dwarf2_per_objfile_free): Don't assign global variable.
9464 (debug_names) <constructor>: Add dwarf2_per_objfile
9465 parameter, update m_debugstrlookup construction.
9466 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
9468 <m_dwarf2_per_objfile>: New field.
9469 <lookup>: Use m_dwarf2_per_objfile.
9470 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
9471 (psyms_seen_size): Likewise.
9472 (write_gdbindex): Replace objfile parameter with
9474 (write_debug_names): Likewise.
9475 (write_psymtabs_to_index): Likewise.
9476 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
9479 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9481 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
9482 <dwarf2_per_objfile>: New field.
9483 (struct dwarf2_per_cu_data) <objfile>: Remove.
9484 <dwarf2_per_objfile>: New field.
9485 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
9487 (create_signatured_type_table_from_index): Likewise.
9488 (create_debug_type_hash_table): Likewise.
9489 (fill_in_sig_entry_from_dwo_entry): Likewise.
9490 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
9491 (create_type_unit_group): Assign dwarf2_per_objfile instead of
9493 (create_partial_symtab): Access objfile through
9495 (process_psymtab_comp_unit_reader): Likewise.
9496 (read_comp_units_from_section): Likewise.
9497 (scan_partial_symbols): Likewise.
9498 (add_partial_symbol): Likewise.
9499 (add_partial_subprogram): Likewise.
9500 (peek_die_abbrev): Likewise.
9501 (fixup_go_packaging): Likewise.
9502 (process_full_comp_unit): Likewise.
9503 (process_full_type_unit): Likewise.
9504 (process_imported_unit_die): Likewise.
9505 (dwarf2_compute_name): Likewise.
9506 (dwarf2_physname): Likewise.
9507 (read_import_statement): Likewise.
9508 (create_cus_hash_table): Assign dwarf2_physname instead of
9510 (read_func_scope): Access objfile through dwarf2_per_objfile.
9511 (read_lexical_block_scope): Likewise.
9512 (read_call_site_scope): Likewise.
9513 (read_variable): Likewise.
9514 (dwarf2_rnglists_process): Likewise.
9515 (dwarf2_ranges_process): Likewise.
9516 (dwarf2_ranges_read): Likewise.
9517 (dwarf2_record_block_ranges): Likewise.
9518 (dwarf2_add_field): Likewise.
9519 (dwarf2_add_member_fn): Likewise.
9520 (read_structure_type): Likewise.
9521 (process_structure_scope): Likewise.
9522 (read_enumeration_type): Likewise.
9523 (read_array_type): Likewise.
9524 (read_common_block): Likewise.
9525 (read_namespace_type): Likewise.
9526 (read_namespace): Likewise.
9527 (read_module_type): Likewise.
9528 (read_tag_pointer_type): Likewise.
9529 (read_tag_ptr_to_member_type): Likewise.
9530 (read_tag_string_type): Likewise.
9531 (read_subroutine_type): Likewise.
9532 (read_typedef): Likewise.
9533 (read_base_type): Likewise.
9534 (attr_to_dynamic_prop): Likewise.
9535 (read_subrange_type): Likewise.
9536 (read_unspecified_type): Likewise.
9537 (load_partial_dies): Likewise.
9538 (read_partial_die): Likewise.
9539 (find_partial_die): Likewise.
9540 (guess_partial_die_structure_name): Likewise.
9541 (fixup_partial_die): Likewise.
9542 (read_attribute_value): Likewise.
9543 (read_addr_index_from_leb128): Likewise.
9544 (dwarf2_read_addr_index): Likewise.
9545 (dwarf2_string_attr): Likewise.
9546 (lnp_state_machine::check_line_address): Likewise.
9547 (dwarf_decode_lines_1): Likewise.
9548 (dwarf_decode_lines): Likewise.
9549 (dwarf2_start_symtab): Likewise.
9550 (var_decode_location): Likewise.
9551 (new_symbol_full): Likewise.
9552 (dwarf2_const_value_data): Likewise.
9553 (dwarf2_const_value_attr): Likewise.
9554 (dwarf2_const_value): Likewise.
9555 (die_type): Likewise.
9556 (die_containing_type): Likewise.
9557 (lookup_die_type): Likewise.
9558 (guess_full_die_structure_name): Likewise.
9559 (anonymous_struct_prefix): Likewise.
9560 (dwarf2_name): Likewise.
9561 (follow_die_ref_or_sig): Likewise.
9562 (follow_die_offset): Likewise.
9563 (follow_die_ref): Likewise.
9564 (dwarf2_fetch_die_loc_sect_off): Likewise.
9565 (dwarf2_fetch_constant_bytes): Likewise.
9566 (dwarf2_fetch_die_type_sect_off): Likewise.
9567 (dwarf2_get_die_type): Likewise.
9568 (follow_die_sig): Likewise.
9569 (decode_locdesc): Likewise.
9570 (dwarf2_per_cu_objfile): Likewise.
9571 (dwarf2_per_cu_text_offset): Likewise.
9572 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
9574 (set_die_type): Access objfile through
9577 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9579 * valprint.c (converted_character_d): Remove typedef.
9580 (DEF_VEC_O (converted_character_d)): Remove.
9581 (count_next_character): Use std::vector.
9582 (print_converted_chars_to_obstack): Likewise.
9583 (generic_printstr): Likewise.
9585 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9587 * xml-support.h (struct gdb_xml_value): Add constructor.
9588 <value>: Change type to unique_xmalloc_ptr.
9589 (gdb_xml_value_s): Remove typedef.
9590 (DEF_VEC_O (gdb_xml_value_s)): Remove.
9591 (gdb_xml_element_start_handler): Change parameter type to
9593 (xml_find_attribute): Likewise.
9594 * xml-support.c (xml_find_attribute): Change parameter type to
9595 std::vector and adjust.
9596 (gdb_xml_values_cleanup): Remove.
9597 (gdb_xml_parser::start_element): Adjust to std::vector.
9598 (xinclude_start_include): Change paraeter type to std::vector
9600 * btrace.c (check_xml_btrace_version): Likewise.
9601 (parse_xml_btrace_block): Likewise.
9602 (parse_xml_btrace_pt_config_cpu): Likewise.
9603 (parse_xml_btrace_pt): Likewise.
9604 (parse_xml_btrace_conf_bts): Likewise.
9605 (parse_xml_btrace_conf_pt): Likewise.
9606 * memory-map.c (memory_map_start_memory): Likewise.
9607 (memory_map_start_property): Likewise.
9608 * osdata.c (osdata_start_osdata): Likewise.
9609 (osdata_start_item): Likewise.
9610 (osdata_start_column): Likewise.
9611 * remote.c (start_thread): Likewise.
9612 * solib-aix.c (library_list_start_library): Likewise.
9613 (library_list_start_list): Likewise.
9614 * solib-svr4.c (library_list_start_library): Likewise.
9615 (svr4_library_list_start_list): Likewise.
9616 * solib-target.c (library_list_start_segment): Likewise.
9617 (library_list_start_section): Likewise.
9618 (library_list_start_library): Likewise.
9619 (library_list_start_list): Likewise.
9620 * tracepoint.c (traceframe_info_start_memory): Likewise.
9621 (traceframe_info_start_tvar): Likewise.
9622 * xml-syscall.c (syscall_start_syscall): Likewise.
9623 * xml-tdesc.c (tdesc_start_target): Likewise.
9624 (tdesc_start_feature): Likewise.
9625 (tdesc_start_reg): Likewise.
9626 (tdesc_start_union): Likewise.
9627 (tdesc_start_struct): Likewise.
9628 (tdesc_start_flags): Likewise.
9629 (tdesc_start_enum): Likewise.
9630 (tdesc_start_field): Likewise.
9631 (tdesc_start_enum_value): Likewise.
9632 (tdesc_start_vector): Likewise.
9634 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9636 * extension.h (struct xmethod_worker) <clone>: Remove.
9637 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
9639 (python_xmethod_worker::clone): Remove.
9640 * valops.c (find_overload_match): Use std::move instead of
9643 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9645 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
9646 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
9647 <free_xmethod_worker_data>: Remove.
9648 <get_matching_xmethod_workers>: Chance VEC to std::vector.
9649 <get_xmethod_arg_types>: Remove.
9650 <get_xmethod_result_type>: Remove.
9651 <invoke_xmethod>: Remove.
9652 * extension.c (new_xmethod_worker): Remove.
9653 (clone_xmethod_worker): Remove.
9654 (get_matching_xmethod_workers): Return void, pass std::vector by
9656 (get_xmethod_arg_types): Rename to...
9657 (xmethod_worker::get_arg_types): ... this, and adjust.
9658 (get_xmethod_result_type): Rename to...
9659 (xmethod_worker::get_result_type): ... this, and adjust.
9660 (invoke_xmethod): Remove.
9661 (free_xmethod_worker): Remove.
9662 (free_xmethod_worker_vec): Remove.
9663 * extension.h (enum ext_lang_rc): Move here from
9665 (struct xmethod_worker): Add constructor and destructor.
9668 <invoke, clone, do_get_result_type, do_get_arg_types>: New
9669 virtual pure methods.
9670 <get_arg_types, get_result_type>: New methods.
9671 (xmethod_worker_ptr): Remove typedef.
9672 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
9673 (xmethod_worker_vec): Remove typedef.
9674 (xmethod_worker_up): New typedef.
9675 (invoke_xmethod): Remove.
9676 (clone_xmethod_worker): Remove.
9677 (free_xmethod_worker): Remove.
9678 (free_xmethod_worker_vec): Remove.
9679 (get_xmethod_arg_types): Remove.
9680 (get_xmethod_result_type): Remove.
9681 * valops.c (find_method_list): Use std::vector, don't use
9682 intermediate vector.
9683 (value_find_oload_method_list): Use std::vector.
9684 (find_overload_match): Use std::vector.
9685 (find_oload_champ): Use std::vector.
9686 * value.c (value_free): Use operator delete.
9687 (value_of_xmethod): Rename to...
9688 (value_from_xmethod): ... this. Don't assign
9689 xmethod_worker::value, take rvalue-reference.
9690 (result_type_of_xmethod): Adjust.
9691 (call_xmethod): Adjust.
9692 * value.h: Include extension.h.
9693 (struct xmethod_worker): Don't forward-declare.
9694 (value_of_xmethod): Rename to...
9695 (value_from_xmethod): ... this, take rvalue-reference.
9696 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
9697 (struct python_xmethod_worker): ... this, add constructor and
9699 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
9700 (gdbpy_free_xmethod_worker_data): Rename to...
9701 (python_xmethod_worker::~python_xmethod_worker): ... this and
9703 (gdbpy_clone_xmethod_worker_data): Rename to...
9704 (python_xmethod_worker::clone): ... this and adjust.
9705 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
9707 (gdbpy_get_xmethod_arg_types): Rename to...
9708 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
9709 (gdbpy_get_xmethod_result_type): Rename to...
9710 (python_xmethod_worker::do_get_result_type): ... this and
9712 (gdbpy_invoke_xmethod): Rename to...
9713 (python_xmethod_worker::invoke): ... this and adjust.
9714 (new_python_xmethod_worker): Rename to...
9715 (python_xmethod_worker::python_xmethod_worker): ... this and
9717 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
9719 (gdbpy_free_xmethod_worker_data): Remove.
9720 (gdbpy_get_matching_xmethod_workers): Use std::vector.
9721 (gdbpy_get_xmethod_arg_types): Remove.
9722 (gdbpy_get_xmethod_result_type): Remove.
9723 (gdbpy_invoke_xmethod): Remove.
9724 * python/python.c (python_extension_ops): Remove obsolete
9727 2018-01-05 Pedro Alves <palves@redhat.com>
9730 * common/signals-state-save-restore.c
9731 (save_original_signals_state): New parameter 'quiet'. Warn if we
9732 find a custom handler preinstalled, instead of internal erroring.
9733 But only warn if !quiet.
9734 * common/signals-state-save-restore.h
9735 (save_original_signals_state): New parameter 'quiet'.
9736 * main.c (captured_main_1): Move save_original_signals_state call
9737 after option handling, and pass QUIET.
9739 2018-01-05 Pedro Alves <palves@redhat.com>
9741 * spu-tdep.c (spu_catch_start): Pass
9742 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
9744 2018-01-05 Pedro Alves <palves@redhat.com>
9747 * ada-lang.c (literal_symbol_name_matcher): New function.
9748 (ada_get_symbol_name_matcher): Use it for
9749 symbol_name_match_type::SEARCH_NAME.
9750 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
9751 it down instead of assuming symbol_name_match_type::FULL.
9752 * block.h (block_lookup_symbol): New parameter 'match_type'.
9753 * c-valprint.c (print_unpacked_pointer): Use
9754 lookup_symbol_search_name instead of lookup_symbol.
9755 * compile/compile-object-load.c (get_out_value_type): Pass down
9756 symbol_name_match_type::SEARCH_NAME.
9757 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
9758 symbol_name_match_type::FULL.
9759 * cp-support.c (cp_get_symbol_name_matcher): Handle
9760 symbol_name_match_type::SEARCH_NAME.
9761 * infrun.c (insert_exception_resume_breakpoint): Use
9762 lookup_symbol_search_name.
9763 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
9764 * psymtab.c (maintenance_check_psymtabs): Use
9765 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
9766 * stack.c (print_frame_args): Use lookup_symbol_search_name and
9768 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
9769 if symbol_name_match_type::SEARCH_NAME.
9770 (lookup_symbol_in_language): Pass down
9771 symbol_name_match_type::FULL.
9772 (lookup_symbol_search_name): New.
9773 (lookup_language_this): Pass down
9774 symbol_name_match_type::SEARCH_NAME.
9775 (lookup_symbol_aux, lookup_local_symbol): New parameter
9776 'match_type'. Pass it down.
9777 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
9778 (lookup_symbol_search_name): New declaration.
9779 (lookup_symbol_in_block): New 'match_type' parameter.
9781 2018-01-05 Pedro Alves <palves@redhat.com>
9784 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
9786 (ada_lookup_symbol): Reimplement in terms of
9787 ada_lookup_symbol_list, bits factored out from
9788 ada_lookup_encoded_symbol.
9790 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9792 * ada-exp.y (write_object_renaming): When subscripting an array
9793 using a symbol as the index, pass the block in call to
9794 ada_lookup_encoded_symbol when looking that symbol up.
9796 2018-01-05 Jerome Guitton <guitton@adacore.com>
9798 * ada-lang.c (ada_array_length): Use ada_index_type instead of
9801 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9803 * ada-lang.c (ada_to_fixed_value_create): Add handling of
9804 the case where VALUE_LVAL (val0) is not lval_memory.
9806 2018-01-05 Xavier Roirand <roirand@adacore.com>
9808 * ada-valprint.c (print_optional_low_bound): Handle
9809 character-indexed array printing like boolean-indexed array
9812 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9814 * NEWS: Create a new section for the next release branch.
9815 Rename the section of the current branch, now that it has
9818 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9820 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
9821 * version.in: Bump version to 8.1.50.DATE-git.
9823 2018-01-03 Xavier Roirand <roirand@adacore.com>
9825 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
9827 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
9829 (default_exception_support_info) <catch_handlers_sym>: Add field.
9830 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
9831 (ada_exception_name_addr_1): Add "catch handlers" handling.
9832 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
9834 (create_excep_cond_exprs) <ex>: Add parameter.
9835 (re_set_exception): Update create_excep_cond_exprs call.
9836 (print_it_exception, print_one_exception, print_mention_exception)
9837 (print_recreate_exception): Add "catch handler" handling.
9838 (allocate_location_catch_handlers, re_set_catch_handlers)
9839 (check_status_catch_handlers, print_it_catch_handlers)
9840 (print_one_catch_handlers, print_mention_catch_handlers)
9841 (print_recreate_catch_handlers): New function.
9842 (catch_handlers_breakpoint_ops): New variable.
9843 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
9844 Add parameter. Add "catch handler" handling.
9845 (ada_exception_sym_name, ada_exception_breakpoint_ops):
9846 Add "catch handler" handling.
9847 (ada_exception_catchpoint_cond_string): Add "catch handler"
9849 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
9851 (catch_ada_handlers_command): New function.
9852 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
9853 operations structure.
9854 (_initialize_ada_language): Add "catch handlers" command entry.
9855 * NEWS: Document "catch handlers" feature.
9857 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9859 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
9860 account when creating the array type of the slice.
9861 (ada_value_slice): Likewise.
9863 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9865 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
9867 (create_array_type_with_stride): Add byte_stride_prop parameter.
9868 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
9869 New parameter. Update all callers in this file.
9870 (array_type_has_dynamic_stride): New function.
9871 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
9872 of arrays with dynamic byte strides.
9873 * dwarf2read.c (read_array_type): Add support for dynamic
9874 DW_AT_byte_stride attributes.
9876 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9878 * dwarf2read.c (read_unspecified_type): Treat
9879 DW_TAG_enumeration_type DIEs from Ada units as stubs.
9881 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9883 Update copyright year range in all GDB files.
9885 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9887 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
9888 and gdb/testsuite/gdb.base/step-line.c.
9890 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9892 * copyright.py (main): Dump the contents of
9893 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
9894 even if BY_HAND is empty.
9896 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9898 * top.c (print_gdb_version): Update Copyright year in version
9901 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9903 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
9905 For older changes see ChangeLog-2017.
9911 version-control: never