1 2018-10-01 Tom Tromey <tom@tromey.com>
3 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
4 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
5 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
7 2018-10-01 Tom Tromey <tom@tromey.com>
9 * README: Minor change.
11 2018-09-30 Pedro Alves <palves@redhat.com>
13 * darwin-nat-info.c (darwin_debug_regions_recurse)
14 (info_mach_exceptions_command): Remove unused local variables.
15 * darwin-nat.c (darwin_decode_notify_message)
16 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
17 (darwin_stop_inferior, darwin_setup_exceptions)
18 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
19 (darwin_nat_target::attach, darwin_nat_target::detach)
20 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
22 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
25 2018-09-29 Tom Tromey <tom@tromey.com>
27 * README: Remove some leftover text.
29 2018-09-29 Tom Tromey <tom@tromey.com>
34 2018-09-28 John Baldwin <jhb@FreeBSD.org>
36 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
37 case with explicit breakpoint kind.
38 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
39 'additional_info' and related logic.
40 (riscv_debug_breakpoints): New variable.
41 (riscv_breakpoint_kind_from_pc): Use the length of the existing
42 instruction to determine the breakpoint kind.
43 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
44 flag. Update description of 'set/show riscv
45 use-compressed-breakpoints' flag.
47 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
49 (NEWS): Mention changes to frame related commands.
50 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
51 (add_prefix_cmd_suppress_notification): New function.
52 (add_com_suppress_notification): Call
53 add_cmd_suppress_notification.
54 * command.h (add_cmd_suppress_notification): Declare.
55 (add_prefix_cmd_suppress_notification): Declare.
56 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
57 (parse_frame_specification): Moved from stack.c, with
58 simplification to handle a single argument.
59 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
60 switch to the selected frame. Add a header comment.
61 * stack.c: Remove 'safe-ctype.h' include.
62 (find_frame_for_function): Add declaration.
63 (find_frame_for_address): New function.
64 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
65 (frame_selection_by_function_completer): New function.
66 (info_frame_command): Rename to...
67 (info_frame_command_core): ...this, and update parameter types.
68 (select_frame_command): Rename to...
69 (select_frame_command_core): ...this, and update parameter types.
70 (frame_command): Rename to...
71 (frame_command_core): ...this, and update parameter types.
72 (class frame_command_helper): New class to wrap implementations of
73 frame related sub-commands.
74 (frame_apply_cmd_list): New static global.
75 (frame_cmd_list): Make static.
76 (select_frame_cmd_list): New global for sub-commands.
77 (info_frame_cmd_list): New global for sub-commands.
78 (_initialize_stack): Register sub-commands for 'frame',
79 'select-frame', and 'info frame'. Update 'frame apply' commands
80 to use frame_apply_cmd_list. Move function local static
81 frame_apply_list to file static frame_apply_cmd_list for
83 * stack.h (select_frame_command): Delete declarationn.
84 (select_frame_for_mi): Declare new function.
86 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
88 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
89 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
92 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
94 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
96 2018-09-26 Tom Tromey <tom@tromey.com>
98 * valops.c (auto_abandon): Remove dead code.
100 2018-09-26 Tom Tromey <tom@tromey.com>
102 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
104 2018-09-24 Tom Tromey <tom@tromey.com>
106 * common/pathstuff.c (get_standard_cache_dir): Make
107 "xdg_cache_home" and "home" const.
108 * top.c (init_history): Make "tmpenv" const.
109 * main.c (get_init_files): Make "homedir" const.
111 2018-09-23 Tom Tromey <tom@tromey.com>
114 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
116 2018-09-23 Tom Tromey <tom@tromey.com>
118 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
119 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
120 * python/python-internal.h (gdbpy_handle_exception): Declare.
121 * python/py-utils.c (gdbpy_handle_exception): New function.
123 2018-09-23 Tom Tromey <tom@tromey.com>
126 * python/py-type.c (typy_template_argument): Check for negative
129 2018-09-23 Tom Tromey <tom@tromey.com>
132 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
134 2018-09-23 Tom Tromey <tom@tromey.com>
137 * python/py-value.c (valpy_int): Allow conversion from pointer
140 2018-09-23 Tom Tromey <tom@tromey.com>
143 * python/py-value.c (valpy_int): Respect type sign.
145 2018-09-23 Tom Tromey <tom@tromey.com>
148 * python/py-value.c (valpy_float): Allow conversions from int or
150 (valpy_int, valpy_long): Allow conversions from float.
152 2018-09-23 Tom Tromey <tom@tromey.com>
154 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
155 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
157 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
159 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
161 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
163 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
165 * windows-nat.c (windows_nat_target::wait): Remove a spurious
166 target_terminal::ours().
168 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
170 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
173 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
175 * breakpoint.c (update_inserted_breakpoint_locations): Remove
178 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
180 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
182 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
183 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
184 * sol-thread.c (ps_pdmodel): Don't guard definition.
186 * procfs.c: Fix formatting.
188 * procfs.c (sysset_t_alloc): Remove.
189 (create_procinfo): Use XNEW instead of sysset_t_alloc.
190 (procfs_debug_inferior): Likewise.
191 (procfs_set_exec_trap): Likewise.
192 (proc_set_traced_sysentry): Don't allocate argp dynamically.
193 (proc_set_traced_sysexit): Likewise.
195 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
196 (dead_procinfo): Likewise.
197 (proc_warn): Likewise.
198 (proc_error): Likewise.
199 (proc_get_LDT_entry): Likewise.
200 (do_attach): Likewise.
201 (procfs_target::pid_to_str): Likewise.
202 (iterate_over_mappings): Likewise.
204 * procfs.c (create_procinfo): Fix ARI warning.
205 (proc_get_status): Likewise.
206 (proc_stop_process): Likewise.
207 (proc_run_process): Likewise.
208 (proc_kill): Likewise.
209 (proc_get_LDT_entry): Likewise.
210 (procfs_find_LDT_entry): Likewise.
211 (proc_update_threads): Likewise.
212 (proc_iterate_over_threads): Likewise.
213 (do_attach): Likewise.
214 (procfs_xfer_memory): Likewise.
215 (invalidate_cache): Likewise.
216 (procfs_target::resume): Likewise.
217 (procfs_init_inferior): Likewise.
218 (procfs_set_exec_trap): Likewise.
219 (procfs_target::thread_alive): Likewise.
220 (procfs_target::pid_to_exec_file): Likewise.
221 (iterate_over_mappings): Likewise.
222 (procfs_target::make_corefile_notes): Likewise.
223 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
225 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
226 (procfs_find_LDT_entry): Likewise.
227 * sol-thread.c (ps_lgetLDT): Likewise.
229 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
232 * procfs.c (procfs_target): Declare pid_to_exec_file.
233 (procfs_target::pid_to_exec_file): New.
235 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
237 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
239 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
240 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
242 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
244 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
245 (supply_fpregset, fill_fpregset): Move ...
246 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
247 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
248 Remove references to ioctl-based procfs.
250 Remove PR_MODEL_NATIVE guards.
251 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
252 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
254 2018-09-19 Xavier Roirand <roirand@adacore.com>
257 * solib-darwin.c (darwin_get_dyld_bfd): New function.
258 (darwin_solib_get_all_image_info_addr_at_init): Update call.
259 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
261 2018-09-19 John Baldwin <jhb@FreeBSD.org>
263 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
264 (fbsd_print_sockaddr_in6): Likewise.
266 2018-09-19 Richard Bunt <richard.bunt@arm.com>
267 Chris January <chris.january@arm.com>
269 * eval.c (skip_undetermined_arglist): Skip argument list helper.
270 (evaluate_subexp_standard): Return a dummy type when
271 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
272 OP_F77_UNDETERMINED_ARGLIST case.
273 * expression.h (enum noside): Update comment.
275 2018-09-19 George Vasick <george.vasick@oracle.com>
277 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
279 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
280 April Chin <april.chin@oracle.com>
281 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
283 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
285 (create_procinfo): Print pids in /proc without leading zeros.
287 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
289 * nios2-tdep.c (nios2_gcc_target_options): New.
290 (nios2_gdb_arch_init): Install new hook.
292 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
294 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
296 * update-gnulib.sh: Apply patch.
297 * configure: Re-generate.
299 2018-09-18 John Baldwin <jhb@FreeBSD.org>
301 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
302 description. Make "info proc" command descriptions more
305 2018-09-18 John Baldwin <jhb@FreeBSD.org>
307 * NEWS: Mention 'info proc files' command.
309 2018-09-18 John Baldwin <jhb@FreeBSD.org>
311 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
312 descriptors for IP_FILES and IP_ALL.
314 2018-09-18 John Baldwin <jhb@FreeBSD.org>
316 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
317 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
318 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
319 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
320 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
321 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
322 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
323 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
324 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
325 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
326 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
327 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
328 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
329 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
330 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
331 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
332 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
333 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
334 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
335 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
336 (struct fbsd_sockaddr_un): New types.
337 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
338 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
339 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
340 (fbsd_core_info_proc_files): New functions.
341 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
343 * fbsd-tdep.h (fbsd_info_proc_files_header)
344 (fbsd_info_proc_files_entry): New.
346 2018-09-18 John Baldwin <jhb@FreeBSD.org>
348 * defs.h (enum info_proc_what) [IP_FILES]: New value.
349 * infcmd.c (info_proc_cmd_files): New function.
350 (_initialize_infcmd): Register 'info proc files' command.
352 2018-09-18 John Baldwin <jhb@FreeBSD.org>
354 * gnulib/aclocal-m4-deps.mk: Re-generate.
355 * gnulib/aclocal.m4: Re-generate.
356 * gnulib/config.in: Re-generate.
357 * gnulib/configure: Re-generate.
358 * gnulib/import/Makefile.am: Re-generate.
359 * gnulib/import/Makefile.in: Re-generate.
360 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
361 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
362 * gnulib/import/arpa_inet.in.h: New file.
363 * gnulib/import/inet_ntop.c: New file.
364 * gnulib/import/m4/arpa_inet_h.m4: New file.
365 * gnulib/import/m4/inet_ntop.m4: New file.
366 * gnulib/import/m4/netinet_in_h.m4: New file.
367 * gnulib/import/m4/socklen.m4: New file.
368 * gnulib/import/m4/sockpfaf.m4: New file.
369 * gnulib/import/m4/stdalign.m4: New file.
370 * gnulib/import/m4/sys_uio_h.m4: New file.
371 * gnulib/import/netinet_in.in.h: New file.
372 * gnulib/import/stdalign.in.h: New file.
373 * gnulib/import/sys_socket.c: New file.
374 * gnulib/import/sys_socket.in.h: New file.
375 * gnulib/import/sys_uio.in.h: New file.
376 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
379 2018-09-18 John Baldwin <jhb@FreeBSD.org>
381 * gnulib/aclocal-m4-deps.mk: New file.
382 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
385 2018-09-18 John Baldwin <jhb@FreeBSD.org>
387 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
390 2018-09-18 Tom Tromey <tom@tromey.com>
392 * compile/compile-object-load.c (struct
393 link_hash_table_cleanup_data): Add constructor and destructor.
394 Use DISABLE_COPY_AND_ASSIGN.
395 (~link_hash_table_cleanup_data): Rename from
396 link_hash_table_free. Now a destructor.
397 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
399 2018-09-18 Tom Tromey <tom@tromey.com>
401 * compile/compile-object-run.c (do_module_cleanup): Use delete.
402 * compile/compile-object-load.c (struct munmap_list): Move to
404 (munmap_list::add): Rename from munmap_list_add; rewrite.
405 (munmap_list::~munmap_list): Rename from munmap_list_free.
406 (munmap_listp_free_cleanup): Remove.
407 (compile_object_load): Update.
408 * compile/compile-object-load.h (struct munmap_list): Move from
409 compile-object-load.c. Rewrite.
411 2018-09-18 Alan Hayward <alan.hayward@arm.com>
413 * aarch64-tdep.c (pass_in_v): Use register size.
414 (aarch64_extract_return_value): Likewise.
415 (aarch64_store_return_value): Likewise.
417 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
419 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
422 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
424 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
427 2018-09-17 Tom Tromey <tom@tromey.com>
430 * configure: Rebuild.
431 * configure.ac: Conditionally use -DNDEBUG for Python.
433 2018-09-17 Tom Tromey <tom@tromey.com>
435 * configure: Rebuild.
436 * configure.ac: Use gmp as a library dependency when checking for
439 2018-09-17 Pedro Alves <palves@redhat.com>
441 * python/py-inferior.c (find_inferior_object): Delete.
443 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
445 * compile/compile-cplus-types.c
446 (compile_cplus_instance::enter_scope): Don't use new_scope after
449 2018-09-17 Tom Tromey <tom@tromey.com>
451 * common/pathstuff.c (get_standard_cache_dir): Use
452 ~/Library/Caches on macOS.
453 * common/pathstuff.h (get_standard_cache_dir): Update comment.
455 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
458 * breakpoint.c (commands_cmd_element): New.
459 (_initialize_breakpoint): Assign commands_cmd_element.
460 * breakpoint.h (commands_cmd_element): New.
461 * cli/cli-script.c (while_cmd_element, if_command,
462 define_cmd_element): New.
463 (command_name_equals): Remove.
464 (process_next_line): Compare commands by pointer, not by name.
465 (_initialize_cli_script): Assign the various cmd_list_element
467 * compile/compile.c (compile_cmd_element): New.
468 (_initialize_compile): Assign compile_cmd_element.
469 * compile/compile.h (compile_cmd_element): New.
470 * guile/guile.c (guile_cmd_element): New.
471 (install_gdb_commands): Assign guile_cmd_element.
472 * guile/guile.h (guile_cmd_element): New.
473 * python/python.c (python_cmd_element): New.
474 (_initialize_python): Assign python_cmd_element.
475 * python/python.h (python_cmd_element): New.
476 * tracepoint.c (while_stepping_cmd_element): New.
477 (_initialize_tracepoint): Assign while_stepping_cmd_element.
478 * tracepoint.h (while_stepping_cmd_element): New.
480 2018-09-17 Tom Tromey <tom@tromey.com>
482 * infrun.c (save_infcall_suspend_state): Return
483 infcall_suspend_state_up.
484 (save_infcall_control_state): Return infcall_control_state_up.
485 * inferior.h (save_infcall_suspend_state)
486 (save_infcall_control_state): Declare later. Return unique
489 2018-09-17 Tom Tromey <tom@tromey.com>
491 * infrun.c (struct stop_context): Declare constructor,
492 destructor, "changed" method.
493 (stop_context::stop_context): Rename from save_stop_context.
494 (stop_context::~stop_context): Rename from
495 release_stop_context_cleanup.
496 (normal_stop): Update.
497 (stop_context::changed): Rename from stop_context_changed. Return
500 2018-09-17 Tom Tromey <tom@tromey.com>
502 * inferior.h (struct infcall_suspend_state_deleter): New.
503 (infcall_suspend_state_up): New typedef.
504 (struct infcall_control_state_deleter): New.
505 (infcall_control_state_up): New typedef.
506 (make_cleanup_restore_infcall_suspend_state)
507 (make_cleanup_restore_infcall_control_state): Don't declare.
508 * infcall.c (call_function_by_hand_dummy): Update.
509 * infrun.c (do_restore_infcall_suspend_state_cleanup)
510 (make_cleanup_restore_infcall_suspend_state): Remove.
511 (do_restore_infcall_control_state_cleanup)
512 (make_cleanup_restore_infcall_control_state): Remove.
514 2018-09-17 Tom Tromey <tom@tromey.com>
516 * gdbthread.h (struct thread_control_state): Add initializer.
517 (class thread_info) <control>: Remove initializer.
518 * inferior.h (struct inferior_control_state): Add initializer.
519 (class inferior) <control>: Remove initializer.
520 (exit_inferior_1): Update.
521 * infrun.c (struct infcall_control_state): Add constructors.
522 (save_infcall_control_state): Use new.
523 (restore_infcall_control_state, discard_infcall_control_state):
526 2018-09-17 Tom Tromey <tom@tromey.com>
528 * infrun.c (struct infcall_suspend_state) <registers>: Now a
530 <siginfo_data>: Now a unique_xmalloc_ptr.
531 (save_infcall_suspend_state, restore_infcall_suspend_state)
532 (discard_infcall_suspend_state)
533 (get_infcall_suspend_state_regcache): Update.
535 2018-09-17 Tom Tromey <tom@tromey.com>
537 * gdbthread.h (struct thread_suspend_state): Add initializers.
538 (class thread_info) <suspend>: Remove initializer.
539 * infrun.c (struct infcall_suspend_state): Add initializers.
540 (save_infcall_suspend_state): Use new.
541 (discard_infcall_suspend_state): Use delete.
543 2018-09-16 Tom Tromey <tom@tromey.com>
545 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
547 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
548 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
549 (py_varobj_iter_new): Likewise.
550 (py_varobj_get_iterator): Use gdbpy_ref.
552 2018-09-16 Tom Tromey <tom@tromey.com>
554 * python/py-threadevent.c (py_get_event_thread): Simplify.
555 * python/py-inferior.c (infpy_thread_from_thread_handle):
556 Return immediately after calling thread_to_thread_object. Use
558 (thread_to_thread_object): Set the exception on a NULL return.
560 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
562 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
564 2018-09-16 Tom Tromey <tom@tromey.com>
566 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
569 2018-09-16 Tom Tromey <tom@tromey.com>
571 * python/python-internal.h (thread_to_thread_object): Change
573 * python/py-inferior.c (thread_to_thread_object): Return a new
575 (infpy_thread_from_thread_handle): Update.
576 * python/py-infthread.c (gdbpy_selected_thread): Update.
577 * python/py-stopevent.c (create_stop_event_object): Update.
578 * python/py-threadevent.c (py_get_event_thread): Return a new
580 (py_get_event_thread): Update.
581 * python/py-event.h (py_get_event_thread): Change return type.
582 * python/py-continueevent.c (create_continue_event_object):
585 2018-09-16 Tom Tromey <tom@tromey.com>
587 * python/py-progspace.c (pspy_get_objfiles): Update.
588 * python/python-internal.h (objfile_to_objfile_object): Change
590 * python/py-newobjfileevent.c (create_new_objfile_event_object):
592 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
594 * python/python.c (gdbpy_get_current_objfile): Update.
595 (gdbpy_objfiles): Update.
596 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
598 (objfile_to_objfile_object): Return a new reference.
599 * python/py-symtab.c (stpy_get_objfile): Update.
600 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
603 2018-09-16 Tom Tromey <tom@tromey.com>
605 * python/py-inferior.c (infpy_get_progspace): Update.
606 * python/python-internal.h (pspace_to_pspace_object): Change
608 * python/py-newobjfileevent.c
609 (create_clear_objfiles_event_object): Update.
610 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
612 * python/python.c (gdbpy_get_current_progspace): Update.
613 (gdbpy_progspaces): Update.
614 * python/py-progspace.c (pspace_to_pspace_object): Return a new
616 * python/py-objfile.c (objfpy_get_progspace): Update.
617 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
620 2018-09-16 Tom Tromey <tom@tromey.com>
622 * python/lib/gdb/__init__.py (current_progspace, objfiles)
623 (solib_name, block_for_pc, find_pc_line): New functions.
624 (execute_unwinders): Update.
625 * python/py-block.c (gdbpy_block_for_pc): Remove.
626 * python/py-inferior.c (infpy_get_progspace): New function.
627 (inferior_object_getset) <progspace>: Add.
628 * python/py-progspace.c (pspy_objfiles): Rewrite.
629 (pspy_solib_name, pspy_block_for_pc)
630 (pspy_find_pc_line, pspy_is_valid): New functions.
631 (progspace_object_methods): Add entries for solib_name,
632 block_for_pc, find_pc_line, is_valid.
633 * python/python-internal.h (gdbpy_block_for_pc)
634 (build_objfiles_list): Don't declare.
635 * python/python.c: Don't include solib.h.
636 (gdbpy_solib_name, gdbpy_find_pc_line)
637 (gdbpy_get_current_progspace, build_objfiles_list)
638 (gdbpy_objfiles): Remove.
639 (GdbMethods) <current_progspace, objfiles, block_for_pc,
640 solib_name, find_pc_line>: Remove entries.
642 2018-09-16 Tom Tromey <tom@tromey.com>
644 * top.c (new_ui_command): Use GNU style for metasyntactic
646 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
648 * maint.c (maintenance_translate_address): Remove "<>" around
650 * interps.c (interpreter_exec_cmd): Use GNU style for
651 metasyntactic variables.
652 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
653 metasyntactic variables.
654 * tracepoint.c (tfind_range_command): Use GNU style for
655 metasyntactic variables.
656 (tfind_outside_command): Likewise.
657 (_initialize_tracepoint): Likewise.
658 * remote.c (extended_remote_target::create_inferior): Use GNU
659 style for metasyntactic variables.
660 * sparc64-tdep.c (adi_examine_command): Use GNU style for
661 metasyntactic variables.
662 (adi_assign_command): Likewise.
664 2018-09-16 Tom Tromey <tom@tromey.com>
666 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
667 metasyntactic variables. Print message if no disassembler options
670 2018-09-15 Tom Tromey <tom@tromey.com>
672 * infcmd.c (get_inferior_args): Return const char *.
673 * inferior.h (get_inferior_args): Return type now const.
674 * linux-tdep.c (linux_fill_prpsinfo): Update.
675 * procfs.c (procfs_target::make_corefile_notes): Update.
677 2018-09-07 Tom Tromey <tom@tromey.com>
679 * python/python.c (execute_gdb_command): Call bpstat_do_actions
682 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
684 * nios2-tdep.c (nios2_type_align): New.
685 (nios2_gdb_arch_init): Install type_align hook.
687 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
689 * eval.c (fake_method::fake_method): Call xzalloc directly for a
690 type that is neither object file owned, nor gdbarch owned.
691 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
693 (alloc_type_instance): Allocate non-objfile owned types on the
695 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
696 using TYPE_ALLOC to ensure memory is allocated on the correct
698 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
699 obstack, or the gdbarch obstack.
700 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
702 2018-09-14 Tom Tromey <tom@tromey.com>
704 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
707 2018-09-14 Tom Tromey <tom@tromey.com>
709 * nat/fork-inferior.c (get_startup_shell): Remove "static".
711 2018-09-13 Tom Tromey <tom@tromey.com>
713 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
716 2018-09-13 Tom Tromey <tom@tromey.com>
718 * exec.c (try_open_exec_file): Use std::string.
720 2018-09-13 Tom Tromey <tom@tromey.com>
722 * utils.h (gdb_bfd_errmsg): Return std::string.
723 * exec.c (exec_file_attach): Update.
724 * compile/compile-object-load.c (compile_object_load): Update.
725 * utils.c (gdb_bfd_errmsg): Return std::string.
727 2018-09-13 Tom Tromey <tom@tromey.com>
729 * procfs.c (struct procinfo_deleter): New.
730 (procinfo_up): New typedef.
731 (do_destroy_procinfo_cleanup): Remove.
732 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
734 2018-09-13 Tom Tromey <tom@tromey.com>
736 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
738 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
739 2018-09-13 Tom Tromey <tom@tromey.com>
741 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
742 (pspy_get_objfiles): New function.
743 (progspace_object_methods): New.
744 (pspace_object_type): Add tp_methods callback.
745 * python/python-internal.h (build_objfiles_list): New
747 * python/python.c (build_objfiles_list): New function.
748 (gdbpy_objfiles): Implement using build_objfiles_list.
749 * NEWS: Mention the Progspace.objfiles method.
751 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
753 * python/py-inferior.c (infpy_get_progspace): New function.
754 (inferior_object_getset): Add progspace property.
755 * NEWS: Mention the new property.
757 2018-09-13 Tom Tromey <tom@tromey.com>
760 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
762 2018-09-13 Tom Tromey <tom@tromey.com>
765 * rust-lang.c (rust_enum_variant): Now static.
766 (rust_empty_enum_p): New function.
767 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
770 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
772 * python/py-inferior.c (infpy_repr): New.
773 (inferior_object_type): Register infpy_repr.
774 * python/py-objfile.c (objfpy_repr): New.
775 (objfile_object_type): Register objfpy_repr.
777 2018-09-12 John Baldwin <jhb@FreeBSD.org>
779 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
781 2018-09-12 John Baldwin <jhb@FreeBSD.org>
783 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
786 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
788 * common/common-utils.c: Don't include '<sys/stat.h>'.
789 (is_regular_file): Move to...
790 * common/filestuff.c (is_regular_file): ... here.
791 * common/common-utils.h (is_regular_file): Move to...
792 * common/filestuff.h (is_regular_file): ... here.
794 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
796 * skip.c (debug_skip): New variable.
797 (skiplist_entry::do_skip_file_p): Add debug output.
798 (skiplist_entry::do_skip_gfile_p): Likewise.
799 (skiplist_entry::skip_function_p): Likewise.
800 (_initialize_step_skip): Create debug command.
801 * NEWS: Mention set/show debug skip.
803 2018-09-11 Xavier Roirand <roirand@adacore.com>
805 * darwin-nat.c (should_disable_startup_with_shell):
807 (darwin_nat_target::create_inferior): Add call.
809 2018-09-11 Xavier Roirand <roirand@adacore.com>
811 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
812 inf_port, msg_state>: Initialize.
813 (struct darwin_thread_info) <signaled, single_step>: Change
815 (struct darwin_thread_info) <event>: Initialize.
817 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
821 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
824 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
827 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
831 * gnulib/aclocal.m4: Regenerate.
832 * gnulib/config.in: Regenerate.
833 * gnulib/configure: Regenerate.
834 * gnulib/import/Makefile.am: Update.
835 * gnulib/import/Makefile.in: Update.
836 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
837 * gnulib/import/_Noreturn.h: ... this.
838 * gnulib/import/alloca.in.h: Update.
839 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
840 * gnulib/import/arg-nonnull.h: ... this.
841 * gnulib/import/assure.h: Update.
842 * gnulib/import/at-func.c: Update.
843 * gnulib/import/basename-lgpl.c: Update.
844 * gnulib/import/extra/snippet/c++defs.h: Rename to...
845 * gnulib/import/c++defs.h: ... this.
846 * gnulib/import/canonicalize-lgpl.c: Update.
847 * gnulib/import/cdefs.h: Update.
848 * gnulib/import/chdir-long.c: Update.
849 * gnulib/import/chdir-long.h: Update.
850 * gnulib/import/cloexec.c: Update.
851 * gnulib/import/cloexec.h: Update.
852 * gnulib/import/close.c: Update.
853 * gnulib/import/closedir.c: Update.
854 * gnulib/import/config.charset: Update.
855 * gnulib/import/dirent-private.h: Update.
856 * gnulib/import/dirent.in.h: Update.
857 * gnulib/import/dirfd.c: Update.
858 * gnulib/import/dirname-lgpl.c: Update.
859 * gnulib/import/dirname.h: Update.
860 * gnulib/import/dosname.h: Update.
861 * gnulib/import/dup-safer-flag.c: Update.
862 * gnulib/import/dup-safer.c: Update.
863 * gnulib/import/dup.c: Update.
864 * gnulib/import/dup2.c: Update.
865 * gnulib/import/errno.in.h: Update.
866 * gnulib/import/error.c: Update.
867 * gnulib/import/error.h: Update.
868 * gnulib/import/exitfail.c: Update.
869 * gnulib/import/exitfail.h: Update.
870 * gnulib/import/extra/update-copyright: Update.
871 * gnulib/import/fchdir.c: Update.
872 * gnulib/import/fcntl.c: Update.
873 * gnulib/import/fcntl.in.h: Update.
874 * gnulib/import/fd-hook.c: Update.
875 * gnulib/import/fd-hook.h: Update.
876 * gnulib/import/fd-safer-flag.c: Update.
877 * gnulib/import/fd-safer.c: Update.
878 * gnulib/import/fdopendir.c: Update.
879 * gnulib/import/filename.h: Update.
880 * gnulib/import/filenamecat-lgpl.c: Update.
881 * gnulib/import/filenamecat.h: Update.
882 * gnulib/import/flexmember.h: Update.
883 * gnulib/import/float+.h: Update.
884 * gnulib/import/float.c: Update.
885 * gnulib/import/float.in.h: Update.
886 * gnulib/import/fnmatch.c: Update.
887 * gnulib/import/fnmatch.in.h: Update.
888 * gnulib/import/fnmatch_loop.c: Update.
889 * gnulib/import/fpucw.h: Update.
890 * gnulib/import/frexp.c: Update.
891 * gnulib/import/frexpl.c: Update.
892 * gnulib/import/fstat.c: Update.
893 * gnulib/import/fstatat.c: Update.
894 * gnulib/import/getcwd-lgpl.c: Update.
895 * gnulib/import/getcwd.c: Update.
896 * gnulib/import/getdtablesize.c: Update.
897 * gnulib/import/getlogin_r.c: Update.
898 * gnulib/import/getprogname.c: Update.
899 * gnulib/import/getprogname.h: Update.
900 * gnulib/import/gettext.h: Update.
901 * gnulib/import/gettimeofday.c: Update.
902 * gnulib/import/glob-libc.h: Update.
903 * gnulib/import/glob.c: Update.
904 * gnulib/import/glob.in.h: Update.
905 * gnulib/import/glob_internal.h: Update.
906 * gnulib/import/glob_pattern_p.c: Update.
907 * gnulib/import/globfree.c: Update.
908 * gnulib/import/hard-locale.c: Update.
909 * gnulib/import/hard-locale.h: Update.
910 * gnulib/import/intprops.h: Update.
911 * gnulib/import/inttypes.in.h: Update.
912 * gnulib/import/isnan.c: Update.
913 * gnulib/import/isnand-nolibm.h: Update.
914 * gnulib/import/isnand.c: Update.
915 * gnulib/import/isnanl-nolibm.h: Update.
916 * gnulib/import/isnanl.c: Update.
917 * gnulib/import/itold.c: Update.
918 * gnulib/import/libc-config.h: Update.
919 * gnulib/import/limits.in.h: Update.
920 * gnulib/import/localcharset.c: Update.
921 * gnulib/import/localcharset.h: Update.
922 * gnulib/import/localtime-buffer.c: Update.
923 * gnulib/import/localtime-buffer.h: Update.
924 * gnulib/import/lstat.c: Update.
925 * gnulib/import/m4/00gnulib.m4: Update.
926 * gnulib/import/m4/__inline.m4: Update.
927 * gnulib/import/m4/absolute-header.m4: Update.
928 * gnulib/import/m4/alloca.m4: Update.
929 * gnulib/import/m4/builtin-expect.m4: Update.
930 * gnulib/import/m4/canonicalize.m4: Update.
931 * gnulib/import/m4/chdir-long.m4: Update.
932 * gnulib/import/m4/close.m4: Update.
933 * gnulib/import/m4/closedir.m4: Update.
934 * gnulib/import/m4/configmake.m4: Update.
935 * gnulib/import/m4/d-ino.m4: Update.
936 * gnulib/import/m4/d-type.m4: Update.
937 * gnulib/import/m4/dirent_h.m4: Update.
938 * gnulib/import/m4/dirfd.m4: Update.
939 * gnulib/import/m4/dirname.m4: Update.
940 * gnulib/import/m4/double-slash-root.m4: Update.
941 * gnulib/import/m4/dup.m4: Update.
942 * gnulib/import/m4/dup2.m4: Update.
943 * gnulib/import/m4/eealloc.m4: Update.
944 * gnulib/import/m4/environ.m4: Update.
945 * gnulib/import/m4/errno_h.m4: Update.
946 * gnulib/import/m4/error.m4: Update.
947 * gnulib/import/m4/exponentd.m4: Update.
948 * gnulib/import/m4/exponentl.m4: Update.
949 * gnulib/import/m4/extensions.m4: Update.
950 * gnulib/import/m4/extern-inline.m4: Update.
951 * gnulib/import/m4/fchdir.m4: Update.
952 * gnulib/import/m4/fcntl-o.m4: Update.
953 * gnulib/import/m4/fcntl.m4: Update.
954 * gnulib/import/m4/fcntl_h.m4: Update.
955 * gnulib/import/m4/fdopendir.m4: Update.
956 * gnulib/import/m4/filenamecat.m4: Update.
957 * gnulib/import/m4/flexmember.m4: Update.
958 * gnulib/import/m4/float_h.m4: Update.
959 * gnulib/import/m4/fnmatch.m4: Update.
960 * gnulib/import/m4/fnmatch_h.m4: Update.
961 * gnulib/import/m4/fpieee.m4: Update.
962 * gnulib/import/m4/frexp.m4: Update.
963 * gnulib/import/m4/frexpl.m4: Update.
964 * gnulib/import/m4/fstat.m4: Update.
965 * gnulib/import/m4/fstatat.m4: Update.
966 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
967 * gnulib/import/m4/getcwd-path-max.m4: Update.
968 * gnulib/import/m4/getcwd.m4: Update.
969 * gnulib/import/m4/getdtablesize.m4: Update.
970 * gnulib/import/m4/getlogin.m4: Update.
971 * gnulib/import/m4/getlogin_r.m4: Update.
972 * gnulib/import/m4/getpagesize.m4: Update.
973 * gnulib/import/m4/getprogname.m4: Update.
974 * gnulib/import/m4/gettimeofday.m4: Update.
975 * gnulib/import/m4/glibc21.m4: Update.
976 * gnulib/import/m4/glob.m4: Update.
977 * gnulib/import/m4/glob_h.m4: Update.
978 * gnulib/import/m4/gnulib-cache.m4: Update.
979 * gnulib/import/m4/gnulib-common.m4: Update.
980 * gnulib/import/m4/gnulib-comp.m4: Update.
981 * gnulib/import/m4/gnulib-tool.m4: Update.
982 * gnulib/import/m4/hard-locale.m4: Update.
983 * gnulib/import/m4/include_next.m4: Update.
984 * gnulib/import/m4/inttypes-pri.m4: Update.
985 * gnulib/import/m4/inttypes.m4: Update.
986 * gnulib/import/m4/isnand.m4: Update.
987 * gnulib/import/m4/isnanl.m4: Update.
988 * gnulib/import/m4/largefile.m4: Update.
989 * gnulib/import/m4/limits-h.m4: Update.
990 * gnulib/import/m4/localcharset.m4: Update.
991 * gnulib/import/m4/locale-fr.m4: Update.
992 * gnulib/import/m4/locale-ja.m4: Update.
993 * gnulib/import/m4/locale-zh.m4: Update.
994 * gnulib/import/m4/localtime-buffer.m4: Update.
995 * gnulib/import/m4/longlong.m4: Update.
996 * gnulib/import/m4/lstat.m4: Update.
997 * gnulib/import/m4/malloc.m4: Update.
998 * gnulib/import/m4/malloca.m4: Update.
999 * gnulib/import/m4/math_h.m4: Update.
1000 * gnulib/import/m4/mbrtowc.m4: Update.
1001 * gnulib/import/m4/mbsinit.m4: Update.
1002 * gnulib/import/m4/mbsrtowcs.m4: Update.
1003 * gnulib/import/m4/mbstate_t.m4: Update.
1004 * gnulib/import/m4/memchr.m4: Update.
1005 * gnulib/import/m4/memmem.m4: Update.
1006 * gnulib/import/m4/mempcpy.m4: Update.
1007 * gnulib/import/m4/memrchr.m4: Update.
1008 * gnulib/import/m4/mkdir.m4: Update.
1009 * gnulib/import/m4/mkstemp.m4: Update.
1010 * gnulib/import/m4/mmap-anon.m4: Update.
1011 * gnulib/import/m4/mode_t.m4: Update.
1012 * gnulib/import/m4/msvc-inval.m4: Update.
1013 * gnulib/import/m4/msvc-nothrow.m4: Update.
1014 * gnulib/import/m4/multiarch.m4: Update.
1015 * gnulib/import/m4/nocrash.m4: Update.
1016 * gnulib/import/m4/off_t.m4: Update.
1017 * gnulib/import/m4/onceonly.m4: Update.
1018 * gnulib/import/m4/open-cloexec.m4: Update.
1019 * gnulib/import/m4/open.m4: Update.
1020 * gnulib/import/m4/openat.m4: Update.
1021 * gnulib/import/m4/opendir.m4: Update.
1022 * gnulib/import/m4/pathmax.m4: Update.
1023 * gnulib/import/m4/rawmemchr.m4: Update.
1024 * gnulib/import/m4/readdir.m4: Update.
1025 * gnulib/import/m4/readlink.m4: Update.
1026 * gnulib/import/m4/realloc.m4: Update.
1027 * gnulib/import/m4/rename.m4: Update.
1028 * gnulib/import/m4/rewinddir.m4: Update.
1029 * gnulib/import/m4/rmdir.m4: Update.
1030 * gnulib/import/m4/save-cwd.m4: Update.
1031 * gnulib/import/m4/secure_getenv.m4: Update.
1032 * gnulib/import/m4/setenv.m4: Update.
1033 * gnulib/import/m4/signal_h.m4: Update.
1034 * gnulib/import/m4/ssize_t.m4: Update.
1035 * gnulib/import/m4/stat-time.m4: Update.
1036 * gnulib/import/m4/stat.m4: Update.
1037 * gnulib/import/m4/std-gnu11.m4: Update.
1038 * gnulib/import/m4/stdbool.m4: Update.
1039 * gnulib/import/m4/stddef_h.m4: Update.
1040 * gnulib/import/m4/stdint.m4: Update.
1041 * gnulib/import/m4/stdio_h.m4: Update.
1042 * gnulib/import/m4/stdlib_h.m4: Update.
1043 * gnulib/import/m4/strchrnul.m4: Update.
1044 * gnulib/import/m4/strdup.m4: Update.
1045 * gnulib/import/m4/strerror.m4: Update.
1046 * gnulib/import/m4/string_h.m4: Update.
1047 * gnulib/import/m4/strstr.m4: Update.
1048 * gnulib/import/m4/strtok_r.m4: Update.
1049 * gnulib/import/m4/sys_socket_h.m4: Update.
1050 * gnulib/import/m4/sys_stat_h.m4: Update.
1051 * gnulib/import/m4/sys_time_h.m4: Update.
1052 * gnulib/import/m4/sys_types_h.m4: Update.
1053 * gnulib/import/m4/tempname.m4: Update.
1054 * gnulib/import/m4/time_h.m4: Update.
1055 * gnulib/import/m4/unistd-safer.m4: Update.
1056 * gnulib/import/m4/unistd_h.m4: Update.
1057 * gnulib/import/m4/warn-on-use.m4: Update.
1058 * gnulib/import/m4/wchar_h.m4: Update.
1059 * gnulib/import/m4/wchar_t.m4: Update.
1060 * gnulib/import/m4/wctype_h.m4: Update.
1061 * gnulib/import/m4/wint_t.m4: Update.
1062 * gnulib/import/malloc.c: Update.
1063 * gnulib/import/malloc/scratch_buffer.h: Update.
1064 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1065 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1066 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1067 * gnulib/import/malloca.c: Update.
1068 * gnulib/import/malloca.h: Update.
1069 * gnulib/import/malloca.valgrind: Update.
1070 * gnulib/import/math.in.h: Update.
1071 * gnulib/import/mbrtowc.c: Update.
1072 * gnulib/import/mbsinit.c: Update.
1073 * gnulib/import/mbsrtowcs-impl.h: Update.
1074 * gnulib/import/mbsrtowcs-state.c: Update.
1075 * gnulib/import/mbsrtowcs.c: Update.
1076 * gnulib/import/memchr.c: Update.
1077 * gnulib/import/memmem.c: Update.
1078 * gnulib/import/mempcpy.c: Update.
1079 * gnulib/import/memrchr.c: Update.
1080 * gnulib/import/mkdir.c: Update.
1081 * gnulib/import/mkstemp.c: Update.
1082 * gnulib/import/msvc-inval.c: Update.
1083 * gnulib/import/msvc-inval.h: Update.
1084 * gnulib/import/msvc-nothrow.c: Update.
1085 * gnulib/import/msvc-nothrow.h: Update.
1086 * gnulib/import/open.c: Update.
1087 * gnulib/import/openat-die.c: Update.
1088 * gnulib/import/openat-priv.h: Update.
1089 * gnulib/import/openat-proc.c: Update.
1090 * gnulib/import/openat.c: Update.
1091 * gnulib/import/openat.h: Update.
1092 * gnulib/import/opendir.c: Update.
1093 * gnulib/import/pathmax.h: Update.
1094 * gnulib/import/pipe-safer.c: Update.
1095 * gnulib/import/rawmemchr.c: Update.
1096 * gnulib/import/readdir.c: Update.
1097 * gnulib/import/readlink.c: Update.
1098 * gnulib/import/realloc.c: Update.
1099 * gnulib/import/ref-add.sin: Update.
1100 * gnulib/import/ref-del.sin: Update.
1101 * gnulib/import/rename.c: Update.
1102 * gnulib/import/rewinddir.c: Update.
1103 * gnulib/import/rmdir.c: Update.
1104 * gnulib/import/same-inode.h: Update.
1105 * gnulib/import/save-cwd.c: Update.
1106 * gnulib/import/save-cwd.h: Update.
1107 * gnulib/import/scratch_buffer.h: Update.
1108 * gnulib/import/secure_getenv.c: Update.
1109 * gnulib/import/setenv.c: Update.
1110 * gnulib/import/signal.in.h: Update.
1111 * gnulib/import/stat-time.c: Update.
1112 * gnulib/import/stat-time.h: Update.
1113 * gnulib/import/stat-w32.c: Update.
1114 * gnulib/import/stat-w32.h: Update.
1115 * gnulib/import/stat.c: Update.
1116 * gnulib/import/stdbool.in.h: Update.
1117 * gnulib/import/stddef.in.h: Update.
1118 * gnulib/import/stdint.in.h: Update.
1119 * gnulib/import/stdio.in.h: Update.
1120 * gnulib/import/stdlib.in.h: Update.
1121 * gnulib/import/str-two-way.h: Update.
1122 * gnulib/import/strchrnul.c: Update.
1123 * gnulib/import/strdup.c: Update.
1124 * gnulib/import/streq.h: Update.
1125 * gnulib/import/strerror-override.c: Update.
1126 * gnulib/import/strerror-override.h: Update.
1127 * gnulib/import/strerror.c: Update.
1128 * gnulib/import/string.in.h: Update.
1129 * gnulib/import/stripslash.c: Update.
1130 * gnulib/import/strnlen1.c: Update.
1131 * gnulib/import/strnlen1.h: Update.
1132 * gnulib/import/strstr.c: Update.
1133 * gnulib/import/strtok_r.c: Update.
1134 * gnulib/import/sys_stat.in.h: Update.
1135 * gnulib/import/sys_time.in.h: Update.
1136 * gnulib/import/sys_types.in.h: Update.
1137 * gnulib/import/tempname.c: Update.
1138 * gnulib/import/tempname.h: Update.
1139 * gnulib/import/time.in.h: Update.
1140 * gnulib/import/unistd--.h: Update.
1141 * gnulib/import/unistd-safer.h: Update.
1142 * gnulib/import/unistd.in.h: Update.
1143 * gnulib/import/unsetenv.c: Update.
1144 * gnulib/import/verify.h: Update.
1145 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1146 * gnulib/import/wchar.in.h: Update.
1147 * gnulib/import/wctype.in.h: Update.
1148 * gnulib/import/xalloc-oversized.h: Update.
1149 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1150 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1152 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
1154 * record-btrace.c (get_thread_current_frame): Remove
1157 2018-09-10 Jerome Guitton <guitton@adacore.com>
1159 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1160 with check_tag to 1 if and only if the type is tagged and the
1161 component being searched cannot been found in the current
1162 view. Otherwise, always call ada_to_fixed_type with
1165 2018-09-10 Xavier Roirand <roirand@adacore.com>
1167 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1169 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1170 * ada-varobj.c (ada_varobj_get_number_of_children,
1171 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1173 2018-09-10 Xavier Roirand <roirand@adacore.com>
1175 * ada-valprint.c (ada_value_print): Use type instead of
1178 2018-09-10 Xavier Roirand <roirand@adacore.com>
1180 * ada-lang.c (ada_value_subscript): Handle case when parameter is
1181 an array of access to unconstrained array.
1183 2018-09-10 Xavier Roirand <roirand@adacore.com>
1185 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1186 (ada_check_typedef): Use it.
1188 2018-09-10 Xavier Roirand <roirand@adacore.com>
1190 * ada-varobj.c (ada_varobj_describe_struct_child)
1191 (ada_varobj_describe_child): Handle union case like struct one.
1193 2018-09-10 Tom Tromey <tom@tromey.com>
1196 * python/python.c (_initialize_python): Make example in "python"
1197 help work in Python 3.
1199 2018-09-10 Eli Zaretskii <eliz@gnu.org>
1201 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1202 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
1203 $(EXEEXT) to the script, as it is not a program.
1205 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
1207 * python/py-prettyprint.c (pretty_print_one_value): Return
1209 (print_string_repr): Adjust.
1210 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1211 * python/python-internal.h (apply_varobj_pretty_printer): Return
1213 * varobj.c (varobj_value_get_print_value): Adjust.
1215 2018-09-08 Tom Tromey <tom@tromey.com>
1218 * python/py-prettyprint.c (pretty_print_one_value): Check for
1221 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1223 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1224 replace_operator_with_call.
1226 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1228 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1230 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1232 * ada-typeprint.c (print_range): Print the bounds using TYPE
1233 rather than its TYPE_TARGET_TYPE.
1235 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1237 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1238 call to ada_to_fixed_value_create.
1240 2018-09-08 Jerome Guitton <guitton@adacore.com>
1242 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1244 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1246 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1249 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1251 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1252 Move update of loop variable "fi".
1254 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1256 * ada-lang.c (value_assign_to_component): In the case of
1257 big-endian targets, extract the bits of the given VAL
1258 using an src_offset of zero if container is not a scalar.
1260 2018-09-06 Simon Ser <contact@emersion.fr>
1263 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1264 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1265 * fbsd-tdep.c (fbsd_make_note_desc): New.
1266 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1267 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1268 * target.h (enum target_object) Add FreeBSD-specific
1269 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1271 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1273 * compile/compile-c.h (generate_c_for_variable_locations):
1274 Change reference to pointer.
1275 * compile/compile-c-support.c (compile_program) <compute>:
1277 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1278 (generate_c_for_for_one_variable): Likewise
1279 (generate_c_for_variable_locations): Likewise
1280 * compile/compile-c-types.c (compile_c_instance::convert_type):
1282 * compile/compile-cplus-symbols.c (convert_one_symbol):
1283 std::move the scope passed to enter_scope.
1284 * compile/compile-cplus-types.c
1285 (compile_cplus_instance::enter_scope): Make parameter
1287 (compile_cplus_instance::new_scope): Change reference to
1289 (compile_cplus_instance::convert_type): Likewise
1290 (compile_cplus_convert_typedef): std::move the scope passed to
1292 (compile_cplus_convert_struct_or_union): Likewise.
1293 (compile_cplus_convert_enum): Likewise.
1294 (compile_cplus_convert_namespace): Likewise.
1295 * compile/compile-cplus.h (compile_cplus_instance)
1296 <enter_scope>: Make parameter rvalue-reference.
1297 * compile/compile-internal.h (compile_instance)
1298 <get_cached_type>: Likewise
1299 * compile/compile-loc2c.c (push): Likewise
1303 (print_label): Likewise
1304 (pushf_register_address): Likewise
1305 (pushf_register): Likewise
1306 (do_compile_dwarf_expr_to_c): Likewise
1307 (compile_dwarf_expr_to_c): Likewise
1308 (compile_dwarf_bounds_to_c): Likewise
1309 * compile/compile.c (compile_instance::get_cached_type):
1311 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1312 (compile_dwarf_bounds_to_c): Likewise
1313 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1314 (dwarf2_compile_property_to_c): Likewise
1315 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1316 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1319 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1321 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1322 * tui/tui-data.c (init_content_element): Don't initialize it.
1324 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1326 * tui/tui-data.h (struct tui_win_info)
1327 <detail::opaque>: Remove.
1328 * tui/tui-data.c (init_win_info): Remove assignment.
1330 2018-09-05 Tom Tromey <tom@tromey.com>
1332 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1333 -Wformat-nonliteral.
1334 * target-float.c (host_float_ops<T>::to_string)
1335 (host_float_ops<T>::from_string): Use
1336 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1337 * configure: Rebuild.
1339 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
1341 * printcmd.c (printf_c_string): Use
1342 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1343 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1345 2018-09-05 Tom Tromey <tom@tromey.com>
1347 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1349 2018-09-05 Tom de Vries <tdevries@suse.de>
1351 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1352 with resolve_abstract_p == true.
1353 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1354 defaulting to false. Propagate resolve_abstract_p to
1355 dwarf2_fetch_die_loc_sect_off.
1356 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1357 parameter, defaulting to false.
1358 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1359 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1361 * dwarf2read.h (struct die_info): Forward-declare.
1362 (die_info_ptr): New typedef.
1363 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1365 2018-09-05 Joel Brobecker <brobecker@adacore.com>
1369 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
1370 Pedro Alves <palves@redhat.com>
1372 * gnulib/Makefile.in (aclocal_m4_deps): Move to
1373 "aclocal-m4-deps.mk". Include file here.
1374 $(srcdir)/aclocal.m4: Add "configure.ac".
1375 * gnulib/aclocal-m4-deps.mk: New file.
1376 * gnulib/update-gnulib.sh: Automatically update
1377 "aclocal-m4-deps.mk".
1379 2018-09-04 Tom Tromey <tom@tromey.com>
1381 * configure: Rebuild.
1382 * configure.ac: Remove multi-ice code.
1384 2018-09-04 Tom Tromey <tom@tromey.com>
1386 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1387 (ada-exp.o): Update.
1389 2018-09-04 Tom Tromey <tom@tromey.com>
1391 * Makefile.in (printcmd.o, target-float.o): Remove.
1392 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1394 2018-09-04 Tom Tromey <tom@tromey.com>
1396 * gnulib/Makefile.in: Remove obsolete comment.
1397 * Makefile.in: Remove obsolete comment.
1399 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
1401 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1404 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1406 * riscv-tdep.c: Add 'prologue-value.h' include.
1407 (struct riscv_unwind_cache): New struct.
1408 (riscv_debug_unwinder): New global.
1409 (riscv_scan_prologue): Update arguments, capture register details
1411 (riscv_skip_prologue): Reformat arguments line, move end of
1412 prologue calculation into riscv_scan_prologue.
1413 (riscv_frame_cache): Update return type, create
1414 riscv_unwind_cache, scan the prologue, and fill in remaining cache
1416 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1417 (riscv_frame_prev_register): Use the trad_frame within the
1419 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1422 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1424 * trad-frame.h (trad_frame_set_realreg): Declare.
1425 (trad_frame_set_addr): Declare.
1426 * trad-frame.c (trad_frame_set_realreg): Define new function.
1427 (trad_frame_set_addr): Define new function.
1428 (trad_frame_set_reg_realreg): Use new function.
1429 (trad_frame_set_reg_addr): Use new function.
1431 2018-09-01 Keith Seitz <keiths@redhat.com>
1433 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1434 pulongest instead of "%lld".
1435 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1438 2018-08-31 Tom Tromey <tom@tromey.com>
1440 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1443 2018-08-31 Pedro Alves <palves@redhat.com>
1445 * gdbarch.h: Regenerate.
1447 2018-08-31 Pedro Alves <palves@redhat.com>
1449 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1450 * target.h (Hardware watchpoint interfaces): Describe
1451 continuable/steppable/non-steppable watchpoints.
1452 * gdbarch.h, gdbarch.c: Regenerate.
1454 2018-08-31 Pedro Alves <palves@redhat.com>
1456 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1459 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1460 * target.h (target_ops::have_continuable_watchpoint): Delete.
1461 (target_have_continuable_watchpoint): Delete.
1462 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1463 * target-delegates.c: Regenerate.
1465 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1467 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1468 the files present in "gnulib/import/m4/".
1470 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1472 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1473 c.sw, c.swsp, and c.sdsp.
1475 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1477 * riscv-tdep.c (struct riscv_inferior_data): Delete.
1478 (riscv_read_misa_reg): Don't cache value read into inferior data.
1479 (riscv_new_inferior_data): Delete.
1480 (riscv_inferior_data_cleanup): Delete.
1481 (riscv_inferior_data): Delete.
1482 (riscv_invalidate_inferior_data): Delete.
1483 (_initialize_riscv_tdep): Remove initialisation of inferior data.
1485 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
1487 * compile/compile-cplus-types.c
1488 (compile_cplus_instance::leave_scope): Take the address of scope
1490 (compile_cplus_instance::convert_qualified_base): Compare quals
1493 2018-08-30 Keith Seitz <keiths@redhat.com>
1495 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1496 Use "%s" and host_address_to_string instead of "%p" in printf.
1498 2018-08-29 Keith Seitz <keiths@redhat.com>
1500 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1501 and compile-cplus-types.c.
1502 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1503 * c-lang.c (cplus_language_defn): Set C++ compile functions.
1504 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1506 * compile/compile-c-support.c: Include compile-cplus.h.
1507 (load_libcompile): Templatize.
1508 (get_compile_context): "New" function.
1509 (c_get_compile_context): Use get_compile_context.
1510 (cplus_get_compile_context): New function.
1511 (cplus_push_user_expression, cplus_pop_user_expression)
1512 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1513 (cplus_compute_program): Define new structs/functions.
1514 * compile/compile-cplus-symmbols.c: New file.
1515 * compile/compile-cplus-types.c: New file.
1516 * compile/compile-cplus.h: New file.
1517 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1519 * compile/compile-object-load.c (get_out_value_type): Use
1520 strncmp_iw when comparing symbol names.
1521 (compile_object_load): Add mst_bss and mst_data.
1522 * compile/compile.c (_initialize_compile): Remove
1523 -Wno-implicit-function-declaration from `compile_args'.
1524 * compile/gcc-cp-plugin.h: New file.
1525 * NEWS: Mention C++ compile support and new debug options.
1527 2018-08-29 Keith Seitz <keiths@redhat.com>
1529 * linespec.c (collect_info::add_symbol): Make virtual.
1530 (struct symbol_searcher_collect_info): New struct.
1531 (symbol_searcher::find_all_symbols): New method.
1532 * symtab.h (class symbol_searcher): New class.
1534 2018-08-29 Keith Seitz <keiths@redhat.com>
1536 * linespec.c (struct linespec) <function_symbols, label_symbols>:
1537 Change to vector of block_symbol. Update all users.
1538 (struct collect_info) <symbols>: Likewise.
1539 (collect_info::add_symbol): Take block_symbol as argument.
1541 (decode_compound_collector) <m_symbols>: Change type to vector
1542 of block_symbol. Update all users.
1543 (decode_compound_collector::operator ()): Change parameter type
1545 (find_method, find_function_symbols, find_linespec_symbols)
1546 (find_label_symbols_in_block, find_label_symbols): Change symbol
1547 vectors to block_symbol vectors.
1548 * symtab.h (symbol_found_callback_ftype): Change parameter type to
1551 2018-08-29 Keith Seitz <keiths@redhat.com>
1553 * linespec.c (symbolp): Remove typedef and VEC definitions.
1554 (bound_minimal_symbol_d): Likewise.
1556 2018-08-29 Keith Seitz <keiths@redhat.com>
1558 * linespec.c (decode_compound_collector::decode_compound_collector):
1559 Remove initialization for `m_symtabs'.
1560 (decode_compound_collector::release_symbols): Change return type
1561 to std::vector. Update all callers.
1562 (class decode_compound_collector) <m_symbols>: Change type to
1564 (lookup_prefix_sym): Change return type to std::vector. Update all
1566 (compare_symbols): Remove.
1567 (std_compare_symbols): Rename to `compare_symbols'.
1568 (find_method): Change `sym_classes' parameter to std::vector.
1569 Update all callers. Use std::sort to sort sym_classes.
1570 (find_linespec_symbols): Remove cleanup.
1572 2018-08-29 Keith Seitz <keiths@redhat.com>
1574 * linespec.c (struct linespec) <minimal_symbols>: Change type to
1575 std::vector. Update all users.
1576 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1577 (struct collect_info) <minimal_symbols>: Likewise.
1578 (compare_msymbols): Return bool. Change parameters to const
1579 bound_minimal_symbol references.
1580 (find_method, find_function_symbols, find_linespec_symbols): Change
1581 `minsyms' parameter to std::vector. Update all callers.
1583 2018-08-29 Keith Seitz <keiths@redhat.com>
1585 * linespec.c (struct linespec) <label_symbols>: Change type to
1586 std::vector. Update all users.
1587 (find_label_symbols_in_block): Change `result' parameter to
1588 std::vector. Update all callers.
1589 (find_label_symbols): Return std::vector. Update all callers.
1591 2018-08-29 Keith Seitz <keiths@redhat.com>
1593 * linespec.c (struct linespec) <function_symbols>: Change type to
1594 std::vector. Update all users.
1595 (struct collect_info) <function_symbols>: Likewise.
1596 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1597 (std_compare_symbols): New function.
1598 (find_method, find_function_symbols, find_linespec_symbols)
1599 (find_label_symbols_in_block): Change `symbols' parameter to
1600 std::vector. Update all callers.
1601 (find_label_symbols): Likewise for `function_symbols' and
1604 2018-08-29 Keith Seitz <keiths@redhat.com>
1606 * linespec.c (symtab_vector_up): Define.
1607 (struct linespec) <file_symtabs>: Change type to std::vector *.
1609 (struct collect_info) <file_symtabs>: Likewise.
1610 (collect_symtabs_from_filename): Return symtab_vector_up.
1612 (decode_objc): Remove cleanup.
1613 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1614 (symtab_collector::release_symtabs): Return symtab_vector_up.
1616 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1618 (collect_symtabs_from_filename, symtabs_from_filename): Return
1619 symtab_vector_up. Update all callers.
1621 2018-08-29 Tom Tromey <tom@tromey.com>
1623 * csky-tdep.c (csky_analyze_prologue): Use
1624 core_addr_to_string_nz.
1626 2018-08-29 Tom Tromey <tom@tromey.com>
1628 * windows-nat.c (struct xlate_exception) <them>: Change type to
1630 (xlate): Fix formatting. Remove last entry.
1631 (struct xlate_exception, xlate): Comment out.
1632 (windows_nat_target::resume): Use ranged for.
1634 2018-08-29 Jim Wilson <jimw@sifive.com>
1636 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1637 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1639 (riscv_linux_nat_target::store_registers): Likewise.
1641 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1645 * gnulib/aclocal.m4: Regenerate.
1646 * gnulib/config.in: Regenerate.
1647 * gnulib/configure: Regenerate.
1648 * gnulib/import/Makefile.am: Update.
1649 * gnulib/import/Makefile.in: Update.
1650 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1651 * gnulib/import/_Noreturn.h: ... this.
1652 * gnulib/import/alloca.in.h: Update.
1653 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1654 * gnulib/import/arg-nonnull.h: ... this.
1655 * gnulib/import/assure.h: Update.
1656 * gnulib/import/at-func.c: Update.
1657 * gnulib/import/basename-lgpl.c: Update.
1658 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1659 * gnulib/import/c++defs.h: ... this.
1660 * gnulib/import/canonicalize-lgpl.c: Update.
1661 * gnulib/import/cdefs.h: Update.
1662 * gnulib/import/chdir-long.c: Update.
1663 * gnulib/import/chdir-long.h: Update.
1664 * gnulib/import/cloexec.c: Update.
1665 * gnulib/import/cloexec.h: Update.
1666 * gnulib/import/close.c: Update.
1667 * gnulib/import/closedir.c: Update.
1668 * gnulib/import/config.charset: Update.
1669 * gnulib/import/dirent-private.h: Update.
1670 * gnulib/import/dirent.in.h: Update.
1671 * gnulib/import/dirfd.c: Update.
1672 * gnulib/import/dirname-lgpl.c: Update.
1673 * gnulib/import/dirname.h: Update.
1674 * gnulib/import/dosname.h: Update.
1675 * gnulib/import/dup-safer-flag.c: Update.
1676 * gnulib/import/dup-safer.c: Update.
1677 * gnulib/import/dup.c: Update.
1678 * gnulib/import/dup2.c: Update.
1679 * gnulib/import/errno.in.h: Update.
1680 * gnulib/import/error.c: Update.
1681 * gnulib/import/error.h: Update.
1682 * gnulib/import/exitfail.c: Update.
1683 * gnulib/import/exitfail.h: Update.
1684 * gnulib/import/extra/update-copyright: Update.
1685 * gnulib/import/fchdir.c: Update.
1686 * gnulib/import/fcntl.c: Update.
1687 * gnulib/import/fcntl.in.h: Update.
1688 * gnulib/import/fd-hook.c: Update.
1689 * gnulib/import/fd-hook.h: Update.
1690 * gnulib/import/fd-safer-flag.c: Update.
1691 * gnulib/import/fd-safer.c: Update.
1692 * gnulib/import/fdopendir.c: Update.
1693 * gnulib/import/filename.h: Update.
1694 * gnulib/import/filenamecat-lgpl.c: Update.
1695 * gnulib/import/filenamecat.h: Update.
1696 * gnulib/import/flexmember.h: Update.
1697 * gnulib/import/float+.h: Update.
1698 * gnulib/import/float.c: Update.
1699 * gnulib/import/float.in.h: Update.
1700 * gnulib/import/fnmatch.c: Update.
1701 * gnulib/import/fnmatch.in.h: Update.
1702 * gnulib/import/fnmatch_loop.c: Update.
1703 * gnulib/import/fpucw.h: Update.
1704 * gnulib/import/frexp.c: Update.
1705 * gnulib/import/frexpl.c: Update.
1706 * gnulib/import/fstat.c: Update.
1707 * gnulib/import/fstatat.c: Update.
1708 * gnulib/import/getcwd-lgpl.c: Update.
1709 * gnulib/import/getcwd.c: Update.
1710 * gnulib/import/getdtablesize.c: Update.
1711 * gnulib/import/getlogin_r.c: Update.
1712 * gnulib/import/getprogname.c: Update.
1713 * gnulib/import/getprogname.h: Update.
1714 * gnulib/import/gettext.h: Update.
1715 * gnulib/import/gettimeofday.c: Update.
1716 * gnulib/import/glob-libc.h: Update.
1717 * gnulib/import/glob.c: Update.
1718 * gnulib/import/glob.in.h: Update.
1719 * gnulib/import/glob_internal.h: Update.
1720 * gnulib/import/glob_pattern_p.c: Update.
1721 * gnulib/import/globfree.c: Update.
1722 * gnulib/import/hard-locale.c: Update.
1723 * gnulib/import/hard-locale.h: Update.
1724 * gnulib/import/intprops.h: Update.
1725 * gnulib/import/inttypes.in.h: Update.
1726 * gnulib/import/isnan.c: Update.
1727 * gnulib/import/isnand-nolibm.h: Update.
1728 * gnulib/import/isnand.c: Update.
1729 * gnulib/import/isnanl-nolibm.h: Update.
1730 * gnulib/import/isnanl.c: Update.
1731 * gnulib/import/itold.c: Update.
1732 * gnulib/import/libc-config.h: Update.
1733 * gnulib/import/limits.in.h: Update.
1734 * gnulib/import/localcharset.c: Update.
1735 * gnulib/import/localcharset.h: Update.
1736 * gnulib/import/localtime-buffer.c: Update.
1737 * gnulib/import/localtime-buffer.h: Update.
1738 * gnulib/import/lstat.c: Update.
1739 * gnulib/import/m4/00gnulib.m4: Update.
1740 * gnulib/import/m4/__inline.m4: Update.
1741 * gnulib/import/m4/absolute-header.m4: Update.
1742 * gnulib/import/m4/alloca.m4: Update.
1743 * gnulib/import/m4/builtin-expect.m4: Update.
1744 * gnulib/import/m4/canonicalize.m4: Update.
1745 * gnulib/import/m4/chdir-long.m4: Update.
1746 * gnulib/import/m4/close.m4: Update.
1747 * gnulib/import/m4/closedir.m4: Update.
1748 * gnulib/import/m4/configmake.m4: Update.
1749 * gnulib/import/m4/d-ino.m4: Update.
1750 * gnulib/import/m4/d-type.m4: Update.
1751 * gnulib/import/m4/dirent_h.m4: Update.
1752 * gnulib/import/m4/dirfd.m4: Update.
1753 * gnulib/import/m4/dirname.m4: Update.
1754 * gnulib/import/m4/double-slash-root.m4: Update.
1755 * gnulib/import/m4/dup.m4: Update.
1756 * gnulib/import/m4/dup2.m4: Update.
1757 * gnulib/import/m4/eealloc.m4: Update.
1758 * gnulib/import/m4/environ.m4: Update.
1759 * gnulib/import/m4/errno_h.m4: Update.
1760 * gnulib/import/m4/error.m4: Update.
1761 * gnulib/import/m4/exponentd.m4: Update.
1762 * gnulib/import/m4/exponentl.m4: Update.
1763 * gnulib/import/m4/extensions.m4: Update.
1764 * gnulib/import/m4/extern-inline.m4: Update.
1765 * gnulib/import/m4/fchdir.m4: Update.
1766 * gnulib/import/m4/fcntl-o.m4: Update.
1767 * gnulib/import/m4/fcntl.m4: Update.
1768 * gnulib/import/m4/fcntl_h.m4: Update.
1769 * gnulib/import/m4/fdopendir.m4: Update.
1770 * gnulib/import/m4/filenamecat.m4: Update.
1771 * gnulib/import/m4/flexmember.m4: Update.
1772 * gnulib/import/m4/float_h.m4: Update.
1773 * gnulib/import/m4/fnmatch.m4: Update.
1774 * gnulib/import/m4/fnmatch_h.m4: Update.
1775 * gnulib/import/m4/fpieee.m4: Update.
1776 * gnulib/import/m4/frexp.m4: Update.
1777 * gnulib/import/m4/frexpl.m4: Update.
1778 * gnulib/import/m4/fstat.m4: Update.
1779 * gnulib/import/m4/fstatat.m4: Update.
1780 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1781 * gnulib/import/m4/getcwd-path-max.m4: Update.
1782 * gnulib/import/m4/getcwd.m4: Update.
1783 * gnulib/import/m4/getdtablesize.m4: Update.
1784 * gnulib/import/m4/getlogin.m4: Update.
1785 * gnulib/import/m4/getlogin_r.m4: Update.
1786 * gnulib/import/m4/getpagesize.m4: Update.
1787 * gnulib/import/m4/getprogname.m4: Update.
1788 * gnulib/import/m4/gettimeofday.m4: Update.
1789 * gnulib/import/m4/glibc21.m4: Update.
1790 * gnulib/import/m4/glob.m4: Update.
1791 * gnulib/import/m4/glob_h.m4: Update.
1792 * gnulib/import/m4/gnulib-cache.m4: Update.
1793 * gnulib/import/m4/gnulib-common.m4: Update.
1794 * gnulib/import/m4/gnulib-comp.m4: Update.
1795 * gnulib/import/m4/gnulib-tool.m4: Update.
1796 * gnulib/import/m4/hard-locale.m4: Update.
1797 * gnulib/import/m4/include_next.m4: Update.
1798 * gnulib/import/m4/inttypes-pri.m4: Update.
1799 * gnulib/import/m4/inttypes.m4: Update.
1800 * gnulib/import/m4/isnand.m4: Update.
1801 * gnulib/import/m4/isnanl.m4: Update.
1802 * gnulib/import/m4/largefile.m4: Update.
1803 * gnulib/import/m4/limits-h.m4: Update.
1804 * gnulib/import/m4/localcharset.m4: Update.
1805 * gnulib/import/m4/locale-fr.m4: Update.
1806 * gnulib/import/m4/locale-ja.m4: Update.
1807 * gnulib/import/m4/locale-zh.m4: Update.
1808 * gnulib/import/m4/localtime-buffer.m4: Update.
1809 * gnulib/import/m4/longlong.m4: Update.
1810 * gnulib/import/m4/lstat.m4: Update.
1811 * gnulib/import/m4/malloc.m4: Update.
1812 * gnulib/import/m4/malloca.m4: Update.
1813 * gnulib/import/m4/math_h.m4: Update.
1814 * gnulib/import/m4/mbrtowc.m4: Update.
1815 * gnulib/import/m4/mbsinit.m4: Update.
1816 * gnulib/import/m4/mbsrtowcs.m4: Update.
1817 * gnulib/import/m4/mbstate_t.m4: Update.
1818 * gnulib/import/m4/memchr.m4: Update.
1819 * gnulib/import/m4/memmem.m4: Update.
1820 * gnulib/import/m4/mempcpy.m4: Update.
1821 * gnulib/import/m4/memrchr.m4: Update.
1822 * gnulib/import/m4/mkdir.m4: Update.
1823 * gnulib/import/m4/mkstemp.m4: Update.
1824 * gnulib/import/m4/mmap-anon.m4: Update.
1825 * gnulib/import/m4/mode_t.m4: Update.
1826 * gnulib/import/m4/msvc-inval.m4: Update.
1827 * gnulib/import/m4/msvc-nothrow.m4: Update.
1828 * gnulib/import/m4/multiarch.m4: Update.
1829 * gnulib/import/m4/nocrash.m4: Update.
1830 * gnulib/import/m4/off_t.m4: Update.
1831 * gnulib/import/m4/onceonly.m4: Update.
1832 * gnulib/import/m4/open-cloexec.m4: Update.
1833 * gnulib/import/m4/open.m4: Update.
1834 * gnulib/import/m4/openat.m4: Update.
1835 * gnulib/import/m4/opendir.m4: Update.
1836 * gnulib/import/m4/pathmax.m4: Update.
1837 * gnulib/import/m4/rawmemchr.m4: Update.
1838 * gnulib/import/m4/readdir.m4: Update.
1839 * gnulib/import/m4/readlink.m4: Update.
1840 * gnulib/import/m4/realloc.m4: Update.
1841 * gnulib/import/m4/rename.m4: Update.
1842 * gnulib/import/m4/rewinddir.m4: Update.
1843 * gnulib/import/m4/rmdir.m4: Update.
1844 * gnulib/import/m4/save-cwd.m4: Update.
1845 * gnulib/import/m4/secure_getenv.m4: Update.
1846 * gnulib/import/m4/setenv.m4: Update.
1847 * gnulib/import/m4/signal_h.m4: Update.
1848 * gnulib/import/m4/ssize_t.m4: Update.
1849 * gnulib/import/m4/stat-time.m4: Update.
1850 * gnulib/import/m4/stat.m4: Update.
1851 * gnulib/import/m4/std-gnu11.m4: Update.
1852 * gnulib/import/m4/stdbool.m4: Update.
1853 * gnulib/import/m4/stddef_h.m4: Update.
1854 * gnulib/import/m4/stdint.m4: Update.
1855 * gnulib/import/m4/stdio_h.m4: Update.
1856 * gnulib/import/m4/stdlib_h.m4: Update.
1857 * gnulib/import/m4/strchrnul.m4: Update.
1858 * gnulib/import/m4/strdup.m4: Update.
1859 * gnulib/import/m4/strerror.m4: Update.
1860 * gnulib/import/m4/string_h.m4: Update.
1861 * gnulib/import/m4/strstr.m4: Update.
1862 * gnulib/import/m4/strtok_r.m4: Update.
1863 * gnulib/import/m4/sys_socket_h.m4: Update.
1864 * gnulib/import/m4/sys_stat_h.m4: Update.
1865 * gnulib/import/m4/sys_time_h.m4: Update.
1866 * gnulib/import/m4/sys_types_h.m4: Update.
1867 * gnulib/import/m4/tempname.m4: Update.
1868 * gnulib/import/m4/time_h.m4: Update.
1869 * gnulib/import/m4/unistd-safer.m4: Update.
1870 * gnulib/import/m4/unistd_h.m4: Update.
1871 * gnulib/import/m4/warn-on-use.m4: Update.
1872 * gnulib/import/m4/wchar_h.m4: Update.
1873 * gnulib/import/m4/wchar_t.m4: Update.
1874 * gnulib/import/m4/wctype_h.m4: Update.
1875 * gnulib/import/m4/wint_t.m4: Update.
1876 * gnulib/import/malloc.c: Update.
1877 * gnulib/import/malloc/scratch_buffer.h: Update.
1878 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1879 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1880 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1881 * gnulib/import/malloca.c: Update.
1882 * gnulib/import/malloca.h: Update.
1883 * gnulib/import/malloca.valgrind: Update.
1884 * gnulib/import/math.in.h: Update.
1885 * gnulib/import/mbrtowc.c: Update.
1886 * gnulib/import/mbsinit.c: Update.
1887 * gnulib/import/mbsrtowcs-impl.h: Update.
1888 * gnulib/import/mbsrtowcs-state.c: Update.
1889 * gnulib/import/mbsrtowcs.c: Update.
1890 * gnulib/import/memchr.c: Update.
1891 * gnulib/import/memmem.c: Update.
1892 * gnulib/import/mempcpy.c: Update.
1893 * gnulib/import/memrchr.c: Update.
1894 * gnulib/import/mkdir.c: Update.
1895 * gnulib/import/mkstemp.c: Update.
1896 * gnulib/import/msvc-inval.c: Update.
1897 * gnulib/import/msvc-inval.h: Update.
1898 * gnulib/import/msvc-nothrow.c: Update.
1899 * gnulib/import/msvc-nothrow.h: Update.
1900 * gnulib/import/open.c: Update.
1901 * gnulib/import/openat-die.c: Update.
1902 * gnulib/import/openat-priv.h: Update.
1903 * gnulib/import/openat-proc.c: Update.
1904 * gnulib/import/openat.c: Update.
1905 * gnulib/import/openat.h: Update.
1906 * gnulib/import/opendir.c: Update.
1907 * gnulib/import/pathmax.h: Update.
1908 * gnulib/import/pipe-safer.c: Update.
1909 * gnulib/import/rawmemchr.c: Update.
1910 * gnulib/import/readdir.c: Update.
1911 * gnulib/import/readlink.c: Update.
1912 * gnulib/import/realloc.c: Update.
1913 * gnulib/import/ref-add.sin: Update.
1914 * gnulib/import/ref-del.sin: Update.
1915 * gnulib/import/rename.c: Update.
1916 * gnulib/import/rewinddir.c: Update.
1917 * gnulib/import/rmdir.c: Update.
1918 * gnulib/import/same-inode.h: Update.
1919 * gnulib/import/save-cwd.c: Update.
1920 * gnulib/import/save-cwd.h: Update.
1921 * gnulib/import/scratch_buffer.h: Update.
1922 * gnulib/import/secure_getenv.c: Update.
1923 * gnulib/import/setenv.c: Update.
1924 * gnulib/import/signal.in.h: Update.
1925 * gnulib/import/stat-time.c: Update.
1926 * gnulib/import/stat-time.h: Update.
1927 * gnulib/import/stat-w32.c: Update.
1928 * gnulib/import/stat-w32.h: Update.
1929 * gnulib/import/stat.c: Update.
1930 * gnulib/import/stdbool.in.h: Update.
1931 * gnulib/import/stddef.in.h: Update.
1932 * gnulib/import/stdint.in.h: Update.
1933 * gnulib/import/stdio.in.h: Update.
1934 * gnulib/import/stdlib.in.h: Update.
1935 * gnulib/import/str-two-way.h: Update.
1936 * gnulib/import/strchrnul.c: Update.
1937 * gnulib/import/strdup.c: Update.
1938 * gnulib/import/streq.h: Update.
1939 * gnulib/import/strerror-override.c: Update.
1940 * gnulib/import/strerror-override.h: Update.
1941 * gnulib/import/strerror.c: Update.
1942 * gnulib/import/string.in.h: Update.
1943 * gnulib/import/stripslash.c: Update.
1944 * gnulib/import/strnlen1.c: Update.
1945 * gnulib/import/strnlen1.h: Update.
1946 * gnulib/import/strstr.c: Update.
1947 * gnulib/import/strtok_r.c: Update.
1948 * gnulib/import/sys_stat.in.h: Update.
1949 * gnulib/import/sys_time.in.h: Update.
1950 * gnulib/import/sys_types.in.h: Update.
1951 * gnulib/import/tempname.c: Update.
1952 * gnulib/import/tempname.h: Update.
1953 * gnulib/import/time.in.h: Update.
1954 * gnulib/import/unistd--.h: Update.
1955 * gnulib/import/unistd-safer.h: Update.
1956 * gnulib/import/unistd.in.h: Update.
1957 * gnulib/import/unsetenv.c: Update.
1958 * gnulib/import/verify.h: Update.
1959 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1960 * gnulib/import/wchar.in.h: Update.
1961 * gnulib/import/wctype.in.h: Update.
1962 * gnulib/import/xalloc-oversized.h: Update.
1963 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1964 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1966 2018-08-16 Gary Benson <gbenson@redhat.com>
1969 * gdb/main.c (captured_main_1): Exit with nonzero status
1970 in batch mode if the last command to be executed failed.
1971 * NEWS: Mention the above.
1973 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
1975 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1976 end of warning message.
1978 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1981 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1982 (aarch64_extract_return_value): Use
1983 aapcs_is_vfp_call_or_return_candidate.
1984 (aarch64_return_in_memory): Likewise.
1985 (aarch64_store_return_value): Likewise.
1987 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1990 (aapcs_is_vfp_call_or_return_candidate): Make static
1991 (pass_in_v_or_stack): Remove function.
1992 (pass_in_v_vfp_candidate): New function.
1993 (aarch64_push_dummy_call): Check for float register candidates.
1995 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1997 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1998 (aapcs_is_vfp_call_or_return_candidate_1): New function.
1999 (aapcs_is_vfp_call_or_return_candidate): Likewise.
2001 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2004 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2005 (struct ipa_sym_addresses): Rename to...
2006 (struct ipa_sym_addresses_common): ... this.
2007 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2009 2018-08-28 Tom Tromey <tom@tromey.com>
2011 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2012 (token_fifo): Now a std::vector.
2013 (yylex, c_parse): Update.
2014 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2015 (token_fifo): Now a std::vector.
2016 (yylex, d_parse): Update.
2017 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2018 (token_fifo): Now a std::vector.
2019 (yylex, go_parse): Update.
2021 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
2023 * parser-defs.h (struct type_stack) <elements>: Change type to
2024 std::vector<union type_stack_elt>.
2025 <depth, size>: Remove.
2026 * parse.c (parse_exp_in_context_1): Adjust.
2027 (type_stack_reserve): Remove.
2028 (check_type_stack_depth): Remove.
2029 (insert_into_type_stack): Adjust to std::vector.
2030 (insert_type): Likewise.
2031 (push_type): Likewise.
2032 (push_type_int): Likewise.
2033 (insert_type_address_space): Likewise.
2034 (pop_type): Likewise.
2035 (pop_type_int): Likewise.
2036 (pop_typelist): Likewise.
2037 (pop_type_stack): Likewise.
2038 (append_type_stack): Likewise.
2039 (push_type_stack): Likewise.
2040 (get_type_stack): Likewise.
2041 (type_stack_cleanup): Likewise.
2042 (push_typelist): Likewise.
2043 (follow_types): Likewise.
2044 (_initialize_parse): Likewise.
2046 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
2048 * NEWS: Mention csky target.
2050 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
2051 Hafiz Abid Qadeer <abidh@codesourcery.com>
2052 Don Breazeal <donb@codesourcery.com>
2054 * csky-linux-tdep.c: New file.
2055 * csky-tdep.c: Likewise.
2056 * csky-tdep.h: Likewise.
2057 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2059 (HFILES_NO_SRCDIR): Add csky-tdep.h.
2060 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2061 * configure.tgt: Add csky support.
2063 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
2065 * python/py-framefilter.c (py_print_frame): Print frame architecture
2066 when printing on an MI output.
2068 2018-08-27 Tom Tromey <tom@tromey.com>
2071 * configure: Rebuild.
2072 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2074 2018-08-27 Tom Tromey <tom@tromey.com>
2076 * aarch64-linux-tdep.c
2077 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2080 2018-08-27 Tom Tromey <tom@tromey.com>
2082 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2084 (ppc64_standard_linkage1, ppc64_standard_linkage2)
2085 (ppc64_standard_linkage3, ppc64_standard_linkage4)
2086 (ppc64_standard_linkage5, ppc64_standard_linkage6)
2087 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2090 2018-08-27 Tom Tromey <tom@tromey.com>
2092 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2093 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2095 2018-08-27 Tom Tromey <tom@tromey.com>
2097 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2098 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2100 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2102 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2104 * sparc-linux-tdep.c (sparc32_linux_sigframe)
2105 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2106 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2108 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2109 (ppc64_linux_sigaction_tramp_frame)
2110 (ppc32_linux_sighandler_tramp_frame)
2111 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2112 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2113 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2114 * mn10300-linux-tdep.c (am33_linux_sigframe)
2115 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2116 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2117 * mips-linux-tdep.c (mips_linux_o32_sigframe)
2118 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2119 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2120 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2121 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2122 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2123 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2124 * microblaze-linux-tdep.c
2125 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2126 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2127 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2128 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2129 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2130 * common/common-types.h (ULONGEST_MAX): New define.
2131 (CORE_ADDR_MAX): Fix formatting.
2132 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2133 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2134 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2135 (arm_linux_rt_sigreturn_tramp_frame)
2136 (arm_eabi_linux_sigreturn_tramp_frame)
2137 (arm_eabi_linux_rt_sigreturn_tramp_frame)
2138 (thumb2_eabi_linux_sigreturn_tramp_frame)
2139 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2140 (arm_linux_restart_syscall_tramp_frame)
2141 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2142 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2143 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2145 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2147 2018-08-27 Tom Tromey <tom@tromey.com>
2149 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2151 * mips-tdep.c (mips_deal_with_atomic_sequence)
2152 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2153 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2154 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2155 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2157 * aarch64-tdep.c (aarch64_software_single_step): Use
2160 2018-08-27 Tom Tromey <tom@tromey.com>
2162 * linespec.c (complete_linespec_component): Add cast to "char".
2163 * completer.c (completion_tracker::build_completion_result): Add
2166 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2168 * solist.h (struct solist, struct target_so_ops): Fix
2171 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2173 * ada-tasks.c (ada_task_info_s): Remove typedef.
2174 (DEF_VEC_O(ada_task_info_s)): Remove.
2175 (struct ada_tasks_inferior_data): Initialize fields.
2176 <task_list>: Make an std::vector.
2177 (get_ada_tasks_inferior_data): Allocate with new.
2178 (ada_get_task_number): Adjust.
2179 (get_task_number_from_id): Likewise.
2180 (valid_task_id): Likewise.
2181 (ada_get_task_info_from_ptid): Likewise.
2182 (iterate_over_live_ada_tasks): Likewise.
2183 (add_ada_task): Likewise.
2184 (read_known_tasks): Likewise.
2185 (ada_build_task_list): Likewise.
2186 (print_ada_task_info): Likewise.
2187 (info_task): Likewise.
2188 (task_command_1): Likewise.
2190 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2192 * ada-lang.c (add_angle_brackets): Return std::string.
2194 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
2196 * python/py-threadevent.c (py_get_event_thread): Initialize
2199 2018-08-24 Pedro Alves <palves@redhat.com>
2201 * python/py-bpevent.c (create_breakpoint_event_object): Use
2202 copy-initialization.
2203 * python/py-continueevent.c (emit_continue_event): Use
2204 copy-initialization.
2205 * python/py-exitedevent.c (create_exited_event_object): Return a
2207 (emit_exited_event): Use copy-initialization.
2208 * python/py-inferior.c (python_new_inferior)
2209 (python_inferior_deleted, add_thread_object): Use
2210 copy-initialization.
2211 * python/py-infevents.c (create_inferior_call_event_object)
2212 (create_register_changed_event_object)
2213 (create_memory_changed_event_object): Return a gdbpy_ref<>.
2214 (emit_inferior_call_event, emit_memory_changed_event)
2215 (emit_register_changed_event): Use copy-initialization.
2216 * python/py-newobjfileevent.c (create_new_objfile_event_object):
2217 Return a gdbpy_ref<>.
2218 (emit_new_objfile_event): Use copy-initialization.
2219 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2220 (emit_clear_objfiles_event): Use copy-initialization.
2221 * python/py-signalevent.c (create_signal_event_object): Use
2222 copy-initialization.
2223 * python/py-threadevent.c (create_thread_event_object): Use
2224 copy-initialization.
2226 2018-08-24 Pedro Alves <palves@redhat.com>
2227 Simon Marchi <simon.marchi@ericsson.com>
2230 * python/py-continueevent.c: Include "gdbthread.h".
2231 (create_continue_event_object): Add intro comment. Add 'ptid'
2232 parameter. Use it to find thread to pass to
2233 create_thread_event_object.
2234 (emit_continue_event): Pass PTID down to
2235 create_continue_event_object.
2236 * python/py-event.h (py_get_event_thread): Declare.
2237 (create_thread_event_object): Remove default from 'thread'
2239 * python/py-stopevent.c (create_stop_event_object): Use
2240 py_get_event_thread.
2241 * python/py-threadevent.c (get_event_thread): Rename to ...
2242 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2243 and use it to find the thread.
2244 (create_thread_event_object): Assert that THREAD isn't null.
2245 Don't find the event thread here.
2247 2018-08-23 Kevin Buettner <kevinb@redhat.com>
2249 * block.h (blockrange, blockranges): New struct declarations.
2250 (struct block): Add new field named `ranges'.
2251 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2252 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2253 macros for accessing ranges in struct block.
2254 (make_blockranges): New declaration.
2255 block.c (make_blockranges): New function.
2256 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2258 * symtab.h (find_pc_partial_function): Add new parameter `block'.
2259 * blockframe.c (cache_pc_function_block): New static global.
2260 (clear_pc_function_cache): Clear cache_pc_function_block.
2261 (find_pc_partial_function): Move comment to symtab.h. Add
2262 support for non-contiguous blocks.
2263 * cli/cli-cmds.c (block.h): Include.
2264 (print_disassembly): Handle printing of non-contiguous blocks.
2265 (disassemble_current_function): Likewise.
2266 (disassemble_command): Likewise.
2268 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2270 * blockframe.c (get_pc_function_start): Likewise.
2271 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2272 (gcc_symbol_address): Likewise.
2273 * compile/compile-object-run.c (compile_object_run): Likewise.
2274 * compile/compile.c (get_expr_block_and_pc): Likewise.
2275 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2276 (func_addr_to_tail_call_list): Likewise.
2277 * findvar.c (default_read_var_value): Likewise.
2278 * inline-frame.c (inline_frame_this_id): Likewise.
2279 (skip-inline_frames): Likewise.
2280 * infcmd.c (until_next_command): Likewise.
2281 * linespec.c (convert_linespec_to_sals): Likewise.
2282 * parse.c (parse_exp_in_context_1): Likewise.
2283 * printcmd.c (build_address_symbolic): likewise.
2284 (info_address_command): Likewise.
2285 symtab.c (find_function_start_sal): Likewise.
2286 (skip_prologue_sal): Likewise.
2287 (find_function_alias_target): Likewise.
2288 (find_gnu_ifunc): Likewise.
2289 * stack.c (find_frame_funname): Likewise.
2290 * symtab.c (fixup_symbol_section): Likewise.
2291 (find_function_start_sal): Likewise.
2292 (skip_prologue_sal): Likewsie.
2293 (find_function_alias_target): Likewise.
2294 (find_gnu_ifunc): Likewise.
2295 * tracepoint.c (info_scope_command): Likewise.
2296 * value.c (value_fn_field): Likewise.
2298 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2299 in place of find_pc_partial_function.
2300 * blockframe.c (find_function_entry_range_from_pc): New function.
2301 * symtab.h (find_function_entry_range_from_pc): Declare and document.
2302 * objfiles.c (objfile_relocate1): Relocate start and end addresses
2303 for each range in a block.
2306 2018-08-23 Xavier Roirand <roirand@adacore.com>
2308 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2311 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2313 * solib-svr4.c (read_program_headers_from_bfd): Return
2314 gdb::optional<gdb::byte_vector>.
2315 (svr4_exec_displacement): Adjust.
2317 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2319 * solib-svr4.c (read_program_header): Return
2320 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2321 (find_program_interpreter): Return
2322 gdb::optional<gdb::byte_vector>.
2323 (scan_dyntag_auxv): Adjust.
2324 (enable_break): Adjust.
2325 (svr4_exec_displacement): Adjust.
2327 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2329 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2330 * inf-child.c (inf_child_target::terminal_save_inferior): New.
2332 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2334 * guile/scm-string.c (gdbscm_scm_from_printf): Use
2336 * guile/scm-utils.c (gdbscm_printf): Likewise.
2337 * serial.c (serial_printf): Likewise.
2338 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2340 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
2342 * stack.c (print_frame): Print frame architecture when printing on
2344 * NEWS: Mention new "arch" attribute in frame output.
2346 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2348 * arch/aarch64.h (aarch64_regnum): Update comment.
2350 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2352 * NEWS: Add SVE to 8.2 section.
2354 2018-08-21 Pedro Alves <palves@redhat.com>
2356 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2357 out from gdbscm_parse_function_args.
2358 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2359 gdbscm_parse_function_args_1.
2361 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
2364 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2367 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
2369 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2371 2018-08-19 Michael Spang <spang@google.com>
2374 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2375 for PT_TLS segments.
2377 2018-08-18 Kevin Buettner <kevinb@redhat.com>
2379 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2380 dwarf_variable_value.
2381 * dwarf2-frame.c (class dwarf_expr_executor):
2382 Add override for dwarf_variable_value.
2383 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2384 (class symbol_needs_eval_context): Likewise.
2385 (indirect_synthetic_pointer): Add forward declaration.
2386 (sect_variable_value): New function.
2387 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2388 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2389 for DW_OP_GNU_variable_value.
2391 2018-08-16 Tom Tromey <tom@tromey.com>
2393 * top.c (read_command_file): Update.
2394 (command_line_input): Remove "repeat" argument.
2395 * ada-lang.c (get_selections): Update.
2396 * linespec.c (decode_line_2): Update.
2397 * defs.h (command_line_input): Remove argument.
2398 * cli/cli-script.c (read_next_line): Update.
2399 * python/py-gdb-readline.c: Update.
2401 2018-08-17 Tom Tromey <tom@tromey.com>
2403 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2406 2018-08-15 Tom Tromey <tom@tromey.com>
2408 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2410 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
2412 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2413 If used, use find_pc_partial_function to find address range
2415 * mi/mi-main.c (mi_cmd_list_features): Report
2416 "data-disassemble-a-option" feature.
2417 * NEWS: Mention new -data-disassemble option -a.
2419 2018-08-13 Tom Tromey <tom@tromey.com>
2421 * common/common-defs.h (_FORTIFY_SOURCE): Define.
2423 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2425 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2426 (aarch64_linux_collect_sve_regset): Likewise.
2427 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2428 * regcache.h (regcache_map_entry_size): New function.
2430 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2432 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2433 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2434 (SVE_HEADER_VL_LENGTH): Likewise.
2435 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2436 (SVE_HEADER_FLAGS_LENGTH): Likewise.
2437 (SVE_HEADER_RESERVED_LENGTH): Likewise.
2438 (SVE_HEADER_SIZE_OFFSET): Likewise.
2439 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2440 (SVE_HEADER_VL_OFFSET): Likewise.
2441 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2442 (SVE_HEADER_FLAGS_OFFSET): Likewise.
2443 (SVE_HEADER_RESERVED_OFFSET): Likewise.
2444 (SVE_HEADER_SIZE): Likewise.
2445 (aarch64_linux_core_read_vq): Add function.
2446 (aarch64_linux_core_read_description): Check for SVE section.
2448 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2450 * aarch64-fbsd-tdep.c
2451 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2453 * aarch64-linux-tdep.c
2454 (aarch64_linux_iterate_over_regset_sections): Likewise.
2455 * alpha-linux-tdep.c
2456 (alpha_linux_iterate_over_regset_sections):
2458 (alphanbsd_iterate_over_regset_sections): Likewise.
2460 (amd64fbsd_iterate_over_regset_sections): Likewise.
2461 * amd64-linux-tdep.c
2462 (amd64_linux_iterate_over_regset_sections): Likewise.
2464 (armbsd_iterate_over_regset_sections): Likewise.
2466 (arm_fbsd_iterate_over_regset_sections): Likewise.
2468 (arm_linux_iterate_over_regset_sections): Likewise.
2469 * corelow.c (get_core_registers_cb): Likewise.
2470 (core_target::fetch_registers): Likewise.
2471 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2472 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2473 * gdbarch.h (void): Regenerate.
2474 * gdbarch.sh: Add supply_size and collect_size.
2475 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2476 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2477 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2478 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2479 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2480 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2481 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2482 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2483 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2484 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2485 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2486 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2487 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2488 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2489 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2490 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2491 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2492 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2493 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2494 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2495 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2496 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2497 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2498 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2499 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2500 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2501 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2502 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2503 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2504 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2506 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
2508 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2511 2018-08-10 Keith Seitz <keiths@redhat.com>
2513 * compile/compile-c-support.c (add_code_header, add_code_footer):
2514 Move into policy class.
2515 (c_push_user_expression, pop_user_expression_nop)
2516 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2517 (compile_program): New host class.
2518 (c_compile_program): New typedef.
2519 (c_compute_porgram): Use c_compile_program.
2521 2018-08-10 Keith Seitz <keiths@redhat.com>
2523 * compile/compile-internal.h (compile_instance::~compile_instance):
2524 Remove calls to htab_delete.
2525 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2526 * compile.c (compile_instance::compile_instance): Initialize
2527 htab unique pointers.
2528 (compile_instance::get_cached_type, compile_instance::insert_type)
2529 (compile_instance::error_symbol_once): Update for unique_ptr.
2531 2018-08-10 Keith Seitz <keiths@redhat.com>
2533 * compile/compile-c-symbols.c (struct symbol_error)
2534 (hash_symbol_error, eq_symbol_error, del_symbol_error)
2535 (compile_instance::insert_symbol_error)
2536 (compile_instance::error_symbol_once): Move to ...
2537 * compile/compile.c: ... here.
2539 2018-08-10 Keith Seitz <keiths@redhat.com>
2541 * compile/compile-c-support.c (c_get_compile_context): Use `new'
2542 instead of `new_compile_instance'.
2543 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2545 If the symbol error map is not initialized, create it.
2546 (generate_c_for_for_one_symbol): Do not check/initialize
2547 the symbol error map.
2548 * compile/compile-c-types.c (compile_c_instance): Make a class.
2550 (compile_instance::compile_instance): Initialize the type cache.
2551 (get_cached_type): New function.
2552 (insert_type): Update description.
2553 (compile_c_instance::m_default_cflags): Define.
2554 (convert_type): Update description. Use get_cached_type.
2555 (delete_instance): Moved to destructor.
2556 (new_compile_instance): Moved to constructor.
2557 * compile/compile-c.h (compile_c_instance): Make class inheriting
2558 from compile_instance.
2559 <base>: Remove field.
2560 <type_map, symbol_err_map>: Move to base class.
2561 <c_plugin>: Rename to `m_plugin' and remove pointer type.
2562 * compile/compile-internal.h (compile_instance): Make class.
2563 <type_map_t, symbol_err_map_t>: Define.
2564 <fe>: Rename to `m_gcc_fe'.
2565 <scope, block, gcc_target_options>: Add `m_' prefix.
2566 <m_type_map, m_symbol_err_map>: New fields, moved from
2569 (convert_type, new_compile_instance): Remove.
2570 * compile/compile.c (cleanup_compile_instance): Remove.
2571 (compile_to_object): Use unique_ptr to eliminate cleanups.
2572 (compile_instance::set_print_callback, compile_instance::version)
2573 (compile_instance::set_verbose)
2574 (compile_instance::set_driver_filename)
2575 (compile_instance::set_triplet_regexp)
2576 (compile_instance::set_arguments)
2577 (compile_instance::set_source_file)
2578 (compile_instance::compile): Define.
2580 2018-08-10 Keith Seitz <keiths@redhat.com>
2582 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2583 * compile/compile-c-types.c: Define GCC_METHODN macros and include
2584 gcc-c-fe.def to define C plugin.
2585 (delete_instance): Delete `c_plugin'.
2586 (new_compile_instance): Initialize `c_plugin'.
2587 * compile/compile-c.h: Include gcc_c_plugin.h.
2588 (struct compile_c_instance) <c_plugin>: New member.
2589 * gcc-c-plugin.h: New file.
2590 Update all callers with API change.
2592 2018-08-10 Keith Seitz <keiths@redhat.com>
2594 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2595 (HFILES_NO_SRCDIR): ... to here.
2596 Add compile-internal.h and compile-c.h.
2597 * compile/compile-c-support.c: Include compile-c.h.
2598 * compile/compile-c-symbols.c: Include compile-c.h.
2599 (generate_c_for_variable_locations): Update comment.
2600 * compile/compile-c-types.c: Include compile-c.h.
2601 * compile/compile-c.h: New file -- moved C language declarations
2602 from other files here.
2603 * compile/compile-internal.h: Do not include hashtab.h or
2604 common/enum-flags.h.
2605 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2606 (gcc_convert_symbol, gcc_symbol_address)
2607 (generate_c_for_variable_locations, c_get_mode_for_size)
2608 (c_get_range_decl_name): Definitions moved to compile-c.h.
2609 * compile/compile-loc2c.c: Include compile-c.h.
2611 2018-08-10 Keith Seitz <keiths@redhat.com>
2613 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2614 (c_symbol_substitution_name): ... this.
2617 2018-08-10 Keith Seitz <keiths@redhat.com>
2619 * compile/compile-c-support.c (c_compute_program): Use
2620 unique_xmalloc_ptr to eliminate cleanup.
2621 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2622 Return a unique_xmalloc_ptr and eliminate cleanup.
2623 * compile/compile-internal.h (generate_c_for_variable_locations):
2624 Return unique_xmalloc_ptr and update description.
2626 2018-08-10 Alan Hayward <alan.hayward@arm.com>
2628 * corelow.c (core_target::get_core_register_section): Rename
2629 min_size to section_min_size.
2631 2018-08-09 Jim Wilson <jimw@sifive.com>
2633 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2634 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2635 * NEWS: Mention new GNU/Linux RISC-V target.
2636 * configure.host: Add riscv*-*-linux*.
2637 * configure.nat: Add riscv*.
2638 * configure.tgt: Add riscv*-*-linux*.
2639 * riscv-linux-nat.c: New file.
2640 * riscv-linux-tdep.c: New file.
2642 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2644 * infrun.c (resume): Make static, add forward declaration.
2645 (proceed): Update header comment.
2646 * infrun.h (resume): Delete declaration.
2648 2018-08-09 Tom Tromey <tom@tromey.com>
2650 * riscv-tdep.h: Minor formatting fixes.
2652 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
2654 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2655 * dwarf-index-cache.c (create_dir_and_check): Likewise.
2656 (test_mkdir_recursive): Likewise.
2657 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2659 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2661 * valarith.c (value_subscripted_rvalue): If an array is not in
2662 memory, and we don't know the upper bound, then we can't know that
2663 the requested element exists or not.
2665 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
2667 * target.c (str_comma_list_concat_elem): Fix typo in comment.
2668 (target_options_to_string): Add comment.
2670 2018-08-08 Tom Tromey <tom@tromey.com>
2672 * unittests/scoped_mmap-selftests.c: Check result of "write".
2674 2018-08-08 Jim Wilson <jimw@sifive.com>
2676 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2677 (decode_register_index_short): New.
2678 (decode_j_type_insn, decode_cj_type_insn): New.
2679 (decode_b_type_insn, decode_cb_type_insn): New.
2680 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
2681 local xlen. Check xlen when decoding ambiguous compressed insns. In
2682 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2683 is_c_sw_insn instead of is_sw_insn.
2684 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2685 (riscv_software_single_step): New.
2686 * riscv-tdep.h (riscv_software_single_step): Declare.
2688 * riscv-tdep.c (riscv_isa_xlen): Drop static.
2689 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2691 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
2694 * target.c (dispose_inferior): Don't dispose of inferiors that are
2697 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
2699 * remote.c (remote_target::download_tracepoint): Change char* to
2702 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
2704 * target.h (target_options_to_string): Return an std::string.
2705 * target.c (str_comma_list_concat_elem): Return void, use
2707 (do_option): Likewise.
2708 (target_options_to_string): Return an std::string.
2709 * linux-nat.c (linux_nat_target::wait): Adjust.
2710 * target-debug.h (target_debug_print_options): Adjust.
2712 2018-08-07 Tom Tromey <tom@tromey.com>
2714 * Makefile.in (CPPFLAGS): New variable.
2715 (INTERNAL_CPPFLAGS): Use it.
2717 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2719 * NEWS: Mention the index cache.
2721 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2723 * common/pathstuff.h (get_standard_cache_dir): New.
2724 * common/pathstuff.c (get_standard_cache_dir): New.
2725 * build-id.h (build_id_to_string): New.
2726 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2727 DEBUG_STR_SUFFIX): Move to here.
2728 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2729 DEBUG_STR_SUFFIX): Move from there.
2730 (write_psymtabs_to_index): Make non-static, add basename
2731 parameter. Write to temporary files, rename when done.
2732 (save_gdb_index_command): Adjust call to
2733 write_psymtabs_to_index.
2734 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2736 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2737 (get_gdb_index_contents_from_cache): New.
2738 (get_gdb_index_contents_from_cache_dwz): New.
2739 (dwarf2_initialize_objfile): Read index from cache.
2740 (dwarf2_build_psymtabs): Save to index.
2741 * dwarf-index-cache.h: New file.
2742 * dwarf-index-cache.c: New file.
2743 * dwarf-index-write.h: New file.
2745 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2747 * gnulib/aclocal.m4: Re-generate.
2748 * gnulib/config.in: Re-generate.
2749 * gnulib/configure: Re-generate.
2750 * gnulib/import/Makefile.am: Re-generate.
2751 * gnulib/import/Makefile.in: Re-generate.
2752 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2753 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2754 * gnulib/import/m4/mkdir.m4: New file.
2755 * gnulib/import/mkdir.c: New file.
2756 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2759 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2761 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2762 * common/scoped_mmap.c: New file.
2763 * common/scoped_mmap.h (destroy): New method.
2764 (~scoped_mmap, reset): Use destroy.
2765 (scoped_mmap): New move constructor.
2766 (mmap_file): New declaration.
2767 * unittests/scoped_mmap-selftests.c (test_normal,
2768 test_invalid_filename, run_tests): New functions.
2769 (_initialize_scoped_mmap_selftests): Register selftest.
2771 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2773 * dwarf2read.c (read_gdb_index_from_section): Rename to...
2774 (read_gdb_index_from_buffer): ... this. Remove section
2775 parameter, add buffer parameter.
2776 (get_gdb_index_contents_ftype,
2777 get_gdb_index_contents_dwz_ftype): New typedefs.
2778 (dwarf2_read_gdb_index): Add callback parameters to get the
2780 (get_gdb_index_contents_from_section): New.
2781 (dwarf2_initialize_objfile): Update call to
2782 dwarf2_read_gdb_index.
2784 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2786 * common/filestuff.h (gdb_fopen_cloexec): New overload.
2787 (gdb_open_cloexec): Likewise.
2788 * nat/linux-osdata.c (command_from_pid): Use string_printf.
2789 (commandline_from_pid): Likewise.
2790 (linux_xfer_osdata_threads): Likewise.
2791 (linux_xfer_osdata_fds): Likewise.
2792 * ada-lang.c (is_package_name): Likewise.
2793 * auxv.c (procfs_xfer_auxv): Likewise.
2794 * breakpoint.c (print_one_breakpoint_location): Use
2796 (print_one_catch_solib): Use string_printf.
2797 * coff-pe-read.c (add_pe_exported_sym): Likewise.
2798 (add_pe_forwarded_sym): Likewise.
2799 * dwarf2read.c (create_type_unit_group): Likewise.
2800 (build_error_marker_type): Likewise.
2801 * infcall.c (get_function_name): Likewise.
2802 * valprint.c (print_converted_chars_to_obstack): Likewise.
2803 * xtensa-tdep.c (xtensa_register_type): Likewise.
2805 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
2807 * remote.c (remote_target::download_tracepoint): Fix format
2810 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2812 * tracefile.c: Include common/byte-vector.h.
2813 (trace_save): Change type of buf to gdb::byte_vector. Initialize
2814 with trace_regblock_size if needed. Update uses of buf.
2816 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2818 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2819 std::vector<unsigned char>.
2820 * tracepoint.c (collection_list::collection_list): Remove
2821 m_regs_mask initializer from initializer list. Resize
2822 m_regs_mask using the largest remote register number.
2823 (collection_list::add_remote_register): Remove size check on
2824 m_regs_mask. Use at to access element.
2825 (collection_list::stringify): Change type of temp_buf to
2826 gdb::char_vector. Update uses of temp_buf. Resize if needed to
2827 stringify the register mask. Use pack_hex_byte for the register
2830 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2832 * tracepoint.h (class collection_list) <add_register>: Remove.
2833 <add_remote_register, add_ax_registers, add_local_register>:
2835 <add_memrange>: Add scope parameter.
2836 * tracepoint.c (encode_actions_1): Likewise.
2837 (collection_list::add_register): Rename to ...
2838 (collection_list::add_remote_register): ... this. Update
2840 (collection_list::add_ax_registers, add_local_register): New
2842 (collection_list::add_memrange): Add scope parameter. Call
2843 add_local_register instead of add_register.
2844 (finalize_tracepoint_aexpr): New function.
2845 (collection_list::collect_symbol): Update calls to add_memrange.
2846 Call add_local_register instead of add_register. Call
2847 add_ax_registers. Call finalize_tracepoint_aexpr.
2848 (encode_actions_1): Get remote regnos for $reg action. Call
2849 add_remote_register, add_ax_registers, and add_local_register.
2850 Update call to add_memrange. Call finalize_tracepoint_aexpr.
2851 (validate_actionline): Call finalize_tracepoint_aexpr.
2853 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2855 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2856 Replace array buf with gdb::char_vector buf, of size
2857 get_remote_packet_size (). Replace references to buf and
2858 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
2859 and xsnprintf with snprintf. Raise errors if the buffer is too
2862 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2864 * remote.c (remote_target::download_tracepoint): Fix the has_more
2865 predicate in the QTDP action list iteration.
2867 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2869 * remote.c (remote_target::download_tracepoint): Fix indentation
2872 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2874 * proc-api.c (_initialize_proc_api): Remove c, unused.
2875 * procfs.c (procfs_init_inferior): Remove signals, unused.
2876 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2879 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
2880 Andrew Burgess <andrew.burgess@embecosm.com>
2882 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2883 'W_STOPCODE (0)' as this could be ambiguous.
2885 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
2887 * ser-tcp.c (net_open): Fix thinko when deciding whether to
2888 disable TCP's Nagle algorithm (use "ai_protocol" instead of
2891 2018-08-02 Tom Tromey <tom@tromey.com>
2894 * dwarf2read.c (read_func_scope): Set symtab on template parameter
2896 (process_structure_scope): Likewise.
2898 2018-08-02 Xavier Roirand <roirand@adacore.com>
2901 * darwin-nat.c (darwin_kill_inferior): Fix handling of
2904 2018-08-02 Tom Tromey <tom@tromey.com>
2906 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2907 (darwin_suspend_inferior, darwin_resume_inferior)
2908 (darwin_decode_notify_message, darwin_resume_inferior_threads)
2909 (darwin_check_new_threads): Check result of get_darwin_inferior.
2911 2018-07-31 Joel Brobecker <brobecker@adacore.com>
2915 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
2917 * varobj.c (varobj_get_path_expr_parent): Report an error if
2918 parent is a dynamic varobj.
2920 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2922 * gnulib/aclocal.m4: Re-generate.
2923 * gnulib/config.in: Re-generate.
2924 * gnulib/configure: Re-generate.
2925 * gnulib/import/Makefile.in: Re-generate.
2926 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2927 * gnulib/import/m4/onceonly.m4: Re-generate.
2929 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2931 * target-descriptions.c (struct xml_test_tdesc): New.
2932 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2933 (record_xml_tdesc): Update.
2934 (maintenance_check_xml_descriptions): Update.
2935 * target-descriptions.h (record_xml_tdesc): Update comment.
2937 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
2939 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2940 checking array bounds are defined.
2942 2018-07-30 Tom Tromey <tom@tromey.com>
2944 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2945 irreflexivity violation.
2947 2018-07-30 Tom Tromey <tom@tromey.com>
2949 * cli/cli-decode.c (lookup_cmd): Remove lint code.
2950 * value.c (unpack_long): Remove lint code.
2951 * valops.c (value_ind): Remove lint code.
2952 * valarith.c (value_x_binop, value_x_unop, value_equal)
2953 (value_pos): Remove lint code.
2955 2018-07-28 Tom de Vries <tdevries@suse.de>
2957 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2958 with undefined upper bound as <optimized out>.
2960 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
2962 * gcore.in: Rename variable "name" to "prefix". Expand
2965 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
2967 * windows-nat.c (windows_nat_target::create_inferior): Update to
2968 call close() in global namespace.
2970 2018-07-26 Tom Tromey <tom@tromey.com>
2972 * dwarf-index-write.c (add_address_entry): Don't add objfile
2974 * dbxread.c (find_stab_function): Rename from
2975 find_stab_function_addr. Return a bound_minimal_symbol.
2976 (read_dbx_symtab): Use raw_text_low, raw_text_high.
2977 Don't add objfile offsets.
2978 (end_psymtab): Use raw_text_low, raw_text_high,
2979 MSYMBOL_VALUE_RAW_ADDRESS.
2980 (read_ofile_symtab): Update.
2981 (process_one_symbol): Update.
2982 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2984 (dw2_relocate): Remove.
2985 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2987 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2989 (process_psymtab_comp_unit_reader, add_partial_symbol)
2990 (add_partial_subprogram, dwarf2_ranges_read): Update.
2991 (load_partial_dies): Update.
2992 (add_address_entry): Don't add objfile offsets.
2993 (dwarf2_build_include_psymtabs): Update.
2994 (create_addrmap_from_aranges): Don't add objfile offsets.
2995 (dw2_find_pc_sect_compunit_symtab): Update.
2996 * mdebugread.c (parse_symbol): Don't add objfile offsets.
2997 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2999 (parse_partial_symbols): Don't add objfile offsets. Use
3000 raw_text_low, raw_text_high. Update.
3001 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3002 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3003 or call 'relocate' quick function. Clear psymbol_map.
3004 * psympriv.h (struct partial_symbol) <address>: Add section
3006 <set_unrelocated_address>: Rename from set_address.
3007 <raw_text_low, raw_text_high>: New methods.
3008 <text_low, text_high>: Add objfile parameter.
3009 (add_psymbol_to_bcache): Add 'section' parameter. Call
3010 set_unrelocated_address.
3011 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3012 (find_pc_psymbol): Update.
3013 (fixup_psymbol_section, relocate_psymtabs): Remove.
3014 (dump_psymtab, psym_functions): Update.
3015 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3017 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3018 (start_psymtab_common): Update.
3019 * symfile-debug.c (debug_qf_relocate): Remove.
3020 (debug_sym_quick_functions): Update.
3021 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3022 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3025 2018-07-26 Tom Tromey <tromey@redhat.com>
3027 * dbxread.c (end_psymtab): Use text_high_valid and
3029 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3030 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3031 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3033 <text_low_valid, text_high_valid>: New fields.
3034 <set_text_low, set_text_high>: Update.
3035 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3037 2018-07-26 Tom Tromey <tom@tromey.com>
3039 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3041 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3042 textlow and texthigh fields.
3043 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3045 * mdebugread.c (parse_lines, parse_partial_symbols)
3046 (psymtab_to_symtab_1): Update.
3047 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3048 Rename fields. Update comment. Now private.
3049 <text_low, text_high, set_text_low, set_text_high>: New methods.
3050 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3051 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3052 (start_psymtab_common, maintenance_info_psymtabs)
3053 (maintenance_check_psymtabs): Update.
3054 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3056 (scan_xcoff_symtab): Update.
3058 2018-07-26 Tom Tromey <tromey@redhat.com>
3060 * psympriv.h (struct partial_symbol) <unrelocated_address,
3061 address, set_address>: New methods.
3062 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3063 (fixup_psymbol_section, relocate_psymtabs): Update.
3064 (print_partial_symbols): Add 'objfile' parameter. Update.
3065 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3068 2018-07-26 Tom Tromey <tom@tromey.com>
3070 * dwarf-index-write.c (write_psymbols, debug_names::insert)
3071 (debug_names::write_psymbols): Update.
3072 * psympriv.h (struct partial_symbol): Derive from
3073 general_symbol_info.
3074 <obj_section>: New method.
3075 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3076 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3077 (find_pc_sect_psymbol, fixup_psymbol_section)
3078 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3079 (print_partial_symbols, recursively_search_psymtabs)
3080 (compare_psymbols, psymbol_hash, psymbol_compare)
3081 (add_psymbol_to_bcache, maintenance_check_psymtabs)
3082 (psymbol_name_matches, psym_fill_psymbol_map): Update.
3084 2018-07-26 Tom Tromey <tromey@redhat.com>
3086 * dbxread.c (end_psymtab): Remove dead code.
3088 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
3090 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3091 DWARF unwinders are disabled.
3092 * dwarf2-frame.c: Add dwarf2read.h include.
3093 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3095 (dwarf2_frame_unwinders_enabled_p): Define.
3096 (show_dwarf_unwinders_enabled_p): New function.
3097 (_initialize_dwarf2_frame): Register switch to control DWARF
3099 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3100 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3101 (show_dwarf_cmdlist): Remove static keyword.
3102 * dwarf2read.h (set_dwarf_cmdlist): Declare.
3103 (show_dwarf_cmdlist): Declare.
3104 * NEWS: Document new feature.
3106 2018-07-26 Tom de Vries <tdevries@suse.de>
3108 PR breakpoints/23366
3109 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3111 2018-07-26 Tom de Vries <tdevries@suse.de>
3113 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3114 DW_AT_count can't be translated to a dynamic prop.
3116 2018-07-25 Tom de Vries <tdevries@suse.de>
3118 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3121 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
3123 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3125 2018-07-25 Joel Brobecker <brobecker@adacore.com>
3127 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3129 2018-07-24 Keith Seitz <keiths@redhat.comt
3132 * dwarf2read.c (dw2_add_symbol_to_list): New function.
3133 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3134 instead of add_symbol_to_list.
3135 (read_file_scope): Call prepare_one_comp_unit before reading
3138 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
3140 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3142 2018-07-24 Tom Tromey <tom@tromey.com>
3144 * utils.c (malloc, realloc, free): Don't declare.
3145 * configure, config.in: Rebuild.
3146 * configure.ac: Don't check for declarations of free, malloc, or
3149 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3151 * aarch64-linux-nat.c
3152 (aarch64_linux_nat_target::stopped_data_address): Remove unused
3154 * arm-linux-nat.c (fetch_regs): Likewise.
3155 (store_regs): Likewise.
3156 (fetch_vfp_regs): Likewise.
3157 (store_vfp_regs): Likewise.
3158 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3159 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3160 (arm_linux_nat_target::insert_watchpoint): Likewise.
3161 (arm_linux_nat_target::remove_watchpoint): Likewise.
3162 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3164 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3166 * ppc-linux-nat.c (fetch_register): Likewise.
3167 (fetch_all_gp_regs): Likewise.
3168 (fetch_ppc_registers): Likewise.
3169 (store_all_gp_regs): Likewise.
3170 (store_ppc_registers): Likewise.
3171 (hwdebug_insert_point): Likewise.
3172 (can_use_watchpoint_cond_accel): Likewise.
3173 * remote-sim.c (gdb_os_write_stdout): Likewise.
3175 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3176 Tom Tromey <tom@tromey.com>
3178 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3180 * configure: Rebuild.
3182 2018-07-22 Tom Tromey <tom@tromey.com>
3184 * regformats/regdat.sh: Define xmltarget_${name} inside
3185 #ifndef IN_PROCESS_AGENT.
3187 2018-07-22 Tom Tromey <tom@tromey.com>
3189 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3191 2018-07-22 Tom Tromey <tom@tromey.com>
3193 * symfile.c (reread_symbols): Notify iter, not objfile.
3195 2018-07-22 Tom Tromey <tom@tromey.com>
3197 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3199 (ravenscar_thread_target::prepare_to_store): Likewise.
3201 2018-07-22 Tom Tromey <tom@tromey.com>
3203 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3204 unused variable. Call value_fetch_lazy when needed.
3205 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3206 Remove unused variable. Call value_fetch_lazy when needed.
3208 2018-07-22 Tom Tromey <tom@tromey.com>
3210 * m32c-tdep.c (mark_dma): Return void.
3211 (make_regs): Remove unused declarations.
3213 2018-07-22 Tom Tromey <tom@tromey.com>
3215 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3216 cmdscm_get_valid_command_smob_arg_unsafe for effect.
3217 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3218 bkscm_get_valid_block_smob_arg_unsafe for effect.
3220 2018-07-22 Tom Tromey <tom@tromey.com>
3222 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3225 2018-07-22 Tom Tromey <tom@tromey.com>
3227 * windows-nat.c (saved_context): Conditionally define.
3228 * remote.c (remote_target::remote_btrace_maybe_reopen):
3229 Conditionally declare "warned".
3230 * inflow.c (sigquit_ours): Conditionally define.
3231 (new_tty): Move "tty" declaration inside #if.
3232 * guile/guile.c (guile_datadir): Conditionally define.
3233 * charset.c (set_be_le_names): Move some declarations inside #if.
3234 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3236 (parse_xml_btrace_conf): Likewise.
3238 2018-07-22 Tom Tromey <tom@tromey.com>
3240 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3242 2018-07-22 Tom Tromey <tom@tromey.com>
3244 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3245 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3246 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3247 * buildsym-legacy.c (get_macro_table): Remove unused variable.
3248 * stack.c (frame_apply_level_command): Remove unused variable.
3249 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3250 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3251 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3253 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3254 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3255 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3257 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3258 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3260 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3261 Remove unused variable.
3262 * cli/cli-script.c (recurse_read_control_structure): Remove unused
3264 * common/tdesc.c (print_xml_feature::visit): Remove unused
3266 * compile/compile-object-load.c (store_regs): Remove unused
3268 * complaints.c (clear_complaints): Remove unused variable.
3269 * corelow.c (core_target_open): Remove unused variable.
3270 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3272 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3274 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3276 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3278 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3280 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3282 * ia64-tdep.c (examine_prologue): Remove unused variable.
3283 * infcall.c (run_inferior_call): Remove unused variable.
3284 * inferior.c (exit_inferior): Remove unused variable.
3285 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3286 * linespec.c (decode_line_2): Remove unused variable.
3287 * linux-nat.c (super_close): Remove.
3288 * linux-tdep.c (linux_info_proc): Remove unused variable.
3289 * mi/mi-main.c (mi_execute_command): Remove unused variable.
3290 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3291 Remove unused variable.
3292 * parse.c (find_minsym_type_and_address): Remove unused variable.
3293 * printcmd.c (info_symbol_command, printf_floating): Remove unused
3295 * python/py-breakpoint.c (bppy_set_commands): Remove unused
3297 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3299 * record-btrace.c (record_btrace_target::store_registers): Remove
3301 (cmd_show_record_btrace_cpu): Remove unused variable.
3302 * riscv-tdep.c (riscv_register_reggroup_p)
3303 (riscv_push_dummy_call, riscv_return_value): Remove unused
3305 * rust-exp.y (literal): Remove unused variable.
3306 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3308 <STRUCTOP_ANONYMOUS>: Likewise.
3309 * s390-linux-tdep.c (s390_linux_init_abi_31)
3310 (s390_linux_init_abi_64): Remove unused variable.
3311 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3312 (file_select_thread, net_windows_open, _initialize_ser_windows):
3313 Remove unused variables.
3314 * symtab.c (find_pc_sect_line): Remove unused variable.
3315 * target-memory.c (compute_garbled_blocks): Remove unused
3317 (target_write_memory_blocks): Remove unused variable.
3318 * target.c (target_stack::unpush): Remove unused variables.
3319 * tracepoint.c (start_tracing, all_tracepoint_actions)
3320 (merge_uploaded_trace_state_variables)
3321 (print_one_static_tracepoint_marker): Remove unused variable.
3322 * unittests/basic_string_view/element_access/char/1.cc (test01):
3323 Remove unused variable.
3324 * windows-nat.c (windows_continue, windows_add_all_dlls)
3325 (do_initial_windows_stuff, windows_nat_target::create_inferior):
3326 Remove unused variables.
3328 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
3330 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3331 attr_profile in HAVE_ELF.
3332 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3335 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
3337 * frame.c (frame_register_unwind): Change parameter name.
3338 (frame_unwind_register): Likewise.
3339 (frame_unwind_register_value): Likewise.
3340 (frame_unwind_register_signed): Likewise.
3341 (frame_unwind_register_unsigned): Likewise.
3342 * frame.h (frame_register_unwind): Likewise.
3343 (frame_unwind_register): Likewise.
3344 (frame_unwind_register_value): Likewise.
3345 (frame_unwind_register_signed): Likewise.
3346 (frame_unwind_register_unsigned): Likewise.
3347 (frame_unwind_arch): Likewise.
3349 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3351 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3354 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3356 * mips-linux-nat.c (mips_linux_nat_target::read_description):
3357 Call `get_ptrace_pid' rather than extracting the ptrace PID by
3360 2018-07-20 Keith Seitz <keiths@redhat.com>
3362 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3363 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3364 m_compunit_symtab, m_language>: Add "m_" prefix.
3366 * buildsym.c: Update all uses.
3368 2018-07-20 Tom Tromey <tom@tromey.com>
3370 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3371 * buildsym.h (record_line_ftype): Remove typedef.
3373 2018-07-20 Tom Tromey <tom@tromey.com>
3375 * buildsym-legacy.h (augment_type_symtab): Don't declare.
3376 (end_expandable_symtab): Likewise.
3377 (end_symtab_get_static_block): Likewise.
3378 (end_symtab_from_static_block): Likewise.
3379 * buildsym-legacy.c (augment_type_symtab): Remove.
3380 (end_expandable_symtab): Remove.
3381 (end_symtab_get_static_block): Remove.
3382 (end_symtab_from_static_block): Remove.
3384 2018-07-20 Tom Tromey <tom@tromey.com>
3386 * dwarf2read.c: Include buildsym.h.
3387 (struct dwarf2_cu) <builder>: New method.
3388 (fixup_go_packaging): Update.
3389 (process_full_comp_unit, process_full_type_unit): Update. Don't
3390 use scoped_free_pendings.
3391 (using_directives): Add "cu" parameter, remove "language".
3392 (read_import_statement, setup_type_unit_groups, )
3393 (read_func_scope, read_lexical_block_scope)
3394 (dwarf2_record_block_ranges, read_namespace): Update.
3395 (lnp_state_machine::lnp_state_machine): Add cu parameter.
3396 (lnp_state_machine::handle_end_sequence): Update.
3397 (class lnp_state_machine) <m_cu>: New member.
3398 <m_record_line_callback>: Remove.
3399 <m_currently_recording_lines>: New member.
3400 (lnp_state_machine::handle_set_file): Update.
3401 (noop_record_line): Remove.
3402 (dwarf_record_line_p): Add cu parameter.
3403 (dwarf_record_line_1, dwarf_finish_line): Likewise.
3404 (lnp_state_machine::record_line)
3405 (lnp_state_machine::lnp_state_machine)
3406 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3407 (dwarf_decode_lines): Update.
3408 (dwarf2_start_subfile): Add cu parameter.
3409 (dwarf2_start_symtab, new_symbol): Update.
3410 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3411 Remove dwarf2_per_objfile parameter.
3412 (dwarf_decode_macros): Update.
3414 2018-07-20 Tom Tromey <tom@tromey.com>
3416 * stabsread.c (define_symbol): Update.
3417 * buildsym-legacy.h (get_buildsym_compunit): Declare.
3418 * dwarf2read.c (new_symbol): Update.
3419 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3420 * cp-namespace.c: Include buildsym.h.
3421 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3422 * buildsym-legacy.c (get_buildsym_compunit): New function.
3424 2018-07-20 Tom Tromey <tom@tromey.com>
3426 * xcoffread.c: Include buildsym-legacy.h.
3427 * windows-nat.c: Include buildsym-legacy.h.
3428 * stabsread.c: Include buildsym-legacy.h.
3429 * mdebugread.c: Include buildsym-legacy.h.
3430 * buildsym-legacy.h: New file.
3431 * buildsym-legacy.c: New file, from buildsym.c.
3432 * go32-nat.c: Include buildsym-legacy.h.
3433 * dwarf2read.c: Include buildsym-legacy.h.
3434 * dbxread.c: Include buildsym-legacy.h.
3435 * cp-namespace.c: Include buildsym-legacy.h.
3436 * coffread.c: Include buildsym-legacy.h.
3437 * buildsym.h: Move some contents to buildsym-legacy.h.
3438 * buildsym.c: Include buildsym-legacy.h. Move many functions to
3440 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3442 2018-07-20 Tom Tromey <tom@tromey.com>
3444 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3445 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3446 (buildsym_compunit::buildsym_compunit)
3447 (buildsym_compunit::~buildsym_compunit)
3448 (buildsym_compunit::get_macro_table): Define.
3450 2018-07-20 Tom Tromey <tom@tromey.com>
3452 * buildsym.c (reset_symtab_globals): Remove.
3453 (buildsym_compunit::end_symtab_from_static_block): Update.
3454 (buildsym_compunit::augment_type_symtab): Update.
3455 (end_symtab_from_static_block): Call free_buildsym_compunit.
3456 (augment_type_symtab, end_symtab, end_expandable_symtab):
3459 2018-07-20 Tom Tromey <tom@tromey.com>
3461 * arch-utils.c: Do not include buildsym.h.
3462 * mipsread.c: Do not include buildsym.h.
3463 * machoread.c: Do not include buildsym.h.
3464 * elfread.c: Do not include buildsym.h.
3466 2018-07-20 Tom Tromey <tom@tromey.com>
3468 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3470 (buildsym_compunit): Add new constructor.
3471 (struct buildsym_compunit) <get_last_source_file, finish_block,
3472 record_block_range, start_subfile, patch_subfile_names,
3473 push_subfile, pop_subfile, record_line, get_compunit_symtab,
3474 set_last_source_start_addr, get_last_source_start_addr,
3475 get_local_using_directives, set_local_using_directives,
3476 get_global_using_directives, outermost_context_p,
3477 get_current_context_stack, get_context_stack_depth,
3478 get_current_subfile, get_local_symbols, get_file_symbols,
3479 get_global_symbols, record_debugformat, record_producer,
3480 push_context, pop_context, end_symtab_get_static_block,
3481 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3483 <record_pending_block, finish_block_internal, make_blockvector,
3484 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3488 2018-05-22 Tom Tromey <tom@tromey.com>
3490 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3492 (finish_block_internal): Update.
3494 2018-07-20 Tom Tromey <tom@tromey.com>
3496 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3498 (finish_block_internal): Update.
3500 2018-07-20 Tom Tromey <tom@tromey.com>
3502 * buildsym.h (EXTERN): Don't define or undef.
3503 * buildsym.c (EXTERN): Don't define.
3505 2018-07-20 Tom Tromey <tom@tromey.com>
3507 * buildsym.c: Remove TODO comment.
3509 2018-07-20 Tom Tromey <tom@tromey.com>
3511 * coffread.c (coff_symtab_read): Update.
3512 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3513 (xcoff_new_init): Update.
3514 * mipsread.c (mipscoff_new_init): Update.
3515 * mdebugread.c (mdebug_build_psymtabs): Update.
3516 * elfread.c (elf_new_init): Update.
3517 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3519 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3520 (coffstab_build_psymtabs, elfstab_build_psymtabs)
3521 (stabsect_build_psymtabs): Update.
3522 * buildsym.h (buildsym_init): Don't declare.
3523 * buildsym.c: Update comment.
3524 (prepare_for_building): Remove.
3525 (start_symtab, restart_symtab): Update.
3526 (reset_symtab_globals): Update comment.
3527 (buildsym_init): Remove.
3529 2018-07-20 Tom Tromey <tom@tromey.com>
3531 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3532 * stabsread.c (patch_block_stabs, define_symbol, read_type)
3533 (read_enum_type, common_block_start, common_block_end)
3534 (cleanup_undefined_types_1, finish_global_stabs): Update.
3535 * mdebugread.c (psymtab_to_symtab_1): Update.
3536 * dwarf2read.c (fixup_go_packaging, read_func_scope)
3537 (read_lexical_block_scope, new_symbol): Update.
3538 * dbxread.c (process_one_symbol): Update.
3539 * coffread.c (coff_symtab_read, process_coff_symbol)
3540 (coff_read_enum_type): Update.
3541 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3543 (get_local_symbols, get_file_symbols, get_global_symbols): New
3545 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3547 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3548 (~scoped_free_pendings): Update.
3549 (finish_block, prepare_for_building, reset_symtab_globals)
3550 (end_symtab_get_static_block, end_symtab_with_blockvector)
3551 (augment_type_symtab, push_context): Update.
3552 (get_local_symbols, get_file_symbols, get_global_symbols): New
3554 (buildsym_init): Update.
3556 2018-07-20 Tom Tromey <tom@tromey.com>
3558 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3559 (process_full_type_unit): Likewise.
3560 (dwarf2_start_symtab): Set list_in_scope.
3562 2018-07-20 Tom Tromey <tom@tromey.com>
3564 * dwarf2read.c (process_psymtab_comp_unit_reader)
3565 (build_type_psymtabs_reader): Do not set list_in_scope.
3567 2018-07-20 Tom Tromey <tom@tromey.com>
3569 * buildsym.c (free_pendings): Remove.
3570 (add_symbol_to_list, scoped_free_pendings)
3571 (finish_block_internal, buildsym_init): Update.
3573 2018-07-20 Tom Tromey <tom@tromey.com>
3575 * xcoffread.c (read_xcoff_symtab): Update.
3576 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3578 * dbxread.c (process_one_symbol): Update.
3579 * coffread.c (coff_symtab_read): Update.
3580 * buildsym.h (finish_block): Update.
3581 * buildsym.c (finish_block): Remove "listhead" argument.
3582 (end_symtab_get_static_block): Update.
3584 2018-07-20 Tom Tromey <tom@tromey.com>
3586 * buildsym.h (class scoped_free_pendings): Remove constructor.
3587 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3589 <m_pending_block_obstack, m_pending_blocks>: New members.
3590 (pending_block_obstack, pending_blocks): Remove.
3591 (scoped_free_pendings::scoped_free_pendings): Default.
3592 (~scoped_free_pendings): Update.
3593 (free_pending_blocks): Remove.
3594 (finish_block_internal, record_pending_block, make_blockvector)
3595 (end_symtab_get_static_block, augment_type_symtab, push_context)
3596 (buildsym_init): Update.
3598 2018-07-20 Tom Tromey <tom@tromey.com>
3600 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3601 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3603 (pending_addrmap, pending_addrmap_obstack)
3604 (pending_addrmap_interesting): Remove.
3605 (scoped_free_pendings, record_block_range, make_blockvector)
3606 (prepare_for_building, reset_symtab_globals, buildsym_init):
3609 2018-07-20 Tom Tromey <tom@tromey.com>
3611 * xcoffread.c (process_linenos): Update.
3612 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3613 * mdebugread.c (psymtab_to_symtab_1): Update.
3614 * dwarf2read.c (setup_type_unit_groups)
3615 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3616 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3617 * dbxread.c (process_one_symbol): Update.
3618 * coffread.c (coff_symtab_read, enter_linenos)
3619 (process_coff_symbol): Update.
3620 * buildsym.h (current_subfile): Don't declare.
3621 (get_current_subfile): Declare.
3622 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3624 (start_subfile, free_buildsym_compunit, push_subfile)
3625 (prepare_for_building, start_symtab): Update.
3626 (get_current_subfile): New function.
3628 2018-07-20 Tom Tromey <tom@tromey.com>
3630 * coffread.c (coff_symtab_read): Update.
3631 * xcoffread.c (read_xcoff_symtab): Update.
3632 * dwarf2read.c (new_symbol): Update.
3633 (read_func_scope, read_lexical_block_scope): Update.
3634 * dbxread.c (process_one_symbol): Update.
3635 * buildsym.h (context_stack, context_stack_depth): Don't declare.
3636 (outermost_context_p): Remove macro.
3637 (outermost_context_p, get_current_context_stack)
3638 (get_context_stack_depth): Declare.
3639 (pop_context): Return struct context_stack.
3640 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3642 (context_stack_size): Remove.
3643 (INITIAL_CONTEXT_STACK_SIZE): Remove.
3644 (prepare_for_building, end_symtab_get_static_block)
3645 (augment_type_symtab, push_context): Update.
3646 (pop_context): Return struct context_stack.
3647 (outermost_context_p, get_current_context_stack)
3648 (get_context_stack_depth): New functions.
3649 (buildsym_init): Update.
3651 2018-07-20 Tom Tromey <tom@tromey.com>
3653 * rust-exp.y: Now a pure parser. Update all rules.
3654 (%union): Move earlier.
3655 (current_parser, work_obstack): Remove globals.
3656 (rust_parser, ~rust_parser): Update.
3657 (class rust_parser) <copy_name, concat3, crate_name, super_name,
3658 lex_character, lex_number, lex_string, lex_identifier,
3659 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3660 convert_name, convert_params_to_expression,
3661 convert_ast_to_expression, ast_basic_type, ast_operation,
3662 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3663 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3664 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3665 ast_array_type, ast_slice_type, ast_reference_type,
3666 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3667 (rust_parse): Update.
3668 (rustyyerror, rustyylex): Add parser parameter.
3669 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3670 (rust_lex_stringish_test, rust_lex_test_sequence)
3671 (rust_lex_test_trailing_dot, rust_lex_test_completion)
3672 (rust_lex_test_push_back, rust_lex_tests): Update.
3674 2018-07-19 Pedro Alves <palves@redhat.com>
3676 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3677 gdb::unique_xmalloc_ptr.
3678 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3679 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3680 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3681 copy-initialization.
3682 * guile/scm-pretty-print.c (ppscm_print_children): Use
3683 gdb::unique_xmalloc_ptr instead of cleanups.
3684 (gdbscm_apply_val_pretty_printer): Remove cleanups.
3685 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3686 gdb::unique_xmalloc_ptr.
3687 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3688 Adjust to use gdb::unique_xmalloc_ptr.
3689 * guile/scm-utils.c (extract_arg): Adjust.
3690 * guile/scm-value.c (gdbscm_value_field): Adjust to use
3691 gdb::unique_xmalloc_ptr instead of a cleanup.
3693 2018-07-19 Tom Tromey <tom@tromey.com>
3695 * utils.c (do_value_free_to_mark)
3696 (make_cleanup_value_free_to_mark): Remove.
3697 * utils.h (make_cleanup_value_free_to_mark): Remove.
3699 2018-07-19 Pedro Alves <palves@redhat.com>
3701 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3702 forwarding reference.
3704 2018-07-18 Pedro Alves <palves@redhat.com>
3706 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3707 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
3710 2018-07-18 Pedro Alves <palves@redhat.com>
3712 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3714 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3716 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3717 directly instead of a cleanup.
3718 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3719 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
3720 (vlscm_binop_gdbthrow): New, factored out from ...
3721 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
3722 (vlscm_rich_compare): Use gdbscm_wrap.
3723 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3724 instead of a cleanup.
3725 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3727 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3728 Use xfree directly instead of a cleanup.
3729 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3730 Adjust to use gdbscm_wrap and scoped_value_mark.
3731 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3732 (gdbscm_value_address, gdbscm_value_dereference)
3733 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3735 (gdbscm_value_dynamic_type): Use scoped_value_mark.
3736 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3738 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3739 gdbscm_wrap and scoped_value_mark.
3740 (gdbscm_value_to_string): Use xfree directly instead of a
3741 cleanup. Move 'buffer' unique_ptr to TRY scope.
3742 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3743 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
3745 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3746 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3748 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3751 2018-07-18 Tom de Vries <tdevries@suse.de>
3753 * findvar.c (default_read_var_value): Also resolve dynamic type for
3754 LOC_OPTIMIZED_OUT vars.
3756 2018-07-18 Maciej W. Rozycki <macro@mips.com>
3758 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3761 2018-07-17 Tom Tromey <tom@tromey.com>
3763 * guile/scm-param.c (pascm_set_func, pascm_show_func)
3764 (compute_enum_list, pascm_set_param_value_x)
3765 (gdbscm_parameter_value): Update.
3766 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3767 (gdbscm_scm_to_host_string): Update.
3768 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3770 * guile/scm-cmd.c (cmdscm_add_completion): Update.
3771 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3772 * guile/scm-string.c (gdbscm_scm_to_string): Return
3774 (gdbscm_scm_to_host_string): Likewise.
3776 2018-07-17 Tom Tromey <tom@tromey.com>
3778 * guile/guile.c (gdbscm_eval_from_control_command): Update.
3779 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3780 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3781 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3784 2018-07-17 Tom Tromey <tom@tromey.com>
3786 * guile/scm-param.c (pascm_signal_setshow_error): Update.
3787 * guile/guile-internal.h (gdbscm_exception_message_to_string):
3789 * guile/scm-cmd.c (cmdscm_function): Update.
3790 * guile/scm-pretty-print.c
3791 (ppscm_print_exception_unless_memory_error): Update.
3792 * guile/scm-exception.c (gdbscm_exception_message_to_string):
3793 Return unique_xmalloc_ptr.
3795 2018-07-17 Tom Tromey <tom@tromey.com>
3797 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3800 2018-07-17 Jim Wilson <jimw@sifive.com>
3802 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3803 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
3804 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
3805 unecessary braces after EF_RISCV_RVC test. Delete call to
3806 set_gdbarch_decr_pc_after_break.
3808 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3809 RISCV_LAST_FP_REGNUM + 1.
3810 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3812 2018-07-17 Tom Tromey <tom@tromey.com>
3814 * configure.ac: Remove --disable-gdbcli.
3815 * configure: Rebuild.
3816 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3817 (SUBDIR_CLI_CFLAGS): Remove.
3818 (SFILES): Use SUBDIR_CLI_SRCS.
3819 (COMMON_OBS): Use SUBDIR_CLI_OBS.
3821 2018-07-17 Tom Tromey <tom@tromey.com>
3824 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3826 2018-07-16 Jim Wilson <jimw@sifive.com>
3828 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3830 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3832 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3834 (libunwind_frame_sniffer): Likewise.
3835 (libunwind_frame_prev_register): Likewise.
3836 (libunwind_sigtramp_frame_sniffer): Likewise.
3837 * ia64-tdep.c (ia64_access_reg): Likewise.
3838 (ia64_access_rse_reg): Likewise.
3839 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3840 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3842 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3844 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3846 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3848 * remote-sim.c (gdbsim_target::close,
3849 gdbsim_target::mourn_inferior): Remove unused variables.
3851 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
3853 * ia64-tdep.c (ktab_buf): New global.
3854 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3855 (get_kernel_table): Adjust.
3857 2018-07-16 Tom Tromey <tom@tromey.com>
3859 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3860 * dwarf2read.c (using_directives, new_symbol): Use
3861 outermost_context_p.
3862 * dbxread.c (process_one_symbol): Use outermost_context_p.
3863 * coffread.c (coff_symtab_read): Use outermost_context_p.
3865 2018-07-16 Tom Tromey <tom@tromey.com>
3867 * dwarf2read.c (using_directives, read_func_scope)
3868 (read_lexical_block_scope): Update.
3869 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3870 * buildsym.h (local_using_directives, global_using_directives):
3872 (get_local_using_directives, set_local_using_directives)
3873 (get_global_using_directives): Declare.
3874 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3875 m_global_using_directives>: New members.
3876 (finish_block_internal, prepare_for_building)
3877 (reset_symtab_globals, end_symtab_get_static_block)
3878 (push_context): Update.
3879 (get_local_using_directives, set_local_using_directives)
3880 (get_global_using_directives): New functions.
3881 (buildsym_init): Update.
3883 2018-07-16 Tom Tromey <tom@tromey.com>
3885 * xcoffread.c (xcoff_initial_scan): Don't call
3886 free_pending_blocks.
3887 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3888 * buildsym.h (class scoped_free_pendings): Add constructor.
3889 (free_pending_blocks): Don't declare.
3890 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3891 (free_pending_blocks): Now static.
3893 2018-07-16 Tom Tromey <tom@tromey.com>
3895 * buildsym.h (push_subfile, pop_subfile): Update declarations.
3896 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3898 (struct subfile_stack): Remove.
3899 (subfile_stack): Remove.
3900 (push_subfile, pop_subfile, buildsym_init): Update.
3902 2018-07-16 Tom Tromey <tom@tromey.com>
3904 * buildsym.c (push_subfile): Use gdb_assert.
3905 (pop_subfile): Use gdb_assert.
3907 2018-07-16 Tom Tromey <tom@tromey.com>
3909 * buildsym.h (merge_symbol_lists): Remove.
3910 * buildsym.c (merge_symbol_lists): Remove.
3912 2018-07-16 Tom Tromey <tom@tromey.com>
3914 * stabsread.c (scan_file_globals): Update comment.
3915 * stabsread.h (scan_file_globals): Move from buildsym.h.
3916 * buildsym.h (scan_file_globals): Move to stabsread.h.
3918 2018-07-16 Tom Tromey <tom@tromey.com>
3920 * xcoffread.c (xcoff_new_init): Update.
3921 * mipsread.c (mipscoff_new_init): Update.
3922 * mdebugread.c (mdebug_build_psymtabs): Update.
3923 * elfread.c (elf_new_init): Update.
3924 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3925 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3926 * buildsym.h (buildsym_new_init): Don't declare.
3927 * buildsym.c (buildsym_new_init): Remove.
3929 2018-07-16 Tom Tromey <tom@tromey.com>
3931 * stabsread.h (within_function): Move from buildsym.h.
3932 * stabsread.c (start_stabs): Clear within_function.
3933 * coffread.c (coff_start_symtab): Clear within_function.
3934 * buildsym.h (within_function): Move to stabsread.h.
3935 * buildsym.c (prepare_for_building): Update.
3937 2018-07-16 Tom Tromey <tom@tromey.com>
3939 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3940 * dwarf2read.c (dwarf2_start_symtab): Don't set
3941 processing_gcc_compilation.
3942 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3944 2018-07-16 Tom Tromey <tom@tromey.com>
3946 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3947 (next_symbol_text_func): Move from buildsym.h.
3948 * stabsread.c (hashname): Move from buildsym.c.
3949 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3950 (next_symbol_text_func, hashname): Move to stabsread.h.
3951 * buildsym.c: Don't include bcache.h
3952 (hashname): Move to stasbread.c.
3954 2018-07-16 Tom Tromey <tom@tromey.com>
3956 * buildsym.h (context_stack_size): Don't declare.
3957 * buildsym.c (context_stack_size): New global.
3959 2018-07-16 Tom Tromey <tom@tromey.com>
3961 * dbxread.c (processing_acc_compilation): New global.
3962 * buildsym.h (processing_acc_compilation): Don't declare.
3964 2018-07-16 Tom Tromey <tom@tromey.com>
3966 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3967 * dbxread.c (read_ofile_symtab): Update.
3968 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3969 * buildsym.h (last_source_start_addr): Remove.
3970 (set_last_source_start_addr, get_last_source_start_addr):
3972 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3974 (struct buildsym_compunit) <m_last_source_start_addr>: New
3976 (prepare_for_building): Remove start_addr parameter.
3977 (start_symtab, restart_symtab, end_symtab_get_static_block)
3978 (end_symtab_with_blockvector): Update.
3979 (set_last_source_start_addr, get_last_source_start_addr): New
3982 2018-07-16 Tom Tromey <tom@tromey.com>
3984 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3986 (have_line_numbers): Remove.
3987 (record_line, prepare_for_building, end_symtab_get_static_block)
3988 (augment_type_symtab): Update.
3990 2018-07-16 Tom Tromey <tom@tromey.com>
3992 * buildsym.c (~buildsym_compunit): Free the macro table.
3993 (struct buildsym_compunit) <get_macro_table, release_macros>: New
3995 <m_pending_macros>: New member.
3996 (pending_macros): Remove.
3997 (~scoped_free_pendings, get_macro_table, prepare_for_building)
3998 (reset_symtab_globals, end_symtab_get_static_block)
3999 (end_symtab_with_blockvector, augment_type_symtab)
4000 (buildsym_init): Update.
4002 2018-07-16 Tom Tromey <tom@tromey.com>
4004 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4006 (buildsym_compunit::set_last_source_file): New method.
4007 <m_last_source_file>: New member.
4008 (prepare_for_building): Remove "name" parameter.
4009 (start_symtab, restart_symtab, reset_symtab_globals): Update.
4010 (last_source_file): Remove.
4011 (set_last_source_file, get_last_source_file): Update.
4013 2018-07-16 Tom Tromey <tom@tromey.com>
4015 * buildsym.c (prepare_for_building): Add assert.
4017 2018-07-16 Tom Tromey <tom@tromey.com>
4019 * buildsym.c (~buildsym_compunit): Update.
4020 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4021 (start_subfile, patch_subfile_names)
4022 (end_symtab_with_blockvector): Update.
4024 2018-07-16 Tom Tromey <tom@tromey.com>
4026 * buildsym.c (struct buildsym_compunit): Add constructor,
4027 destructor, initializers.
4028 (start_buildsym_compunit): Remove.
4029 (free_buildsym_compunit): Use "delete".
4030 (start_symtab, restart_symtab): Use "new".
4032 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
4034 * symfile.c (set_objfile_default_section_offset): Remove struct
4037 2018-07-14 Stafford Horne <shorne@gmail.com>
4039 * (Responsible Maintainers): Add myself as or1k maintainer.
4041 2018-07-13 Tom Tromey <tom@tromey.com>
4043 * symfile.c (set_objfile_default_section_offset): Use extra braces
4046 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4048 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4051 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4053 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4054 unittests/cli-utils-selftests.c
4055 * unittests/cli-utils-selftests.c: New file.
4057 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4059 * NEWS: Mention new commands. Mention change to 'thread apply'.
4061 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4063 * thread.c (thr_try_catch_cmd): New function.
4064 (thread_apply_all_command): Handle qcs flags.
4065 (thread_apply_command): Handle qcs flags.
4066 (taas_command): New function.
4067 (tfaas_command): New function.
4068 (_initialize_thread): Update to setup the new commands 'taas
4069 and 'tfaas'. Change doc string for 'thread apply'.
4071 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4073 * stack.c: (trailing_outermost_frame): New function, mostly
4074 extracted from backtrace_command_1.
4075 (leading_innermost_frame): New function.
4076 (backtrace_command_1): Update to call trailing_outermost_frame.
4077 (frame_apply_command_count): New function.
4078 (frame_apply_level_command): New function.
4079 (frame_apply_all_command): New function.
4080 (frame_apply_command): New function.
4081 (faas_command): New function.
4082 (frame_cmd_list): New variable.
4083 (_initialize_stack): Update to setup the new commands 'frame apply'
4086 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4088 * cli-utils.c (number_or_range_parser::get_number): Only handle
4089 numbers or convenience var as numbers.
4090 (parse_flags): New function.
4091 (parse_flags_qcs): New function.
4092 (number_or_range_parser::finished): Ensure parsing end is detected
4093 before end of string.
4094 * cli-utils.h (parse_flags): New function.
4095 (parse_flags_qcs): New function.
4096 (number_or_range_parser): Remove m_finished bool.
4097 (number_or_range_parser::skip_range): Set m_in_range to false.
4099 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
4101 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4104 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4105 Jan Kratochvil <jan.kratochvil@redhat.com>
4106 Paul Fertser <fercerpav@gmail.com>
4107 Tsutomu Seki <sekiriki@gmail.com>
4108 Pedro Alves <palves@redhat.com>
4110 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4111 'unittests/parse-connection-spec-selftests.c'.
4112 (COMMON_SFILES): Add 'common/netstuff.c'.
4113 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4114 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4115 * common/netstuff.c: New file.
4116 * common/netstuff.h: New file.
4117 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4118 (wait_for_connect): Update comment. New parameter
4119 'gdb::optional<int> sock' instead of 'struct serial *scb'.
4120 Use 'sock' directly instead of 'scb->fd'.
4121 (try_connect): New function, with code from 'net_open'.
4122 (net_open): Rewrite main loop to deal with multiple
4123 sockets/addresses. Handle IPv6-style hostnames; implement
4124 support for IPv6 connections.
4125 * unittests/parse-connection-spec-selftests.c: New file.
4127 2018-07-11 Pedro Alves <palves@redhat.com>
4130 * remote.c (remote_target::remote_detach_pid): Call
4131 set_current_process.
4133 2018-07-11 Pedro Alves <palves@redhat.com>
4135 * h8300-tdep.c (h8300_gdbarch_init): Remove
4136 set_gdbarch_ecoff_reg_to_regnum calls.
4138 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4141 * c-typeprint.c (c_type_print_base_struct_union): Don't print
4142 offsets/sizes for static members of a class/struct.
4144 2018-07-11 Alan Hayward <alan.hayward@arm.com>
4146 * target-descriptions.c (tdesc_register_bitsize): Rename.
4147 * target-descriptions.h (tdesc_register_bitsize): Likewise.
4148 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4149 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4151 2018-07-10 Tom Tromey <tom@tromey.com>
4153 * breakpoint.c (moribund_locations): Now static and a
4155 (breakpoint_init_inferior, moribund_breakpoint_here_p)
4156 (build_bpstat_chain, update_global_location_list)
4157 (breakpoint_retire_moribund): Update.
4158 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
4161 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4163 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4164 (riscv_register_reggroup_p): Use new function, remove unneeded
4166 (riscv_push_dummy_call): Extend assert to compare against xlen or
4167 flen based on register type.
4169 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4171 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4173 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
4175 * remote.c (show_hardware_watchpoint_limit): New function.
4176 (show_hardware_watchpoint_length_limit): New function.
4177 (show_hardware_breakpoint_limit): New function.
4178 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4179 where appropriate, update help text.
4181 2018-07-09 Tom Tromey <tom@tromey.com>
4183 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4184 (CLIBS): Don't mention NAT_CLIBS.
4186 2018-07-09 Tom Tromey <tom@tromey.com>
4188 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4189 (LIBGDB_OBS, clean mostlyclean): Update.
4190 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4192 2018-07-09 Tom Tromey <tom@tromey.com>
4194 * Makefile.in (%.c: %.y): Use ECHO_YACC.
4195 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
4196 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4198 2018-07-09 Tom Tromey <tom@tromey.com>
4200 * Makefile.in (ALLDEPFILES): Remove exec.c.
4201 (COMMON_OBS): Remove exec.o.
4202 (COMMON_SFILES): Add exec.c.
4204 2018-07-09 Tom Tromey <tom@tromey.com>
4206 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4208 2018-07-09 Tom Tromey <tom@tromey.com>
4210 * Makefile.in (clean mostlyclean): Remove stamp-version.
4211 (version.c): Depend on stamp-version.
4212 (stamp-version): New rule, from version.c rule.
4214 2018-07-09 Tom Tromey <tom@tromey.com>
4216 * Makefile.in (init.c): Depend on stamp-init.
4217 (stamp-init): New rule, from init.c rule.
4218 (clean mostlyclean): Remove stamp-init.
4220 2018-07-09 Tom Tromey <tom@tromey.com>
4222 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4223 SUBDIR_GCC_COMPILE_SRCS.
4225 2018-07-09 Tom Tromey <tom@tromey.com>
4227 * Makefile.in (init.c): Remove some unused sed rules.
4229 2018-07-09 Tom Tromey <tom@tromey.com>
4231 * Makefile.in (TSOBS): Remove.
4232 (INIT_FILES): Update.
4233 (LIBGDB_OBS): Update.
4234 (COMMON_SFILES): Add inflow.c.
4235 (SFILES): Remove inflow.c.
4237 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4239 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4241 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
4243 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4244 get_saveloc_name, is_signal_frame_name, step_name,
4245 init_remote_name, create_addr_space_name,
4246 destroy_addr_space_name, search_unwind_table_name,
4247 find_dyn_list_name): Constify.
4249 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
4251 * darwin-nat.c (darwin_pthread_kill): New function.
4252 (darwin_resume_thread): Use darwin_pthread_kill.
4254 2018-07-05 Tom de Vries <tdevries@suse.de>
4256 * macroexp.c (macro_buffer) <operator=>: New member function.
4258 2018-07-04 Tom Tromey <tom@tromey.com>
4260 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4262 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
4264 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4265 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4266 * maint.c: Likewise.
4269 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4271 * NEWS: Create a new section for the next release branch.
4272 Rename the section of the current branch, now that it has
4275 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4277 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4278 * version.in: Bump version to 8.2.50.DATE-git.
4280 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4281 Pedro Alves <palves@redhat.com>
4283 * linux-nat.c (linux_init_ptrace): Rename to ...
4284 (linux_init_ptrace_procfs): ... this. Call
4285 linux_proc_init_warnings.
4286 (linux_nat_target::post_attach)
4287 (linux_nat_target::post_startup_inferior): Adjust.
4288 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4289 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4291 2018-07-04 Tom de Vries <tdevries@suse.de>
4293 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4295 (read_comp_unit_head): ... here.
4297 2018-07-03 Tom Tromey <tom@tromey.com>
4299 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4300 (stop_tracing, tstatus_command)
4301 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4302 (print_one_static_tracepoint_marker): Update.
4303 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4305 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
4307 (all_tracepoints, static_tracepoints_here): Return std::vector.
4309 2018-07-03 Tom Tromey <tom@tromey.com>
4311 * common/ptid.c (ptid_equal): Remove.
4312 * common/ptid.h (ptid_equal): Don't declare.
4313 * ada-tasks.c: Update.
4314 * breakpoint.c: Update.
4315 * common/agent.c: Update.
4316 * corelow.c: Update.
4317 * darwin-nat-info.c: Update.
4318 * darwin-nat.c: Update.
4320 * dtrace-probe.c: Update.
4321 * dummy-frame.c: Update.
4322 * fbsd-nat.c: Update.
4324 * gdbthread.h: Update.
4325 * gnu-nat.c: Update.
4326 * go32-nat.c: Update.
4327 * inf-loop.c: Update.
4328 * inf-ptrace.c: Update.
4329 * infcall.c: Update.
4333 * linux-fork.c: Update.
4334 * linux-nat.c: Update.
4335 * linux-thread-db.c: Update.
4336 * mi/mi-cmd-var.c: Update.
4337 * mi/mi-interp.c: Update.
4338 * mi/mi-main.c: Update.
4339 * nto-procfs.c: Update.
4340 * ppc-linux-tdep.c: Update.
4342 * python/py-inferior.c: Update.
4343 * python/py-record-btrace.c: Update.
4344 * python/py-record.c: Update.
4345 * ravenscar-thread.c: Update.
4346 * regcache.c: Update.
4347 * remote-sim.c: Update.
4349 * sol-thread.c: Update.
4352 * tui/tui-stack.c: Update.
4354 * windows-nat.c: Update.
4355 * windows-tdep.c: Update.
4357 2018-07-03 Tom Tromey <tom@tromey.com>
4359 * common/ptid.c (ptid_match): Remove.
4360 * common/ptid.h (ptid_match): Don't declare.
4361 * fbsd-nat.c: Update.
4364 * linux-nat.c: Update.
4365 * record-btrace.c: Update.
4366 * regcache.c: Update.
4369 2018-07-03 Tom Tromey <tom@tromey.com>
4371 * common/ptid.c (ptid_tid_p): Remove.
4372 * common/ptid.h (ptid_tid_p): Don't declare.
4373 * sol-thread.c: Update.
4375 2018-07-03 Tom Tromey <tom@tromey.com>
4377 * common/ptid.c (ptid_lwp_p): Remove.
4378 * common/ptid.h (ptid_lwp_p): Don't declare.
4379 * fbsd-nat.c: Update.
4380 * linux-nat.c: Update.
4381 * nat/linux-procfs.c: Update.
4382 * nat/x86-linux-dregs.c: Update.
4383 * sol-thread.c: Update.
4385 2018-07-03 Tom Tromey <tom@tromey.com>
4387 * common/ptid.c (ptid_is_pid): Remove.
4388 * common/ptid.h (ptid_is_pid): Don't declare.
4390 * linux-nat.c: Update.
4391 * mi/mi-interp.c: Update.
4395 2018-07-03 Tom Tromey <tom@tromey.com>
4397 * common/ptid.c (ptid_get_tid): Remove.
4398 * common/ptid.h (ptid_get_tid): Don't declare.
4399 * ada-tasks.c: Update.
4400 * aix-thread.c: Update.
4401 * bsd-uthread.c: Update.
4402 * darwin-nat.c: Update.
4403 * fbsd-nat.c: Update.
4404 * i386-darwin-nat.c: Update.
4406 * linux-tdep.c: Update.
4407 * nto-procfs.c: Update.
4408 * ppc-ravenscar-thread.c: Update.
4409 * python/py-infthread.c: Update.
4410 * ravenscar-thread.c: Update.
4411 * sol-thread.c: Update.
4412 * sparc-ravenscar-thread.c: Update.
4413 * windows-nat.c: Update.
4415 2018-07-03 Tom Tromey <tom@tromey.com>
4417 * common/ptid.c (ptid_get_lwp): Remove.
4418 * common/ptid.h (ptid_get_lwp): Don't declare.
4419 * aarch64-linux-nat.c: Update.
4420 * ada-tasks.c: Update.
4421 * aix-thread.c: Update.
4422 * amd64-linux-nat.c: Update.
4423 * arm-linux-nat.c: Update.
4424 * corelow.c: Update.
4425 * fbsd-nat.c: Update.
4426 * fbsd-tdep.c: Update.
4427 * gnu-nat.c: Update.
4428 * i386-cygwin-tdep.c: Update.
4429 * i386-gnu-nat.c: Update.
4430 * i386-linux-nat.c: Update.
4431 * ia64-linux-nat.c: Update.
4432 * inf-ptrace.c: Update.
4434 * linux-fork.c: Update.
4435 * linux-nat.c: Update.
4436 * linux-tdep.c: Update.
4437 * linux-thread-db.c: Update.
4438 * mips-linux-nat.c: Update.
4439 * nat/aarch64-linux-hw-point.c: Update.
4440 * nat/aarch64-linux.c: Update.
4441 * nat/linux-btrace.c: Update.
4442 * nat/linux-osdata.c: Update.
4443 * nat/linux-procfs.c: Update.
4444 * nat/x86-linux-dregs.c: Update.
4445 * obsd-nat.c: Update.
4446 * ppc-fbsd-nat.c: Update.
4447 * ppc-linux-nat.c: Update.
4449 * python/py-infthread.c: Update.
4450 * ravenscar-thread.c: Update.
4452 * s390-linux-nat.c: Update.
4453 * sol-thread.c: Update.
4454 * sol2-tdep.c: Update.
4455 * spu-linux-nat.c: Update.
4456 * x86-linux-nat.c: Update.
4457 * xtensa-linux-nat.c: Update.
4459 2018-07-03 Tom Tromey <tom@tromey.com>
4461 * common/ptid.c (ptid_get_pid): Remove.
4462 * common/ptid.h (ptid_get_pid): Don't declare.
4463 * aarch64-linux-nat.c: Update.
4464 * ada-lang.c: Update.
4465 * aix-thread.c: Update.
4466 * alpha-bsd-nat.c: Update.
4467 * amd64-fbsd-nat.c: Update.
4468 * amd64-linux-nat.c: Update.
4469 * arm-linux-nat.c: Update.
4470 * arm-nbsd-nat.c: Update.
4472 * break-catch-syscall.c: Update.
4473 * breakpoint.c: Update.
4474 * bsd-uthread.c: Update.
4475 * corelow.c: Update.
4477 * darwin-nat.c: Update.
4478 * fbsd-nat.c: Update.
4479 * fbsd-tdep.c: Update.
4481 * gnu-nat.c: Update.
4482 * hppa-nbsd-nat.c: Update.
4483 * hppa-obsd-nat.c: Update.
4484 * i386-fbsd-nat.c: Update.
4485 * ia64-linux-nat.c: Update.
4486 * inf-ptrace.c: Update.
4488 * inferior.c: Update.
4489 * inferior.h: Update.
4492 * linux-fork.c: Update.
4493 * linux-nat.c: Update.
4494 * linux-tdep.c: Update.
4495 * linux-thread-db.c: Update.
4496 * m68k-bsd-nat.c: Update.
4497 * mi/mi-interp.c: Update.
4498 * mi/mi-main.c: Update.
4499 * mips-linux-nat.c: Update.
4500 * mips-nbsd-nat.c: Update.
4501 * mips64-obsd-nat.c: Update.
4502 * nat/aarch64-linux-hw-point.c: Update.
4503 * nat/aarch64-linux.c: Update.
4504 * nat/linux-btrace.c: Update.
4505 * nat/linux-osdata.c: Update.
4506 * nat/linux-procfs.c: Update.
4507 * nat/x86-linux-dregs.c: Update.
4508 * nto-procfs.c: Update.
4509 * obsd-nat.c: Update.
4510 * ppc-linux-nat.c: Update.
4511 * ppc-nbsd-nat.c: Update.
4512 * ppc-obsd-nat.c: Update.
4513 * proc-service.c: Update.
4515 * python/py-inferior.c: Update.
4516 * python/py-infthread.c: Update.
4517 * ravenscar-thread.c: Update.
4519 * remote-sim.c: Update.
4521 * rs6000-nat.c: Update.
4522 * s390-linux-nat.c: Update.
4523 * sh-nbsd-nat.c: Update.
4524 * sol-thread.c: Update.
4525 * sparc-nat.c: Update.
4526 * sparc64-tdep.c: Update.
4527 * spu-linux-nat.c: Update.
4528 * spu-tdep.c: Update.
4529 * target-debug.h: Update.
4532 * tid-parse.c: Update.
4533 * tracefile-tfile.c: Update.
4534 * vax-bsd-nat.c: Update.
4535 * windows-nat.c: Update.
4536 * x86-linux-nat.c: Update.
4537 * x86-nat.c: Update.
4539 2018-07-03 Tom Tromey <tom@tromey.com>
4541 * common/ptid.c (pid_to_ptid): Remove.
4542 * common/ptid.h (pid_to_ptid): Don't declare.
4543 * aix-thread.c: Update.
4544 * arm-linux-nat.c: Update.
4545 * common/ptid.c: Update.
4546 * common/ptid.h: Update.
4547 * corelow.c: Update.
4549 * darwin-nat.c: Update.
4550 * fbsd-nat.c: Update.
4551 * fork-child.c: Update.
4552 * gnu-nat.c: Update.
4553 * go32-nat.c: Update.
4554 * inf-ptrace.c: Update.
4556 * inferior.c: Update.
4558 * linux-fork.c: Update.
4559 * linux-nat.c: Update.
4560 * nat/aarch64-linux-hw-point.c: Update.
4561 * nat/fork-inferior.c: Update.
4562 * nat/x86-linux-dregs.c: Update.
4563 * nto-procfs.c: Update.
4564 * obsd-nat.c: Update.
4566 * progspace.c: Update.
4568 * rs6000-nat.c: Update.
4569 * s390-linux-nat.c: Update.
4570 * sol-thread.c: Update.
4571 * spu-linux-nat.c: Update.
4574 * tracefile-tfile.c: Update.
4575 * windows-nat.c: Update.
4577 2018-07-03 Tom Tromey <tom@tromey.com>
4579 * common/ptid.h (ptid_build): Don't declare.
4580 * common/ptid.c (ptid_build): Remove.
4581 * aix-thread.c: Update.
4582 * bsd-kvm.c: Update.
4583 * bsd-uthread.c: Update.
4584 * common/agent.c: Update.
4585 * common/ptid.c: Update.
4586 * common/ptid.h: Update.
4587 * corelow.c: Update.
4588 * darwin-nat.c: Update.
4589 * fbsd-nat.c: Update.
4590 * gnu-nat.c: Update.
4591 * linux-fork.c: Update.
4592 * linux-nat.c: Update.
4593 * linux-thread-db.c: Update.
4594 * nat/linux-osdata.c: Update.
4595 * nat/linux-procfs.c: Update.
4596 * nto-procfs.c: Update.
4597 * obsd-nat.c: Update.
4598 * proc-service.c: Update.
4600 * ravenscar-thread.c: Update.
4601 * remote-sim.c: Update.
4603 * sol-thread.c: Update.
4605 * windows-nat.c: Update.
4607 2018-07-03 Tom Tromey <tom@tromey.com>
4609 * infrun.c (follow_exec): Use exit_inferior_silent.
4610 * inferior.c (exit_inferior_num_silent): Remove.
4611 * inferior.h (exit_inferior_num_silent): Don't declare.
4613 2018-07-03 Tom Tromey <tom@tromey.com>
4616 * darwin-nat.c (darwin_attach_pid): Reset inferior and
4617 inferior_ptid on error.
4619 2018-07-02 Maciej W. Rozycki <macro@mips.com>
4620 Simon Marchi <simon.marchi@polymtl.ca>
4623 * disasm.h (gdb_disassembler): Add
4624 `m_disassembler_options_holder'. member
4625 * disasm.c (get_all_disassembler_options): New function.
4626 (gdb_disassembler::gdb_disassembler): Use it.
4627 (gdb_buffered_insn_length_init_dis): Likewise.
4628 (gdb_buffered_insn_length): Adjust accordingly.
4629 (set_disassembler_options): Handle options with arguments.
4630 (show_disassembler_options_sfunc): Likewise. Add a leading new
4631 line if showing options with descriptions.
4632 (disassembler_options_completer): Adapt to using the
4633 `disasm_options_and_args_t' structure.
4634 * mips-tdep.c (mips_disassembler_options): New variable.
4635 (mips_disassembler_options_o32): Likewise.
4636 (mips_disassembler_options_n32): Likewise.
4637 (mips_disassembler_options_n64): Likewise.
4638 (gdb_print_insn_mips): Don't set `disassembler_options'.
4639 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4641 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4642 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
4643 `gdbarch_disassembler_options_implicit' and
4644 `gdbarch_valid_disassembler_options'.
4645 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4646 `disasm_options_and_args_t' structure.
4647 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4649 (valid_disassembler_options): Switch from `disasm_options_t' to
4650 the `disasm_options_and_args_t' structure.
4651 * NEWS: Document `set disassembler-options' support for the MIPS
4653 * gdbarch.h: Regenerate.
4654 * gdbarch.c: Regenerate.
4656 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
4658 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4660 2018-06-29 Joel Brobecker <brobecker@adacore.com>
4662 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4663 parameter in call to amd64_target_description.
4664 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4665 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4666 (amd64fbsd_init_abi): Likewise.
4667 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4668 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4669 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4670 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4672 2018-06-29 Pedro Alves <palves@redhat.com>
4674 * gdb/amd64-tdep.h (amd64_create_target_description): Add
4675 "segments" parameter.
4676 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4677 (_initialize_amd64_tdep): Update call to
4678 amd64_create_target_description.
4679 (amd64_target_description): Add "segments" parameter. Adjust
4680 the implementation to use it.
4681 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4682 call to amd64_create_target_description.
4683 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4684 * gdb/arch/amd64.h (amd64_create_target_description): Add
4685 "segments" register.
4686 * gdb/arch/amd64.c (amd64_create_target_description): Add
4687 "segments" parameter. Call create_feature_i386_64bit_segments
4688 only if SEGMENTS is true.
4689 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4690 call to amd64_create_target_description.
4692 2018-06-29 Pedro Alves <palves@redhat.com>
4694 * thread.c (thread_target_id_str): New, factored out from ...
4695 (print_thread_info_1): ... here. Use it to compute the max
4696 "Target Id" column width.
4698 2018-06-29 Pedro Alves <palves@redhat.com>
4700 * remote.c (remote_target::extra_thread_info): Delete
4701 'display_buf' and 'n' locals. from the cache, regardless of
4702 packet mechanims is in use. Use cache for qThreadExtra and qP
4705 2018-06-29 Pedro Alves <palves@redhat.com>
4707 * blockframe.c (find_pc_sect_containing_function): New function.
4708 * breakpoint.c (print_breakpoint_location): Don't call
4709 find_pc_sect_function.
4710 * linespec.c (create_sals_line_offset): Record the location's
4712 * linespec.c (convert_address_location_to_sals): Fill in sal's
4713 symbol with find_pc_sect_containing_function.
4714 * symtab.c (find_function_start_sal): Rename to ...
4715 (find_function_start_sal_1): ... this.
4716 (find_function_start_sal): Reimplement as wrapper around
4717 find_function_start_sal_1, and use
4718 find_pc_sect_containing_function to fill in the sal's symbol.
4719 (find_function_start_sal(symbol*, bool)): Adjust.
4720 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4722 (find_pc_sect_containing_function): Declare.
4724 2018-06-29 Pedro Alves <palves@redhat.com>
4726 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4727 true if the the location has no symbol.
4729 2018-06-28 Tom Tromey <tom@tromey.com>
4731 * NEWS: Mention --enable-codesign.
4732 * silent-rules.mk (ECHO_SIGN): New variable.
4733 * configure.ac: Add --enable-codesign.
4734 * configure: Rebuild.
4735 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4736 (gdb$(EXEEXT)): Optionally invoke codesign.
4738 2018-06-28 Pedro Alves <palves@redhat.com>
4740 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4742 (switch_to_thread_no_regs): Adjust comment.
4743 * infcmd.c (stop_pc): Delete.
4744 (post_create_inferior, info_program_command): Replace references
4745 to stop_pc with references to thread_info->suspend.stop_pc.
4746 * inferior.h (stop_pc): Delete declaration.
4747 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4748 (handle_inferior_event_1, handle_signal_stop)
4749 (process_event_stop_test, keep_going_stepped_thread)
4750 (handle_step_into_function, handle_step_into_function_backward)
4751 (print_stop_location): Replace references to stop_pc with
4752 references to thread_info->suspend.stop_pc.
4753 (struct infcall_suspend_state) <stop_pc>: Delete field.
4754 (save_infcall_suspend_state, restore_infcall_suspend_state):
4755 Remove references to inf_stat->stop_pc.
4756 * linux-fork.c (fork_load_infrun_state): Likewise.
4757 * record-btrace.c (record_btrace_set_replay): Likewise.
4758 * record-full.c (record_full_goto_entry): Likewise.
4759 * remote.c (print_one_stopped_thread): Likewise.
4760 * target.c (target_resume): Extend comment.
4761 * thread.c (set_executing_thread): New.
4762 (set_executing): Use it.
4763 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4764 Remove references to stop_pc.
4766 2018-06-28 Pedro Alves <palves@redhat.com>
4768 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4769 Moving fetching stop_pc until after ecs->event_thread is refreshed.
4771 2018-06-28 Tom Tromey <tom@tromey.com>
4773 * coffread.c (coff_symfile_finish): Update.
4774 * xcoffread.c (xcoff_symfile_finish): Update.
4775 * elfread.c (elf_symfile_finish): Update.
4776 * symfile.h (dwarf2_free_objfile): Don't declare.
4777 * dwarf2read.c (_initialize_dwarf2_read): Use
4778 register_objfile_data_with_cleanup.
4779 (dwarf2_free_objfile): Now static. Change signature.
4781 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4783 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4784 option "-o" to add-symbol-file-load to add an offset to each
4785 section's load address.
4786 * symfile.c (set_objfile_default_section_offset): New function.
4788 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4790 * symfile.c (add_symbol_file_command): Make sure that sections
4791 with the same name are sorted in the same order.
4793 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4795 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4796 require the second argument. If omitted, load sections at the
4797 addresses specified in the file.
4799 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4801 * symfile.c (symbol_file_command, symbol_file_add_main_1)
4802 (_initialize_symfile): Add option "-o" to symbol-file to add an
4803 offset to each section of the symbol file.
4805 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4807 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4809 2018-06-27 Tom Tromey <tom@tromey.com>
4811 * stack.c (_initialize_stack): Update "func" help text.
4813 2018-06-27 Tom Tromey <tom@tromey.com>
4815 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4817 (unwind_infopy_str, pyuw_create_unwind_info)
4818 (unwind_infopy_add_saved_register, pyuw_sniffer)
4819 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4821 (struct saved_reg): Add constructor.
4822 <value>: Now a gdbpy_ref<>.
4824 2018-06-27 Tom Tromey <tom@tromey.com>
4826 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4828 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4830 * gdb-gdb.py.in: Format using autopep8.
4832 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4834 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4835 (type_lookup_function): Recognize CORE_ADDR values.
4837 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4839 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4842 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4844 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4847 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4849 * gdb-gdb.py: Move to...
4850 * gdb-gdb.py.in: ... here.
4851 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4852 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4854 (distclean): Remove gdb-gdb.py when cleaning.
4855 (gdb-gdb.py, gdb-gdb.gdb): New rules.
4856 * configure: Re-generate.
4858 2018-06-27 Pedro Alves <palves@redhat.com>
4860 * proc-service.c (get_ps_regcache): New.
4861 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4862 (ps_lsetfpregs): Use it.
4864 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
4867 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4868 (dwarf_decode_lines_1): Adjust.
4870 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4872 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4874 <info_proc>: Likewise.
4876 2018-06-26 Joel Brobecker <brobecker@adacore.com>
4878 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4879 to windows_fetch_one_register, and only handle the case of
4880 fetching one register. Move the code that reloads the context
4881 and iterates over all registers if R is negative to...
4882 (windows_nat_target::fetch_registers): ... here.
4883 (do_windows_store_inferior_registers): Rename to
4884 windows_store_one_register, and only handle the case of storing
4885 one register. Move the code that handles the case where r is
4887 (windows_nat_target::store_registers) ... here.
4889 2018-06-26 Tom Tromey <tom@tromey.com>
4892 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4893 * rust-lang.c (rust_print_struct_def): Add podata parameter.
4895 (rust_internal_print_type): Add podata parameter.
4896 (rust_print_type): Update.
4898 2018-06-26 Tom Tromey <tom@tromey.com>
4900 * typeprint.h (struct print_offset_data) <update, finish,
4901 maybe_print_hole>: New methods.
4902 <indentation>: New constant.
4903 * typeprint.c (print_offset_data::indentation): Define.
4904 (print_offset_data::maybe_print_hole, print_offset_data::update)
4905 (print_offset_data::finish): Move from c-typeprint.c and rename.
4906 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4907 (print_spaces_filtered_with_print_options): Update.
4908 (c_print_type_union_field_offset, maybe_print_hole)
4909 (c_print_type_struct_field_offset): Move to typeprint.c and
4911 (c_type_print_base_struct_union): Update.
4913 2018-06-25 Pedro Alves <palves@redhat.com>
4915 * gdbthread.h (thread_info_ref, delete_thread)
4916 (delete_thread_silent, first_thread_of_inferior)
4917 (any_thread_of_inferior, switch_to_thread)
4918 (enable_thread_stack_temporaries)
4919 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4920 (get_last_thread_stack_temporary)
4921 (value_in_thread_stack_temporaries, can_access_registers_thread):
4922 Spell out "struct thread_info" instead of just "thread_info".
4923 * inferior.h (notice_new_inferior): Likewise.
4925 2018-06-25 Pedro Alves <palves@redhat.com>
4927 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4928 pass thread_info pointer to delete_thread.
4929 (windows_nat_target::detach): Pass inferior pointer to
4931 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4933 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4934 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4935 and pass a thread_info pointer to delete_thread.
4936 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4937 pass thread_info pointer to delete_thread.
4938 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4939 delete_thread_silent call.
4940 * procfs.c (procfs_target::detach): Pass inferior pointer to
4942 (procfs_target::wait): Pass thread_info pointer to delete_thread.
4943 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4944 delete_thread_silent call.
4945 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4946 pass thread_info pointer to delete_thread.
4947 (windows_nat_target::detach): Pass inferior pointer to
4950 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4952 * regcache.c (readable_regcache::read_part): Fix asserts.
4953 (reg_buffer::raw_collect_part): New function.
4954 (regcache::write_part): Fix asserts.
4955 (reg_buffer::raw_supply_part): New function.
4956 (regcache::transfer_regset_register): New helper function.
4957 (regcache::transfer_regset): Call new functions.
4958 (regcache_supply_regset): Use gdb_byte*.
4959 (regcache::supply_regset): Likewise.
4960 (regcache_collect_regset): Likewise.
4961 (regcache::collect_regset): Likewise.
4962 * regcache.h (reg_buffer::raw_collect_part): New declaration.
4963 (reg_buffer::raw_supply_part): Likewise.
4964 (regcache::transfer_regset_register): Likewise.
4965 (regcache::transfer_regset): Use gdb_byte*.
4967 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4969 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4971 2018-06-21 Pedro Alves <palves@redhat.com>
4973 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4974 instead of a ptid_t. All callers adjusted.
4975 * ada-tasks.c (ada_get_task_number): Likewise. All callers
4977 (print_ada_task_info, display_current_task_id, task_command_1):
4979 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4981 (breakpoint_kind): Adjust.
4982 (remove_breakpoints_pid): Rename to ...
4983 (remove_breakpoints_inf): ... this. Adjust to take an inferior
4984 pointer. All callers adjusted.
4985 (bpstat_clear_actions): Use inferior_thread.
4986 (get_bpstat_thread): New.
4987 (bpstat_do_actions): Use it.
4988 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4989 to take a thread_info pointer. All callers adjusted.
4990 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4991 (breakpoint_re_set_thread): Use inferior_thread.
4992 * breakpoint.h (struct inferior): Forward declare.
4993 (bpstat_stop_status): Update.
4994 (remove_breakpoints_pid): Delete.
4995 (remove_breakpoints_inf): New.
4996 * bsd-uthread.c (bsd_uthread_target::wait)
4997 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4998 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4999 (maint_btrace_packet_history_cmd)
5000 (maint_btrace_clear_packet_history_cmd): Adjust.
5001 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5003 * cli/cli-interp.c: Include "inferior.h".
5004 * common/refcounted-object.h (struct
5005 refcounted_object_ref_policy): New.
5006 * compile/compile-object-load.c: Include gdbthread.h.
5007 (store_regs): Use inferior_thread.
5008 * corelow.c (core_target::close): Use current_inferior.
5009 (core_target_open): Adjust to use first_thread_of_inferior and use
5010 the current inferior.
5011 * ctf.c (ctf_target::close): Adjust to use current_inferior.
5012 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5013 <thread>: ... this new field. All references adjusted.
5014 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5015 Take a thread_info pointer instead of a ptid_t.
5016 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5017 (dummy_frame_discard, register_dummy_frame_dtor): Take a
5018 thread_info pointer instead of a ptid_t.
5019 * elfread.c: Include "inferior.h".
5020 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5021 Use inferior_thread.
5022 * eval.c (evaluate_subexp): Likewise.
5023 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5025 * gdb_proc_service.h (struct thread_info): Forward declare.
5026 (struct ps_prochandle) <ptid>: Delete, replaced by ...
5027 <thread>: ... this new field. All references adjusted.
5028 * gdbarch.h, gdbarch.c: Regenerate.
5029 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5030 'thread' parameter. All implementations and callers adjusted.
5031 * gdbthread.h (thread_info) <set_running>: New method.
5032 (delete_thread, delete_thread_silent): Take a thread_info pointer
5034 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5035 (first_thread_of_process): Delete, replaced by ...
5036 (first_thread_of_inferior): ... this new function. All callers
5038 (any_live_thread_of_process): Delete, replaced by ...
5039 (any_live_thread_of_inferior): ... this new function. All callers
5041 (switch_to_thread, switch_to_no_thread): Declare.
5042 (is_executing): Delete.
5043 (enable_thread_stack_temporaries): Update comment.
5044 <enable_thread_stack_temporaries>: Take a thread_info pointer
5045 instead of a ptid_t. Incref the thread.
5046 <~enable_thread_stack_temporaries>: Decref the thread.
5049 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5050 (get_last_thread_stack_temporary)
5051 (value_in_thread_stack_temporaries, can_access_registers_thread):
5052 Take a thread_info pointer instead of a ptid_t. All callers
5054 * infcall.c (get_call_return_value): Use inferior_thread.
5055 (run_inferior_call): Work with thread pointers instead of ptid_t.
5056 (call_function_by_hand_dummy): Work with thread pointers instead
5057 of ptid_t. Use thread_info_ref.
5058 * infcmd.c (proceed_thread_callback): Access thread's state
5060 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5061 access thread's state directly.
5062 (continue_command): Use inferior_thread.
5063 (info_program_command): Use find_thread_ptid and access thread
5065 (proceed_after_attach_callback): Use thread state directly.
5066 (notice_new_inferior): Take a thread_info pointer instead of a
5067 ptid_t. All callers adjusted.
5068 (exit_inferior): Take an inferior pointer instead of a pid. All
5070 (exit_inferior_silent): New.
5071 (detach_inferior): Delete.
5072 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5073 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5074 (detach_inferior_command, kill_inferior_command): Use
5075 find_inferior_id instead of valid_gdb_inferior_id and
5076 gdb_inferior_id_to_pid.
5077 (inferior_command): Use inferior and thread pointers.
5078 * inferior.h (struct thread_info): Forward declare.
5079 (notice_new_inferior): Take a thread_info pointer instead of a
5080 ptid_t. All callers adjusted.
5081 (detach_inferior): Delete declaration.
5082 (exit_inferior, exit_inferior_silent): Take an inferior pointer
5083 instead of a pid. All callers adjusted.
5084 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5085 (valid_gdb_inferior_id): Delete.
5086 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5087 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5088 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5090 <inf>: ... this new field.
5091 <step_ptid>: Delete, replaced by ...
5092 <step_thread>: ... this new field.
5093 (get_displaced_stepping_state): Take an inferior pointer instead
5094 of a pid. All callers adjusted.
5095 (displaced_step_in_progress_any_inferior): Adjust.
5096 (displaced_step_in_progress_thread): Take a thread pointer instead
5097 of a ptid_t. All callers adjusted.
5098 (displaced_step_in_progress, add_displaced_stepping_state): Take
5099 an inferior pointer instead of a pid. All callers adjusted.
5100 (get_displaced_step_closure_by_addr): Adjust.
5101 (remove_displaced_stepping_state): Take an inferior pointer
5102 instead of a pid. All callers adjusted.
5103 (displaced_step_prepare_throw, displaced_step_prepare)
5104 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5105 All callers adjusted.
5106 (start_step_over): Adjust.
5107 (infrun_thread_ptid_changed): Remove bit updating ptids in the
5108 displaced step queue.
5109 (do_target_resume): Adjust.
5110 (fetch_inferior_event): Use inferior_thread.
5111 (context_switch, get_inferior_stop_soon): Take an
5112 execution_control_state pointer instead of a ptid_t. All callers
5114 (switch_to_thread_cleanup): Delete.
5115 (stop_all_threads): Use scoped_restore_current_thread.
5116 * inline-frame.c: Include "gdbthread.h".
5117 (inline_state) <inline_state>: Take a thread pointer instead of a
5118 ptid_t. All callers adjusted.
5119 <ptid>: Delete, replaced by ...
5120 <thread>: ... this new field.
5121 (find_inline_frame_state): Take a thread pointer instead of a
5122 ptid_t. All callers adjusted.
5123 (skip_inline_frames, step_into_inline_frame)
5124 (inline_skipped_frames, inline_skipped_symbol): Take a thread
5125 pointer instead of a ptid_t. All callers adjusted.
5126 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5127 (inline_skipped_frames, inline_skipped_symbol): Likewise.
5128 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5130 * linux-nat.c (get_detach_signal): Likewise.
5131 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5132 (thread_db_notice_clone): Adjust.
5133 (thread_db_find_new_threads_silently)
5134 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5135 a thread pointer instead of a ptid_t. All callers adjusted.
5136 * mi/mi-cmd-var.c: Include "inferior.h".
5137 (mi_cmd_var_update_iter): Update to use thread pointers.
5138 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5140 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5142 (mi_output_running): ... this new function.
5143 (mi_on_resume_1): Adjust to use it.
5144 (mi_user_selected_context_changed): Adjust to use inferior_thread.
5145 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5147 (interrupt_thread_callback): : Adjust to use thread and inferior
5149 * proc-service.c: Include "gdbthread.h".
5150 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5151 * progspace-and-thread.c: Include "inferior.h".
5152 * progspace.c: Include "inferior.h".
5153 * python/py-exitedevent.c (create_exited_event_object): Adjust to
5154 hold a reference to an inferior_object.
5155 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5157 * python/py-inferior.c (struct inferior_object): Give the type a
5158 tag name instead of a typedef.
5159 (python_on_normal_stop): No need to check if the current thread is
5161 (inferior_to_inferior_object): Change return type to
5162 inferior_object. All callers adjusted.
5163 (find_thread_object): Delete, bits factored out to ...
5164 (thread_to_thread_object): ... this new function.
5165 * python/py-infthread.c (create_thread_object): Use
5166 inferior_to_inferior_object.
5167 (thpy_is_stopped): Use thread pointer directly.
5168 (gdbpy_selected_thread): Use inferior_thread.
5169 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5170 field, replaced with ...
5171 <thread>: ... this new field. All users adjusted.
5172 (btpy_insn_or_gap_new): Drop const.
5173 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
5175 * python/py-record.c: Include "gdbthread.h".
5176 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5177 a ptid_t. All callers adjusted.
5178 (gdbpy_current_recording): Use inferior_thread.
5179 * python/py-record.h (recpy_record_object) <ptid>: Delete
5180 field, replaced with ...
5181 <thread>: ... this new field. All users adjusted.
5182 (recpy_element_object) <ptid>: Delete
5183 field, replaced with ...
5184 <thread>: ... this new field. All users adjusted.
5185 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5186 a ptid_t. All callers adjusted.
5187 * python/py-threadevent.c: Include "gdbthread.h".
5188 (get_event_thread): Use thread_to_thread_object.
5189 * python/python-internal.h (struct inferior_object): Forward
5191 (find_thread_object, find_inferior_object): Delete declarations.
5192 (thread_to_thread_object, inferior_to_inferior_object): New
5194 * record-btrace.c: Include "inferior.h".
5195 (require_btrace_thread): Use inferior_thread.
5196 (record_btrace_frame_sniffer)
5197 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5198 (get_thread_current_frame): Use scoped_restore_current_thread and
5200 (get_thread_current_frame): Use thread pointer directly.
5201 (record_btrace_replay_at_breakpoint): Use thread's inferior
5203 * record-full.c: Include "inferior.h".
5204 * regcache.c: Include "gdbthread.h".
5205 (get_thread_arch_regcache): Use the inferior's address space
5207 (get_thread_regcache, registers_changed_thread): New.
5208 * regcache.h (get_thread_regcache(thread_info *thread)): New
5210 (registers_changed_thread): New.
5211 (remote_target) <remote_detach_1>: Swap order of parameters.
5212 (remote_add_thread): <remote_add_thread>: Return the new thread.
5213 (get_remote_thread_info(ptid_t)): New overload.
5214 (remote_target::remote_notice_new_inferior): Use thread pointers
5216 (remote_target::process_initial_stop_replies): Use
5217 thread_info::set_running.
5218 (remote_target::remote_detach_1, remote_target::detach)
5219 (extended_remote_target::detach): Adjust.
5220 * stack.c (frame_show_address): Use inferior_thread.
5221 * target-debug.h (target_debug_print_thread_info_pp): New.
5222 * target-delegates.c: Regenerate.
5223 * target.c (default_thread_address_space): Delete.
5224 (memory_xfer_partial_1): Use current_inferior.
5225 (target_detach): Use current_inferior.
5226 (target_thread_address_space): Delete.
5227 (generic_mourn_inferior): Use current_inferior.
5228 * target.h (struct target_ops) <thread_address_space>: Delete.
5229 (target_thread_address_space): Delete.
5230 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
5232 (delete_thread_1, delete_thread, delete_thread_silent): Take a
5233 thread pointer instead of a ptid_t. Adjust all callers.
5234 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5235 (first_thread_of_process): Delete, replaced by ...
5236 (first_thread_of_inferior): ... this new function. All callers
5238 (any_thread_of_process): Rename to ...
5239 (any_thread_of_inferior): ... this, and take an inferior pointer.
5240 (any_live_thread_of_process): Rename to ...
5241 (any_live_thread_of_inferior): ... this, and take an inferior
5243 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5244 (value_in_thread_stack_temporaries)
5245 (get_last_thread_stack_temporary): Take a thread pointer instead
5246 of a ptid_t. Adjust all callers.
5247 (thread_info::set_running): New.
5248 (validate_registers_access): Use inferior_thread.
5249 (can_access_registers_ptid): Rename to ...
5250 (can_access_registers_thread): ... this, and take a thread
5252 (print_thread_info_1): Adjust to compare thread pointers instead
5254 (switch_to_no_thread, switch_to_thread): Make extern.
5255 (scoped_restore_current_thread::~scoped_restore_current_thread):
5256 Use m_thread pointer directly.
5257 (scoped_restore_current_thread::scoped_restore_current_thread):
5258 Use inferior_thread.
5259 (thread_command): Use thread pointer directly.
5260 (thread_num_make_value_helper): Use inferior_thread.
5261 * top.c (execute_command): Use inferior_thread.
5262 * tui/tui-interp.c: Include "inferior.h".
5263 * varobj.c (varobj_create): Use inferior_thread.
5264 (value_of_root_1): Use find_thread_global_id instead of
5265 global_thread_id_to_ptid.
5267 2018-06-21 Alan Hayward <alan.hayward@arm.com>
5269 * regcache.c (readable_regcache::read_part): Avoid memcpy when
5271 (regcache::write_part): Likewise.
5272 (readable_regcache::cooked_read_part): Update comment.
5273 (readable_regcache::cooked_write_part): Likewise.
5274 * regcache.h: (readable_regcache::read_part): Likewise.
5275 (regcache::write_part): Likewise.
5277 2018-06-21 Richard Bunt <richard.bunt@arm.com>
5278 Dirk Schubert <dirk.schubert@arm.com>
5280 * aarch64-linux-nat.c (post_attach): New.
5281 (aarch64_linux_nat_target::post_attach): Override post_attach to
5282 record the number of hardware debug registers.
5284 2018-06-20 Tom Tromey <tom@tromey.com>
5286 * python/py-param.c (add_setshow_generic): Make parameters const.
5287 (parmpy_init): Update.
5289 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5291 * regcache.h (regcache_cooked_read_ftype): Rename to...
5292 (register_read_ftype): ...this, change type to function_view.
5293 (class reg_buffer) <save>: Remove src parameter.
5294 (readonly_detached_regcache) <readonly_detached_regcache>: Make
5295 parameter non-const in first overload. Remove src parameter in
5297 * regcache.c (do_cooked_read): Remove.
5298 (readonly_detached_regcache::readonly_detached_regcache): Make
5299 parameter non-const, adjust call to other constructor.
5300 (reg_buffer::save): Remove src parameter.
5301 * frame.c (do_frame_register_read): Remove.
5302 (frame_save_as_regcache): Use lambda function.
5303 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5304 parameter to ppu2spu_data *.
5305 (ppu2spu_sniffer): Use lambda function.
5307 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5309 * record-full.c (record_full_target::insert_breakpoint): Remove
5310 "struct" keyword, add const.
5312 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5314 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5315 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5316 * configure.ac: Remove AC_PREREQ, add missing quoting.
5317 * gnulib/configure.ac: Modernize usage of
5318 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
5319 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5320 (AUTOMAKE_VERSION): Bump to 1.15.1.
5321 * configure: Re-generate.
5322 * config.in: Re-generate.
5323 * aclocal.m4: Re-generate.
5324 * gnulib/aclocal.m4: Re-generate.
5325 * gnulib/config.in: Re-generate.
5326 * gnulib/configure: Re-generate.
5327 * gnulib/import/Makefile.in: Re-generate.
5329 2018-06-19 Pedro Alves <palves@redhat.com>
5331 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5332 (lookup_minimal_symbol_by_pc_section): ... here with
5333 gdb_assert_not_reached added.
5335 2018-06-19 Pedro Alves <palves@redhat.com>
5337 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5338 parameter with a block parameter. Compare location's block symbol
5339 with the frame's block instead of addresses.
5340 (skip_inline_frames): Pass the current block instead of the
5341 frame's address. Break out as soon as we determine the frame
5342 should not be skipped.
5344 2018-06-18 Tom Tromey <tom@tromey.com>
5346 * solib-aix.c (solib_aix_get_section_offsets): Return
5348 (solib_aix_solib_create_inferior_hook): Update.
5350 2018-06-18 Tom Tromey <tom@tromey.com>
5352 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5354 2018-06-18 Tom Tromey <tom@tromey.com>
5356 * solib-frv.c (frv_relocate_main_executable): Use
5358 * solib-dsbt.c (dsbt_relocate_main_executable): Use
5361 2018-06-18 Tom Tromey <tom@tromey.com>
5363 * objfiles.h (inhibit_section_map_updates): Update.
5364 (resume_section_map_updates, resume_section_map_updates_cleanup):
5366 * solib-svr4.c (svr4_handle_solib_event): Update.
5367 * objfiles.c (inhibit_section_map_updates): Return
5368 scoped_restore_tmpl<int>.
5369 (resume_section_map_updates, resume_section_map_updates_cleanup):
5372 2018-06-18 Tom Tromey <tom@tromey.com>
5374 * valprint.h (read_string): Update.
5375 * valprint.c (read_string): Change type of "buffer".
5376 (val_print_string): Update.
5377 * python/py-value.c (valpy_string): Update.
5378 * language.h (struct language_defn) <la_get_string>: Change
5380 (default_get_string, c_get_string): Update.
5381 * language.c (default_get_string): Change type of "buffer".
5382 * guile/scm-value.c (gdbscm_value_to_string): Update.
5383 * c-lang.c (c_get_string): Change type of "buffer".
5385 2018-06-18 Tom Tromey <tom@tromey.com>
5387 * ser-mingw.c (struct pipe_state_destroyer): New.
5388 (pipe_state_up): New typedef.
5389 (cleanup_pipe_state): Remove.
5390 (pipe_windows_open): Use pipe_state_up. Don't release argv.
5392 2018-06-18 Tom Tromey <tom@tromey.com>
5394 * rust-lang.h (rust_yyerror): Don't declare.
5395 * rust-lang.c (rust_language_defn): Update.
5396 * rust-exp.y (yyerror): Now static.
5397 * parse.c (parse_exp_in_context_1): Update.
5398 * p-lang.h (p_yyerror): Don't declare.
5399 * p-lang.c (p_language_defn): Update.
5400 * p-exp.y (yyerror): Now static.
5401 * opencl-lang.c (opencl_language_defn): Update.
5402 * objc-lang.c (objc_language_defn): Update.
5403 * m2-lang.h (m2_yyerror): Don't declare.
5404 * m2-lang.c (m2_language_defn): Update.
5405 * m2-exp.y (yyerror): Now static.
5406 * language.h (struct language_defn) <la_error>: Remove.
5407 * language.c (unk_lang_error): Remove.
5408 (unknown_language_defn, auto_language_defn): Remove.
5409 * go-lang.h (go_yyerror): Don't declare.
5410 * go-lang.c (go_language_defn): Update.
5411 * go-exp.y (yyerror): Now static.
5412 * f-lang.h (f_yyerror): Don't declare.
5413 * f-lang.c (f_language_defn): Update.
5414 * f-exp.y (yyerror): Now static.
5415 * d-lang.h (d_yyerror): Don't declare.
5416 * d-lang.c (d_language_defn): Update.
5417 * d-exp.y (yyerror): Now static.
5418 * c-lang.h (c_yyerror): Don't declare.
5419 * c-lang.c (c_language_defn, cplus_language_defn)
5420 (asm_language_defn, minimal_language_defn): Update.
5421 * c-exp.y (yyerror): Now static.
5422 * ada-lang.h (ada_yyerror): Don't declare.
5423 * ada-lang.c (ada_language_defn): Update.
5424 * ada-exp.y (yyerror): Now static.
5426 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5428 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5429 (store_sveregs_to_thread): Likewise.
5430 (aarch64_linux_fetch_inferior_registers): Check for SVE.
5431 (aarch64_linux_store_inferior_registers): Likewise.
5432 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5434 (aarch64_sve_regs_copy_to_regcache): Likewise.
5435 (aarch64_sve_regs_copy_from_regcache): Likewise.
5436 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5438 (aarch64_sve_regs_copy_to_regcache): Likewise.
5439 (aarch64_sve_regs_copy_from_regcache): Likewise.
5440 (sve_context): Structure from Linux headers.
5441 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5442 (SVE_SIG_ZREG_SIZE): Likewise.
5443 (SVE_SIG_PREG_SIZE): Likewise.
5444 (SVE_SIG_FFR_SIZE): Likewise.
5445 (SVE_SIG_REGS_OFFSET): Likewise.
5446 (SVE_SIG_ZREGS_OFFSET): Likewise.
5447 (SVE_SIG_ZREG_OFFSET): Likewise.
5448 (SVE_SIG_ZREGS_SIZE): Likewise.
5449 (SVE_SIG_PREGS_OFFSET): Likewise.
5450 (SVE_SIG_PREG_OFFSET): Likewise.
5451 (SVE_SIG_PREGS_SIZE): Likewise.
5452 (SVE_SIG_FFR_OFFSET): Likewise.
5453 (SVE_SIG_REGS_SIZE): Likewise.
5454 (SVE_SIG_CONTEXT_SIZE): Likewise.
5455 (SVE_PT_REGS_MASK): Likewise.
5456 (SVE_PT_REGS_FPSIMD): Likewise.
5457 (SVE_PT_REGS_SVE): Likewise.
5458 (SVE_PT_VL_INHERIT): Likewise.
5459 (SVE_PT_VL_ONEXEC): Likewise.
5460 (SVE_PT_REGS_OFFSET): Likewise.
5461 (SVE_PT_FPSIMD_OFFSET): Likewise.
5462 (SVE_PT_FPSIMD_SIZE): Likewise.
5463 (SVE_PT_SVE_ZREG_SIZE): Likewise.
5464 (SVE_PT_SVE_PREG_SIZE): Likewise.
5465 (SVE_PT_SVE_FFR_SIZE): Likewise.
5466 (SVE_PT_SVE_FPSR_SIZE): Likewise.
5467 (SVE_PT_SVE_FPCR_SIZE): Likewise.
5468 (__SVE_SIG_TO_PT): Likewise.
5469 (SVE_PT_SVE_OFFSET): Likewise.
5470 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5471 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5472 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5473 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5474 (SVE_PT_SVE_PREG_OFFSET): Likewise.
5475 (SVE_PT_SVE_PREGS_SIZE): Likewise.
5476 (SVE_PT_SVE_FFR_OFFSET): Likewise.
5477 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5478 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5479 (SVE_PT_SVE_SIZE): Likewise.
5480 (SVE_PT_SIZE): Likewise.
5481 (HAS_SVE_STATE): New define.
5483 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5485 * nat/aarch64-sve-linux-sigcontext.h: New file.
5486 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5488 (SVE_VQ_MIN): Likewise.
5489 (SVE_VQ_MAX): Likewise.
5490 (SVE_VL_MIN): Likewise.
5491 (SVE_VL_MAX): Likewise.
5492 (SVE_NUM_ZREGS): Likewise.
5493 (SVE_NUM_PREGS): Likewise.
5494 (sve_vl_valid): Likewise.
5495 (struct user_sve_header): Likewise.
5497 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
5498 Richard Bunt <Richard.Bunt@arm.com>
5500 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5501 was requested by GDB.
5503 2018-06-15 Tom de Vries <tdevries@suse.de>
5505 * MAINTAINERS (Write After Approval): Add Tom de Vries.
5507 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
5509 * gnulib/update-gnulib.sh: Print expected versions of
5512 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
5514 * arch-utils.c (default_type_align): Use type_length_units.
5515 * gdbtypes.c (type_align): Use type_length_units.
5517 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5519 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5520 of 'define' command.
5522 2018-06-14 Tom de Vries <tdevries@suse.de>
5525 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5526 get_no_prettyformat_print_options.
5528 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
5530 * sparc-nat.h: Include target.h.
5531 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5532 <fetch_registers>: Remove this argument in function call.
5533 <store_registers>: Remove this argument in function call, remove
5535 <low_forget_process>: Call sparc64_forget_process instead of
5536 sparc_forget_process.
5538 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5540 * procfs.c (_initialize_procfs): Use add_inf_child_target.
5541 (procfs_target::make_corefile_notes): Adjust to new
5542 target_read_alloc return type.
5544 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5545 Stephen Roberts <stephen.roberts@arm.com>
5548 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5549 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5550 Move should_notify_stop local into more inner scope.
5552 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5553 Stephen Roberts <stephen.roberts@arm.com>
5556 * infrun.c (resume_1): Add call to mark_async_event_handler.
5558 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5560 * infrun.c (do_target_wait): Change old version of $pc printed.
5562 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
5564 * dwarf2read.c (read_index_from_section): Rename to...
5565 (read_gdb_index_from_section): ... this, update all callers.
5566 (dwarf2_read_index): Rename to...
5567 (dwarf2_read_gdb_index): ... this, update all callers.
5569 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
5571 * gdb/hppa-linux-nat.c
5572 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5573 hppa_linux_nat_target::fetch_registers.
5575 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5577 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5578 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5579 (AARCH64_DWARF_SVE_FFR): Likewise.
5580 (AARCH64_DWARF_SVE_P0): Likewise.
5581 (AARCH64_DWARF_SVE_Z0): Likewise.
5583 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5585 * common/common-regcache.h (raw_compare): New function.
5586 * regcache.c (regcache::raw_compare): Likewise.
5587 * regcache.h (regcache::raw_compare): New declaration.
5589 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5591 * common/common-regcache.h (reg_buffer_common): New structure.
5592 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5593 (reg_buffer::raw_supply): Likewise.
5594 (reg_buffer::raw_supply_integer): Likewise.
5595 (reg_buffer::raw_supply_zeroed): Likewise.
5596 (reg_buffer::raw_collect): Likewise.
5597 (reg_buffer::raw_collect_integer): Likewise.
5598 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5599 (reg_buffer::raw_supply): Likewise.
5600 (reg_buffer::raw_supply_integer): Likewise.
5601 (reg_buffer::raw_supply_zeroed): Likewise.
5602 (reg_buffer::raw_collect): Likewise.
5603 (reg_buffer::raw_collect_integer): Likewise.
5605 2018-06-10 Tom Tromey <tom@tromey.com>
5607 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
5608 (class remote_state) <stop_reply_queue>: Now std::vector.
5609 (remote_state::~remote_state)
5610 (remote_target::stop_reply_queue_length): Update.
5611 (struct queue_iter_param, remove_child_of_pending_fork)
5612 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5613 (check_pending_event_prevents_wildcard_vcont_callback)
5614 (remove_stop_reply_for_inferior)
5615 (remove_stop_reply_of_remote_state)
5616 (remote_notif_remove_once_on_match)
5617 (stop_reply_match_ptid_and_ws)
5618 (remote_kill_child_of_pending_fork): Remove.
5619 (remote_target::remove_new_fork_children)
5620 (remote_target::check_pending_events_prevent_wildcard_vcont)
5621 (remote_target::discard_pending_stop_replies)
5622 (remote_target::discard_pending_stop_replies_in_queue)
5623 (remote_target::remote_notif_remove_queued_reply)
5624 (remote_target::queued_stop_reply)
5625 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5626 (remote_target::wait, remote_target::kill_new_fork_children)
5627 (remote_target::async): Update.
5629 2018-06-10 Tom Tromey <tom@tromey.com>
5631 * record-full.c (record_full_arch_list_cleanups): Remove.
5632 (record_full_message): Use try/catch.
5633 (record_full_wait_cleanups): Remove.
5634 (record_full_wait_1): Use try/catch.
5635 (record_full_restore): Likewise.
5637 2018-06-10 Tom Tromey <tom@tromey.com>
5639 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
5640 declare VEC. Add constructor.
5641 <in_target_beneath>: Now bool.
5642 (record_full_breakpoints): Now a std::vector, static.
5643 (record_full_sync_record_breakpoints)
5644 (record_full_init_record_breakpoints)
5645 (record_full_target::insert_breakpoint)
5646 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
5648 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5650 * dwarf2read.c (process_cu_includes): Remove struct keyword.
5651 * serial.c (serial_interface_lookup): Remove struct keyword.
5653 2018-06-10 Tom Tromey <tom@tromey.com>
5655 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5657 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5659 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5661 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5662 "beneath" as a method.
5663 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5664 Use "beneath" as a method.
5666 2018-06-10 Tom Tromey <tom@tromey.com>
5668 * tracefile.c (struct trace_file_writer_deleter): New.
5669 <operator()>: Rename from trace_file_writer_xfree.
5670 (trace_file_writer_up): New typedef.
5671 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5673 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5675 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5676 <m_registers, m_register_status>: Change type to
5678 * regcache.c (reg_buffer::reg_buffer): Use new instead of
5681 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5683 * common/common-regcache.h (enum register_status): Add
5684 underlying type "signed char".
5685 * regcache.h (reg_buffer) <m_register_status>: Change type to
5687 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5688 register_status instead of signed char.
5689 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5690 (reg_buffer::get_register_status): Remove cast.
5691 (readable_regcache::raw_read): Remove cast.
5692 (readable_regcache::cooked_read): Remove cast.
5694 2018-06-09 Tom Tromey <tom@tromey.com>
5696 * source.c (reverse_search_command, forward_search_command): Use
5699 2018-06-09 Tom Tromey <tom@tromey.com>
5701 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
5702 (serial_ops_list): Now static, std::vector.
5703 (serial_interface_lookup, serial_add_interface): Update.
5705 2018-06-09 Tom Tromey <tom@tromey.com>
5707 * dwarf2read.c (process_cu_includes): Update.
5708 (process_full_comp_unit): Update.
5709 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5712 2018-06-08 Paul Koning <paul_koning@dell.com>
5716 * python/python.c (do_start_initialization):
5717 Avoid call to internal Python API.
5718 (init__gdb_module): New function.
5720 2018-06-08 Gary Benson <gbenson@redhat.com>
5722 * linux-thread-db.c (valprint.h): New include.
5723 (struct check_thread_db_info): New structure.
5724 (check_thread_db_on_load, tdb_testinfo): New static globals.
5725 (check_thread_db, check_thread_db_callback): New functions.
5726 (try_thread_db_load_1): Run integrity checks if requested.
5727 (maintenance_check_libthread_db): New function.
5728 (_initialize_thread_db): Register "maint check libthread-db"
5729 and "maint set/show check-libthread-db".
5730 * NEWS: Mention the above new commands.
5732 2018-06-08 Tom Tromey <tom@tromey.com>
5734 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5737 2018-06-08 Tom Tromey <tom@tromey.com>
5739 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5741 2018-06-08 Tom Tromey <tom@tromey.com>
5743 * common/btrace-common.h (struct btrace_data): Add constructor,
5744 destructor, move assignment operator.
5745 <empty, clear, fini>: New methods.
5746 <format>: Initialize.
5747 (btrace_data_init, btrace_data_fini, btrace_data_clear)
5748 (btrace_data_empty): Don't declare.
5749 * common/btrace-common.c (btrace_data_init): Remove.
5750 (btrace_data::fini): Rename from btrace_data_fini.
5751 (btrace_data::empty): Rename from btrace_data_empty.
5752 (btrace_data::clear): Rename from btrace_data_clear. Return
5754 * btrace.h (make_cleanup_btrace_data): Don't declare.
5755 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5756 (parse_xml_btrace): Update.
5757 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5758 (maint_btrace_clear_packet_history_cmd): Update.
5760 2018-06-07 Pedro Alves <palves@redhat.com>
5762 * target.h (target_ops) <beneath>: Now a method. All references
5764 (class target_stack): New.
5765 * target.c (g_target_stack): New.
5766 (g_current_top_target): Delete.
5767 (current_top_target): Get the top target out of g_target_stack.
5768 (target_stack::push, target_stack::unpush): New.
5769 (push_target, unpush_target): Reimplement.
5770 (target_is_pushed): Reimplement in terms of g_target_stack.
5771 (target_ops::beneath, target_stack::find_beneath): New.
5773 2018-06-07 Pedro Alves <palves@redhat.com>
5775 * target.h (find_target_beneath): Delete declaration.
5776 * target.c (find_target_beneath): Delete definition.
5777 * aix-thread.c: All callers of find_target_beneath adjusted to
5778 call target_ops::beneath instead.
5779 * bsd-uthread.c: Likewise.
5780 * linux-thread-db.c: Likewise.
5781 * ravenscar-thread.c: Likewise.
5782 * sol-thread.c: Likewise.
5783 * spu-multiarch.c: Likewise.
5785 2018-06-07 Pedro Alves <palves@redhat.com>
5787 * target.h (target_ops) <beneath>: Now a method. All references
5789 (target_ops) <m_beneath>: New.
5790 * target.c (target_ops::beneath): New.
5791 * corelow.c: Adjust all references to target_ops::beneath.
5792 * linux-thread-db.c: Likewise.
5793 * make-target-delegates: Likewise.
5794 * record-btrace.c: Likewise.
5795 * record-full.c: Likewise.
5796 * remote.c: Likewise.
5797 * target.c: Likewise.
5798 * target-delegates.c: Regenerate.
5800 2018-06-07 Pedro Alves <palves@redhat.com>
5802 * target.h (target_stack): Delete.
5803 (current_top_target): Declare function.
5804 * target.c (target_stack): Delete.
5805 (g_current_top_target): New.
5806 (current_top_target): New function.
5807 * auxv.c: Use current_top_target instead of target_stack
5809 * avr-tdep.c: Likewise.
5810 * breakpoint.c: Likewise.
5811 * corefile.c: Likewise.
5812 * elfread.c: Likewise.
5814 * exceptions.c: Likewise.
5815 * frame.c: Likewise.
5816 * gdbarch-selftests.c: Likewise.
5817 * gnu-v3-abi.c: Likewise.
5818 * ia64-tdep.c: Likewise.
5819 * ia64-vms-tdep.c: Likewise.
5820 * infcall.c: Likewise.
5821 * infcmd.c: Likewise.
5822 * infrun.c: Likewise.
5823 * linespec.c: Likewise.
5824 * linux-tdep.c: Likewise.
5825 * minsyms.c: Likewise.
5826 * ppc-linux-nat.c: Likewise.
5827 * ppc-linux-tdep.c: Likewise.
5828 * procfs.c: Likewise.
5829 * regcache.c: Likewise.
5830 * remote.c: Likewise.
5831 * rs6000-tdep.c: Likewise.
5832 * s390-linux-nat.c: Likewise.
5833 * s390-tdep.c: Likewise.
5834 * solib-aix.c: Likewise.
5835 * solib-darwin.c: Likewise.
5836 * solib-dsbt.c: Likewise.
5837 * solib-spu.c: Likewise.
5838 * solib-svr4.c: Likewise.
5839 * solib-target.c: Likewise.
5840 * sparc-tdep.c: Likewise.
5841 * sparc64-tdep.c: Likewise.
5842 * spu-tdep.c: Likewise.
5843 * symfile.c: Likewise.
5844 * symtab.c: Likewise.
5845 * target-descriptions.c: Likewise.
5846 * target-memory.c: Likewise.
5847 * target.c: Likewise.
5848 * target.h: Likewise.
5849 * tracefile-tfile.c: Likewise.
5850 * tracepoint.c: Likewise.
5851 * valops.c: Likewise.
5852 * valprint.c: Likewise.
5853 * value.c: Likewise.
5854 * windows-tdep.c: Likewise.
5855 * mi/mi-main.c: Likewise.
5857 2018-06-07 Tom Tromey <tom@tromey.com>
5859 * valprint.h (build_address_symbolic): Declare.
5860 * printcmd.c (print_address_symbolic): Update.
5861 (build_address_symbolic): Change "name" and "filename" to
5863 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5865 * defs.h (build_address_symbolic): Remove declaration.
5867 2018-06-07 Alan Hayward <alan.hayward@arm.com>
5869 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5870 (aarch64_vnv_type): Add function.
5871 (aarch64_pseudo_register_name): Add V regs for SVE.
5872 (aarch64_pseudo_register_type): Likewise.
5873 (aarch64_pseudo_register_reggroup_p): Likewise.
5874 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5875 (aarch64_pseudo_read_value): Add V regs for SVE.
5876 (aarch64_pseudo_write_2): Use V0 offset for SVE
5877 (aarch64_pseudo_write): Add V regs for SVE.
5878 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5880 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
5882 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5883 (sve_vl_from_vq): Likewise.
5885 2018-06-05 Tom Tromey <tom@tromey.com>
5887 * cli/cli-cmds.c (show_version): Update.
5888 * top.c (print_gdb_version): Add "interactive" parameter.
5890 * main.c (captured_main_1): Update.
5891 * top.h (print_gdb_version): Add "interactive" parameter and a
5894 2018-06-05 David Malcolm <dmalcolm@redhat.com>
5896 * common/enum-flags.h: Add trailing semicolon to example in
5899 2018-06-05 Tom Tromey <tom@tromey.com>
5902 * NEWS: Add entry about pager.
5903 * utils.c (pagination_disabled_for_command): New global.
5904 (prompt_for_continue): Allow "c" response to prompt.
5905 (reinitialize_more_filter): Clear
5906 pagination_disabled_for_command.
5907 (fputs_maybe_filtered): Check pagination_disabled_for_command.
5909 2018-06-04 Tom Tromey <tom@tromey.com>
5911 * ada-lang.h (ada_lookup_symbol_list): Update.
5912 * ada-lang.c (resolve_subexp): Update.
5913 (symbols_are_identical_enums): Change type of syms. Remove nsyms
5915 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5916 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5917 results parameter to std::vector.
5918 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5920 * ada-exp.y (block_lookup): Update.
5921 (select_possible_type_sym): Change type of syms. Remove nsyms
5923 (write_var_or_type, write_name_assoc): Update.
5925 2018-06-04 Joel Brobecker <brobecker@adacore.com>
5927 * windows-nat.c (windows_nat_target::xfer_partial): Return
5928 TARGET_XFER_E_IO if we need to delegate to the target beneath
5929 but BENEATH is NULL.
5931 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
5933 * Makefile.in (config.status): Add configure.nat as a
5936 2018-06-04 Tom Tromey <tom@tromey.com>
5938 * cp-name-parser.y (cpname_state): Add method declarations.
5939 (HANDLE_QUAL): Update.
5940 (cpname_state::d_grab, cpname_state::fill_comp)
5941 (cpname_state::make_operator, cpname_state::make_dtor)
5942 (cpname_state::make_builtin_type, cpname_state::make_name)
5943 (cpname_state::d_qualify, cpname_state::d_int_type)
5944 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5945 (%union): Move earlier.
5947 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5949 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5951 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5953 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5954 (aarch64_pseudo_write_1): Likewise.
5955 (aarch64_pseudo_read_value): Use helper.
5956 (aarch64_pseudo_write): Likewise.
5958 2018-06-04 Pedro Alves <palves@redhat.com>
5960 * darwin-nat.c (darwin_ops): Delete.
5961 (darwin_attach_pid): Use get_native_target.
5963 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5965 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5966 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5968 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5970 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5971 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5972 (aarch64_gdbarch_init): Check for SVE.
5973 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5975 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5977 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5978 * aarch64-tdep.h (aarch64_read_description): Likewise.
5979 * arch/aarch64.c (aarch64_create_target_description): Likewise.
5980 * arch/aarch64.h (aarch64_create_target_description): Likewise.
5981 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5982 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5983 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5985 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
5987 * value.c (value_fetch_lazy_bitfield): New.
5988 (value_fetch_lazy_memory): New.
5989 (value_fetch_lazy_register): New.
5990 (value_fetch_lazy): Factor out to smaller functions.
5992 2018-06-01 Tom Tromey <tom@tromey.com>
5994 * cp-name-parser.y (backslashable, represented): Now const.
5996 2018-06-01 Tom Tromey <tom@tromey.com>
5998 * cp-name-parser.y: Include parser-defs.h.
5999 (parser_fprintf): Remove declaration.
6001 2018-06-01 Tom Tromey <tom@tromey.com>
6003 * cp-name-parser.y: Use %pure-parser, %lex-param, and
6005 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6006 (global_result): Remove globals.
6007 (struct cpname_state): New.
6008 (yyparse): Don't declare.
6009 (yylex, yyerror): Move declarations after %union.
6010 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6011 (make_name): Add state parameter.
6013 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6015 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6017 (yylex): Add lvalp, state parameters.
6018 (yyerror): Add state parameter.
6019 (cp_demangled_name_to_comp): Update.
6021 2018-06-01 Tom Tromey <tom@tromey.com>
6023 * cp-name-parser.y (parser_fprintf): Declare.
6024 (GDB_YY_REMAP_PREFIX): Define.
6025 Include yy-remap.h. Don't redefine yy* identifiers.
6027 2018-06-01 Tom Tromey <tom@tromey.com>
6029 * python/py-type.c (typy_legacy_template_argument): Update.
6030 * cp-support.h (cp_demangled_name_to_comp): Update.
6031 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6032 parameter to be a "std::string *".
6035 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
6037 * ada-lex.l: Include "diagnostics.h" instead of
6038 "common/diagnostics.h".
6039 * unittests/environ-selftests.c: Likewise.
6040 * common/diagnostics.h: Moved to ../include.
6042 2018-06-01 Joel Brobecker <brobecker@adacore.com>
6044 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6045 to language_mode_manual while calling breakpoint_re_set_one.
6047 2018-06-01 Tom Tromey <tom@tromey.com>
6049 * valops.c (value_cast_structs, destructor_name_p): Update.
6050 * symtab.c (gdb_mangle_name): Update.
6051 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6053 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6054 (pascal_object_print_value_fields, pascal_object_print_value):
6056 * p-typeprint.c (pascal_type_print_derivation_info): Update.
6057 * linespec.c (find_methods): Update.
6058 * gdbtypes.h (type_name_no_tag): Remove.
6059 (type_name_or_error): Rename from type_name_no_tag_or_error.
6060 * gdbtypes.c (type_name_no_tag): Remove.
6061 (type_name_or_error): Rename from type_name_no_tag_or_error.
6062 (lookup_struct_elt_type, check_typedef): Update.
6063 * expprint.c (print_subexp_standard): Update.
6064 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6065 * d-namespace.c (d_lookup_nested_symbol): Update.
6066 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6067 (cp_print_class_member): Update.
6068 * cp-namespace.c (cp_lookup_nested_symbol): Update.
6069 * completer.c (add_struct_fields): Update.
6070 * c-typeprint.c (cp_type_print_derivation_info)
6071 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6073 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6074 (ada_prefer_type, ada_is_exception_sym): Update.
6076 2018-06-01 Tom Tromey <tom@tromey.com>
6078 * valops.c (enum_constant_from_type, value_namespace_elt)
6079 (value_maybe_namespace_elt): Update.
6080 * valarith.c (find_size_for_pointer_math): Update.
6081 * target-descriptions.c (make_gdb_type): Update.
6082 * symmisc.c (print_symbol): Update.
6083 * stabsread.c (define_symbol, read_type)
6084 (complain_about_struct_wipeout, add_undefined_type)
6085 (cleanup_undefined_types_1): Update.
6086 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6087 (rust_range_type_p, val_print_struct, rust_print_struct_def)
6088 (rust_internal_print_type, rust_composite_type)
6089 (rust_evaluate_funcall, rust_evaluate_subexp)
6090 (rust_inclusive_range_type_p): Update.
6091 * python/py-type.c (typy_get_tag): Update.
6092 * p-typeprint.c (pascal_type_print_base): Update.
6093 * mdebugread.c (parse_symbol, parse_type): Update.
6094 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6096 * guile/scm-type.c (gdbscm_type_tag): Update.
6097 * go-lang.c (sixg_string_p): Update.
6098 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6100 * gdbtypes.h (struct main_type) <tag_name>: Remove.
6101 (TYPE_TAG_NAME): Remove.
6102 * gdbtypes.c (type_name_no_tag): Simplify.
6103 (check_typedef, check_types_equal, recursive_dump_type)
6104 (copy_type_recursive, arch_composite_type): Update.
6105 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
6106 in summary mode when needed.
6107 * eval.c (evaluate_funcall): Update.
6108 * dwarf2read.c (fixup_go_packaging, read_structure_type)
6109 (process_structure_scope, read_enumeration_type)
6110 (read_namespace_type, read_module_type, determine_prefix): Update.
6111 * cp-support.c (inspect_type): Update.
6112 * coffread.c (process_coff_symbol, decode_base_type): Update.
6113 * c-varobj.c (c_is_path_expr_parent): Update.
6114 * c-typeprint.c (c_type_print_base_struct_union): Update.
6115 (c_type_print_base_1): Update. Print struct/class/union/enum in
6116 summary when using C language.
6117 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6118 (gen_maybe_namespace_elt): Update.
6119 * ada-lang.c (ada_type_name): Simplify.
6120 (empty_record, ada_template_to_fixed_record_type_1)
6121 (template_to_static_fixed_type)
6122 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6124 2018-06-01 Tom Tromey <tom@tromey.com>
6126 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6128 * c-typeprint.c (c_print_type_1): Add "language" parameter.
6129 (c_print_type): Update.
6130 (c_print_type): New overload.
6131 (c_type_print_varspec_prefix, c_type_print_args)
6132 (c_type_print_varspec_suffix, c_print_type_no_offsets)
6133 (c_type_print_base_struct_union, c_type_print_base_1)
6134 (cp_type_print_method_args): Add "language" parameter.
6135 (c_type_print_base): Update.
6136 * c-lang.h (c_print_type): Add new overload.
6138 2018-06-01 Tom Tromey <tom@tromey.com>
6140 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6141 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6143 2018-06-01 Alan Hayward <alan.hayward@arm.com>
6145 * aarch64-tdep.c (aarch64_sve_register_names): New const
6147 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6148 (AARCH64_SVE_Z_REGS_NUM): New define.
6149 (AARCH64_SVE_P_REGS_NUM): Likewise.
6150 (AARCH64_SVE_NUM_REGS): Likewise.
6152 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
6154 * nat/linux-ptrace.h [__alpha__]
6155 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6158 2018-05-31 Maciej W. Rozycki <macro@mips.com>
6160 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6161 the endianness selected.
6162 * NEWS: Document `set endian auto' mode operation update.
6164 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6166 * Makefile.in: Add new header.
6167 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6168 (sve_vl_from_vg): Likewise.
6169 (sve_vq_from_vl): Likewise.
6170 (sve_vl_from_vq): Likewise.
6171 (sve_vq_from_vg): Likewise.
6172 (sve_vg_from_vq): Likewise.
6173 * configure.nat: Add new c file.
6174 * nat/aarch64-sve-linux-ptrace.c: New file.
6175 * nat/aarch64-sve-linux-ptrace.h: New file.
6177 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6179 * aarch64-linux-nat.c (aarch64_linux_read_description):
6181 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6183 * aarch64-tdep.c (tdesc_aarch64_list): Add.
6184 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6185 (aarch64_gdbarch_init): Add parmeter zero.
6186 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6187 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6188 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6190 * doc/gdb.texinfo: Describe SVE feature
6191 * features/aarch64-sve.c: New file.
6193 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
6196 * gdbarch.sh (significant_addr_bit): Default to zero when
6197 not set by target architecture.
6198 * gdbarch.c: Re-generated.
6199 * utils.c (address_significant): Update.
6201 2018-05-30 Joel Brobecker <brobecker@adacore.com>
6203 * stack.c (func_command): Remove trailing newline in call to error.
6205 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6207 * regcache.h (regcache_raw_collect): Remove, update callers to
6208 use regcache::raw_collect.
6209 * regcache.c (regcache_raw_collect): Remove.
6211 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6213 * regcache.h (regcache_raw_supply): Remove, update callers to
6214 use detached_regcache::raw_supply.
6215 * regcache.c (regcache_raw_supply): Remove.
6217 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6219 * regcache.h (regcache_cooked_write_part): Remove, update
6220 callers to use regcache::cooked_write_part.
6221 * regcache.c (regcache_cooked_write_part): Remove.
6223 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6225 * regcache.h (regcache_cooked_read_part): Remove, update callers
6226 to use readable_regcache::cooked_read_part.
6227 * regcache.c (regcache_cooked_read_part): Remove.
6229 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6231 * regcache.h (regcache_cooked_read_value): Remove, update
6232 callers to use readable_regcache::cooked_read_value.
6233 * regcache.c (regcache_cooked_read_value): Remove.
6235 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6237 * regcache.h (regcache_cooked_write): Remove, update callers to
6238 use regcache::cooked_write.
6239 * regcache.c (regcache_cooked_write): Remove.
6241 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6243 * regcache.h (regcache_invalidate): Remove, update callers to
6244 use detached_regcache::invalidate instead.
6245 * regcache.c (regcache_invalidate): Remove.
6247 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6249 * regcache.h (regcache_raw_write_part): Remove, update callers
6250 to use regcache::raw_write_part instead.
6251 * regcache.c (regcache_raw_write_part): Remove.
6253 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6255 * regcache.h (regcache_raw_read_part): Remove, update callers to
6256 use readable_regcache::raw_read_part instead.
6257 * regcache.c (regcache_raw_read_part): Remove.
6259 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6261 * regcache.h (regcache_cooked_read): Remove, update callers to
6262 use readable_regcache::cooked_read instead.
6263 * regcache.c (regcache_cooked_read): Remove.
6265 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6267 * regcache.h (regcache_raw_write): Remove, update callers to use
6268 regcache::raw_write instead.
6269 * regcache.c (regcache_raw_write): Remove.
6271 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6273 * regcache.h (regcache_raw_read): Remove, update callers to use
6274 readable_regcache::raw_read instead.
6275 * regcache.c (regcache_raw_read): Remove.
6277 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6279 * regcache.h (regcache_raw_update): Remove, update callers to
6280 use readable_regcache::raw_update instead.
6281 * regcache.c (regcache_raw_update): Remove.
6283 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6285 * regcache.h (regcache_register_status): Remove, update callers
6286 to use reg_buffer::get_register_status directly instead.
6287 * regcache.c (regcache_register_status): Remove.
6289 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6291 * regcache.h (regcache_get_ptid): Remove, update all callers to
6292 call regcache::ptid instead.
6293 * regcache.c (regcache_get_ptid): Remove.
6295 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6297 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6299 2018-05-30 Pedro Alves <palves@redhat.com>
6301 * common/common-exceptions.h (exception_rethrow): Use
6304 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
6306 * breakpoint.c (print_solib_event, check_status_catch_solib):
6307 Remove struct keyword in range-based for loops.
6308 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6309 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6311 * linespec.c (find_superclass_methods, search_minsyms_for_name):
6313 * symfile.c (addr_info_make_relative): Likewise.
6314 * thread.c (value_in_thread_stack_temporaries): Likewise.
6316 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
6319 * valops.c (value_struct_elt_for_reference): Call check_typedef on
6320 aggregate type to get its real type before accessing it.
6322 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
6324 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6325 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6326 * coff-pe-read.c (add_pe_forwarded_sym): Replace
6327 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6328 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6329 * jit.c (jit_breakpoint_re_set_internal): Likewise.
6330 * printcmd.c (info_address_command): Likewise.
6332 2018-05-29 Tom Tromey <tom@tromey.com>
6334 * windows-nat.c (handle_exception): Update fall-through comment.
6336 2018-05-29 Tom Tromey <tom@tromey.com>
6338 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
6339 (struct program_space) <added_solibs>: Now a std::vector.
6340 * breakpoint.c (print_solib_event): Update.
6341 (check_status_catch_solib): Update.
6342 * progspace.c (clear_program_space_solib_cache): Update.
6343 * solib.c (update_solib_list): Update.
6345 2018-05-29 Tom Tromey <tom@tromey.com>
6347 * python/py-type.c (typy_richcompare): Update.
6348 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6349 * gdbtypes.h (types_deeply_equal): Return bool.
6350 (types_equal): Likewise.
6351 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
6353 (check_types_equal): Change worklist to std::vector. Return
6355 (struct type_equality_entry): Add constructor.
6356 (compare_maybe_null_strings): Return bool.
6357 (check_types_worklist): Return bool. Change worklist to
6359 (types_deeply_equal): Use std::vector.
6360 (types_equal): Return bool.
6361 (compare_maybe_null_strings): Simplify.
6363 2018-05-29 Tom Tromey <tom@tromey.com>
6365 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
6367 2018-05-29 Tom Tromey <tom@tromey.com>
6369 * objc-lang.h: Don't include cp-support.h.
6370 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
6373 2018-05-27 Tom Tromey <tom@tromey.com>
6375 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6377 2018-05-25 Tom Tromey <tom@tromey.com>
6379 * value.c (value::location): Initialize.
6381 2018-05-25 Tom Tromey <tom@tromey.com>
6383 * dbxread.c (init_bincl_list): Remove.
6384 (bincl_list): Now a std::vector.
6385 (bincls_allocated, next_bincl): Remove.
6386 (free_bincl_list, do_free_bincl_list_cleanup)
6387 (make_cleanup_free_bincl_list): Remove.
6388 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6390 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6391 (struct header_file_location): Add constructor.
6392 (add_bincl_to_list): Remove.
6394 2018-05-25 Tom Tromey <tom@tromey.com>
6396 * tui/tui.c (tui_enable): Update.
6397 * mi/mi-interp.c (mi_interp::init): Update.
6398 * interps.h (class interp) <name>: New method.
6399 <m_name>: Rename from name.
6400 (~scoped_restore_interp): Update.
6401 * interps.c (interp::interp): Update.
6402 (interp_add, interp_set, interp_lookup_existing)
6403 (current_interp_named_p): Update.
6405 2018-05-25 Tom Tromey <tom@tromey.com>
6407 * interps.c (interp_name): Remove.
6408 * mi/mi-interp.c (mi_interp::init): Update.
6409 * interps.h (interp_name): Remove.
6410 (~scoped_restore_interp): Update.
6411 * tui/tui.c (tui_enable): Update.
6413 2018-05-25 Tom Tromey <tom@tromey.com>
6415 * utils.c (fputs_maybe_filtered): Update.
6416 * linespec.c (decode_line_full): Update.
6417 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6418 (mi_print_breakpoint_for_event, mi_solib_loaded)
6419 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6420 (mi_user_selected_context_changed): Update.
6421 * mi/mi-main.c (mi_execute_command): Update.
6422 * cli/cli-script.c (execute_control_command): Update.
6423 * python/python.c (execute_gdb_command): Update.
6424 * solib.c (info_sharedlibrary_command): Update.
6425 * interps.c (interp_ui_out): Remove.
6426 * interps.h (interp_ui_out): Remove.
6428 2018-05-25 Tom Tromey <tom@tromey.com>
6430 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6431 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6432 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6434 2018-05-25 Tom Tromey <tom@tromey.com>
6436 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6437 * interps.c (interp_exec): Use scoped_restore.
6439 2018-05-25 Tom Tromey <tom@tromey.com>
6441 * remote.c (remote_target::remote_file_get): Use
6443 (remote_target::remote_file_put): Likewise.
6445 2018-05-25 Tom Tromey <tom@tromey.com>
6447 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6449 (get_pe_section_index, add_pe_exported_sym): Update.
6450 (read_pe_exported_syms): Use gdb::def_vector.
6452 2018-05-25 Tom Tromey <tom@tromey.com>
6454 * frame.c (remove_prev_frame): Remove.
6455 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6457 2018-05-25 Maciej W. Rozycki <macro@mips.com>
6459 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6461 * mips-linux-nat.c (supply_fpregset): Always call
6462 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6463 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6464 `mips_fill_fpregset'.
6465 * mips-linux-tdep.c (mips_supply_fpregset)
6466 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6467 (mips_fill_fpregset_wrapper): Remove functions.
6468 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6469 (mips_linux_fpregset): Remove variable.
6470 (mips_linux_iterate_over_regset_sections): Use
6471 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6472 (mips_linux_o32_sigframe_init): Remove comment.
6474 2018-05-25 Pedro Alves <palves@redhat.com>
6476 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6477 (struct readahead_cache, struct packet_reg, struct
6478 remote_arch_state, class remote_state): Move higher up in the
6480 (remote_target::m_remote_state): Now an object instead of a pointer.
6481 (remote_target::get_remote_state): Adjust.
6483 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6485 * stack.c (select_and_print_frame): Delete.
6486 (struct function_bounds): Move struct within function.
6487 (func_command): Most content moved into new function
6488 find_frame_for_function, use new function, print result, add
6490 (find_frame_for_function): New function, now returns a result.
6492 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6494 * stack.c (iterate_over_block_arg_vars): Fix comment.
6495 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6497 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6501 (scoped_restore_selected_frame::scoped_restore_selected_frame):
6503 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6505 * frame.h (class scoped_restore_selected_frame): New class.
6506 * stack.c (print_frame_local_vars): Remove catching and rethrowing
6507 of any exception, use scoped_restore_selected_frame to restore the
6510 2018-05-24 Pedro Alves <palves@redhat.com>
6512 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6515 2018-05-23 Tom Tromey <tom@tromey.com>
6517 * complaints.c (struct complaints): Remove.
6518 (symfile_complaint_book): Remove.
6519 (series): New global.
6520 (complaint_internal): Update.
6521 (clear_complaints): Update.
6523 2018-05-23 Tom Tromey <tom@tromey.com>
6525 * complaints.c (counters): New global.
6526 (struct complain): Remove.
6527 (struct complaints) <root>: Remove.
6528 (complaint_sentinel): Remove.
6529 (symfile_complaint_book): Update.
6530 (find_complaint) Remove.
6531 (complaint_internal, clear_complaints): Update.
6533 2018-05-23 Tom Tromey <tom@tromey.com>
6535 * complaints.c (struct complain) <file, line>: Remove.
6536 (find_complaint): Remove file, line parameters.
6537 (complaint_internal): Update.
6539 2018-05-23 Tom Tromey <tom@tromey.com>
6541 * complaints.c (vcomplaint): Remove.
6542 (complaint_internal) Merge in contents of vcomplaint.
6544 2018-05-23 Tom Tromey <tom@tromey.com>
6546 * complaints.c (struct complaints) <explanation>: Remove.
6547 (symfile_explanations): Remove.
6548 (symfile_complaint_book): Update.
6549 (vcomplaint): Update.
6550 (struct explanation): Remove.
6552 2018-05-23 Tom Tromey <tom@tromey.com>
6554 * complaints.c (symfile_complaints): Remove.
6555 (complaint_internal): Remove "complaints" parameter.
6556 (clear_complaints, vcomplaint): Remove "c" parameter.
6557 (get_complaints): Remove.
6558 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6559 (dwarf2_debug_line_missing_file_complaint)
6560 (dwarf2_debug_line_missing_end_sequence_complaint)
6561 (dwarf2_complex_location_expr_complaint)
6562 (dwarf2_const_value_length_mismatch_complaint)
6563 (dwarf2_section_buffer_overflow_complaint)
6564 (dwarf2_macro_malformed_definition_complaint)
6565 (dwarf2_invalid_attrib_class_complaint)
6566 (create_addrmap_from_index, dw2_symtab_iter_next)
6567 (dw2_expand_marked_cus)
6568 (dw2_debug_names_iterator::find_vec_in_debug_names)
6569 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6570 (create_debug_type_hash_table, init_cutu_and_read_dies)
6571 (partial_die_parent_scope, add_partial_enumeration)
6572 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6573 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6574 (read_import_statement, read_file_scope, create_dwo_cu_reader)
6575 (create_cus_hash_table, create_dwp_hash_table)
6576 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6577 (dwarf2_rnglists_process, dwarf2_ranges_process)
6578 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6579 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6580 (handle_struct_member_die, process_structure_scope)
6581 (read_array_type, read_common_block, read_module_type)
6582 (read_tag_pointer_type, read_typedef, read_base_type)
6583 (read_subrange_type, load_partial_dies, partial_die_info::read)
6584 (partial_die_info::read, partial_die_info::read)
6585 (partial_die_info::read, read_checked_initial_length_and_offset)
6586 (dwarf2_string_attr, read_formatted_entries)
6587 (dwarf_decode_line_header)
6588 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6589 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6590 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6591 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6592 (get_signatured_type, get_DW_AT_signature_type)
6593 (decode_locdesc, file_file_name, consume_improper_spaces)
6594 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6595 (dwarf_decode_macro_bytes, dwarf_decode_macros)
6596 (dwarf2_symbol_mark_computed, set_die_type)
6597 (read_attribute_value): Update.
6598 * stap-probe.c (handle_stap_probe, get_stap_base_address):
6600 * dbxread.c (unknown_symtype_complaint)
6601 (lbrac_mismatch_complaint, repeated_header_complaint)
6602 (set_namestring, function_outside_compilation_unit_complaint)
6603 (read_dbx_symtab, process_one_symbol): Update.
6604 * gdbtypes.c (stub_noname_complaint): Update.
6605 * windows-nat.c (handle_unload_dll): Update.
6606 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6607 (decode_base_type): Update.
6608 * xcoffread.c (bf_notfound_complaint, ef_complaint)
6609 (eb_complaint, record_include_begin, record_include_end)
6610 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6611 (process_xcoff_symbol, read_symbol)
6612 (function_outside_compilation_unit_complaint)
6613 (scan_xcoff_symtab): Update.
6614 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6615 * buildsym.c (finish_block_internal, make_blockvector)
6616 (end_symtab_get_static_block, augment_type_symtab): Update.
6617 * dtrace-probe.c (dtrace_process_dof)
6618 (dtrace_static_probe_ops::get_probes): Update.
6619 * complaints.h (struct complaint): Don't declare.
6620 (symfile_complaints): Remove.
6621 (complaint_internal): Remove "complaints" parameter.
6622 (complaint): Likewise.
6623 (clear_complaints): Likewise.
6624 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6625 (reread_symbols): Update.
6626 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6627 (dwarf2_frame_cache, decode_frame_entry): Update.
6628 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6629 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6630 (info_selectors_command): Update.
6631 * macrotab.c (macro_include, check_for_redefinition)
6632 (macro_undef): Update.
6633 * objfiles.c (filter_overlapping_sections): Update.
6634 * stabsread.c (invalid_cpp_abbrev_complaint)
6635 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6636 (define_symbol, error_type, read_type, rs6000_builtin_type)
6637 (stabs_method_name_from_physname, read_member_functions)
6638 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6639 (attach_fields_to_type, complain_about_struct_wipeout)
6640 (read_range_type, read_args, common_block_start)
6641 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6643 * mdebugread.c (index_complaint, unknown_ext_complaint)
6644 (basic_type_complaint, bad_tag_guess_complaint)
6645 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6646 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6647 (parse_procedure, parse_lines)
6648 (function_outside_compilation_unit_complaint)
6649 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6650 (bad_tag_guess_complaint, reg_value_complaint): Update.
6651 * cp-support.c (demangled_name_complaint): Update.
6652 * macroscope.c (sal_macro_scope): Update.
6653 * dwarf-index-write.c (class debug_names): Update.
6655 2018-05-23 Tom Tromey <tom@tromey.com>
6657 * complaints.c (clear_complaints): Remove "noisy" parameter.
6658 * complaints.h (clear_complaints): Update.
6659 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6660 (reread_symbols): Update.
6662 2018-05-23 Tom Tromey <tom@tromey.com>
6664 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6666 (vcomplaint, clear_complaints): Update.
6667 (symfile_explanations): Remove some messages.
6669 2018-05-23 Tom Tromey <tom@tromey.com>
6671 * complaints.c (internal_complaint): Remove.
6672 * complaints.h (internal_complaint): Remove.
6674 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6676 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6678 2018-05-22 Pedro Alves <palves@redhat.com>
6680 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6681 (remote_fileio_badfd, remote_fileio_return_errno)
6682 (remote_fileio_return_success, remote_fileio_func_open)
6683 (remote_fileio_func_open, remote_fileio_func_close)
6684 (remote_fileio_func_read, remote_fileio_func_write)
6685 (remote_fileio_func_lseek, remote_fileio_func_rename)
6686 (remote_fileio_func_unlink, remote_fileio_func_stat)
6687 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6688 (remote_fileio_func_isatty, remote_fileio_func_system): Add
6689 remote_target parameter.
6690 (remote_fio_func_map) <func>: Add remote_target parameter.
6691 (do_remote_fileio_request, remote_fileio_request):
6692 * remote-fileio.h (remote_fileio_request):
6693 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6694 remote_target parameter.
6695 (remote_notif_process, handle_notification): Adjust to pass down
6697 (remote_notif_state_allocate): Add remote_target parameter. Save
6699 * remote-notif.h (struct remote_target): Forward declare.
6700 (struct notif_client) <parse, ack, can_get_pending_events>: Add
6701 remote_target parameter.
6702 (struct remote_notif_state) <remote>: New field.
6703 (remote_notif_ack, remote_notif_parse): Add remote_target
6705 (remote_notif_state_allocate, remote_notif_state_allocate): Add
6706 remote_target parameter.
6707 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6708 (threads_listing_context, rmt_thread_action, protocol_feature)
6709 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6710 (packet_result, struct threads_listing_context, remote_state):
6711 Move definitions and declarations higher up.
6712 (remote_target) <~remote_target>: Declare.
6713 (remote_download_command_source, remote_file_put, remote_file_get)
6714 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6715 (remote_hostio_pread_vFile, remote_hostio_send_command)
6716 (remote_hostio_set_filesystem, remote_hostio_open)
6717 (remote_hostio_close, remote_hostio_unlink, remote_state)
6718 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6719 (get_memory_write_packet_size, get_memory_read_packet_size)
6720 (append_pending_thread_resumptions, remote_detach_1)
6721 (append_resumption, remote_resume_with_vcont)
6722 (add_current_inferior_and_thread, wait_ns, wait_as)
6723 (process_stop_reply, remote_notice_new_inferior)
6724 (process_initial_stop_replies, remote_add_thread)
6725 (btrace_sync_conf, remote_btrace_maybe_reopen)
6726 (remove_new_fork_children, kill_new_fork_children)
6727 (discard_pending_stop_replies, stop_reply_queue_length)
6728 (check_pending_events_prevent_wildcard_vcont)
6729 (discard_pending_stop_replies_in_queue, stop_reply)
6730 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6731 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6732 (remote_interrupt_as, remote_interrupt_ns)
6733 (remote_get_noisy_reply, remote_query_attached)
6734 (remote_add_inferior, remote_current_thread, get_current_thread)
6735 (set_thread, set_general_thread, set_continue_thread)
6736 (set_general_process, write_ptid)
6737 (remote_unpack_thread_info_response, remote_get_threadinfo)
6738 (parse_threadlist_response, remote_get_threadlist)
6739 (remote_threadlist_iterator, remote_get_threads_with_ql)
6740 (remote_get_threads_with_qxfer)
6741 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6742 (get_offsets, remote_check_symbols, remote_supported_packet)
6743 (remote_query_supported, remote_packet_size)
6744 (remote_serial_quit_handler, remote_detach_pid)
6745 (remote_vcont_probe, remote_resume_with_hc)
6746 (send_interrupt_sequence, interrupt_query)
6747 (remote_notif_get_pending_events, fetch_register_using_p)
6748 (send_g_packet, process_g_packet, fetch_registers_using_g)
6749 (store_register_using_P, store_registers_using_G)
6750 (set_remote_traceframe, check_binary_download)
6751 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6752 (remote_xfer_live_readonly_partial, remote_read_bytes)
6753 (remote_send_printf, remote_flash_write, readchar)
6754 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6755 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6756 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6757 (extended_remote_disable_randomization, extended_remote_run)
6758 (send_environment_packet, extended_remote_environment_support)
6759 (extended_remote_set_inferior_cwd, remote_write_qxfer)
6760 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6761 (packet_command): Now methods of ...
6762 (remote_target): ... this class.
6763 (m_remote_state) <remote_target>: New field.
6764 (struct remote_state) <stop_reply_queue,
6765 remote_async_inferior_event_token, wait_forever_enabled_p>: New
6767 (remote_state::remote_state): Allocate stop_reply_queue.
6768 (remote_state): Delete global.
6769 (get_remote_state_raw): Delete.
6770 (remote_target::get_remote_state): Allocate m_remote_state on
6772 (get_current_remote_target): New.
6773 (remote_ops, extended_remote_ops): Delete.
6774 (wait_forever_enabled_p, remote_async_inferior_event_token):
6775 Delete, moved to struct remote_state.
6776 (remote_target::close): Delete self. Destruction bits split to
6778 (remote_target::~remote_target): ... this.
6779 (show_memory_packet_size): Adjust to use
6780 get_current_remote_target.
6781 (struct protocol_feature) <func>: Add remote_target parameter.
6782 All callers adjusted.
6783 (curr_quit_handler_target): New.
6784 (remote_serial_quit_handler): Reimplement.
6785 (remote_target::open_1): Adjust to use get_current_remote_target.
6786 Heap-allocate remote_target/extended_remote_target instances.
6787 (vcont_builder::vcont_builder): Add remote_target parameter, and
6788 save it in m_remote. All callers adjusted.
6789 (vcont_builder::m_remote): New field.
6790 (vcont_builder::restart, vcont_builder::flush)
6791 (vcont_builder::push_action): Use it.
6792 (remote_target::commit_resume): Use it.
6793 (struct queue_iter_param) <remote>: New field.
6794 (remote_target::remove_new_fork_children): Fill in 'remote' field.
6795 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6796 (check_pending_event_prevents_wildcard_vcont_callback)
6797 (remote_target::check_pending_events_prevent_wildcard_vcont)
6798 (remote_target::discard_pending_stop_replies)
6799 (remote_target::discard_pending_stop_replies_in_queue)
6800 (remote_target::remote_notif_remove_queued_reply): Fill in
6802 (remote_notif_get_pending_events): New.
6803 (remote_target::readchar, remote_target::remote_serial_write):
6804 Save/restore curr_quit_handler_target.
6806 (kill_new_fork_children): Fill in 'remote' field.
6807 (packet_command): Use get_current_remote_target, defer to
6808 remote_target method of same name.
6809 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6810 parameter, and save it in m_remote. All callers adjusted.
6811 (scoped_remote_fd::release): Use m_remote.
6812 (scoped_remote_fd::m_remote): New field.
6813 (remote_file_put, remote_file_get, remote_file_delete): Use
6814 get_current_remote_target, defer to remote_target method of same
6816 (remote_btrace_reset): Add remote_state paremeter. Update all
6818 (remote_async_inferior_event_handler). Pass down 'data'.
6819 (remote_new_objfile): Use get_current_remote_target.
6820 (remote_target::vcont_r_supported): New.
6821 (set_range_stepping): Use get_current_remote_target and
6822 remote_target::vcont_r_supported.
6823 (_initialize_remote): Don't allocate 'remote_state' and
6824 'stop_reply_queue' globals.
6825 * remote.h (struct remote_target): Forward declare.
6826 (getpkt, putpkt, remote_notif_get_pending_events): Add
6827 'remote_target' parameter.
6829 2018-05-22 Pedro Alves <palves@redhat.com>
6831 * remote.c (vcont_builder): Now a class. Make all data members
6833 (vcont_builder) <vcont_builder, restart, flush, push_action>:
6835 (vcont_builder_restart): Rename to ...
6836 (vcont_builder::restart): ... this.
6837 (vcont_builder_flush): Rename to ...
6838 (vcont_builder::flush): ... this.
6839 (vcont_builder_push_action): Rename to ...
6840 (vcont_builder::push_action): ... this.
6841 (remote_target::commit_resume): Adjust.
6843 2018-05-22 Pedro Alves <palves@redhat.com>
6845 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6846 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6847 (get_fixed_memory_packet_size): New.
6848 (get_memory_packet_size): Use it.
6849 (set_memory_packet_size): Don't override the config size with
6850 DEFAULT_MAX_MEMORY_PACKET_SIZE.
6851 (show_memory_packet_size): Use get_fixed_memory_packet_size.
6852 Don't refer to get_memory_packet_size if not connected to a remote
6853 target. Show "(default)" if configured size is 0.
6855 2018-05-22 Pedro Alves <palves@redhat.com>
6857 * remote.c (remote_target::mourn_inferior): Move
6858 discard_pending_stop_replies call here from ...
6859 (_initialize_remote): ... here.
6861 2018-05-22 Pedro Alves <palves@redhat.com>
6863 * remote.c (compare_section_command): Remove set_general_process
6866 2018-05-22 Pedro Alves <palves@redhat.com>
6868 * remote.c (struct packet_reg, struct remote_arch_state):
6869 Move higher up in the file.
6870 (remote_state) <m_arch_states>: Store remote_arch_state values
6871 instead of remote_arch_state pointers.
6872 (remote_state::get_remote_arch_state): Adjust.
6874 2018-05-22 Pedro Alves <palves@redhat.com>
6876 * remote.c: Include <unordered_map>.
6877 (remote_state): Now a class.
6878 (remote_state) <get_remote_arch_state>: Declare method.
6879 <get_remote_arch_state>: New field.
6880 (remote_arch_state) <remote_arch_state>: Declare ctor.
6881 <regs>: Now a unique_ptr.
6882 (remote_gdbarch_data_handle): Delete.
6883 (get_remote_arch_state): Delete.
6884 (remote_state::get_remote_arch_state): New.
6885 (get_remote_state): Adjust to call remote_state's
6886 get_remote_arch_state method.
6887 (init_remote_state): Delete, bits factored out to ...
6888 (remote_arch_state::remote_arch_state): ... this new method.
6889 (get_remote_packet_size, get_memory_packet_size)
6890 (process_g_packet, remote_target::fetch_registers)
6891 (remote_target::prepare_to_store, store_registers_using_G)
6892 (remote_target::store_registers, remote_target::get_trace_status):
6893 Adjust to call remote_state's method.
6894 (_initialize_remote): Remove reference to
6895 remote_gdbarch_data_handle.
6897 2018-05-22 Pedro Alves <palves@redhat.com>
6899 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6900 pread>: New method declarations.
6901 (remote_target::open_1): Adjust.
6902 (readahead_cache_invalidate): Rename to ...
6903 (readahead_cache::invalidate): ... this, and adjust to be a class
6905 (readahead_cache_invalidate_fd): Rename to ...
6906 (readahead_cache::invalidate_fd): ... this, and adjust to be a
6908 (remote_hostio_pwrite): Adjust.
6909 (remote_hostio_pread_from_cache): Rename to ...
6910 (readahead_cache::pread): ... this, and adjust to be a class
6912 (remote_hostio_close): Adjust.
6914 2018-05-22 Pedro Alves <palves@redhat.com>
6916 * remote.c (remote_hostio_close_cleanup): Delete.
6917 (class scoped_remote_fd): New.
6918 (remote_file_put, remote_file_get): Use it.
6920 2018-05-22 Pedro Alves <palves@redhat.com>
6922 (struct vCont_action_support): Use bool and initialize all fields.
6923 (struct readahead_cache): Initialize all fields.
6924 (remote_state): Use bool and initialize all fields.
6925 (remote_state::remote_state, remote_state::~remote_state): New.
6926 (new_remote_state): Delete.
6927 (_initialize_remote): Use new to allocate remote_state.
6929 2018-05-22 Pedro Alves <palves@redhat.com>
6933 * c-exp.y: Include "c-support.h".
6934 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6935 of tolower. Use c_ident_is_alpha to scan names.
6936 * c-lang.c: Include "c-support.h".
6937 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6938 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6939 * c-support.h: New file, with bits factored out from ...
6940 * cp-name-parser.y: ... this file.
6941 Include "c-support.h".
6942 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6943 c-support.h and renamed.
6944 (symbol_end, yylex): Adjust.
6946 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6948 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6949 parameter type to CORE_ADDR.
6950 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6951 parameter type in declaration to CORE_ADDR.
6952 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6953 target_auxv_search to get AT_HWCAP and use the result to get the
6955 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6956 to CORE_ADDR. Remove the cast of the return value to unsigned
6957 long. Fix error predicate of target_auxv_search.
6958 (ppc_linux_nat_target::read_description): Change the type of the
6959 hwcap variable to CORE_ADDR.
6961 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6963 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6964 if the size of fpscr is larger than 32 bits.
6966 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6968 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6969 (ppc32_linux_vsxregmap): New global.
6970 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6971 regcache_supply_regset, and regcache_collect_regset.
6972 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6973 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6974 (fetch_vsx_register, store_vsx_register): Remove.
6975 (fetch_vsx_registers): Add regno parameter. Get regset using
6976 ppc_linux_vsxregset. Use regset to supply registers.
6977 (store_vsx_registers): Add regno parameter. Get regset using
6978 ppc_linux_vsxregset. Use regset to collect registers.
6979 (fetch_register): Call fetch_vsx_registers instead of
6981 (store_register): Call store_vsx_registers instead of
6983 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6984 new regno parameter.
6985 (store_ppc_registers): Call store_vsx_registers with -1 for the
6986 new regno parameter.
6987 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6988 (ppc_collect_vsxregset): Remove.
6990 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6992 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6994 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6995 for vector register offset fields.
6996 (ppc64_fbsd_reg_offsets): Likewise.
6997 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6998 to vector register offset fields.
6999 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7000 to vector register offset fields.
7001 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7002 vector register offset fields.
7003 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7004 initializers for vector register offset fields.
7005 (rs6000_aix64_reg_offsets): Likewise.
7006 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7007 (ppc_supply_vrregset): Remove.
7008 (ppc_collect_vrregset): Remove.
7009 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7010 (ppc_linux_vrregset) : New function.
7011 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7012 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7013 (ppc32_linux_vrregset): Remove.
7014 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7015 and use result instead of ppc32_linux_vrregset.
7016 (ppc32_linux_reg_offsets): Remove initializers for vector register
7018 (ppc64_linux_reg_offsets): Likewise.
7019 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7020 * ppc-linux-nat.c: Include regset.h.
7021 (gdb_vrregset_t): Adjust comment to account for little-endian
7023 (supply_vrregset, fill_vrregset): Remove.
7024 (fetch_altivec_register, store_altivec_register): Remove.
7025 (fetch_altivec_registers): Add regno parameter. Get regset using
7026 ppc_linux_vrregset. Use regset to supply registers.
7027 (store_altivec_registers): Add regno parameter. Get regset using
7028 ppc_linux_vrregset. Use regset to collect registers.
7029 (fetch_register): Call fetch_altivec_registers instead of
7030 fetch_altivec_register.
7031 (store_register): Call store_altivec_registers instead of
7032 store_altivec_register.
7033 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7034 the new regno parameter.
7035 (store_ppc_registers): Call store_altivec_registers with -1 for
7036 the new regno parameter.
7038 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7040 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7041 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7042 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7043 (gdb_vrregset_t): Change array type size to
7044 PPC_LINUX_SIZEOF_VRREGSET.
7045 (gdb_vsxregset_t): Change array type size to
7046 PPC_LINUX_SIZEOF_VSXREGSET.
7047 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7048 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7049 PPC_LINUX_SIZEOF_VSXREGSET.
7051 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7053 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7054 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7056 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7057 ppc_linux_target_wordsize with tid.
7058 (ppc_linux_nat_target::read_description): Call ppc_linux_target
7060 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7061 (ppc64_64bit_inferior_p): Add static and inline specifiers.
7062 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7063 tid parameter. Remove static specifier.
7064 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7065 (ppc_linux_target_wordsize): New declaration.
7067 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7069 * arch/ppc-linux-common.c: New file.
7070 * arch/ppc-linux-common.h: New file.
7071 * arch/ppc-linux-tdesc.h: New file.
7072 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7073 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7074 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7075 arch/ppc-linux-tdesc.h.
7076 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7077 arch/ppc-linux-tdesc.h.
7078 (ppc_linux_nat_target::read_description): Remove target
7079 description matching code. Fill a ppc_linux_features struct and
7080 call ppc_linux_match_description with it. Move comment about ISA
7081 2.05 to ppc-linux-common.c.
7082 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7083 arch/ppc-linux-tdesc.h.
7084 (ppc_linux_core_read_description): Remove target description
7085 matching code. Fill a ppc_linux_features struct and call
7086 ppc_linux_match_description with it.
7087 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7088 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7089 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7090 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7091 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7092 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7093 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7094 (tdesc_powerpc_e500l): Remove.
7096 2018-05-22 Joel Brobecker <brobecker@adacore.com>
7098 * ada-lang.c (catch_assert_command): Pass empty string instead
7099 of NULL for excep_string argument.
7101 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7103 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7104 the width of the requested register exceeds the width of the
7107 2018-05-21 Tom Tromey <tom@tromey.com>
7109 * printcmd.c (output_command): Remove.
7110 (output_command_const): Rename to output_command.
7111 * valprint.h (output_command): Rename from output_command_const.
7112 * tracepoint.c (trace_dump_actions): Call output_command.
7114 2018-05-21 Tom Tromey <tom@tromey.com>
7116 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7117 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7118 * ada-lang.h (create_ada_exception_catchpoint): Update.
7119 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7121 (create_excep_cond_exprs, ~ada_catchpoint)
7122 (should_stop_exception, print_one_exception)
7123 (print_mention_exception, print_recreate_exception): Update.
7124 (ada_get_next_arg): Remove.
7125 (catch_ada_exception_command_split): Use std::string. Change type
7126 of "excep_string", "cond_string".
7127 (catch_ada_exception_command): Update.
7128 (create_ada_exception_catchpoint): Change type of excep_string.
7129 (ada_exception_sal): Remove excep_string parameter.
7130 (~ada_catchpoint): Remove.
7132 2018-05-21 Tom Tromey <tom@tromey.com>
7134 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7137 2018-05-21 Tom Tromey <tom@tromey.com>
7139 * ada-lang.c (ada_exception_message_1, ada_exception_message):
7140 Return unique_xmalloc_ptr.
7141 (print_it_exception): Update.
7143 2018-05-21 Tom Tromey <tom@tromey.com>
7145 * tracepoint.c (trace_dump_actions): Use std::string.
7147 2018-05-21 Tom Tromey <tom@tromey.com>
7149 * symfile.c (reread_symbols): Use std::string for original_name.
7151 2018-05-21 Tom Tromey <tom@tromey.com>
7153 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7154 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
7157 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
7159 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7161 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7162 * objfiles.c (get_objfile_bfd_data): Allocate
7163 objfile_per_bfd_storage with obstack_new when allocating on
7166 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7168 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7170 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7171 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7172 * mdebugread.c (mdebug_build_psymtabs): Likewise.
7173 (add_pending): Likewise.
7174 (parse_symbol): Likewise.
7175 (parse_partial_symbols): Likewise.
7176 (psymtab_to_symtab_1): Likewise.
7177 (new_psymtab): Likewise.
7178 (elfmdebug_build_psymtabs): Likewise.
7179 * minsyms.c (terminate_minimal_symbol_table): Likewise.
7180 * objfiles.c (get_objfile_bfd_data): Likewise.
7181 (objfile_register_static_link): Likewise.
7182 * psymtab.c (allocate_psymtab): Likewise.
7183 * stabsread.c (read_member_functions): Likewise.
7184 * xcoffread.c (xcoff_end_psymtab): Likewise.
7186 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7188 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7189 compiler supports std::is_trivially_constructible.
7190 * common/poison.h: Include obstack.h.
7191 (IsMallocable): Define to is_trivially_constructible if the
7192 compiler supports it, define to true_type otherwise.
7196 (XOBNEWVEC): Redefine.
7197 * gdb_obstack.h (obstack_zalloc): New.
7198 (OBSTACK_ZALLOC): Redefine.
7199 (obstack_calloc): New.
7200 (OBSTACK_CALLOC): Redefine.
7202 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7203 (gdbarch_obstack): New declaration in gdbarch.h, definition in
7205 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7206 obstack_calloc/obstack_zalloc.
7207 (gdbarch_obstack_zalloc): Remove.
7208 * target-descriptions.c (tdesc_data_init): Use obstack_new.
7210 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7212 * stack.c (backtrace_command_1): Remove useless variable int i.
7214 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7216 * stack.c (print_frame_info): Fix comment.
7218 2018-05-18 Tom Tromey <tom@tromey.com>
7220 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7221 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7222 (~dwarf2_per_objfile): Update
7223 (dwarf2_get_dwz_file): Use new.
7224 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7227 2018-05-18 Tom Tromey <tom@tromey.com>
7229 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7231 * dwarf2read.c (struct dwp_file): Add constructor and
7233 (open_and_init_dwp_file): Return a unique_ptr.
7234 (dwarf2_per_objfile, create_dwp_hash_table)
7235 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7236 (lookup_dwo_unit_in_dwp): Update.
7237 (open_and_init_dwp_file, get_dwp_file): Update.
7239 2018-05-18 Tom Tromey <tom@tromey.com>
7241 * dwarf2read.c (dwarf2_per_objfile): Update.
7242 (struct mapped_index): Add initializers.
7243 (dwarf2_read_index): Use new.
7244 (dw2_symtab_iter_init): Update.
7245 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7248 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7250 * dwarf2read.c (mapped_index) <total_size>: Remove.
7252 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7254 * unittests/format_pieces-selftests.c (test_format_specifier):
7257 2018-05-18 Tom Tromey <tom@tromey.com>
7259 * c-typeprint.c (maybe_print_hole): New function.
7260 (c_print_type_struct_field_offset): Update.
7261 (c_type_print_base_struct_union): Call maybe_print_hole.
7263 2018-05-17 Keith Seitz <keiths@redhat.com>
7265 * breakpoint.c (build_bpstat_chain): New function, moved from
7267 (bpstat_stop_status): Add optional parameter, `stop_chain'.
7268 If no stop chain is passed, call build_bpstat_chain to build it.
7269 * breakpoint.h (build_bpstat_chain): Declare.
7270 (bpstat_stop_status): Move documentation here from breakpoint.c.
7271 * infrun.c (handle_signal_stop): Before eliding inlined frames,
7272 build the stop chain and pass it to skip_inline_frames.
7273 Pass this stop chain to bpstat_stop_status.
7274 * inline-frame.c: Include breakpoint.h.
7275 (stopped_by_user_bp_inline_frame): New function.
7276 (skip_inline_frames): Add parameter `stop_chain'.
7277 Move documention to inline-frame.h.
7278 If non-NULL, use stopped_by_user_bp_inline_frame to determine
7279 whether the frame should be elided.
7280 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7281 Add moved documentation and update for new parameter.
7283 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7286 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7287 unittests/format_pieces-selftests.c.
7288 * common/format.h (format_piece) <operator==>: New.
7289 (format_pieces) <operator[]>: Remove.
7290 * common/format.c (format_pieces::format_pieces): Handle \e.
7291 * unittests/format_pieces-selftests.c: New.
7293 2018-05-17 Tom Tromey <tom@tromey.com>
7296 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7297 (dw2_instantiate_symtab): Add skip_partial parameter.
7298 (dw2_find_last_source_symtab, dw2_map_expand_apply)
7299 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7300 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7301 (dw2_expand_symtabs_matching_one)
7302 (dw2_find_pc_sect_compunit_symtab)
7303 (dw2_debug_names_lookup_symbol)
7304 (dw2_debug_names_expand_symtabs_for_function): Update.
7305 (init_cutu_and_read_dies): Add skip_partial parameter.
7306 (process_psymtab_comp_unit, build_type_psymtabs_1)
7307 (process_skeletonless_type_unit, load_partial_comp_unit)
7308 (psymtab_to_symtab_1): Update.
7309 (load_full_comp_unit): Add skip_partial parameter.
7310 (process_imported_unit_die, dwarf2_read_addr_index)
7311 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7312 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7313 (read_signatured_type): Update.
7315 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7317 * value.c (release_value): Remove unused variable.
7318 (record_latest_value): Likewise.
7319 (access_value_history): Likewise.
7320 (preserve_values): Likewise.
7322 2018-05-17 Tom Tromey <tom@tromey.com>
7324 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7327 2018-05-16 Maciej W. Rozycki <macro@mips.com>
7330 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7331 Also handle registers whose width is not a multiple of
7333 (linux_nat_trad_target::store_register): Likewise.
7335 2018-05-16 Tom Tromey <tom@tromey.com>
7337 * gdbcore.h (core_bfd): Redefine.
7338 * corelow.c (core_target::close): Update.
7339 (core_target_open): Update.
7340 * progspace.h (struct program_space) <cbfd>: Now a
7343 2018-05-16 Tom Tromey <tom@tromey.com>
7346 * symfile-add-flags.h (enum symfile_add_flags)
7347 <SYMFILE_NOT_FILENAME>: New constant.
7348 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
7349 objfile name from BFD.
7350 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7351 * minidebug.c (find_separate_debug_file_in_section): Put
7352 ".gnu_debugdata" into BFD's file name.
7354 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
7356 * regcache.c (regcache_read_ftype, regcache_write_ftype):
7359 2018-05-15 Tamar Christina <tamar.christina@arm.com>
7362 * aarch64-tdep.c (aarch64_analyze_prologue,
7363 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7364 Indicate not interested in errors.
7366 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7368 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7369 Supply the MIPS_ZERO_REGNUM register.
7371 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7373 * mips-tdep.c (mask_address_var): Make variable static.
7375 2018-05-14 Tom Tromey <tom@tromey.com>
7377 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7379 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
7381 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7382 FXSAVE_ADDR for the mxcsr register.
7384 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
7386 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7388 2018-05-11 Pedro Alves <palves@redhat.com>
7390 * corelow.c (core_target) <core_target>: No longer inline.
7391 Initialize m_core_gdbarch, m_core_vec and build the section table
7393 <~core_target>: New.
7394 <core_gdbarch, get_core_register_section>: New methods.
7395 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7396 factored out from ...
7397 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7399 (sniff_core_bfd): Add gdbarch parameter.
7400 (core_close): Delete, merged into ...
7401 (core_target::close): ... here. Delete self.
7402 (core_close_cleanup): Delete.
7403 (core_target_open): Allocate a core_target on the heap. Use a
7404 unique_ptr instead of a cleanup. Bits moved into the core_target
7405 ctor. Adjust to use core_target methods instead of globals.
7406 (get_core_register_section): Rename to ...
7407 (core_target::get_core_register_section): ... this and adjust.
7408 (struct get_core_registers_cb_data): New.
7409 (get_core_registers_cb): Use it. Use bool.
7410 (core_target::fetch_registers, core_target::files_info)
7411 (core_target::xfer_partial, core_target::read_description)
7412 (core_target::pid_to, core_target::thread_name): Adjust to
7413 reference class fields instead of globals.
7414 * target.h (struct target_ops_deleter, target_ops_up): New.
7416 2018-05-11 Pedro Alves <palves@redhat.com>
7418 * corefile.c (core_file_command): Move to corelow.c.
7419 * corelow.c (the_core_target): Delete.
7420 (core_file_command): Moved from corefile.c. Check exec_bfd
7421 instead of the_core_target. Use target_detach instead of calling
7422 into the_core_target directly.
7423 (maybe_say_no_core_file_now): New.
7424 (core_target::detach): Use it.
7425 (_initialize_corelow): Remove references to the_core_target.
7426 * gdbcore.h (the_core_target): Delete.
7428 2018-05-11 Tom Tromey <tromey@redhat.com>
7429 Pedro Alves <palves@redhat.com>
7431 * corefile.c (core_bfd): Remove.
7432 * gdbcore.h (core_bfd): Now a macro.
7433 * progspace.h (struct program_space) <cbfd>: New field.
7435 2018-05-11 Tom Tromey <tom@tromey.com>
7437 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7440 2018-05-10 Tom Tromey <tom@tromey.com>
7442 * configure: Rebuild.
7443 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7445 2018-05-10 Joel Brobecker <brobecker@adacore.com>
7448 * regformats/regdat.sh: Adjust script, following the addition
7449 of the new expedite_regs parameter to init_target_desc.
7451 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
7454 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7455 set_gdbarch_significant_addr_bit.
7456 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7457 set_gdbarch_significant_addr_bit.
7458 * utils.c (address_significant): Update to sign extend addr.
7460 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
7462 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7463 (xtensa_linux_init_abi): Limit tdep->num_regs by
7464 tdep->num_nopriv_regs.
7465 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7466 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7469 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
7471 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7473 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
7475 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7476 (I387_MXCSR_INIT_VAL): New constant.
7477 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7478 buffer if it was supplied by the inferior.
7479 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7480 (i387_xsave_get_clear_bv): New function.
7481 (i387_supply_xsave): Only read x87 control registers from the
7482 xsave buffer if the feature is enabled, and the state will have
7483 been written, otherwise, provide a suitable default.
7484 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7485 including x87 control registers. Update control registers if they
7486 have changed from the default value, and mark features as enabled
7488 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7490 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7492 * spu-tdep.c (info_spu_event_command): Fix output formatting.
7494 2018-05-07 Tom Tromey <tom@tromey.com>
7496 * configure: Rebuild.
7497 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7499 2018-05-07 Tom Tromey <tom@tromey.com>
7502 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7503 bit. Use correct value for VDIV.
7505 2018-05-04 Tom Tromey <tom@tromey.com>
7507 * configure: Rebuild.
7508 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7510 2018-05-04 Tom Tromey <tom@tromey.com>
7512 * linux-record.c (record_linux_system_call) <case
7513 RECORD_SYS_RECVFROM>: Add "break".
7515 2018-05-04 Tom Tromey <tom@tromey.com>
7517 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7518 Add missing "break".
7519 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7520 Add missing "break".
7522 2018-05-04 Tom Tromey <tom@tromey.com>
7524 * rs6000-tdep.c (ppc_process_record_op4)
7525 (ppc_process_record_op63): Add fall-through comment.
7527 2018-05-04 Tom Tromey <tom@tromey.com>
7529 * i386-tdep.c (i386_process_record): Add fall-through comment.
7531 2018-05-04 Tom Tromey <tom@tromey.com>
7533 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7536 2018-05-04 Tom Tromey <tom@tromey.com>
7538 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7539 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7540 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7542 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7544 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7547 2018-05-04 Tom Tromey <tom@tromey.com>
7549 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7551 2018-05-04 Tom Tromey <tom@tromey.com>
7553 * s390-tdep.c (s390_process_record): Fix fall-through comments.
7554 * xcoffread.c (scan_xcoff_symtab): Move comment later.
7555 * symfile.c (section_is_mapped): Fix fall-through comment.
7556 * stabsread.c (define_symbol, read_member_functions): Fix
7557 fall-through comment.
7558 * s390-linux-tdep.c (s390_process_record): Fix fall-through
7560 * remote.c (remote_wait_as): Fix fall-through comment.
7561 * p-exp.y (yylex): Fix fall-through comment.
7562 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7564 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7565 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7566 * jv-exp.y (yylex): Fix fall-through comment.
7567 * go-exp.y (lex_one_token): Fix fall-through comment.
7568 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7569 fall-through comment.
7570 * f-exp.y (yylex): Fix fall-through comment.
7571 * dwarf2read.c (process_die): Fix fall-through comments.
7572 * dbxread.c (process_one_symbol): Fix fall-through comment.
7573 * d-exp.y (lex_one_token): Fix fall-through comment.
7574 * cp-name-parser.y (yylex): Fix fall-through comment.
7575 * coffread.c (coff_symtab_read): Fix fall-through comment.
7576 * c-exp.y (lex_one_token): Fix fall-through comment.
7577 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7579 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7582 2018-05-04 Tom Tromey <tom@tromey.com>
7585 * NEWS: Mention gdb.execute change.
7586 * gdbcmd.h (execute_control_command): Don't declare.
7587 * python/python.c (execute_gdb_command): Use read_command_lines_1,
7588 execute_control_commands, execute_control_commands_to_string.
7589 * cli/cli-script.h (execute_control_commands)
7590 (execute_control_commands_to_string): Declare.
7591 (execute_control_command): Add from_tty parameter.
7592 * cli/cli-script.c (execute_control_commands)
7593 (execute_control_commands_to_string): New functions.
7594 (execute_user_command): Use execute_control_commands.
7595 (execute_control_command_1): Add "from_tty" parameter. Update.
7596 (execute_control_command): Likewise.
7598 2018-05-04 Tom Tromey <tom@tromey.com>
7601 * NEWS: Mention that breakpoint commands are writable.
7602 * python/py-breakpoint.c (bppy_set_commands): New function.
7603 (breakpoint_object_getset) <"commands">: Use it.
7605 2018-05-04 Tom Tromey <tom@tromey.com>
7607 * tracepoint.c (actions_command): Update.
7608 * mi/mi-cmd-break.c (mi_command_line_array)
7609 (mi_command_line_array_cnt, mi_command_line_array_ptr)
7610 (mi_read_next_line): Remove.
7611 (mi_cmd_break_commands): Update.
7612 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7614 * cli/cli-script.c (get_command_line): Update.
7615 (process_next_line): Use function_view. Constify.
7616 (recurse_read_control_structure, read_command_lines)
7617 (read_command_lines_1): Change argument types to function_view.
7618 (do_define_command, document_command): Update.
7619 * breakpoint.h (check_tracepoint_command): Don't declare.
7620 * breakpoint.c (check_tracepoint_command): Remove.
7621 (commands_command_1, create_tracepoint_from_upload): Update.
7623 2018-05-04 Tom Tromey <tom@tromey.com>
7626 * cli/cli-script.h (enum command_control_type) <define_control>:
7628 * cli/cli-script.c (multi_line_command_p): Handle define_control.
7629 (build_command_line, execute_control_command_1)
7630 (process_next_line): Likewise.
7631 (do_define_command): New function, extracted from define_command.
7632 (define_command): Use it.
7634 2018-05-04 Tom Tromey <tom@tromey.com>
7636 * tracepoint.c (actions_command): Update.
7637 * cli/cli-script.h (read_command_lines): Update.
7638 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7639 (MAX_TMPBUF): Remove define.
7640 (define_command): Use string_printf.
7641 (document_command): Likewise.
7642 * breakpoint.c (commands_command_1): Update.
7644 2018-05-04 Tom Tromey <tom@tromey.com>
7646 * top.c (execute_command): Update.
7647 * cli/cli-script.h (print_command_lines): Now varargs.
7648 * cli/cli-script.c (print_command_lines): Now varargs.
7649 (execute_control_command_1) <case while_control, case if_control>:
7652 2018-05-04 Tom Tromey <tom@tromey.com>
7654 * tracepoint.c (all_tracepoint_actions): Rename from
7655 all_tracepoint_actions_and_cleanup. Change return type.
7656 (actions_command, encode_actions_1, encode_actions)
7657 (trace_dump_actions, tdump_command): Update.
7658 * remote.c (remote_download_command_source): Update.
7659 * python/python.c (gdbpy_eval_from_control_command)
7660 (python_command, python_interactive_command): Update.
7661 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7662 * guile/guile.c (guile_command)
7663 (gdbscm_eval_from_control_command, guile_command): Update.
7664 * compile/compile.c (compile_code_command)
7665 (compile_print_command, compile_to_object): Update.
7666 * cli/cli-script.h (struct command_lines_deleter): New.
7667 (counted_command_line): New typedef.
7668 (struct command_line): Add constructor, destructor.
7669 <body_list>: Remove.
7670 <body_list_0, body_list_1>: New members.
7671 (command_line_up): Remove typedef.
7672 (read_command_lines, read_command_lines_1, get_command_line):
7674 (copy_command_lines): Don't declare.
7675 * cli/cli-script.c (build_command_line): Use "new".
7676 (get_command_line): Return counted_command_line.
7677 (print_command_lines, execute_user_command)
7678 (execute_control_command_1, while_command, if_command): Update.
7679 (realloc_body_list): Remove.
7680 (process_next_line, recurse_read_control_structure): Update.
7681 (read_command_lines, read_command_lines_1): Return counted_command_line.
7682 (free_command_lines): Use "delete".
7683 (copy_command_lines): Remove.
7684 (define_command, document_command, show_user_1): Update.
7685 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7686 a counted_command_line.
7687 * breakpoint.h (counted_command_line): Remove typedef.
7688 (breakpoint_set_commands): Update.
7689 * breakpoint.c (check_no_tracepoint_commands)
7690 (validate_commands_for_breakpoint): Update.
7691 (breakpoint_set_commands): Change commands to be a
7692 counted_command_line.
7693 (commands_command_1, update_dprintf_command_list)
7694 (create_tracepoint_from_upload): Update.
7696 2018-05-04 Tom Tromey <tom@tromey.com>
7698 * cli/cli-decode.h (cmd_list_element): New constructor.
7699 (~cmd_list_element): New destructor.
7700 (struct cmd_list_element): Add initializers.
7701 * cli/cli-decode.c (do_add_cmd): Use "new".
7702 (delete_cmd): Use "delete".
7704 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
7705 Pedro Alves <palves@redhat.com>
7707 PR breakpoints/19806 and support for PR external/20207.
7708 * NEWS: Mention Aarch64 watchpoint improvements.
7709 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7710 watchpoints and PR external/20207 watchpoints.
7711 * nat/aarch64-linux-hw-point.c
7712 (kernel_supports_any_contiguous_range): New.
7713 (aarch64_watchpoint_offset): New.
7714 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7715 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7716 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7717 (aarch64_align_watchpoint): New parameters aligned_offset_p and
7718 next_addr_orig_p. Support PR external/20207 watchpoints.
7719 (aarch64_downgrade_regs): New.
7720 (aarch64_dr_state_insert_one_point): New parameters offset and
7722 (aarch64_dr_state_remove_one_point): Likewise.
7723 (aarch64_handle_breakpoint): Update caller.
7724 (aarch64_handle_aligned_watchpoint): Likewise.
7725 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7727 (aarch64_linux_set_debug_regs): Remove const from state. Call
7728 aarch64_downgrade_regs.
7729 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7730 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7731 (DR_CONTROL_MASK): ... this.
7732 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7733 (unsigned int aarch64_watchpoint_offset): New prototype.
7734 (aarch64_linux_set_debug_regs): Remove const from state.
7735 * utils.c (align_up, align_down): Move to ...
7736 * common/common-utils.c (align_up, align_down): ... here.
7737 * utils.h (align_up, align_down): Move to ...
7738 * common/common-utils.h (align_up, align_down): ... here.
7740 2018-05-04 Joel Brobecker <brobecker@adacore.com>
7742 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7743 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7744 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7745 Re-implement to match the ABI as summarized in GCC's
7746 gcc/config/sparc/sparc.c. All callers updated.
7747 (sparc32_store_arguments): Remove assertion.
7749 2018-05-04 Tom Tromey <tom@tromey.com>
7751 * printcmd.c: Don't include tui.h.
7752 (decode_format): Use skip_spaces.
7754 2018-05-04 Tom Tromey <tom@tromey.com>
7757 * printcmd.c (last_count): New global.
7758 (x_command): Use saved count when repeating.
7760 2018-05-04 Tom Tromey <tom@tromey.com>
7762 * nto-procfs.c (do_closedir_cleanup): Remove.
7763 (procfs_pidlist): Use gdb_dir_up.
7764 * procfs.c (do_closedir_cleanup): Remove.
7765 (proc_update_threads): Use gdb_dir_up.
7766 * common/filestuff.h (struct gdb_dir_deleter): New.
7767 (gdb_dir_up): New typedef.
7769 2018-05-04 Tom Tromey <tom@tromey.com>
7771 * ada-lang.c (print_mention_exception): Use std::string.
7773 2018-05-04 Tom Tromey <tom@tromey.com>
7775 * ada-lang.c (create_excep_cond_exprs): Update.
7776 (ada_exception_catchpoint_cond_string): Use std::string.
7778 2018-05-04 Tom Tromey <tom@tromey.com>
7780 * ada-lang.c (xget_renaming_scope): Return std::string.
7781 (old_renaming_is_invisible): Update.
7783 2018-05-04 Tom Tromey <tom@tromey.com>
7785 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7786 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7788 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
7790 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7792 2018-05-04 Tom Tromey <tom@tromey.com>
7794 * remote.c (remote_query_supported_append): Change type.
7795 (remote_check_symbols): Update.
7797 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
7800 * configure.ac: Prepend libpython.
7801 * python/python-config.py: Likewise.
7802 * configure: Regenerate.
7804 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
7806 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7808 2018-05-03 Pedro Alves <palves@redhat.com>
7811 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7812 override. Write 'true' instead of '1'.
7813 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7816 2018-05-02 Pedro Alves <palves@redhat.com>
7818 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7819 add_inf_child_target.
7820 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7821 add_inf_child_target.
7822 * aix-thread.c (aix_thread_target_info): New.
7823 (aix_thread_target) <shortname, longname, doc>: Delete.
7825 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7826 add_inf_child_target.
7827 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7828 add_inf_child_target.
7829 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7830 add_inf_child_target.
7831 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7832 add_inf_child_target.
7833 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7834 add_inf_child_target.
7835 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7836 add_inf_child_target.
7837 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7838 add_inf_child_target.
7839 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7840 add_inf_child_target.
7841 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7842 add_inf_child_target.
7843 * bfd-target.c (target_bfd_target_info): New.
7844 (target_bfd) <shortname, longname, doc>: Delete.
7846 * bsd-kvm.c (bsd_kvm_target_info): New.
7847 (bsd_kvm_target) <shortname, longname, doc>: Delete.
7849 (bsd_kvm_target::open): Rename to ...
7850 (bsd_kvm_target_open): ... this. Adjust.
7851 * bsd-uthread.c (bsd_uthread_target_info): New.
7852 (bsd_uthread_target) <shortname, longname, doc>: Delete.
7854 * corefile.c (core_file_command): Adjust.
7855 * corelow.c (core_target_info): New.
7856 (core_target) <shortname, longname, doc>: Delete.
7858 (core_target::open): Rename to ...
7859 (core_target_open): ... this. Adjust.
7860 * ctf.c (ctf_target_info): New.
7861 (ctf_target) <shortname, longname, doc>: Delete.
7863 (ctf_target::open): Rename to ...
7864 (ctf_target_open): ... this.
7865 (_initialize_ctf): Adjust.
7866 * exec.c (exec_target_info): New.
7867 (exec_target) <shortname, longname, doc>: Delete.
7869 (exec_target::open): Rename to ...
7870 (exec_target_open): ... this.
7871 * gdbcore.h (core_target_open): Declare.
7872 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7873 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7874 add_inf_child_target.
7875 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7876 add_inf_child_target.
7877 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7878 add_inf_child_target.
7879 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7880 add_inf_child_target.
7881 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7882 add_inf_child_target.
7883 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7884 add_inf_child_target.
7885 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7886 add_inf_child_target.
7887 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7888 add_inf_child_target.
7889 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7890 add_inf_child_target.
7891 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7892 add_inf_child_target.
7893 * inf-child.c (inf_child_target_info): New.
7894 (inf_child_target::info): New.
7895 (inf_child_open_target): Remove 'target' parameter. Use
7896 get_native_target instead.
7897 (inf_child_target::open): Delete.
7898 (add_inf_child_target): New.
7899 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7902 (add_inf_child_target): Declare.
7903 (inf_child_open_target): Declare.
7904 * linux-thread-db.c (thread_db_target_info): New.
7905 (thread_db_target) <shortname, longname, doc>: Delete.
7907 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7908 add_inf_child_target.
7909 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7910 add_inf_child_target.
7911 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7912 add_inf_child_target.
7913 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7914 add_inf_child_target.
7915 * make-target-delegates (print_class): Adjust.
7916 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7917 add_inf_child_target.
7918 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7919 add_inf_child_target.
7920 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7921 add_inf_child_target.
7922 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7923 add_inf_child_target.
7924 * nto-procfs.c (nto_native_target_info): New.
7925 (nto_procfs_target_native) <shortname, longname, doc>:
7928 (nto_procfs_target_info): New.
7929 (nto_procfs_target_procfs) <shortname, longname, doc>:
7932 (init_procfs_targets): Adjust.
7933 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7934 add_inf_child_target.
7935 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7936 add_inf_child_target.
7937 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7938 add_inf_child_target.
7939 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7940 add_inf_child_target.
7941 * ravenscar-thread.c (ravenscar_target_info): New.
7942 (ravenscar_thread_target) <shortname, longname, doc>:
7945 * record-btrace.c (record_btrace_target_info):
7946 (record_btrace_target) <shortname, longname, doc>: Delete.
7948 (record_btrace_target::open): Rename to ...
7949 (record_btrace_target_open): ... this. Adjust.
7950 * record-full.c (record_longname, record_doc): New.
7951 (record_full_base_target) <shortname, longname, doc>: Delete.
7953 (record_full_target_info): New.
7954 (record_full_target): <shortname>: Delete.
7956 (record_full_core_open_1, record_full_open_1): Update comments.
7957 (record_full_base_target::open): Rename to ...
7958 (record_full_open): ... this.
7959 (cmd_record_full_restore): Update.
7960 (_initialize_record_full): Update.
7961 * remote-sim.c (remote_sim_target_info): New.
7962 (gdbsim_target) <shortname, longname, doc>: Delete.
7964 (gdbsim_target::open): Rename to ...
7965 (gdbsim_target_open): ... this.
7966 (_initialize_remote_sim): Adjust.
7967 * remote.c (remote_doc): New.
7968 (remote_target_info): New.
7969 (remote_target) <shortname, longname, doc>: Delete.
7971 (extended_remote_target_info): New.
7972 (extended_remote_target) <shortname, longname, doc>: Delete.
7974 (remote_target::open_1): Make static. Adjust.
7975 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7976 * s390-linux-nat.c (_initialize_s390_nat): Use
7977 add_inf_child_target.
7978 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7979 add_inf_child_target.
7980 * sol-thread.c (thread_db_target_info): New.
7981 (sol_thread_target) <shortname, longname, doc>: Delete.
7983 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7984 add_inf_child_target.
7985 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7986 add_inf_child_target.
7987 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7988 add_inf_child_target.
7989 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7990 add_inf_child_target.
7991 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7992 add_inf_child_target.
7993 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7994 add_inf_child_target.
7995 * spu-linux-nat.c (_initialize_spu_nat): Use
7996 add_inf_child_target.
7997 * spu-multiarch.c (spu_multiarch_target_info): New.
7998 (spu_multiarch_target) <shortname, longname, doc>: Delete.
8000 * target-delegates.c: Regenerate.
8001 * target.c: Include <unordered_map>.
8002 (target_ops_p): Delete.
8003 (DEF_VEC_P(target_ops_p)): Delete.
8004 (target_factories): New.
8005 (test_target_info): New.
8006 (test_target_ops::info): New.
8007 (open_target): Adjust to use target_factories.
8008 (add_target_with_completer): Rename to ...
8009 (add_target): ... this. Change prototype. Register target_info
8010 and open callback in target_factories. Register target_info in
8011 command context instead of target_ops.
8012 (add_target): Delete old implementation.
8013 (add_deprecated_target_alias): Change prototype. Adjust.
8014 (the_native_target): New.
8015 (set_native_target, get_native_target): New.
8016 (find_default_run_target): Use the_native_target.
8017 (find_attach_target, find_run_target): Simplify.
8018 (target_ops::open): Delete.
8019 (dummy_target_info): New.
8020 (dummy_target::shortname, dummy_target::longname)
8021 (dummy_target::doc): Delete.
8022 (dummy_target::info): New.
8023 (debug_target::shortname, debug_target::longname)
8024 (debug_target::doc): Delete.
8025 (debug_target::info): New.
8026 * target.h (struct target_info): New.
8027 (target_ops::~target_ops): Add comment.
8028 (target_ops::info): New.
8029 (target_ops::shortname, target_ops::longname, target_ops::doc): No
8030 longer virtual. Implement in terms of target_info.
8031 (set_native_target, get_native_target): Declare.
8032 (target_open_ftype): New.
8033 (add_target, add_target_with_completer)
8034 (add_deprecated_target_alias): Change prototype.
8035 (test_target) <shortname, longname, doc>: Delete.
8037 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8038 add_inf_child_target.
8039 * tracefile-tfile.c (tfile_target_info): New.
8040 (tfile_target) <shortname, longname, doc>: Delete.
8042 (tfile_target::open): Rename to ...
8043 (tfile_target_open): ... this.
8044 (_initialize_tracefile_tfile): Adjust.
8045 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8046 add_inf_child_target.
8047 * windows-nat.c (_initialize_windows_nat): Use
8048 add_inf_child_target.
8049 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8050 add_inf_child_target.
8052 2018-05-02 Pedro Alves <palves@redhat.com>
8054 * linux-nat.h (linux_nat_target) <low_new_thread,
8055 low_delete_thread, low_new_fork, low_forget_process,
8056 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8057 New virtual methods.
8058 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8059 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8060 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8061 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8062 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8064 * linux-fork.c (delete_fork): Adjust to call low method.
8065 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8066 (linux_nat_new_fork, linux_nat_forget_process_hook)
8067 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8068 (linux_nat_status_is_event):
8069 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8070 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8072 (sigtrap_is_event): Rename to ...
8073 (linux_nat_target::low_status_is_event): ... this.
8074 (linux_nat_set_status_is_event): Delete.
8075 (save_stop_reason, linux_nat_wait_1)
8076 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8078 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8079 (linux_nat_set_new_fork, linux_nat_set_forget_process)
8080 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8081 (linux_nat_set_prepare_to_resume): Delete.
8082 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8083 low virtual methods.
8084 * amd64-linux-nat.c: Likewise.
8085 * arm-linux-nat.c: Likewise.
8086 * i386-linux-nat.c: Likewise.
8087 * ia64-linux-nat.c: Likewise.
8088 * mips-linux-nat.c: Likewise.
8089 * ppc-linux-nat.c: Likewise.
8090 * s390-linux-nat.c: Likewise.
8091 * sparc64-linux-nat.c: Likewise.
8092 * x86-linux-nat.c: Likewise.
8093 * x86-linux-nat.h: Include "nat/x86-linux.h".
8094 (x86_linux_nat_target) <low_new_fork, low_forget_process,
8095 low_prepare_to_resume, low_new_thread, low_delete_thread>:
8098 2018-05-02 Pedro Alves <palves@redhat.com>
8100 * target.h (target_ops)
8101 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8102 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8103 stopped_by_watchpoint, have_continuable_watchpoint,
8104 stopped_data_address, watchpoint_addr_within_range,
8105 can_accel_watchpoint_condition, can_run, thread_alive,
8106 has_all_memory, has_memory, has_stack, has_registers,
8107 has_execution, can_async_p, is_async_p, supports_non_stop,
8108 always_non_stop_p, can_execute_reverse, supports_multi_process,
8109 supports_enable_disable_tracepoint,
8110 supports_disable_randomization, supports_string_tracing,
8111 supports_evaluation_of_breakpoint_conditions,
8112 can_run_breakpoint_commands, filesystem_is_local,
8113 can_download_tracepoint, get_trace_state_variable_value,
8114 set_trace_notes, get_tib_address, use_agent, can_use_agent,
8115 record_is_replaying, record_will_replay,
8116 augmented_libraries_svr4_read>: Adjust to return bool.
8117 * aarch64-linux-nat.c: All implementations adjusted.
8118 * aix-thread.c: All implementations adjusted.
8119 * arm-linux-nat.c: All implementations adjusted.
8120 * breakpoint.c: All implementations adjusted.
8121 * bsd-kvm.c: All implementations adjusted.
8122 * bsd-uthread.c: All implementations adjusted.
8123 * corelow.c: All implementations adjusted.
8124 * ctf.c: All implementations adjusted.
8125 * darwin-nat.c: All implementations adjusted.
8126 * darwin-nat.h: All implementations adjusted.
8127 * exec.c: All implementations adjusted.
8128 * fbsd-nat.c: All implementations adjusted.
8129 * fbsd-nat.h: All implementations adjusted.
8130 * gnu-nat.c: All implementations adjusted.
8131 * gnu-nat.h: All implementations adjusted.
8132 * go32-nat.c: All implementations adjusted.
8133 * ia64-linux-nat.c: All implementations adjusted.
8134 * inf-child.c: All implementations adjusted.
8135 * inf-child.h: All implementations adjusted.
8136 * inf-ptrace.c: All implementations adjusted.
8137 * inf-ptrace.h: All implementations adjusted.
8138 * linux-nat.c: All implementations adjusted.
8139 * linux-nat.h: All implementations adjusted.
8140 * mips-linux-nat.c: All implementations adjusted.
8141 * nto-procfs.c: All implementations adjusted.
8142 * ppc-linux-nat.c: All implementations adjusted.
8143 * procfs.c: All implementations adjusted.
8144 * ravenscar-thread.c: All implementations adjusted.
8145 * record-btrace.c: All implementations adjusted.
8146 * record-full.c: All implementations adjusted.
8147 * remote-sim.c: All implementations adjusted.
8148 * remote.c: All implementations adjusted.
8149 * s390-linux-nat.c: All implementations adjusted.
8150 * sol-thread.c: All implementations adjusted.
8151 * spu-multiarch.c: All implementations adjusted.
8152 * target-delegates.c: All implementations adjusted.
8153 * target.c: All implementations adjusted.
8154 * target.h: All implementations adjusted.
8155 * tracefile-tfile.c: All implementations adjusted.
8156 * tracefile.c: All implementations adjusted.
8157 * tracefile.h: All implementations adjusted.
8158 * windows-nat.c: All implementations adjusted.
8159 * x86-linux-nat.h: All implementations adjusted.
8160 * x86-nat.h: All implementations adjusted.
8162 2018-05-02 Pedro Alves <palves@redhat.com>
8164 * make-target-delegates (scan_target_h): Don't trim lines here.
8165 Replace sequences of tabs and/or whitespace with a single
8167 (top level, parsing methods): Trim each line before processing it
8170 2018-05-02 Pedro Alves <palves@redhat.com>
8171 John Baldwin <jhb@freebsd.org>
8173 * target.h (enum strata) <debug_stratum>: New.
8174 (struct target_ops) <all delegation methods>: Replace by C++
8175 virtual methods, and drop "to_" prefix. All references updated
8177 <to_shortname, to_longname, to_doc, to_data,
8178 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8179 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8180 virtual methods. All references updated throughout.
8181 <can_attach, supports_terminal_ours, can_create_inferior,
8182 get_thread_control_capabilities, attach_no_wait>: New
8184 <insert_breakpoint, remove_breakpoint>: Now
8185 TARGET_DEFAULT_NORETURN methods.
8186 <info_proc>: Now returns bool.
8188 (OPS_MAGIC): Delete.
8189 (current_target): Delete. All references replaced by references
8191 (target_stack): ... this. New.
8192 (target_shortname, target_longname): Adjust.
8193 (target_can_run): Now a function declaration.
8194 (default_child_has_all_memory, default_child_has_memory)
8195 (default_child_has_stack, default_child_has_registers)
8196 (default_child_has_execution): Remove target_ops parameter.
8197 (complete_target_initialization): Delete.
8198 (memory_breakpoint_target): New template class.
8199 (test_target_ops): Refactor as a C++ class with virtual methods.
8200 * make-target-delegates (NAME_PART): Tighten.
8201 (POINTER_PART, CP_SYMBOL): New.
8202 (SIMPLE_RETURN_PART): Reimplement.
8203 (VEC_RETURN_PART): Expect less.
8204 (RETURN_PART, VIRTUAL_PART): New.
8205 (METHOD): Adjust to C++ virtual methods.
8206 (scan_target_h): Remove reference to C99.
8207 (dname): Output "target_ops::" prefix.
8208 (write_function_header): Adjust to output a C++ class method.
8209 (write_declaration): New.
8210 (write_delegator): Adjust to output a C++ class method.
8211 (tdname): Output "dummy_target::" prefix.
8212 (write_tdefault, write_debugmethod): Adjust to output a C++ class
8214 (tdefault_names, debug_names): Delete.
8215 (return_types, tdefaults, styles, argtypes_array): New.
8216 (top level): All methods are delegators.
8218 (top level): Print dummy_target and debug_target classes.
8219 * target-delegates.c: Regenerate.
8220 * target-debug.h (target_debug_print_enum_info_proc_what)
8221 (target_debug_print_thread_control_capabilities)
8222 (target_debug_print_thread_info_p): New.
8223 * target.c (dummy_target): Delete.
8224 (the_dummy_target, the_debug_target): New.
8225 (target_stack): Now extern.
8226 (set_targetdebug): Push/unpush debug target.
8227 (default_child_has_all_memory, default_child_has_memory)
8228 (default_child_has_stack, default_child_has_registers)
8229 (default_child_has_execution): Remove target_ops parameter.
8230 (complete_target_initialization): Delete.
8231 (add_target_with_completer): No longer call
8232 complete_target_initialization.
8233 (target_supports_terminal_ours): Use regular delegation.
8234 (update_current_target): Delete.
8235 (push_target): No longer check magic number. Don't call
8236 update_current_target.
8237 (unpush_target): Don't call update_current_target.
8238 (target_is_pushed): No longer check magic number.
8239 (target_require_runnable): Skip for all stratums over
8241 (target_ops::info_proc): New.
8242 (target_info_proc): Use find_target_at and
8243 find_default_run_target.
8244 (target_supports_disable_randomization): Use regular delegation.
8245 (target_get_osdata): Use find_target_at.
8246 (target_ops::open, target_ops::close, target_ops::can_attach)
8247 (target_ops::attach, target_ops::can_create_inferior)
8248 (target_ops::create_inferior, target_ops::can_run)
8249 (target_can_run): New.
8250 (default_fileio_target): Use regular delegation.
8251 (target_ops::fileio_open, target_ops::fileio_pwrite)
8252 (target_ops::fileio_pread, target_ops::fileio_fstat)
8253 (target_ops::fileio_close, target_ops::fileio_unlink)
8254 (target_ops::fileio_readlink): New.
8255 (target_fileio_open_1, target_fileio_unlink)
8256 (target_fileio_readlink): Always call the target method. Handle
8258 (return_zero, return_zero_has_execution): Delete.
8259 (init_dummy_target): Delete.
8260 (dummy_target::dummy_target, dummy_target::shortname)
8261 (dummy_target::longname, dummy_target::doc)
8262 (debug_target::debug_target, debug_target::shortname)
8263 (debug_target::longname, debug_target::doc): New.
8264 (target_supports_delete_record): Use regular delegation.
8265 (setup_target_debug): Delete.
8266 (maintenance_print_target_stack): Skip debug_stratum.
8267 (initialize_targets): Instantiate the_dummy_target and
8269 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
8271 (target_auxv_search, fprint_target_auxv): Adjust.
8272 (info_auxv_command): Adjust to use target_stack.
8273 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8274 * exceptions.c (print_flush): Handle a NULL target_stack.
8275 * regcache.c (target_ops_no_register): Refactor as class with
8278 * exec.c (exec_target): New class.
8279 (exec_ops): Now an exec_target.
8280 (exec_open, exec_close_1, exec_get_section_table)
8281 (exec_xfer_partial, exec_files_info, exec_has_memory)
8282 (exec_make_note_section): Refactor as exec_target methods.
8283 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8285 (exec_target::find_memory_regions): New.
8286 (_initialize_exec): Don't call init_exec_ops.
8287 * gdbcore.h (exec_file_clear): Delete.
8289 * corefile.c (core_target): Delete.
8290 (core_file_command): Adjust.
8291 * corelow.c (core_target): New class.
8292 (the_core_target): New.
8293 (core_close): Remove target_ops parameter.
8294 (core_close_cleanup): Adjust.
8295 (core_target::close): New.
8296 (core_open, core_detach, get_core_registers, core_files_info)
8297 (core_xfer_partial, core_thread_alive, core_read_description)
8298 (core_pid_to_str, core_thread_name, core_has_memory)
8299 (core_has_stack, core_has_registers, core_info_proc): Rework as
8300 core_target methods.
8301 (ignore, core_remove_breakpoint, init_core_ops): Delete.
8302 (_initialize_corelow): Initialize the_core_target.
8303 * gdbcore.h (core_target): Delete.
8304 (the_core_target): New.
8306 * ctf.c: (ctf_target): New class.
8307 (ctf_ops): Now a ctf_target.
8308 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8309 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8310 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8312 (init_ctf_ops): Delete.
8313 (_initialize_ctf): Don't call it.
8314 * tracefile-tfile.c (tfile_target): New class.
8315 (tfile_ops): Now a tfile_target.
8316 (tfile_open, tfile_close, tfile_files_info)
8317 (tfile_get_tracepoint_status, tfile_trace_find)
8318 (tfile_fetch_registers, tfile_xfer_partial)
8319 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8320 Refactor as tfile_target methods.
8321 (tfile_xfer_partial_features): Remove target_ops parameter.
8322 (init_tfile_ops): Delete.
8323 (_initialize_tracefile_tfile): Don't call it.
8324 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8325 (tracefile_has_stack, tracefile_has_registers)
8326 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8327 tracefile_target methods.
8328 (init_tracefile_ops): Delete.
8329 (tracefile_target::tracefile_target): New.
8330 * tracefile.h: Include "target.h".
8331 (tracefile_target): New class.
8332 (init_tracefile_ops): Delete.
8334 * spu-multiarch.c (spu_multiarch_target): New class.
8335 (spu_ops): Now a spu_multiarch_target.
8336 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8337 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8338 (spu_search_memory, spu_mourn_inferior): Refactor as
8339 spu_multiarch_target methods.
8340 (init_spu_ops): Delete.
8341 (_initialize_spu_multiarch): Remove references to init_spu_ops,
8342 complete_target_initialization.
8344 * ravenscar-thread.c (ravenscar_thread_target): New class.
8345 (ravenscar_ops): Now a ravenscar_thread_target.
8346 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8347 (ravenscar_thread_alive, ravenscar_pid_to_str)
8348 (ravenscar_fetch_registers, ravenscar_store_registers)
8349 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8350 (ravenscar_stopped_by_hw_breakpoint)
8351 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8352 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8353 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8355 (init_ravenscar_thread_ops): Delete.
8356 (_initialize_ravenscar): Remove references to
8357 init_ravenscar_thread_ops and complete_target_initialization.
8359 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8360 (bsd_uthread_target): New class.
8361 (bsd_uthread_ops): Now a bsd_uthread_target.
8362 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8363 (bsd_uthread_close, bsd_uthread_mourn_inferior)
8364 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8365 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8366 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8367 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8368 (bsd_uthread_target): Delete function.
8369 (_initialize_bsd_uthread): Remove reference to
8370 complete_target_initialization.
8372 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
8373 (target_bfd): ... this new class.
8374 (target_bfd_xfer_partial, target_bfd_get_section_table)
8375 (target_bfd_close): Refactor as target_bfd methods.
8376 (target_bfd::~target_bfd): New.
8377 (target_bfd_reopen): Adjust.
8378 (target_bfd::close): New.
8380 * record-btrace.c (record_btrace_target): New class.
8381 (record_btrace_ops): Now a record_btrace_target.
8382 (record_btrace_open, record_btrace_stop_recording)
8383 (record_btrace_disconnect, record_btrace_close)
8384 (record_btrace_async, record_btrace_info)
8385 (record_btrace_insn_history, record_btrace_insn_history_range)
8386 (record_btrace_insn_history_from, record_btrace_call_history)
8387 (record_btrace_call_history_range)
8388 (record_btrace_call_history_from, record_btrace_record_method)
8389 (record_btrace_is_replaying, record_btrace_will_replay)
8390 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8391 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8392 (record_btrace_store_registers, record_btrace_prepare_to_store)
8393 (record_btrace_to_get_unwinder)
8394 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8395 (record_btrace_commit_resume, record_btrace_wait)
8396 (record_btrace_stop, record_btrace_can_execute_reverse)
8397 (record_btrace_stopped_by_sw_breakpoint)
8398 (record_btrace_supports_stopped_by_sw_breakpoint)
8399 (record_btrace_stopped_by_hw_breakpoint)
8400 (record_btrace_supports_stopped_by_hw_breakpoint)
8401 (record_btrace_update_thread_list, record_btrace_thread_alive)
8402 (record_btrace_goto_begin, record_btrace_goto_end)
8403 (record_btrace_goto, record_btrace_stop_replaying_all)
8404 (record_btrace_execution_direction)
8405 (record_btrace_prepare_to_generate_core)
8406 (record_btrace_done_generating_core): Refactor as
8407 record_btrace_target methods.
8408 (init_record_btrace_ops): Delete.
8409 (_initialize_record_btrace): Remove reference to
8410 init_record_btrace_ops.
8411 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8412 the execution_direction global.
8413 (record_full_base_target, record_full_target)
8414 (record_full_core_target): New classes.
8415 (record_full_ops): Now a record_full_target.
8416 (record_full_core_ops): Now a record_full_core_target.
8417 (record_full_target::detach, record_full_target::disconnect)
8418 (record_full_core_target::disconnect)
8419 (record_full_target::mourn_inferior, record_full_target::kill):
8421 (record_full_open, record_full_close, record_full_async): Refactor
8422 as methods of the record_full_base_target class.
8423 (record_full_resume, record_full_commit_resume): Refactor
8424 as methods of the record_full_target class.
8425 (record_full_wait, record_full_stopped_by_watchpoint)
8426 (record_full_stopped_data_address)
8427 (record_full_stopped_by_sw_breakpoint)
8428 (record_full_supports_stopped_by_sw_breakpoint)
8429 (record_full_stopped_by_hw_breakpoint)
8430 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8431 methods of the record_full_base_target class.
8432 (record_full_store_registers, record_full_xfer_partial)
8433 (record_full_insert_breakpoint, record_full_remove_breakpoint):
8434 Refactor as methods of the record_full_target class.
8435 (record_full_can_execute_reverse, record_full_get_bookmark)
8436 (record_full_goto_bookmark, record_full_execution_direction)
8437 (record_full_record_method, record_full_info, record_full_delete)
8438 (record_full_is_replaying, record_full_will_replay)
8439 (record_full_goto_begin, record_full_goto_end, record_full_goto)
8440 (record_full_stop_replaying): Refactor as methods of the
8441 record_full_base_target class.
8442 (record_full_core_resume, record_full_core_kill)
8443 (record_full_core_fetch_registers)
8444 (record_full_core_prepare_to_store)
8445 (record_full_core_store_registers, record_full_core_xfer_partial)
8446 (record_full_core_insert_breakpoint)
8447 (record_full_core_remove_breakpoint)
8448 (record_full_core_has_execution): Refactor
8449 as methods of the record_full_core_target class.
8450 (record_full_base_target::supports_delete_record): New.
8451 (init_record_full_ops): Delete.
8452 (init_record_full_core_ops): Delete.
8453 (record_full_save): Refactor as method of the
8454 record_full_base_target class.
8455 (_initialize_record_full): Remove references to
8456 init_record_full_ops and init_record_full_core_ops.
8458 * remote.c (remote_target, extended_remote_target): New classes.
8459 (remote_ops): Now a remote_target.
8460 (extended_remote_ops): Now an extended_remote_target.
8461 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8462 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8463 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8464 (remote_pass_signals, remote_set_syscall_catchpoint)
8465 (remote_program_signals, )
8466 (remote_thread_always_alive): Remove target_ops parameter.
8467 (remote_thread_alive, remote_thread_name)
8468 (remote_update_thread_list, remote_threads_extra_info)
8469 (remote_static_tracepoint_marker_at)
8470 (remote_static_tracepoint_markers_by_strid)
8471 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8472 (remote_open): Refactor as methods of remote_target.
8473 (extended_remote_open, extended_remote_detach)
8474 (extended_remote_attach, extended_remote_post_attach):
8475 (extended_remote_supports_disable_randomization)
8476 (extended_remote_create_inferior): : Refactor as method of
8477 extended_remote_target.
8478 (remote_set_permissions, remote_open_1, remote_detach)
8479 (remote_follow_fork, remote_follow_exec, remote_disconnect)
8480 (remote_resume, remote_commit_resume, remote_stop)
8481 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8482 (remote_terminal_ours, remote_wait, remote_fetch_registers)
8483 (remote_prepare_to_store, remote_store_registers)
8484 (remote_flash_erase, remote_flash_done, remote_files_info)
8485 (remote_kill, remote_mourn, remote_insert_breakpoint)
8486 (remote_remove_breakpoint, remote_insert_watchpoint)
8487 (remote_watchpoint_addr_within_range)
8488 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8489 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8490 (remote_supports_stopped_by_sw_breakpoint)
8491 (remote_stopped_by_hw_breakpoint)
8492 (remote_supports_stopped_by_hw_breakpoint)
8493 (remote_stopped_by_watchpoint, remote_stopped_data_address)
8494 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8495 (remote_verify_memory): Refactor as methods of remote_target.
8496 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8498 (remote_xfer_partial, remote_get_memory_xfer_limit)
8499 (remote_search_memory, remote_rcmd, remote_memory_map)
8500 (remote_pid_to_str, remote_get_thread_local_address)
8501 (remote_get_tib_address, remote_read_description): Refactor as
8502 methods of remote_target.
8503 (remote_target::fileio_open, remote_target::fileio_pwrite)
8504 (remote_target::fileio_pread, remote_target::fileio_close): New.
8505 (remote_hostio_readlink, remote_hostio_fstat)
8506 (remote_filesystem_is_local, remote_can_execute_reverse)
8507 (remote_supports_non_stop, remote_supports_disable_randomization)
8508 (remote_supports_multi_process, remote_supports_cond_breakpoints)
8509 (remote_supports_enable_disable_tracepoint)
8510 (remote_supports_string_tracing)
8511 (remote_can_run_breakpoint_commands, remote_trace_init)
8512 (remote_download_tracepoint, remote_can_download_tracepoint)
8513 (remote_download_trace_state_variable, remote_enable_tracepoint)
8514 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8515 (remote_trace_start, remote_get_trace_status)
8516 (remote_get_tracepoint_status, remote_trace_stop)
8517 (remote_trace_find, remote_get_trace_state_variable_value)
8518 (remote_save_trace_data, remote_get_raw_trace_data)
8519 (remote_set_disconnected_tracing, remote_core_of_thread)
8520 (remote_set_circular_trace_buffer, remote_traceframe_info)
8521 (remote_get_min_fast_tracepoint_insn_len)
8522 (remote_set_trace_buffer_size, remote_set_trace_notes)
8523 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8524 (remote_disable_btrace, remote_teardown_btrace)
8525 (remote_read_btrace, remote_btrace_conf)
8526 (remote_augmented_libraries_svr4_read, remote_load)
8527 (remote_pid_to_exec_file, remote_can_do_single_step)
8528 (remote_execution_direction, remote_thread_handle_to_thread_info):
8529 Refactor as methods of remote_target.
8530 (init_remote_ops, init_extended_remote_ops): Delete.
8531 (remote_can_async_p, remote_is_async_p, remote_async)
8532 (remote_thread_events, remote_upload_tracepoints)
8533 (remote_upload_trace_state_variables): Refactor as methods of
8535 (_initialize_remote): Remove references to init_remote_ops and
8536 init_extended_remote_ops.
8538 * remote-sim.c (gdbsim_target): New class.
8539 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8540 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8541 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8542 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8543 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8544 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8545 Refactor as methods of gdbsim_target.
8546 (gdbsim_ops): Now a gdbsim_target.
8547 (init_gdbsim_ops): Delete.
8548 (gdbsim_cntrl_c): Adjust.
8549 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8551 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8552 (the_amd64_linux_nat_target): New.
8553 (amd64_linux_fetch_inferior_registers)
8554 (amd64_linux_store_inferior_registers): Refactor as methods of
8555 amd64_linux_nat_target.
8556 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
8557 * i386-linux-nat.c: Don't include "linux-nat.h".
8558 (i386_linux_nat_target): New class.
8559 (the_i386_linux_nat_target): New.
8560 (i386_linux_fetch_inferior_registers)
8561 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8562 as methods of i386_linux_nat_target.
8563 (_initialize_i386_linux_nat): Adjust. Set linux_target.
8564 * inf-child.c (inf_child_ops): Delete.
8565 (inf_child_fetch_inferior_registers)
8566 (inf_child_store_inferior_registers): Delete.
8567 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8568 methods of inf_child_target.
8569 (inf_child_target::supports_terminal_ours)
8570 (inf_child_target::terminal_init)
8571 (inf_child_target::terminal_inferior)
8572 (inf_child_target::terminal_ours_for_output)
8573 (inf_child_target::terminal_ours, inf_child_target::interrupt)
8574 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8576 (inf_child_open, inf_child_disconnect, inf_child_close)
8577 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8578 (inf_child_post_startup_inferior, inf_child_can_run)
8579 (inf_child_pid_to_exec_file): Refactor as methods of
8581 (inf_child_follow_fork): Delete.
8582 (inf_child_target::can_create_inferior)
8583 (inf_child_target::can_attach): New.
8584 (inf_child_target::has_all_memory, inf_child_target::has_memory)
8585 (inf_child_target::has_stack, inf_child_target::has_registers)
8586 (inf_child_target::has_execution): New.
8587 (inf_child_fileio_open, inf_child_fileio_pwrite)
8588 (inf_child_fileio_pread, inf_child_fileio_fstat)
8589 (inf_child_fileio_close, inf_child_fileio_unlink)
8590 (inf_child_fileio_readlink, inf_child_use_agent)
8591 (inf_child_can_use_agent): Refactor as methods of
8593 (return_zero, inf_child_target): Delete.
8594 (inf_child_target::inf_child_target): New.
8595 * inf-child.h: Include "target.h".
8596 (inf_child_target): Delete function prototype.
8597 (inf_child_target): New class.
8598 (inf_child_open_target, inf_child_mourn_inferior)
8599 (inf_child_maybe_unpush_target): Delete.
8600 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8601 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8602 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8603 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8604 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8605 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8606 (inf_ptrace_wait, inf_ptrace_xfer_partial)
8607 (inf_ptrace_thread_alive, inf_ptrace_files_info)
8608 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8609 methods of inf_ptrace_target.
8610 (inf_ptrace_target): Delete function.
8611 * inf-ptrace.h: Include "inf-child.h".
8612 (inf_ptrace_target): Delete function declaration.
8613 (inf_ptrace_target): New class.
8614 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8615 * linux-nat.c (linux_target): New.
8616 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8617 (linux_nat_target::~linux_nat_target): New.
8618 (linux_child_post_attach, linux_child_post_startup_inferior)
8619 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8620 (linux_child_remove_fork_catchpoint)
8621 (linux_child_insert_vfork_catchpoint)
8622 (linux_child_remove_vfork_catchpoint)
8623 (linux_child_insert_exec_catchpoint)
8624 (linux_child_remove_exec_catchpoint)
8625 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8626 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8627 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8628 (linux_nat_stopped_data_address)
8629 (linux_nat_stopped_by_sw_breakpoint)
8630 (linux_nat_supports_stopped_by_sw_breakpoint)
8631 (linux_nat_stopped_by_hw_breakpoint)
8632 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8633 (linux_nat_kill, linux_nat_mourn_inferior)
8634 (linux_nat_xfer_partial, linux_nat_thread_alive)
8635 (linux_nat_update_thread_list, linux_nat_pid_to_str)
8636 (linux_nat_thread_name, linux_child_pid_to_exec_file)
8637 (linux_child_static_tracepoint_markers_by_strid)
8638 (linux_nat_is_async_p, linux_nat_can_async_p)
8639 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8640 (linux_nat_supports_multi_process)
8641 (linux_nat_supports_disable_randomization, linux_nat_async)
8642 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8643 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8644 (linux_nat_fileio_open, linux_nat_fileio_readlink)
8645 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8646 methods of linux_nat_target.
8647 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8648 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8650 (check_stopped_by_watchpoint): Adjust.
8651 (linux_xfer_partial): Delete.
8652 (linux_target_install_ops, linux_target, linux_nat_add_target):
8654 (linux_nat_target::linux_nat_target): New.
8655 * linux-nat.h: Include "inf-ptrace.h".
8656 (linux_nat_target): New.
8657 (linux_target, linux_target_install_ops, linux_nat_add_target):
8658 Delete function declarations.
8659 (linux_target): Declare global.
8660 * linux-thread-db.c (thread_db_target): New.
8661 (thread_db_target::thread_db_target): New.
8662 (thread_db_ops): Delete.
8663 (the_thread_db_target): New.
8664 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8665 (thread_db_update_thread_list, thread_db_pid_to_str)
8666 (thread_db_extra_thread_info)
8667 (thread_db_thread_handle_to_thread_info)
8668 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8669 (thread_db_resume): Refactor as methods of thread_db_target.
8670 (init_thread_db_ops): Delete.
8671 (_initialize_thread_db): Remove reference to init_thread_db_ops.
8672 * x86-linux-nat.c: Don't include "linux-nat.h".
8673 (super_post_startup_inferior): Delete.
8674 (x86_linux_nat_target::~x86_linux_nat_target): New.
8675 (x86_linux_child_post_startup_inferior)
8676 (x86_linux_read_description, x86_linux_enable_btrace)
8677 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8678 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8679 methods of x86_linux_nat_target.
8680 (x86_linux_create_target): Delete. Bits folded ...
8681 (x86_linux_add_target): ... here. Now takes a linux_nat_target
8683 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8684 (x86_linux_nat_target): New class.
8685 (x86_linux_create_target): Delete.
8686 (x86_linux_add_target): Now takes a linux_nat_target pointer.
8687 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8688 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8689 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8690 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8691 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8693 (x86_use_watchpoints): Delete.
8694 * x86-nat.h: Include "breakpoint.h" and "target.h".
8695 (x86_use_watchpoints): Delete.
8696 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8697 (x86_stopped_by_watchpoint, x86_stopped_data_address)
8698 (x86_insert_watchpoint, x86_remove_watchpoint)
8699 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8700 (x86_stopped_by_hw_breakpoint): New declarations.
8701 (x86_nat_target): New template class.
8703 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8704 (the_ppc_linux_nat_target): New.
8705 (ppc_linux_fetch_inferior_registers)
8706 (ppc_linux_can_use_hw_breakpoint)
8707 (ppc_linux_region_ok_for_hw_watchpoint)
8708 (ppc_linux_ranged_break_num_registers)
8709 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8710 (ppc_linux_insert_mask_watchpoint)
8711 (ppc_linux_remove_mask_watchpoint)
8712 (ppc_linux_can_accel_watchpoint_condition)
8713 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8714 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8715 (ppc_linux_watchpoint_addr_within_range)
8716 (ppc_linux_masked_watch_num_registers)
8717 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8718 (ppc_linux_read_description): Refactor as methods of
8719 ppc_linux_nat_target.
8720 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
8722 * procfs.c (procfs_xfer_partial): Delete forward declaration.
8723 (procfs_target): New class.
8724 (the_procfs_target): New.
8725 (procfs_target): Delete function.
8726 (procfs_auxv_parse, procfs_attach, procfs_detach)
8727 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8728 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8729 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8730 (procfs_create_inferior, procfs_update_thread_list)
8731 (procfs_thread_alive, procfs_pid_to_str)
8732 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8733 (procfs_stopped_data_address, procfs_insert_watchpoint)
8734 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8735 (proc_find_memory_regions, procfs_info_proc)
8736 (procfs_make_note_section): Refactor as methods of procfs_target.
8737 (_initialize_procfs): Adjust.
8738 * sol-thread.c (sol_thread_target): New class.
8739 (sol_thread_ops): Now a sol_thread_target.
8740 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8741 (sol_thread_fetch_registers, sol_thread_store_registers)
8742 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8743 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8744 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8745 (init_sol_thread_ops): Delete.
8746 (_initialize_sol_thread): Adjust. Remove references to
8747 init_sol_thread_ops and complete_target_initialization.
8749 * windows-nat.c (windows_nat_target): New class.
8750 (windows_fetch_inferior_registers)
8751 (windows_store_inferior_registers, windows_resume, windows_wait)
8752 (windows_attach, windows_detach, windows_pid_to_exec_file)
8753 (windows_files_info, windows_create_inferior)
8754 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8755 (windows_close, windows_pid_to_str, windows_xfer_partial)
8756 (windows_get_tib_address, windows_get_ada_task_ptid)
8757 (windows_thread_name, windows_thread_alive): Refactor as
8758 windows_nat_target methods.
8759 (do_initial_windows_stuff): Adjust.
8760 (windows_target): Delete function.
8761 (_initialize_windows_nat): Adjust.
8763 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8764 (darwin_mourn_inferior, darwin_kill_inferior)
8765 (darwin_create_inferior, darwin_attach, darwin_detach)
8766 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8767 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8768 (darwin_supports_multi_process): Refactor as darwin_nat_target
8770 (darwin_resume_to, darwin_files_info): Delete.
8771 (_initialize_darwin_inferior): Rename to ...
8772 (_initialize_darwin_nat): ... this. Adjust to C++ification.
8773 * darwin-nat.h: Include "inf-child.h".
8774 (darwin_nat_target): New class.
8775 (darwin_complete_target): Delete.
8776 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8777 (darwin_target): New.
8778 (i386_darwin_fetch_inferior_registers)
8779 (i386_darwin_store_inferior_registers): Refactor as methods of
8781 (darwin_complete_target): Delete, with ...
8782 (_initialize_i386_darwin_nat): ... bits factored out here.
8784 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8785 (the_alpha_linux_nat_target): New.
8786 (alpha_linux_register_u_offset): Refactor as
8787 alpha_linux_nat_target method.
8788 (_initialize_alpha_linux_nat): Adjust.
8789 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8790 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8791 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8792 methods of linux_nat_trad_target.
8793 (linux_trad_target): Delete.
8794 * linux-nat-trad.h (linux_trad_target): Delete function.
8795 (linux_nat_trad_target): New class.
8796 * mips-linux-nat.c (mips_linux_nat_target): New class.
8797 (super_fetch_registers, super_store_registers, super_close):
8799 (the_mips_linux_nat_target): New.
8800 (mips64_linux_regsets_fetch_registers)
8801 (mips64_linux_regsets_store_registers)
8802 (mips64_linux_fetch_registers, mips64_linux_store_registers)
8803 (mips_linux_register_u_offset, mips_linux_read_description)
8804 (mips_linux_can_use_hw_breakpoint)
8805 (mips_linux_stopped_by_watchpoint)
8806 (mips_linux_stopped_data_address)
8807 (mips_linux_region_ok_for_hw_watchpoint)
8808 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8809 (mips_linux_close): Refactor as methods of mips_linux_nat.
8810 (_initialize_mips_linux_nat): Adjust to C++ification.
8812 * aix-thread.c (aix_thread_target): New class.
8813 (aix_thread_ops): Now an aix_thread_target.
8814 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8815 (aix_thread_fetch_registers, aix_thread_store_registers)
8816 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8817 (aix_thread_thread_alive, aix_thread_pid_to_str)
8818 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8819 Refactor as methods of aix_thread_target.
8820 (init_aix_thread_ops): Delete.
8821 (_initialize_aix_thread): Remove references to init_aix_thread_ops
8822 and complete_target_initialization.
8823 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8824 (rs6000_nat_target): New class.
8825 (the_rs6000_nat_target): New.
8826 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8827 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8828 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8829 (super_create_inferior): Delete.
8830 (_initialize_rs6000_nat): Adjust to C++ification.
8832 * arm-linux-nat.c (arm_linux_nat_target): New class.
8833 (the_arm_linux_nat_target): New.
8834 (arm_linux_fetch_inferior_registers)
8835 (arm_linux_store_inferior_registers, arm_linux_read_description)
8836 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8837 (arm_linux_remove_hw_breakpoint)
8838 (arm_linux_region_ok_for_hw_watchpoint)
8839 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8840 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8841 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8842 arm_linux_nat_target.
8843 (_initialize_arm_linux_nat): Adjust to C++ification.
8845 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8846 (the_aarch64_linux_nat_target): New.
8847 (aarch64_linux_fetch_inferior_registers)
8848 (aarch64_linux_store_inferior_registers)
8849 (aarch64_linux_child_post_startup_inferior)
8850 (aarch64_linux_read_description)
8851 (aarch64_linux_can_use_hw_breakpoint)
8852 (aarch64_linux_insert_hw_breakpoint)
8853 (aarch64_linux_remove_hw_breakpoint)
8854 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8855 (aarch64_linux_region_ok_for_hw_watchpoint)
8856 (aarch64_linux_stopped_data_address)
8857 (aarch64_linux_stopped_by_watchpoint)
8858 (aarch64_linux_watchpoint_addr_within_range)
8859 (aarch64_linux_can_do_single_step): Refactor as methods of
8860 aarch64_linux_nat_target.
8861 (super_post_startup_inferior): Delete.
8862 (_initialize_aarch64_linux_nat): Adjust to C++ification.
8864 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8865 (the_hppa_linux_nat_target): New.
8866 (hppa_linux_fetch_inferior_registers)
8867 (hppa_linux_store_inferior_registers): Refactor as methods of
8868 hppa_linux_nat_target.
8869 (_initialize_hppa_linux_nat): Adjust to C++ification.
8871 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8872 (the_ia64_linux_nat_target): New.
8873 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8874 (ia64_linux_stopped_data_address)
8875 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8876 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8877 ia64_linux_nat_target methods.
8878 (super_xfer_partial): Delete.
8879 (_initialize_ia64_linux_nat): Adjust to C++ification.
8881 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8882 (the_m32r_linux_nat_target): New.
8883 (m32r_linux_fetch_inferior_registers)
8884 (m32r_linux_store_inferior_registers): Refactor as
8885 m32r_linux_nat_target methods.
8886 (_initialize_m32r_linux_nat): Adjust to C++ification.
8888 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8889 (the_m68k_linux_nat_target): New.
8890 (m68k_linux_fetch_inferior_registers)
8891 (m68k_linux_store_inferior_registers): Refactor as
8892 m68k_linux_nat_target methods.
8893 (_initialize_m68k_linux_nat): Adjust to C++ification.
8895 * s390-linux-nat.c (s390_linux_nat_target): New class.
8896 (the_s390_linux_nat_target): New.
8897 (s390_linux_fetch_inferior_registers)
8898 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8899 (s390_insert_watchpoint, s390_remove_watchpoint)
8900 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8901 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8902 (s390_auxv_parse, s390_read_description): Refactor as methods of
8903 s390_linux_nat_target.
8904 (_initialize_s390_nat): Adjust to C++ification.
8906 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8907 (the_sparc_linux_nat_target): New.
8908 (_initialize_sparc_linux_nat): Adjust to C++ification.
8909 * sparc-nat.c (sparc_fetch_inferior_registers)
8910 (sparc_store_inferior_registers): Remove target_ops parameter.
8911 * sparc-nat.h (sparc_fetch_inferior_registers)
8912 (sparc_store_inferior_registers): Remove target_ops parameter.
8913 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8914 (the_sparc64_linux_nat_target): New.
8915 (_initialize_sparc64_linux_nat): Adjust to C++ification.
8917 * spu-linux-nat.c (spu_linux_nat_target): New class.
8918 (the_spu_linux_nat_target): New.
8919 (spu_child_post_startup_inferior, spu_child_post_attach)
8920 (spu_child_wait, spu_fetch_inferior_registers)
8921 (spu_store_inferior_registers, spu_xfer_partial)
8922 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8924 (_initialize_spu_nat): Adjust to C++ification.
8926 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8927 (the_tilegx_linux_nat_target): New.
8928 (fetch_inferior_registers, store_inferior_registers):
8929 Refactor as methods.
8930 (_initialize_tile_linux_nat): Adjust to C++ification.
8932 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8933 (the_xtensa_linux_nat_target): New.
8934 (xtensa_linux_fetch_inferior_registers)
8935 (xtensa_linux_store_inferior_registers): Refactor as
8936 xtensa_linux_nat_target methods.
8937 (_initialize_xtensa_linux_nat): Adjust to C++ification.
8939 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8940 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8941 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8942 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8943 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8944 (fbsd_stopped_by_sw_breakpoint)
8945 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8946 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8947 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8948 (fbsd_post_startup_inferior, fbsd_post_attach)
8949 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8950 (fbsd_set_syscall_catchpoint)
8951 (super_xfer_partial, super_resume, super_wait)
8952 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8953 (fbsd_handle_debug_trap): Remove target_ops parameter.
8954 (fbsd_nat_add_target): Delete.
8955 * fbsd-nat.h: Include "inf-ptrace.h".
8956 (fbsd_nat_add_target): Delete.
8957 (USE_SIGTRAP_SIGINFO): Define.
8958 (fbsd_nat_target): New class.
8960 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8961 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8962 (amd64bsd_target): Delete.
8963 * amd64-bsd-nat.h: New file.
8964 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8966 (amd64_fbsd_nat_target): New class.
8967 (the_amd64_fbsd_nat_target): New.
8968 (amd64fbsd_read_description): Refactor as method of
8969 amd64_fbsd_nat_target.
8970 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8971 (_initialize_amd64fbsd_nat): Adjust to C++ification.
8972 * amd64-nat.h (amd64bsd_target): Delete function declaration.
8973 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8974 (i386bsd_store_inferior_registers): Remove target_ops parameter.
8975 (i386bsd_target): Delete.
8976 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8977 (i386bsd_fetch_inferior_registers)
8978 (i386bsd_store_inferior_registers): Declare.
8979 (i386_bsd_nat_target): New class.
8980 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8981 (the_i386_fbsd_nat_target): New.
8982 (i386fbsd_resume, i386fbsd_read_description): Refactor as
8983 i386_fbsd_nat_target methods.
8984 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8985 (_initialize_i386fbsd_nat): Adjust to C++ification.
8986 * x86-bsd-nat.c (super_mourn_inferior): Delete.
8987 (x86bsd_mourn_inferior, x86bsd_target): Delete.
8988 (_initialize_x86_bsd_nat): Adjust to C++ification.
8989 * x86-bsd-nat.h: Include "x86-nat.h".
8990 (x86bsd_target): Delete declaration.
8991 (x86bsd_nat_target): New class.
8993 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8994 (the_aarch64_fbsd_nat_target): New.
8995 (aarch64_fbsd_fetch_inferior_registers)
8996 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8997 aarch64_fbsd_nat_target.
8998 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8999 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9000 (the_alpha_bsd_nat_target): New.
9001 (alphabsd_fetch_inferior_registers)
9002 (alphabsd_store_inferior_registers): Refactor as
9003 alpha_bsd_nat_target methods.
9004 (_initialize_alphabsd_nat): Refactor as methods of
9005 alpha_bsd_nat_target.
9006 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9007 (the_amd64_nbsd_nat_target): New.
9008 (_initialize_amd64nbsd_nat): Adjust to C++ification.
9009 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9010 (the_amd64_obsd_nat_target): New.
9011 (_initialize_amd64obsd_nat): Adjust to C++ification.
9012 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9013 (the_arm_fbsd_nat_target): New.
9014 (arm_fbsd_fetch_inferior_registers)
9015 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9016 (_initialize_arm_fbsd_nat): Refactor as methods of
9017 arm_fbsd_nat_target.
9018 (_initialize_arm_fbsd_nat): Adjust to C++ification.
9019 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9020 (the_arm_netbsd_nat_target): New.
9021 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9022 arm_netbsd_nat_target.
9023 (_initialize_arm_netbsd_nat): Adjust to C++ification.
9024 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9025 (the_hppa_nbsd_nat_target): New.
9026 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9027 hppa_nbsd_nat_target methods.
9028 (_initialize_hppanbsd_nat): Adjust to C++ification.
9029 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9030 (the_hppa_obsd_nat_target): New.
9031 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9032 methods of hppa_obsd_nat_target.
9033 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
9035 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9036 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
9038 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9039 (_initialize_i386obsd_nat): Use add_target.
9040 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9041 (the_m68k_bsd_nat_target): New.
9042 (m68kbsd_fetch_inferior_registers)
9043 (m68kbsd_store_inferior_registers): Refactor as methods of
9044 m68k_bsd_nat_target.
9045 (_initialize_m68kbsd_nat): Adjust to C++ification.
9046 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9047 (the_mips_fbsd_nat_target): New.
9048 (mips_fbsd_fetch_inferior_registers)
9049 (mips_fbsd_store_inferior_registers): Refactor as methods of
9050 mips_fbsd_nat_target.
9051 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
9053 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9054 (the_mips_nbsd_nat_target): New.
9055 (mipsnbsd_fetch_inferior_registers)
9056 (mipsnbsd_store_inferior_registers): Refactor as methods of
9057 mips_nbsd_nat_target.
9058 (_initialize_mipsnbsd_nat): Adjust to C++ification.
9059 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9060 (the_mips64_obsd_nat_target): New.
9061 (mips64obsd_fetch_inferior_registers)
9062 (mips64obsd_store_inferior_registers): Refactor as methods of
9063 mips64_obsd_nat_target.
9064 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
9066 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9068 * nbsd-nat.h: Include "inf-ptrace.h".
9069 (nbsd_nat_target): New class.
9070 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9071 (obsd_wait): Refactor as methods of obsd_nat_target.
9072 (obsd_add_target): Delete.
9073 * obsd-nat.h: Include "inf-ptrace.h".
9074 (obsd_nat_target): New class.
9075 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9076 (the_ppc_fbsd_nat_target): New.
9077 (ppcfbsd_fetch_inferior_registers)
9078 (ppcfbsd_store_inferior_registers): Refactor as methods of
9079 ppc_fbsd_nat_target.
9080 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
9082 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9083 (the_ppc_nbsd_nat_target): New.
9084 (ppcnbsd_fetch_inferior_registers)
9085 (ppcnbsd_store_inferior_registers): Refactor as methods of
9086 ppc_nbsd_nat_target.
9087 (_initialize_ppcnbsd_nat): Adjust to C++ification.
9088 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9089 (the_ppc_obsd_nat_target): New.
9090 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9091 methods of ppc_obsd_nat_target.
9092 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
9094 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9095 (the_sh_nbsd_nat_target): New.
9096 (shnbsd_fetch_inferior_registers)
9097 (shnbsd_store_inferior_registers): Refactor as methods of
9099 (_initialize_shnbsd_nat): Adjust to C++ification.
9100 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9101 (inf_ptrace_xfer_partial): Delete.
9102 (sparc_xfer_partial, sparc_target): Delete.
9103 * sparc-nat.h (sparc_fetch_inferior_registers)
9104 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9105 (sparc_target): Delete function declaration.
9106 (sparc_target): New template class.
9107 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9108 (_initialize_sparcnbsd_nat): Adjust to C++ification.
9109 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9110 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
9112 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9113 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9114 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9115 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
9117 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9118 (the_vax_bsd_nat_target): New.
9119 (vaxbsd_fetch_inferior_registers)
9120 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9122 (_initialize_vaxbsd_nat): Adjust to C++ification.
9124 * bsd-kvm.c (bsd_kvm_target): New class.
9125 (bsd_kvm_ops): Now a bsd_kvm_target.
9126 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9127 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9128 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9130 (bsd_kvm_return_one): Delete.
9131 (bsd_kvm_add_target): Adjust to C++ification.
9133 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9134 (nto_procfs_target_procfs): New classes.
9135 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9136 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9137 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9138 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9139 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9140 (procfs_remove_hw_breakpoint, procfs_resume)
9141 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9142 (procfs_kill_inferior, procfs_store_registers)
9143 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9144 as methods of nto_procfs_target.
9145 (nto_procfs_ops): Now an nto_procfs_target_procfs.
9146 (nto_native_ops): Delete.
9147 (procfs_open, procfs_native_open): Delete.
9148 (nto_native_ops): Now an nto_procfs_target_native.
9149 (init_procfs_targets): Adjust to C++ification.
9150 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9151 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9152 Refactor as methods of nto_procfs_target.
9154 * go32-nat.c (go32_nat_target): New class.
9155 (the_go32_nat_target): New.
9156 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9157 (go32_store_registers, go32_xfer_partial, go32_files_info)
9158 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9159 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9160 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9161 (go32_pid_to_str): Refactor as methods of go32_nat_target.
9162 (go32_target): Delete.
9163 (_initialize_go32_nat): Adjust to C++ification.
9165 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9166 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9167 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9168 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9170 (gnu_target): Delete.
9171 * gnu-nat.h (gnu_target): Delete.
9172 (gnu_nat_target): New class.
9173 * i386-gnu-nat.c (gnu_base_target): New.
9174 (i386_gnu_nat_target): New class.
9175 (the_i386_gnu_nat_target): New.
9176 (_initialize_i386gnu_nat): Adjust to C++ification.
9178 2018-05-02 Pedro Alves <palves@redhat.com>
9180 * bfd-target.c (target_bfd_xclose): Rename to ...
9181 (target_bfd_close): ... this.
9182 (target_bfd_reopen): Adjust.
9183 * target.c (target_close): Remove references to to_xclose.
9184 * target.h (target_ops::to_xclose): Delete.
9185 (target_ops::to_close): Update comments.
9187 2018-05-02 Pedro Alves <palves@redhat.com>
9189 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9191 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9192 * inf-ptrace.c (inf_ptrace_register_u_offset)
9193 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9194 (inf_ptrace_store_register, inf_ptrace_store_registers)
9195 (inf_ptrace_trad_target): Move to ...
9196 * linux-nat-trad.c: ... this new file.
9197 * linux-nat-trad.h: New file.
9198 * linux-nat.c (linux_target_install_ops): Make extern.
9199 (linux_trad_target): Delete.
9200 * linux-nat.h (linux_trad_target): Delete declaration.
9201 (linux_target_install_ops): Declare.
9202 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9205 2018-05-02 Pedro Alves <palves@redhat.com>
9207 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9208 procfs_target/add_target here.
9209 * procfs.c (procfs_target): Make static.
9210 (_initialize_procfs): Call add_target here.
9211 * procfs.h (struct target_ops): Remove forward declaration.
9212 (procfs_target): Remove declaration.
9213 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9215 2018-05-02 Pedro Alves <palves@redhat.com>
9217 * procfs.c (procfs_stopped_by_watchpoint)
9218 (procfs_insert_watchpoint, procfs_remove_watchpoint)
9219 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9221 (procfs_use_watchpoints): Delete, move contents...
9222 (procfs_target): ... here.
9223 * procfs.h (procfs_use_watchpoints): Delete declaration.
9224 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9225 procfs_use_watchpoints.
9226 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9227 procfs_use_watchpoints.
9229 2018-05-02 Tom Tromey <tom@tromey.com>
9232 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9233 and var_zuinteger_unlimited.
9234 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9235 and PARAM_ZUINTEGER_UNLIMITED.
9236 (set_parameter_value): Handle var_zuinteger and
9237 var_zuinteger_unlimited.
9238 (add_setshow_generic): Likewise.
9239 (parmpy_init): Likewise.
9241 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
9244 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9245 pointer is not null before dereferencing it.
9247 2018-04-30 Tom Tromey <tom@tromey.com>
9249 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9252 2018-04-30 Tom Tromey <tom@tromey.com>
9254 * breakpoint.c (mention): Remove use of is_mi_like_p.
9255 (print_mention_ranged_breakpoint): Likewise.
9256 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9259 2018-04-30 Tom Tromey <tom@tromey.com>
9261 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9263 2018-04-30 Tom Tromey <tom@tromey.com>
9265 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9266 (info_spu_event_command): Remove some uses of is_mi_like_p.
9268 2018-04-30 Tom Tromey <tom@tromey.com>
9270 * python/py-framefilter.c (py_print_single_arg)
9271 (enumerate_locals, py_print_args, py_print_frame): Remove some
9272 uses of is_mi_like_p.
9274 2018-04-30 Tom Tromey <tom@tromey.com>
9277 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9278 * ui-out.h (ui_out::is_mi_like_p): Now const.
9279 (ui_out::do_is_mi_like_p): Now const.
9280 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9282 2018-04-30 Tom Tromey <tom@tromey.com>
9284 * varobj.c (varobj_set_visualizer): Use new_reference.
9285 * python/python.c (gdbpy_decode_line): Use new_reference.
9286 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9289 2018-04-30 Tom Tromey <tom@tromey.com>
9291 * varobj.c (install_new_value): Use new_reference.
9292 * value.h (value_incref): Return void. Swap intro comment with
9294 * value.c (set_value_parent): Use new_reference.
9295 (value_incref): Return void. Update intro comment.
9296 (release_value): Use new_reference.
9297 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9299 2018-04-30 Tom Tromey <tom@tromey.com>
9301 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9302 * gdb_bfd.h (new_bfd_ref): Remove.
9303 (gdb_bfd_open): Update comment.
9304 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9305 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9306 (gdb_bfd_fdopenr): Use new_reference.
9307 * exec.c (exec_file_attach): Use new_reference.
9309 2018-04-30 Tom Tromey <tom@tromey.com>
9311 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9314 2018-04-30 Tom Tromey <tom@tromey.com>
9316 * jit.c (jit_read_code_entry): Use type_align.
9317 * i386-tdep.c (i386_gdbarch_init): Don't call
9318 set_gdbarch_long_long_align_bit.
9319 * gdbarch.sh: Remove long_long_align_bit.
9320 * gdbarch.c, gdbarch.h: Rebuild.
9321 * arc-tdep.c (arc_type_align): New function.
9322 (arc_gdbarch_init): Use arc_type_align. Don't call
9323 set_gdbarch_long_long_align_bit.
9325 2018-04-30 Tom Tromey <tom@tromey.com>
9327 * rust-lang.c (rust_type_alignment): Remove.
9328 (rust_composite_type): Use type_align.
9330 2018-04-30 Tom Tromey <tom@tromey.com>
9332 * NEWS: Mention Type.align.
9333 * python/py-type.c (typy_get_alignof): New function.
9334 (type_object_getset): Add "alignof".
9336 2018-04-30 Tom Tromey <tom@tromey.com>
9340 * std-operator.def (UNOP_ALIGNOF): New operator.
9341 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9343 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9344 * c-lang.c (c_op_print_tab): Add alignof.
9345 * c-exp.y (ALIGNOF): New token.
9346 (exp): Add "ALIGNOF" production.
9347 (ident_tokens): Add _Alignof and alignof.
9349 2018-04-30 Tom Tromey <tom@tromey.com>
9351 * i386-tdep.c (i386_type_align): New function.
9352 (i386_gdbarch_init): Update.
9353 * gdbarch.sh (type_align): New method.
9354 * gdbarch.c, gdbarch.h: Rebuild.
9355 * arch-utils.h (default_type_align): Declare.
9356 * arch-utils.c (default_type_align): New function.
9357 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9358 (struct type) <align_log2>: New field.
9359 <instance_flags>: Now a bitfield.
9360 (TYPE_RAW_ALIGN): New macro.
9361 (type_align, type_raw_align, set_type_align): Declare.
9362 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9364 * dwarf2read.c (quirk_rust_enum): Set type alignment.
9365 (get_alignment, maybe_set_alignment): New functions.
9366 (read_structure_type, read_enumeration_type, read_array_type)
9367 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9368 (read_subrange_type, read_base_type): Set type alignment.
9370 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
9372 * dwarf2read.c (read_index_from_section): Use bool.
9374 2018-04-29 Fabian Groffen <grobian@gentoo.org>
9377 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9380 2018-04-29 John Reiser <jreiser@BitWagon.com>
9383 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9384 last step, and do it atomically.
9386 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
9388 * compile/compile-c-types.c (convert_int, convert_float):
9391 2018-04-27 Tom Tromey <tom@tromey.com>
9394 * rust-lang.c (rust_inclusive_range_type_p): New function.
9395 (rust_range): Handle inclusive ranges.
9396 (rust_compute_range): Likewise.
9397 * rust-exp.y (struct rust_op) <inclusive>: New field.
9398 (DOTDOTEQ): New constant.
9399 (range_expr): Add "..=" productions.
9400 (operator_tokens): Add "..=" token.
9401 (ast_range): Add "inclusive" parameter.
9402 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9404 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9406 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9407 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9409 * expprint.c (print_subexp_standard): Handle new bounds values.
9410 (dump_subexp_body_standard): Likewise.
9412 2018-04-27 Tom Tromey <tom@tromey.com>
9414 * configure: Rebuild.
9415 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9416 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9418 (class symbol_needs_eval_context): Likewise.
9419 * dwarf2read.c (mock_mapped_index::symbol_name_count)
9420 (mock_mapped_index::symbol_name_at): Use "override". Remove
9422 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9424 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9425 * aarch64-tdep.c (instruction_reader::read): Use "override".
9426 (instruction_reader_test::read): Likewise.
9427 * arm-tdep.c (instruction_reader::read): Use "override".
9428 (instruction_reader_thumb::read): Likewise.
9430 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
9433 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9434 instead of remote_send.
9435 (remote_send): Remove.
9437 2018-04-26 Pedro Alves <palves@redhat.com>
9439 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9440 find_function_start_sal instead of find_pc_line.
9442 2018-04-26 Pedro Alves <palves@redhat.com>
9444 * breakpoint.c (set_breakpoint_location_function): Handle
9446 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9447 * elfread.c (elf_symtab_read): Give data symbols with
9448 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9449 (elf_rel_plt_read): Update comment.
9450 * linespec.c (convert_linespec_to_sals): Handle
9452 (minsym_found): Handle mst_data_gnu_ifunc.
9453 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9454 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9455 * parse.c (find_minsym_type_and_address): Handle
9457 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9458 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9459 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9461 <mst_data_gnu_ifunc>: New enumerator.
9463 2018-04-26 Pedro Alves <palves@redhat.com>
9465 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9466 (lookup_minimal_symbol_by_pc_section): ... this. Replace
9467 'want_trampoline' parameter by a lookup_msym_prefer parameter.
9469 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9470 (lookup_minimal_symbol_by_pc): Adjust.
9471 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9472 (lookup_solib_trampoline_symbol_by_pc): Adjust.
9473 * minsyms.h (lookup_msym_prefer): New enum.
9474 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9475 parameter by a lookup_msym_prefer parameter.
9477 2018-04-26 Pedro Alves <palves@redhat.com>
9479 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9480 ends in "@plt" instead of looking at the symbol's section.
9482 2018-04-26 Pedro Alves <palves@redhat.com>
9484 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
9486 (find_pc_partial_function_gnu_ifunc): Rename to ...
9487 (find_pc_partial_function): ... this, and remove references to
9489 (find_pc_partial_function): Delete old implementation.
9490 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9492 2018-04-26 Pedro Alves <palves@redhat.com>
9494 * linespec.c (struct bound_minimal_symbol_search_key): New.
9495 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
9496 skip first line if we found a GNU ifunc minimal symbol by name.
9497 (compare_msymbols): Change parameters to work with a destructured
9499 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9502 2018-04-26 Pedro Alves <palves@redhat.com>
9504 * breakpoint.c (set_breakpoint_location_function): Don't resolve
9505 ifunc targets here. Instead, if we have an ifunc minsym, use its
9507 (add_location_to_breakpoint): Store the minsym and the objfile in
9508 the breakpoint location.
9509 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9510 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9511 Record the minsym in the sal.
9512 * symtab.h (symtab_and_line) <msymbol>: New field.
9514 2018-04-26 Pedro Alves <palves@redhat.com>
9516 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9517 unless we actually resolved the ifunc.
9519 2018-04-26 Pedro Alves <palves@redhat.com>
9521 * c-exp.y (variable production): Prefer ifunc minsyms over
9522 regular function symbols.
9523 * symtab.c (find_gnu_ifunc): New function.
9524 * minsyms.h (lookup_msym_prefer): New enum.
9525 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9526 parameter by a lookup_msym_prefer parameter.
9527 * symtab.h (find_gnu_ifunc): New declaration.
9529 2018-04-26 Pedro Alves <palves@redhat.com>
9531 * blockframe.c (find_gnu_ifunc_target_type): New function.
9532 (find_function_type): New.
9533 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9534 return a value with a memory address.
9535 (eval_call): For calls to GNU ifunc functions, try to find the
9536 type of the target function from the type that the resolver
9538 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9540 * infcall.c (find_function_return_type): Delete.
9541 (find_function_addr): Add 'function_type' parameter. For calls to
9542 GNU ifunc functions, try to find the type of the target function
9543 from the type that the resolver returns, and return it via
9545 (call_function_by_hand_dummy): Adjust to use the function type
9546 returned by find_function_addr.
9547 (find_function_addr): Add 'function_type' parameter and move
9549 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9552 2018-04-26 Pedro Alves <palves@redhat.com>
9554 * c-exp.y (variable production): Skip finding an alias for ifunc
9557 2018-04-26 Pedro Alves <palves@redhat.com>
9559 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9561 2018-04-25 Pedro Alves <palves@redhat.com>
9563 * infcmd.c (kill_command): Print the pid as string, not the whole
9564 thread's ptid. Add comment. s/has been killed/killed/ in output
9566 * remote.c (remote_detach_1): Print the pid as string, not the
9567 whole thread's ptid.
9569 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9570 Sergio Durigan Junior <sergiodj@redhat.com>
9571 Pedro Alves <palves@redhat.com>
9573 * infcmd.c (kill_command): Print message when inferior has
9575 * inferior.c (print_inferior_events): Remove 'static'. Set as
9577 (add_inferior): Improve message printed when
9578 'print_inferior_events' is on.
9579 (exit_inferior): Remove message printed when
9580 'print_inferior_events' is on.
9581 (detach_inferior): Improve message printed when
9582 'print_inferior_events' is on.
9583 (initialize_inferiors): Use 'add_inferior_silent' to set
9584 'current_inferior_'.
9585 * inferior.h (print_inferior_events): Declare here as
9587 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9588 '[Detaching...]' messages when 'print_inferior_events' is on.
9589 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
9590 as prefix/suffix for messages. Remove periods. Fix erroneous
9591 'Detaching after fork from child...', replace it by '... from
9593 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9594 prefix/suffix when printing 'Detaching...' messages. Print
9595 them when 'print_inferior_events' is on.
9596 * remote.c (remote_detach_1): Print message when detaching
9597 from inferior and '!is_fork_parent'.
9599 2018-04-24 Tom Tromey <tom@tromey.com>
9601 * cli-out.h: Reindent.
9603 2018-04-24 Tom Tromey <tom@tromey.com>
9605 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9606 (cli_ui_out::do_field_string): Use fputs_filtered.
9607 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9609 2018-04-23 Tom Tromey <tom@tromey.com>
9611 * guile/scm-frame.c (gdbscm_frame_read_var): Use
9612 gdb::unique_xmalloc_ptr.
9614 2018-04-23 Tom Tromey <tom@tromey.com>
9616 * configure: Rebuild.
9618 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
9621 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9622 prepare_for_testing. Set normal_bp to r_debug_state if target
9625 2018-04-21 Pedro Alves <palves@redhat.com>
9626 Rajendra SY <rajendra.sy@gmail.com>
9628 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9629 * remote.c (extended_remote_attach): In all-stop mode, mark the
9630 thread as executing.
9632 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9634 * thread.c (thread_apply_all_command): Fix comment.
9635 (thread_command): Fix comment.
9637 2018-04-10 Alan Hayward <alan.hayward@arm.com>
9639 * common/tdesc.h (tdesc_create_feature): Remove xml filename
9641 * features/aarch64-core.c (create_feature_aarch64_core):
9643 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9645 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9647 * features/i386/32bit-avx512.c
9648 (create_feature_i386_32bit_avx512): Likewise.
9649 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9651 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9653 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9655 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9657 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9659 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9661 * features/i386/64bit-avx512.c
9662 (create_feature_i386_64bit_avx512): Likewise.
9663 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9665 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9667 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9669 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9671 * features/i386/64bit-segments.c
9672 (create_feature_i386_64bit_segments): Likewise.
9673 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9675 * features/i386/x32-core.c
9676 (create_feature_i386_x32_core): Likewise.
9677 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9678 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9679 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9680 * target-descriptions.c: In generated code, don't pass xml
9683 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9685 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9686 (print_xml_feature::visit_post): Likewise.
9687 (print_xml_feature::visit): Likewise.
9688 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9689 (print_xml_feature): Add new class.
9690 * regformats/regdat.sh: Null xmltarget on feature targets.
9691 * target-descriptions.c (struct target_desc): Add xmltarget.
9692 (maintenance_check_tdesc_xml_convert): Add unittest function.
9693 (tdesc_get_features_xml): Add function to get xml.
9694 (maintenance_check_xml_descriptions): Test xml generation.
9695 * xml-tdesc.c (string_read_description_xml): Add function.
9696 * xml-tdesc.h (string_read_description_xml): Add declaration.
9698 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9700 * features/Makefile: Add feature marker to targets with new style
9701 target descriptions.
9702 * regformats/aarch64.dat: Regenerate.
9703 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9704 * regformats/i386/amd64-avx-linux.dat: Likewise.
9705 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9706 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9707 * regformats/i386/amd64-linux.dat: Likewise.
9708 * regformats/i386/amd64-mpx-linux.dat: Likewise.
9709 * regformats/i386/amd64.dat: Likewise.
9710 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9711 * regformats/i386/i386-avx-linux.dat: Likewise.
9712 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9713 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9714 * regformats/i386/i386-linux.dat: Likewise.
9715 * regformats/i386/i386-mmx-linux.dat: Likewise.
9716 * regformats/i386/i386-mpx-linux.dat: Likewise.
9717 * regformats/i386/i386.dat: Likewise.
9718 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9719 * regformats/i386/x32-avx-linux.dat: Likewise.
9720 * regformats/i386/x32-linux.dat: Likewise.
9721 * regformats/tic6x-c62x-linux.dat: Likewise.
9722 * regformats/tic6x-c64x-linux.dat: Likewise.
9723 * regformats/tic6x-c64xp-linux.dat: Likewise.
9724 * regformats/regdat.sh: Parse feature marker.
9726 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9728 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9729 (tdesc_osabi_name): Likewise.
9730 * target-descriptions.c (tdesc_architecture_name): Add new
9732 (tdesc_osabi_name): Likewise.
9734 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9736 * common/tdesc.c (tdesc_predefined_type): Move to here.
9737 (tdesc_named_type): Likewise.
9738 (tdesc_create_vector): Likewise.
9739 (tdesc_create_struct): Likewise.
9740 (tdesc_set_struct_size): Likewise.
9741 (tdesc_create_union): Likewise.
9742 (tdesc_create_flags): Likewise.
9743 (tdesc_create_enum): Likewise.
9744 (tdesc_add_field): Likewise.
9745 (tdesc_add_typed_bitfield): Likewise.
9746 (tdesc_add_bitfield): Likewise.
9747 (tdesc_add_flag): Likewise.
9748 (tdesc_add_enum_value): Likewise.
9749 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9750 (struct tdesc_type_vector): Likewise.
9751 (struct tdesc_type_field): Likewise.
9752 (struct tdesc_type_with_fields): Likewise.
9753 (tdesc_create_enum): Add declaration.
9754 (tdesc_add_typed_bitfield): Likewise.
9755 (tdesc_add_enum_value): Likewise.
9756 * target-descriptions.c (tdesc_type_field): Move from here.
9757 (tdesc_type_builtin): Likewise.
9758 (tdesc_type_vector): Likewise.
9759 (tdesc_type_with_fields): Likewise.
9760 (tdesc_predefined_types): Likewise.
9761 (tdesc_named_type): Likewise.
9762 (tdesc_create_vector): Likewise.
9763 (tdesc_create_struct): Likewise.
9764 (tdesc_set_struct_size): Likewise.
9765 (tdesc_create_union): Likewise.
9766 (tdesc_create_flags): Likewise.
9767 (tdesc_create_enum): Likewise.
9768 (tdesc_add_field): Likewise.
9769 (tdesc_add_typed_bitfield): Likewise.
9770 (tdesc_add_bitfield): Likewise.
9771 (tdesc_add_flag): Likewise.
9772 (tdesc_add_enum_value): Likewise.
9773 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9774 (tdesc_add_typed_bitfield): Likewise.
9775 (tdesc_add_enum_value): Likewise.
9777 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9779 * common/tdesc.c (tdesc_feature::accept): Move to here.
9780 (tdesc_feature::operator==): Likewise.
9781 (tdesc_create_reg): Likewise.
9782 * common/tdesc.h (tdesc_type_kind): Likewise.
9783 (struct tdesc_type): Likewise.
9784 (struct tdesc_feature): Likewise.
9785 * regformats/regdat.sh: Create a feature.
9786 * target-descriptions.c (tdesc_type_kind): Move from here.
9787 (tdesc_type): Likewise.
9788 (tdesc_type_up): Likewise.
9789 (tdesc_feature): Likewise.
9790 (tdesc_create_reg): Likewise.
9792 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9794 * Makefile.in: Add arch/tdesc.c
9795 * common/tdesc.c: New file.
9796 * common/tdesc.h (tdesc_element_visitor): Move to here.
9797 (tdesc_element): Likewise.
9798 (tdesc_reg): Likewise.
9799 (tdesc_reg_up): Likewise.
9800 * regformats/regdef.h (reg): Add offset to constructors.
9801 * target-descriptions.c (tdesc_element_visitor): Move from here.
9802 (tdesc_element): Likewise.
9803 (tdesc_reg): Likewise.
9804 (tdesc_reg_up): Likewise.
9806 2018-04-17 Tom Tromey <tom@tromey.com>
9808 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9811 2018-04-17 Tom Tromey <tom@tromey.com>
9813 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9815 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
9817 * symtab.c (print_symbol_info): Skip printing filename and line
9818 number when `last' is NULL.
9819 (symtab_symbol_info): Use empty string instead of NULL for first
9820 invocation of print_symbol_info.
9821 (rbreak_command): Pass NULL to `last' parameter of
9824 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
9826 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9829 2018-04-16 Pedro Alves <palves@redhat.com>
9831 * MAINTAINERS (sh): Remove.
9832 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9833 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9834 (ALLDEPFILES): Remove sh64-tdep.c.
9835 * NEWS: Mentions that support for SH-5/SH64 is removed.
9836 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9837 (sh*-*-openbsd*): Ditto.
9838 (sh64-*-elf*): Remove.
9840 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9841 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9842 * sh-tdep.c: No longer include "sh64-tdep.h".
9843 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9844 * sh64-tdep.c, sh64-tdep.h: Remove files.
9846 2018-04-16 Pedro Alves <palves@redhat.com>
9848 * MAINTAINERS: Remove m88k.
9849 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9850 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9851 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9852 * NEWS: Mention that support for m88k was removed.
9853 * configure.host (m88*-*-*): Remove support.
9854 * configure.nat (m88k-*-*): Remove support.
9855 * configure.tgt (m88*-*-openbsd*): Remove.
9856 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9858 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
9860 * configure.tgt (x86_tobjs): New variable.
9861 (amd64_tobjs, i386_tobjs): Use it.
9863 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9865 * symtab.c (print_symbol_info): Precede the symbol definition by
9866 the line number when available.
9867 * NEWS: Advertise this enhancement.
9869 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9871 * NEWS (New options): announce set/show record btrace cpu.
9872 * btrace.c: Include record-btrace.h.
9873 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9874 the vendor is unknown.
9875 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
9876 Maybe overwrite the btrace configuration's cpu.
9877 (btrace_compute_ftrace): Add cpu parameter. Update callers.
9878 (btrace_fetch): Add cpu parameter. Update callers.
9879 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9880 Maybe overwrite the btrace configuration's cpu. Skip enabling
9881 errata workarounds if the vendor is unknown.
9882 * python/py-record-btrace.c: Include record-btrace.h.
9883 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9884 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9885 * record-btrace.c (record_btrace_cpu_state_kind): New.
9886 (record_btrace_cpu): New.
9887 (set_record_btrace_cpu_cmdlist): New.
9888 (record_btrace_get_cpu): New.
9889 (require_btrace_thread, record_btrace_info)
9890 (record_btrace_resume_thread): Call record_btrace_get_cpu.
9891 (cmd_set_record_btrace_cpu_none): New.
9892 (cmd_set_record_btrace_cpu_auto): New.
9893 (cmd_set_record_btrace_cpu): New.
9894 (cmd_show_record_btrace_cpu): New.
9895 (_initialize_record_btrace): Initialize set/show record btrace cpu
9897 * record-btrace.h (record_btrace_get_cpu): New.
9899 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9901 * record.c (set_record_command): Fix typo in message.
9903 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9905 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9907 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9909 * infrun.c (process_event_stop_test): Call
9910 gdbarch_in_indirect_branch_thunk.
9911 * gdbarch.sh (in_indirect_branch_thunk): New.
9912 * gdbarch.c: Regenerated.
9913 * gdbarch.h: Regenerated.
9916 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9917 (HFILES_NO_SRCDIR): Add x86-tdep.h.
9918 (ALLDEPFILES): Add x86-tdep.c.
9919 * arch-utils.h (default_in_indirect_branch_thunk): New.
9920 * arch-utils.c (default_in_indirect_branch_thunk): New.
9921 * i386-tdep: Include x86-tdep.h.
9922 (i386_in_indirect_branch_thunk): New.
9923 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9925 * amd64-tdep: Include x86-tdep.h.
9926 (amd64_in_indirect_branch_thunk): New.
9927 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9929 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9932 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9933 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9934 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9937 2018-04-12 Tom Tromey <tom@tromey.com>
9939 * rust-lang.c (rust_print_struct_def): Remove univariant code.
9940 (rust_evaluate_subexp): Likewise.
9942 2018-04-12 Pedro Alves <palves@redhat.com>
9944 * procfs.c (procfs_detach): Make forward declaration's prototype
9945 match definition's protototype.
9946 (proc_get_LDT_entry): Remove stale do_cleanups call.
9948 2018-04-12 Pedro Alves <palves@redhat.com>
9950 * target.h (target_ops::to_has_exited): Delete.
9951 (target_has_exited): Delete.
9952 * target-delegates.c: Regenerate.
9954 2018-04-11 Pedro Alves <palves@redhat.com>
9956 * target.c (fileio_fh_t::t): Add comment.
9957 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9958 (target_fileio_close): Handle a NULL target.
9959 (invalidate_fileio_fh): New.
9960 (target_close): Call it.
9961 * remote.c (remote_hostio_send_command): No longer check whether
9962 remote_desc is open.
9964 2018-04-11 Pedro Alves <palves@redhat.com>
9966 * target.c (fileio_fh_t): Make it a named struct instead of a
9968 (fileio_fh_t::is_closed): New method.
9969 (DEF_VEC_O (fileio_fh_t)): Remove.
9970 (fileio_fhandles): Now a std::vector.
9971 (is_closed_fileio_fh): Delete.
9972 (acquire_fileio_fd): Adjust. Rename parameters.
9973 (release_fileio_fd): Adjust.
9974 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9975 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9976 (target_fileio_close): Adjust.
9978 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
9980 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9983 2018-04-10 Pedro Alves <palves@redhat.com>
9985 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9986 (scoped_finish_thread_state): New class.
9987 * infcmd.c (run_command_1): Use it instead of finish_thread_state
9989 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9990 (fetch_inferior_event, normal_stop): Likewise.
9991 * thread.c (finish_thread_state_cleanup): Delete.
9993 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9994 Pedro Alves <palves@redhat.com>
9996 * value.c: Include "selftest.h" and "common/array-view.h".
9997 (struct range) <operator ==>: New.
9998 (test_ranges_contain): New.
9999 (check_ranges_vector): New.
10000 (test_insert_into_bit_range_vector): New.
10001 (_initialize_values): Register selftests.
10002 * common/array-view.h (operator==, operator!=): New.
10004 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10006 * common/gdb_vecs.h (unordered_remove): Add overload that takes
10008 * inline-frame.c: Include <algorithm>.
10009 (struct inline_state): Add constructor.
10010 (inline_state_s): Remove.
10011 (DEF_VEC_O(inline_state_s)): Remove.
10012 (inline_states): Change type to std::vector.
10013 (find_inline_frame_state): Adjust to std::vector.
10014 (allocate_inline_frame_state): Remove.
10015 (clear_inline_frame_state): Adjust to std::vector.
10016 (skip_inline_frames): Adjust to std::vector.
10018 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10020 * tracepoint.h (struct trace_state_variable): Add constructor.
10021 <name>: Change type to std::string.
10022 * tracepoint.c (tsv_s): Remove.
10023 (DEF_VEC_O(tsv_s)): Remove.
10024 (tvariables): Change to std::vector.
10025 (create_trace_state_variable): Adjust to std::vector.
10026 (find_trace_state_variable): Likewise.
10027 (find_trace_state_variable_by_number): Likewise.
10028 (delete_trace_state_variable): Likewise.
10029 (trace_variable_command): Adjust to std::string.
10030 (delete_trace_variable_command): Likewise.
10031 (tvariables_info_1): Adjust to std::vector.
10032 (save_trace_state_variables): Likewise.
10033 (start_tracing): Likewise.
10034 (merge_uploaded_trace_state_variables): Adjust to std::vector
10036 * target.h (struct target_ops)
10037 <to_download_trace_state_variable>: Pass reference to
10038 trace_state_variable.
10039 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10040 * target-delegates.c: Re-generate.
10041 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10042 (mi_tsv_deleted): Likewise.
10043 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10044 * remote.c (remote_download_trace_state_variable): Change
10045 pointer to reference and adjust.
10046 * make-target-delegates (parse_argtypes): Handle references.
10047 (write_function_header): Likewise.
10048 (munge_type): Likewise.
10050 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10052 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10053 string_view-selftests.c.
10054 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10056 * unittests/basic_string_view/cons/char/1.cc: Likewise.
10057 * unittests/basic_string_view/cons/char/2.cc: Likewise.
10058 * unittests/basic_string_view/cons/char/3.cc: Likewise.
10059 * unittests/basic_string_view/element_access/char/1.cc:
10061 * unittests/basic_string_view/element_access/char/empty.cc:
10063 * unittests/basic_string_view/element_access/char/front_back.cc:
10065 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10066 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10068 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10070 * unittests/basic_string_view/modifiers/swap/char/1.cc:
10072 * unittests/basic_string_view/operations/compare/char/1.cc:
10074 * unittests/basic_string_view/operations/compare/char/13650.cc:
10076 * unittests/basic_string_view/operations/copy/char/1.cc:
10078 * unittests/basic_string_view/operations/data/char/1.cc:
10080 * unittests/basic_string_view/operations/find/char/1.cc:
10082 * unittests/basic_string_view/operations/find/char/2.cc:
10084 * unittests/basic_string_view/operations/find/char/3.cc:
10086 * unittests/basic_string_view/operations/find/char/4.cc:
10088 * unittests/basic_string_view/operations/rfind/char/1.cc:
10090 * unittests/basic_string_view/operations/rfind/char/2.cc:
10092 * unittests/basic_string_view/operations/rfind/char/3.cc:
10094 * unittests/basic_string_view/operations/substr/char/1.cc:
10096 * unittests/basic_string_view/operators/char/2.cc: Likewise.
10097 * unittests/string_view-selftests.c: New file.
10099 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10101 * unittests/basic_string_view/capacity/1.cc: New file.
10102 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10103 * unittests/basic_string_view/cons/char/1.cc: New file.
10104 * unittests/basic_string_view/cons/char/2.cc: New file.
10105 * unittests/basic_string_view/cons/char/3.cc: New file.
10106 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10107 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10108 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10109 * unittests/basic_string_view/element_access/char/1.cc: New file.
10110 * unittests/basic_string_view/element_access/char/2.cc: New file.
10111 * unittests/basic_string_view/element_access/char/empty.cc: New file.
10112 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10113 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10114 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10115 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10116 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10117 * unittests/basic_string_view/include.cc: New file.
10118 * unittests/basic_string_view/inserters/char/1.cc: New file.
10119 * unittests/basic_string_view/inserters/char/2.cc: New file.
10120 * unittests/basic_string_view/inserters/char/3.cc: New file.
10121 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10122 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10123 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10124 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10125 * unittests/basic_string_view/literals/types.cc: New file.
10126 * unittests/basic_string_view/literals/values.cc: New file.
10127 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10128 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10129 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10130 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10131 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10132 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10133 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10134 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10135 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10136 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10137 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10138 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10139 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10140 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10141 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10142 * unittests/basic_string_view/operations/data/char/1.cc: New file.
10143 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10144 * unittests/basic_string_view/operations/find/char/1.cc: New file.
10145 * unittests/basic_string_view/operations/find/char/2.cc: New file.
10146 * unittests/basic_string_view/operations/find/char/3.cc: New file.
10147 * unittests/basic_string_view/operations/find/char/4.cc: New file.
10148 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10149 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10150 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10151 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10152 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10153 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10154 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10155 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10156 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10157 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10158 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10159 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10160 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10161 * unittests/basic_string_view/operators/char/2.cc: New file.
10162 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10163 * unittests/basic_string_view/range_access/char/1.cc: New file.
10164 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10165 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10166 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10167 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10168 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10169 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10170 * unittests/basic_string_view/requirements/typedefs.cc: New file.
10171 * unittests/basic_string_view/typedefs.cc: New file.
10172 * unittests/basic_string_view/types/1.cc: New file.
10174 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10176 * common/gdb_string_view.h: Remove libstdc++ implementation
10177 details, adjust to gdb reality.
10178 * common/gdb_string_view.tcc: Likewise.
10179 * cli/cli-script.c (struct string_view): Remove.
10180 (user_args) <m_args>: Change element type to gdb::string_view.
10181 (user_args::insert_args): Adjust.
10183 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10185 * common/gdb_string_view.h: New file.
10186 * common/gdb_string_view.tcc: New file.
10188 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10190 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10191 * configure: Re-generate.
10193 2018-04-09 Pedro Alves <palves@redhat.com>
10195 * gdbarch.sh: Include "observable.h" instead of "observer.h".
10196 (set_target_gdbarch): Call
10197 gdb::observers::architecture_changed.notify instead of
10198 observer_notify_architecture_changed.
10200 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10202 * tracepoint.c (struct current_traceframe_cleanup): Remove.
10203 (do_restore_current_traceframe_cleanup): Remove.
10204 (restore_current_traceframe_cleanup_dtor): Remove.
10205 (make_cleanup_restore_current_traceframe): Remove.
10206 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10208 * tracepoint.h (struct scoped_restore_current_traceframe): New.
10209 * infrun.c (fetch_inferior_event): Use
10210 scoped_restore_current_traceframe.
10212 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10214 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10216 <n_allocated_type_units>: Remove.
10217 <all_type_units>: Change to std::vector.
10218 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10219 to std::vector change.
10220 (dwarf2_per_objfile::get_cutu): Likewise.
10221 (dwarf2_per_objfile::get_tu): Likewise.
10222 (create_signatured_type_table_from_index): Likewise.
10223 (create_signatured_type_table_from_debug_names): Likewise.
10224 (dw2_symtab_iter_next): Likewise.
10225 (dw2_print_stats): Likewise.
10226 (dw2_expand_all_symtabs): Likewise.
10227 (dw2_expand_marked_cus): Likewise.
10228 (dw2_debug_names_iterator::next): Likewise.
10229 (dwarf2_initialize_objfile): Likewise.
10230 (add_signatured_type_cu_to_table): Likewise.
10231 (create_all_type_units): Likewise.
10232 (add_type_unit): Likewise.
10233 (struct tu_abbrev_offset): Add constructor.
10234 (build_type_psymtabs_1): Adjust to std::vector change.
10235 (print_tu_stats): Likewise.
10236 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10237 (write_debug_names): Likewise.
10239 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10241 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10242 Make an std::vector.
10243 <n_comp_units>: Remove.
10244 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10245 to std::vector change.
10246 (dwarf2_per_objfile::get_cutu): Likewise.
10247 (dwarf2_per_objfile::get_cu): Likewise.
10248 (create_cus_from_index): Likewise.
10249 (create_addrmap_from_index): Likewise.
10250 (create_addrmap_from_aranges): Likewise.
10251 (dwarf2_read_index): Likewise.
10252 (dw2_find_last_source_symtab): Likewise.
10253 (dw2_map_symtabs_matching_filename): Likewise.
10254 (dw2_symtab_iter_next): Likewise.
10255 (dw2_print_stats): Likewise.
10256 (dw2_expand_all_symtabs): Likewise.
10257 (dw2_expand_symtabs_with_fullname): Likewise.
10258 (dw2_expand_marked_cus): Likewise.
10259 (dw2_map_symbol_filenames): Likewise.
10260 (create_cus_from_debug_names): Likewise.
10261 (dwarf2_read_debug_names): Likewise.
10262 (dw2_debug_names_iterator::next): Likewise.
10263 (dwarf2_initialize_objfile): Likewise.
10264 (set_partial_user): Likewise.
10265 (dwarf2_build_psymtabs_hard): Likewise.
10266 (read_comp_units_from_section): Remove arguments, adjust to
10267 std::vector change.
10268 (create_all_comp_units): Adjust to std::vector and
10269 read_comp_units_from_section changes.
10270 (dwarf2_find_containing_comp_unit): Adjust to std::vector
10272 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10273 (psyms_seen_size): Likewise.
10274 (write_gdbindex): Likewise.
10275 (write_debug_names): Likewise.
10277 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10279 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10280 with dwarf2_per_objfile.
10281 (create_cus_from_index): Likewise.
10282 (create_signatured_type_table_from_index): Likewise.
10283 (dwarf2_read_index): Likewise.
10284 (dwarf2_initialize_objfile): Likewise.
10285 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
10286 per_cu rather than get_dwarf2_per_objfile.
10288 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10290 * dwarf2read.h (struct signatured_type): Forward declare.
10291 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10293 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10294 (dw2_get_cutu): ...this.
10295 (dwarf2_per_objfile::get_cu): Rename from...
10296 (dw2_get_cu): ...this.
10297 (dwarf2_per_objfile::get_tu): New.
10298 (create_addrmap_from_index): Adjust.
10299 (create_addrmap_from_aranges): Adjust.
10300 (dw2_find_last_source_symtab): Adjust.
10301 (dw2_map_symtabs_matching_filename): Adjust.
10302 (dw2_symtab_iter_next): Adjust.
10303 (dw2_print_stats): Adjust.
10304 (dw2_expand_all_symtabs): Adjust.
10305 (dw2_expand_symtabs_with_fullname): Adjust.
10306 (dw2_expand_marked_cus): Adjust.
10307 (dw_expand_symtabs_matching_file_matcher): Adjust.
10308 (dw2_map_symbol_filenames): Adjust.
10309 (dw2_debug_names_iterator::next): Adjust.
10310 (dwarf2_initialize_objfile): Adjust.
10311 (set_partial_user): Adjust.
10312 (dwarf2_build_psymtabs_hard): Adjust.
10314 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10316 * dwarf2read.c (create_signatured_type_table_from_debug_names):
10317 Remove unused variables.
10318 (dw2_map_symtabs_matching_filename): Likewise.
10319 (dwarf2_record_block_ranges): Likewise.
10320 (dwarf2_read_addr_index): Likewise.
10321 (follow_die_offset): Likewise.
10323 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10325 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10326 to symbol_file_add_main.
10328 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10331 * mi/mi-console.c (do_fputc_async_safe): New.
10332 (mi_console_file::write_async_safe): New.
10333 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10334 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10336 * ui-file.c (ui_file::putstrn): Adjust call to
10337 fputstrn_unfiltered.
10338 * utils.c (printchar): Replace do_fputs and do_fprintf
10339 parameters by do_fputc.
10340 (fputstr_filtered): Adjust call to printchar.
10341 (fputstr_unfiltered): Likewise.
10342 (fputstrn_filtered): Likewise.
10343 (fputstrn_unfiltered): Add do_fputc parameter, pass to
10345 * utils.h (do_fputc_ftype): New typedef.
10346 (fputstrn_unfiltered): Add do_fputc parameter.
10348 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10350 * regformats/i386/i386-avx.dat: Remove.
10352 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10355 * amd64-tdep.c (amd64_none_init_abi): New function.
10356 (amd64_x32_none_init_abi): New function.
10357 (_initialize_amd64_tdep): Register handlers for x86-64 and
10358 x64_32 with GDB_OSABI_NONE.
10359 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10360 GDB_OSABI_NONE osabi.
10362 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10365 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10367 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10368 * osabi.c (gdb_osabi_names): Add "unknown" entry.
10370 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10372 * common/byte-vector.h (char_vector): New type.
10373 * target.h (target_read_alloc): Return
10374 gdb::optional<byte_vector>.
10375 (target_read_stralloc): Return gdb::optional<char_vector>.
10376 (target_get_osdata): Return gdb::optional<char_vector>.
10377 * target.c (target_read_alloc_1): Templatize. Replacement
10378 manual memory management with vector.
10379 (target_read_alloc): Change return type, adjust.
10380 (target_read_stralloc): Change return type, adjust.
10381 (target_get_osdata): Change return type, adjust.
10382 * auxv.c (struct auxv_info) <length>: Remove.
10383 <data>: Change type to gdb::optional<byte_vector>.
10384 (auxv_inferior_data_cleanup): Free auxv_info with delete.
10385 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10386 (target_auxv_search): Adjust.
10387 (fprint_target_auxv): Adjust.
10388 * avr-tdep.c (avr_io_reg_read_command): Adjust.
10389 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10390 (linux_make_corefile_notes): Adjust.
10391 * osdata.c (get_osdata): Adjust.
10392 * remote.c (remote_get_threads_with_qxfer): Adjust.
10393 (remote_memory_map): Adjust.
10394 (remote_traceframe_info): Adjust.
10395 (btrace_read_config): Adjust.
10396 (remote_read_btrace): Adjust.
10397 (remote_pid_to_exec_file): Adjust.
10398 * solib-aix.c (solib_aix_get_library_list): Adjust.
10399 * solib-dsbt.c (decode_loadmap): Don't free buf.
10400 (dsbt_get_initial_loadmaps): Adjust.
10401 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10402 * solib-target.c (solib_target_current_sos): Adjust.
10403 * tracepoint.c (sdata_make_value): Adjust.
10404 * xml-support.c (xinclude_start_include): Adjust.
10405 (xml_fetch_content_from_file): Adjust.
10406 * xml-support.h (xml_fetch_another): Change return type.
10407 (xml_fetch_content_from_file): Change return type.
10408 * xml-syscall.c (xml_init_syscalls_info): Adjust.
10409 * xml-tdesc.c (file_read_description_xml): Adjust.
10410 (fetch_available_features_from_target): Change return type.
10411 (target_fetch_description_xml): Adjust.
10412 (target_read_description_xml): Adjust.
10414 2018-04-06 Tom Tromey <tom@tromey.com>
10416 * value.c (~value): Update.
10417 (struct value) <contents>: Now unique_xmalloc_ptr.
10418 (value_contents_bits_eq, allocate_value_contents)
10419 (value_contents_raw, value_contents_all_raw)
10420 (value_contents_for_printing, value_contents_for_printing_const)
10421 (set_value_enclosing_type): Update.
10423 2018-04-06 Tom Tromey <tom@tromey.com>
10425 * value.c (range_s): Remove typedef, VEC.
10426 (struct range): Add operator<.
10427 (range_lessthan): Remove.
10428 (ranges_contain): Change type.
10430 (struct value) <unavailable, optimized_out>: Now std::vector.
10431 (value_entirely_available)
10432 (value_entirely_covered_by_range_vector)
10433 (value_entirely_unavailable, value_entirely_optimized_out):
10435 (insert_into_bit_range_vector): Change argument type.
10436 (find_first_range_overlap): Likewise.
10437 (struct ranges_and_idx, value_contents_bits_eq)
10438 (require_not_optimized_out, require_available): Update.
10439 (ranges_copy_adjusted): Change argument types.
10440 (value_optimized_out, value_copy, value_fetch_lazy): Update.
10442 2018-04-06 Tom Tromey <tom@tromey.com>
10444 * value.c (~value): Update.
10445 (struct value) <parent>: Now a value_ref_ptr.
10446 (value_parent, set_value_parent, value_address, value_copy):
10449 2018-04-06 Tom Tromey <tom@tromey.com>
10451 * value.c (struct value): Add constructor, destructor, and member
10453 (allocate_value_lazy, value_decref): Update.
10455 2018-04-06 Tom Tromey <tom@tromey.com>
10457 * value.c (struct value) <released, next>: Remove.
10458 (all_values): Now a std::vector.
10459 (allocate_value_lazy): Update.
10460 (value_next): Remove.
10461 (value_mark, value_free_to_mark, release_value)
10462 (value_release_to_mark): Update.
10464 2018-04-06 Tom Tromey <tom@tromey.com>
10466 * value.h (fetch_subexp_value, value_release_to_mark): Update.
10467 (free_value_chain): Remove.
10468 * value.c (free_value_chain): Remove.
10469 (value_release_to_mark): Return a std::vector.
10470 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10472 (check_condition): Update.
10473 * eval.c (fetch_subexp_value): Change "val_chain" to a
10475 * breakpoint.c (update_watchpoint): Update.
10476 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10478 2018-04-06 Tom Tromey <tom@tromey.com>
10480 * value.h (free_all_values): Remove.
10481 * value.c (free_all_values): Remove.
10483 2018-04-06 Tom Tromey <tom@tromey.com>
10485 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10486 (value_history_chain, value_history_count): Remove.
10487 (value_history): New global.
10488 (record_latest_value, access_value_history, show_values)
10489 (preserve_values): Update.
10491 2018-04-06 Tom Tromey <tom@tromey.com>
10493 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10494 * varobj.c (varobj_set_display_format, varobj_set_value)
10495 (install_default_visualizer, construct_visualizer)
10496 (install_new_value, ~varobj, varobj_get_value_type)
10497 (my_value_of_variable, varobj_editable_p): Update.
10498 * c-varobj.c (c_describe_child, c_value_of_variable)
10499 (cplus_number_of_children, cplus_describe_child): Update.
10500 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10501 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10502 (ada_value_of_variable, ada_value_is_changeable_p): Update.
10504 2018-04-06 Tom Tromey <tom@tromey.com>
10506 * printcmd.c (last_examine_address): Change type to
10508 (do_examine, x_command): Update.
10510 2018-04-06 Tom Tromey <tom@tromey.com>
10512 * value.c (release_value): Update.
10513 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10514 (struct bpstats) <val>: Now a value_ref_ptr.
10515 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10516 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10517 (~watchpoint, print_it_watchpoint, watch_command_1)
10518 (invalidate_bp_value_on_memory_change): Update.
10520 2018-04-06 Tom Tromey <tom@tromey.com>
10522 * varobj.c (varobj_clear_saved_item)
10523 (update_dynamic_varobj_children, install_new_value, ~varobj):
10525 * value.h (value_incref): Move declaration earlier.
10526 (value_decref): Rename from value_free.
10527 (struct value_ref_policy): New.
10528 (value_ref_ptr): New typedef.
10529 (struct value_deleter): Remove.
10530 (gdb_value_up): Remove typedef.
10531 (release_value): Change return type.
10532 (release_value_or_incref): Remove.
10533 * value.c (set_value_parent): Update.
10534 (value_incref): Change return type.
10535 (value_decref): Rename from value_free.
10536 (value_free_to_mark, free_all_values, free_value_chain): Update.
10537 (release_value): Return value_ref_ptr.
10538 (release_value_or_incref): Remove.
10539 (record_latest_value, set_internalvar, clear_internalvar):
10541 * stack.c (info_frame_command): Don't call value_free.
10542 * python/py-value.c (valpy_dealloc, valpy_new)
10543 (value_to_value_object): Update.
10544 * printcmd.c (do_examine): Update.
10545 * opencl-lang.c (lval_func_free_closure): Update.
10546 * mi/mi-main.c (register_changed_p): Don't call value_free.
10547 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10548 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10549 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10551 * guile/scm-value.c (vlscm_free_value_smob)
10552 (vlscm_scm_from_value): Update.
10553 * frame.c (frame_register_unwind, frame_unwind_register_signed)
10554 (frame_unwind_register_unsigned, get_frame_register_bytes)
10555 (put_frame_register_bytes): Don't call value_free.
10556 * findvar.c (address_from_register): Don't call value_free.
10557 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10558 * dwarf2loc.c (entry_data_value_free_closure)
10559 (value_of_dwarf_reg_entry, free_pieced_value_closure)
10560 (dwarf2_evaluate_loc_desc_full): Update.
10561 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10562 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10563 (~watchpoint, watch_command_1)
10564 (invalidate_bp_value_on_memory_change): Update.
10565 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10567 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
10570 * warning.m4: Add -Wno-error=deprecated-register.
10571 * configure: Re-generate.
10573 2018-04-05 Tom Tromey <tom@tromey.com>
10575 * linespec.h: Remove include of "vec.h".
10577 2018-04-05 Tom Tromey <tom@tromey.com>
10579 * linespec.c (typep): Remove typedef.
10580 (find_methods, find_superclass_methods): Take a std::vector.
10581 (find_method): Use std::vector.
10583 2018-04-05 Tom Tromey <tom@tromey.com>
10585 * utils.c (compare_strings): Remove.
10586 * utils.h (compare_strings): Remove.
10587 * objc-lang.h (find_imps): Update.
10588 * objc-lang.c (find_methods): Take a std::vector.
10589 (uniquify_strings, find_imps): Likewise.
10590 * linespec.c (find_methods): Take a std::vector.
10591 (decode_objc): Use std::vector.
10592 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10594 (find_method, find_function_symbols): Use std::vector.
10596 2018-04-05 Tom Tromey <tom@tromey.com>
10598 * completer.c (completion_tracker::completion_tracker): Remove
10600 (completion_tracker::discard_completions): Likewise.
10601 * breakpoint.c (ambiguous_names_p): Remove cast.
10602 * ada-lang.c (_initialize_ada_language): Remove cast.
10603 * utils.h (streq): Update.
10604 (streq_hash): Add new declaration.
10605 * utils.c (streq): Return bool.
10606 (streq_hash): New function.
10608 2018-04-05 Tom Tromey <tom@tromey.com>
10610 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10611 Remove a string copy.
10613 2018-04-05 Tom Tromey <tom@tromey.com>
10615 * linespec.c (filter_results): Use std::vector.
10616 (decode_line_2, decode_line_full): Update.
10618 2018-04-05 Tom Tromey <tom@tromey.com>
10620 * linespec.c (canonical_to_fullform): Return std::string.
10621 (filter_results): Update.
10622 (struct decode_line_2_item): Add constructor.
10623 <fullform, displayform>: Now std::string.
10624 (decode_line_2_compare_items): Now a std::sort comparator.
10625 (decode_line_2): Update.
10627 2018-04-05 Tom Tromey <tom@tromey.com>
10629 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10630 (unexpected_linespec_error): Update.
10631 (linespec_parse_basic, parse_linespec): Update.
10633 2018-04-05 Tom Tromey <tom@tromey.com>
10635 * linespec.c (linespec_parse_basic): Reindent.
10637 2018-04-05 Tom Tromey <tom@tromey.com>
10639 * minsyms.h (iterate_over_minimal_symbols): Update.
10640 * minsyms.c (iterate_over_minimal_symbols): Take a
10641 gdb::function_view.
10642 * linespec.c (struct collect_minsyms): Remove.
10643 (compare_msyms): Now a std::sort comparator.
10644 (add_minsym): Add parameters.
10645 (search_minsyms_for_name): Update. Use std::vector.
10647 2018-04-03 Tom Tromey <tom@tromey.com>
10649 * mipsread.c (read_alphacoff_dynamic_symtab): Use
10652 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10654 * MAINTAINERS (Write After Approval): Add Weimin Pan.
10656 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10659 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
10660 printing static type.
10662 2018-04-01 Tom Tromey <tom@tromey.com>
10664 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10665 (rs6000_xfer_shared_libraries): Update.
10667 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
10669 * common/gdb_vecs.h (char_ptr): Remove.
10670 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10672 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10674 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10676 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10678 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10680 * tracepoint.h (struct uploaded_tp): Initialize fields.
10681 <actions, step_actions, cmd_strings>: Change type to
10682 std::vector<char *>.
10683 * tracepoint.c (get_uploaded_tp): Allocate with new.
10684 (free_uploaded_tps): Free with delete.
10685 (parse_tracepoint_definition): Adjust to std::vector change.
10686 * breakpoint.c (read_uploaded_action): Likewise.
10687 (create_tracepoint_from_upload): Likewise.
10688 * ctf.c (ctf_write_uploaded_tp): Likewise.
10689 (SET_ARRAY_FIELD): Likewise.
10690 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10692 2018-03-30 Tom Tromey <tom@tromey.com>
10694 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
10696 (svr4_keep_data_in_core): Update.
10697 (svr4_read_so_list): Update.
10699 2018-03-30 Tom Tromey <tom@tromey.com>
10701 * windows-nat.c (handle_output_debug_string, handle_exception):
10703 * target.h (target_read_string): Update.
10704 * target.c (target_read_string): Change "string" to
10705 unique_xmalloc_ptr.
10706 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10708 * solib-frv.c (frv_current_sos): Update.
10709 * solib-dsbt.c (dsbt_current_sos): Update.
10710 * solib-darwin.c (darwin_current_sos): Update.
10711 * linux-thread-db.c (inferior_has_bug): Update.
10712 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10713 Update. Remove alloca.
10714 * ada-lang.c (ada_main_name): Update.
10716 2018-03-30 Tom Tromey <tom@tromey.com>
10718 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10719 (struct dwo_file_deleter): New.
10720 (dwo_file_up): New typedef.
10721 (open_and_init_dwo_file): Use dwo_file_up.
10722 (free_dwo_file_cleanup): Remove.
10724 2018-03-30 Tom Tromey <tom@tromey.com>
10726 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10727 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10729 2018-03-30 Tom Tromey <tom@tromey.com>
10731 * dwarf2read.c (class free_cached_comp_units): New class.
10732 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10733 (free_cached_comp_units): Remove function.
10735 2018-03-30 Tom Tromey <tom@tromey.com>
10737 * utils.h (make_cleanup_unpush_target): Remove.
10738 * inf-ptrace.c (struct target_unpusher): New.
10739 (target_unpush_up) New typedef.
10740 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10742 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10744 2018-03-27 Tom Tromey <tom@tromey.com>
10746 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10748 2018-03-27 Pedro Alves <palves@redhat.com>
10749 Tom Tromey <tom@tromey.com>
10751 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10752 destructor. Now a class.
10753 (gdb_readline_wrapper_cleanup): Remove function.
10754 (gdb_readline_wrapper): Remove cleanups.
10756 2018-03-27 Tom Tromey <tom@tromey.com>
10758 * typeprint.h (struct type_print_options) <local_typedefs,
10759 global_typedefs>: Remove "struct" keyword.
10760 (class typedef_hash_table): New class.
10761 (recursively_update_typedef_hash, add_template_parameters)
10762 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10763 (find_typedef_in_hash): Don't declare.
10764 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10765 (typedef_hash_table::recursively_update): Rename from
10766 recursively_update_typedef_hash. Now a member.
10767 (typedef_hash_table::add_template_parameters): Rename from
10768 add_template_parameters. Now a member.
10769 (typedef_hash_table::typedef_hash_table): Now a constructor;
10770 rename from create_typedef_hash.
10771 (typedef_hash_table::~typedef_hash_table): Now a destructor;
10772 rename from free_typedef_hash.
10773 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10774 (do_free_global_table): Remove.
10775 (typedef_hash_table::typedef_hash_table): New constructor; renamed
10776 from copy_type_recursive.
10777 (create_global_typedef_table): Remove.
10778 (typedef_hash_table::find_global_typedef): Now a member of
10779 typedef_hash_table.
10780 (typedef_hash_table::find_typedef): Rename from
10781 find_typedef_in_hash; now a member.
10782 (whatis_exp): Update.
10783 * extension.h (struct ext_lang_type_printers): Add constructor and
10785 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10787 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10788 Now a constructor; rename from start_ext_lang_type_printers.
10789 (ext_lang_type_printers): Now a destructor; rename from
10790 free_ext_lang_type_printers.
10791 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10793 (c_type_print_base_struct_union): Update. Remove cleanups.
10795 2018-03-27 Tom Tromey <tom@tromey.com>
10797 * dwarf-index-write.c: Include <cmath>.
10799 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10801 * NEWS: Add entry describing new "set|show varsize-limit" command.
10802 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10804 * printcmd.c (_initialize_printcmd): Add "set var" alias of
10807 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
10809 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10810 dwarf-index-write.c
10811 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10812 * dwarf-index-common.c: New file.
10813 * dwarf-index-common.h: New file.
10814 * dwarf-index-write.c: New file.
10815 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10816 (struct dwarf2_section_info): Move from here.
10817 (dwarf2_section_info_def): Likewise.
10818 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10819 (offset_type): Likewise.
10820 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10821 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10822 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10823 (byte_swap): Likewise.
10824 (MAYBE_SWAP): Likewise.
10825 (dwarf2_per_cu_ptr): Likewise.
10826 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10827 (struct tu_stats): Likewise.
10828 (struct dwarf2_per_objfile): Likewise.
10829 (struct dwarf2_per_cu_data): Likewise.
10830 (struct signatured_type): Likewise.
10831 (sig_type_ptr): Likewise.
10832 (DEF_VEC_P (sig_type_ptr)): Likewise.
10833 (INDEX4_SUFFIX): Likewise.
10834 (INDEX5_SUFFIX): Likewise.
10835 (DEBUG_STR_SUFFIX): Likewise.
10836 (dwarf2_read_section): Make non-static.
10837 (mapped_index_string_hash): Move from here.
10838 (dwarf5_djb_hash): Likewise.
10839 (file_write): Likewise.
10840 (class data_buf): Likewise.
10841 (struct symtab_index_entry): Likewise.
10842 (struct mapped_symtab): Likewise.
10843 (find_slot): Likewise.
10844 (hash_expand): Likewise.
10845 (add_index_entry): Likewise.
10846 (uniquify_cu_indices): Likewise.
10847 (class c_str_view): Likewise.
10848 (class c_str_view_hasher): Likewise.
10849 (class vector_hasher): Likewise.
10850 (write_hash_table): Likewise.
10851 (psym_index_map): Likewise.
10852 (struct addrmap_index_data): Likewise.
10853 (add_address_entry): Likewise.
10854 (add_address_entry_worker): Likewise.
10855 (write_address_map): Likewise.
10856 (symbol_kind): Likewise.
10857 (write_psymbols): Likewise.
10858 (struct signatured_type_index_data): Likewise.
10859 (write_one_signatured_type): Likewise.
10860 (recursively_count_psymbols): Likewise.
10861 (recursively_write_psymbols): Likewise.
10862 (class debug_names): Likewise.
10863 (check_dwarf64_offsets): Likewise.
10864 (psyms_seen_size): Likewise.
10865 (write_gdbindex): Likewise.
10866 (write_debug_names): Likewise.
10867 (assert_file_size): Likewise.
10868 (write_psymtabs_to_index): Likewise.
10869 (save_gdb_index_command): Likewise.
10870 (_initialize_dwarf2_read): Don't register the "save gdb-index"
10872 * dwarf2read.h: New file.
10874 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10877 * dwarf2read.c (dwarf2_physname): Do not return the demangled
10878 symbol name if the CU's language stores symbol names in linkage
10880 * language.h (struct language_defn)
10881 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
10882 all instances of this struct.
10884 2018-03-26 Tom Tromey <tom@tromey.com>
10886 * stack.c (backtrace_command_1): Remove verbose code.
10888 2018-03-26 Tom Tromey <tom@tromey.com>
10890 * python/py-framefilter.c (py_print_type): Don't catch
10891 exceptions. Return void.
10892 (py_print_value): Likewise.
10893 (py_print_single_arg): Likewise.
10894 (enumerate_args): Don't catch exceptions.
10895 (py_print_args): Likewise.
10896 (py_print_frame): Likewise.
10897 (gdbpy_apply_frame_filter): Catch exceptions here.
10899 2018-03-26 Tom Tromey <tom@tromey.com>
10901 * stack.c (_initialize_stack): Remove trailing newlines from help
10902 text. Add "Usage" line to "backtrace" help.
10904 2018-03-26 Tom Tromey <tom@tromey.com>
10907 * python/py-framefilter.c (py_print_args): Call wrap_hint.
10909 2018-03-26 Tom Tromey <tom@tromey.com>
10911 * python/py-framefilter.c (py_print_single_arg): Return
10912 EXT_LANG_BT_ERROR from catch.
10914 2018-03-26 Tom Tromey <tom@tromey.com>
10916 PR backtrace/15584:
10917 * stack.c (backtrace_command_1): Move some code into no-filters
10920 2018-03-26 Tom Tromey <tom@tromey.com>
10922 * python/py-framefilter.c (throw_quit_or_print_exception): New
10924 (gdbpy_apply_frame_filter): Use it.
10926 2018-03-26 Tom Tromey <tom@tromey.com>
10929 * python/py-framefilter.c (py_print_type, py_print_value)
10930 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10933 2018-03-26 Tom Tromey <tom@tromey.com>
10935 * python/py-framefilter.c (enumerate_args): Use
10936 gdb::unique_xmalloc_ptr.
10938 2018-03-26 Tom Tromey <tom@tromey.com>
10940 * python/py-framefilter.c (py_print_frame): Return
10942 (gdbpy_apply_frame_filter): Update comment.
10943 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10945 <EXT_LANG_BT_NO_FILTERS>: Change value.
10947 2018-03-26 Tom Tromey <tom@tromey.com>
10949 PR backtrace/15582:
10950 * stack.c (backtrace_command): Parse "hide" argument.
10951 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10952 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10955 2018-03-26 Tom Tromey <tom@tromey.com>
10957 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10959 (backtrace_command): Remove "fulltrace", add "flags".
10961 2018-03-26 Tom Tromey <tom@tromey.com>
10963 * stack.c (backtrace_command): Rewrite command line parsing.
10965 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10967 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10969 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10971 * filename-seen-cache.h: Add include guard.
10973 2018-03-26 Keith Seitz <keiths@redhat.com>
10975 * symfile.c (place_section): Remove "struct" from section_addr_info
10977 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10978 "struct" keyword from section_addr_info.
10980 2018-03-26 Alan Hayward <alan.hayward@arm.com>
10982 * regformats/regdef.h (reg): Add constructors.
10984 2018-03-25 Pedro Alves <palves@redhat.com>
10986 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10987 if then/else bodies in var_func_name extraction.
10989 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
10991 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10992 lookup_minimal_symbol() to find symbol entry.
10993 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10995 2018-03-23 Keith Seitz <keiths@redhat.com>
10998 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10999 nested type definitions for C++, too.
11001 2018-03-23 Tom Tromey <tom@tromey.com>
11003 * machoread.c (struct oso_el): Add a constructor. Don't define as
11005 (macho_register_oso): Remove.
11006 (macho_symtab_read): Take a std::vector.
11007 (oso_el_compare_name): Now a std::sort comparator.
11008 (macho_symfile_read_all_oso): Take a std::vector.
11009 (macho_symfile_read): Use std::vector. Remove cleanups.
11011 2018-03-22 Tom Tromey <tom@tromey.com>
11013 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11014 (record_full_goto_bookmark): Use std::string.
11016 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11019 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11022 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11024 * rs6000-tdep.c (store_insn_p): New function.
11025 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11026 and cr_reg to their unshifted values. Use store_insn_p to
11027 match LR saves using either R1 or fdata->alloca_reg. Use
11028 store_insn_p to match CR saves. Set alloca_reg_offset
11029 when alloca_reg and framep are set. Remove lr_reg shift
11030 when assigning to fdata->lr_register.
11032 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
11034 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11035 command line args instead of emitting a warning.
11037 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11039 * tracepoint.h (struct static_tracepoint_marker): Initialize
11040 fields, define default constructor, move constructor and move
11041 assignment, disable the rest.
11042 <str_id, extra>: Make std::string.
11043 (release_static_tracepoint_marker): Remove.
11044 (free_current_marker): Remove.
11045 * tracepoint.c (free_current_marker): Remove.
11046 (parse_static_tracepoint_marker_definition): Adjust to
11047 std::string, use new hex2str overload.
11048 (release_static_tracepoint_marker): Remove.
11049 (print_one_static_tracepoint_marker): Get marker by reference
11050 and adjust to std::string.
11051 (info_static_tracepoint_markers_command): Adjust to std::vector
11053 * target.h (static_tracepoint_marker_p): Remove typedef.
11054 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11055 (struct target_ops) <to_static_tracepoint_marker_at>: Return
11057 <to_static_tracepoint_markers_by_strid>: Return std::vector.
11059 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11060 (target_debug_print_std_vector_static_tracepoint_marker): New.
11061 (target_debug_print_struct_static_tracepoint_marker_p): Rename
11063 (target_debug_print_static_tracepoint_marker_p): ... this.
11064 * target-delegates.c: Re-generate.
11065 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11067 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11068 (decode_static_tracepoint_spec): Adjust to std::vector.
11069 (tracepoint_print_one_detail): Adjust to std::string.
11070 (strace_marker_decode_location): Adjust to std::string.
11071 (update_static_tracepoint): Adjust to std::string, remove call
11072 to release_static_tracepoint_marker.
11073 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11074 Adjust to std::vector.
11075 * remote.c (remote_static_tracepoint_marker_at): Return bool.
11076 (remote_static_tracepoint_markers_by_strid): Adjust to
11078 * common/rsp-low.h (hex2str): New overload with explicit count
11080 * common/rsp-low.c (hex2str): New overload with explicit count
11082 * unittests/rsp-low-selftests.c (test_hex2str): New function.
11083 (_initialize_rsp_low_selftests): Add test_hex2str test.
11084 * unittests/tracepoint-selftests.c
11085 (test_parse_static_tracepoint_marker_definition): Adjust to
11088 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11090 * tracepoint.c (parse_static_tracepoint_marker_definition):
11091 Consider case where the definition is followed by more
11093 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11094 tracepoint-selftests.c.
11095 * unittests/tracepoint-selftests.c: New.
11097 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11099 * MAINTAINERS (Write After Approval): Add Pedro Franco de
11102 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11104 * symtab.c (find_pc_sect_line): fixed indentation.
11106 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11108 * symtab.c (find_pc_sect_line): now uses binary search.
11110 2018-03-19 Tom Tromey <tom@tromey.com>
11112 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11113 "IDENT" production.
11115 2018-03-19 Pedro Alves <palves@redhat.com>
11116 Tom Tromey <tom@tromey.com>
11118 * unittests/observable-selftests.c: New file.
11119 * common/observable.h: New file.
11120 * observable.h: New file.
11121 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11122 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11123 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11124 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11125 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11126 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11127 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11128 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11129 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11130 python/py-breakpoint.c, python/py-finishbreakpoint.c,
11131 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11132 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11133 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11134 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11135 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11136 tui/tui-interp.c, valops.c: Update all users.
11137 * tui/tui-hooks.c (tui_bp_created_observer)
11138 (tui_bp_deleted_observer, tui_bp_modified_observer)
11139 (tui_inferior_exit_observer, tui_before_prompt_observer)
11140 (tui_normal_stop_observer, tui_register_changed_observer):
11142 (tui_observers_token): New global.
11143 (attach_or_detach, tui_attach_detach_observers): New functions.
11144 (tui_install_hooks, tui_remove_hooks): Use
11145 tui_attach_detach_observers.
11146 * record-btrace.c (record_btrace_thread_observer): Remove.
11147 (record_btrace_thread_observer_token): New global.
11148 * observer.sh: Remove.
11149 * observer.c: Rename to observable.c.
11150 * observable.c (namespace gdb_observers): Define new objects.
11151 (observer_debug): Move into gdb_observers namespace.
11152 (struct observer, struct observer_list, xalloc_observer_list_node)
11153 (xfree_observer_list_node, generic_observer_attach)
11154 (generic_observer_detach, generic_observer_notify): Remove.
11155 (_initialize_observer): Update.
11156 Don't include observer.inc.
11157 * Makefile.in (generated_files): Remove observer.h, observer.inc.
11158 (clean mostlyclean): Likewise.
11159 (observer.h, observer.inc): Remove targets.
11160 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11161 (COMMON_SFILES): Use observable.c, not observer.c.
11162 * .gitignore: Remove observer.h.
11164 2018-03-18 Tom Tromey <tom@tromey.com>
11166 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11168 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11170 2018-03-17 Tom Tromey <tom@tromey.com>
11172 * auto-load.c (auto_load_objfile_script_1): Use std::string.
11174 2018-03-17 Tom Tromey <tom@tromey.com>
11176 * target.c (class scoped_target_fd): New.
11177 (target_fileio_close_cleanup): Remove.
11178 (target_fileio_read_alloc_1): Use scoped_target_fd.
11180 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
11182 * silent-rules.mk: New.
11183 * Makefile.in: Include silent-rules.mk
11184 (srcdir, VPATH, top_srcdir): Move up.
11185 (COMPILE): Add ECHO_CXX.
11186 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11187 (init.c): Add ECHO_INIT_C.
11188 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11189 (version.c): Add ECHO_GEN.
11190 (printcmd.o): Add ECHO_CXX.
11191 (target-float.o): Add ECHO_CXX.
11192 (ada-exp.o): Add ECHO_CXX.
11193 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11194 (insight$(EXEEXT)): Add ECHO_CXXLD.
11195 * gnulib/configure.ac: Add AM_SILENT_RULES.
11196 * gnulib/aclocal.m4: Re-generate.
11197 * gnulib/configure: Re-generate.
11198 * gnulib/import/Makefile.in: Re-generate.
11200 2018-03-16 Tom Tromey <tom@tromey.com>
11202 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11203 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11204 * utils.c (do_free_section_addr_info)
11205 (make_cleanup_free_section_addr_info): Remove.
11206 * symfile.h (struct other_sections): Add constructor.
11207 (struct section_addr_info): Remove.
11208 (section_addr_info): New typedef.
11209 (struct sym_fns) <sym_offsets>: Change type of parameter.
11210 (build_section_addr_info_from_objfile)
11211 (relative_addr_info_to_section_offsets, addr_info_make_relative)
11212 (default_symfile_offsets, symbol_file_add)
11213 (symbol_file_add_from_bfd)
11214 (build_section_addr_info_from_section_table): Update.
11215 (alloc_section_addr_info, free_section_addr_info): Don't declare.
11216 * symfile.c (alloc_section_addr_info): Remove.
11217 (build_section_addr_info_from_section_table): Change return type.
11219 (build_section_addr_info_from_bfd)
11220 (build_section_addr_info_from_objfile): Likewise.
11221 (free_section_addr_info): Remove.
11222 (relative_addr_info_to_section_offsets): Change type of "addrs".
11223 (addrs_section_compar): Now a std::sort comparator.
11224 (addrs_section_sort): Change return type.
11225 (addr_info_make_relative): Change type of "addrs". Update.
11226 (default_symfile_offsets, syms_from_objfile_1)
11227 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11228 (symbol_file_add_separate): Update.
11229 (symbol_file_add): Change type of "addrs". Update.
11230 (add_symbol_file_command): Update. Remove cleanups.
11231 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
11233 * symfile-debug.c (debug_sym_offsets): Change type of "info".
11234 * solib.c (solib_read_symbols): Update.
11235 * objfiles.c (objfile_relocate): Update. Remove cleanups.
11236 * machoread.c (macho_symfile_offsets): Update.
11237 * jit.c (jit_bfd_try_read_symtab): Update.
11239 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
11241 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11242 unittests/utils-selftests.c.
11243 * unittests/utils-selftests.c: New file.
11245 2018-03-14 Tom Tromey <tom@tromey.com>
11248 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11251 2018-03-14 Tom Tromey <tom@tromey.com>
11254 * printcmd.c (printf_pointer): Allow "-" in format.
11256 2018-03-14 Tom Tromey <tom@tromey.com>
11258 * printcmd.c (_initialize_printcmd): Add usage to printf.
11260 2018-03-14 Yao Qi <qiyao@sourceware.org>
11262 * MAINTAINERS: Update my email address.
11264 2018-03-13 Tom Tromey <tom@tromey.com>
11266 * machoread.c (macho_check_dsym): Change filenamep to a
11268 (macho_symfile_read): Update.
11269 * symfile.c (load_command): Use std::string.
11271 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
11273 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11274 to error message string.
11275 (riscv_register_name): Use xsnprintf instead of sprintf.
11276 (riscv_insn::fetch_instruction): Use gdb_assert instead of
11278 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11280 (riscv_push_dummy_call): Likewise.
11282 2018-03-12 Tom Tromey <tom@tromey.com>
11284 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11285 Use gdb::byte_vector.
11286 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11288 2018-03-12 Yao Qi <yao.qi@linaro.org>
11290 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11291 parameter type to readable_regcache.
11292 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11295 2018-03-11 Tom Tromey <tom@tromey.com>
11297 * dwarf2read.c (struct nextfield): Add initializers.
11298 (struct nextfnfield): Remove.
11299 (struct fnfieldlist): Add initializers. Remove "length" and
11300 "head", use std::vector.
11301 (struct decl_field_list): Remove.
11302 (struct field_info): Add initializers.
11303 <fields, baseclasses>: Now std::vector.
11304 <nbaseclasses, nfnfields, typedef_field_list_count,
11305 nested_types_list_count>: Remove.
11306 (dwarf2_add_field, dwarf2_add_type_defn)
11307 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11308 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11309 (process_structure_scope): Update.
11311 2018-03-11 Tom Tromey <tom@tromey.com>
11313 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11314 for use by std::sort.
11315 (build_type_psymtabs_1): Use std::vector.
11317 2018-03-09 Eli Zaretskii <eliz@gnu.org>
11319 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11320 and LIBMPFR in the printed configuration.
11322 2018-03-08 Tom Tromey <tom@tromey.com>
11324 * source.c (get_filename_and_charpos): Use scoped_fd.
11325 * nto-procfs.c (procfs_open_1): Use scoped_fd.
11326 (procfs_pidlist): Likewise.
11327 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11328 (iterate_over_mappings): Likewise.
11330 2018-03-08 Tom Tromey <tom@tromey.com>
11332 * infcall.c (struct call_return_meta_info)
11333 <stack_temporaries_enabled>: Remove.
11334 (get_call_return_value, call_function_by_hand_dummy): Update.
11335 * thread.c (disable_thread_stack_temporaries): Remove.
11336 (enable_thread_stack_temporaries): Remove.
11337 (thread_stack_temporaries_enabled_p): Return bool.
11338 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11339 (get_last_thread_stack_temporary): Update.
11340 * eval.c (evaluate_subexp): Update.
11341 * gdbthread.h (class enable_thread_stack_temporaries): Now a
11342 class, not a function.
11343 (value_ptr, value_vec): Remove typedefs.
11344 (class thread_info) <stack_temporaries_enabled>: Now bool.
11345 <stack_temporaries>: Now a std::vector.
11346 (thread_stack_temporaries_enabled_p)
11347 (value_in_thread_stack_temporaries): Return bool.
11349 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
11351 * remote.c (putpkt_binary): Fix omitted bytes reporting.
11352 (getpkt_or_notif_sane_1): Likewise.
11354 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11356 * build-id.c (build_id_to_debug_bfd): Use std::string.
11358 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11360 * build-id.c (find_separate_debug_file_by_buildid): Return
11362 * build-id.h (find_separate_debug_file_by_buildid): Return
11364 * coffread.c (coff_symfile_read): Adjust to std::string.
11365 * elfread.c (elf_symfile_read): Adjust to std::string.
11366 * symfile.c (separate_debug_file_exists): Change parameter to
11368 (find_separate_debug_file): Return std::string.
11369 (find_separate_debug_file_by_debuglink): Return std::string.
11370 * symfile.h (find_separate_debug_file_by_debuglink): Return
11373 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11375 * common/xml-utils.c (xml_escape_text): Move code to...
11376 (xml_escape_text_append): ... this new function.
11377 * common/xml-utils.h (xml_escape_text_append): New declaration.
11378 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11380 (_initialize_xml_utils): register test_xml_escape_text_append as
11383 2018-03-07 Alan Hayward <alan.hayward@arm.com>
11385 * defs.h: Remove MAX_REGISTER_SIZE.
11386 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11388 * python/py-unwind.c (pyuw_sniffer): Likewise.
11390 2018-03-07 Tom Tromey <tom@tromey.com>
11392 * linux-tdep.c (linux_info_proc): Update.
11393 * target.h (struct target_ops) <to_fileio_readlink>: Return
11395 (target_fileio_readlink): Return optional<string>.
11396 * remote.c (remote_hostio_readlink): Return optional<string>.
11397 * inf-child.c (inf_child_fileio_readlink): Return
11399 * target.c (target_fileio_readlink): Return optional<string>.
11401 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
11403 * regcache.c (cooked_read_test): Add riscv to the list of
11404 architectures that have a save_reggroup.
11406 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
11408 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11409 value is not a dynamic class object.
11411 2018-03-06 Tom Tromey <tom@tromey.com>
11413 * rust-exp.y: Formatting fixes.
11415 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11417 * riscv-tdep.c (riscv_register_name): Remove target description
11419 (riscv_gdbarch_init): Remove target description check.
11421 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11423 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11425 * riscv-tdep.h: Likewise.
11427 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11429 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11430 (riscv_pseudo_register_write): Delete.
11431 (riscv_gdbarch_init): Remove all use of pseudo registers.
11433 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11435 * record-btrace.c (btrace_print_lines): Replace cleanup
11436 parameter with RAII equivalents.
11437 (btrace_insn_history): Replace cleanup with RAII equivalents.
11438 * ui-out.h (make_cleanup_ui_out_list_begin_end,
11439 make_cleanup_ui_out_tuple_begin_end): Remove.
11440 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11441 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11442 make_cleanup_ui_out_list_begin_end): Remove.
11444 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11446 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11447 parameter types to std::vector. Use bool.
11448 (record_btrace_wait): Replace VEC(tp_t) with
11449 std::vector<thread_info *>.
11450 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11452 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11454 * record-btrace.c (record_btrace_disable_callback): Remove.
11455 (struct scoped_btrace_disable): New.
11456 (record_btrace_open): Use scoped_btrace_disable.
11458 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11460 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11461 reading values from registers.
11463 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11465 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11468 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11470 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11471 change parameter type. Use GDB's print functions, and use
11472 core_addr_to_string where appropriate.
11473 (riscv_push_dummy_call): Use core_addr_to_string where
11474 appropriate, update call to riscv_print_arg_location, and reindent
11476 (riscv_return_value): Update call to riscv_print_arg_location.
11478 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11479 Tim Newsome <tim@sifive.com>
11480 Albert Ou <a0u@eecs.berkeley.edu>
11481 Darius Rad <darius@bluespec.com>
11483 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11484 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11485 (ALLDEPFILES): Add riscv-tdep.c
11486 * configure.tgt: Add riscv support.
11487 * riscv-tdep.c: New file.
11488 * riscv-tdep.h: New file.
11489 * NEWS: Mention new target.
11490 * MAINTAINERS: Add entry for riscv.
11492 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11494 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11495 fields within aggregates.
11497 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
11499 * record-btrace.c (btrace_print_lines): Change type of flags to
11500 gdb_disassembly_flags.
11502 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11504 * fbsd-nat.c: Include "inf-ptrace.h".
11505 (USE_SIGTRAP_SIGINFO): Conditionally define.
11506 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11507 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11508 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11510 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11512 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11514 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11515 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11516 "supports_stopped_by_hw_breakpoint" target methods.
11518 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11520 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11521 * fbsd-nat.c (debug_fbsd_nat): New variable.
11522 (show_fbsd_nat_debug): New function.
11523 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11524 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11526 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11528 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11529 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11531 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11532 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11535 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11537 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11538 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11540 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11542 * charset.c (struct charset_vector): New.
11543 (charsets): Change type to charset_vector.
11544 (find_charset_names): Adjust.
11546 (_initialize_charset): Adjust.
11548 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11550 * progspace.h (struct program_space) <deleted_solibs>: Change
11551 type to std::vector<std::string>.
11552 * progspace.c (clear_program_space_solib_cache): Adjust.
11553 * breakpoint.c (print_solib_event): Adjust.
11554 (check_status_catch_solib): Adjust.
11555 * solib.c (update_solib_list): Adjust.
11556 * ui-out.h (class ui_out) <field_string>: New overload.
11557 * ui-out.c (ui_out::field_string): New overload.
11559 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11561 * progspace.h (struct program_space): Add constructor and
11562 destructor, initialize fields.
11563 (add_program_space): Remove.
11564 * progspace.c (add_program_space): Rename to...
11565 (program_space::program_space): ... this.
11566 (release_program_space): Rename to...
11567 (program_space::~program_space): ... this.
11568 (delete_program_space): Use delete to delete program_space.
11569 (initialize_progspace): Use new to allocate program_space.
11570 * inferior.c (add_inferior_with_spaces): Likewise.
11571 (clone_inferior_command): Likewise.
11572 * infrun.c (follow_fork_inferior): Likewise.
11573 (handle_vfork_child_exec_or_exit): Likewise.
11575 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11577 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11578 (delim_string_to_char_ptr_vec): Return std::vector of
11579 gdb::unique_xmalloc_ptr.
11580 (dirnames_to_char_ptr_vec_append): Take std::vector of
11581 gdb::unique_xmalloc_ptr.
11582 (dirnames_to_char_ptr_vec): Return std::vector of
11583 gdb::unique_xmalloc_ptr.
11584 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11585 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11586 (delim_string_to_char_ptr_vec): Return an std::vector of
11587 gdb::unique_xmalloc_ptr, adjust the code.
11588 (dirnames_to_char_ptr_vec_append): Take an std::vector of
11589 gdb::unique_xmalloc_ptr, adjust the code.
11590 (dirnames_to_char_ptr_vec): Return an std::vector of
11591 gdb::unique_xmalloc_ptr, adjust the code.
11592 * auto-load.c (auto_load_safe_path_vec): Change type to
11593 std::vector of gdb::unique_xmalloc_ptr.
11594 (auto_load_expand_dir_vars): Return an std::vector of
11595 gdb::unique_xmalloc_ptr, adjust the code.
11596 (auto_load_safe_path_vec_update): Adjust.
11597 (filename_is_in_auto_load_safe_path_vec): Adjust.
11598 (auto_load_objfile_script_1): Adjust.
11599 * build-id.c (build_id_to_debug_bfd): Adjust.
11600 * linux-thread-db.c (thread_db_load_search): Adjust.
11601 * source.c (add_path): Adjust.
11603 * symfile.c (find_separate_debug_file): Adjust.
11604 * utils.c (do_free_char_ptr_vec): Remove.
11605 (make_cleanup_free_char_ptr_vec): Remove.
11607 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
11610 * common/pathstuff.c: Conditionally include "<windows.h>".
11612 2018-03-01 Georg Sauthoff <mail@georg.so>
11615 * gcore.in: Quote variables and switch interpreter to bash.
11617 2018-03-01 Tom Tromey <tom@tromey.com>
11619 * dwarf2read.c (alloc_discriminant_info): Fix default_index
11620 assertion. Add assertion for discriminant_index.
11621 (quirk_rust_enum): Use correct base type name in univariant case.
11623 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
11625 * record.c (get_call_history_modifiers): Return a
11626 record_print_flags.
11627 (cmd_record_call_history): Adjust.
11628 * record-btrace.c (record_btrace_call_history): Adjust.
11629 (record_btrace_call_history_range): Adjust.
11630 (record_btrace_call_history_from): Adjust.
11631 * target-debug.h (target_debug_print_record_print_flags): New.
11632 * target-delegates.c: Re-generate.
11633 * target.c (target_call_history): Change flags type.
11634 (target_call_history_from): Likewise.
11635 (target_call_history_range): Likewise.
11636 * target.h (struct target_ops) <target_call_history>: Likewise.
11637 (target_call_history_from): Likewise.
11638 (target_call_history_range): Likewise.
11640 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11641 Simon Marchi <simon.marchi@polymtl.ca>
11643 * common/common-utils.c: Include "sys/stat.h".
11644 (is_regular_file): Move here from "source.c"; change return
11646 * common/common-utils.h (is_regular_file): New prototype.
11647 * common/pathstuff.c (contains_dir_separator): New function.
11648 * common/pathstuff.h (contains_dir_separator): New prototype.
11649 * source.c: Don't include "sys/stat.h".
11650 (is_regular_file): Move to "common/common-utils.c".
11652 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11654 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11655 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11656 * auto-load.c: Include "common/pathstuff.h".
11657 * common/common-def.h (current_directory): Move here.
11658 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11660 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11662 * common/pathstuff.c: New file.
11663 * common/pathstuff.h: New file.
11664 * compile/compile.c: Include "common/pathstuff.h".
11665 * defs.h (current_directory): Move to "common/common-defs.h".
11666 * dwarf2read.c: Include "common/pathstuff.h".
11667 * exec.c: Likewise.
11668 * guile/scm-safe-call.c: Likewise.
11669 * linux-thread-db.c: Likewise.
11670 * main.c: Likewise.
11671 * nto-tdep.c: Likewise.
11672 * objfiles.c: Likewise.
11673 * source.c: Likewise.
11674 * symtab.c: Likewise.
11675 * utils.c: Include "common/pathstuff.h".
11676 (gdb_realpath): Move to "common/pathstuff.c".
11677 (gdb_realpath_keepfile): Likewise.
11678 (gdb_abspath): Likewise.
11679 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11680 (gdb_realpath_keepfile): Likewise.
11681 (gdb_abspath): Likewise.
11683 2018-02-28 John Baldwin <jhb@FreeBSD.org>
11685 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11686 wildcard process pid for super_resume for kernels with a
11689 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
11691 * compile/compile.c (get_args): Add additional comments
11692 explaining function.
11694 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
11695 Tom Tromey <tom@tromey.com>
11697 * target.h (memory_write_request_s): Remove typedef. Don't define
11699 (target_write_memory_blocks): Change argument to std::vector.
11700 (struct memory_write_request): Add constructor.
11701 * target-memory.c (compare_block_starting_address): Return bool.
11702 Change argument types.
11703 (claim_memory): Change arguments to use std::vector.
11704 (split_regular_and_flash_blocks, blocks_to_erase)
11705 (compute_garbled_blocks): Likewise.
11706 (cleanup_request_data, cleanup_write_requests_vector): Remove.
11707 (target_write_memory_blocks): Change argument to std::vector.
11708 * symfile.c (struct load_section_data): Add constructor and
11709 destructor. Use std::vector for "requests".
11710 (struct load_progress_data): Add initializers.
11711 (load_section_callback): Update. Use "new".
11712 (clear_memory_write_data): Remove.
11713 (generic_load): Update.
11715 2018-02-27 Alan Hayward <alan.hayward@arm.com>
11717 * arch/aarch64.h: Use common/tdesc.h.
11719 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11721 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11722 architecture with a 64-bit ABI.
11724 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11726 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11727 ahead of target description loading.
11729 2018-02-26 Tom Tromey <tom@tromey.com>
11731 * stack.c (backtrace_command_1): Update.
11732 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11734 * python/py-framefilter.c (py_print_frame)
11735 (gdbpy_apply_frame_filter): Change type of "flags".
11736 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11738 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11739 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11740 * extension.h (enum frame_filter_flag): Rename from
11741 frame_filter_flags.
11742 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11743 (apply_ext_lang_frame_filter): Change type of "flags".
11744 * extension.c (apply_ext_lang_frame_filter): Change type of
11746 * extension-priv.h (struct extension_language_ops)
11747 <apply_frame_filter>: Change type of "flags".
11749 2018-02-26 Tom Tromey <tom@tromey.com>
11752 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
11753 off-by-one in py_end computation.
11754 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11756 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11759 2018-02-26 Tom Tromey <tom@tromey.com>
11761 * dwarf2read.c (struct variant_field): New.
11762 (struct nextfield) <variant>: New field.
11763 (dwarf2_add_field): Handle DW_TAG_variant_part.
11764 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11765 discriminated union.
11766 (read_structure_type): Handle DW_TAG_variant_part.
11767 (handle_struct_member_die): New function, extracted from
11768 process_structure_scope. Handle DW_TAG_variant.
11769 (process_structure_scope): Handle discriminated unions. Call
11770 handle_struct_member_die.
11772 2018-02-26 Tom Tromey <tom@tromey.com>
11774 * rust-lang.h (rust_last_path_segment): Declare.
11775 * rust-lang.c (rust_last_path_segment): Now public. Change
11777 (struct disr_info): Remove.
11778 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11779 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11780 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11781 (rust_enum_p, rust_enum_variant): New function.
11782 (rust_underscore_fields): Remove "offset" parameter.
11783 (rust_print_enum): New function.
11784 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11785 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11786 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
11788 (rust_internal_print_type): New function, from rust_print_type.
11790 (rust_print_type): Call rust_internal_print_type.
11791 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11792 Update enum handling.
11793 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11794 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11795 (rust_union_quirks): New functions.
11796 (process_full_comp_unit, process_full_type_unit): Call
11798 (process_structure_scope): Update rust_unions if necessary.
11800 2018-02-26 Tom Tromey <tom@tromey.com>
11802 * value.h (value_union_variant): Declare.
11803 * valops.c (value_union_variant): New function.
11804 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11805 (struct discriminant_info): New.
11806 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11808 (struct main_type) <flag_discriminated_union>: New field.
11810 2018-02-26 Tom Tromey <tom@tromey.com>
11812 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11813 unittests/unpack-selftests.c.
11814 * unittests/unpack-selftests.c: New file.
11815 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11817 2018-02-26 Yao Qi <yao.qi@linaro.org>
11819 * dwarf2read.c (struct partial_die_info) <read>: New method.
11820 (read_partial_die): Remove the declaration.
11821 (load_partial_dies): Update.
11822 (partial_die_info::partial_die_info):
11823 (read_partial_die): Change it to partial_die_info::read.
11825 2018-02-26 Yao Qi <yao.qi@linaro.org>
11827 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11828 (fixup_partial_die): Remove declaration.
11829 (scan_partial_symbols): Update.
11830 (partial_die_parent_scope): Likewise.
11831 (partial_die_full_name): Likewise.
11832 (fixup_partial_die): Change it to partial_die_info::fixup.
11834 2018-02-26 Yao Qi <yao.qi@linaro.org>
11836 * dwarf2read.c (read_partial_die): Update the declaration.
11837 (load_partial_dies): Caller update.
11838 (read_partial_die): Remove one argument abbrev_len.
11840 2018-02-26 Yao Qi <yao.qi@linaro.org>
11842 * dwarf2read.c (struct partial_die_info): Add ctor, delete
11843 assignment operator.
11844 (load_partial_dies): Use ctor and copy ctor.
11845 (read_partial_die): Update.
11846 (dwarf2_cu::find_partial_die): Use ctor.
11848 2018-02-26 Yao Qi <yao.qi@linaro.org>
11850 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11851 (find_partial_die_in_comp_unit): Change it to
11852 dwarf2_cu::find_partial_die.
11853 (find_partial_die): Update.
11855 2018-02-26 Yao Qi <yao.qi@linaro.org>
11857 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11860 2018-02-26 Yao Qi <yao.qi@linaro.org>
11862 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11864 2018-02-26 Alan Hayward <alan.hayward@arm.com>
11866 * arch/amd64.h: Use common/tdesc.h.
11867 * arch/i386.c: Likewise.
11868 * arch/i386.h: Likewise.
11869 * arch/tic6x.c: Likewise.
11870 * arch/tdesc.h: Move file from here...
11871 * common/tdesc.h: ...to here.
11872 * features/aarch64-core.c: Regenerate.
11873 * features/aarch64-fpu.c: Regenerate.
11874 * features/i386/32bit-avx.c: Regenerate.
11875 * features/i386/32bit-avx512.c: Regenerate.
11876 * features/i386/32bit-core.c: Regenerate.
11877 * features/i386/32bit-linux.c: Regenerate.
11878 * features/i386/32bit-mpx.c: Regenerate.
11879 * features/i386/32bit-pkeys.c: Regenerate.
11880 * features/i386/32bit-sse.c: Regenerate.
11881 * features/i386/64bit-avx.c: Regenerate.
11882 * features/i386/64bit-avx512.c: Regenerate.
11883 * features/i386/64bit-core.c: Regenerate.
11884 * features/i386/64bit-linux.c: Regenerate.
11885 * features/i386/64bit-mpx.c: Regenerate.
11886 * features/i386/64bit-pkeys.c: Regenerate.
11887 * features/i386/64bit-segments.c: Regenerate.
11888 * features/i386/64bit-sse.c: Regenerate.
11889 * features/i386/x32-core.c: Regenerate.
11890 * features/tic6x-c6xp.c: Regenerate.
11891 * features/tic6x-core.c: Regenerate.
11892 * features/tic6x-gp.c: Regenerate.
11893 * target-descriptions.c: Use common/tdesc.h.
11894 * target-descriptions.h: Likewise.
11896 2018-02-24 Tom Tromey <tom@tromey.com>
11898 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11899 (try_thread_db_load_from_dir, thread_db_load_search): Use
11901 (info_auto_load_libthread_db_compare): Return bool. Change
11903 (info_auto_load_libthread_db): Use std::vector, std::string.
11906 2018-02-24 Tom Tromey <tom@tromey.com>
11908 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11910 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11912 * gdbarch.c: Rebuild.
11913 * gdbarch.h: Rebuild.
11914 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11915 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11916 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11919 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
11921 * gdbtypes.h (sect_offset): Change type to uint64_t.
11922 (sect_offset_str): New function.
11923 * dwarf2read.c (create_addrmap_from_aranges): Use
11925 (error_check_comp_unit_head): Likewise.
11926 (create_debug_type_hash_table): Likewise.
11927 (read_cutu_die_from_dwo): Likewise.
11928 (init_cutu_and_read_dies): Likewise.
11929 (init_cutu_and_read_dies_no_follow): Likewise.
11930 (process_psymtab_comp_unit_reader): Likewise.
11931 (partial_die_parent_scope): Likewise.
11932 (peek_die_abbrev): Likewise.
11933 (process_queue): Likewise.
11934 (dwarf2_physname): Likewise.
11935 (read_namespace_alias): Likewise.
11936 (read_import_statement): Likewise.
11937 (create_dwo_cu_reader): Likewise.
11938 (create_cus_hash_table): Likewise.
11939 (lookup_dwo_cutu): Likewise.
11940 (inherit_abstract_dies): Likewise.
11941 (read_func_scope): Likewise.
11942 (read_call_site_scope): Likewise.
11943 (dwarf2_add_member_fn): Likewise.
11944 (read_common_block): Likewise.
11945 (read_module_type): Likewise.
11946 (read_typedef): Likewise.
11947 (read_subrange_type): Likewise.
11948 (load_partial_dies): Likewise.
11949 (read_partial_die): Likewise.
11950 (find_partial_die): Likewise.
11951 (read_str_index): Likewise.
11952 (dwarf2_string_attr): Likewise.
11953 (build_error_marker_type): Likewise.
11954 (lookup_die_type): Likewise.
11955 (dump_die_shallow): Likewise.
11956 (follow_die_ref): Likewise.
11957 (dwarf2_fetch_die_loc_sect_off): Likewise.
11958 (dwarf2_fetch_constant_bytes): Likewise.
11959 (follow_die_sig): Likewise.
11960 (get_signatured_type): Likewise.
11961 (get_DW_AT_signature_type): Likewise.
11962 (dwarf2_find_containing_comp_unit): Likewise.
11963 (set_die_type): Likewise.
11965 2018-02-21 John Baldwin <jhb@FreeBSD.org>
11967 * arch/aarch64.c: Include "common-defs.h".
11968 * arch/amd64.c: Likewise.
11969 * arch/i386.c: Likewise.
11971 2018-02-21 Tom Tromey <tom@tromey.com>
11973 * value.h: (extract_field_op): Update.
11974 * eval.c (extract_field_op): Return a const char *.
11975 * expression.h (parse_expression_for_completion): Update.
11976 * completer.c (complete_expression): Update.
11977 (add_struct_fields): Make fieldname const.
11978 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11979 (mark_completion_tag, parse_exp_in_context_1): Update.
11980 (parse_expression_for_completion): Change "name" to
11981 unique_xmalloc_ptr*.
11983 2018-02-21 Tom Tromey <tom@tromey.com>
11985 * infcall.c (call_function_by_hand_dummy): Use std::vector.
11987 2018-02-21 Yao Qi <yao.qi@linaro.org>
11989 * avr-tdep.c (avr_read_pc): Change parameter type to
11991 * gdbarch.sh (read_pc): Likewise.
11992 * gdbarch.c: Re-generated.
11993 * gdbarch.h: Re-generated.
11994 * hppa-tdep.c (hppa_read_pc): Change parameter type to
11996 * ia64-tdep.c (ia64_read_pc): Likewise.
11997 * mips-tdep.c (mips_read_pc): Likewise.
11998 * spu-tdep.c (spu_read_pc): Likewise.
12000 2018-02-21 Yao Qi <yao.qi@linaro.org>
12002 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12003 * regcache-dump.c: New file.
12004 * regcache.c: Move register_dump to regcache-dump.c.
12005 (maintenance_print_registers): Likewise.
12006 (maintenance_print_raw_registers): Likewise.
12007 (maintenance_print_cooked_registers): Likewise.
12008 (maintenance_print_register_groups): Likewise.
12009 (maintenance_print_remote_registers): Likewise.
12010 (_initialize_regcache): Likewise.
12011 * regcache.h (register_dump): Moved from regcache.c.
12013 2018-02-21 Yao Qi <yao.qi@linaro.org>
12015 * regcache.c (regcache::regcache): Update.
12016 (regcache::invalidate): Move it to detached_regcache::invalidate.
12017 (get_thread_arch_aspace_regcache): Update.
12018 (regcache::raw_update): Update.
12019 (regcache::cooked_read): Remove some code.
12020 (regcache::cooked_read_value): Likewise.
12021 (regcache::raw_write): Remove assert on m_readonly_p.
12022 (regcache::raw_supply_integer): Move it to
12023 detached_regcache::raw_supply_integer.
12024 (regcache::raw_supply_zeroed): Likewise.
12025 * regcache.h (detached_regcache) <raw_supply_integer>: New
12027 <raw_supply_zeroed, invalidate>: Likewise.
12028 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12029 <invalidate>: Likewise.
12030 <m_readonly_p>: Removed.
12032 2018-02-21 Yao Qi <yao.qi@linaro.org>
12034 * infcmd.c (get_return_value): Let stop_regs point to
12035 get_current_regcache.
12036 * regcache.c (regcache::regcache): Remove.
12037 (register_dump_reg_buffer): New class.
12038 (regcache_print): Adjust.
12039 * regcache.h (regcache): Remove constructors.
12041 2018-02-21 Yao Qi <yao.qi@linaro.org>
12043 * regcache.c (class register_dump): New class.
12044 (register_dump_regcache, register_dump_none): New class.
12045 (register_dump_remote, register_dump_groups): New class.
12046 (regcache_print): Update.
12047 * regcache.h (regcache_dump_what): Move it to regcache.c.
12048 (regcache) <dump>: Remove.
12050 2018-02-21 Yao Qi <yao.qi@linaro.org>
12052 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12054 (jit_unwind_reg_set_impl): Call raw_supply.
12055 (jit_frame_sniffer): Use reg_buffer_rw.
12056 * record-full.c (record_full_core_regbuf): Change its type.
12057 (record_full_core_open_1): Use reg_buffer_rw.
12058 (record_full_close): Likewise.
12059 (record_full_core_fetch_registers): Use regcache->raw_supply.
12060 (record_full_core_store_registers): Likewise.
12061 * regcache.c (regcache::get_register_status): Move it to
12063 (regcache_raw_set_cached_value): Remove.
12064 (regcache::raw_set_cached_value): Remove.
12065 (regcache::raw_write): Call raw_supply.
12066 (regcache::raw_supply): Move it to reg_buffer_rw.
12067 * regcache.h (regcache_raw_set_cached_value): Remove.
12068 (reg_buffer_rw): New class.
12070 2018-02-21 Yao Qi <yao.qi@linaro.org>
12072 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12073 readonly_detached_regcache.
12074 (dummy_frame_prev_register): Use regcache->cooked_read.
12075 * frame.c (frame_save_as_regcache): Change return type.
12076 (frame_pop): Update.
12077 * frame.h (frame_save_as_regcache): Update declaration.
12078 * inferior.h (get_infcall_suspend_state_regcache): Update
12080 * infrun.c (infcall_suspend_state) <registers>: use
12081 readonly_detached_regcache.
12082 (save_infcall_suspend_state): Don't use regcache_dup.
12083 (get_infcall_suspend_state_regcache): Change return type.
12084 * linux-fork.c (struct fork_info) <savedregs>: Change to
12085 readonly_detached_regcache.
12087 (fork_save_infrun_state): Don't use regcache_dup.
12088 (info_checkpoints_command): Adjust.
12089 * mi/mi-main.c (register_changed_p): Update declaration.
12090 (mi_cmd_data_list_changed_registers): Use
12091 readonly_detached_regcache.
12092 (register_changed_p): Change parameter type to
12093 readonly_detached_regcache.
12094 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12095 readonly_detached_regcache.
12096 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12097 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12099 (regcache::save): Move it to reg_buffer.
12100 (regcache::restore): Change parameter type.
12101 (regcache_dup): Remove.
12102 * regcache.h (reg_buffer) <save>: New method.
12103 (readonly_detached_regcache): New class.
12104 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12105 readonly_detached_regcache.
12106 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12108 2018-02-21 Yao Qi <yao.qi@linaro.org>
12110 * frame.c (frame_save_as_regcache): Use regcache method save.
12111 (frame_pop): Use regcache method restore.
12112 * infrun.c (restore_infcall_suspend_state): Likewise.
12113 * linux-fork.c (fork_load_infrun_state): Likewise.
12114 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12116 * regcache.c (regcache_save): Remove.
12117 (regcache::restore): More asserts.
12118 (regcache_cpy): Remove.
12119 * regcache.h (regcache_save): Remove the declaration.
12120 (regcache::restore): Move from private to public.
12121 Remove the friend declaration of regcache_cpy.
12122 (regcache_cpy): Remove declaration.
12124 2018-02-21 Yao Qi <yao.qi@linaro.org>
12126 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12127 parameter type to 'readable_regcache *'.
12128 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12129 * arm-tdep.c (arm_neon_quad_read): Likewise.
12130 (arm_pseudo_read): Likewise.
12131 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12132 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12133 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12134 * gdbarch.c: Re-generated.
12135 * gdbarch.h: Re-generated.
12136 * gdbarch.sh (pseudo_register_read): Change parameter type to
12137 'readable_regcache *'.
12138 (pseudo_register_read_value): Likewise.
12139 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12140 (h8300_pseudo_register_read): Likewise.
12141 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12142 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12143 (i386_pseudo_register_read_into_value): Likewise.
12144 (i386_pseudo_register_read_value): Likewise.
12145 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12147 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12148 * m32c-tdep.c (m32c_raw_read): Likewise.
12149 (m32c_read_flg): Likewise.
12150 (m32c_banked_register): Likewise.
12151 (m32c_banked_read): Likewise.
12152 (m32c_sb_read): Likewise.
12153 (m32c_part_read): Likewise.
12154 (m32c_cat_read): Likewise.
12155 (m32c_r3r2r1r0_read): Likewise.
12156 (m32c_pseudo_register_read): Likewise.
12157 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12158 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12159 (mep_pseudo_cr64_read): Likewise.
12160 (mep_pseudo_register_read): Likewise.
12161 * mips-tdep.c (mips_pseudo_register_read): Likewise.
12162 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12163 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12164 * regcache.c (regcache::raw_read): Move it to readable_regcache.
12165 (regcache::cooked_read): Likewise.
12166 (regcache::cooked_read_value): Likewise.
12167 (regcache_cooked_read_signed):
12168 (regcache::cooked_read): Likewise.
12169 * regcache.h (readable_regcache): New class.
12170 (regcache): Inherit readable_regcache. Move some methods to
12172 * rl78-tdep.c (rl78_pseudo_register_read): Change
12173 parameter type to 'readable_regcache *'.
12174 * rs6000-tdep.c (do_regcache_raw_read): Remove.
12175 (e500_pseudo_register_read): Change parameter type to
12176 'readable_regcache *'.
12177 (dfp_pseudo_register_read): Likewise.
12178 (vsx_pseudo_register_read): Likewise.
12179 (efpr_pseudo_register_read): Likewise.
12180 * s390-tdep.c (s390_pseudo_register_read): Likewise.
12181 * sh-tdep.c (sh_pseudo_register_read): Likewise.
12182 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12183 (sh64_pseudo_register_read): Likewise.
12184 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12185 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12186 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12187 (spu_pseudo_register_read): Likewise.
12188 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12189 (xtensa_pseudo_register_read): Likewise.
12191 2018-02-21 Yao Qi <yao.qi@linaro.org>
12193 * regcache.c (regcache::regcache): Call reg_buffer ctor.
12194 (regcache::arch): Move it to reg_buffer::arch.
12195 (regcache::register_buffer): Likewise.
12196 (regcache::assert_regnum): Likewise.
12197 (regcache::num_raw_registers): Likewise.
12198 * regcache.h (reg_buffer): New class.
12199 (regcache): Inherit reg_buffer.
12201 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
12203 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12204 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12206 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
12208 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12210 2018-02-19 Alan Hayward <alan.hayward@arm.com>
12212 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12213 (SFILES): Remove common/*.c files.
12214 (COMMON_OBS): Remove some *.o files built from common/*.c files.
12215 * common/common.host: Add common reference.
12216 * configure.ac: Likewise.
12217 * configure: Regenerate.
12219 2018-02-16 Yao Qi <yao.qi@linaro.org>
12221 * block.c (block_namespace_info): Inherit allocate_on_obstack.
12222 (block_initialize_namespace): Use new.
12223 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12224 (dwarf2_free_objfile): Use delete.
12225 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12226 (copy_type_recursive): Use new.
12227 * gdb_obstack.h (allocate_on_obstack): New.
12229 2018-02-15 Yao Qi <yao.qi@linaro.org>
12232 * inferior.c (exit_inferior_1): Reset inf->control.
12234 2018-02-15 Joel Brobecker <brobecker@adacore.com>
12236 * ada-lang.c (ada_to_fixed_value_create): Delete advance
12239 2018-02-14 Pedro Alves <palves@redhat.com>
12241 * frame-unwind.c (frame_unwind_try_unwinder): Always call
12242 frame_cleanup_after_sniffer on exception.
12244 2018-02-14 Tom Tromey <tom@tromey.com>
12246 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12248 (solib_bfd_open): Make pathname const.
12249 * solib.c (solib_bfd_open): Make pathname const.
12250 * solib-spu.c (spu_bfd_fopen): Make name const.
12251 (spu_bfd_open): Make pathname const.
12252 * solib-darwin.c (darwin_bfd_open): Make pathname const.
12253 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12255 2018-02-14 Tom Tromey <tom@tromey.com>
12257 * symfile.c (symfile_bfd_open): Update.
12258 * source.h (openp, source_full_path_of, find_and_open_source):
12259 Change argument type to unique_xmalloc_ptr.
12260 * source.c (openp): Take a unique_xmalloc_ptr.
12261 (source_full_path_of, find_and_open_source): Likewise.
12262 (open_source_file, symtab_to_fullname): Update.
12263 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12264 unique_xmalloc_ptr.
12265 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12266 (exec_file_find): Update.
12267 * psymtab.c (psymtab_to_fullname): Update.
12268 * nto-tdep.h (nto_find_and_open_solib): Update.
12269 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12270 unique_xmalloc_ptr.
12271 * exec.c (exec_file_attach): Update.
12272 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12273 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12275 2018-02-14 Tom Tromey <tom@tromey.com>
12277 * solib.c: Include source.h.
12278 * nto-tdep.c: Include source.h.
12279 * mi/mi-cmd-env.c: Include source.h.
12280 * infcmd.c: Include source.h.
12281 * exec.c: Include source.h.
12282 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12283 (add_path, directory_switch, source_path, init_source_path): Move
12285 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12286 (add_path, directory_switch, source_path, init_source_path):
12289 2018-02-14 Tom Tromey <tom@tromey.com>
12291 * solist.h (exec_file_find, solib_find): Return
12292 unique_xmalloc_ptr.
12293 (solib_bfd_fopen): Take a const char *.
12294 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12295 (exec_file_find, solib_find): Likewise.
12296 (solib_bfd_fopen): Do not take ownership of "pathname".
12297 (solib_bfd_open): Use unique_xmalloc_ptr.
12298 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12299 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12300 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12301 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12303 2018-02-14 Joel Brobecker <brobecker@adacore.com>
12305 * ada-lang.c (name_match_type_from_name): Remove reference to
12306 ada_name_for_lookup in function's documentation.
12307 * ada-lang.h (ada_name_for_lookup): Delete declaration.
12309 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12311 * defs.h (enum openp_flags): New enum.
12312 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12313 Move to enum openp_flags.
12314 (openp_flags): New enum flags.
12315 (openp): Change parameter type to openp_flags.
12316 * source.c (openp): Change parameter type to openp_flags.
12317 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12318 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12320 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12322 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12325 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
12327 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12329 (class dwarf2_queue_guard): ...the destructor of this new class.
12330 (dw2_do_instantiate_symtab): Create instance of the new class
12331 dwarf2_queue_guard, remove cleanup.
12333 2018-02-09 Tom Tromey <tom@tromey.com>
12335 * source.c (find_source_lines): Don't reference past the end of
12338 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12340 * remote.c (remote_btrace_maybe_reopen): Change error message.
12341 * btrace.c (btrace_enable): Likewise.
12342 (parse_xml_btrace): Likewise.
12343 (parse_xml_btrace_conf): Likewise.
12345 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12347 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12348 (linux_enable_pt, linux_enable_bts): Call
12349 diagnose_perf_event_open_fail.
12351 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12353 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12354 Remove parameter and change return type. Update callers. Move it.
12355 (linux_enable_bts, linux_enable_pt): Improve error message.
12356 (linux_enable_pt): Remove zero buffer size check.
12357 (linux_enable_btrace): Improve error messages. Remove NULL return
12360 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12362 * btrace.c (btrace_enable): Remove target_supports_btrace call.
12363 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12364 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12365 (linux_supports_pt, linux_supports_btrace): Remove.
12366 (linux_enable_bts): Call cpu_supports_bts.
12367 * nat/linux-btrace.h (linux_supports_btrace): Remove.
12368 * remote.c (remote_supports_btrace): Remove.
12369 (init_remote_ops): Remove remote_supports_btrace.
12370 * target-delegates.c: Regenerated.
12371 * target.c (target_supports_btrace): Remove.
12372 * target.h (target_ops) <to_supports_btrace>: Remove
12373 (target_supports_btrace): Remove.
12374 * x86-linux-nat.c (x86_linux_create_target): Remove
12375 linux_supports_btrace.
12377 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12379 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12381 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12382 exception and use message in own exception.
12384 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12386 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12387 (perf_event_pt_event_type): Use gdb_file_up.
12388 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12389 scoped_fd, and scoped_mmap.
12391 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12393 * common/scoped_mmap.h: New.
12394 * unittests/scoped_mmap-selftest.c: New.
12395 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12396 unittests/scoped_mmap-selftest.c.
12398 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12400 * common/scoped_fd.h: New.
12401 * unittests/scoped_fd-selftest.c: New.
12402 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12403 unittests/scoped_fd-selftest.c.
12405 2018-02-09 Tom Tromey <tom@tromey.com>
12407 * auto-load.c (auto_load_section_scripts): Use
12408 gdb::unique_xmalloc_ptr.
12410 2018-02-09 Tom Tromey <tom@tromey.com>
12412 * auto-load.c (execute_script_contents): Use std::string.
12414 2018-02-09 Joel Brobecker <brobecker@adacore.com>
12416 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12417 Python function, rather than a new command.
12419 2018-02-08 Tom Tromey <tom@tromey.com>
12421 * solib.c (solib_find_1): Use std::string.
12422 (solib_bfd_fopen): Use unique_xmalloc_ptr.
12424 2018-02-08 Tom Tromey <tom@tromey.com>
12426 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12428 2018-02-08 Tom Tromey <tom@tromey.com>
12430 * source.c (find_source_lines): Use gdb::def_vector.
12432 2018-02-08 Tom Tromey <tom@tromey.com>
12434 * macrocmd.c (struct temporary_macro_definition): New.
12435 (macro_define_command): Use temporary_macro_definition. Remove
12437 (free_macro_definition_ptr): Remove.
12439 2018-02-08 Tom Tromey <tom@tromey.com>
12441 * macroexp.c (maybe_expand): Use std::string.
12443 2018-02-08 Tom Tromey <tom@tromey.com>
12445 * macroexp.c (struct macro_buffer): Add initializers for some
12447 (init_buffer, init_shared_buffer, free_buffer)
12448 (free_buffer_return_text): Remove.
12449 (macro_buffer): New constructors.
12450 (~macro_buffer): New destructor.
12451 (macro_buffer::set_shared): New method.
12452 (macro_buffer::resize_buffer, macro_buffer::appendc)
12453 (macro_buffer::appendmem): Now methods, not free functions.
12454 (set_token, append_tokens_without_splicing, stringify)
12455 (macro_stringify): Update.
12456 (gather_arguments): Change return type. Remove argc_p argument,
12457 add args_ptr argument. Use std::vector.
12458 (substitute_args): Remove argc argument. Accept std::vector.
12459 (expand): Update. Use std::vector.
12460 (scan, macro_expand, macro_expand_next): Update.
12462 2018-02-08 Tom Tromey <tom@tromey.com>
12464 * symtab.c (default_collect_symbol_completion_matches_break_on):
12465 Use unique_xmalloc_ptr.
12466 * macroscope.h: (sal_macro_scope, user_macro_scope)
12467 (default_macro_scope): Return unique_xmalloc_ptr.
12468 * macroscope.c (sal_macro_scope, user_macro_scope)
12469 (default_macro_scope): Return unique_xmalloc_ptr.
12470 * macroexp.h (macro_expand, macro_expand_once): Return
12471 unique_xmalloc_ptr.
12472 * macroexp.c (macro_expand, macro_expand_once): Return
12473 unique_xmalloc_ptr.
12474 * macrocmd.c (macro_expand_command, macro_expand_once_command)
12475 (info_macro_command, info_macros_command): Use
12476 unique_xmalloc_ptr.
12477 * compile/compile-c-support.c (write_macro_definitions): Use
12478 unique_xmalloc_ptr.
12479 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12481 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
12483 * value.c (value_static_field): Assign field type instead of
12484 containing type when returning an optimized out value.
12486 2018-02-06 Yao Qi <yao.qi@linaro.org>
12488 * ft32-tdep.c (ft32_read_pc): Remove.
12489 (ft32_write_pc): Remove.
12490 (ft32_gdbarch_init): Update.
12491 * m32r-tdep.c (m32r_read_pc): Remove.
12492 (m32r_gdbarch_init): Update.
12493 * mep-tdep.c (mep_read_pc): Remove.
12494 (mep_gdbarch_init): Update.
12495 * microblaze-tdep.c (microblaze_write_pc): Remove.
12496 (microblaze_gdbarch_init): Update.
12497 * mn10300-tdep.c (mn10300_read_pc): Remove.
12498 (mn10300_write_pc): Remove.
12499 (mn10300_gdbarch_init): Update.
12500 * moxie-tdep.c (moxie_read_pc): Remove.
12501 (moxie_write_pc): Remove.
12502 (moxie_gdbarch_init): Update.
12504 2018-02-06 Yao Qi <yao.qi@linaro.org>
12506 * expprint.c (print_subexp_standard): Handle
12507 OP_F77_UNDETERMINED_ARGLIST.
12508 (dump_subexp_body_standard): Likewise.
12510 2018-02-05 Alan Hayward <alan.hayward@arm.com>
12512 * target-descriptions.c (tdesc_element_visitor) Add empty
12514 (tdesc_type): Move make_gdb_type from here.
12515 (tdesc_type_builtin): Likewise.
12516 (tdesc_type_vector): Likewise.
12517 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12518 (make_gdb_type_struct): Move from tdesc_type_with_fields.
12519 (make_gdb_type_union): Likewise.
12520 (make_gdb_type_flags): Likewise.
12521 (make_gdb_type_enum): Likewise.
12522 (make_gdb_type): New function.
12523 (tdesc_register_type): Use static make_gdb_type.
12525 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
12527 * infcmd.c (default_print_one_register_info): Align natural-format
12528 column values consistently one under another.
12529 (pad_to_column): New function.
12531 2018-02-05 Joel Brobecker <brobecker@adacore.com>
12533 * dwarf2read.c (dwarf2_physname): Move commment.
12535 2018-02-01 Leszek Swirski <leszeks@google.com>
12537 * varobj.c (varobj_formatted_print_options): Allow recursive
12538 pretty printing if pretty printing is enabled.
12540 2018-02-01 Leszek Swirski <leszeks@google.com>
12542 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12543 names after a structop as a filename.
12545 2018-02-01 Yao Qi <yao.qi@linaro.org>
12547 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12548 (arm_record_coproc_data_proc): Likewise.
12550 2018-02-01 Yao Qi <yao.qi@linaro.org>
12552 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12554 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
12556 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12557 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12559 2018-01-31 Pedro Alves <palves@redhat.com>
12561 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12562 * inflow.c (child_terminal_save_inferior): Wrap reference to
12563 tcgetpgrp in HAVE_TERMIOS_H.
12564 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12566 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12567 always iterate over all inferiors.
12568 (gdbsim_cntrl_c): Adjust.
12569 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12571 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12573 * gdbtypes.c (lookup_array_range_type): Make sure the array's
12574 index type is objfile-owned if the element type is as well.
12576 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12580 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
12582 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12583 "features/s390x-linux64.c".
12584 (_initialize_s390_linux_tdep): Remove initialization of tdescs
12585 s390_linux32 and s390x_linux64.
12586 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12588 * s390-tdep.c: Include "features/s390-linux32.c" and
12589 "features/s390x-linux64.c".
12590 (s390_tdesc_valid): Add check for tdesc_has_registers.
12591 (s390_gdbarch_init): Make sure there is always a valid tdesc.
12592 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12593 tdesc_s390x_linux64.
12594 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12595 tdesc_s390x_linux64 to...
12596 * s390-tdep.h: ...here.
12598 2018-01-30 Pedro Alves <palves@redhat.com>
12601 * config.in, configure: Regenerate.
12602 * configure.ac: Check for getpgid.
12603 * go32-nat.c (go32_pass_ctrlc): New.
12604 (go32_target): Install it.
12605 * inf-child.c (inf_child_target): Install
12606 child_terminal_save_inferior, child_pass_ctrlc and
12608 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12609 (inf_ptrace_target): No longer install it.
12610 * infcmd.c (interrupt_target_1): Adjust.
12611 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12612 (child_interrupt): Declare.
12613 (inferior::terminal_state): New.
12614 * inflow.c (struct terminal_info): Update comments.
12615 (inferior_process_group): Delete.
12616 (terminal_is_ours): Delete.
12617 (gdb_tty_state): New.
12618 (child_terminal_init): Adjust.
12619 (is_gdb_terminal, sharing_input_terminal_1)
12620 (sharing_input_terminal): New functions.
12621 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
12622 Set the process's actual process group in the foreground if
12623 possible. Handle is_ours_for_output/is_ours distinction. Don't
12624 mark terminal as the inferior's if not sharing GDB's terminal.
12625 Don't check attach_flag.
12626 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12627 pass down a target_terminal_state.
12628 (child_terminal_save_inferior): New, factored out from ...
12629 (child_terminal_ours_1): ... this. Handle
12630 target_terminal_state::is_ours_for_output.
12631 (child_interrupt, child_pass_ctrlc): New.
12632 (inflow_inferior_exit): Clear the inferior's terminal_state.
12633 (copy_terminal_info): Copy the inferior's terminal state.
12634 (_initialize_inflow): Remove reference to terminal_is_ours.
12635 * inflow.h (inferior_process_group): Delete.
12636 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12637 * procfs.c (procfs_target): Don't install procfs_interrupt.
12638 (procfs_interrupt): Delete.
12639 * remote.c (remote_serial_quit_handler): Adjust.
12640 (remote_interrupt): Remove ptid parameter. Adjust.
12641 * target-delegates.c: Regenerate.
12642 * target.c: Include "terminal.h".
12643 (target_terminal::terminal_state): Rename to ...
12644 (target_terminal::m_terminal_state): ... this.
12645 (target_terminal::init): Adjust.
12646 (target_terminal::inferior): Adjust to per-inferior
12648 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12649 (target_terminal::ours, target_terminal::ours_for_output): Use
12650 target_terminal_is_ours_kind.
12651 (target_interrupt): Remove ptid parameter. Adjust.
12652 (default_target_pass_ctrlc): Adjust.
12653 * target.h (target_ops::to_terminal_save_inferior): New field.
12654 (target_ops::to_interrupt): Remove ptid_t parameter.
12655 (target_interrupt): Remove ptid_t parameter. Update comment.
12656 (target_pass_ctrlc): Update comment.
12657 * target/target.h (target_terminal_state): New scoped enum,
12658 factored out of ...
12659 (target_terminal::terminal_state): ... here.
12660 (target_terminal::inferior): Update comments.
12661 (target_terminal::restore_inferior): New.
12662 (target_terminal::is_inferior, target_terminal::is_ours)
12663 (target_terminal::is_ours_for_output): Adjust.
12664 (target_terminal::scoped_restore_terminal_state): Adjust to
12665 rename, and call restore_inferior() instead of inferior().
12666 (target_terminal::scoped_restore_terminal_state::m_state): Change
12668 (target_terminal::terminal_state): Rename to ...
12669 (target_terminal::m_terminal_state): ... this and change type.
12671 2018-01-30 Pedro Alves <palves@redhat.com>
12673 * linux-nat.c (wait_for_signal): New function.
12674 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12676 (async_terminal_is_ours)
12677 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12678 (linux_nat_add_target): Don't override
12679 to_terminal_inferior/to_terminal_ours.
12681 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
12683 * remote.c (remote_follow_fork): Don't call "detach_inferior".
12685 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
12687 * dwarf2read.c (free_dwo_files): Add forward-declaration.
12688 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12689 dwarf2_per_objfile_free here.
12690 (dwarf2_per_objfile_free): Remove.
12691 (_initialize_dwarf2_read): Don't register
12692 dwarf2_per_objfile_free as a registry cleanup.
12694 2018-01-27 Eli Zaretskii <eliz@gnu.org>
12696 Avoid compilation errors in MinGW native builds
12698 The error is triggered by including python-internal.h, and the
12701 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12702 from build-gnulib/import/math.h:27,
12703 from d:/usr/Python26/include/pyport.h:235,
12704 from d:/usr/Python26/include/Python.h:58,
12705 from python/python-internal.h:94,
12706 from python/py-arch.c:24:
12707 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12711 This happens because Python headers define 'hypot' to expand t
12712 '_hypot' in the Windows builds.
12713 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12714 'hypoth'. This avoids a compilation error.
12716 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12718 * MAINTAINERS (Write After Approval): Fix ordering.
12720 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12722 * MAINTAINERS (Write After Approval): Add Alan Hayward.
12724 2018-01-26 Alan Modra <amodra@gmail.com>
12726 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12727 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12728 Remove nop. Make const. Comment.
12729 (powerpc32_plt_stub_so_2): New.
12730 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12731 Correct count. Update uses.
12732 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12733 Move common code reading PLT entry word. Correct
12734 powerpc32_plt_stub PLT address calculation.
12735 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12736 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12737 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12738 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12739 (ppc64_standard_linkage8): Likewise.
12740 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12741 Correct insns description.
12742 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12744 2018-01-24 Pedro Alves <palves@redhat.com>
12746 GCC PR libstdc++/83906
12747 * gdbtypes.c (operator==(const dynamic_prop &,
12748 const dynamic_prop &)): New.
12749 (operator==(const range_bounds &, const range_bounds &)): New.
12750 (check_types_equal): Use them instead of memcmp.
12751 * gdbtypes.h (operator==(const dynamic_prop &,
12752 const dynamic_prop &)): Declare.
12753 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12754 (operator==(const range_bounds &, const range_bounds &)): Declare.
12755 (operator!=(const range_bounds &, const range_bounds &)): Declare.
12757 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12759 * s390-linux-tdep.c (s390_record_address_mask)
12760 (s390_record_calc_disp_common, s390_record_calc_disp)
12761 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12762 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12763 (s390_process_record): Move to s390-tdep.c.
12764 (s390_linux_init_abi_any): Adjust.
12765 * s390-tdep.c (s390_record_address_mask)
12766 (s390_record_calc_disp_common, s390_record_calc_disp)
12767 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12768 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12769 (s390_process_record): Moved from s390-linux-tdep.c
12770 (s390_gdbarch_init): Adjust.
12772 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12774 * s390-linux-nat.c (s390-tdep.h): New include.
12775 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12776 (HFILES_NO_SRCDIR): Add s390-tdep.h.
12777 (ALLDEPFILES): Add s390-tdep.c.
12778 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12779 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12780 * s390-tdep.h: ...this. New file.
12781 * s390-linux-tdep.c (s390-tdep.h): New include.
12782 (_initialize_s390_tdep): Rename to...
12783 (_initialize_s390_linux_tdep): ...this and adjust.
12784 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12785 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12787 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12788 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12789 (s390_is_partial_instruction, s390_software_single_step)
12790 (is_non_branch_ril, s390_displaced_step_copy_insn)
12791 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12792 (s390_prologue_data, s390_addr, s390_store, s390_load)
12793 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12794 (s390_register_call_saved, s390_guess_tracepoint_registers)
12795 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12796 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12797 (s390_pseudo_register_name, s390_pseudo_register_type)
12798 (s390_pseudo_register_read, s390_pseudo_register_write)
12799 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12800 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12801 (s390_addr_bits_remove, s390_address_class_type_flags)
12802 (s390_address_class_type_flags_to_name)
12803 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12804 (s390_function_arg_float, s390_function_arg_vector)
12805 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12806 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12807 (s390_frame_align, s390_register_return_value, s390_return_value)
12808 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12809 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12810 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12811 (s390_trad_frame_prev_register, s390_unwind_cache)
12812 (s390_prologue_frame_unwind_cache)
12813 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12814 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12815 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12816 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12817 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12818 (s390_frame_base_address, s390_local_base_address)
12819 (s390_frame_base, s390_gcc_target_options)
12820 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12821 (s390_validate_reg_range, s390_tdesc_valid)
12822 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12823 * s390-tdep.c: ...this. New file.
12825 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12827 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12828 (s390_process_record, s390_gdbarch_tdep_alloc)
12829 (s390_linux_init_abi_any): Use/set new hook.
12831 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12833 * s390-linux-tdep.c (osabi.h): New include.
12834 (s390_linux_init_abi_31, s390_linux_init_abi_64)
12835 (s390_linux_init_abi_any): New functions.
12836 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12838 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12840 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12841 tdesc_has_registers check
12843 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12845 * s390-linux-tdep.c (s390_tdesc_valid): New function.
12846 (s390_validate_reg_range): New macro.
12847 (s390_gdbarch_init): Adjust.
12849 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12851 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12852 (s390_gdbarch_tdep_alloc): Adjust.
12853 (s390_gdbarch_init): Adjust.
12855 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12857 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12858 <have_tdb>: Change type to bool.
12859 (s390_gdbarch_tdep_alloc): Adjust.
12860 (s390_gdbarch_init): Adjust.
12862 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12864 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12865 (gdbarch_tdep) <have_upper, have_vx>: New fields.
12866 (s390_gdbarch_tdep_alloc): New function.
12867 (s390_gdbarch_init): Allocate tdep at start and use its fields
12868 instead of separate variables.
12870 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12872 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12873 when looking for cached gdbarch and add comment for remaining.
12875 2018-01-22 Pedro Alves <palves@redhat.com>
12876 Sergio Durigan Junior <sergiodj@redhat.com>
12878 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12881 2018-01-22 Maciej W. Rozycki <macro@mips.com>
12883 * MAINTAINERS: Update my company e-mail address.
12885 2018-01-22 Yao Qi <yao.qi@linaro.org>
12887 * regcache.c (cooked_write_test): New function.
12888 (_initialize_regcache): Register the test.
12890 2018-01-22 Yao Qi <yao.qi@linaro.org>
12892 * ia64-tdep.c (ia64_pseudo_register_read): Call
12893 regcache->cooked_read instead of regcache_cooked_read_unsigned.
12894 * m32c-tdep.c (m32c_cat_read): Likewise.
12895 (m32c_r3r2r1r0_read): Likewise.
12896 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12897 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12899 2018-01-22 Yao Qi <yao.qi@linaro.org>
12901 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12902 method raw_read instead of regcache_raw_read.
12903 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12904 * arm-tdep.c (arm_neon_quad_read): Likewise.
12905 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12906 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12907 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12908 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12909 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12910 (i386_pseudo_register_read_into_value): Likewise.
12911 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12912 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12913 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12914 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12915 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12916 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12917 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12918 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12919 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12921 2018-01-22 Yao Qi <yao.qi@linaro.org>
12923 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12924 * configure.tgt: Remove target mt.
12925 * mt-tdep.c: Remove.
12926 * regcache.c (cooked_read_test): Remove the check for mt.
12928 2018-01-22 Yao Qi <yao.qi@linaro.org>
12930 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12931 instead of gdbarch_pseudo_register_read_value.
12933 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12935 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12938 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12940 * linespec.c (create_sals_line_offset): Remove code that preserved
12941 the symtab_and_line's line number.
12943 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12945 * varobj.c (varobj_create): Don't set valid_block when creating a
12948 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12950 * varobj.c (varobj_create): Remove out of date comment.
12952 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12955 * ada-exp.y (write_var_from_sym): Pass extra parameter when
12956 updating innermost block.
12957 * parse.c (innermost_block_tracker::update): Take extra type
12958 parameter, and check types match before updating innermost block.
12959 (write_dollar_variable): Update innermost block for registers.
12960 * parser-defs.h (enum innermost_block_tracker_type): New enum.
12961 (innermost_block_tracker::innermost_block_tracker): Initialise
12963 (innermost_block_tracker::reset): Take type parameter.
12964 (innermost_block_tracker::update): Take type parameter, and pass
12965 type through as needed.
12966 (innermost_block_tracker::m_types): New member.
12967 * varobj.c (varobj_create): Pass type when reseting innermost
12970 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12972 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12973 * ada-lang.c (resolve_subexp): Likewise.
12974 * breakpoint.c (set_breakpoint_condition) Likewise.
12975 (watch_command_1) Likewise.
12976 * c-exp.y (variable): Likewise.
12977 * d-exp.y (PrimaryExpression): Likewise.
12978 * f-exp.y (variable): Likewise.
12979 * go-exp.y (variable): Likewise.
12980 * m2-exp.y (variable): Likewise.
12981 * objfiles.c (objfile::~objfile): Likewise.
12982 * p-exp.y (variable): Likewise.
12983 * parse.c (innermost_block): Change type.
12984 * parser-defs.h (class innermost_block_tracker): New.
12985 (innermost_block): Change to innermost_block_tracker.
12986 * printcmd.c (display_command): Switch to innermost_block API.
12987 (do_one_display): Likewise.
12988 * rust-exp.y (do_one_display): Likewise.
12989 * symfile.c (clear_symtab_users): Likewise.
12990 * varobj.c (varobj_create): Switch to innermost_block API, replace
12991 use of innermost_block with block stored on varobj object.
12993 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12995 * expression.h (innermost_block): Remove declaration.
12996 * varobj.c: Add 'parser-defs.h' include.
12998 2018-01-19 Tom Tromey <tom@tromey.com>
13000 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13001 symbols in the static and global blocks.
13003 2018-01-19 James Clarke <jrtc27@jrtc27.com>
13005 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13006 gdb_ptrace.h, and move including gdb_wait.h ...
13007 * nat/linux-ptrace.h: ... to here.
13009 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13011 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13012 inf_ptrace_detach_success.
13013 (inf_ptrace_detach_success): Add inferior parameter, use it
13014 instead of inferior_ptid, pass it to detach_inferior.
13015 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13017 * inferior.c (detach_inferior): Add overload that takes an
13019 * inferior.h (detach_inferior): Likewise.
13020 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13021 use inferior_ptid, adjust call to inf_ptrace_detach_success.
13022 * linux-thread-db.c (thread_db_detach): Use inf parameter.
13024 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13026 * target.h (struct target_ops) <to_detach>: Add inferior
13028 (target_detach): Likewise.
13029 * target.c (dispose_inferior): Pass inferior down.
13030 (target_detach): Pass inferior down. Assert that it is equal to
13031 the current inferior.
13032 * aix-thread.c (aix_thread_detach): Pass inferior down.
13033 * corefile.c (core_file_command): Pass current_inferior() down.
13034 * corelow.c (core_detach): Add inferior parameter.
13035 * darwin-nat.c (darwin_detach): Likewise.
13036 * gnu-nat.c (gnu_detach): Likewise.
13037 * inf-ptrace.c (inf_ptrace_detach): Likewise.
13038 * infcmd.c (detach_command): Pass current_inferior() down to
13040 * infrun.c (follow_fork_inferior): Pass parent_inf to
13042 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13044 * linux-nat.c (linux_nat_detach): Add inferior parameter.
13045 * linux-thread-db.c (thread_db_detach): Likewise.
13046 * nto-procfs.c (procfs_detach): Likewise.
13047 * procfs.c (procfs_detach): Likewise.
13048 * record.c (record_detach): Likewise.
13049 * record.h (struct inferior): Forward-declare.
13050 (record_detach): Add inferior parameter.
13051 * remote-sim.c (gdbsim_detach): Likewise.
13052 * remote.c (remote_detach_1): Likewise.
13053 (remote_detach): Likewise.
13054 (extended_remote_detach): Likewise.
13055 * sol-thread.c (sol_thread_detach): Likewise.
13056 * target-debug.h (target_debug_print_inferior_p): New macro.
13057 * target-delegates.c: Re-generate.
13058 * top.c (kill_or_detach): Pass inferior down to target_detach.
13059 * windows-nat.c (windows_detach): Add inferior parameter.
13061 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13063 * target.h (struct target_ops) <to_detach>: Remove args
13065 (target_detach): Likewise.
13066 * target.c (dispose_inferior): Adjust.
13067 (target_detach): Remove args parameter, adjust.
13068 * aix-thread.c (aix_thread_detach): Adjust.
13069 * corefile.c (core_file_command): Adjust.
13070 * corelow.c (core_detach): Adjust.
13071 * darwin-nat.c (darwin_detach): Adjust.
13072 * gnu-nat.c (gnu_detach): Adjust.
13073 * inf-ptrace.c (inf_ptrace_detach): Adjust.
13074 * infcmd.c (detach_command): Adjust
13075 * infrun.c (follow_fork_inferior): Adjust.
13076 (handle_vfork_child_exec_or_exit): Adjust.
13077 * linux-fork.c (linux_fork_detach): Remove args parameter.
13078 * linux-fork.h (linux_fork_detach): Likewise.
13079 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13080 * linux-thread-db.c (thread_db_detach): Likewise.
13081 * nto-procfs.c (procfs_detach): Likewise.
13082 * procfs.c (procfs_detach): Likewise.
13083 (do_detach): Remove signo parameter.
13084 * record.c (record_detach): Remove args parameter.
13085 * record.h (record_detach): Likewise.
13086 * remote-sim.c (gdbsim_detach): Likewise.
13087 * remote.c (remote_detach_1): Likewise.
13088 (remote_detach): Likewise.
13089 (extended_remote_detach): Likewise.
13090 * sol-thread.c (sol_thread_detach): Likewise.
13091 * target-delegates.c: Re-generate.
13092 * top.c (struct qt_args) <args>: Remove field.
13093 (kill_or_detach): Don't pass args.
13094 (quit_force): Don't set args.
13095 * windows-nat.c (windows_detach): Remove args parameter.
13097 2018-01-19 Yao Qi <yao.qi@linaro.org>
13099 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13100 (arm_linux_init_abi): Install it.
13102 2018-01-19 Yao Qi <yao.qi@linaro.org>
13104 * osabi.c (gdb_osabi_names): Extend the regexp for
13105 arm-linux-gnueabihf.
13107 2018-01-18 Yao Qi <yao.qi@linaro.org>
13109 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13111 (abbrev_table::add_abbrev): Update.
13112 (abbrev_table::lookup_abbrev): Update.
13114 2018-01-18 Yao Qi <yao.qi@linaro.org>
13116 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13118 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
13120 * compile/compile.c (compile_to_object): Convert "triplet_rx"
13123 2018-01-17 Tom Tromey <tom@tromey.com>
13125 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
13127 2018-01-17 Tom Tromey <tom@tromey.com>
13129 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13130 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13131 (create_array_type_with_stride): Update.
13132 * dwarf2read.c (set_die_type): Update.
13134 2018-01-17 Tom Tromey <tom@tromey.com>
13136 * dwarf2read.c (delayed_method_info): Remove typedef.
13137 (dwarf2_cu::method_info): Now a std::vector.
13138 (add_to_method_list): Update.
13139 (free_delayed_list): Remove.
13140 (compute_delayed_physnames): Update.
13141 (process_full_comp_unit, process_full_type_unit): Clear the method
13142 list. Remove cleanups.
13143 (psymtab_include_file_name): Add name_holder parameter. Use
13144 unique_xmalloc_ptr.
13145 (dwarf_decode_lines): Update.
13147 2018-01-17 Tom Tromey <tom@tromey.com>
13148 Simon Marchi <simon.marchi@ericsson.com>
13150 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13151 (dwarf2_per_objfile::free_cached_comp_units)
13152 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13153 (init_cutu_and_read_dies_no_follow): Update.
13154 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13155 (dwarf2_cu::~dwarf2_cu): New.
13156 (free_heap_comp_unit, free_stack_comp_unit): Remove.
13157 (age_cached_comp_units, free_one_cached_comp_unit): Update.
13159 2018-01-17 Tom Tromey <tom@tromey.com>
13160 Simon Marchi <simon.marchi@ericsson.com>
13162 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13163 (struct die_reader_specs) <abbrev_table>: New member.
13164 (struct abbrev_table): Add constructor.
13165 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13166 <abbrev_obstack>: Now an auto_obstack.
13167 (abbrev_table_up): New typedef.
13168 (init_cu_die_reader): Add abbrev_table parameter.
13169 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13170 Add result_dwo_abbrev_table.
13171 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13172 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13174 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13176 (skip_children): Update.
13177 (abbrev_table::alloc_abbrev): Rename from
13178 abbrev_table_alloc_abbrev.
13179 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13180 (abbrev_table::lookup_abbrev): Rename from
13181 abbrev_table_lookup_abbrev.
13182 (abbrev_table_read_table): Return abbrev_table_up.
13183 (abbrev_table_free, abbrev_table_free_cleanup)
13184 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13185 (load_partial_dies): Update.
13187 2018-01-17 Tom Tromey <tom@tromey.com>
13189 * dwarf2read.c (dwarf2_compute_name): Update comment.
13190 (read_func_scope, read_variable): Update.
13191 (new_symbol): Remove.
13192 (new_symbol_full): Rename to new_symbol.
13194 2018-01-17 Mike Gulick <mgulick@mathworks.com>
13197 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13198 a warning instead of throwing an error, set section size to 0 and return
13200 * gdb_bfd.h (gdb_bfd_map_section): Update description.
13202 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13204 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13206 (linux_ptrace_attach_fail_reason_string): Likewise.
13207 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13209 (linux_ptrace_attach_fail_reason_string): Likewise.
13210 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13212 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13214 * linux-nat.c (linux_nat_attach): Remove xstrdup.
13216 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
13219 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13220 checking for fs_base/gs_base fields in struct user_regs_struct.
13221 * configure: Regenerate.
13223 2018-01-17 Yao Qi <yao.qi@linaro.org>
13225 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13227 (aarch64_linux_init_abi): Install it to gdbarch hook
13228 gcc_target_options.
13230 2018-01-15 Pedro Alves <palves@redhat.com>
13232 * common/signals-state-save-restore.c
13233 (save_original_signals_state): Fix typos.
13235 2017-01-12 Tom Tromey <tom@tromey.com>
13236 Sergio Durigan Junior <sergiodj@redhat.com>
13238 * Makefile.in (install-only): Install gdb-add-index.
13240 2018-01-12 John Baldwin <jhb@FreeBSD.org>
13242 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13244 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
13246 * infrun.c (keep_going_pass_signal): Clear step-over info when
13247 insert_breakpoints fails.
13249 2018-01-11 Pedro Alves <palves@redhat.com>
13252 * infrun.c (resume): Rename to ...
13253 (resume_1): ... this.
13254 (resume): Reimplement as wrapper around resume_1.
13256 2018-01-11 Pedro Alves <palves@redhat.com>
13259 * remote.c (remote_parse_stop_reply): Default to the last-set
13260 general thread instead of to 'magic_null_ptid'.
13262 2018-01-10 Pedro Alves <palves@redhat.com>
13264 * language.h (language_get_symbol_name_matcher): Rename ...
13265 (get_symbol_name_matcher): ... this.
13266 * language.c (language_get_symbol_name_matcher): Ditto.
13267 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13270 2018-01-10 Pedro Alves <palves@redhat.com>
13274 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13275 Adjust to use language_get_symbol_name_matcher instead of
13276 language_defn::la_get_symbol_name_matcher.
13277 * language.c (language_get_symbol_name_matcher): If in Ada mode
13278 and the lookup name is a verbatim match, return Ada's matcher.
13279 * language.h (language_get_symbol_name_matcher): Adjust comment.
13280 (ada_lookup_name_info::verbatim_p):: New method.
13282 2018-01-10 Pedro Alves <palves@redhat.com>
13285 * ada-lang.c (ada_collect_symbol_completion_matches): If the
13286 minsym's language is language_auto or language_cplus, pass down
13287 language_ada instead.
13288 * symtab.c (compare_symbol_name): Don't frob symbol language here.
13290 2018-01-10 Pedro Alves <palves@redhat.com>
13293 * minsyms.c (linkage_name_str): New function.
13294 (iterate_over_minimal_symbols): Use it.
13296 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13298 * NEWS: Document that 'info proc' now works on FreeBSD.
13300 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13302 * configure.ac: Check for kinfo_getfile in libutil.
13303 * configure: Regenerate.
13304 * config.in: Regenerate.
13305 * fbsd-nat.c: Include "fbsd-tdep.h".
13306 (fbsd_fetch_cmdline): New.
13307 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13308 rather than calling error.
13309 (fbsd_info_proc): New.
13310 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13311 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13312 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13314 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13316 * fbsd-nat.c (struct free_deleter): Remove.
13317 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13319 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13321 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13322 NULL for an empty pathname.
13324 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13326 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13327 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13328 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13329 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13330 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13331 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13332 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13333 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13334 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13335 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13336 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13337 (fbsd_core_fetch_timeval, fbsd_print_sigset)
13338 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13339 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
13340 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13342 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
13344 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13345 (gnu_xfer_auxv): New function.
13346 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13347 TARGET_OBJECT_AUXV.
13349 2018-01-08 Yao Qi <yao.qi@linaro.org>
13350 Simon Marchi <simon.marchi@ericsson.com>
13352 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13354 (COMMON_OBS): Remove selftest.o.
13355 * configure.ac: Append selftest-arch.c and common/selftest.c to
13356 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
13357 * configure: Re-generated.
13358 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13360 (maintenance_info_selftests): Likewise.
13362 2018-01-08 Xavier Roirand <roirand@adacore.com>
13364 * ada-valprint.c (val_print_packed_array_elements): Use
13365 proper number of elements when printing an array indexed
13366 by an enumeration type.
13368 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13370 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13371 (dw2_get_file_names_reader): Adjust.
13372 (lookup_dwo_signatured_type): Adjust.
13373 (lookup_dwp_signatured_type): Adjust.
13374 (lookup_signatured_type): Adjust.
13375 (create_type_unit_group): Adjust.
13376 (get_type_unit_group): Adjust.
13377 (process_psymtab_comp_unit_reader): Adjust.
13378 (build_type_psymtabs_reader): Adjust.
13379 (scan_partial_symbols): Adjust.
13380 (add_partial_symbol): Adjust.
13381 (add_partial_subprogram): Adjust.
13382 (peek_die_abbrev): Adjust.
13383 (fixup_go_packaging): Adjust.
13384 (process_imported_unit_die): Adjust.
13385 (dwarf2_compute_name): Adjust.
13386 (dwarf2_physname): Adjust.
13387 (read_import_statement): Adjust.
13388 (handle_DW_AT_stmt_list): Adjust.
13389 (read_file_scope): Adjust.
13390 (read_func_scope): Adjust.
13391 (read_lexical_block_scope): Adjust.
13392 (read_call_site_scope): Adjust.
13393 (read_variable): Adjust.
13394 (dwarf2_rnglists_process): Adjust.
13395 (dwarf2_ranges_process): Adjust.
13396 (dwarf2_ranges_read): Adjust.
13397 (dwarf2_get_pc_bounds): Adjust.
13398 (dwarf2_record_block_ranges): Adjust.
13399 (dwarf2_add_field): Adjust.
13400 (dwarf2_add_member_fn): Adjust.
13401 (read_structure_type): Adjust.
13402 (process_structure_scope): Adjust.
13403 (read_enumeration_type): Adjust.
13404 (read_array_type): Adjust.
13405 (mark_common_block_symbol_computed): Adjust.
13406 (read_common_block): Adjust.
13407 (read_namespace_type): Adjust.
13408 (read_namespace): Adjust.
13409 (read_module_type): Adjust.
13410 (read_tag_pointer_type): Adjust.
13411 (read_tag_ptr_to_member_type): Adjust.
13412 (read_tag_string_type): Adjust.
13413 (read_subroutine_type): Adjust.
13414 (read_typedef): Adjust.
13415 (read_base_type): Adjust.
13416 (attr_to_dynamic_prop): Adjust.
13417 (read_subrange_type): Adjust.
13418 (read_unspecified_type): Adjust.
13419 (dwarf2_read_abbrevs): Adjust.
13420 (load_partial_dies): Adjust.
13421 (read_partial_die): Adjust.
13422 (find_partial_die): Adjust.
13423 (guess_partial_die_structure_name): Adjust.
13424 (fixup_partial_die): Adjust.
13425 (read_attribute_value): Adjust.
13426 (read_addr_index): Adjust.
13427 (read_addr_index_from_leb128): Adjust.
13428 (read_str_index): Adjust.
13429 (dwarf2_string_attr): Adjust.
13430 (get_debug_line_section): Adjust.
13431 (dwarf_decode_line_header): Adjust.
13432 (lnp_state_machine::check_line_address): Adjust.
13433 (dwarf_decode_lines_1): Adjust.
13434 (dwarf_decode_lines): Adjust.
13435 (dwarf2_start_symtab): Adjust.
13436 (var_decode_location): Adjust.
13437 (new_symbol_full): Adjust.
13438 (dwarf2_const_value_data): Adjust.
13439 (dwarf2_const_value_attr): Adjust.
13440 (dwarf2_const_value): Adjust.
13441 (die_type): Adjust.
13442 (die_containing_type): Adjust.
13443 (build_error_marker_type): Adjust.
13444 (lookup_die_type): Adjust.
13445 (guess_full_die_structure_name): Adjust.
13446 (anonymous_struct_prefix): Adjust.
13447 (determine_prefix): Adjust.
13448 (dwarf2_name): Adjust.
13449 (follow_die_ref_or_sig): Adjust.
13450 (follow_die_offset): Adjust.
13451 (follow_die_ref): Adjust.
13452 (follow_die_sig_1): Adjust.
13453 (follow_die_sig): Adjust.
13454 (get_signatured_type): Adjust.
13455 (get_DW_AT_signature_type): Adjust.
13456 (decode_locdesc): Adjust.
13457 (dwarf_decode_macros): Adjust.
13458 (cu_debug_loc_section): Adjust.
13459 (fill_in_loclist_baton): Adjust.
13460 (dwarf2_symbol_mark_computed): Adjust.
13461 (init_one_comp_unit): Don't assign
13462 dwarf2_cu::dwarf2_per_objfile.
13463 (set_die_type): Adjust.
13465 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13467 * dwarf2read.c (struct mapped_debug_names): Add constructor.
13468 <dwarf2_per_objfile>: New field.
13469 (dwarf2_per_objfile): Remove global.
13470 (get_dwarf2_per_objfile): New function.
13471 (set_dwarf2_per_objfile): New function.
13472 (dwarf2_build_psymtabs_hard): Change objfile parameter to
13473 dwarf2_per_objfile.
13474 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13475 (read_abbrev_offset): Likewise.
13476 (read_indirect_string): Likewise.
13477 (read_indirect_line_string): Likewise.
13478 (read_indirect_string_at_offset): Likewise.
13479 (read_indirect_string_from_dwz): Likewise.
13480 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13481 dwarf2_per_objfile.
13482 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13483 (create_all_comp_units): Change objfile parameter to
13484 dwarf2_per_objfile.
13485 (create_all_type_units): Likewise.
13486 (process_queue): Add dwarf2_per_objfile parameter.
13487 (read_and_check_comp_unit_head): Likewise.
13488 (lookup_dwo_unit_in_dwp): Likewise.
13489 (get_dwp_file): Likewise.
13490 (process_cu_includes): Likewise.
13491 (struct free_dwo_file_cleanup_data): New struct.
13492 (dwarf2_has_info): Use get_dwarf2_per_objfile and
13493 set_dwarf2_per_objfile.
13494 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13495 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13496 context, adjust calls.
13497 (dw2_instantiate_symtab): Likewise.
13498 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13499 (dw2_get_cu): Likewise.
13500 (create_cu_from_index_list): Change objfile parameter to
13501 dwarf2_per_objfile.
13502 (create_cus_from_index_list): Get dwarf2_per_objfile from
13503 context, adjust calls.
13504 (create_cus_from_index): Likewise.
13505 (create_signatured_type_table_from_index): Change objfile
13506 parameter to dwarf2_per_objfile.
13507 (create_signatured_type_table_from_debug_names): Change objfile
13508 parameter to dwarf2_per_objfile.
13509 (create_addrmap_from_index): Likewise.
13510 (create_addrmap_from_aranges): Likewise.
13511 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13512 (dw2_setup): Remove.
13513 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13515 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13516 get_dwarf2_per_objfile.
13517 (dw2_forget_cached_source_info): Likewise.
13518 (dw2_map_symtabs_matching_filename): Likewise.
13519 (struct dw2_symtab_iterator) <index>: Remove.
13520 <dwarf2_per_objfile>: New field.
13521 (dw2_symtab_iter_init): Replace index parameter with
13522 dwarf2_per_objfile.
13523 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13524 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13525 (dw2_print_stats): Likewise.
13526 (dw2_dump): Likewise.
13527 (dw2_expand_symtabs_for_function): Likewise.
13528 (dw2_expand_all_symtabs): Likewise.
13529 (dw2_expand_symtabs_with_fullname): Likewise.
13530 (dw2_expand_marked_cus): Replace index and objfile parameters
13531 with dwarf2_per_objfile.
13532 (dw_expand_symtabs_matching_file_matcher): Add
13533 dwarf2_per_objfile parameter and adjust calls.
13534 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13536 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13537 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13539 (create_cus_from_debug_names_list): Replace objfile parameter
13540 with dwarf2_per_objfile and adjust calls.
13541 (create_cus_from_debug_names): Likewise.
13542 (dwarf2_read_debug_names): Likewise.
13543 (mapped_debug_names::namei_to_name): Adjust call.
13544 (dw2_debug_names_iterator::next): Likewise.
13545 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13546 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13547 (dw2_debug_names_dump): Likewise.
13548 (dw2_debug_names_expand_symtabs_for_function): Likewise.
13549 (dw2_debug_names_expand_symtabs_matching): Likewise.
13550 (dwarf2_initialize_objfile): Likewise.
13551 (dwarf2_build_psymtabs): Likewise.
13552 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13554 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13555 (read_and_check_comp_unit_head): Likewise.
13556 (read_abbrev_offset): Likewise.
13557 (create_debug_type_hash_table): Likewise.
13558 (create_debug_types_hash_table): Likewise.
13559 (create_all_type_units): Replace objfile parameter with
13560 dwarf2_per_objfile.
13561 (add_type_unit): Add dwarf2_per_objfile parameter.
13562 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13563 with dwarf2_per_objfile.
13564 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13565 (lookup_dwp_signatured_type): Likewise.
13566 (lookup_signatured_type): Likewise.
13567 (read_cutu_die_from_dwo): Likewise.
13568 (init_tu_and_read_dwo_dies): Likewise.
13569 (init_cutu_and_read_dies): Likewise.
13570 (init_cutu_and_read_dies_no_follow): Likewise.
13571 (allocate_type_unit_groups_table): Add objfile parameter.
13572 (create_type_unit_group): Use dwarf2_per_objfile from cu.
13573 (get_type_unit_group): Likewise.
13574 (process_psymtab_comp_unit): Update call.
13575 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13576 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13577 (print_tu_stats): Likewise.
13578 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13579 in void* parameter.
13580 (build_type_psymtabs): Change objfile parameter to
13581 dwarf2_per_objfile.
13582 (process_skeletonless_type_unit): Use dwarf2_per_objfile
13583 passed in void* parameter.
13584 (process_skeletonless_type_units): Change objfile parameter to
13585 dwarf2_per_objfile.
13586 (set_partial_user): Likewise.
13587 (dwarf2_build_psymtabs_hard): Likewise.
13588 (read_comp_units_from_section): Likewise.
13589 (create_all_comp_units): Likewise.
13590 (scan_partial_symbols): Update calls.
13591 (add_partial_symbol): Likewise.
13592 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13593 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13594 (process_queue): Add dwarf2_per_objfile parameter.
13595 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13596 (compute_compunit_symtab_includes): Likewise.
13597 (process_cu_includes): Add dwarf2_per_objfile parameter.
13598 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13599 (process_full_type_unit): Likewise.
13600 (process_imported_unit_die): Update call.
13601 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13602 (read_file_scope): Likewise.
13603 (allocate_dwo_file_hash_table): Add objfile parameter.
13604 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13605 (create_cus_hash_table): Likewise.
13606 (create_dwp_hash_table): Likewise.
13607 (create_dwo_unit_in_dwp_v1): Likewise.
13608 (create_dwp_v2_section): Likewise.
13609 (create_dwo_unit_in_dwp_v2): Likewise.
13610 (lookup_dwo_unit_in_dwp): Likewise.
13611 (try_open_dwop_file): Likewise.
13612 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13613 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13614 cleanup to include a reference to dwarf2_per_objfile.
13615 (open_dwp_file): Add dwarf2_per_objfile parameter.
13616 (open_and_init_dwp_file): Likewise.
13617 (get_dwp_file): Likewise.
13618 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13619 (queue_and_load_all_dwo_tus): Update call.
13620 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13622 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13623 (dwarf2_ranges_process): Likewise.
13624 (dwarf2_get_pc_bounds): Likewise.
13625 (mark_common_block_symbol_computed): Likewise.
13626 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13627 (dwarf2_read_abbrevs): Update call.
13628 (read_partial_die): Use dwarf2_per_objfile from cu.
13629 (find_partial_die): Likewise.
13630 (fixup_partial_die): Likewise.
13631 (read_attribute_value): Likewise.
13632 (read_indirect_string_at_offset_from): Add objfile parameter.
13633 (read_indirect_string_at_offset): Add dwarf2_per_objfile
13635 (read_indirect_string_from_dwz): Add objfile parameter.
13636 (read_indirect_string): Add objfile parameter.
13637 (read_addr_index_1): Add dwarf2_per_objfile parameter.
13638 (read_addr_index): Use dwarf2_per_objfile from cu.
13639 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13641 (read_str_index): Use dwarf2_per_objfile from cu.
13642 (get_debug_line_section): Likewise.
13643 (read_formatted_entries): Add dwarf2_per_objfile parameter.
13644 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13645 (new_symbol_full): Use dwarf2_per_objfile from cu.
13646 (build_error_marker_type): Likewise.
13647 (lookup_die_type): Likewise.
13648 (determine_prefix): Likewise.
13649 (follow_die_offset): Likewise.
13650 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13651 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13652 (dwarf2_fetch_die_type_sect_off): Likewise.
13653 (dwarf2_get_die_type): Likewise.
13654 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13655 (get_signatured_type): Likewise.
13656 (get_DW_AT_signature_type): Likewise.
13657 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13658 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13659 (cu_debug_loc_section): Likewise.
13660 (fill_in_loclist_baton): Likewise.
13661 (dwarf2_symbol_mark_computed): Likewise.
13662 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13663 dwarf2_per_objfile.
13664 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13666 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13667 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13668 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13669 (set_die_type): Use dwarf2_free_objfile from cu.
13670 (get_die_type_at_offset): Likewise.
13671 (dwarf2_per_objfile_free): Don't assign global variable.
13672 (debug_names) <constructor>: Add dwarf2_per_objfile
13673 parameter, update m_debugstrlookup construction.
13674 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13676 <m_dwarf2_per_objfile>: New field.
13677 <lookup>: Use m_dwarf2_per_objfile.
13678 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13679 (psyms_seen_size): Likewise.
13680 (write_gdbindex): Replace objfile parameter with
13681 dwarf2_per_objfile.
13682 (write_debug_names): Likewise.
13683 (write_psymtabs_to_index): Likewise.
13684 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13687 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13689 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13690 <dwarf2_per_objfile>: New field.
13691 (struct dwarf2_per_cu_data) <objfile>: Remove.
13692 <dwarf2_per_objfile>: New field.
13693 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13695 (create_signatured_type_table_from_index): Likewise.
13696 (create_debug_type_hash_table): Likewise.
13697 (fill_in_sig_entry_from_dwo_entry): Likewise.
13698 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13699 (create_type_unit_group): Assign dwarf2_per_objfile instead of
13701 (create_partial_symtab): Access objfile through
13702 dwarf2_per_objfile.
13703 (process_psymtab_comp_unit_reader): Likewise.
13704 (read_comp_units_from_section): Likewise.
13705 (scan_partial_symbols): Likewise.
13706 (add_partial_symbol): Likewise.
13707 (add_partial_subprogram): Likewise.
13708 (peek_die_abbrev): Likewise.
13709 (fixup_go_packaging): Likewise.
13710 (process_full_comp_unit): Likewise.
13711 (process_full_type_unit): Likewise.
13712 (process_imported_unit_die): Likewise.
13713 (dwarf2_compute_name): Likewise.
13714 (dwarf2_physname): Likewise.
13715 (read_import_statement): Likewise.
13716 (create_cus_hash_table): Assign dwarf2_physname instead of
13718 (read_func_scope): Access objfile through dwarf2_per_objfile.
13719 (read_lexical_block_scope): Likewise.
13720 (read_call_site_scope): Likewise.
13721 (read_variable): Likewise.
13722 (dwarf2_rnglists_process): Likewise.
13723 (dwarf2_ranges_process): Likewise.
13724 (dwarf2_ranges_read): Likewise.
13725 (dwarf2_record_block_ranges): Likewise.
13726 (dwarf2_add_field): Likewise.
13727 (dwarf2_add_member_fn): Likewise.
13728 (read_structure_type): Likewise.
13729 (process_structure_scope): Likewise.
13730 (read_enumeration_type): Likewise.
13731 (read_array_type): Likewise.
13732 (read_common_block): Likewise.
13733 (read_namespace_type): Likewise.
13734 (read_namespace): Likewise.
13735 (read_module_type): Likewise.
13736 (read_tag_pointer_type): Likewise.
13737 (read_tag_ptr_to_member_type): Likewise.
13738 (read_tag_string_type): Likewise.
13739 (read_subroutine_type): Likewise.
13740 (read_typedef): Likewise.
13741 (read_base_type): Likewise.
13742 (attr_to_dynamic_prop): Likewise.
13743 (read_subrange_type): Likewise.
13744 (read_unspecified_type): Likewise.
13745 (load_partial_dies): Likewise.
13746 (read_partial_die): Likewise.
13747 (find_partial_die): Likewise.
13748 (guess_partial_die_structure_name): Likewise.
13749 (fixup_partial_die): Likewise.
13750 (read_attribute_value): Likewise.
13751 (read_addr_index_from_leb128): Likewise.
13752 (dwarf2_read_addr_index): Likewise.
13753 (dwarf2_string_attr): Likewise.
13754 (lnp_state_machine::check_line_address): Likewise.
13755 (dwarf_decode_lines_1): Likewise.
13756 (dwarf_decode_lines): Likewise.
13757 (dwarf2_start_symtab): Likewise.
13758 (var_decode_location): Likewise.
13759 (new_symbol_full): Likewise.
13760 (dwarf2_const_value_data): Likewise.
13761 (dwarf2_const_value_attr): Likewise.
13762 (dwarf2_const_value): Likewise.
13763 (die_type): Likewise.
13764 (die_containing_type): Likewise.
13765 (lookup_die_type): Likewise.
13766 (guess_full_die_structure_name): Likewise.
13767 (anonymous_struct_prefix): Likewise.
13768 (dwarf2_name): Likewise.
13769 (follow_die_ref_or_sig): Likewise.
13770 (follow_die_offset): Likewise.
13771 (follow_die_ref): Likewise.
13772 (dwarf2_fetch_die_loc_sect_off): Likewise.
13773 (dwarf2_fetch_constant_bytes): Likewise.
13774 (dwarf2_fetch_die_type_sect_off): Likewise.
13775 (dwarf2_get_die_type): Likewise.
13776 (follow_die_sig): Likewise.
13777 (decode_locdesc): Likewise.
13778 (dwarf2_per_cu_objfile): Likewise.
13779 (dwarf2_per_cu_text_offset): Likewise.
13780 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13782 (set_die_type): Access objfile through
13783 dwarf2_per_objfile.
13785 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13787 * valprint.c (converted_character_d): Remove typedef.
13788 (DEF_VEC_O (converted_character_d)): Remove.
13789 (count_next_character): Use std::vector.
13790 (print_converted_chars_to_obstack): Likewise.
13791 (generic_printstr): Likewise.
13793 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13795 * xml-support.h (struct gdb_xml_value): Add constructor.
13796 <value>: Change type to unique_xmalloc_ptr.
13797 (gdb_xml_value_s): Remove typedef.
13798 (DEF_VEC_O (gdb_xml_value_s)): Remove.
13799 (gdb_xml_element_start_handler): Change parameter type to
13801 (xml_find_attribute): Likewise.
13802 * xml-support.c (xml_find_attribute): Change parameter type to
13803 std::vector and adjust.
13804 (gdb_xml_values_cleanup): Remove.
13805 (gdb_xml_parser::start_element): Adjust to std::vector.
13806 (xinclude_start_include): Change paraeter type to std::vector
13808 * btrace.c (check_xml_btrace_version): Likewise.
13809 (parse_xml_btrace_block): Likewise.
13810 (parse_xml_btrace_pt_config_cpu): Likewise.
13811 (parse_xml_btrace_pt): Likewise.
13812 (parse_xml_btrace_conf_bts): Likewise.
13813 (parse_xml_btrace_conf_pt): Likewise.
13814 * memory-map.c (memory_map_start_memory): Likewise.
13815 (memory_map_start_property): Likewise.
13816 * osdata.c (osdata_start_osdata): Likewise.
13817 (osdata_start_item): Likewise.
13818 (osdata_start_column): Likewise.
13819 * remote.c (start_thread): Likewise.
13820 * solib-aix.c (library_list_start_library): Likewise.
13821 (library_list_start_list): Likewise.
13822 * solib-svr4.c (library_list_start_library): Likewise.
13823 (svr4_library_list_start_list): Likewise.
13824 * solib-target.c (library_list_start_segment): Likewise.
13825 (library_list_start_section): Likewise.
13826 (library_list_start_library): Likewise.
13827 (library_list_start_list): Likewise.
13828 * tracepoint.c (traceframe_info_start_memory): Likewise.
13829 (traceframe_info_start_tvar): Likewise.
13830 * xml-syscall.c (syscall_start_syscall): Likewise.
13831 * xml-tdesc.c (tdesc_start_target): Likewise.
13832 (tdesc_start_feature): Likewise.
13833 (tdesc_start_reg): Likewise.
13834 (tdesc_start_union): Likewise.
13835 (tdesc_start_struct): Likewise.
13836 (tdesc_start_flags): Likewise.
13837 (tdesc_start_enum): Likewise.
13838 (tdesc_start_field): Likewise.
13839 (tdesc_start_enum_value): Likewise.
13840 (tdesc_start_vector): Likewise.
13842 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13844 * extension.h (struct xmethod_worker) <clone>: Remove.
13845 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13847 (python_xmethod_worker::clone): Remove.
13848 * valops.c (find_overload_match): Use std::move instead of
13851 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13853 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13854 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13855 <free_xmethod_worker_data>: Remove.
13856 <get_matching_xmethod_workers>: Chance VEC to std::vector.
13857 <get_xmethod_arg_types>: Remove.
13858 <get_xmethod_result_type>: Remove.
13859 <invoke_xmethod>: Remove.
13860 * extension.c (new_xmethod_worker): Remove.
13861 (clone_xmethod_worker): Remove.
13862 (get_matching_xmethod_workers): Return void, pass std::vector by
13864 (get_xmethod_arg_types): Rename to...
13865 (xmethod_worker::get_arg_types): ... this, and adjust.
13866 (get_xmethod_result_type): Rename to...
13867 (xmethod_worker::get_result_type): ... this, and adjust.
13868 (invoke_xmethod): Remove.
13869 (free_xmethod_worker): Remove.
13870 (free_xmethod_worker_vec): Remove.
13871 * extension.h (enum ext_lang_rc): Move here from
13873 (struct xmethod_worker): Add constructor and destructor.
13876 <invoke, clone, do_get_result_type, do_get_arg_types>: New
13877 virtual pure methods.
13878 <get_arg_types, get_result_type>: New methods.
13879 (xmethod_worker_ptr): Remove typedef.
13880 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13881 (xmethod_worker_vec): Remove typedef.
13882 (xmethod_worker_up): New typedef.
13883 (invoke_xmethod): Remove.
13884 (clone_xmethod_worker): Remove.
13885 (free_xmethod_worker): Remove.
13886 (free_xmethod_worker_vec): Remove.
13887 (get_xmethod_arg_types): Remove.
13888 (get_xmethod_result_type): Remove.
13889 * valops.c (find_method_list): Use std::vector, don't use
13890 intermediate vector.
13891 (value_find_oload_method_list): Use std::vector.
13892 (find_overload_match): Use std::vector.
13893 (find_oload_champ): Use std::vector.
13894 * value.c (value_free): Use operator delete.
13895 (value_of_xmethod): Rename to...
13896 (value_from_xmethod): ... this. Don't assign
13897 xmethod_worker::value, take rvalue-reference.
13898 (result_type_of_xmethod): Adjust.
13899 (call_xmethod): Adjust.
13900 * value.h: Include extension.h.
13901 (struct xmethod_worker): Don't forward-declare.
13902 (value_of_xmethod): Rename to...
13903 (value_from_xmethod): ... this, take rvalue-reference.
13904 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13905 (struct python_xmethod_worker): ... this, add constructor and
13907 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13908 (gdbpy_free_xmethod_worker_data): Rename to...
13909 (python_xmethod_worker::~python_xmethod_worker): ... this and
13911 (gdbpy_clone_xmethod_worker_data): Rename to...
13912 (python_xmethod_worker::clone): ... this and adjust.
13913 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13915 (gdbpy_get_xmethod_arg_types): Rename to...
13916 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13917 (gdbpy_get_xmethod_result_type): Rename to...
13918 (python_xmethod_worker::do_get_result_type): ... this and
13920 (gdbpy_invoke_xmethod): Rename to...
13921 (python_xmethod_worker::invoke): ... this and adjust.
13922 (new_python_xmethod_worker): Rename to...
13923 (python_xmethod_worker::python_xmethod_worker): ... this and
13925 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13927 (gdbpy_free_xmethod_worker_data): Remove.
13928 (gdbpy_get_matching_xmethod_workers): Use std::vector.
13929 (gdbpy_get_xmethod_arg_types): Remove.
13930 (gdbpy_get_xmethod_result_type): Remove.
13931 (gdbpy_invoke_xmethod): Remove.
13932 * python/python.c (python_extension_ops): Remove obsolete
13935 2018-01-05 Pedro Alves <palves@redhat.com>
13938 * common/signals-state-save-restore.c
13939 (save_original_signals_state): New parameter 'quiet'. Warn if we
13940 find a custom handler preinstalled, instead of internal erroring.
13941 But only warn if !quiet.
13942 * common/signals-state-save-restore.h
13943 (save_original_signals_state): New parameter 'quiet'.
13944 * main.c (captured_main_1): Move save_original_signals_state call
13945 after option handling, and pass QUIET.
13947 2018-01-05 Pedro Alves <palves@redhat.com>
13949 * spu-tdep.c (spu_catch_start): Pass
13950 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13952 2018-01-05 Pedro Alves <palves@redhat.com>
13955 * ada-lang.c (literal_symbol_name_matcher): New function.
13956 (ada_get_symbol_name_matcher): Use it for
13957 symbol_name_match_type::SEARCH_NAME.
13958 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
13959 it down instead of assuming symbol_name_match_type::FULL.
13960 * block.h (block_lookup_symbol): New parameter 'match_type'.
13961 * c-valprint.c (print_unpacked_pointer): Use
13962 lookup_symbol_search_name instead of lookup_symbol.
13963 * compile/compile-object-load.c (get_out_value_type): Pass down
13964 symbol_name_match_type::SEARCH_NAME.
13965 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13966 symbol_name_match_type::FULL.
13967 * cp-support.c (cp_get_symbol_name_matcher): Handle
13968 symbol_name_match_type::SEARCH_NAME.
13969 * infrun.c (insert_exception_resume_breakpoint): Use
13970 lookup_symbol_search_name.
13971 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13972 * psymtab.c (maintenance_check_psymtabs): Use
13973 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13974 * stack.c (print_frame_args): Use lookup_symbol_search_name and
13975 SYMBOL_SEARCH_NAME.
13976 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13977 if symbol_name_match_type::SEARCH_NAME.
13978 (lookup_symbol_in_language): Pass down
13979 symbol_name_match_type::FULL.
13980 (lookup_symbol_search_name): New.
13981 (lookup_language_this): Pass down
13982 symbol_name_match_type::SEARCH_NAME.
13983 (lookup_symbol_aux, lookup_local_symbol): New parameter
13984 'match_type'. Pass it down.
13985 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13986 (lookup_symbol_search_name): New declaration.
13987 (lookup_symbol_in_block): New 'match_type' parameter.
13989 2018-01-05 Pedro Alves <palves@redhat.com>
13992 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13994 (ada_lookup_symbol): Reimplement in terms of
13995 ada_lookup_symbol_list, bits factored out from
13996 ada_lookup_encoded_symbol.
13998 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14000 * ada-exp.y (write_object_renaming): When subscripting an array
14001 using a symbol as the index, pass the block in call to
14002 ada_lookup_encoded_symbol when looking that symbol up.
14004 2018-01-05 Jerome Guitton <guitton@adacore.com>
14006 * ada-lang.c (ada_array_length): Use ada_index_type instead of
14009 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14011 * ada-lang.c (ada_to_fixed_value_create): Add handling of
14012 the case where VALUE_LVAL (val0) is not lval_memory.
14014 2018-01-05 Xavier Roirand <roirand@adacore.com>
14016 * ada-valprint.c (print_optional_low_bound): Handle
14017 character-indexed array printing like boolean-indexed array
14020 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14022 * NEWS: Create a new section for the next release branch.
14023 Rename the section of the current branch, now that it has
14026 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14028 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14029 * version.in: Bump version to 8.1.50.DATE-git.
14031 2018-01-03 Xavier Roirand <roirand@adacore.com>
14033 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14035 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14037 (default_exception_support_info) <catch_handlers_sym>: Add field.
14038 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14039 (ada_exception_name_addr_1): Add "catch handlers" handling.
14040 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14041 Update all callers.
14042 (create_excep_cond_exprs) <ex>: Add parameter.
14043 (re_set_exception): Update create_excep_cond_exprs call.
14044 (print_it_exception, print_one_exception, print_mention_exception)
14045 (print_recreate_exception): Add "catch handler" handling.
14046 (allocate_location_catch_handlers, re_set_catch_handlers)
14047 (check_status_catch_handlers, print_it_catch_handlers)
14048 (print_one_catch_handlers, print_mention_catch_handlers)
14049 (print_recreate_catch_handlers): New function.
14050 (catch_handlers_breakpoint_ops): New variable.
14051 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14052 Add parameter. Add "catch handler" handling.
14053 (ada_exception_sym_name, ada_exception_breakpoint_ops):
14054 Add "catch handler" handling.
14055 (ada_exception_catchpoint_cond_string): Add "catch handler"
14057 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14059 (catch_ada_handlers_command): New function.
14060 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14061 operations structure.
14062 (_initialize_ada_language): Add "catch handlers" command entry.
14063 * NEWS: Document "catch handlers" feature.
14065 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14067 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14068 account when creating the array type of the slice.
14069 (ada_value_slice): Likewise.
14071 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14073 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14075 (create_array_type_with_stride): Add byte_stride_prop parameter.
14076 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14077 New parameter. Update all callers in this file.
14078 (array_type_has_dynamic_stride): New function.
14079 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14080 of arrays with dynamic byte strides.
14081 * dwarf2read.c (read_array_type): Add support for dynamic
14082 DW_AT_byte_stride attributes.
14084 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14086 * dwarf2read.c (read_unspecified_type): Treat
14087 DW_TAG_enumeration_type DIEs from Ada units as stubs.
14089 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14091 Update copyright year range in all GDB files.
14093 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14095 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14096 and gdb/testsuite/gdb.base/step-line.c.
14098 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14100 * copyright.py (main): Dump the contents of
14101 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14102 even if BY_HAND is empty.
14104 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14106 * top.c (print_gdb_version): Update Copyright year in version
14109 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14111 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14113 For older changes see ChangeLog-2017.
14119 version-control: never