1 2018-09-29 Tom Tromey <tom@tromey.com>
6 2018-09-28 John Baldwin <jhb@FreeBSD.org>
8 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
9 case with explicit breakpoint kind.
10 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
11 'additional_info' and related logic.
12 (riscv_debug_breakpoints): New variable.
13 (riscv_breakpoint_kind_from_pc): Use the length of the existing
14 instruction to determine the breakpoint kind.
15 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
16 flag. Update description of 'set/show riscv
17 use-compressed-breakpoints' flag.
19 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
21 (NEWS): Mention changes to frame related commands.
22 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
23 (add_prefix_cmd_suppress_notification): New function.
24 (add_com_suppress_notification): Call
25 add_cmd_suppress_notification.
26 * command.h (add_cmd_suppress_notification): Declare.
27 (add_prefix_cmd_suppress_notification): Declare.
28 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
29 (parse_frame_specification): Moved from stack.c, with
30 simplification to handle a single argument.
31 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
32 switch to the selected frame. Add a header comment.
33 * stack.c: Remove 'safe-ctype.h' include.
34 (find_frame_for_function): Add declaration.
35 (find_frame_for_address): New function.
36 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
37 (frame_selection_by_function_completer): New function.
38 (info_frame_command): Rename to...
39 (info_frame_command_core): ...this, and update parameter types.
40 (select_frame_command): Rename to...
41 (select_frame_command_core): ...this, and update parameter types.
42 (frame_command): Rename to...
43 (frame_command_core): ...this, and update parameter types.
44 (class frame_command_helper): New class to wrap implementations of
45 frame related sub-commands.
46 (frame_apply_cmd_list): New static global.
47 (frame_cmd_list): Make static.
48 (select_frame_cmd_list): New global for sub-commands.
49 (info_frame_cmd_list): New global for sub-commands.
50 (_initialize_stack): Register sub-commands for 'frame',
51 'select-frame', and 'info frame'. Update 'frame apply' commands
52 to use frame_apply_cmd_list. Move function local static
53 frame_apply_list to file static frame_apply_cmd_list for
55 * stack.h (select_frame_command): Delete declarationn.
56 (select_frame_for_mi): Declare new function.
58 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
60 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
61 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
64 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
66 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
68 2018-09-26 Tom Tromey <tom@tromey.com>
70 * valops.c (auto_abandon): Remove dead code.
72 2018-09-26 Tom Tromey <tom@tromey.com>
74 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
76 2018-09-24 Tom Tromey <tom@tromey.com>
78 * common/pathstuff.c (get_standard_cache_dir): Make
79 "xdg_cache_home" and "home" const.
80 * top.c (init_history): Make "tmpenv" const.
81 * main.c (get_init_files): Make "homedir" const.
83 2018-09-23 Tom Tromey <tom@tromey.com>
86 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
88 2018-09-23 Tom Tromey <tom@tromey.com>
90 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
91 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
92 * python/python-internal.h (gdbpy_handle_exception): Declare.
93 * python/py-utils.c (gdbpy_handle_exception): New function.
95 2018-09-23 Tom Tromey <tom@tromey.com>
98 * python/py-type.c (typy_template_argument): Check for negative
101 2018-09-23 Tom Tromey <tom@tromey.com>
104 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
106 2018-09-23 Tom Tromey <tom@tromey.com>
109 * python/py-value.c (valpy_int): Allow conversion from pointer
112 2018-09-23 Tom Tromey <tom@tromey.com>
115 * python/py-value.c (valpy_int): Respect type sign.
117 2018-09-23 Tom Tromey <tom@tromey.com>
120 * python/py-value.c (valpy_float): Allow conversions from int or
122 (valpy_int, valpy_long): Allow conversions from float.
124 2018-09-23 Tom Tromey <tom@tromey.com>
126 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
127 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
129 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
131 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
133 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
135 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
137 * windows-nat.c (windows_nat_target::wait): Remove a spurious
138 target_terminal::ours().
140 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
142 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
145 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
147 * breakpoint.c (update_inserted_breakpoint_locations): Remove
150 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
152 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
154 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
155 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
156 * sol-thread.c (ps_pdmodel): Don't guard definition.
158 * procfs.c: Fix formatting.
160 * procfs.c (sysset_t_alloc): Remove.
161 (create_procinfo): Use XNEW instead of sysset_t_alloc.
162 (procfs_debug_inferior): Likewise.
163 (procfs_set_exec_trap): Likewise.
164 (proc_set_traced_sysentry): Don't allocate argp dynamically.
165 (proc_set_traced_sysexit): Likewise.
167 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
168 (dead_procinfo): Likewise.
169 (proc_warn): Likewise.
170 (proc_error): Likewise.
171 (proc_get_LDT_entry): Likewise.
172 (do_attach): Likewise.
173 (procfs_target::pid_to_str): Likewise.
174 (iterate_over_mappings): Likewise.
176 * procfs.c (create_procinfo): Fix ARI warning.
177 (proc_get_status): Likewise.
178 (proc_stop_process): Likewise.
179 (proc_run_process): Likewise.
180 (proc_kill): Likewise.
181 (proc_get_LDT_entry): Likewise.
182 (procfs_find_LDT_entry): Likewise.
183 (proc_update_threads): Likewise.
184 (proc_iterate_over_threads): Likewise.
185 (do_attach): Likewise.
186 (procfs_xfer_memory): Likewise.
187 (invalidate_cache): Likewise.
188 (procfs_target::resume): Likewise.
189 (procfs_init_inferior): Likewise.
190 (procfs_set_exec_trap): Likewise.
191 (procfs_target::thread_alive): Likewise.
192 (procfs_target::pid_to_exec_file): Likewise.
193 (iterate_over_mappings): Likewise.
194 (procfs_target::make_corefile_notes): Likewise.
195 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
197 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
198 (procfs_find_LDT_entry): Likewise.
199 * sol-thread.c (ps_lgetLDT): Likewise.
201 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
204 * procfs.c (procfs_target): Declare pid_to_exec_file.
205 (procfs_target::pid_to_exec_file): New.
207 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
209 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
211 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
212 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
214 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
216 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
217 (supply_fpregset, fill_fpregset): Move ...
218 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
219 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
220 Remove references to ioctl-based procfs.
222 Remove PR_MODEL_NATIVE guards.
223 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
224 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
226 2018-09-19 Xavier Roirand <roirand@adacore.com>
229 * solib-darwin.c (darwin_get_dyld_bfd): New function.
230 (darwin_solib_get_all_image_info_addr_at_init): Update call.
231 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
233 2018-09-19 John Baldwin <jhb@FreeBSD.org>
235 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
236 (fbsd_print_sockaddr_in6): Likewise.
238 2018-09-19 Richard Bunt <richard.bunt@arm.com>
239 Chris January <chris.january@arm.com>
241 * eval.c (skip_undetermined_arglist): Skip argument list helper.
242 (evaluate_subexp_standard): Return a dummy type when
243 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
244 OP_F77_UNDETERMINED_ARGLIST case.
245 * expression.h (enum noside): Update comment.
247 2018-09-19 George Vasick <george.vasick@oracle.com>
249 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
251 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
252 April Chin <april.chin@oracle.com>
253 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
255 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
257 (create_procinfo): Print pids in /proc without leading zeros.
259 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
261 * nios2-tdep.c (nios2_gcc_target_options): New.
262 (nios2_gdb_arch_init): Install new hook.
264 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
266 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
268 * update-gnulib.sh: Apply patch.
269 * configure: Re-generate.
271 2018-09-18 John Baldwin <jhb@FreeBSD.org>
273 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
274 description. Make "info proc" command descriptions more
277 2018-09-18 John Baldwin <jhb@FreeBSD.org>
279 * NEWS: Mention 'info proc files' command.
281 2018-09-18 John Baldwin <jhb@FreeBSD.org>
283 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
284 descriptors for IP_FILES and IP_ALL.
286 2018-09-18 John Baldwin <jhb@FreeBSD.org>
288 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
289 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
290 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
291 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
292 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
293 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
294 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
295 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
296 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
297 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
298 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
299 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
300 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
301 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
302 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
303 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
304 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
305 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
306 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
307 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
308 (struct fbsd_sockaddr_un): New types.
309 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
310 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
311 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
312 (fbsd_core_info_proc_files): New functions.
313 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
315 * fbsd-tdep.h (fbsd_info_proc_files_header)
316 (fbsd_info_proc_files_entry): New.
318 2018-09-18 John Baldwin <jhb@FreeBSD.org>
320 * defs.h (enum info_proc_what) [IP_FILES]: New value.
321 * infcmd.c (info_proc_cmd_files): New function.
322 (_initialize_infcmd): Register 'info proc files' command.
324 2018-09-18 John Baldwin <jhb@FreeBSD.org>
326 * gnulib/aclocal-m4-deps.mk: Re-generate.
327 * gnulib/aclocal.m4: Re-generate.
328 * gnulib/config.in: Re-generate.
329 * gnulib/configure: Re-generate.
330 * gnulib/import/Makefile.am: Re-generate.
331 * gnulib/import/Makefile.in: Re-generate.
332 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
333 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
334 * gnulib/import/arpa_inet.in.h: New file.
335 * gnulib/import/inet_ntop.c: New file.
336 * gnulib/import/m4/arpa_inet_h.m4: New file.
337 * gnulib/import/m4/inet_ntop.m4: New file.
338 * gnulib/import/m4/netinet_in_h.m4: New file.
339 * gnulib/import/m4/socklen.m4: New file.
340 * gnulib/import/m4/sockpfaf.m4: New file.
341 * gnulib/import/m4/stdalign.m4: New file.
342 * gnulib/import/m4/sys_uio_h.m4: New file.
343 * gnulib/import/netinet_in.in.h: New file.
344 * gnulib/import/stdalign.in.h: New file.
345 * gnulib/import/sys_socket.c: New file.
346 * gnulib/import/sys_socket.in.h: New file.
347 * gnulib/import/sys_uio.in.h: New file.
348 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
351 2018-09-18 John Baldwin <jhb@FreeBSD.org>
353 * gnulib/aclocal-m4-deps.mk: New file.
354 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
357 2018-09-18 John Baldwin <jhb@FreeBSD.org>
359 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
362 2018-09-18 Tom Tromey <tom@tromey.com>
364 * compile/compile-object-load.c (struct
365 link_hash_table_cleanup_data): Add constructor and destructor.
366 Use DISABLE_COPY_AND_ASSIGN.
367 (~link_hash_table_cleanup_data): Rename from
368 link_hash_table_free. Now a destructor.
369 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
371 2018-09-18 Tom Tromey <tom@tromey.com>
373 * compile/compile-object-run.c (do_module_cleanup): Use delete.
374 * compile/compile-object-load.c (struct munmap_list): Move to
376 (munmap_list::add): Rename from munmap_list_add; rewrite.
377 (munmap_list::~munmap_list): Rename from munmap_list_free.
378 (munmap_listp_free_cleanup): Remove.
379 (compile_object_load): Update.
380 * compile/compile-object-load.h (struct munmap_list): Move from
381 compile-object-load.c. Rewrite.
383 2018-09-18 Alan Hayward <alan.hayward@arm.com>
385 * aarch64-tdep.c (pass_in_v): Use register size.
386 (aarch64_extract_return_value): Likewise.
387 (aarch64_store_return_value): Likewise.
389 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
391 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
394 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
396 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
399 2018-09-17 Tom Tromey <tom@tromey.com>
402 * configure: Rebuild.
403 * configure.ac: Conditionally use -DNDEBUG for Python.
405 2018-09-17 Tom Tromey <tom@tromey.com>
407 * configure: Rebuild.
408 * configure.ac: Use gmp as a library dependency when checking for
411 2018-09-17 Pedro Alves <palves@redhat.com>
413 * python/py-inferior.c (find_inferior_object): Delete.
415 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
417 * compile/compile-cplus-types.c
418 (compile_cplus_instance::enter_scope): Don't use new_scope after
421 2018-09-17 Tom Tromey <tom@tromey.com>
423 * common/pathstuff.c (get_standard_cache_dir): Use
424 ~/Library/Caches on macOS.
425 * common/pathstuff.h (get_standard_cache_dir): Update comment.
427 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
430 * breakpoint.c (commands_cmd_element): New.
431 (_initialize_breakpoint): Assign commands_cmd_element.
432 * breakpoint.h (commands_cmd_element): New.
433 * cli/cli-script.c (while_cmd_element, if_command,
434 define_cmd_element): New.
435 (command_name_equals): Remove.
436 (process_next_line): Compare commands by pointer, not by name.
437 (_initialize_cli_script): Assign the various cmd_list_element
439 * compile/compile.c (compile_cmd_element): New.
440 (_initialize_compile): Assign compile_cmd_element.
441 * compile/compile.h (compile_cmd_element): New.
442 * guile/guile.c (guile_cmd_element): New.
443 (install_gdb_commands): Assign guile_cmd_element.
444 * guile/guile.h (guile_cmd_element): New.
445 * python/python.c (python_cmd_element): New.
446 (_initialize_python): Assign python_cmd_element.
447 * python/python.h (python_cmd_element): New.
448 * tracepoint.c (while_stepping_cmd_element): New.
449 (_initialize_tracepoint): Assign while_stepping_cmd_element.
450 * tracepoint.h (while_stepping_cmd_element): New.
452 2018-09-17 Tom Tromey <tom@tromey.com>
454 * infrun.c (save_infcall_suspend_state): Return
455 infcall_suspend_state_up.
456 (save_infcall_control_state): Return infcall_control_state_up.
457 * inferior.h (save_infcall_suspend_state)
458 (save_infcall_control_state): Declare later. Return unique
461 2018-09-17 Tom Tromey <tom@tromey.com>
463 * infrun.c (struct stop_context): Declare constructor,
464 destructor, "changed" method.
465 (stop_context::stop_context): Rename from save_stop_context.
466 (stop_context::~stop_context): Rename from
467 release_stop_context_cleanup.
468 (normal_stop): Update.
469 (stop_context::changed): Rename from stop_context_changed. Return
472 2018-09-17 Tom Tromey <tom@tromey.com>
474 * inferior.h (struct infcall_suspend_state_deleter): New.
475 (infcall_suspend_state_up): New typedef.
476 (struct infcall_control_state_deleter): New.
477 (infcall_control_state_up): New typedef.
478 (make_cleanup_restore_infcall_suspend_state)
479 (make_cleanup_restore_infcall_control_state): Don't declare.
480 * infcall.c (call_function_by_hand_dummy): Update.
481 * infrun.c (do_restore_infcall_suspend_state_cleanup)
482 (make_cleanup_restore_infcall_suspend_state): Remove.
483 (do_restore_infcall_control_state_cleanup)
484 (make_cleanup_restore_infcall_control_state): Remove.
486 2018-09-17 Tom Tromey <tom@tromey.com>
488 * gdbthread.h (struct thread_control_state): Add initializer.
489 (class thread_info) <control>: Remove initializer.
490 * inferior.h (struct inferior_control_state): Add initializer.
491 (class inferior) <control>: Remove initializer.
492 (exit_inferior_1): Update.
493 * infrun.c (struct infcall_control_state): Add constructors.
494 (save_infcall_control_state): Use new.
495 (restore_infcall_control_state, discard_infcall_control_state):
498 2018-09-17 Tom Tromey <tom@tromey.com>
500 * infrun.c (struct infcall_suspend_state) <registers>: Now a
502 <siginfo_data>: Now a unique_xmalloc_ptr.
503 (save_infcall_suspend_state, restore_infcall_suspend_state)
504 (discard_infcall_suspend_state)
505 (get_infcall_suspend_state_regcache): Update.
507 2018-09-17 Tom Tromey <tom@tromey.com>
509 * gdbthread.h (struct thread_suspend_state): Add initializers.
510 (class thread_info) <suspend>: Remove initializer.
511 * infrun.c (struct infcall_suspend_state): Add initializers.
512 (save_infcall_suspend_state): Use new.
513 (discard_infcall_suspend_state): Use delete.
515 2018-09-16 Tom Tromey <tom@tromey.com>
517 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
519 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
520 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
521 (py_varobj_iter_new): Likewise.
522 (py_varobj_get_iterator): Use gdbpy_ref.
524 2018-09-16 Tom Tromey <tom@tromey.com>
526 * python/py-threadevent.c (py_get_event_thread): Simplify.
527 * python/py-inferior.c (infpy_thread_from_thread_handle):
528 Return immediately after calling thread_to_thread_object. Use
530 (thread_to_thread_object): Set the exception on a NULL return.
532 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
534 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
536 2018-09-16 Tom Tromey <tom@tromey.com>
538 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
541 2018-09-16 Tom Tromey <tom@tromey.com>
543 * python/python-internal.h (thread_to_thread_object): Change
545 * python/py-inferior.c (thread_to_thread_object): Return a new
547 (infpy_thread_from_thread_handle): Update.
548 * python/py-infthread.c (gdbpy_selected_thread): Update.
549 * python/py-stopevent.c (create_stop_event_object): Update.
550 * python/py-threadevent.c (py_get_event_thread): Return a new
552 (py_get_event_thread): Update.
553 * python/py-event.h (py_get_event_thread): Change return type.
554 * python/py-continueevent.c (create_continue_event_object):
557 2018-09-16 Tom Tromey <tom@tromey.com>
559 * python/py-progspace.c (pspy_get_objfiles): Update.
560 * python/python-internal.h (objfile_to_objfile_object): Change
562 * python/py-newobjfileevent.c (create_new_objfile_event_object):
564 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
566 * python/python.c (gdbpy_get_current_objfile): Update.
567 (gdbpy_objfiles): Update.
568 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
570 (objfile_to_objfile_object): Return a new reference.
571 * python/py-symtab.c (stpy_get_objfile): Update.
572 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
575 2018-09-16 Tom Tromey <tom@tromey.com>
577 * python/py-inferior.c (infpy_get_progspace): Update.
578 * python/python-internal.h (pspace_to_pspace_object): Change
580 * python/py-newobjfileevent.c
581 (create_clear_objfiles_event_object): Update.
582 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
584 * python/python.c (gdbpy_get_current_progspace): Update.
585 (gdbpy_progspaces): Update.
586 * python/py-progspace.c (pspace_to_pspace_object): Return a new
588 * python/py-objfile.c (objfpy_get_progspace): Update.
589 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
592 2018-09-16 Tom Tromey <tom@tromey.com>
594 * python/lib/gdb/__init__.py (current_progspace, objfiles)
595 (solib_name, block_for_pc, find_pc_line): New functions.
596 (execute_unwinders): Update.
597 * python/py-block.c (gdbpy_block_for_pc): Remove.
598 * python/py-inferior.c (infpy_get_progspace): New function.
599 (inferior_object_getset) <progspace>: Add.
600 * python/py-progspace.c (pspy_objfiles): Rewrite.
601 (pspy_solib_name, pspy_block_for_pc)
602 (pspy_find_pc_line, pspy_is_valid): New functions.
603 (progspace_object_methods): Add entries for solib_name,
604 block_for_pc, find_pc_line, is_valid.
605 * python/python-internal.h (gdbpy_block_for_pc)
606 (build_objfiles_list): Don't declare.
607 * python/python.c: Don't include solib.h.
608 (gdbpy_solib_name, gdbpy_find_pc_line)
609 (gdbpy_get_current_progspace, build_objfiles_list)
610 (gdbpy_objfiles): Remove.
611 (GdbMethods) <current_progspace, objfiles, block_for_pc,
612 solib_name, find_pc_line>: Remove entries.
614 2018-09-16 Tom Tromey <tom@tromey.com>
616 * top.c (new_ui_command): Use GNU style for metasyntactic
618 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
620 * maint.c (maintenance_translate_address): Remove "<>" around
622 * interps.c (interpreter_exec_cmd): Use GNU style for
623 metasyntactic variables.
624 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
625 metasyntactic variables.
626 * tracepoint.c (tfind_range_command): Use GNU style for
627 metasyntactic variables.
628 (tfind_outside_command): Likewise.
629 (_initialize_tracepoint): Likewise.
630 * remote.c (extended_remote_target::create_inferior): Use GNU
631 style for metasyntactic variables.
632 * sparc64-tdep.c (adi_examine_command): Use GNU style for
633 metasyntactic variables.
634 (adi_assign_command): Likewise.
636 2018-09-16 Tom Tromey <tom@tromey.com>
638 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
639 metasyntactic variables. Print message if no disassembler options
642 2018-09-15 Tom Tromey <tom@tromey.com>
644 * infcmd.c (get_inferior_args): Return const char *.
645 * inferior.h (get_inferior_args): Return type now const.
646 * linux-tdep.c (linux_fill_prpsinfo): Update.
647 * procfs.c (procfs_target::make_corefile_notes): Update.
649 2018-09-07 Tom Tromey <tom@tromey.com>
651 * python/python.c (execute_gdb_command): Call bpstat_do_actions
654 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
656 * nios2-tdep.c (nios2_type_align): New.
657 (nios2_gdb_arch_init): Install type_align hook.
659 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
661 * eval.c (fake_method::fake_method): Call xzalloc directly for a
662 type that is neither object file owned, nor gdbarch owned.
663 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
665 (alloc_type_instance): Allocate non-objfile owned types on the
667 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
668 using TYPE_ALLOC to ensure memory is allocated on the correct
670 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
671 obstack, or the gdbarch obstack.
672 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
674 2018-09-14 Tom Tromey <tom@tromey.com>
676 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
679 2018-09-14 Tom Tromey <tom@tromey.com>
681 * nat/fork-inferior.c (get_startup_shell): Remove "static".
683 2018-09-13 Tom Tromey <tom@tromey.com>
685 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
688 2018-09-13 Tom Tromey <tom@tromey.com>
690 * exec.c (try_open_exec_file): Use std::string.
692 2018-09-13 Tom Tromey <tom@tromey.com>
694 * utils.h (gdb_bfd_errmsg): Return std::string.
695 * exec.c (exec_file_attach): Update.
696 * compile/compile-object-load.c (compile_object_load): Update.
697 * utils.c (gdb_bfd_errmsg): Return std::string.
699 2018-09-13 Tom Tromey <tom@tromey.com>
701 * procfs.c (struct procinfo_deleter): New.
702 (procinfo_up): New typedef.
703 (do_destroy_procinfo_cleanup): Remove.
704 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
706 2018-09-13 Tom Tromey <tom@tromey.com>
708 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
710 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
711 2018-09-13 Tom Tromey <tom@tromey.com>
713 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
714 (pspy_get_objfiles): New function.
715 (progspace_object_methods): New.
716 (pspace_object_type): Add tp_methods callback.
717 * python/python-internal.h (build_objfiles_list): New
719 * python/python.c (build_objfiles_list): New function.
720 (gdbpy_objfiles): Implement using build_objfiles_list.
721 * NEWS: Mention the Progspace.objfiles method.
723 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
725 * python/py-inferior.c (infpy_get_progspace): New function.
726 (inferior_object_getset): Add progspace property.
727 * NEWS: Mention the new property.
729 2018-09-13 Tom Tromey <tom@tromey.com>
732 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
734 2018-09-13 Tom Tromey <tom@tromey.com>
737 * rust-lang.c (rust_enum_variant): Now static.
738 (rust_empty_enum_p): New function.
739 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
742 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
744 * python/py-inferior.c (infpy_repr): New.
745 (inferior_object_type): Register infpy_repr.
746 * python/py-objfile.c (objfpy_repr): New.
747 (objfile_object_type): Register objfpy_repr.
749 2018-09-12 John Baldwin <jhb@FreeBSD.org>
751 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
753 2018-09-12 John Baldwin <jhb@FreeBSD.org>
755 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
758 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
760 * common/common-utils.c: Don't include '<sys/stat.h>'.
761 (is_regular_file): Move to...
762 * common/filestuff.c (is_regular_file): ... here.
763 * common/common-utils.h (is_regular_file): Move to...
764 * common/filestuff.h (is_regular_file): ... here.
766 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
768 * skip.c (debug_skip): New variable.
769 (skiplist_entry::do_skip_file_p): Add debug output.
770 (skiplist_entry::do_skip_gfile_p): Likewise.
771 (skiplist_entry::skip_function_p): Likewise.
772 (_initialize_step_skip): Create debug command.
773 * NEWS: Mention set/show debug skip.
775 2018-09-11 Xavier Roirand <roirand@adacore.com>
777 * darwin-nat.c (should_disable_startup_with_shell):
779 (darwin_nat_target::create_inferior): Add call.
781 2018-09-11 Xavier Roirand <roirand@adacore.com>
783 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
784 inf_port, msg_state>: Initialize.
785 (struct darwin_thread_info) <signaled, single_step>: Change
787 (struct darwin_thread_info) <event>: Initialize.
789 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
793 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
796 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
799 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
803 * gnulib/aclocal.m4: Regenerate.
804 * gnulib/config.in: Regenerate.
805 * gnulib/configure: Regenerate.
806 * gnulib/import/Makefile.am: Update.
807 * gnulib/import/Makefile.in: Update.
808 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
809 * gnulib/import/_Noreturn.h: ... this.
810 * gnulib/import/alloca.in.h: Update.
811 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
812 * gnulib/import/arg-nonnull.h: ... this.
813 * gnulib/import/assure.h: Update.
814 * gnulib/import/at-func.c: Update.
815 * gnulib/import/basename-lgpl.c: Update.
816 * gnulib/import/extra/snippet/c++defs.h: Rename to...
817 * gnulib/import/c++defs.h: ... this.
818 * gnulib/import/canonicalize-lgpl.c: Update.
819 * gnulib/import/cdefs.h: Update.
820 * gnulib/import/chdir-long.c: Update.
821 * gnulib/import/chdir-long.h: Update.
822 * gnulib/import/cloexec.c: Update.
823 * gnulib/import/cloexec.h: Update.
824 * gnulib/import/close.c: Update.
825 * gnulib/import/closedir.c: Update.
826 * gnulib/import/config.charset: Update.
827 * gnulib/import/dirent-private.h: Update.
828 * gnulib/import/dirent.in.h: Update.
829 * gnulib/import/dirfd.c: Update.
830 * gnulib/import/dirname-lgpl.c: Update.
831 * gnulib/import/dirname.h: Update.
832 * gnulib/import/dosname.h: Update.
833 * gnulib/import/dup-safer-flag.c: Update.
834 * gnulib/import/dup-safer.c: Update.
835 * gnulib/import/dup.c: Update.
836 * gnulib/import/dup2.c: Update.
837 * gnulib/import/errno.in.h: Update.
838 * gnulib/import/error.c: Update.
839 * gnulib/import/error.h: Update.
840 * gnulib/import/exitfail.c: Update.
841 * gnulib/import/exitfail.h: Update.
842 * gnulib/import/extra/update-copyright: Update.
843 * gnulib/import/fchdir.c: Update.
844 * gnulib/import/fcntl.c: Update.
845 * gnulib/import/fcntl.in.h: Update.
846 * gnulib/import/fd-hook.c: Update.
847 * gnulib/import/fd-hook.h: Update.
848 * gnulib/import/fd-safer-flag.c: Update.
849 * gnulib/import/fd-safer.c: Update.
850 * gnulib/import/fdopendir.c: Update.
851 * gnulib/import/filename.h: Update.
852 * gnulib/import/filenamecat-lgpl.c: Update.
853 * gnulib/import/filenamecat.h: Update.
854 * gnulib/import/flexmember.h: Update.
855 * gnulib/import/float+.h: Update.
856 * gnulib/import/float.c: Update.
857 * gnulib/import/float.in.h: Update.
858 * gnulib/import/fnmatch.c: Update.
859 * gnulib/import/fnmatch.in.h: Update.
860 * gnulib/import/fnmatch_loop.c: Update.
861 * gnulib/import/fpucw.h: Update.
862 * gnulib/import/frexp.c: Update.
863 * gnulib/import/frexpl.c: Update.
864 * gnulib/import/fstat.c: Update.
865 * gnulib/import/fstatat.c: Update.
866 * gnulib/import/getcwd-lgpl.c: Update.
867 * gnulib/import/getcwd.c: Update.
868 * gnulib/import/getdtablesize.c: Update.
869 * gnulib/import/getlogin_r.c: Update.
870 * gnulib/import/getprogname.c: Update.
871 * gnulib/import/getprogname.h: Update.
872 * gnulib/import/gettext.h: Update.
873 * gnulib/import/gettimeofday.c: Update.
874 * gnulib/import/glob-libc.h: Update.
875 * gnulib/import/glob.c: Update.
876 * gnulib/import/glob.in.h: Update.
877 * gnulib/import/glob_internal.h: Update.
878 * gnulib/import/glob_pattern_p.c: Update.
879 * gnulib/import/globfree.c: Update.
880 * gnulib/import/hard-locale.c: Update.
881 * gnulib/import/hard-locale.h: Update.
882 * gnulib/import/intprops.h: Update.
883 * gnulib/import/inttypes.in.h: Update.
884 * gnulib/import/isnan.c: Update.
885 * gnulib/import/isnand-nolibm.h: Update.
886 * gnulib/import/isnand.c: Update.
887 * gnulib/import/isnanl-nolibm.h: Update.
888 * gnulib/import/isnanl.c: Update.
889 * gnulib/import/itold.c: Update.
890 * gnulib/import/libc-config.h: Update.
891 * gnulib/import/limits.in.h: Update.
892 * gnulib/import/localcharset.c: Update.
893 * gnulib/import/localcharset.h: Update.
894 * gnulib/import/localtime-buffer.c: Update.
895 * gnulib/import/localtime-buffer.h: Update.
896 * gnulib/import/lstat.c: Update.
897 * gnulib/import/m4/00gnulib.m4: Update.
898 * gnulib/import/m4/__inline.m4: Update.
899 * gnulib/import/m4/absolute-header.m4: Update.
900 * gnulib/import/m4/alloca.m4: Update.
901 * gnulib/import/m4/builtin-expect.m4: Update.
902 * gnulib/import/m4/canonicalize.m4: Update.
903 * gnulib/import/m4/chdir-long.m4: Update.
904 * gnulib/import/m4/close.m4: Update.
905 * gnulib/import/m4/closedir.m4: Update.
906 * gnulib/import/m4/configmake.m4: Update.
907 * gnulib/import/m4/d-ino.m4: Update.
908 * gnulib/import/m4/d-type.m4: Update.
909 * gnulib/import/m4/dirent_h.m4: Update.
910 * gnulib/import/m4/dirfd.m4: Update.
911 * gnulib/import/m4/dirname.m4: Update.
912 * gnulib/import/m4/double-slash-root.m4: Update.
913 * gnulib/import/m4/dup.m4: Update.
914 * gnulib/import/m4/dup2.m4: Update.
915 * gnulib/import/m4/eealloc.m4: Update.
916 * gnulib/import/m4/environ.m4: Update.
917 * gnulib/import/m4/errno_h.m4: Update.
918 * gnulib/import/m4/error.m4: Update.
919 * gnulib/import/m4/exponentd.m4: Update.
920 * gnulib/import/m4/exponentl.m4: Update.
921 * gnulib/import/m4/extensions.m4: Update.
922 * gnulib/import/m4/extern-inline.m4: Update.
923 * gnulib/import/m4/fchdir.m4: Update.
924 * gnulib/import/m4/fcntl-o.m4: Update.
925 * gnulib/import/m4/fcntl.m4: Update.
926 * gnulib/import/m4/fcntl_h.m4: Update.
927 * gnulib/import/m4/fdopendir.m4: Update.
928 * gnulib/import/m4/filenamecat.m4: Update.
929 * gnulib/import/m4/flexmember.m4: Update.
930 * gnulib/import/m4/float_h.m4: Update.
931 * gnulib/import/m4/fnmatch.m4: Update.
932 * gnulib/import/m4/fnmatch_h.m4: Update.
933 * gnulib/import/m4/fpieee.m4: Update.
934 * gnulib/import/m4/frexp.m4: Update.
935 * gnulib/import/m4/frexpl.m4: Update.
936 * gnulib/import/m4/fstat.m4: Update.
937 * gnulib/import/m4/fstatat.m4: Update.
938 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
939 * gnulib/import/m4/getcwd-path-max.m4: Update.
940 * gnulib/import/m4/getcwd.m4: Update.
941 * gnulib/import/m4/getdtablesize.m4: Update.
942 * gnulib/import/m4/getlogin.m4: Update.
943 * gnulib/import/m4/getlogin_r.m4: Update.
944 * gnulib/import/m4/getpagesize.m4: Update.
945 * gnulib/import/m4/getprogname.m4: Update.
946 * gnulib/import/m4/gettimeofday.m4: Update.
947 * gnulib/import/m4/glibc21.m4: Update.
948 * gnulib/import/m4/glob.m4: Update.
949 * gnulib/import/m4/glob_h.m4: Update.
950 * gnulib/import/m4/gnulib-cache.m4: Update.
951 * gnulib/import/m4/gnulib-common.m4: Update.
952 * gnulib/import/m4/gnulib-comp.m4: Update.
953 * gnulib/import/m4/gnulib-tool.m4: Update.
954 * gnulib/import/m4/hard-locale.m4: Update.
955 * gnulib/import/m4/include_next.m4: Update.
956 * gnulib/import/m4/inttypes-pri.m4: Update.
957 * gnulib/import/m4/inttypes.m4: Update.
958 * gnulib/import/m4/isnand.m4: Update.
959 * gnulib/import/m4/isnanl.m4: Update.
960 * gnulib/import/m4/largefile.m4: Update.
961 * gnulib/import/m4/limits-h.m4: Update.
962 * gnulib/import/m4/localcharset.m4: Update.
963 * gnulib/import/m4/locale-fr.m4: Update.
964 * gnulib/import/m4/locale-ja.m4: Update.
965 * gnulib/import/m4/locale-zh.m4: Update.
966 * gnulib/import/m4/localtime-buffer.m4: Update.
967 * gnulib/import/m4/longlong.m4: Update.
968 * gnulib/import/m4/lstat.m4: Update.
969 * gnulib/import/m4/malloc.m4: Update.
970 * gnulib/import/m4/malloca.m4: Update.
971 * gnulib/import/m4/math_h.m4: Update.
972 * gnulib/import/m4/mbrtowc.m4: Update.
973 * gnulib/import/m4/mbsinit.m4: Update.
974 * gnulib/import/m4/mbsrtowcs.m4: Update.
975 * gnulib/import/m4/mbstate_t.m4: Update.
976 * gnulib/import/m4/memchr.m4: Update.
977 * gnulib/import/m4/memmem.m4: Update.
978 * gnulib/import/m4/mempcpy.m4: Update.
979 * gnulib/import/m4/memrchr.m4: Update.
980 * gnulib/import/m4/mkdir.m4: Update.
981 * gnulib/import/m4/mkstemp.m4: Update.
982 * gnulib/import/m4/mmap-anon.m4: Update.
983 * gnulib/import/m4/mode_t.m4: Update.
984 * gnulib/import/m4/msvc-inval.m4: Update.
985 * gnulib/import/m4/msvc-nothrow.m4: Update.
986 * gnulib/import/m4/multiarch.m4: Update.
987 * gnulib/import/m4/nocrash.m4: Update.
988 * gnulib/import/m4/off_t.m4: Update.
989 * gnulib/import/m4/onceonly.m4: Update.
990 * gnulib/import/m4/open-cloexec.m4: Update.
991 * gnulib/import/m4/open.m4: Update.
992 * gnulib/import/m4/openat.m4: Update.
993 * gnulib/import/m4/opendir.m4: Update.
994 * gnulib/import/m4/pathmax.m4: Update.
995 * gnulib/import/m4/rawmemchr.m4: Update.
996 * gnulib/import/m4/readdir.m4: Update.
997 * gnulib/import/m4/readlink.m4: Update.
998 * gnulib/import/m4/realloc.m4: Update.
999 * gnulib/import/m4/rename.m4: Update.
1000 * gnulib/import/m4/rewinddir.m4: Update.
1001 * gnulib/import/m4/rmdir.m4: Update.
1002 * gnulib/import/m4/save-cwd.m4: Update.
1003 * gnulib/import/m4/secure_getenv.m4: Update.
1004 * gnulib/import/m4/setenv.m4: Update.
1005 * gnulib/import/m4/signal_h.m4: Update.
1006 * gnulib/import/m4/ssize_t.m4: Update.
1007 * gnulib/import/m4/stat-time.m4: Update.
1008 * gnulib/import/m4/stat.m4: Update.
1009 * gnulib/import/m4/std-gnu11.m4: Update.
1010 * gnulib/import/m4/stdbool.m4: Update.
1011 * gnulib/import/m4/stddef_h.m4: Update.
1012 * gnulib/import/m4/stdint.m4: Update.
1013 * gnulib/import/m4/stdio_h.m4: Update.
1014 * gnulib/import/m4/stdlib_h.m4: Update.
1015 * gnulib/import/m4/strchrnul.m4: Update.
1016 * gnulib/import/m4/strdup.m4: Update.
1017 * gnulib/import/m4/strerror.m4: Update.
1018 * gnulib/import/m4/string_h.m4: Update.
1019 * gnulib/import/m4/strstr.m4: Update.
1020 * gnulib/import/m4/strtok_r.m4: Update.
1021 * gnulib/import/m4/sys_socket_h.m4: Update.
1022 * gnulib/import/m4/sys_stat_h.m4: Update.
1023 * gnulib/import/m4/sys_time_h.m4: Update.
1024 * gnulib/import/m4/sys_types_h.m4: Update.
1025 * gnulib/import/m4/tempname.m4: Update.
1026 * gnulib/import/m4/time_h.m4: Update.
1027 * gnulib/import/m4/unistd-safer.m4: Update.
1028 * gnulib/import/m4/unistd_h.m4: Update.
1029 * gnulib/import/m4/warn-on-use.m4: Update.
1030 * gnulib/import/m4/wchar_h.m4: Update.
1031 * gnulib/import/m4/wchar_t.m4: Update.
1032 * gnulib/import/m4/wctype_h.m4: Update.
1033 * gnulib/import/m4/wint_t.m4: Update.
1034 * gnulib/import/malloc.c: Update.
1035 * gnulib/import/malloc/scratch_buffer.h: Update.
1036 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1037 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1038 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1039 * gnulib/import/malloca.c: Update.
1040 * gnulib/import/malloca.h: Update.
1041 * gnulib/import/malloca.valgrind: Update.
1042 * gnulib/import/math.in.h: Update.
1043 * gnulib/import/mbrtowc.c: Update.
1044 * gnulib/import/mbsinit.c: Update.
1045 * gnulib/import/mbsrtowcs-impl.h: Update.
1046 * gnulib/import/mbsrtowcs-state.c: Update.
1047 * gnulib/import/mbsrtowcs.c: Update.
1048 * gnulib/import/memchr.c: Update.
1049 * gnulib/import/memmem.c: Update.
1050 * gnulib/import/mempcpy.c: Update.
1051 * gnulib/import/memrchr.c: Update.
1052 * gnulib/import/mkdir.c: Update.
1053 * gnulib/import/mkstemp.c: Update.
1054 * gnulib/import/msvc-inval.c: Update.
1055 * gnulib/import/msvc-inval.h: Update.
1056 * gnulib/import/msvc-nothrow.c: Update.
1057 * gnulib/import/msvc-nothrow.h: Update.
1058 * gnulib/import/open.c: Update.
1059 * gnulib/import/openat-die.c: Update.
1060 * gnulib/import/openat-priv.h: Update.
1061 * gnulib/import/openat-proc.c: Update.
1062 * gnulib/import/openat.c: Update.
1063 * gnulib/import/openat.h: Update.
1064 * gnulib/import/opendir.c: Update.
1065 * gnulib/import/pathmax.h: Update.
1066 * gnulib/import/pipe-safer.c: Update.
1067 * gnulib/import/rawmemchr.c: Update.
1068 * gnulib/import/readdir.c: Update.
1069 * gnulib/import/readlink.c: Update.
1070 * gnulib/import/realloc.c: Update.
1071 * gnulib/import/ref-add.sin: Update.
1072 * gnulib/import/ref-del.sin: Update.
1073 * gnulib/import/rename.c: Update.
1074 * gnulib/import/rewinddir.c: Update.
1075 * gnulib/import/rmdir.c: Update.
1076 * gnulib/import/same-inode.h: Update.
1077 * gnulib/import/save-cwd.c: Update.
1078 * gnulib/import/save-cwd.h: Update.
1079 * gnulib/import/scratch_buffer.h: Update.
1080 * gnulib/import/secure_getenv.c: Update.
1081 * gnulib/import/setenv.c: Update.
1082 * gnulib/import/signal.in.h: Update.
1083 * gnulib/import/stat-time.c: Update.
1084 * gnulib/import/stat-time.h: Update.
1085 * gnulib/import/stat-w32.c: Update.
1086 * gnulib/import/stat-w32.h: Update.
1087 * gnulib/import/stat.c: Update.
1088 * gnulib/import/stdbool.in.h: Update.
1089 * gnulib/import/stddef.in.h: Update.
1090 * gnulib/import/stdint.in.h: Update.
1091 * gnulib/import/stdio.in.h: Update.
1092 * gnulib/import/stdlib.in.h: Update.
1093 * gnulib/import/str-two-way.h: Update.
1094 * gnulib/import/strchrnul.c: Update.
1095 * gnulib/import/strdup.c: Update.
1096 * gnulib/import/streq.h: Update.
1097 * gnulib/import/strerror-override.c: Update.
1098 * gnulib/import/strerror-override.h: Update.
1099 * gnulib/import/strerror.c: Update.
1100 * gnulib/import/string.in.h: Update.
1101 * gnulib/import/stripslash.c: Update.
1102 * gnulib/import/strnlen1.c: Update.
1103 * gnulib/import/strnlen1.h: Update.
1104 * gnulib/import/strstr.c: Update.
1105 * gnulib/import/strtok_r.c: Update.
1106 * gnulib/import/sys_stat.in.h: Update.
1107 * gnulib/import/sys_time.in.h: Update.
1108 * gnulib/import/sys_types.in.h: Update.
1109 * gnulib/import/tempname.c: Update.
1110 * gnulib/import/tempname.h: Update.
1111 * gnulib/import/time.in.h: Update.
1112 * gnulib/import/unistd--.h: Update.
1113 * gnulib/import/unistd-safer.h: Update.
1114 * gnulib/import/unistd.in.h: Update.
1115 * gnulib/import/unsetenv.c: Update.
1116 * gnulib/import/verify.h: Update.
1117 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1118 * gnulib/import/wchar.in.h: Update.
1119 * gnulib/import/wctype.in.h: Update.
1120 * gnulib/import/xalloc-oversized.h: Update.
1121 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1122 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1124 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
1126 * record-btrace.c (get_thread_current_frame): Remove
1129 2018-09-10 Jerome Guitton <guitton@adacore.com>
1131 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1132 with check_tag to 1 if and only if the type is tagged and the
1133 component being searched cannot been found in the current
1134 view. Otherwise, always call ada_to_fixed_type with
1137 2018-09-10 Xavier Roirand <roirand@adacore.com>
1139 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1141 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1142 * ada-varobj.c (ada_varobj_get_number_of_children,
1143 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1145 2018-09-10 Xavier Roirand <roirand@adacore.com>
1147 * ada-valprint.c (ada_value_print): Use type instead of
1150 2018-09-10 Xavier Roirand <roirand@adacore.com>
1152 * ada-lang.c (ada_value_subscript): Handle case when parameter is
1153 an array of access to unconstrained array.
1155 2018-09-10 Xavier Roirand <roirand@adacore.com>
1157 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1158 (ada_check_typedef): Use it.
1160 2018-09-10 Xavier Roirand <roirand@adacore.com>
1162 * ada-varobj.c (ada_varobj_describe_struct_child)
1163 (ada_varobj_describe_child): Handle union case like struct one.
1165 2018-09-10 Tom Tromey <tom@tromey.com>
1168 * python/python.c (_initialize_python): Make example in "python"
1169 help work in Python 3.
1171 2018-09-10 Eli Zaretskii <eliz@gnu.org>
1173 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1174 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
1175 $(EXEEXT) to the script, as it is not a program.
1177 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
1179 * python/py-prettyprint.c (pretty_print_one_value): Return
1181 (print_string_repr): Adjust.
1182 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1183 * python/python-internal.h (apply_varobj_pretty_printer): Return
1185 * varobj.c (varobj_value_get_print_value): Adjust.
1187 2018-09-08 Tom Tromey <tom@tromey.com>
1190 * python/py-prettyprint.c (pretty_print_one_value): Check for
1193 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1195 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1196 replace_operator_with_call.
1198 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1200 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1202 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1204 * ada-typeprint.c (print_range): Print the bounds using TYPE
1205 rather than its TYPE_TARGET_TYPE.
1207 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1209 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1210 call to ada_to_fixed_value_create.
1212 2018-09-08 Jerome Guitton <guitton@adacore.com>
1214 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1216 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1218 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1221 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1223 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1224 Move update of loop variable "fi".
1226 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1228 * ada-lang.c (value_assign_to_component): In the case of
1229 big-endian targets, extract the bits of the given VAL
1230 using an src_offset of zero if container is not a scalar.
1232 2018-09-06 Simon Ser <contact@emersion.fr>
1235 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1236 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1237 * fbsd-tdep.c (fbsd_make_note_desc): New.
1238 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1239 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1240 * target.h (enum target_object) Add FreeBSD-specific
1241 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1243 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1245 * compile/compile-c.h (generate_c_for_variable_locations):
1246 Change reference to pointer.
1247 * compile/compile-c-support.c (compile_program) <compute>:
1249 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1250 (generate_c_for_for_one_variable): Likewise
1251 (generate_c_for_variable_locations): Likewise
1252 * compile/compile-c-types.c (compile_c_instance::convert_type):
1254 * compile/compile-cplus-symbols.c (convert_one_symbol):
1255 std::move the scope passed to enter_scope.
1256 * compile/compile-cplus-types.c
1257 (compile_cplus_instance::enter_scope): Make parameter
1259 (compile_cplus_instance::new_scope): Change reference to
1261 (compile_cplus_instance::convert_type): Likewise
1262 (compile_cplus_convert_typedef): std::move the scope passed to
1264 (compile_cplus_convert_struct_or_union): Likewise.
1265 (compile_cplus_convert_enum): Likewise.
1266 (compile_cplus_convert_namespace): Likewise.
1267 * compile/compile-cplus.h (compile_cplus_instance)
1268 <enter_scope>: Make parameter rvalue-reference.
1269 * compile/compile-internal.h (compile_instance)
1270 <get_cached_type>: Likewise
1271 * compile/compile-loc2c.c (push): Likewise
1275 (print_label): Likewise
1276 (pushf_register_address): Likewise
1277 (pushf_register): Likewise
1278 (do_compile_dwarf_expr_to_c): Likewise
1279 (compile_dwarf_expr_to_c): Likewise
1280 (compile_dwarf_bounds_to_c): Likewise
1281 * compile/compile.c (compile_instance::get_cached_type):
1283 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1284 (compile_dwarf_bounds_to_c): Likewise
1285 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1286 (dwarf2_compile_property_to_c): Likewise
1287 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1288 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1291 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1293 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1294 * tui/tui-data.c (init_content_element): Don't initialize it.
1296 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1298 * tui/tui-data.h (struct tui_win_info)
1299 <detail::opaque>: Remove.
1300 * tui/tui-data.c (init_win_info): Remove assignment.
1302 2018-09-05 Tom Tromey <tom@tromey.com>
1304 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1305 -Wformat-nonliteral.
1306 * target-float.c (host_float_ops<T>::to_string)
1307 (host_float_ops<T>::from_string): Use
1308 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1309 * configure: Rebuild.
1311 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
1313 * printcmd.c (printf_c_string): Use
1314 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1315 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1317 2018-09-05 Tom Tromey <tom@tromey.com>
1319 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1321 2018-09-05 Tom de Vries <tdevries@suse.de>
1323 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1324 with resolve_abstract_p == true.
1325 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1326 defaulting to false. Propagate resolve_abstract_p to
1327 dwarf2_fetch_die_loc_sect_off.
1328 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1329 parameter, defaulting to false.
1330 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1331 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1333 * dwarf2read.h (struct die_info): Forward-declare.
1334 (die_info_ptr): New typedef.
1335 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1337 2018-09-05 Joel Brobecker <brobecker@adacore.com>
1341 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
1342 Pedro Alves <palves@redhat.com>
1344 * gnulib/Makefile.in (aclocal_m4_deps): Move to
1345 "aclocal-m4-deps.mk". Include file here.
1346 $(srcdir)/aclocal.m4: Add "configure.ac".
1347 * gnulib/aclocal-m4-deps.mk: New file.
1348 * gnulib/update-gnulib.sh: Automatically update
1349 "aclocal-m4-deps.mk".
1351 2018-09-04 Tom Tromey <tom@tromey.com>
1353 * configure: Rebuild.
1354 * configure.ac: Remove multi-ice code.
1356 2018-09-04 Tom Tromey <tom@tromey.com>
1358 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1359 (ada-exp.o): Update.
1361 2018-09-04 Tom Tromey <tom@tromey.com>
1363 * Makefile.in (printcmd.o, target-float.o): Remove.
1364 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1366 2018-09-04 Tom Tromey <tom@tromey.com>
1368 * gnulib/Makefile.in: Remove obsolete comment.
1369 * Makefile.in: Remove obsolete comment.
1371 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
1373 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1376 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1378 * riscv-tdep.c: Add 'prologue-value.h' include.
1379 (struct riscv_unwind_cache): New struct.
1380 (riscv_debug_unwinder): New global.
1381 (riscv_scan_prologue): Update arguments, capture register details
1383 (riscv_skip_prologue): Reformat arguments line, move end of
1384 prologue calculation into riscv_scan_prologue.
1385 (riscv_frame_cache): Update return type, create
1386 riscv_unwind_cache, scan the prologue, and fill in remaining cache
1388 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1389 (riscv_frame_prev_register): Use the trad_frame within the
1391 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1394 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1396 * trad-frame.h (trad_frame_set_realreg): Declare.
1397 (trad_frame_set_addr): Declare.
1398 * trad-frame.c (trad_frame_set_realreg): Define new function.
1399 (trad_frame_set_addr): Define new function.
1400 (trad_frame_set_reg_realreg): Use new function.
1401 (trad_frame_set_reg_addr): Use new function.
1403 2018-09-01 Keith Seitz <keiths@redhat.com>
1405 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1406 pulongest instead of "%lld".
1407 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1410 2018-08-31 Tom Tromey <tom@tromey.com>
1412 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1415 2018-08-31 Pedro Alves <palves@redhat.com>
1417 * gdbarch.h: Regenerate.
1419 2018-08-31 Pedro Alves <palves@redhat.com>
1421 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1422 * target.h (Hardware watchpoint interfaces): Describe
1423 continuable/steppable/non-steppable watchpoints.
1424 * gdbarch.h, gdbarch.c: Regenerate.
1426 2018-08-31 Pedro Alves <palves@redhat.com>
1428 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1431 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1432 * target.h (target_ops::have_continuable_watchpoint): Delete.
1433 (target_have_continuable_watchpoint): Delete.
1434 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1435 * target-delegates.c: Regenerate.
1437 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1439 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1440 the files present in "gnulib/import/m4/".
1442 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1444 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1445 c.sw, c.swsp, and c.sdsp.
1447 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1449 * riscv-tdep.c (struct riscv_inferior_data): Delete.
1450 (riscv_read_misa_reg): Don't cache value read into inferior data.
1451 (riscv_new_inferior_data): Delete.
1452 (riscv_inferior_data_cleanup): Delete.
1453 (riscv_inferior_data): Delete.
1454 (riscv_invalidate_inferior_data): Delete.
1455 (_initialize_riscv_tdep): Remove initialisation of inferior data.
1457 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
1459 * compile/compile-cplus-types.c
1460 (compile_cplus_instance::leave_scope): Take the address of scope
1462 (compile_cplus_instance::convert_qualified_base): Compare quals
1465 2018-08-30 Keith Seitz <keiths@redhat.com>
1467 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1468 Use "%s" and host_address_to_string instead of "%p" in printf.
1470 2018-08-29 Keith Seitz <keiths@redhat.com>
1472 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1473 and compile-cplus-types.c.
1474 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1475 * c-lang.c (cplus_language_defn): Set C++ compile functions.
1476 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1478 * compile/compile-c-support.c: Include compile-cplus.h.
1479 (load_libcompile): Templatize.
1480 (get_compile_context): "New" function.
1481 (c_get_compile_context): Use get_compile_context.
1482 (cplus_get_compile_context): New function.
1483 (cplus_push_user_expression, cplus_pop_user_expression)
1484 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1485 (cplus_compute_program): Define new structs/functions.
1486 * compile/compile-cplus-symmbols.c: New file.
1487 * compile/compile-cplus-types.c: New file.
1488 * compile/compile-cplus.h: New file.
1489 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1491 * compile/compile-object-load.c (get_out_value_type): Use
1492 strncmp_iw when comparing symbol names.
1493 (compile_object_load): Add mst_bss and mst_data.
1494 * compile/compile.c (_initialize_compile): Remove
1495 -Wno-implicit-function-declaration from `compile_args'.
1496 * compile/gcc-cp-plugin.h: New file.
1497 * NEWS: Mention C++ compile support and new debug options.
1499 2018-08-29 Keith Seitz <keiths@redhat.com>
1501 * linespec.c (collect_info::add_symbol): Make virtual.
1502 (struct symbol_searcher_collect_info): New struct.
1503 (symbol_searcher::find_all_symbols): New method.
1504 * symtab.h (class symbol_searcher): New class.
1506 2018-08-29 Keith Seitz <keiths@redhat.com>
1508 * linespec.c (struct linespec) <function_symbols, label_symbols>:
1509 Change to vector of block_symbol. Update all users.
1510 (struct collect_info) <symbols>: Likewise.
1511 (collect_info::add_symbol): Take block_symbol as argument.
1513 (decode_compound_collector) <m_symbols>: Change type to vector
1514 of block_symbol. Update all users.
1515 (decode_compound_collector::operator ()): Change parameter type
1517 (find_method, find_function_symbols, find_linespec_symbols)
1518 (find_label_symbols_in_block, find_label_symbols): Change symbol
1519 vectors to block_symbol vectors.
1520 * symtab.h (symbol_found_callback_ftype): Change parameter type to
1523 2018-08-29 Keith Seitz <keiths@redhat.com>
1525 * linespec.c (symbolp): Remove typedef and VEC definitions.
1526 (bound_minimal_symbol_d): Likewise.
1528 2018-08-29 Keith Seitz <keiths@redhat.com>
1530 * linespec.c (decode_compound_collector::decode_compound_collector):
1531 Remove initialization for `m_symtabs'.
1532 (decode_compound_collector::release_symbols): Change return type
1533 to std::vector. Update all callers.
1534 (class decode_compound_collector) <m_symbols>: Change type to
1536 (lookup_prefix_sym): Change return type to std::vector. Update all
1538 (compare_symbols): Remove.
1539 (std_compare_symbols): Rename to `compare_symbols'.
1540 (find_method): Change `sym_classes' parameter to std::vector.
1541 Update all callers. Use std::sort to sort sym_classes.
1542 (find_linespec_symbols): Remove cleanup.
1544 2018-08-29 Keith Seitz <keiths@redhat.com>
1546 * linespec.c (struct linespec) <minimal_symbols>: Change type to
1547 std::vector. Update all users.
1548 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1549 (struct collect_info) <minimal_symbols>: Likewise.
1550 (compare_msymbols): Return bool. Change parameters to const
1551 bound_minimal_symbol references.
1552 (find_method, find_function_symbols, find_linespec_symbols): Change
1553 `minsyms' parameter to std::vector. Update all callers.
1555 2018-08-29 Keith Seitz <keiths@redhat.com>
1557 * linespec.c (struct linespec) <label_symbols>: Change type to
1558 std::vector. Update all users.
1559 (find_label_symbols_in_block): Change `result' parameter to
1560 std::vector. Update all callers.
1561 (find_label_symbols): Return std::vector. Update all callers.
1563 2018-08-29 Keith Seitz <keiths@redhat.com>
1565 * linespec.c (struct linespec) <function_symbols>: Change type to
1566 std::vector. Update all users.
1567 (struct collect_info) <function_symbols>: Likewise.
1568 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1569 (std_compare_symbols): New function.
1570 (find_method, find_function_symbols, find_linespec_symbols)
1571 (find_label_symbols_in_block): Change `symbols' parameter to
1572 std::vector. Update all callers.
1573 (find_label_symbols): Likewise for `function_symbols' and
1576 2018-08-29 Keith Seitz <keiths@redhat.com>
1578 * linespec.c (symtab_vector_up): Define.
1579 (struct linespec) <file_symtabs>: Change type to std::vector *.
1581 (struct collect_info) <file_symtabs>: Likewise.
1582 (collect_symtabs_from_filename): Return symtab_vector_up.
1584 (decode_objc): Remove cleanup.
1585 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1586 (symtab_collector::release_symtabs): Return symtab_vector_up.
1588 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1590 (collect_symtabs_from_filename, symtabs_from_filename): Return
1591 symtab_vector_up. Update all callers.
1593 2018-08-29 Tom Tromey <tom@tromey.com>
1595 * csky-tdep.c (csky_analyze_prologue): Use
1596 core_addr_to_string_nz.
1598 2018-08-29 Tom Tromey <tom@tromey.com>
1600 * windows-nat.c (struct xlate_exception) <them>: Change type to
1602 (xlate): Fix formatting. Remove last entry.
1603 (struct xlate_exception, xlate): Comment out.
1604 (windows_nat_target::resume): Use ranged for.
1606 2018-08-29 Jim Wilson <jimw@sifive.com>
1608 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1609 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1611 (riscv_linux_nat_target::store_registers): Likewise.
1613 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1617 * gnulib/aclocal.m4: Regenerate.
1618 * gnulib/config.in: Regenerate.
1619 * gnulib/configure: Regenerate.
1620 * gnulib/import/Makefile.am: Update.
1621 * gnulib/import/Makefile.in: Update.
1622 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1623 * gnulib/import/_Noreturn.h: ... this.
1624 * gnulib/import/alloca.in.h: Update.
1625 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1626 * gnulib/import/arg-nonnull.h: ... this.
1627 * gnulib/import/assure.h: Update.
1628 * gnulib/import/at-func.c: Update.
1629 * gnulib/import/basename-lgpl.c: Update.
1630 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1631 * gnulib/import/c++defs.h: ... this.
1632 * gnulib/import/canonicalize-lgpl.c: Update.
1633 * gnulib/import/cdefs.h: Update.
1634 * gnulib/import/chdir-long.c: Update.
1635 * gnulib/import/chdir-long.h: Update.
1636 * gnulib/import/cloexec.c: Update.
1637 * gnulib/import/cloexec.h: Update.
1638 * gnulib/import/close.c: Update.
1639 * gnulib/import/closedir.c: Update.
1640 * gnulib/import/config.charset: Update.
1641 * gnulib/import/dirent-private.h: Update.
1642 * gnulib/import/dirent.in.h: Update.
1643 * gnulib/import/dirfd.c: Update.
1644 * gnulib/import/dirname-lgpl.c: Update.
1645 * gnulib/import/dirname.h: Update.
1646 * gnulib/import/dosname.h: Update.
1647 * gnulib/import/dup-safer-flag.c: Update.
1648 * gnulib/import/dup-safer.c: Update.
1649 * gnulib/import/dup.c: Update.
1650 * gnulib/import/dup2.c: Update.
1651 * gnulib/import/errno.in.h: Update.
1652 * gnulib/import/error.c: Update.
1653 * gnulib/import/error.h: Update.
1654 * gnulib/import/exitfail.c: Update.
1655 * gnulib/import/exitfail.h: Update.
1656 * gnulib/import/extra/update-copyright: Update.
1657 * gnulib/import/fchdir.c: Update.
1658 * gnulib/import/fcntl.c: Update.
1659 * gnulib/import/fcntl.in.h: Update.
1660 * gnulib/import/fd-hook.c: Update.
1661 * gnulib/import/fd-hook.h: Update.
1662 * gnulib/import/fd-safer-flag.c: Update.
1663 * gnulib/import/fd-safer.c: Update.
1664 * gnulib/import/fdopendir.c: Update.
1665 * gnulib/import/filename.h: Update.
1666 * gnulib/import/filenamecat-lgpl.c: Update.
1667 * gnulib/import/filenamecat.h: Update.
1668 * gnulib/import/flexmember.h: Update.
1669 * gnulib/import/float+.h: Update.
1670 * gnulib/import/float.c: Update.
1671 * gnulib/import/float.in.h: Update.
1672 * gnulib/import/fnmatch.c: Update.
1673 * gnulib/import/fnmatch.in.h: Update.
1674 * gnulib/import/fnmatch_loop.c: Update.
1675 * gnulib/import/fpucw.h: Update.
1676 * gnulib/import/frexp.c: Update.
1677 * gnulib/import/frexpl.c: Update.
1678 * gnulib/import/fstat.c: Update.
1679 * gnulib/import/fstatat.c: Update.
1680 * gnulib/import/getcwd-lgpl.c: Update.
1681 * gnulib/import/getcwd.c: Update.
1682 * gnulib/import/getdtablesize.c: Update.
1683 * gnulib/import/getlogin_r.c: Update.
1684 * gnulib/import/getprogname.c: Update.
1685 * gnulib/import/getprogname.h: Update.
1686 * gnulib/import/gettext.h: Update.
1687 * gnulib/import/gettimeofday.c: Update.
1688 * gnulib/import/glob-libc.h: Update.
1689 * gnulib/import/glob.c: Update.
1690 * gnulib/import/glob.in.h: Update.
1691 * gnulib/import/glob_internal.h: Update.
1692 * gnulib/import/glob_pattern_p.c: Update.
1693 * gnulib/import/globfree.c: Update.
1694 * gnulib/import/hard-locale.c: Update.
1695 * gnulib/import/hard-locale.h: Update.
1696 * gnulib/import/intprops.h: Update.
1697 * gnulib/import/inttypes.in.h: Update.
1698 * gnulib/import/isnan.c: Update.
1699 * gnulib/import/isnand-nolibm.h: Update.
1700 * gnulib/import/isnand.c: Update.
1701 * gnulib/import/isnanl-nolibm.h: Update.
1702 * gnulib/import/isnanl.c: Update.
1703 * gnulib/import/itold.c: Update.
1704 * gnulib/import/libc-config.h: Update.
1705 * gnulib/import/limits.in.h: Update.
1706 * gnulib/import/localcharset.c: Update.
1707 * gnulib/import/localcharset.h: Update.
1708 * gnulib/import/localtime-buffer.c: Update.
1709 * gnulib/import/localtime-buffer.h: Update.
1710 * gnulib/import/lstat.c: Update.
1711 * gnulib/import/m4/00gnulib.m4: Update.
1712 * gnulib/import/m4/__inline.m4: Update.
1713 * gnulib/import/m4/absolute-header.m4: Update.
1714 * gnulib/import/m4/alloca.m4: Update.
1715 * gnulib/import/m4/builtin-expect.m4: Update.
1716 * gnulib/import/m4/canonicalize.m4: Update.
1717 * gnulib/import/m4/chdir-long.m4: Update.
1718 * gnulib/import/m4/close.m4: Update.
1719 * gnulib/import/m4/closedir.m4: Update.
1720 * gnulib/import/m4/configmake.m4: Update.
1721 * gnulib/import/m4/d-ino.m4: Update.
1722 * gnulib/import/m4/d-type.m4: Update.
1723 * gnulib/import/m4/dirent_h.m4: Update.
1724 * gnulib/import/m4/dirfd.m4: Update.
1725 * gnulib/import/m4/dirname.m4: Update.
1726 * gnulib/import/m4/double-slash-root.m4: Update.
1727 * gnulib/import/m4/dup.m4: Update.
1728 * gnulib/import/m4/dup2.m4: Update.
1729 * gnulib/import/m4/eealloc.m4: Update.
1730 * gnulib/import/m4/environ.m4: Update.
1731 * gnulib/import/m4/errno_h.m4: Update.
1732 * gnulib/import/m4/error.m4: Update.
1733 * gnulib/import/m4/exponentd.m4: Update.
1734 * gnulib/import/m4/exponentl.m4: Update.
1735 * gnulib/import/m4/extensions.m4: Update.
1736 * gnulib/import/m4/extern-inline.m4: Update.
1737 * gnulib/import/m4/fchdir.m4: Update.
1738 * gnulib/import/m4/fcntl-o.m4: Update.
1739 * gnulib/import/m4/fcntl.m4: Update.
1740 * gnulib/import/m4/fcntl_h.m4: Update.
1741 * gnulib/import/m4/fdopendir.m4: Update.
1742 * gnulib/import/m4/filenamecat.m4: Update.
1743 * gnulib/import/m4/flexmember.m4: Update.
1744 * gnulib/import/m4/float_h.m4: Update.
1745 * gnulib/import/m4/fnmatch.m4: Update.
1746 * gnulib/import/m4/fnmatch_h.m4: Update.
1747 * gnulib/import/m4/fpieee.m4: Update.
1748 * gnulib/import/m4/frexp.m4: Update.
1749 * gnulib/import/m4/frexpl.m4: Update.
1750 * gnulib/import/m4/fstat.m4: Update.
1751 * gnulib/import/m4/fstatat.m4: Update.
1752 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1753 * gnulib/import/m4/getcwd-path-max.m4: Update.
1754 * gnulib/import/m4/getcwd.m4: Update.
1755 * gnulib/import/m4/getdtablesize.m4: Update.
1756 * gnulib/import/m4/getlogin.m4: Update.
1757 * gnulib/import/m4/getlogin_r.m4: Update.
1758 * gnulib/import/m4/getpagesize.m4: Update.
1759 * gnulib/import/m4/getprogname.m4: Update.
1760 * gnulib/import/m4/gettimeofday.m4: Update.
1761 * gnulib/import/m4/glibc21.m4: Update.
1762 * gnulib/import/m4/glob.m4: Update.
1763 * gnulib/import/m4/glob_h.m4: Update.
1764 * gnulib/import/m4/gnulib-cache.m4: Update.
1765 * gnulib/import/m4/gnulib-common.m4: Update.
1766 * gnulib/import/m4/gnulib-comp.m4: Update.
1767 * gnulib/import/m4/gnulib-tool.m4: Update.
1768 * gnulib/import/m4/hard-locale.m4: Update.
1769 * gnulib/import/m4/include_next.m4: Update.
1770 * gnulib/import/m4/inttypes-pri.m4: Update.
1771 * gnulib/import/m4/inttypes.m4: Update.
1772 * gnulib/import/m4/isnand.m4: Update.
1773 * gnulib/import/m4/isnanl.m4: Update.
1774 * gnulib/import/m4/largefile.m4: Update.
1775 * gnulib/import/m4/limits-h.m4: Update.
1776 * gnulib/import/m4/localcharset.m4: Update.
1777 * gnulib/import/m4/locale-fr.m4: Update.
1778 * gnulib/import/m4/locale-ja.m4: Update.
1779 * gnulib/import/m4/locale-zh.m4: Update.
1780 * gnulib/import/m4/localtime-buffer.m4: Update.
1781 * gnulib/import/m4/longlong.m4: Update.
1782 * gnulib/import/m4/lstat.m4: Update.
1783 * gnulib/import/m4/malloc.m4: Update.
1784 * gnulib/import/m4/malloca.m4: Update.
1785 * gnulib/import/m4/math_h.m4: Update.
1786 * gnulib/import/m4/mbrtowc.m4: Update.
1787 * gnulib/import/m4/mbsinit.m4: Update.
1788 * gnulib/import/m4/mbsrtowcs.m4: Update.
1789 * gnulib/import/m4/mbstate_t.m4: Update.
1790 * gnulib/import/m4/memchr.m4: Update.
1791 * gnulib/import/m4/memmem.m4: Update.
1792 * gnulib/import/m4/mempcpy.m4: Update.
1793 * gnulib/import/m4/memrchr.m4: Update.
1794 * gnulib/import/m4/mkdir.m4: Update.
1795 * gnulib/import/m4/mkstemp.m4: Update.
1796 * gnulib/import/m4/mmap-anon.m4: Update.
1797 * gnulib/import/m4/mode_t.m4: Update.
1798 * gnulib/import/m4/msvc-inval.m4: Update.
1799 * gnulib/import/m4/msvc-nothrow.m4: Update.
1800 * gnulib/import/m4/multiarch.m4: Update.
1801 * gnulib/import/m4/nocrash.m4: Update.
1802 * gnulib/import/m4/off_t.m4: Update.
1803 * gnulib/import/m4/onceonly.m4: Update.
1804 * gnulib/import/m4/open-cloexec.m4: Update.
1805 * gnulib/import/m4/open.m4: Update.
1806 * gnulib/import/m4/openat.m4: Update.
1807 * gnulib/import/m4/opendir.m4: Update.
1808 * gnulib/import/m4/pathmax.m4: Update.
1809 * gnulib/import/m4/rawmemchr.m4: Update.
1810 * gnulib/import/m4/readdir.m4: Update.
1811 * gnulib/import/m4/readlink.m4: Update.
1812 * gnulib/import/m4/realloc.m4: Update.
1813 * gnulib/import/m4/rename.m4: Update.
1814 * gnulib/import/m4/rewinddir.m4: Update.
1815 * gnulib/import/m4/rmdir.m4: Update.
1816 * gnulib/import/m4/save-cwd.m4: Update.
1817 * gnulib/import/m4/secure_getenv.m4: Update.
1818 * gnulib/import/m4/setenv.m4: Update.
1819 * gnulib/import/m4/signal_h.m4: Update.
1820 * gnulib/import/m4/ssize_t.m4: Update.
1821 * gnulib/import/m4/stat-time.m4: Update.
1822 * gnulib/import/m4/stat.m4: Update.
1823 * gnulib/import/m4/std-gnu11.m4: Update.
1824 * gnulib/import/m4/stdbool.m4: Update.
1825 * gnulib/import/m4/stddef_h.m4: Update.
1826 * gnulib/import/m4/stdint.m4: Update.
1827 * gnulib/import/m4/stdio_h.m4: Update.
1828 * gnulib/import/m4/stdlib_h.m4: Update.
1829 * gnulib/import/m4/strchrnul.m4: Update.
1830 * gnulib/import/m4/strdup.m4: Update.
1831 * gnulib/import/m4/strerror.m4: Update.
1832 * gnulib/import/m4/string_h.m4: Update.
1833 * gnulib/import/m4/strstr.m4: Update.
1834 * gnulib/import/m4/strtok_r.m4: Update.
1835 * gnulib/import/m4/sys_socket_h.m4: Update.
1836 * gnulib/import/m4/sys_stat_h.m4: Update.
1837 * gnulib/import/m4/sys_time_h.m4: Update.
1838 * gnulib/import/m4/sys_types_h.m4: Update.
1839 * gnulib/import/m4/tempname.m4: Update.
1840 * gnulib/import/m4/time_h.m4: Update.
1841 * gnulib/import/m4/unistd-safer.m4: Update.
1842 * gnulib/import/m4/unistd_h.m4: Update.
1843 * gnulib/import/m4/warn-on-use.m4: Update.
1844 * gnulib/import/m4/wchar_h.m4: Update.
1845 * gnulib/import/m4/wchar_t.m4: Update.
1846 * gnulib/import/m4/wctype_h.m4: Update.
1847 * gnulib/import/m4/wint_t.m4: Update.
1848 * gnulib/import/malloc.c: Update.
1849 * gnulib/import/malloc/scratch_buffer.h: Update.
1850 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1851 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1852 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1853 * gnulib/import/malloca.c: Update.
1854 * gnulib/import/malloca.h: Update.
1855 * gnulib/import/malloca.valgrind: Update.
1856 * gnulib/import/math.in.h: Update.
1857 * gnulib/import/mbrtowc.c: Update.
1858 * gnulib/import/mbsinit.c: Update.
1859 * gnulib/import/mbsrtowcs-impl.h: Update.
1860 * gnulib/import/mbsrtowcs-state.c: Update.
1861 * gnulib/import/mbsrtowcs.c: Update.
1862 * gnulib/import/memchr.c: Update.
1863 * gnulib/import/memmem.c: Update.
1864 * gnulib/import/mempcpy.c: Update.
1865 * gnulib/import/memrchr.c: Update.
1866 * gnulib/import/mkdir.c: Update.
1867 * gnulib/import/mkstemp.c: Update.
1868 * gnulib/import/msvc-inval.c: Update.
1869 * gnulib/import/msvc-inval.h: Update.
1870 * gnulib/import/msvc-nothrow.c: Update.
1871 * gnulib/import/msvc-nothrow.h: Update.
1872 * gnulib/import/open.c: Update.
1873 * gnulib/import/openat-die.c: Update.
1874 * gnulib/import/openat-priv.h: Update.
1875 * gnulib/import/openat-proc.c: Update.
1876 * gnulib/import/openat.c: Update.
1877 * gnulib/import/openat.h: Update.
1878 * gnulib/import/opendir.c: Update.
1879 * gnulib/import/pathmax.h: Update.
1880 * gnulib/import/pipe-safer.c: Update.
1881 * gnulib/import/rawmemchr.c: Update.
1882 * gnulib/import/readdir.c: Update.
1883 * gnulib/import/readlink.c: Update.
1884 * gnulib/import/realloc.c: Update.
1885 * gnulib/import/ref-add.sin: Update.
1886 * gnulib/import/ref-del.sin: Update.
1887 * gnulib/import/rename.c: Update.
1888 * gnulib/import/rewinddir.c: Update.
1889 * gnulib/import/rmdir.c: Update.
1890 * gnulib/import/same-inode.h: Update.
1891 * gnulib/import/save-cwd.c: Update.
1892 * gnulib/import/save-cwd.h: Update.
1893 * gnulib/import/scratch_buffer.h: Update.
1894 * gnulib/import/secure_getenv.c: Update.
1895 * gnulib/import/setenv.c: Update.
1896 * gnulib/import/signal.in.h: Update.
1897 * gnulib/import/stat-time.c: Update.
1898 * gnulib/import/stat-time.h: Update.
1899 * gnulib/import/stat-w32.c: Update.
1900 * gnulib/import/stat-w32.h: Update.
1901 * gnulib/import/stat.c: Update.
1902 * gnulib/import/stdbool.in.h: Update.
1903 * gnulib/import/stddef.in.h: Update.
1904 * gnulib/import/stdint.in.h: Update.
1905 * gnulib/import/stdio.in.h: Update.
1906 * gnulib/import/stdlib.in.h: Update.
1907 * gnulib/import/str-two-way.h: Update.
1908 * gnulib/import/strchrnul.c: Update.
1909 * gnulib/import/strdup.c: Update.
1910 * gnulib/import/streq.h: Update.
1911 * gnulib/import/strerror-override.c: Update.
1912 * gnulib/import/strerror-override.h: Update.
1913 * gnulib/import/strerror.c: Update.
1914 * gnulib/import/string.in.h: Update.
1915 * gnulib/import/stripslash.c: Update.
1916 * gnulib/import/strnlen1.c: Update.
1917 * gnulib/import/strnlen1.h: Update.
1918 * gnulib/import/strstr.c: Update.
1919 * gnulib/import/strtok_r.c: Update.
1920 * gnulib/import/sys_stat.in.h: Update.
1921 * gnulib/import/sys_time.in.h: Update.
1922 * gnulib/import/sys_types.in.h: Update.
1923 * gnulib/import/tempname.c: Update.
1924 * gnulib/import/tempname.h: Update.
1925 * gnulib/import/time.in.h: Update.
1926 * gnulib/import/unistd--.h: Update.
1927 * gnulib/import/unistd-safer.h: Update.
1928 * gnulib/import/unistd.in.h: Update.
1929 * gnulib/import/unsetenv.c: Update.
1930 * gnulib/import/verify.h: Update.
1931 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1932 * gnulib/import/wchar.in.h: Update.
1933 * gnulib/import/wctype.in.h: Update.
1934 * gnulib/import/xalloc-oversized.h: Update.
1935 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1936 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1938 2018-08-16 Gary Benson <gbenson@redhat.com>
1941 * gdb/main.c (captured_main_1): Exit with nonzero status
1942 in batch mode if the last command to be executed failed.
1943 * NEWS: Mention the above.
1945 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
1947 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1948 end of warning message.
1950 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1953 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1954 (aarch64_extract_return_value): Use
1955 aapcs_is_vfp_call_or_return_candidate.
1956 (aarch64_return_in_memory): Likewise.
1957 (aarch64_store_return_value): Likewise.
1959 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1962 (aapcs_is_vfp_call_or_return_candidate): Make static
1963 (pass_in_v_or_stack): Remove function.
1964 (pass_in_v_vfp_candidate): New function.
1965 (aarch64_push_dummy_call): Check for float register candidates.
1967 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1969 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1970 (aapcs_is_vfp_call_or_return_candidate_1): New function.
1971 (aapcs_is_vfp_call_or_return_candidate): Likewise.
1973 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1976 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1977 (struct ipa_sym_addresses): Rename to...
1978 (struct ipa_sym_addresses_common): ... this.
1979 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1981 2018-08-28 Tom Tromey <tom@tromey.com>
1983 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1984 (token_fifo): Now a std::vector.
1985 (yylex, c_parse): Update.
1986 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1987 (token_fifo): Now a std::vector.
1988 (yylex, d_parse): Update.
1989 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1990 (token_fifo): Now a std::vector.
1991 (yylex, go_parse): Update.
1993 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
1995 * parser-defs.h (struct type_stack) <elements>: Change type to
1996 std::vector<union type_stack_elt>.
1997 <depth, size>: Remove.
1998 * parse.c (parse_exp_in_context_1): Adjust.
1999 (type_stack_reserve): Remove.
2000 (check_type_stack_depth): Remove.
2001 (insert_into_type_stack): Adjust to std::vector.
2002 (insert_type): Likewise.
2003 (push_type): Likewise.
2004 (push_type_int): Likewise.
2005 (insert_type_address_space): Likewise.
2006 (pop_type): Likewise.
2007 (pop_type_int): Likewise.
2008 (pop_typelist): Likewise.
2009 (pop_type_stack): Likewise.
2010 (append_type_stack): Likewise.
2011 (push_type_stack): Likewise.
2012 (get_type_stack): Likewise.
2013 (type_stack_cleanup): Likewise.
2014 (push_typelist): Likewise.
2015 (follow_types): Likewise.
2016 (_initialize_parse): Likewise.
2018 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
2020 * NEWS: Mention csky target.
2022 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
2023 Hafiz Abid Qadeer <abidh@codesourcery.com>
2024 Don Breazeal <donb@codesourcery.com>
2026 * csky-linux-tdep.c: New file.
2027 * csky-tdep.c: Likewise.
2028 * csky-tdep.h: Likewise.
2029 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2031 (HFILES_NO_SRCDIR): Add csky-tdep.h.
2032 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2033 * configure.tgt: Add csky support.
2035 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
2037 * python/py-framefilter.c (py_print_frame): Print frame architecture
2038 when printing on an MI output.
2040 2018-08-27 Tom Tromey <tom@tromey.com>
2043 * configure: Rebuild.
2044 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2046 2018-08-27 Tom Tromey <tom@tromey.com>
2048 * aarch64-linux-tdep.c
2049 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2052 2018-08-27 Tom Tromey <tom@tromey.com>
2054 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2056 (ppc64_standard_linkage1, ppc64_standard_linkage2)
2057 (ppc64_standard_linkage3, ppc64_standard_linkage4)
2058 (ppc64_standard_linkage5, ppc64_standard_linkage6)
2059 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2062 2018-08-27 Tom Tromey <tom@tromey.com>
2064 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2065 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2067 2018-08-27 Tom Tromey <tom@tromey.com>
2069 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2070 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2072 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2074 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2076 * sparc-linux-tdep.c (sparc32_linux_sigframe)
2077 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2078 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2080 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2081 (ppc64_linux_sigaction_tramp_frame)
2082 (ppc32_linux_sighandler_tramp_frame)
2083 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2084 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2085 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2086 * mn10300-linux-tdep.c (am33_linux_sigframe)
2087 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2088 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2089 * mips-linux-tdep.c (mips_linux_o32_sigframe)
2090 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2091 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2092 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2093 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2094 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2095 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2096 * microblaze-linux-tdep.c
2097 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2098 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2099 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2100 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2101 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2102 * common/common-types.h (ULONGEST_MAX): New define.
2103 (CORE_ADDR_MAX): Fix formatting.
2104 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2105 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2106 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2107 (arm_linux_rt_sigreturn_tramp_frame)
2108 (arm_eabi_linux_sigreturn_tramp_frame)
2109 (arm_eabi_linux_rt_sigreturn_tramp_frame)
2110 (thumb2_eabi_linux_sigreturn_tramp_frame)
2111 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2112 (arm_linux_restart_syscall_tramp_frame)
2113 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2114 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2115 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2117 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2119 2018-08-27 Tom Tromey <tom@tromey.com>
2121 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2123 * mips-tdep.c (mips_deal_with_atomic_sequence)
2124 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2125 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2126 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2127 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2129 * aarch64-tdep.c (aarch64_software_single_step): Use
2132 2018-08-27 Tom Tromey <tom@tromey.com>
2134 * linespec.c (complete_linespec_component): Add cast to "char".
2135 * completer.c (completion_tracker::build_completion_result): Add
2138 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2140 * solist.h (struct solist, struct target_so_ops): Fix
2143 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2145 * ada-tasks.c (ada_task_info_s): Remove typedef.
2146 (DEF_VEC_O(ada_task_info_s)): Remove.
2147 (struct ada_tasks_inferior_data): Initialize fields.
2148 <task_list>: Make an std::vector.
2149 (get_ada_tasks_inferior_data): Allocate with new.
2150 (ada_get_task_number): Adjust.
2151 (get_task_number_from_id): Likewise.
2152 (valid_task_id): Likewise.
2153 (ada_get_task_info_from_ptid): Likewise.
2154 (iterate_over_live_ada_tasks): Likewise.
2155 (add_ada_task): Likewise.
2156 (read_known_tasks): Likewise.
2157 (ada_build_task_list): Likewise.
2158 (print_ada_task_info): Likewise.
2159 (info_task): Likewise.
2160 (task_command_1): Likewise.
2162 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2164 * ada-lang.c (add_angle_brackets): Return std::string.
2166 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
2168 * python/py-threadevent.c (py_get_event_thread): Initialize
2171 2018-08-24 Pedro Alves <palves@redhat.com>
2173 * python/py-bpevent.c (create_breakpoint_event_object): Use
2174 copy-initialization.
2175 * python/py-continueevent.c (emit_continue_event): Use
2176 copy-initialization.
2177 * python/py-exitedevent.c (create_exited_event_object): Return a
2179 (emit_exited_event): Use copy-initialization.
2180 * python/py-inferior.c (python_new_inferior)
2181 (python_inferior_deleted, add_thread_object): Use
2182 copy-initialization.
2183 * python/py-infevents.c (create_inferior_call_event_object)
2184 (create_register_changed_event_object)
2185 (create_memory_changed_event_object): Return a gdbpy_ref<>.
2186 (emit_inferior_call_event, emit_memory_changed_event)
2187 (emit_register_changed_event): Use copy-initialization.
2188 * python/py-newobjfileevent.c (create_new_objfile_event_object):
2189 Return a gdbpy_ref<>.
2190 (emit_new_objfile_event): Use copy-initialization.
2191 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2192 (emit_clear_objfiles_event): Use copy-initialization.
2193 * python/py-signalevent.c (create_signal_event_object): Use
2194 copy-initialization.
2195 * python/py-threadevent.c (create_thread_event_object): Use
2196 copy-initialization.
2198 2018-08-24 Pedro Alves <palves@redhat.com>
2199 Simon Marchi <simon.marchi@ericsson.com>
2202 * python/py-continueevent.c: Include "gdbthread.h".
2203 (create_continue_event_object): Add intro comment. Add 'ptid'
2204 parameter. Use it to find thread to pass to
2205 create_thread_event_object.
2206 (emit_continue_event): Pass PTID down to
2207 create_continue_event_object.
2208 * python/py-event.h (py_get_event_thread): Declare.
2209 (create_thread_event_object): Remove default from 'thread'
2211 * python/py-stopevent.c (create_stop_event_object): Use
2212 py_get_event_thread.
2213 * python/py-threadevent.c (get_event_thread): Rename to ...
2214 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2215 and use it to find the thread.
2216 (create_thread_event_object): Assert that THREAD isn't null.
2217 Don't find the event thread here.
2219 2018-08-23 Kevin Buettner <kevinb@redhat.com>
2221 * block.h (blockrange, blockranges): New struct declarations.
2222 (struct block): Add new field named `ranges'.
2223 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2224 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2225 macros for accessing ranges in struct block.
2226 (make_blockranges): New declaration.
2227 block.c (make_blockranges): New function.
2228 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2230 * symtab.h (find_pc_partial_function): Add new parameter `block'.
2231 * blockframe.c (cache_pc_function_block): New static global.
2232 (clear_pc_function_cache): Clear cache_pc_function_block.
2233 (find_pc_partial_function): Move comment to symtab.h. Add
2234 support for non-contiguous blocks.
2235 * cli/cli-cmds.c (block.h): Include.
2236 (print_disassembly): Handle printing of non-contiguous blocks.
2237 (disassemble_current_function): Likewise.
2238 (disassemble_command): Likewise.
2240 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2242 * blockframe.c (get_pc_function_start): Likewise.
2243 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2244 (gcc_symbol_address): Likewise.
2245 * compile/compile-object-run.c (compile_object_run): Likewise.
2246 * compile/compile.c (get_expr_block_and_pc): Likewise.
2247 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2248 (func_addr_to_tail_call_list): Likewise.
2249 * findvar.c (default_read_var_value): Likewise.
2250 * inline-frame.c (inline_frame_this_id): Likewise.
2251 (skip-inline_frames): Likewise.
2252 * infcmd.c (until_next_command): Likewise.
2253 * linespec.c (convert_linespec_to_sals): Likewise.
2254 * parse.c (parse_exp_in_context_1): Likewise.
2255 * printcmd.c (build_address_symbolic): likewise.
2256 (info_address_command): Likewise.
2257 symtab.c (find_function_start_sal): Likewise.
2258 (skip_prologue_sal): Likewise.
2259 (find_function_alias_target): Likewise.
2260 (find_gnu_ifunc): Likewise.
2261 * stack.c (find_frame_funname): Likewise.
2262 * symtab.c (fixup_symbol_section): Likewise.
2263 (find_function_start_sal): Likewise.
2264 (skip_prologue_sal): Likewsie.
2265 (find_function_alias_target): Likewise.
2266 (find_gnu_ifunc): Likewise.
2267 * tracepoint.c (info_scope_command): Likewise.
2268 * value.c (value_fn_field): Likewise.
2270 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2271 in place of find_pc_partial_function.
2272 * blockframe.c (find_function_entry_range_from_pc): New function.
2273 * symtab.h (find_function_entry_range_from_pc): Declare and document.
2274 * objfiles.c (objfile_relocate1): Relocate start and end addresses
2275 for each range in a block.
2278 2018-08-23 Xavier Roirand <roirand@adacore.com>
2280 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2283 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2285 * solib-svr4.c (read_program_headers_from_bfd): Return
2286 gdb::optional<gdb::byte_vector>.
2287 (svr4_exec_displacement): Adjust.
2289 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2291 * solib-svr4.c (read_program_header): Return
2292 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2293 (find_program_interpreter): Return
2294 gdb::optional<gdb::byte_vector>.
2295 (scan_dyntag_auxv): Adjust.
2296 (enable_break): Adjust.
2297 (svr4_exec_displacement): Adjust.
2299 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2301 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2302 * inf-child.c (inf_child_target::terminal_save_inferior): New.
2304 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2306 * guile/scm-string.c (gdbscm_scm_from_printf): Use
2308 * guile/scm-utils.c (gdbscm_printf): Likewise.
2309 * serial.c (serial_printf): Likewise.
2310 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2312 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
2314 * stack.c (print_frame): Print frame architecture when printing on
2316 * NEWS: Mention new "arch" attribute in frame output.
2318 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2320 * arch/aarch64.h (aarch64_regnum): Update comment.
2322 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2324 * NEWS: Add SVE to 8.2 section.
2326 2018-08-21 Pedro Alves <palves@redhat.com>
2328 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2329 out from gdbscm_parse_function_args.
2330 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2331 gdbscm_parse_function_args_1.
2333 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
2336 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2339 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
2341 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2343 2018-08-19 Michael Spang <spang@google.com>
2346 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2347 for PT_TLS segments.
2349 2018-08-18 Kevin Buettner <kevinb@redhat.com>
2351 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2352 dwarf_variable_value.
2353 * dwarf2-frame.c (class dwarf_expr_executor):
2354 Add override for dwarf_variable_value.
2355 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2356 (class symbol_needs_eval_context): Likewise.
2357 (indirect_synthetic_pointer): Add forward declaration.
2358 (sect_variable_value): New function.
2359 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2360 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2361 for DW_OP_GNU_variable_value.
2363 2018-08-16 Tom Tromey <tom@tromey.com>
2365 * top.c (read_command_file): Update.
2366 (command_line_input): Remove "repeat" argument.
2367 * ada-lang.c (get_selections): Update.
2368 * linespec.c (decode_line_2): Update.
2369 * defs.h (command_line_input): Remove argument.
2370 * cli/cli-script.c (read_next_line): Update.
2371 * python/py-gdb-readline.c: Update.
2373 2018-08-17 Tom Tromey <tom@tromey.com>
2375 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2378 2018-08-15 Tom Tromey <tom@tromey.com>
2380 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2382 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
2384 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2385 If used, use find_pc_partial_function to find address range
2387 * mi/mi-main.c (mi_cmd_list_features): Report
2388 "data-disassemble-a-option" feature.
2389 * NEWS: Mention new -data-disassemble option -a.
2391 2018-08-13 Tom Tromey <tom@tromey.com>
2393 * common/common-defs.h (_FORTIFY_SOURCE): Define.
2395 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2397 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2398 (aarch64_linux_collect_sve_regset): Likewise.
2399 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2400 * regcache.h (regcache_map_entry_size): New function.
2402 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2404 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2405 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2406 (SVE_HEADER_VL_LENGTH): Likewise.
2407 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2408 (SVE_HEADER_FLAGS_LENGTH): Likewise.
2409 (SVE_HEADER_RESERVED_LENGTH): Likewise.
2410 (SVE_HEADER_SIZE_OFFSET): Likewise.
2411 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2412 (SVE_HEADER_VL_OFFSET): Likewise.
2413 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2414 (SVE_HEADER_FLAGS_OFFSET): Likewise.
2415 (SVE_HEADER_RESERVED_OFFSET): Likewise.
2416 (SVE_HEADER_SIZE): Likewise.
2417 (aarch64_linux_core_read_vq): Add function.
2418 (aarch64_linux_core_read_description): Check for SVE section.
2420 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2422 * aarch64-fbsd-tdep.c
2423 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2425 * aarch64-linux-tdep.c
2426 (aarch64_linux_iterate_over_regset_sections): Likewise.
2427 * alpha-linux-tdep.c
2428 (alpha_linux_iterate_over_regset_sections):
2430 (alphanbsd_iterate_over_regset_sections): Likewise.
2432 (amd64fbsd_iterate_over_regset_sections): Likewise.
2433 * amd64-linux-tdep.c
2434 (amd64_linux_iterate_over_regset_sections): Likewise.
2436 (armbsd_iterate_over_regset_sections): Likewise.
2438 (arm_fbsd_iterate_over_regset_sections): Likewise.
2440 (arm_linux_iterate_over_regset_sections): Likewise.
2441 * corelow.c (get_core_registers_cb): Likewise.
2442 (core_target::fetch_registers): Likewise.
2443 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2444 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2445 * gdbarch.h (void): Regenerate.
2446 * gdbarch.sh: Add supply_size and collect_size.
2447 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2448 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2449 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2450 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2451 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2452 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2453 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2454 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2455 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2456 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2457 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2458 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2459 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2460 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2461 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2462 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2463 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2464 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2465 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2466 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2467 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2468 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2469 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2470 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2471 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2472 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2473 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2474 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2475 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2476 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2478 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
2480 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2483 2018-08-10 Keith Seitz <keiths@redhat.com>
2485 * compile/compile-c-support.c (add_code_header, add_code_footer):
2486 Move into policy class.
2487 (c_push_user_expression, pop_user_expression_nop)
2488 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2489 (compile_program): New host class.
2490 (c_compile_program): New typedef.
2491 (c_compute_porgram): Use c_compile_program.
2493 2018-08-10 Keith Seitz <keiths@redhat.com>
2495 * compile/compile-internal.h (compile_instance::~compile_instance):
2496 Remove calls to htab_delete.
2497 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2498 * compile.c (compile_instance::compile_instance): Initialize
2499 htab unique pointers.
2500 (compile_instance::get_cached_type, compile_instance::insert_type)
2501 (compile_instance::error_symbol_once): Update for unique_ptr.
2503 2018-08-10 Keith Seitz <keiths@redhat.com>
2505 * compile/compile-c-symbols.c (struct symbol_error)
2506 (hash_symbol_error, eq_symbol_error, del_symbol_error)
2507 (compile_instance::insert_symbol_error)
2508 (compile_instance::error_symbol_once): Move to ...
2509 * compile/compile.c: ... here.
2511 2018-08-10 Keith Seitz <keiths@redhat.com>
2513 * compile/compile-c-support.c (c_get_compile_context): Use `new'
2514 instead of `new_compile_instance'.
2515 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2517 If the symbol error map is not initialized, create it.
2518 (generate_c_for_for_one_symbol): Do not check/initialize
2519 the symbol error map.
2520 * compile/compile-c-types.c (compile_c_instance): Make a class.
2522 (compile_instance::compile_instance): Initialize the type cache.
2523 (get_cached_type): New function.
2524 (insert_type): Update description.
2525 (compile_c_instance::m_default_cflags): Define.
2526 (convert_type): Update description. Use get_cached_type.
2527 (delete_instance): Moved to destructor.
2528 (new_compile_instance): Moved to constructor.
2529 * compile/compile-c.h (compile_c_instance): Make class inheriting
2530 from compile_instance.
2531 <base>: Remove field.
2532 <type_map, symbol_err_map>: Move to base class.
2533 <c_plugin>: Rename to `m_plugin' and remove pointer type.
2534 * compile/compile-internal.h (compile_instance): Make class.
2535 <type_map_t, symbol_err_map_t>: Define.
2536 <fe>: Rename to `m_gcc_fe'.
2537 <scope, block, gcc_target_options>: Add `m_' prefix.
2538 <m_type_map, m_symbol_err_map>: New fields, moved from
2541 (convert_type, new_compile_instance): Remove.
2542 * compile/compile.c (cleanup_compile_instance): Remove.
2543 (compile_to_object): Use unique_ptr to eliminate cleanups.
2544 (compile_instance::set_print_callback, compile_instance::version)
2545 (compile_instance::set_verbose)
2546 (compile_instance::set_driver_filename)
2547 (compile_instance::set_triplet_regexp)
2548 (compile_instance::set_arguments)
2549 (compile_instance::set_source_file)
2550 (compile_instance::compile): Define.
2552 2018-08-10 Keith Seitz <keiths@redhat.com>
2554 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2555 * compile/compile-c-types.c: Define GCC_METHODN macros and include
2556 gcc-c-fe.def to define C plugin.
2557 (delete_instance): Delete `c_plugin'.
2558 (new_compile_instance): Initialize `c_plugin'.
2559 * compile/compile-c.h: Include gcc_c_plugin.h.
2560 (struct compile_c_instance) <c_plugin>: New member.
2561 * gcc-c-plugin.h: New file.
2562 Update all callers with API change.
2564 2018-08-10 Keith Seitz <keiths@redhat.com>
2566 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2567 (HFILES_NO_SRCDIR): ... to here.
2568 Add compile-internal.h and compile-c.h.
2569 * compile/compile-c-support.c: Include compile-c.h.
2570 * compile/compile-c-symbols.c: Include compile-c.h.
2571 (generate_c_for_variable_locations): Update comment.
2572 * compile/compile-c-types.c: Include compile-c.h.
2573 * compile/compile-c.h: New file -- moved C language declarations
2574 from other files here.
2575 * compile/compile-internal.h: Do not include hashtab.h or
2576 common/enum-flags.h.
2577 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2578 (gcc_convert_symbol, gcc_symbol_address)
2579 (generate_c_for_variable_locations, c_get_mode_for_size)
2580 (c_get_range_decl_name): Definitions moved to compile-c.h.
2581 * compile/compile-loc2c.c: Include compile-c.h.
2583 2018-08-10 Keith Seitz <keiths@redhat.com>
2585 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2586 (c_symbol_substitution_name): ... this.
2589 2018-08-10 Keith Seitz <keiths@redhat.com>
2591 * compile/compile-c-support.c (c_compute_program): Use
2592 unique_xmalloc_ptr to eliminate cleanup.
2593 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2594 Return a unique_xmalloc_ptr and eliminate cleanup.
2595 * compile/compile-internal.h (generate_c_for_variable_locations):
2596 Return unique_xmalloc_ptr and update description.
2598 2018-08-10 Alan Hayward <alan.hayward@arm.com>
2600 * corelow.c (core_target::get_core_register_section): Rename
2601 min_size to section_min_size.
2603 2018-08-09 Jim Wilson <jimw@sifive.com>
2605 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2606 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2607 * NEWS: Mention new GNU/Linux RISC-V target.
2608 * configure.host: Add riscv*-*-linux*.
2609 * configure.nat: Add riscv*.
2610 * configure.tgt: Add riscv*-*-linux*.
2611 * riscv-linux-nat.c: New file.
2612 * riscv-linux-tdep.c: New file.
2614 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2616 * infrun.c (resume): Make static, add forward declaration.
2617 (proceed): Update header comment.
2618 * infrun.h (resume): Delete declaration.
2620 2018-08-09 Tom Tromey <tom@tromey.com>
2622 * riscv-tdep.h: Minor formatting fixes.
2624 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
2626 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2627 * dwarf-index-cache.c (create_dir_and_check): Likewise.
2628 (test_mkdir_recursive): Likewise.
2629 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2631 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2633 * valarith.c (value_subscripted_rvalue): If an array is not in
2634 memory, and we don't know the upper bound, then we can't know that
2635 the requested element exists or not.
2637 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
2639 * target.c (str_comma_list_concat_elem): Fix typo in comment.
2640 (target_options_to_string): Add comment.
2642 2018-08-08 Tom Tromey <tom@tromey.com>
2644 * unittests/scoped_mmap-selftests.c: Check result of "write".
2646 2018-08-08 Jim Wilson <jimw@sifive.com>
2648 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2649 (decode_register_index_short): New.
2650 (decode_j_type_insn, decode_cj_type_insn): New.
2651 (decode_b_type_insn, decode_cb_type_insn): New.
2652 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
2653 local xlen. Check xlen when decoding ambiguous compressed insns. In
2654 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2655 is_c_sw_insn instead of is_sw_insn.
2656 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2657 (riscv_software_single_step): New.
2658 * riscv-tdep.h (riscv_software_single_step): Declare.
2660 * riscv-tdep.c (riscv_isa_xlen): Drop static.
2661 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2663 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
2666 * target.c (dispose_inferior): Don't dispose of inferiors that are
2669 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
2671 * remote.c (remote_target::download_tracepoint): Change char* to
2674 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
2676 * target.h (target_options_to_string): Return an std::string.
2677 * target.c (str_comma_list_concat_elem): Return void, use
2679 (do_option): Likewise.
2680 (target_options_to_string): Return an std::string.
2681 * linux-nat.c (linux_nat_target::wait): Adjust.
2682 * target-debug.h (target_debug_print_options): Adjust.
2684 2018-08-07 Tom Tromey <tom@tromey.com>
2686 * Makefile.in (CPPFLAGS): New variable.
2687 (INTERNAL_CPPFLAGS): Use it.
2689 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2691 * NEWS: Mention the index cache.
2693 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2695 * common/pathstuff.h (get_standard_cache_dir): New.
2696 * common/pathstuff.c (get_standard_cache_dir): New.
2697 * build-id.h (build_id_to_string): New.
2698 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2699 DEBUG_STR_SUFFIX): Move to here.
2700 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2701 DEBUG_STR_SUFFIX): Move from there.
2702 (write_psymtabs_to_index): Make non-static, add basename
2703 parameter. Write to temporary files, rename when done.
2704 (save_gdb_index_command): Adjust call to
2705 write_psymtabs_to_index.
2706 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2708 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2709 (get_gdb_index_contents_from_cache): New.
2710 (get_gdb_index_contents_from_cache_dwz): New.
2711 (dwarf2_initialize_objfile): Read index from cache.
2712 (dwarf2_build_psymtabs): Save to index.
2713 * dwarf-index-cache.h: New file.
2714 * dwarf-index-cache.c: New file.
2715 * dwarf-index-write.h: New file.
2717 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2719 * gnulib/aclocal.m4: Re-generate.
2720 * gnulib/config.in: Re-generate.
2721 * gnulib/configure: Re-generate.
2722 * gnulib/import/Makefile.am: Re-generate.
2723 * gnulib/import/Makefile.in: Re-generate.
2724 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2725 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2726 * gnulib/import/m4/mkdir.m4: New file.
2727 * gnulib/import/mkdir.c: New file.
2728 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2731 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2733 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2734 * common/scoped_mmap.c: New file.
2735 * common/scoped_mmap.h (destroy): New method.
2736 (~scoped_mmap, reset): Use destroy.
2737 (scoped_mmap): New move constructor.
2738 (mmap_file): New declaration.
2739 * unittests/scoped_mmap-selftests.c (test_normal,
2740 test_invalid_filename, run_tests): New functions.
2741 (_initialize_scoped_mmap_selftests): Register selftest.
2743 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2745 * dwarf2read.c (read_gdb_index_from_section): Rename to...
2746 (read_gdb_index_from_buffer): ... this. Remove section
2747 parameter, add buffer parameter.
2748 (get_gdb_index_contents_ftype,
2749 get_gdb_index_contents_dwz_ftype): New typedefs.
2750 (dwarf2_read_gdb_index): Add callback parameters to get the
2752 (get_gdb_index_contents_from_section): New.
2753 (dwarf2_initialize_objfile): Update call to
2754 dwarf2_read_gdb_index.
2756 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2758 * common/filestuff.h (gdb_fopen_cloexec): New overload.
2759 (gdb_open_cloexec): Likewise.
2760 * nat/linux-osdata.c (command_from_pid): Use string_printf.
2761 (commandline_from_pid): Likewise.
2762 (linux_xfer_osdata_threads): Likewise.
2763 (linux_xfer_osdata_fds): Likewise.
2764 * ada-lang.c (is_package_name): Likewise.
2765 * auxv.c (procfs_xfer_auxv): Likewise.
2766 * breakpoint.c (print_one_breakpoint_location): Use
2768 (print_one_catch_solib): Use string_printf.
2769 * coff-pe-read.c (add_pe_exported_sym): Likewise.
2770 (add_pe_forwarded_sym): Likewise.
2771 * dwarf2read.c (create_type_unit_group): Likewise.
2772 (build_error_marker_type): Likewise.
2773 * infcall.c (get_function_name): Likewise.
2774 * valprint.c (print_converted_chars_to_obstack): Likewise.
2775 * xtensa-tdep.c (xtensa_register_type): Likewise.
2777 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
2779 * remote.c (remote_target::download_tracepoint): Fix format
2782 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2784 * tracefile.c: Include common/byte-vector.h.
2785 (trace_save): Change type of buf to gdb::byte_vector. Initialize
2786 with trace_regblock_size if needed. Update uses of buf.
2788 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2790 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2791 std::vector<unsigned char>.
2792 * tracepoint.c (collection_list::collection_list): Remove
2793 m_regs_mask initializer from initializer list. Resize
2794 m_regs_mask using the largest remote register number.
2795 (collection_list::add_remote_register): Remove size check on
2796 m_regs_mask. Use at to access element.
2797 (collection_list::stringify): Change type of temp_buf to
2798 gdb::char_vector. Update uses of temp_buf. Resize if needed to
2799 stringify the register mask. Use pack_hex_byte for the register
2802 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2804 * tracepoint.h (class collection_list) <add_register>: Remove.
2805 <add_remote_register, add_ax_registers, add_local_register>:
2807 <add_memrange>: Add scope parameter.
2808 * tracepoint.c (encode_actions_1): Likewise.
2809 (collection_list::add_register): Rename to ...
2810 (collection_list::add_remote_register): ... this. Update
2812 (collection_list::add_ax_registers, add_local_register): New
2814 (collection_list::add_memrange): Add scope parameter. Call
2815 add_local_register instead of add_register.
2816 (finalize_tracepoint_aexpr): New function.
2817 (collection_list::collect_symbol): Update calls to add_memrange.
2818 Call add_local_register instead of add_register. Call
2819 add_ax_registers. Call finalize_tracepoint_aexpr.
2820 (encode_actions_1): Get remote regnos for $reg action. Call
2821 add_remote_register, add_ax_registers, and add_local_register.
2822 Update call to add_memrange. Call finalize_tracepoint_aexpr.
2823 (validate_actionline): Call finalize_tracepoint_aexpr.
2825 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2827 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2828 Replace array buf with gdb::char_vector buf, of size
2829 get_remote_packet_size (). Replace references to buf and
2830 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
2831 and xsnprintf with snprintf. Raise errors if the buffer is too
2834 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2836 * remote.c (remote_target::download_tracepoint): Fix the has_more
2837 predicate in the QTDP action list iteration.
2839 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2841 * remote.c (remote_target::download_tracepoint): Fix indentation
2844 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2846 * proc-api.c (_initialize_proc_api): Remove c, unused.
2847 * procfs.c (procfs_init_inferior): Remove signals, unused.
2848 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2851 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
2852 Andrew Burgess <andrew.burgess@embecosm.com>
2854 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2855 'W_STOPCODE (0)' as this could be ambiguous.
2857 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
2859 * ser-tcp.c (net_open): Fix thinko when deciding whether to
2860 disable TCP's Nagle algorithm (use "ai_protocol" instead of
2863 2018-08-02 Tom Tromey <tom@tromey.com>
2866 * dwarf2read.c (read_func_scope): Set symtab on template parameter
2868 (process_structure_scope): Likewise.
2870 2018-08-02 Xavier Roirand <roirand@adacore.com>
2873 * darwin-nat.c (darwin_kill_inferior): Fix handling of
2876 2018-08-02 Tom Tromey <tom@tromey.com>
2878 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2879 (darwin_suspend_inferior, darwin_resume_inferior)
2880 (darwin_decode_notify_message, darwin_resume_inferior_threads)
2881 (darwin_check_new_threads): Check result of get_darwin_inferior.
2883 2018-07-31 Joel Brobecker <brobecker@adacore.com>
2887 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
2889 * varobj.c (varobj_get_path_expr_parent): Report an error if
2890 parent is a dynamic varobj.
2892 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2894 * gnulib/aclocal.m4: Re-generate.
2895 * gnulib/config.in: Re-generate.
2896 * gnulib/configure: Re-generate.
2897 * gnulib/import/Makefile.in: Re-generate.
2898 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2899 * gnulib/import/m4/onceonly.m4: Re-generate.
2901 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2903 * target-descriptions.c (struct xml_test_tdesc): New.
2904 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2905 (record_xml_tdesc): Update.
2906 (maintenance_check_xml_descriptions): Update.
2907 * target-descriptions.h (record_xml_tdesc): Update comment.
2909 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
2911 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2912 checking array bounds are defined.
2914 2018-07-30 Tom Tromey <tom@tromey.com>
2916 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2917 irreflexivity violation.
2919 2018-07-30 Tom Tromey <tom@tromey.com>
2921 * cli/cli-decode.c (lookup_cmd): Remove lint code.
2922 * value.c (unpack_long): Remove lint code.
2923 * valops.c (value_ind): Remove lint code.
2924 * valarith.c (value_x_binop, value_x_unop, value_equal)
2925 (value_pos): Remove lint code.
2927 2018-07-28 Tom de Vries <tdevries@suse.de>
2929 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2930 with undefined upper bound as <optimized out>.
2932 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
2934 * gcore.in: Rename variable "name" to "prefix". Expand
2937 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
2939 * windows-nat.c (windows_nat_target::create_inferior): Update to
2940 call close() in global namespace.
2942 2018-07-26 Tom Tromey <tom@tromey.com>
2944 * dwarf-index-write.c (add_address_entry): Don't add objfile
2946 * dbxread.c (find_stab_function): Rename from
2947 find_stab_function_addr. Return a bound_minimal_symbol.
2948 (read_dbx_symtab): Use raw_text_low, raw_text_high.
2949 Don't add objfile offsets.
2950 (end_psymtab): Use raw_text_low, raw_text_high,
2951 MSYMBOL_VALUE_RAW_ADDRESS.
2952 (read_ofile_symtab): Update.
2953 (process_one_symbol): Update.
2954 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2956 (dw2_relocate): Remove.
2957 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2959 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2961 (process_psymtab_comp_unit_reader, add_partial_symbol)
2962 (add_partial_subprogram, dwarf2_ranges_read): Update.
2963 (load_partial_dies): Update.
2964 (add_address_entry): Don't add objfile offsets.
2965 (dwarf2_build_include_psymtabs): Update.
2966 (create_addrmap_from_aranges): Don't add objfile offsets.
2967 (dw2_find_pc_sect_compunit_symtab): Update.
2968 * mdebugread.c (parse_symbol): Don't add objfile offsets.
2969 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2971 (parse_partial_symbols): Don't add objfile offsets. Use
2972 raw_text_low, raw_text_high. Update.
2973 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2974 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2975 or call 'relocate' quick function. Clear psymbol_map.
2976 * psympriv.h (struct partial_symbol) <address>: Add section
2978 <set_unrelocated_address>: Rename from set_address.
2979 <raw_text_low, raw_text_high>: New methods.
2980 <text_low, text_high>: Add objfile parameter.
2981 (add_psymbol_to_bcache): Add 'section' parameter. Call
2982 set_unrelocated_address.
2983 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2984 (find_pc_psymbol): Update.
2985 (fixup_psymbol_section, relocate_psymtabs): Remove.
2986 (dump_psymtab, psym_functions): Update.
2987 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2989 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2990 (start_psymtab_common): Update.
2991 * symfile-debug.c (debug_qf_relocate): Remove.
2992 (debug_sym_quick_functions): Update.
2993 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2994 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2997 2018-07-26 Tom Tromey <tromey@redhat.com>
2999 * dbxread.c (end_psymtab): Use text_high_valid and
3001 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3002 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3003 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3005 <text_low_valid, text_high_valid>: New fields.
3006 <set_text_low, set_text_high>: Update.
3007 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3009 2018-07-26 Tom Tromey <tom@tromey.com>
3011 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3013 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3014 textlow and texthigh fields.
3015 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3017 * mdebugread.c (parse_lines, parse_partial_symbols)
3018 (psymtab_to_symtab_1): Update.
3019 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3020 Rename fields. Update comment. Now private.
3021 <text_low, text_high, set_text_low, set_text_high>: New methods.
3022 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3023 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3024 (start_psymtab_common, maintenance_info_psymtabs)
3025 (maintenance_check_psymtabs): Update.
3026 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3028 (scan_xcoff_symtab): Update.
3030 2018-07-26 Tom Tromey <tromey@redhat.com>
3032 * psympriv.h (struct partial_symbol) <unrelocated_address,
3033 address, set_address>: New methods.
3034 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3035 (fixup_psymbol_section, relocate_psymtabs): Update.
3036 (print_partial_symbols): Add 'objfile' parameter. Update.
3037 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3040 2018-07-26 Tom Tromey <tom@tromey.com>
3042 * dwarf-index-write.c (write_psymbols, debug_names::insert)
3043 (debug_names::write_psymbols): Update.
3044 * psympriv.h (struct partial_symbol): Derive from
3045 general_symbol_info.
3046 <obj_section>: New method.
3047 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3048 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3049 (find_pc_sect_psymbol, fixup_psymbol_section)
3050 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3051 (print_partial_symbols, recursively_search_psymtabs)
3052 (compare_psymbols, psymbol_hash, psymbol_compare)
3053 (add_psymbol_to_bcache, maintenance_check_psymtabs)
3054 (psymbol_name_matches, psym_fill_psymbol_map): Update.
3056 2018-07-26 Tom Tromey <tromey@redhat.com>
3058 * dbxread.c (end_psymtab): Remove dead code.
3060 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
3062 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3063 DWARF unwinders are disabled.
3064 * dwarf2-frame.c: Add dwarf2read.h include.
3065 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3067 (dwarf2_frame_unwinders_enabled_p): Define.
3068 (show_dwarf_unwinders_enabled_p): New function.
3069 (_initialize_dwarf2_frame): Register switch to control DWARF
3071 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3072 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3073 (show_dwarf_cmdlist): Remove static keyword.
3074 * dwarf2read.h (set_dwarf_cmdlist): Declare.
3075 (show_dwarf_cmdlist): Declare.
3076 * NEWS: Document new feature.
3078 2018-07-26 Tom de Vries <tdevries@suse.de>
3080 PR breakpoints/23366
3081 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3083 2018-07-26 Tom de Vries <tdevries@suse.de>
3085 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3086 DW_AT_count can't be translated to a dynamic prop.
3088 2018-07-25 Tom de Vries <tdevries@suse.de>
3090 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3093 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
3095 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3097 2018-07-25 Joel Brobecker <brobecker@adacore.com>
3099 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3101 2018-07-24 Keith Seitz <keiths@redhat.comt
3104 * dwarf2read.c (dw2_add_symbol_to_list): New function.
3105 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3106 instead of add_symbol_to_list.
3107 (read_file_scope): Call prepare_one_comp_unit before reading
3110 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
3112 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3114 2018-07-24 Tom Tromey <tom@tromey.com>
3116 * utils.c (malloc, realloc, free): Don't declare.
3117 * configure, config.in: Rebuild.
3118 * configure.ac: Don't check for declarations of free, malloc, or
3121 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3123 * aarch64-linux-nat.c
3124 (aarch64_linux_nat_target::stopped_data_address): Remove unused
3126 * arm-linux-nat.c (fetch_regs): Likewise.
3127 (store_regs): Likewise.
3128 (fetch_vfp_regs): Likewise.
3129 (store_vfp_regs): Likewise.
3130 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3131 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3132 (arm_linux_nat_target::insert_watchpoint): Likewise.
3133 (arm_linux_nat_target::remove_watchpoint): Likewise.
3134 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3136 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3138 * ppc-linux-nat.c (fetch_register): Likewise.
3139 (fetch_all_gp_regs): Likewise.
3140 (fetch_ppc_registers): Likewise.
3141 (store_all_gp_regs): Likewise.
3142 (store_ppc_registers): Likewise.
3143 (hwdebug_insert_point): Likewise.
3144 (can_use_watchpoint_cond_accel): Likewise.
3145 * remote-sim.c (gdb_os_write_stdout): Likewise.
3147 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3148 Tom Tromey <tom@tromey.com>
3150 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3152 * configure: Rebuild.
3154 2018-07-22 Tom Tromey <tom@tromey.com>
3156 * regformats/regdat.sh: Define xmltarget_${name} inside
3157 #ifndef IN_PROCESS_AGENT.
3159 2018-07-22 Tom Tromey <tom@tromey.com>
3161 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3163 2018-07-22 Tom Tromey <tom@tromey.com>
3165 * symfile.c (reread_symbols): Notify iter, not objfile.
3167 2018-07-22 Tom Tromey <tom@tromey.com>
3169 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3171 (ravenscar_thread_target::prepare_to_store): Likewise.
3173 2018-07-22 Tom Tromey <tom@tromey.com>
3175 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3176 unused variable. Call value_fetch_lazy when needed.
3177 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3178 Remove unused variable. Call value_fetch_lazy when needed.
3180 2018-07-22 Tom Tromey <tom@tromey.com>
3182 * m32c-tdep.c (mark_dma): Return void.
3183 (make_regs): Remove unused declarations.
3185 2018-07-22 Tom Tromey <tom@tromey.com>
3187 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3188 cmdscm_get_valid_command_smob_arg_unsafe for effect.
3189 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3190 bkscm_get_valid_block_smob_arg_unsafe for effect.
3192 2018-07-22 Tom Tromey <tom@tromey.com>
3194 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3197 2018-07-22 Tom Tromey <tom@tromey.com>
3199 * windows-nat.c (saved_context): Conditionally define.
3200 * remote.c (remote_target::remote_btrace_maybe_reopen):
3201 Conditionally declare "warned".
3202 * inflow.c (sigquit_ours): Conditionally define.
3203 (new_tty): Move "tty" declaration inside #if.
3204 * guile/guile.c (guile_datadir): Conditionally define.
3205 * charset.c (set_be_le_names): Move some declarations inside #if.
3206 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3208 (parse_xml_btrace_conf): Likewise.
3210 2018-07-22 Tom Tromey <tom@tromey.com>
3212 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3214 2018-07-22 Tom Tromey <tom@tromey.com>
3216 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3217 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3218 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3219 * buildsym-legacy.c (get_macro_table): Remove unused variable.
3220 * stack.c (frame_apply_level_command): Remove unused variable.
3221 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3222 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3223 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3225 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3226 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3227 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3229 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3230 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3232 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3233 Remove unused variable.
3234 * cli/cli-script.c (recurse_read_control_structure): Remove unused
3236 * common/tdesc.c (print_xml_feature::visit): Remove unused
3238 * compile/compile-object-load.c (store_regs): Remove unused
3240 * complaints.c (clear_complaints): Remove unused variable.
3241 * corelow.c (core_target_open): Remove unused variable.
3242 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3244 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3246 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3248 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3250 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3252 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3254 * ia64-tdep.c (examine_prologue): Remove unused variable.
3255 * infcall.c (run_inferior_call): Remove unused variable.
3256 * inferior.c (exit_inferior): Remove unused variable.
3257 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3258 * linespec.c (decode_line_2): Remove unused variable.
3259 * linux-nat.c (super_close): Remove.
3260 * linux-tdep.c (linux_info_proc): Remove unused variable.
3261 * mi/mi-main.c (mi_execute_command): Remove unused variable.
3262 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3263 Remove unused variable.
3264 * parse.c (find_minsym_type_and_address): Remove unused variable.
3265 * printcmd.c (info_symbol_command, printf_floating): Remove unused
3267 * python/py-breakpoint.c (bppy_set_commands): Remove unused
3269 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3271 * record-btrace.c (record_btrace_target::store_registers): Remove
3273 (cmd_show_record_btrace_cpu): Remove unused variable.
3274 * riscv-tdep.c (riscv_register_reggroup_p)
3275 (riscv_push_dummy_call, riscv_return_value): Remove unused
3277 * rust-exp.y (literal): Remove unused variable.
3278 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3280 <STRUCTOP_ANONYMOUS>: Likewise.
3281 * s390-linux-tdep.c (s390_linux_init_abi_31)
3282 (s390_linux_init_abi_64): Remove unused variable.
3283 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3284 (file_select_thread, net_windows_open, _initialize_ser_windows):
3285 Remove unused variables.
3286 * symtab.c (find_pc_sect_line): Remove unused variable.
3287 * target-memory.c (compute_garbled_blocks): Remove unused
3289 (target_write_memory_blocks): Remove unused variable.
3290 * target.c (target_stack::unpush): Remove unused variables.
3291 * tracepoint.c (start_tracing, all_tracepoint_actions)
3292 (merge_uploaded_trace_state_variables)
3293 (print_one_static_tracepoint_marker): Remove unused variable.
3294 * unittests/basic_string_view/element_access/char/1.cc (test01):
3295 Remove unused variable.
3296 * windows-nat.c (windows_continue, windows_add_all_dlls)
3297 (do_initial_windows_stuff, windows_nat_target::create_inferior):
3298 Remove unused variables.
3300 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
3302 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3303 attr_profile in HAVE_ELF.
3304 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3307 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
3309 * frame.c (frame_register_unwind): Change parameter name.
3310 (frame_unwind_register): Likewise.
3311 (frame_unwind_register_value): Likewise.
3312 (frame_unwind_register_signed): Likewise.
3313 (frame_unwind_register_unsigned): Likewise.
3314 * frame.h (frame_register_unwind): Likewise.
3315 (frame_unwind_register): Likewise.
3316 (frame_unwind_register_value): Likewise.
3317 (frame_unwind_register_signed): Likewise.
3318 (frame_unwind_register_unsigned): Likewise.
3319 (frame_unwind_arch): Likewise.
3321 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3323 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3326 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3328 * mips-linux-nat.c (mips_linux_nat_target::read_description):
3329 Call `get_ptrace_pid' rather than extracting the ptrace PID by
3332 2018-07-20 Keith Seitz <keiths@redhat.com>
3334 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3335 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3336 m_compunit_symtab, m_language>: Add "m_" prefix.
3338 * buildsym.c: Update all uses.
3340 2018-07-20 Tom Tromey <tom@tromey.com>
3342 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3343 * buildsym.h (record_line_ftype): Remove typedef.
3345 2018-07-20 Tom Tromey <tom@tromey.com>
3347 * buildsym-legacy.h (augment_type_symtab): Don't declare.
3348 (end_expandable_symtab): Likewise.
3349 (end_symtab_get_static_block): Likewise.
3350 (end_symtab_from_static_block): Likewise.
3351 * buildsym-legacy.c (augment_type_symtab): Remove.
3352 (end_expandable_symtab): Remove.
3353 (end_symtab_get_static_block): Remove.
3354 (end_symtab_from_static_block): Remove.
3356 2018-07-20 Tom Tromey <tom@tromey.com>
3358 * dwarf2read.c: Include buildsym.h.
3359 (struct dwarf2_cu) <builder>: New method.
3360 (fixup_go_packaging): Update.
3361 (process_full_comp_unit, process_full_type_unit): Update. Don't
3362 use scoped_free_pendings.
3363 (using_directives): Add "cu" parameter, remove "language".
3364 (read_import_statement, setup_type_unit_groups, )
3365 (read_func_scope, read_lexical_block_scope)
3366 (dwarf2_record_block_ranges, read_namespace): Update.
3367 (lnp_state_machine::lnp_state_machine): Add cu parameter.
3368 (lnp_state_machine::handle_end_sequence): Update.
3369 (class lnp_state_machine) <m_cu>: New member.
3370 <m_record_line_callback>: Remove.
3371 <m_currently_recording_lines>: New member.
3372 (lnp_state_machine::handle_set_file): Update.
3373 (noop_record_line): Remove.
3374 (dwarf_record_line_p): Add cu parameter.
3375 (dwarf_record_line_1, dwarf_finish_line): Likewise.
3376 (lnp_state_machine::record_line)
3377 (lnp_state_machine::lnp_state_machine)
3378 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3379 (dwarf_decode_lines): Update.
3380 (dwarf2_start_subfile): Add cu parameter.
3381 (dwarf2_start_symtab, new_symbol): Update.
3382 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3383 Remove dwarf2_per_objfile parameter.
3384 (dwarf_decode_macros): Update.
3386 2018-07-20 Tom Tromey <tom@tromey.com>
3388 * stabsread.c (define_symbol): Update.
3389 * buildsym-legacy.h (get_buildsym_compunit): Declare.
3390 * dwarf2read.c (new_symbol): Update.
3391 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3392 * cp-namespace.c: Include buildsym.h.
3393 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3394 * buildsym-legacy.c (get_buildsym_compunit): New function.
3396 2018-07-20 Tom Tromey <tom@tromey.com>
3398 * xcoffread.c: Include buildsym-legacy.h.
3399 * windows-nat.c: Include buildsym-legacy.h.
3400 * stabsread.c: Include buildsym-legacy.h.
3401 * mdebugread.c: Include buildsym-legacy.h.
3402 * buildsym-legacy.h: New file.
3403 * buildsym-legacy.c: New file, from buildsym.c.
3404 * go32-nat.c: Include buildsym-legacy.h.
3405 * dwarf2read.c: Include buildsym-legacy.h.
3406 * dbxread.c: Include buildsym-legacy.h.
3407 * cp-namespace.c: Include buildsym-legacy.h.
3408 * coffread.c: Include buildsym-legacy.h.
3409 * buildsym.h: Move some contents to buildsym-legacy.h.
3410 * buildsym.c: Include buildsym-legacy.h. Move many functions to
3412 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3414 2018-07-20 Tom Tromey <tom@tromey.com>
3416 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3417 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3418 (buildsym_compunit::buildsym_compunit)
3419 (buildsym_compunit::~buildsym_compunit)
3420 (buildsym_compunit::get_macro_table): Define.
3422 2018-07-20 Tom Tromey <tom@tromey.com>
3424 * buildsym.c (reset_symtab_globals): Remove.
3425 (buildsym_compunit::end_symtab_from_static_block): Update.
3426 (buildsym_compunit::augment_type_symtab): Update.
3427 (end_symtab_from_static_block): Call free_buildsym_compunit.
3428 (augment_type_symtab, end_symtab, end_expandable_symtab):
3431 2018-07-20 Tom Tromey <tom@tromey.com>
3433 * arch-utils.c: Do not include buildsym.h.
3434 * mipsread.c: Do not include buildsym.h.
3435 * machoread.c: Do not include buildsym.h.
3436 * elfread.c: Do not include buildsym.h.
3438 2018-07-20 Tom Tromey <tom@tromey.com>
3440 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3442 (buildsym_compunit): Add new constructor.
3443 (struct buildsym_compunit) <get_last_source_file, finish_block,
3444 record_block_range, start_subfile, patch_subfile_names,
3445 push_subfile, pop_subfile, record_line, get_compunit_symtab,
3446 set_last_source_start_addr, get_last_source_start_addr,
3447 get_local_using_directives, set_local_using_directives,
3448 get_global_using_directives, outermost_context_p,
3449 get_current_context_stack, get_context_stack_depth,
3450 get_current_subfile, get_local_symbols, get_file_symbols,
3451 get_global_symbols, record_debugformat, record_producer,
3452 push_context, pop_context, end_symtab_get_static_block,
3453 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3455 <record_pending_block, finish_block_internal, make_blockvector,
3456 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3460 2018-05-22 Tom Tromey <tom@tromey.com>
3462 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3464 (finish_block_internal): Update.
3466 2018-07-20 Tom Tromey <tom@tromey.com>
3468 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3470 (finish_block_internal): Update.
3472 2018-07-20 Tom Tromey <tom@tromey.com>
3474 * buildsym.h (EXTERN): Don't define or undef.
3475 * buildsym.c (EXTERN): Don't define.
3477 2018-07-20 Tom Tromey <tom@tromey.com>
3479 * buildsym.c: Remove TODO comment.
3481 2018-07-20 Tom Tromey <tom@tromey.com>
3483 * coffread.c (coff_symtab_read): Update.
3484 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3485 (xcoff_new_init): Update.
3486 * mipsread.c (mipscoff_new_init): Update.
3487 * mdebugread.c (mdebug_build_psymtabs): Update.
3488 * elfread.c (elf_new_init): Update.
3489 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3491 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3492 (coffstab_build_psymtabs, elfstab_build_psymtabs)
3493 (stabsect_build_psymtabs): Update.
3494 * buildsym.h (buildsym_init): Don't declare.
3495 * buildsym.c: Update comment.
3496 (prepare_for_building): Remove.
3497 (start_symtab, restart_symtab): Update.
3498 (reset_symtab_globals): Update comment.
3499 (buildsym_init): Remove.
3501 2018-07-20 Tom Tromey <tom@tromey.com>
3503 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3504 * stabsread.c (patch_block_stabs, define_symbol, read_type)
3505 (read_enum_type, common_block_start, common_block_end)
3506 (cleanup_undefined_types_1, finish_global_stabs): Update.
3507 * mdebugread.c (psymtab_to_symtab_1): Update.
3508 * dwarf2read.c (fixup_go_packaging, read_func_scope)
3509 (read_lexical_block_scope, new_symbol): Update.
3510 * dbxread.c (process_one_symbol): Update.
3511 * coffread.c (coff_symtab_read, process_coff_symbol)
3512 (coff_read_enum_type): Update.
3513 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3515 (get_local_symbols, get_file_symbols, get_global_symbols): New
3517 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3519 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3520 (~scoped_free_pendings): Update.
3521 (finish_block, prepare_for_building, reset_symtab_globals)
3522 (end_symtab_get_static_block, end_symtab_with_blockvector)
3523 (augment_type_symtab, push_context): Update.
3524 (get_local_symbols, get_file_symbols, get_global_symbols): New
3526 (buildsym_init): Update.
3528 2018-07-20 Tom Tromey <tom@tromey.com>
3530 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3531 (process_full_type_unit): Likewise.
3532 (dwarf2_start_symtab): Set list_in_scope.
3534 2018-07-20 Tom Tromey <tom@tromey.com>
3536 * dwarf2read.c (process_psymtab_comp_unit_reader)
3537 (build_type_psymtabs_reader): Do not set list_in_scope.
3539 2018-07-20 Tom Tromey <tom@tromey.com>
3541 * buildsym.c (free_pendings): Remove.
3542 (add_symbol_to_list, scoped_free_pendings)
3543 (finish_block_internal, buildsym_init): Update.
3545 2018-07-20 Tom Tromey <tom@tromey.com>
3547 * xcoffread.c (read_xcoff_symtab): Update.
3548 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3550 * dbxread.c (process_one_symbol): Update.
3551 * coffread.c (coff_symtab_read): Update.
3552 * buildsym.h (finish_block): Update.
3553 * buildsym.c (finish_block): Remove "listhead" argument.
3554 (end_symtab_get_static_block): Update.
3556 2018-07-20 Tom Tromey <tom@tromey.com>
3558 * buildsym.h (class scoped_free_pendings): Remove constructor.
3559 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3561 <m_pending_block_obstack, m_pending_blocks>: New members.
3562 (pending_block_obstack, pending_blocks): Remove.
3563 (scoped_free_pendings::scoped_free_pendings): Default.
3564 (~scoped_free_pendings): Update.
3565 (free_pending_blocks): Remove.
3566 (finish_block_internal, record_pending_block, make_blockvector)
3567 (end_symtab_get_static_block, augment_type_symtab, push_context)
3568 (buildsym_init): Update.
3570 2018-07-20 Tom Tromey <tom@tromey.com>
3572 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3573 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3575 (pending_addrmap, pending_addrmap_obstack)
3576 (pending_addrmap_interesting): Remove.
3577 (scoped_free_pendings, record_block_range, make_blockvector)
3578 (prepare_for_building, reset_symtab_globals, buildsym_init):
3581 2018-07-20 Tom Tromey <tom@tromey.com>
3583 * xcoffread.c (process_linenos): Update.
3584 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3585 * mdebugread.c (psymtab_to_symtab_1): Update.
3586 * dwarf2read.c (setup_type_unit_groups)
3587 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3588 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3589 * dbxread.c (process_one_symbol): Update.
3590 * coffread.c (coff_symtab_read, enter_linenos)
3591 (process_coff_symbol): Update.
3592 * buildsym.h (current_subfile): Don't declare.
3593 (get_current_subfile): Declare.
3594 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3596 (start_subfile, free_buildsym_compunit, push_subfile)
3597 (prepare_for_building, start_symtab): Update.
3598 (get_current_subfile): New function.
3600 2018-07-20 Tom Tromey <tom@tromey.com>
3602 * coffread.c (coff_symtab_read): Update.
3603 * xcoffread.c (read_xcoff_symtab): Update.
3604 * dwarf2read.c (new_symbol): Update.
3605 (read_func_scope, read_lexical_block_scope): Update.
3606 * dbxread.c (process_one_symbol): Update.
3607 * buildsym.h (context_stack, context_stack_depth): Don't declare.
3608 (outermost_context_p): Remove macro.
3609 (outermost_context_p, get_current_context_stack)
3610 (get_context_stack_depth): Declare.
3611 (pop_context): Return struct context_stack.
3612 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3614 (context_stack_size): Remove.
3615 (INITIAL_CONTEXT_STACK_SIZE): Remove.
3616 (prepare_for_building, end_symtab_get_static_block)
3617 (augment_type_symtab, push_context): Update.
3618 (pop_context): Return struct context_stack.
3619 (outermost_context_p, get_current_context_stack)
3620 (get_context_stack_depth): New functions.
3621 (buildsym_init): Update.
3623 2018-07-20 Tom Tromey <tom@tromey.com>
3625 * rust-exp.y: Now a pure parser. Update all rules.
3626 (%union): Move earlier.
3627 (current_parser, work_obstack): Remove globals.
3628 (rust_parser, ~rust_parser): Update.
3629 (class rust_parser) <copy_name, concat3, crate_name, super_name,
3630 lex_character, lex_number, lex_string, lex_identifier,
3631 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3632 convert_name, convert_params_to_expression,
3633 convert_ast_to_expression, ast_basic_type, ast_operation,
3634 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3635 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3636 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3637 ast_array_type, ast_slice_type, ast_reference_type,
3638 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3639 (rust_parse): Update.
3640 (rustyyerror, rustyylex): Add parser parameter.
3641 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3642 (rust_lex_stringish_test, rust_lex_test_sequence)
3643 (rust_lex_test_trailing_dot, rust_lex_test_completion)
3644 (rust_lex_test_push_back, rust_lex_tests): Update.
3646 2018-07-19 Pedro Alves <palves@redhat.com>
3648 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3649 gdb::unique_xmalloc_ptr.
3650 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3651 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3652 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3653 copy-initialization.
3654 * guile/scm-pretty-print.c (ppscm_print_children): Use
3655 gdb::unique_xmalloc_ptr instead of cleanups.
3656 (gdbscm_apply_val_pretty_printer): Remove cleanups.
3657 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3658 gdb::unique_xmalloc_ptr.
3659 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3660 Adjust to use gdb::unique_xmalloc_ptr.
3661 * guile/scm-utils.c (extract_arg): Adjust.
3662 * guile/scm-value.c (gdbscm_value_field): Adjust to use
3663 gdb::unique_xmalloc_ptr instead of a cleanup.
3665 2018-07-19 Tom Tromey <tom@tromey.com>
3667 * utils.c (do_value_free_to_mark)
3668 (make_cleanup_value_free_to_mark): Remove.
3669 * utils.h (make_cleanup_value_free_to_mark): Remove.
3671 2018-07-19 Pedro Alves <palves@redhat.com>
3673 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3674 forwarding reference.
3676 2018-07-18 Pedro Alves <palves@redhat.com>
3678 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3679 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
3682 2018-07-18 Pedro Alves <palves@redhat.com>
3684 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3686 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3688 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3689 directly instead of a cleanup.
3690 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3691 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
3692 (vlscm_binop_gdbthrow): New, factored out from ...
3693 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
3694 (vlscm_rich_compare): Use gdbscm_wrap.
3695 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3696 instead of a cleanup.
3697 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3699 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3700 Use xfree directly instead of a cleanup.
3701 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3702 Adjust to use gdbscm_wrap and scoped_value_mark.
3703 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3704 (gdbscm_value_address, gdbscm_value_dereference)
3705 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3707 (gdbscm_value_dynamic_type): Use scoped_value_mark.
3708 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3710 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3711 gdbscm_wrap and scoped_value_mark.
3712 (gdbscm_value_to_string): Use xfree directly instead of a
3713 cleanup. Move 'buffer' unique_ptr to TRY scope.
3714 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3715 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
3717 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3718 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3720 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3723 2018-07-18 Tom de Vries <tdevries@suse.de>
3725 * findvar.c (default_read_var_value): Also resolve dynamic type for
3726 LOC_OPTIMIZED_OUT vars.
3728 2018-07-18 Maciej W. Rozycki <macro@mips.com>
3730 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3733 2018-07-17 Tom Tromey <tom@tromey.com>
3735 * guile/scm-param.c (pascm_set_func, pascm_show_func)
3736 (compute_enum_list, pascm_set_param_value_x)
3737 (gdbscm_parameter_value): Update.
3738 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3739 (gdbscm_scm_to_host_string): Update.
3740 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3742 * guile/scm-cmd.c (cmdscm_add_completion): Update.
3743 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3744 * guile/scm-string.c (gdbscm_scm_to_string): Return
3746 (gdbscm_scm_to_host_string): Likewise.
3748 2018-07-17 Tom Tromey <tom@tromey.com>
3750 * guile/guile.c (gdbscm_eval_from_control_command): Update.
3751 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3752 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3753 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3756 2018-07-17 Tom Tromey <tom@tromey.com>
3758 * guile/scm-param.c (pascm_signal_setshow_error): Update.
3759 * guile/guile-internal.h (gdbscm_exception_message_to_string):
3761 * guile/scm-cmd.c (cmdscm_function): Update.
3762 * guile/scm-pretty-print.c
3763 (ppscm_print_exception_unless_memory_error): Update.
3764 * guile/scm-exception.c (gdbscm_exception_message_to_string):
3765 Return unique_xmalloc_ptr.
3767 2018-07-17 Tom Tromey <tom@tromey.com>
3769 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3772 2018-07-17 Jim Wilson <jimw@sifive.com>
3774 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3775 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
3776 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
3777 unecessary braces after EF_RISCV_RVC test. Delete call to
3778 set_gdbarch_decr_pc_after_break.
3780 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3781 RISCV_LAST_FP_REGNUM + 1.
3782 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3784 2018-07-17 Tom Tromey <tom@tromey.com>
3786 * configure.ac: Remove --disable-gdbcli.
3787 * configure: Rebuild.
3788 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3789 (SUBDIR_CLI_CFLAGS): Remove.
3790 (SFILES): Use SUBDIR_CLI_SRCS.
3791 (COMMON_OBS): Use SUBDIR_CLI_OBS.
3793 2018-07-17 Tom Tromey <tom@tromey.com>
3796 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3798 2018-07-16 Jim Wilson <jimw@sifive.com>
3800 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3802 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3804 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3806 (libunwind_frame_sniffer): Likewise.
3807 (libunwind_frame_prev_register): Likewise.
3808 (libunwind_sigtramp_frame_sniffer): Likewise.
3809 * ia64-tdep.c (ia64_access_reg): Likewise.
3810 (ia64_access_rse_reg): Likewise.
3811 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3812 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3814 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3816 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3818 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3820 * remote-sim.c (gdbsim_target::close,
3821 gdbsim_target::mourn_inferior): Remove unused variables.
3823 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
3825 * ia64-tdep.c (ktab_buf): New global.
3826 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3827 (get_kernel_table): Adjust.
3829 2018-07-16 Tom Tromey <tom@tromey.com>
3831 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3832 * dwarf2read.c (using_directives, new_symbol): Use
3833 outermost_context_p.
3834 * dbxread.c (process_one_symbol): Use outermost_context_p.
3835 * coffread.c (coff_symtab_read): Use outermost_context_p.
3837 2018-07-16 Tom Tromey <tom@tromey.com>
3839 * dwarf2read.c (using_directives, read_func_scope)
3840 (read_lexical_block_scope): Update.
3841 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3842 * buildsym.h (local_using_directives, global_using_directives):
3844 (get_local_using_directives, set_local_using_directives)
3845 (get_global_using_directives): Declare.
3846 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3847 m_global_using_directives>: New members.
3848 (finish_block_internal, prepare_for_building)
3849 (reset_symtab_globals, end_symtab_get_static_block)
3850 (push_context): Update.
3851 (get_local_using_directives, set_local_using_directives)
3852 (get_global_using_directives): New functions.
3853 (buildsym_init): Update.
3855 2018-07-16 Tom Tromey <tom@tromey.com>
3857 * xcoffread.c (xcoff_initial_scan): Don't call
3858 free_pending_blocks.
3859 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3860 * buildsym.h (class scoped_free_pendings): Add constructor.
3861 (free_pending_blocks): Don't declare.
3862 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3863 (free_pending_blocks): Now static.
3865 2018-07-16 Tom Tromey <tom@tromey.com>
3867 * buildsym.h (push_subfile, pop_subfile): Update declarations.
3868 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3870 (struct subfile_stack): Remove.
3871 (subfile_stack): Remove.
3872 (push_subfile, pop_subfile, buildsym_init): Update.
3874 2018-07-16 Tom Tromey <tom@tromey.com>
3876 * buildsym.c (push_subfile): Use gdb_assert.
3877 (pop_subfile): Use gdb_assert.
3879 2018-07-16 Tom Tromey <tom@tromey.com>
3881 * buildsym.h (merge_symbol_lists): Remove.
3882 * buildsym.c (merge_symbol_lists): Remove.
3884 2018-07-16 Tom Tromey <tom@tromey.com>
3886 * stabsread.c (scan_file_globals): Update comment.
3887 * stabsread.h (scan_file_globals): Move from buildsym.h.
3888 * buildsym.h (scan_file_globals): Move to stabsread.h.
3890 2018-07-16 Tom Tromey <tom@tromey.com>
3892 * xcoffread.c (xcoff_new_init): Update.
3893 * mipsread.c (mipscoff_new_init): Update.
3894 * mdebugread.c (mdebug_build_psymtabs): Update.
3895 * elfread.c (elf_new_init): Update.
3896 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3897 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3898 * buildsym.h (buildsym_new_init): Don't declare.
3899 * buildsym.c (buildsym_new_init): Remove.
3901 2018-07-16 Tom Tromey <tom@tromey.com>
3903 * stabsread.h (within_function): Move from buildsym.h.
3904 * stabsread.c (start_stabs): Clear within_function.
3905 * coffread.c (coff_start_symtab): Clear within_function.
3906 * buildsym.h (within_function): Move to stabsread.h.
3907 * buildsym.c (prepare_for_building): Update.
3909 2018-07-16 Tom Tromey <tom@tromey.com>
3911 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3912 * dwarf2read.c (dwarf2_start_symtab): Don't set
3913 processing_gcc_compilation.
3914 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3916 2018-07-16 Tom Tromey <tom@tromey.com>
3918 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3919 (next_symbol_text_func): Move from buildsym.h.
3920 * stabsread.c (hashname): Move from buildsym.c.
3921 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3922 (next_symbol_text_func, hashname): Move to stabsread.h.
3923 * buildsym.c: Don't include bcache.h
3924 (hashname): Move to stasbread.c.
3926 2018-07-16 Tom Tromey <tom@tromey.com>
3928 * buildsym.h (context_stack_size): Don't declare.
3929 * buildsym.c (context_stack_size): New global.
3931 2018-07-16 Tom Tromey <tom@tromey.com>
3933 * dbxread.c (processing_acc_compilation): New global.
3934 * buildsym.h (processing_acc_compilation): Don't declare.
3936 2018-07-16 Tom Tromey <tom@tromey.com>
3938 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3939 * dbxread.c (read_ofile_symtab): Update.
3940 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3941 * buildsym.h (last_source_start_addr): Remove.
3942 (set_last_source_start_addr, get_last_source_start_addr):
3944 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3946 (struct buildsym_compunit) <m_last_source_start_addr>: New
3948 (prepare_for_building): Remove start_addr parameter.
3949 (start_symtab, restart_symtab, end_symtab_get_static_block)
3950 (end_symtab_with_blockvector): Update.
3951 (set_last_source_start_addr, get_last_source_start_addr): New
3954 2018-07-16 Tom Tromey <tom@tromey.com>
3956 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3958 (have_line_numbers): Remove.
3959 (record_line, prepare_for_building, end_symtab_get_static_block)
3960 (augment_type_symtab): Update.
3962 2018-07-16 Tom Tromey <tom@tromey.com>
3964 * buildsym.c (~buildsym_compunit): Free the macro table.
3965 (struct buildsym_compunit) <get_macro_table, release_macros>: New
3967 <m_pending_macros>: New member.
3968 (pending_macros): Remove.
3969 (~scoped_free_pendings, get_macro_table, prepare_for_building)
3970 (reset_symtab_globals, end_symtab_get_static_block)
3971 (end_symtab_with_blockvector, augment_type_symtab)
3972 (buildsym_init): Update.
3974 2018-07-16 Tom Tromey <tom@tromey.com>
3976 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3978 (buildsym_compunit::set_last_source_file): New method.
3979 <m_last_source_file>: New member.
3980 (prepare_for_building): Remove "name" parameter.
3981 (start_symtab, restart_symtab, reset_symtab_globals): Update.
3982 (last_source_file): Remove.
3983 (set_last_source_file, get_last_source_file): Update.
3985 2018-07-16 Tom Tromey <tom@tromey.com>
3987 * buildsym.c (prepare_for_building): Add assert.
3989 2018-07-16 Tom Tromey <tom@tromey.com>
3991 * buildsym.c (~buildsym_compunit): Update.
3992 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3993 (start_subfile, patch_subfile_names)
3994 (end_symtab_with_blockvector): Update.
3996 2018-07-16 Tom Tromey <tom@tromey.com>
3998 * buildsym.c (struct buildsym_compunit): Add constructor,
3999 destructor, initializers.
4000 (start_buildsym_compunit): Remove.
4001 (free_buildsym_compunit): Use "delete".
4002 (start_symtab, restart_symtab): Use "new".
4004 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
4006 * symfile.c (set_objfile_default_section_offset): Remove struct
4009 2018-07-14 Stafford Horne <shorne@gmail.com>
4011 * (Responsible Maintainers): Add myself as or1k maintainer.
4013 2018-07-13 Tom Tromey <tom@tromey.com>
4015 * symfile.c (set_objfile_default_section_offset): Use extra braces
4018 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4020 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4023 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4025 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4026 unittests/cli-utils-selftests.c
4027 * unittests/cli-utils-selftests.c: New file.
4029 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4031 * NEWS: Mention new commands. Mention change to 'thread apply'.
4033 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4035 * thread.c (thr_try_catch_cmd): New function.
4036 (thread_apply_all_command): Handle qcs flags.
4037 (thread_apply_command): Handle qcs flags.
4038 (taas_command): New function.
4039 (tfaas_command): New function.
4040 (_initialize_thread): Update to setup the new commands 'taas
4041 and 'tfaas'. Change doc string for 'thread apply'.
4043 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4045 * stack.c: (trailing_outermost_frame): New function, mostly
4046 extracted from backtrace_command_1.
4047 (leading_innermost_frame): New function.
4048 (backtrace_command_1): Update to call trailing_outermost_frame.
4049 (frame_apply_command_count): New function.
4050 (frame_apply_level_command): New function.
4051 (frame_apply_all_command): New function.
4052 (frame_apply_command): New function.
4053 (faas_command): New function.
4054 (frame_cmd_list): New variable.
4055 (_initialize_stack): Update to setup the new commands 'frame apply'
4058 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4060 * cli-utils.c (number_or_range_parser::get_number): Only handle
4061 numbers or convenience var as numbers.
4062 (parse_flags): New function.
4063 (parse_flags_qcs): New function.
4064 (number_or_range_parser::finished): Ensure parsing end is detected
4065 before end of string.
4066 * cli-utils.h (parse_flags): New function.
4067 (parse_flags_qcs): New function.
4068 (number_or_range_parser): Remove m_finished bool.
4069 (number_or_range_parser::skip_range): Set m_in_range to false.
4071 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
4073 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4076 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4077 Jan Kratochvil <jan.kratochvil@redhat.com>
4078 Paul Fertser <fercerpav@gmail.com>
4079 Tsutomu Seki <sekiriki@gmail.com>
4080 Pedro Alves <palves@redhat.com>
4082 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4083 'unittests/parse-connection-spec-selftests.c'.
4084 (COMMON_SFILES): Add 'common/netstuff.c'.
4085 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4086 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4087 * common/netstuff.c: New file.
4088 * common/netstuff.h: New file.
4089 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4090 (wait_for_connect): Update comment. New parameter
4091 'gdb::optional<int> sock' instead of 'struct serial *scb'.
4092 Use 'sock' directly instead of 'scb->fd'.
4093 (try_connect): New function, with code from 'net_open'.
4094 (net_open): Rewrite main loop to deal with multiple
4095 sockets/addresses. Handle IPv6-style hostnames; implement
4096 support for IPv6 connections.
4097 * unittests/parse-connection-spec-selftests.c: New file.
4099 2018-07-11 Pedro Alves <palves@redhat.com>
4102 * remote.c (remote_target::remote_detach_pid): Call
4103 set_current_process.
4105 2018-07-11 Pedro Alves <palves@redhat.com>
4107 * h8300-tdep.c (h8300_gdbarch_init): Remove
4108 set_gdbarch_ecoff_reg_to_regnum calls.
4110 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4113 * c-typeprint.c (c_type_print_base_struct_union): Don't print
4114 offsets/sizes for static members of a class/struct.
4116 2018-07-11 Alan Hayward <alan.hayward@arm.com>
4118 * target-descriptions.c (tdesc_register_bitsize): Rename.
4119 * target-descriptions.h (tdesc_register_bitsize): Likewise.
4120 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4121 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4123 2018-07-10 Tom Tromey <tom@tromey.com>
4125 * breakpoint.c (moribund_locations): Now static and a
4127 (breakpoint_init_inferior, moribund_breakpoint_here_p)
4128 (build_bpstat_chain, update_global_location_list)
4129 (breakpoint_retire_moribund): Update.
4130 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
4133 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4135 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4136 (riscv_register_reggroup_p): Use new function, remove unneeded
4138 (riscv_push_dummy_call): Extend assert to compare against xlen or
4139 flen based on register type.
4141 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4143 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4145 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
4147 * remote.c (show_hardware_watchpoint_limit): New function.
4148 (show_hardware_watchpoint_length_limit): New function.
4149 (show_hardware_breakpoint_limit): New function.
4150 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4151 where appropriate, update help text.
4153 2018-07-09 Tom Tromey <tom@tromey.com>
4155 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4156 (CLIBS): Don't mention NAT_CLIBS.
4158 2018-07-09 Tom Tromey <tom@tromey.com>
4160 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4161 (LIBGDB_OBS, clean mostlyclean): Update.
4162 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4164 2018-07-09 Tom Tromey <tom@tromey.com>
4166 * Makefile.in (%.c: %.y): Use ECHO_YACC.
4167 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
4168 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4170 2018-07-09 Tom Tromey <tom@tromey.com>
4172 * Makefile.in (ALLDEPFILES): Remove exec.c.
4173 (COMMON_OBS): Remove exec.o.
4174 (COMMON_SFILES): Add exec.c.
4176 2018-07-09 Tom Tromey <tom@tromey.com>
4178 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4180 2018-07-09 Tom Tromey <tom@tromey.com>
4182 * Makefile.in (clean mostlyclean): Remove stamp-version.
4183 (version.c): Depend on stamp-version.
4184 (stamp-version): New rule, from version.c rule.
4186 2018-07-09 Tom Tromey <tom@tromey.com>
4188 * Makefile.in (init.c): Depend on stamp-init.
4189 (stamp-init): New rule, from init.c rule.
4190 (clean mostlyclean): Remove stamp-init.
4192 2018-07-09 Tom Tromey <tom@tromey.com>
4194 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4195 SUBDIR_GCC_COMPILE_SRCS.
4197 2018-07-09 Tom Tromey <tom@tromey.com>
4199 * Makefile.in (init.c): Remove some unused sed rules.
4201 2018-07-09 Tom Tromey <tom@tromey.com>
4203 * Makefile.in (TSOBS): Remove.
4204 (INIT_FILES): Update.
4205 (LIBGDB_OBS): Update.
4206 (COMMON_SFILES): Add inflow.c.
4207 (SFILES): Remove inflow.c.
4209 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4211 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4213 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
4215 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4216 get_saveloc_name, is_signal_frame_name, step_name,
4217 init_remote_name, create_addr_space_name,
4218 destroy_addr_space_name, search_unwind_table_name,
4219 find_dyn_list_name): Constify.
4221 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
4223 * darwin-nat.c (darwin_pthread_kill): New function.
4224 (darwin_resume_thread): Use darwin_pthread_kill.
4226 2018-07-05 Tom de Vries <tdevries@suse.de>
4228 * macroexp.c (macro_buffer) <operator=>: New member function.
4230 2018-07-04 Tom Tromey <tom@tromey.com>
4232 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4234 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
4236 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4237 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4238 * maint.c: Likewise.
4241 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4243 * NEWS: Create a new section for the next release branch.
4244 Rename the section of the current branch, now that it has
4247 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4249 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4250 * version.in: Bump version to 8.2.50.DATE-git.
4252 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4253 Pedro Alves <palves@redhat.com>
4255 * linux-nat.c (linux_init_ptrace): Rename to ...
4256 (linux_init_ptrace_procfs): ... this. Call
4257 linux_proc_init_warnings.
4258 (linux_nat_target::post_attach)
4259 (linux_nat_target::post_startup_inferior): Adjust.
4260 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4261 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4263 2018-07-04 Tom de Vries <tdevries@suse.de>
4265 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4267 (read_comp_unit_head): ... here.
4269 2018-07-03 Tom Tromey <tom@tromey.com>
4271 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4272 (stop_tracing, tstatus_command)
4273 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4274 (print_one_static_tracepoint_marker): Update.
4275 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4277 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
4279 (all_tracepoints, static_tracepoints_here): Return std::vector.
4281 2018-07-03 Tom Tromey <tom@tromey.com>
4283 * common/ptid.c (ptid_equal): Remove.
4284 * common/ptid.h (ptid_equal): Don't declare.
4285 * ada-tasks.c: Update.
4286 * breakpoint.c: Update.
4287 * common/agent.c: Update.
4288 * corelow.c: Update.
4289 * darwin-nat-info.c: Update.
4290 * darwin-nat.c: Update.
4292 * dtrace-probe.c: Update.
4293 * dummy-frame.c: Update.
4294 * fbsd-nat.c: Update.
4296 * gdbthread.h: Update.
4297 * gnu-nat.c: Update.
4298 * go32-nat.c: Update.
4299 * inf-loop.c: Update.
4300 * inf-ptrace.c: Update.
4301 * infcall.c: Update.
4305 * linux-fork.c: Update.
4306 * linux-nat.c: Update.
4307 * linux-thread-db.c: Update.
4308 * mi/mi-cmd-var.c: Update.
4309 * mi/mi-interp.c: Update.
4310 * mi/mi-main.c: Update.
4311 * nto-procfs.c: Update.
4312 * ppc-linux-tdep.c: Update.
4314 * python/py-inferior.c: Update.
4315 * python/py-record-btrace.c: Update.
4316 * python/py-record.c: Update.
4317 * ravenscar-thread.c: Update.
4318 * regcache.c: Update.
4319 * remote-sim.c: Update.
4321 * sol-thread.c: Update.
4324 * tui/tui-stack.c: Update.
4326 * windows-nat.c: Update.
4327 * windows-tdep.c: Update.
4329 2018-07-03 Tom Tromey <tom@tromey.com>
4331 * common/ptid.c (ptid_match): Remove.
4332 * common/ptid.h (ptid_match): Don't declare.
4333 * fbsd-nat.c: Update.
4336 * linux-nat.c: Update.
4337 * record-btrace.c: Update.
4338 * regcache.c: Update.
4341 2018-07-03 Tom Tromey <tom@tromey.com>
4343 * common/ptid.c (ptid_tid_p): Remove.
4344 * common/ptid.h (ptid_tid_p): Don't declare.
4345 * sol-thread.c: Update.
4347 2018-07-03 Tom Tromey <tom@tromey.com>
4349 * common/ptid.c (ptid_lwp_p): Remove.
4350 * common/ptid.h (ptid_lwp_p): Don't declare.
4351 * fbsd-nat.c: Update.
4352 * linux-nat.c: Update.
4353 * nat/linux-procfs.c: Update.
4354 * nat/x86-linux-dregs.c: Update.
4355 * sol-thread.c: Update.
4357 2018-07-03 Tom Tromey <tom@tromey.com>
4359 * common/ptid.c (ptid_is_pid): Remove.
4360 * common/ptid.h (ptid_is_pid): Don't declare.
4362 * linux-nat.c: Update.
4363 * mi/mi-interp.c: Update.
4367 2018-07-03 Tom Tromey <tom@tromey.com>
4369 * common/ptid.c (ptid_get_tid): Remove.
4370 * common/ptid.h (ptid_get_tid): Don't declare.
4371 * ada-tasks.c: Update.
4372 * aix-thread.c: Update.
4373 * bsd-uthread.c: Update.
4374 * darwin-nat.c: Update.
4375 * fbsd-nat.c: Update.
4376 * i386-darwin-nat.c: Update.
4378 * linux-tdep.c: Update.
4379 * nto-procfs.c: Update.
4380 * ppc-ravenscar-thread.c: Update.
4381 * python/py-infthread.c: Update.
4382 * ravenscar-thread.c: Update.
4383 * sol-thread.c: Update.
4384 * sparc-ravenscar-thread.c: Update.
4385 * windows-nat.c: Update.
4387 2018-07-03 Tom Tromey <tom@tromey.com>
4389 * common/ptid.c (ptid_get_lwp): Remove.
4390 * common/ptid.h (ptid_get_lwp): Don't declare.
4391 * aarch64-linux-nat.c: Update.
4392 * ada-tasks.c: Update.
4393 * aix-thread.c: Update.
4394 * amd64-linux-nat.c: Update.
4395 * arm-linux-nat.c: Update.
4396 * corelow.c: Update.
4397 * fbsd-nat.c: Update.
4398 * fbsd-tdep.c: Update.
4399 * gnu-nat.c: Update.
4400 * i386-cygwin-tdep.c: Update.
4401 * i386-gnu-nat.c: Update.
4402 * i386-linux-nat.c: Update.
4403 * ia64-linux-nat.c: Update.
4404 * inf-ptrace.c: Update.
4406 * linux-fork.c: Update.
4407 * linux-nat.c: Update.
4408 * linux-tdep.c: Update.
4409 * linux-thread-db.c: Update.
4410 * mips-linux-nat.c: Update.
4411 * nat/aarch64-linux-hw-point.c: Update.
4412 * nat/aarch64-linux.c: Update.
4413 * nat/linux-btrace.c: Update.
4414 * nat/linux-osdata.c: Update.
4415 * nat/linux-procfs.c: Update.
4416 * nat/x86-linux-dregs.c: Update.
4417 * obsd-nat.c: Update.
4418 * ppc-fbsd-nat.c: Update.
4419 * ppc-linux-nat.c: Update.
4421 * python/py-infthread.c: Update.
4422 * ravenscar-thread.c: Update.
4424 * s390-linux-nat.c: Update.
4425 * sol-thread.c: Update.
4426 * sol2-tdep.c: Update.
4427 * spu-linux-nat.c: Update.
4428 * x86-linux-nat.c: Update.
4429 * xtensa-linux-nat.c: Update.
4431 2018-07-03 Tom Tromey <tom@tromey.com>
4433 * common/ptid.c (ptid_get_pid): Remove.
4434 * common/ptid.h (ptid_get_pid): Don't declare.
4435 * aarch64-linux-nat.c: Update.
4436 * ada-lang.c: Update.
4437 * aix-thread.c: Update.
4438 * alpha-bsd-nat.c: Update.
4439 * amd64-fbsd-nat.c: Update.
4440 * amd64-linux-nat.c: Update.
4441 * arm-linux-nat.c: Update.
4442 * arm-nbsd-nat.c: Update.
4444 * break-catch-syscall.c: Update.
4445 * breakpoint.c: Update.
4446 * bsd-uthread.c: Update.
4447 * corelow.c: Update.
4449 * darwin-nat.c: Update.
4450 * fbsd-nat.c: Update.
4451 * fbsd-tdep.c: Update.
4453 * gnu-nat.c: Update.
4454 * hppa-nbsd-nat.c: Update.
4455 * hppa-obsd-nat.c: Update.
4456 * i386-fbsd-nat.c: Update.
4457 * ia64-linux-nat.c: Update.
4458 * inf-ptrace.c: Update.
4460 * inferior.c: Update.
4461 * inferior.h: Update.
4464 * linux-fork.c: Update.
4465 * linux-nat.c: Update.
4466 * linux-tdep.c: Update.
4467 * linux-thread-db.c: Update.
4468 * m68k-bsd-nat.c: Update.
4469 * mi/mi-interp.c: Update.
4470 * mi/mi-main.c: Update.
4471 * mips-linux-nat.c: Update.
4472 * mips-nbsd-nat.c: Update.
4473 * mips64-obsd-nat.c: Update.
4474 * nat/aarch64-linux-hw-point.c: Update.
4475 * nat/aarch64-linux.c: Update.
4476 * nat/linux-btrace.c: Update.
4477 * nat/linux-osdata.c: Update.
4478 * nat/linux-procfs.c: Update.
4479 * nat/x86-linux-dregs.c: Update.
4480 * nto-procfs.c: Update.
4481 * obsd-nat.c: Update.
4482 * ppc-linux-nat.c: Update.
4483 * ppc-nbsd-nat.c: Update.
4484 * ppc-obsd-nat.c: Update.
4485 * proc-service.c: Update.
4487 * python/py-inferior.c: Update.
4488 * python/py-infthread.c: Update.
4489 * ravenscar-thread.c: Update.
4491 * remote-sim.c: Update.
4493 * rs6000-nat.c: Update.
4494 * s390-linux-nat.c: Update.
4495 * sh-nbsd-nat.c: Update.
4496 * sol-thread.c: Update.
4497 * sparc-nat.c: Update.
4498 * sparc64-tdep.c: Update.
4499 * spu-linux-nat.c: Update.
4500 * spu-tdep.c: Update.
4501 * target-debug.h: Update.
4504 * tid-parse.c: Update.
4505 * tracefile-tfile.c: Update.
4506 * vax-bsd-nat.c: Update.
4507 * windows-nat.c: Update.
4508 * x86-linux-nat.c: Update.
4509 * x86-nat.c: Update.
4511 2018-07-03 Tom Tromey <tom@tromey.com>
4513 * common/ptid.c (pid_to_ptid): Remove.
4514 * common/ptid.h (pid_to_ptid): Don't declare.
4515 * aix-thread.c: Update.
4516 * arm-linux-nat.c: Update.
4517 * common/ptid.c: Update.
4518 * common/ptid.h: Update.
4519 * corelow.c: Update.
4521 * darwin-nat.c: Update.
4522 * fbsd-nat.c: Update.
4523 * fork-child.c: Update.
4524 * gnu-nat.c: Update.
4525 * go32-nat.c: Update.
4526 * inf-ptrace.c: Update.
4528 * inferior.c: Update.
4530 * linux-fork.c: Update.
4531 * linux-nat.c: Update.
4532 * nat/aarch64-linux-hw-point.c: Update.
4533 * nat/fork-inferior.c: Update.
4534 * nat/x86-linux-dregs.c: Update.
4535 * nto-procfs.c: Update.
4536 * obsd-nat.c: Update.
4538 * progspace.c: Update.
4540 * rs6000-nat.c: Update.
4541 * s390-linux-nat.c: Update.
4542 * sol-thread.c: Update.
4543 * spu-linux-nat.c: Update.
4546 * tracefile-tfile.c: Update.
4547 * windows-nat.c: Update.
4549 2018-07-03 Tom Tromey <tom@tromey.com>
4551 * common/ptid.h (ptid_build): Don't declare.
4552 * common/ptid.c (ptid_build): Remove.
4553 * aix-thread.c: Update.
4554 * bsd-kvm.c: Update.
4555 * bsd-uthread.c: Update.
4556 * common/agent.c: Update.
4557 * common/ptid.c: Update.
4558 * common/ptid.h: Update.
4559 * corelow.c: Update.
4560 * darwin-nat.c: Update.
4561 * fbsd-nat.c: Update.
4562 * gnu-nat.c: Update.
4563 * linux-fork.c: Update.
4564 * linux-nat.c: Update.
4565 * linux-thread-db.c: Update.
4566 * nat/linux-osdata.c: Update.
4567 * nat/linux-procfs.c: Update.
4568 * nto-procfs.c: Update.
4569 * obsd-nat.c: Update.
4570 * proc-service.c: Update.
4572 * ravenscar-thread.c: Update.
4573 * remote-sim.c: Update.
4575 * sol-thread.c: Update.
4577 * windows-nat.c: Update.
4579 2018-07-03 Tom Tromey <tom@tromey.com>
4581 * infrun.c (follow_exec): Use exit_inferior_silent.
4582 * inferior.c (exit_inferior_num_silent): Remove.
4583 * inferior.h (exit_inferior_num_silent): Don't declare.
4585 2018-07-03 Tom Tromey <tom@tromey.com>
4588 * darwin-nat.c (darwin_attach_pid): Reset inferior and
4589 inferior_ptid on error.
4591 2018-07-02 Maciej W. Rozycki <macro@mips.com>
4592 Simon Marchi <simon.marchi@polymtl.ca>
4595 * disasm.h (gdb_disassembler): Add
4596 `m_disassembler_options_holder'. member
4597 * disasm.c (get_all_disassembler_options): New function.
4598 (gdb_disassembler::gdb_disassembler): Use it.
4599 (gdb_buffered_insn_length_init_dis): Likewise.
4600 (gdb_buffered_insn_length): Adjust accordingly.
4601 (set_disassembler_options): Handle options with arguments.
4602 (show_disassembler_options_sfunc): Likewise. Add a leading new
4603 line if showing options with descriptions.
4604 (disassembler_options_completer): Adapt to using the
4605 `disasm_options_and_args_t' structure.
4606 * mips-tdep.c (mips_disassembler_options): New variable.
4607 (mips_disassembler_options_o32): Likewise.
4608 (mips_disassembler_options_n32): Likewise.
4609 (mips_disassembler_options_n64): Likewise.
4610 (gdb_print_insn_mips): Don't set `disassembler_options'.
4611 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4613 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4614 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
4615 `gdbarch_disassembler_options_implicit' and
4616 `gdbarch_valid_disassembler_options'.
4617 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4618 `disasm_options_and_args_t' structure.
4619 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4621 (valid_disassembler_options): Switch from `disasm_options_t' to
4622 the `disasm_options_and_args_t' structure.
4623 * NEWS: Document `set disassembler-options' support for the MIPS
4625 * gdbarch.h: Regenerate.
4626 * gdbarch.c: Regenerate.
4628 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
4630 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4632 2018-06-29 Joel Brobecker <brobecker@adacore.com>
4634 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4635 parameter in call to amd64_target_description.
4636 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4637 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4638 (amd64fbsd_init_abi): Likewise.
4639 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4640 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4641 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4642 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4644 2018-06-29 Pedro Alves <palves@redhat.com>
4646 * gdb/amd64-tdep.h (amd64_create_target_description): Add
4647 "segments" parameter.
4648 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4649 (_initialize_amd64_tdep): Update call to
4650 amd64_create_target_description.
4651 (amd64_target_description): Add "segments" parameter. Adjust
4652 the implementation to use it.
4653 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4654 call to amd64_create_target_description.
4655 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4656 * gdb/arch/amd64.h (amd64_create_target_description): Add
4657 "segments" register.
4658 * gdb/arch/amd64.c (amd64_create_target_description): Add
4659 "segments" parameter. Call create_feature_i386_64bit_segments
4660 only if SEGMENTS is true.
4661 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4662 call to amd64_create_target_description.
4664 2018-06-29 Pedro Alves <palves@redhat.com>
4666 * thread.c (thread_target_id_str): New, factored out from ...
4667 (print_thread_info_1): ... here. Use it to compute the max
4668 "Target Id" column width.
4670 2018-06-29 Pedro Alves <palves@redhat.com>
4672 * remote.c (remote_target::extra_thread_info): Delete
4673 'display_buf' and 'n' locals. from the cache, regardless of
4674 packet mechanims is in use. Use cache for qThreadExtra and qP
4677 2018-06-29 Pedro Alves <palves@redhat.com>
4679 * blockframe.c (find_pc_sect_containing_function): New function.
4680 * breakpoint.c (print_breakpoint_location): Don't call
4681 find_pc_sect_function.
4682 * linespec.c (create_sals_line_offset): Record the location's
4684 * linespec.c (convert_address_location_to_sals): Fill in sal's
4685 symbol with find_pc_sect_containing_function.
4686 * symtab.c (find_function_start_sal): Rename to ...
4687 (find_function_start_sal_1): ... this.
4688 (find_function_start_sal): Reimplement as wrapper around
4689 find_function_start_sal_1, and use
4690 find_pc_sect_containing_function to fill in the sal's symbol.
4691 (find_function_start_sal(symbol*, bool)): Adjust.
4692 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4694 (find_pc_sect_containing_function): Declare.
4696 2018-06-29 Pedro Alves <palves@redhat.com>
4698 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4699 true if the the location has no symbol.
4701 2018-06-28 Tom Tromey <tom@tromey.com>
4703 * NEWS: Mention --enable-codesign.
4704 * silent-rules.mk (ECHO_SIGN): New variable.
4705 * configure.ac: Add --enable-codesign.
4706 * configure: Rebuild.
4707 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4708 (gdb$(EXEEXT)): Optionally invoke codesign.
4710 2018-06-28 Pedro Alves <palves@redhat.com>
4712 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4714 (switch_to_thread_no_regs): Adjust comment.
4715 * infcmd.c (stop_pc): Delete.
4716 (post_create_inferior, info_program_command): Replace references
4717 to stop_pc with references to thread_info->suspend.stop_pc.
4718 * inferior.h (stop_pc): Delete declaration.
4719 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4720 (handle_inferior_event_1, handle_signal_stop)
4721 (process_event_stop_test, keep_going_stepped_thread)
4722 (handle_step_into_function, handle_step_into_function_backward)
4723 (print_stop_location): Replace references to stop_pc with
4724 references to thread_info->suspend.stop_pc.
4725 (struct infcall_suspend_state) <stop_pc>: Delete field.
4726 (save_infcall_suspend_state, restore_infcall_suspend_state):
4727 Remove references to inf_stat->stop_pc.
4728 * linux-fork.c (fork_load_infrun_state): Likewise.
4729 * record-btrace.c (record_btrace_set_replay): Likewise.
4730 * record-full.c (record_full_goto_entry): Likewise.
4731 * remote.c (print_one_stopped_thread): Likewise.
4732 * target.c (target_resume): Extend comment.
4733 * thread.c (set_executing_thread): New.
4734 (set_executing): Use it.
4735 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4736 Remove references to stop_pc.
4738 2018-06-28 Pedro Alves <palves@redhat.com>
4740 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4741 Moving fetching stop_pc until after ecs->event_thread is refreshed.
4743 2018-06-28 Tom Tromey <tom@tromey.com>
4745 * coffread.c (coff_symfile_finish): Update.
4746 * xcoffread.c (xcoff_symfile_finish): Update.
4747 * elfread.c (elf_symfile_finish): Update.
4748 * symfile.h (dwarf2_free_objfile): Don't declare.
4749 * dwarf2read.c (_initialize_dwarf2_read): Use
4750 register_objfile_data_with_cleanup.
4751 (dwarf2_free_objfile): Now static. Change signature.
4753 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4755 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4756 option "-o" to add-symbol-file-load to add an offset to each
4757 section's load address.
4758 * symfile.c (set_objfile_default_section_offset): New function.
4760 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4762 * symfile.c (add_symbol_file_command): Make sure that sections
4763 with the same name are sorted in the same order.
4765 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4767 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4768 require the second argument. If omitted, load sections at the
4769 addresses specified in the file.
4771 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4773 * symfile.c (symbol_file_command, symbol_file_add_main_1)
4774 (_initialize_symfile): Add option "-o" to symbol-file to add an
4775 offset to each section of the symbol file.
4777 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4779 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4781 2018-06-27 Tom Tromey <tom@tromey.com>
4783 * stack.c (_initialize_stack): Update "func" help text.
4785 2018-06-27 Tom Tromey <tom@tromey.com>
4787 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4789 (unwind_infopy_str, pyuw_create_unwind_info)
4790 (unwind_infopy_add_saved_register, pyuw_sniffer)
4791 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4793 (struct saved_reg): Add constructor.
4794 <value>: Now a gdbpy_ref<>.
4796 2018-06-27 Tom Tromey <tom@tromey.com>
4798 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4800 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4802 * gdb-gdb.py.in: Format using autopep8.
4804 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4806 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4807 (type_lookup_function): Recognize CORE_ADDR values.
4809 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4811 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4814 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4816 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4819 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4821 * gdb-gdb.py: Move to...
4822 * gdb-gdb.py.in: ... here.
4823 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4824 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4826 (distclean): Remove gdb-gdb.py when cleaning.
4827 (gdb-gdb.py, gdb-gdb.gdb): New rules.
4828 * configure: Re-generate.
4830 2018-06-27 Pedro Alves <palves@redhat.com>
4832 * proc-service.c (get_ps_regcache): New.
4833 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4834 (ps_lsetfpregs): Use it.
4836 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
4839 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4840 (dwarf_decode_lines_1): Adjust.
4842 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4844 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4846 <info_proc>: Likewise.
4848 2018-06-26 Joel Brobecker <brobecker@adacore.com>
4850 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4851 to windows_fetch_one_register, and only handle the case of
4852 fetching one register. Move the code that reloads the context
4853 and iterates over all registers if R is negative to...
4854 (windows_nat_target::fetch_registers): ... here.
4855 (do_windows_store_inferior_registers): Rename to
4856 windows_store_one_register, and only handle the case of storing
4857 one register. Move the code that handles the case where r is
4859 (windows_nat_target::store_registers) ... here.
4861 2018-06-26 Tom Tromey <tom@tromey.com>
4864 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4865 * rust-lang.c (rust_print_struct_def): Add podata parameter.
4867 (rust_internal_print_type): Add podata parameter.
4868 (rust_print_type): Update.
4870 2018-06-26 Tom Tromey <tom@tromey.com>
4872 * typeprint.h (struct print_offset_data) <update, finish,
4873 maybe_print_hole>: New methods.
4874 <indentation>: New constant.
4875 * typeprint.c (print_offset_data::indentation): Define.
4876 (print_offset_data::maybe_print_hole, print_offset_data::update)
4877 (print_offset_data::finish): Move from c-typeprint.c and rename.
4878 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4879 (print_spaces_filtered_with_print_options): Update.
4880 (c_print_type_union_field_offset, maybe_print_hole)
4881 (c_print_type_struct_field_offset): Move to typeprint.c and
4883 (c_type_print_base_struct_union): Update.
4885 2018-06-25 Pedro Alves <palves@redhat.com>
4887 * gdbthread.h (thread_info_ref, delete_thread)
4888 (delete_thread_silent, first_thread_of_inferior)
4889 (any_thread_of_inferior, switch_to_thread)
4890 (enable_thread_stack_temporaries)
4891 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4892 (get_last_thread_stack_temporary)
4893 (value_in_thread_stack_temporaries, can_access_registers_thread):
4894 Spell out "struct thread_info" instead of just "thread_info".
4895 * inferior.h (notice_new_inferior): Likewise.
4897 2018-06-25 Pedro Alves <palves@redhat.com>
4899 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4900 pass thread_info pointer to delete_thread.
4901 (windows_nat_target::detach): Pass inferior pointer to
4903 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4905 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4906 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4907 and pass a thread_info pointer to delete_thread.
4908 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4909 pass thread_info pointer to delete_thread.
4910 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4911 delete_thread_silent call.
4912 * procfs.c (procfs_target::detach): Pass inferior pointer to
4914 (procfs_target::wait): Pass thread_info pointer to delete_thread.
4915 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4916 delete_thread_silent call.
4917 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4918 pass thread_info pointer to delete_thread.
4919 (windows_nat_target::detach): Pass inferior pointer to
4922 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4924 * regcache.c (readable_regcache::read_part): Fix asserts.
4925 (reg_buffer::raw_collect_part): New function.
4926 (regcache::write_part): Fix asserts.
4927 (reg_buffer::raw_supply_part): New function.
4928 (regcache::transfer_regset_register): New helper function.
4929 (regcache::transfer_regset): Call new functions.
4930 (regcache_supply_regset): Use gdb_byte*.
4931 (regcache::supply_regset): Likewise.
4932 (regcache_collect_regset): Likewise.
4933 (regcache::collect_regset): Likewise.
4934 * regcache.h (reg_buffer::raw_collect_part): New declaration.
4935 (reg_buffer::raw_supply_part): Likewise.
4936 (regcache::transfer_regset_register): Likewise.
4937 (regcache::transfer_regset): Use gdb_byte*.
4939 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4941 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4943 2018-06-21 Pedro Alves <palves@redhat.com>
4945 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4946 instead of a ptid_t. All callers adjusted.
4947 * ada-tasks.c (ada_get_task_number): Likewise. All callers
4949 (print_ada_task_info, display_current_task_id, task_command_1):
4951 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4953 (breakpoint_kind): Adjust.
4954 (remove_breakpoints_pid): Rename to ...
4955 (remove_breakpoints_inf): ... this. Adjust to take an inferior
4956 pointer. All callers adjusted.
4957 (bpstat_clear_actions): Use inferior_thread.
4958 (get_bpstat_thread): New.
4959 (bpstat_do_actions): Use it.
4960 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4961 to take a thread_info pointer. All callers adjusted.
4962 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4963 (breakpoint_re_set_thread): Use inferior_thread.
4964 * breakpoint.h (struct inferior): Forward declare.
4965 (bpstat_stop_status): Update.
4966 (remove_breakpoints_pid): Delete.
4967 (remove_breakpoints_inf): New.
4968 * bsd-uthread.c (bsd_uthread_target::wait)
4969 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4970 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4971 (maint_btrace_packet_history_cmd)
4972 (maint_btrace_clear_packet_history_cmd): Adjust.
4973 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4975 * cli/cli-interp.c: Include "inferior.h".
4976 * common/refcounted-object.h (struct
4977 refcounted_object_ref_policy): New.
4978 * compile/compile-object-load.c: Include gdbthread.h.
4979 (store_regs): Use inferior_thread.
4980 * corelow.c (core_target::close): Use current_inferior.
4981 (core_target_open): Adjust to use first_thread_of_inferior and use
4982 the current inferior.
4983 * ctf.c (ctf_target::close): Adjust to use current_inferior.
4984 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4985 <thread>: ... this new field. All references adjusted.
4986 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4987 Take a thread_info pointer instead of a ptid_t.
4988 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4989 (dummy_frame_discard, register_dummy_frame_dtor): Take a
4990 thread_info pointer instead of a ptid_t.
4991 * elfread.c: Include "inferior.h".
4992 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4993 Use inferior_thread.
4994 * eval.c (evaluate_subexp): Likewise.
4995 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4997 * gdb_proc_service.h (struct thread_info): Forward declare.
4998 (struct ps_prochandle) <ptid>: Delete, replaced by ...
4999 <thread>: ... this new field. All references adjusted.
5000 * gdbarch.h, gdbarch.c: Regenerate.
5001 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5002 'thread' parameter. All implementations and callers adjusted.
5003 * gdbthread.h (thread_info) <set_running>: New method.
5004 (delete_thread, delete_thread_silent): Take a thread_info pointer
5006 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5007 (first_thread_of_process): Delete, replaced by ...
5008 (first_thread_of_inferior): ... this new function. All callers
5010 (any_live_thread_of_process): Delete, replaced by ...
5011 (any_live_thread_of_inferior): ... this new function. All callers
5013 (switch_to_thread, switch_to_no_thread): Declare.
5014 (is_executing): Delete.
5015 (enable_thread_stack_temporaries): Update comment.
5016 <enable_thread_stack_temporaries>: Take a thread_info pointer
5017 instead of a ptid_t. Incref the thread.
5018 <~enable_thread_stack_temporaries>: Decref the thread.
5021 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5022 (get_last_thread_stack_temporary)
5023 (value_in_thread_stack_temporaries, can_access_registers_thread):
5024 Take a thread_info pointer instead of a ptid_t. All callers
5026 * infcall.c (get_call_return_value): Use inferior_thread.
5027 (run_inferior_call): Work with thread pointers instead of ptid_t.
5028 (call_function_by_hand_dummy): Work with thread pointers instead
5029 of ptid_t. Use thread_info_ref.
5030 * infcmd.c (proceed_thread_callback): Access thread's state
5032 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5033 access thread's state directly.
5034 (continue_command): Use inferior_thread.
5035 (info_program_command): Use find_thread_ptid and access thread
5037 (proceed_after_attach_callback): Use thread state directly.
5038 (notice_new_inferior): Take a thread_info pointer instead of a
5039 ptid_t. All callers adjusted.
5040 (exit_inferior): Take an inferior pointer instead of a pid. All
5042 (exit_inferior_silent): New.
5043 (detach_inferior): Delete.
5044 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5045 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5046 (detach_inferior_command, kill_inferior_command): Use
5047 find_inferior_id instead of valid_gdb_inferior_id and
5048 gdb_inferior_id_to_pid.
5049 (inferior_command): Use inferior and thread pointers.
5050 * inferior.h (struct thread_info): Forward declare.
5051 (notice_new_inferior): Take a thread_info pointer instead of a
5052 ptid_t. All callers adjusted.
5053 (detach_inferior): Delete declaration.
5054 (exit_inferior, exit_inferior_silent): Take an inferior pointer
5055 instead of a pid. All callers adjusted.
5056 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5057 (valid_gdb_inferior_id): Delete.
5058 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5059 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5060 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5062 <inf>: ... this new field.
5063 <step_ptid>: Delete, replaced by ...
5064 <step_thread>: ... this new field.
5065 (get_displaced_stepping_state): Take an inferior pointer instead
5066 of a pid. All callers adjusted.
5067 (displaced_step_in_progress_any_inferior): Adjust.
5068 (displaced_step_in_progress_thread): Take a thread pointer instead
5069 of a ptid_t. All callers adjusted.
5070 (displaced_step_in_progress, add_displaced_stepping_state): Take
5071 an inferior pointer instead of a pid. All callers adjusted.
5072 (get_displaced_step_closure_by_addr): Adjust.
5073 (remove_displaced_stepping_state): Take an inferior pointer
5074 instead of a pid. All callers adjusted.
5075 (displaced_step_prepare_throw, displaced_step_prepare)
5076 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5077 All callers adjusted.
5078 (start_step_over): Adjust.
5079 (infrun_thread_ptid_changed): Remove bit updating ptids in the
5080 displaced step queue.
5081 (do_target_resume): Adjust.
5082 (fetch_inferior_event): Use inferior_thread.
5083 (context_switch, get_inferior_stop_soon): Take an
5084 execution_control_state pointer instead of a ptid_t. All callers
5086 (switch_to_thread_cleanup): Delete.
5087 (stop_all_threads): Use scoped_restore_current_thread.
5088 * inline-frame.c: Include "gdbthread.h".
5089 (inline_state) <inline_state>: Take a thread pointer instead of a
5090 ptid_t. All callers adjusted.
5091 <ptid>: Delete, replaced by ...
5092 <thread>: ... this new field.
5093 (find_inline_frame_state): Take a thread pointer instead of a
5094 ptid_t. All callers adjusted.
5095 (skip_inline_frames, step_into_inline_frame)
5096 (inline_skipped_frames, inline_skipped_symbol): Take a thread
5097 pointer instead of a ptid_t. All callers adjusted.
5098 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5099 (inline_skipped_frames, inline_skipped_symbol): Likewise.
5100 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5102 * linux-nat.c (get_detach_signal): Likewise.
5103 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5104 (thread_db_notice_clone): Adjust.
5105 (thread_db_find_new_threads_silently)
5106 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5107 a thread pointer instead of a ptid_t. All callers adjusted.
5108 * mi/mi-cmd-var.c: Include "inferior.h".
5109 (mi_cmd_var_update_iter): Update to use thread pointers.
5110 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5112 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5114 (mi_output_running): ... this new function.
5115 (mi_on_resume_1): Adjust to use it.
5116 (mi_user_selected_context_changed): Adjust to use inferior_thread.
5117 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5119 (interrupt_thread_callback): : Adjust to use thread and inferior
5121 * proc-service.c: Include "gdbthread.h".
5122 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5123 * progspace-and-thread.c: Include "inferior.h".
5124 * progspace.c: Include "inferior.h".
5125 * python/py-exitedevent.c (create_exited_event_object): Adjust to
5126 hold a reference to an inferior_object.
5127 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5129 * python/py-inferior.c (struct inferior_object): Give the type a
5130 tag name instead of a typedef.
5131 (python_on_normal_stop): No need to check if the current thread is
5133 (inferior_to_inferior_object): Change return type to
5134 inferior_object. All callers adjusted.
5135 (find_thread_object): Delete, bits factored out to ...
5136 (thread_to_thread_object): ... this new function.
5137 * python/py-infthread.c (create_thread_object): Use
5138 inferior_to_inferior_object.
5139 (thpy_is_stopped): Use thread pointer directly.
5140 (gdbpy_selected_thread): Use inferior_thread.
5141 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5142 field, replaced with ...
5143 <thread>: ... this new field. All users adjusted.
5144 (btpy_insn_or_gap_new): Drop const.
5145 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
5147 * python/py-record.c: Include "gdbthread.h".
5148 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5149 a ptid_t. All callers adjusted.
5150 (gdbpy_current_recording): Use inferior_thread.
5151 * python/py-record.h (recpy_record_object) <ptid>: Delete
5152 field, replaced with ...
5153 <thread>: ... this new field. All users adjusted.
5154 (recpy_element_object) <ptid>: Delete
5155 field, replaced with ...
5156 <thread>: ... this new field. All users adjusted.
5157 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5158 a ptid_t. All callers adjusted.
5159 * python/py-threadevent.c: Include "gdbthread.h".
5160 (get_event_thread): Use thread_to_thread_object.
5161 * python/python-internal.h (struct inferior_object): Forward
5163 (find_thread_object, find_inferior_object): Delete declarations.
5164 (thread_to_thread_object, inferior_to_inferior_object): New
5166 * record-btrace.c: Include "inferior.h".
5167 (require_btrace_thread): Use inferior_thread.
5168 (record_btrace_frame_sniffer)
5169 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5170 (get_thread_current_frame): Use scoped_restore_current_thread and
5172 (get_thread_current_frame): Use thread pointer directly.
5173 (record_btrace_replay_at_breakpoint): Use thread's inferior
5175 * record-full.c: Include "inferior.h".
5176 * regcache.c: Include "gdbthread.h".
5177 (get_thread_arch_regcache): Use the inferior's address space
5179 (get_thread_regcache, registers_changed_thread): New.
5180 * regcache.h (get_thread_regcache(thread_info *thread)): New
5182 (registers_changed_thread): New.
5183 (remote_target) <remote_detach_1>: Swap order of parameters.
5184 (remote_add_thread): <remote_add_thread>: Return the new thread.
5185 (get_remote_thread_info(ptid_t)): New overload.
5186 (remote_target::remote_notice_new_inferior): Use thread pointers
5188 (remote_target::process_initial_stop_replies): Use
5189 thread_info::set_running.
5190 (remote_target::remote_detach_1, remote_target::detach)
5191 (extended_remote_target::detach): Adjust.
5192 * stack.c (frame_show_address): Use inferior_thread.
5193 * target-debug.h (target_debug_print_thread_info_pp): New.
5194 * target-delegates.c: Regenerate.
5195 * target.c (default_thread_address_space): Delete.
5196 (memory_xfer_partial_1): Use current_inferior.
5197 (target_detach): Use current_inferior.
5198 (target_thread_address_space): Delete.
5199 (generic_mourn_inferior): Use current_inferior.
5200 * target.h (struct target_ops) <thread_address_space>: Delete.
5201 (target_thread_address_space): Delete.
5202 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
5204 (delete_thread_1, delete_thread, delete_thread_silent): Take a
5205 thread pointer instead of a ptid_t. Adjust all callers.
5206 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5207 (first_thread_of_process): Delete, replaced by ...
5208 (first_thread_of_inferior): ... this new function. All callers
5210 (any_thread_of_process): Rename to ...
5211 (any_thread_of_inferior): ... this, and take an inferior pointer.
5212 (any_live_thread_of_process): Rename to ...
5213 (any_live_thread_of_inferior): ... this, and take an inferior
5215 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5216 (value_in_thread_stack_temporaries)
5217 (get_last_thread_stack_temporary): Take a thread pointer instead
5218 of a ptid_t. Adjust all callers.
5219 (thread_info::set_running): New.
5220 (validate_registers_access): Use inferior_thread.
5221 (can_access_registers_ptid): Rename to ...
5222 (can_access_registers_thread): ... this, and take a thread
5224 (print_thread_info_1): Adjust to compare thread pointers instead
5226 (switch_to_no_thread, switch_to_thread): Make extern.
5227 (scoped_restore_current_thread::~scoped_restore_current_thread):
5228 Use m_thread pointer directly.
5229 (scoped_restore_current_thread::scoped_restore_current_thread):
5230 Use inferior_thread.
5231 (thread_command): Use thread pointer directly.
5232 (thread_num_make_value_helper): Use inferior_thread.
5233 * top.c (execute_command): Use inferior_thread.
5234 * tui/tui-interp.c: Include "inferior.h".
5235 * varobj.c (varobj_create): Use inferior_thread.
5236 (value_of_root_1): Use find_thread_global_id instead of
5237 global_thread_id_to_ptid.
5239 2018-06-21 Alan Hayward <alan.hayward@arm.com>
5241 * regcache.c (readable_regcache::read_part): Avoid memcpy when
5243 (regcache::write_part): Likewise.
5244 (readable_regcache::cooked_read_part): Update comment.
5245 (readable_regcache::cooked_write_part): Likewise.
5246 * regcache.h: (readable_regcache::read_part): Likewise.
5247 (regcache::write_part): Likewise.
5249 2018-06-21 Richard Bunt <richard.bunt@arm.com>
5250 Dirk Schubert <dirk.schubert@arm.com>
5252 * aarch64-linux-nat.c (post_attach): New.
5253 (aarch64_linux_nat_target::post_attach): Override post_attach to
5254 record the number of hardware debug registers.
5256 2018-06-20 Tom Tromey <tom@tromey.com>
5258 * python/py-param.c (add_setshow_generic): Make parameters const.
5259 (parmpy_init): Update.
5261 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5263 * regcache.h (regcache_cooked_read_ftype): Rename to...
5264 (register_read_ftype): ...this, change type to function_view.
5265 (class reg_buffer) <save>: Remove src parameter.
5266 (readonly_detached_regcache) <readonly_detached_regcache>: Make
5267 parameter non-const in first overload. Remove src parameter in
5269 * regcache.c (do_cooked_read): Remove.
5270 (readonly_detached_regcache::readonly_detached_regcache): Make
5271 parameter non-const, adjust call to other constructor.
5272 (reg_buffer::save): Remove src parameter.
5273 * frame.c (do_frame_register_read): Remove.
5274 (frame_save_as_regcache): Use lambda function.
5275 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5276 parameter to ppu2spu_data *.
5277 (ppu2spu_sniffer): Use lambda function.
5279 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5281 * record-full.c (record_full_target::insert_breakpoint): Remove
5282 "struct" keyword, add const.
5284 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5286 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5287 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5288 * configure.ac: Remove AC_PREREQ, add missing quoting.
5289 * gnulib/configure.ac: Modernize usage of
5290 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
5291 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5292 (AUTOMAKE_VERSION): Bump to 1.15.1.
5293 * configure: Re-generate.
5294 * config.in: Re-generate.
5295 * aclocal.m4: Re-generate.
5296 * gnulib/aclocal.m4: Re-generate.
5297 * gnulib/config.in: Re-generate.
5298 * gnulib/configure: Re-generate.
5299 * gnulib/import/Makefile.in: Re-generate.
5301 2018-06-19 Pedro Alves <palves@redhat.com>
5303 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5304 (lookup_minimal_symbol_by_pc_section): ... here with
5305 gdb_assert_not_reached added.
5307 2018-06-19 Pedro Alves <palves@redhat.com>
5309 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5310 parameter with a block parameter. Compare location's block symbol
5311 with the frame's block instead of addresses.
5312 (skip_inline_frames): Pass the current block instead of the
5313 frame's address. Break out as soon as we determine the frame
5314 should not be skipped.
5316 2018-06-18 Tom Tromey <tom@tromey.com>
5318 * solib-aix.c (solib_aix_get_section_offsets): Return
5320 (solib_aix_solib_create_inferior_hook): Update.
5322 2018-06-18 Tom Tromey <tom@tromey.com>
5324 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5326 2018-06-18 Tom Tromey <tom@tromey.com>
5328 * solib-frv.c (frv_relocate_main_executable): Use
5330 * solib-dsbt.c (dsbt_relocate_main_executable): Use
5333 2018-06-18 Tom Tromey <tom@tromey.com>
5335 * objfiles.h (inhibit_section_map_updates): Update.
5336 (resume_section_map_updates, resume_section_map_updates_cleanup):
5338 * solib-svr4.c (svr4_handle_solib_event): Update.
5339 * objfiles.c (inhibit_section_map_updates): Return
5340 scoped_restore_tmpl<int>.
5341 (resume_section_map_updates, resume_section_map_updates_cleanup):
5344 2018-06-18 Tom Tromey <tom@tromey.com>
5346 * valprint.h (read_string): Update.
5347 * valprint.c (read_string): Change type of "buffer".
5348 (val_print_string): Update.
5349 * python/py-value.c (valpy_string): Update.
5350 * language.h (struct language_defn) <la_get_string>: Change
5352 (default_get_string, c_get_string): Update.
5353 * language.c (default_get_string): Change type of "buffer".
5354 * guile/scm-value.c (gdbscm_value_to_string): Update.
5355 * c-lang.c (c_get_string): Change type of "buffer".
5357 2018-06-18 Tom Tromey <tom@tromey.com>
5359 * ser-mingw.c (struct pipe_state_destroyer): New.
5360 (pipe_state_up): New typedef.
5361 (cleanup_pipe_state): Remove.
5362 (pipe_windows_open): Use pipe_state_up. Don't release argv.
5364 2018-06-18 Tom Tromey <tom@tromey.com>
5366 * rust-lang.h (rust_yyerror): Don't declare.
5367 * rust-lang.c (rust_language_defn): Update.
5368 * rust-exp.y (yyerror): Now static.
5369 * parse.c (parse_exp_in_context_1): Update.
5370 * p-lang.h (p_yyerror): Don't declare.
5371 * p-lang.c (p_language_defn): Update.
5372 * p-exp.y (yyerror): Now static.
5373 * opencl-lang.c (opencl_language_defn): Update.
5374 * objc-lang.c (objc_language_defn): Update.
5375 * m2-lang.h (m2_yyerror): Don't declare.
5376 * m2-lang.c (m2_language_defn): Update.
5377 * m2-exp.y (yyerror): Now static.
5378 * language.h (struct language_defn) <la_error>: Remove.
5379 * language.c (unk_lang_error): Remove.
5380 (unknown_language_defn, auto_language_defn): Remove.
5381 * go-lang.h (go_yyerror): Don't declare.
5382 * go-lang.c (go_language_defn): Update.
5383 * go-exp.y (yyerror): Now static.
5384 * f-lang.h (f_yyerror): Don't declare.
5385 * f-lang.c (f_language_defn): Update.
5386 * f-exp.y (yyerror): Now static.
5387 * d-lang.h (d_yyerror): Don't declare.
5388 * d-lang.c (d_language_defn): Update.
5389 * d-exp.y (yyerror): Now static.
5390 * c-lang.h (c_yyerror): Don't declare.
5391 * c-lang.c (c_language_defn, cplus_language_defn)
5392 (asm_language_defn, minimal_language_defn): Update.
5393 * c-exp.y (yyerror): Now static.
5394 * ada-lang.h (ada_yyerror): Don't declare.
5395 * ada-lang.c (ada_language_defn): Update.
5396 * ada-exp.y (yyerror): Now static.
5398 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5400 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5401 (store_sveregs_to_thread): Likewise.
5402 (aarch64_linux_fetch_inferior_registers): Check for SVE.
5403 (aarch64_linux_store_inferior_registers): Likewise.
5404 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5406 (aarch64_sve_regs_copy_to_regcache): Likewise.
5407 (aarch64_sve_regs_copy_from_regcache): Likewise.
5408 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5410 (aarch64_sve_regs_copy_to_regcache): Likewise.
5411 (aarch64_sve_regs_copy_from_regcache): Likewise.
5412 (sve_context): Structure from Linux headers.
5413 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5414 (SVE_SIG_ZREG_SIZE): Likewise.
5415 (SVE_SIG_PREG_SIZE): Likewise.
5416 (SVE_SIG_FFR_SIZE): Likewise.
5417 (SVE_SIG_REGS_OFFSET): Likewise.
5418 (SVE_SIG_ZREGS_OFFSET): Likewise.
5419 (SVE_SIG_ZREG_OFFSET): Likewise.
5420 (SVE_SIG_ZREGS_SIZE): Likewise.
5421 (SVE_SIG_PREGS_OFFSET): Likewise.
5422 (SVE_SIG_PREG_OFFSET): Likewise.
5423 (SVE_SIG_PREGS_SIZE): Likewise.
5424 (SVE_SIG_FFR_OFFSET): Likewise.
5425 (SVE_SIG_REGS_SIZE): Likewise.
5426 (SVE_SIG_CONTEXT_SIZE): Likewise.
5427 (SVE_PT_REGS_MASK): Likewise.
5428 (SVE_PT_REGS_FPSIMD): Likewise.
5429 (SVE_PT_REGS_SVE): Likewise.
5430 (SVE_PT_VL_INHERIT): Likewise.
5431 (SVE_PT_VL_ONEXEC): Likewise.
5432 (SVE_PT_REGS_OFFSET): Likewise.
5433 (SVE_PT_FPSIMD_OFFSET): Likewise.
5434 (SVE_PT_FPSIMD_SIZE): Likewise.
5435 (SVE_PT_SVE_ZREG_SIZE): Likewise.
5436 (SVE_PT_SVE_PREG_SIZE): Likewise.
5437 (SVE_PT_SVE_FFR_SIZE): Likewise.
5438 (SVE_PT_SVE_FPSR_SIZE): Likewise.
5439 (SVE_PT_SVE_FPCR_SIZE): Likewise.
5440 (__SVE_SIG_TO_PT): Likewise.
5441 (SVE_PT_SVE_OFFSET): Likewise.
5442 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5443 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5444 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5445 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5446 (SVE_PT_SVE_PREG_OFFSET): Likewise.
5447 (SVE_PT_SVE_PREGS_SIZE): Likewise.
5448 (SVE_PT_SVE_FFR_OFFSET): Likewise.
5449 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5450 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5451 (SVE_PT_SVE_SIZE): Likewise.
5452 (SVE_PT_SIZE): Likewise.
5453 (HAS_SVE_STATE): New define.
5455 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5457 * nat/aarch64-sve-linux-sigcontext.h: New file.
5458 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5460 (SVE_VQ_MIN): Likewise.
5461 (SVE_VQ_MAX): Likewise.
5462 (SVE_VL_MIN): Likewise.
5463 (SVE_VL_MAX): Likewise.
5464 (SVE_NUM_ZREGS): Likewise.
5465 (SVE_NUM_PREGS): Likewise.
5466 (sve_vl_valid): Likewise.
5467 (struct user_sve_header): Likewise.
5469 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
5470 Richard Bunt <Richard.Bunt@arm.com>
5472 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5473 was requested by GDB.
5475 2018-06-15 Tom de Vries <tdevries@suse.de>
5477 * MAINTAINERS (Write After Approval): Add Tom de Vries.
5479 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
5481 * gnulib/update-gnulib.sh: Print expected versions of
5484 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
5486 * arch-utils.c (default_type_align): Use type_length_units.
5487 * gdbtypes.c (type_align): Use type_length_units.
5489 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5491 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5492 of 'define' command.
5494 2018-06-14 Tom de Vries <tdevries@suse.de>
5497 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5498 get_no_prettyformat_print_options.
5500 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
5502 * sparc-nat.h: Include target.h.
5503 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5504 <fetch_registers>: Remove this argument in function call.
5505 <store_registers>: Remove this argument in function call, remove
5507 <low_forget_process>: Call sparc64_forget_process instead of
5508 sparc_forget_process.
5510 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5512 * procfs.c (_initialize_procfs): Use add_inf_child_target.
5513 (procfs_target::make_corefile_notes): Adjust to new
5514 target_read_alloc return type.
5516 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5517 Stephen Roberts <stephen.roberts@arm.com>
5520 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5521 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5522 Move should_notify_stop local into more inner scope.
5524 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5525 Stephen Roberts <stephen.roberts@arm.com>
5528 * infrun.c (resume_1): Add call to mark_async_event_handler.
5530 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5532 * infrun.c (do_target_wait): Change old version of $pc printed.
5534 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
5536 * dwarf2read.c (read_index_from_section): Rename to...
5537 (read_gdb_index_from_section): ... this, update all callers.
5538 (dwarf2_read_index): Rename to...
5539 (dwarf2_read_gdb_index): ... this, update all callers.
5541 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
5543 * gdb/hppa-linux-nat.c
5544 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5545 hppa_linux_nat_target::fetch_registers.
5547 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5549 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5550 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5551 (AARCH64_DWARF_SVE_FFR): Likewise.
5552 (AARCH64_DWARF_SVE_P0): Likewise.
5553 (AARCH64_DWARF_SVE_Z0): Likewise.
5555 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5557 * common/common-regcache.h (raw_compare): New function.
5558 * regcache.c (regcache::raw_compare): Likewise.
5559 * regcache.h (regcache::raw_compare): New declaration.
5561 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5563 * common/common-regcache.h (reg_buffer_common): New structure.
5564 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5565 (reg_buffer::raw_supply): Likewise.
5566 (reg_buffer::raw_supply_integer): Likewise.
5567 (reg_buffer::raw_supply_zeroed): Likewise.
5568 (reg_buffer::raw_collect): Likewise.
5569 (reg_buffer::raw_collect_integer): Likewise.
5570 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5571 (reg_buffer::raw_supply): Likewise.
5572 (reg_buffer::raw_supply_integer): Likewise.
5573 (reg_buffer::raw_supply_zeroed): Likewise.
5574 (reg_buffer::raw_collect): Likewise.
5575 (reg_buffer::raw_collect_integer): Likewise.
5577 2018-06-10 Tom Tromey <tom@tromey.com>
5579 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
5580 (class remote_state) <stop_reply_queue>: Now std::vector.
5581 (remote_state::~remote_state)
5582 (remote_target::stop_reply_queue_length): Update.
5583 (struct queue_iter_param, remove_child_of_pending_fork)
5584 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5585 (check_pending_event_prevents_wildcard_vcont_callback)
5586 (remove_stop_reply_for_inferior)
5587 (remove_stop_reply_of_remote_state)
5588 (remote_notif_remove_once_on_match)
5589 (stop_reply_match_ptid_and_ws)
5590 (remote_kill_child_of_pending_fork): Remove.
5591 (remote_target::remove_new_fork_children)
5592 (remote_target::check_pending_events_prevent_wildcard_vcont)
5593 (remote_target::discard_pending_stop_replies)
5594 (remote_target::discard_pending_stop_replies_in_queue)
5595 (remote_target::remote_notif_remove_queued_reply)
5596 (remote_target::queued_stop_reply)
5597 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5598 (remote_target::wait, remote_target::kill_new_fork_children)
5599 (remote_target::async): Update.
5601 2018-06-10 Tom Tromey <tom@tromey.com>
5603 * record-full.c (record_full_arch_list_cleanups): Remove.
5604 (record_full_message): Use try/catch.
5605 (record_full_wait_cleanups): Remove.
5606 (record_full_wait_1): Use try/catch.
5607 (record_full_restore): Likewise.
5609 2018-06-10 Tom Tromey <tom@tromey.com>
5611 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
5612 declare VEC. Add constructor.
5613 <in_target_beneath>: Now bool.
5614 (record_full_breakpoints): Now a std::vector, static.
5615 (record_full_sync_record_breakpoints)
5616 (record_full_init_record_breakpoints)
5617 (record_full_target::insert_breakpoint)
5618 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
5620 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5622 * dwarf2read.c (process_cu_includes): Remove struct keyword.
5623 * serial.c (serial_interface_lookup): Remove struct keyword.
5625 2018-06-10 Tom Tromey <tom@tromey.com>
5627 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5629 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5631 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5633 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5634 "beneath" as a method.
5635 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5636 Use "beneath" as a method.
5638 2018-06-10 Tom Tromey <tom@tromey.com>
5640 * tracefile.c (struct trace_file_writer_deleter): New.
5641 <operator()>: Rename from trace_file_writer_xfree.
5642 (trace_file_writer_up): New typedef.
5643 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5645 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5647 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5648 <m_registers, m_register_status>: Change type to
5650 * regcache.c (reg_buffer::reg_buffer): Use new instead of
5653 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5655 * common/common-regcache.h (enum register_status): Add
5656 underlying type "signed char".
5657 * regcache.h (reg_buffer) <m_register_status>: Change type to
5659 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5660 register_status instead of signed char.
5661 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5662 (reg_buffer::get_register_status): Remove cast.
5663 (readable_regcache::raw_read): Remove cast.
5664 (readable_regcache::cooked_read): Remove cast.
5666 2018-06-09 Tom Tromey <tom@tromey.com>
5668 * source.c (reverse_search_command, forward_search_command): Use
5671 2018-06-09 Tom Tromey <tom@tromey.com>
5673 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
5674 (serial_ops_list): Now static, std::vector.
5675 (serial_interface_lookup, serial_add_interface): Update.
5677 2018-06-09 Tom Tromey <tom@tromey.com>
5679 * dwarf2read.c (process_cu_includes): Update.
5680 (process_full_comp_unit): Update.
5681 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5684 2018-06-08 Paul Koning <paul_koning@dell.com>
5688 * python/python.c (do_start_initialization):
5689 Avoid call to internal Python API.
5690 (init__gdb_module): New function.
5692 2018-06-08 Gary Benson <gbenson@redhat.com>
5694 * linux-thread-db.c (valprint.h): New include.
5695 (struct check_thread_db_info): New structure.
5696 (check_thread_db_on_load, tdb_testinfo): New static globals.
5697 (check_thread_db, check_thread_db_callback): New functions.
5698 (try_thread_db_load_1): Run integrity checks if requested.
5699 (maintenance_check_libthread_db): New function.
5700 (_initialize_thread_db): Register "maint check libthread-db"
5701 and "maint set/show check-libthread-db".
5702 * NEWS: Mention the above new commands.
5704 2018-06-08 Tom Tromey <tom@tromey.com>
5706 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5709 2018-06-08 Tom Tromey <tom@tromey.com>
5711 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5713 2018-06-08 Tom Tromey <tom@tromey.com>
5715 * common/btrace-common.h (struct btrace_data): Add constructor,
5716 destructor, move assignment operator.
5717 <empty, clear, fini>: New methods.
5718 <format>: Initialize.
5719 (btrace_data_init, btrace_data_fini, btrace_data_clear)
5720 (btrace_data_empty): Don't declare.
5721 * common/btrace-common.c (btrace_data_init): Remove.
5722 (btrace_data::fini): Rename from btrace_data_fini.
5723 (btrace_data::empty): Rename from btrace_data_empty.
5724 (btrace_data::clear): Rename from btrace_data_clear. Return
5726 * btrace.h (make_cleanup_btrace_data): Don't declare.
5727 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5728 (parse_xml_btrace): Update.
5729 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5730 (maint_btrace_clear_packet_history_cmd): Update.
5732 2018-06-07 Pedro Alves <palves@redhat.com>
5734 * target.h (target_ops) <beneath>: Now a method. All references
5736 (class target_stack): New.
5737 * target.c (g_target_stack): New.
5738 (g_current_top_target): Delete.
5739 (current_top_target): Get the top target out of g_target_stack.
5740 (target_stack::push, target_stack::unpush): New.
5741 (push_target, unpush_target): Reimplement.
5742 (target_is_pushed): Reimplement in terms of g_target_stack.
5743 (target_ops::beneath, target_stack::find_beneath): New.
5745 2018-06-07 Pedro Alves <palves@redhat.com>
5747 * target.h (find_target_beneath): Delete declaration.
5748 * target.c (find_target_beneath): Delete definition.
5749 * aix-thread.c: All callers of find_target_beneath adjusted to
5750 call target_ops::beneath instead.
5751 * bsd-uthread.c: Likewise.
5752 * linux-thread-db.c: Likewise.
5753 * ravenscar-thread.c: Likewise.
5754 * sol-thread.c: Likewise.
5755 * spu-multiarch.c: Likewise.
5757 2018-06-07 Pedro Alves <palves@redhat.com>
5759 * target.h (target_ops) <beneath>: Now a method. All references
5761 (target_ops) <m_beneath>: New.
5762 * target.c (target_ops::beneath): New.
5763 * corelow.c: Adjust all references to target_ops::beneath.
5764 * linux-thread-db.c: Likewise.
5765 * make-target-delegates: Likewise.
5766 * record-btrace.c: Likewise.
5767 * record-full.c: Likewise.
5768 * remote.c: Likewise.
5769 * target.c: Likewise.
5770 * target-delegates.c: Regenerate.
5772 2018-06-07 Pedro Alves <palves@redhat.com>
5774 * target.h (target_stack): Delete.
5775 (current_top_target): Declare function.
5776 * target.c (target_stack): Delete.
5777 (g_current_top_target): New.
5778 (current_top_target): New function.
5779 * auxv.c: Use current_top_target instead of target_stack
5781 * avr-tdep.c: Likewise.
5782 * breakpoint.c: Likewise.
5783 * corefile.c: Likewise.
5784 * elfread.c: Likewise.
5786 * exceptions.c: Likewise.
5787 * frame.c: Likewise.
5788 * gdbarch-selftests.c: Likewise.
5789 * gnu-v3-abi.c: Likewise.
5790 * ia64-tdep.c: Likewise.
5791 * ia64-vms-tdep.c: Likewise.
5792 * infcall.c: Likewise.
5793 * infcmd.c: Likewise.
5794 * infrun.c: Likewise.
5795 * linespec.c: Likewise.
5796 * linux-tdep.c: Likewise.
5797 * minsyms.c: Likewise.
5798 * ppc-linux-nat.c: Likewise.
5799 * ppc-linux-tdep.c: Likewise.
5800 * procfs.c: Likewise.
5801 * regcache.c: Likewise.
5802 * remote.c: Likewise.
5803 * rs6000-tdep.c: Likewise.
5804 * s390-linux-nat.c: Likewise.
5805 * s390-tdep.c: Likewise.
5806 * solib-aix.c: Likewise.
5807 * solib-darwin.c: Likewise.
5808 * solib-dsbt.c: Likewise.
5809 * solib-spu.c: Likewise.
5810 * solib-svr4.c: Likewise.
5811 * solib-target.c: Likewise.
5812 * sparc-tdep.c: Likewise.
5813 * sparc64-tdep.c: Likewise.
5814 * spu-tdep.c: Likewise.
5815 * symfile.c: Likewise.
5816 * symtab.c: Likewise.
5817 * target-descriptions.c: Likewise.
5818 * target-memory.c: Likewise.
5819 * target.c: Likewise.
5820 * target.h: Likewise.
5821 * tracefile-tfile.c: Likewise.
5822 * tracepoint.c: Likewise.
5823 * valops.c: Likewise.
5824 * valprint.c: Likewise.
5825 * value.c: Likewise.
5826 * windows-tdep.c: Likewise.
5827 * mi/mi-main.c: Likewise.
5829 2018-06-07 Tom Tromey <tom@tromey.com>
5831 * valprint.h (build_address_symbolic): Declare.
5832 * printcmd.c (print_address_symbolic): Update.
5833 (build_address_symbolic): Change "name" and "filename" to
5835 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5837 * defs.h (build_address_symbolic): Remove declaration.
5839 2018-06-07 Alan Hayward <alan.hayward@arm.com>
5841 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5842 (aarch64_vnv_type): Add function.
5843 (aarch64_pseudo_register_name): Add V regs for SVE.
5844 (aarch64_pseudo_register_type): Likewise.
5845 (aarch64_pseudo_register_reggroup_p): Likewise.
5846 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5847 (aarch64_pseudo_read_value): Add V regs for SVE.
5848 (aarch64_pseudo_write_2): Use V0 offset for SVE
5849 (aarch64_pseudo_write): Add V regs for SVE.
5850 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5852 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
5854 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5855 (sve_vl_from_vq): Likewise.
5857 2018-06-05 Tom Tromey <tom@tromey.com>
5859 * cli/cli-cmds.c (show_version): Update.
5860 * top.c (print_gdb_version): Add "interactive" parameter.
5862 * main.c (captured_main_1): Update.
5863 * top.h (print_gdb_version): Add "interactive" parameter and a
5866 2018-06-05 David Malcolm <dmalcolm@redhat.com>
5868 * common/enum-flags.h: Add trailing semicolon to example in
5871 2018-06-05 Tom Tromey <tom@tromey.com>
5874 * NEWS: Add entry about pager.
5875 * utils.c (pagination_disabled_for_command): New global.
5876 (prompt_for_continue): Allow "c" response to prompt.
5877 (reinitialize_more_filter): Clear
5878 pagination_disabled_for_command.
5879 (fputs_maybe_filtered): Check pagination_disabled_for_command.
5881 2018-06-04 Tom Tromey <tom@tromey.com>
5883 * ada-lang.h (ada_lookup_symbol_list): Update.
5884 * ada-lang.c (resolve_subexp): Update.
5885 (symbols_are_identical_enums): Change type of syms. Remove nsyms
5887 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5888 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5889 results parameter to std::vector.
5890 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5892 * ada-exp.y (block_lookup): Update.
5893 (select_possible_type_sym): Change type of syms. Remove nsyms
5895 (write_var_or_type, write_name_assoc): Update.
5897 2018-06-04 Joel Brobecker <brobecker@adacore.com>
5899 * windows-nat.c (windows_nat_target::xfer_partial): Return
5900 TARGET_XFER_E_IO if we need to delegate to the target beneath
5901 but BENEATH is NULL.
5903 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
5905 * Makefile.in (config.status): Add configure.nat as a
5908 2018-06-04 Tom Tromey <tom@tromey.com>
5910 * cp-name-parser.y (cpname_state): Add method declarations.
5911 (HANDLE_QUAL): Update.
5912 (cpname_state::d_grab, cpname_state::fill_comp)
5913 (cpname_state::make_operator, cpname_state::make_dtor)
5914 (cpname_state::make_builtin_type, cpname_state::make_name)
5915 (cpname_state::d_qualify, cpname_state::d_int_type)
5916 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5917 (%union): Move earlier.
5919 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5921 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5923 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5925 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5926 (aarch64_pseudo_write_1): Likewise.
5927 (aarch64_pseudo_read_value): Use helper.
5928 (aarch64_pseudo_write): Likewise.
5930 2018-06-04 Pedro Alves <palves@redhat.com>
5932 * darwin-nat.c (darwin_ops): Delete.
5933 (darwin_attach_pid): Use get_native_target.
5935 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5937 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5938 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5940 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5942 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5943 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5944 (aarch64_gdbarch_init): Check for SVE.
5945 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5947 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5949 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5950 * aarch64-tdep.h (aarch64_read_description): Likewise.
5951 * arch/aarch64.c (aarch64_create_target_description): Likewise.
5952 * arch/aarch64.h (aarch64_create_target_description): Likewise.
5953 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5954 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5955 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5957 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
5959 * value.c (value_fetch_lazy_bitfield): New.
5960 (value_fetch_lazy_memory): New.
5961 (value_fetch_lazy_register): New.
5962 (value_fetch_lazy): Factor out to smaller functions.
5964 2018-06-01 Tom Tromey <tom@tromey.com>
5966 * cp-name-parser.y (backslashable, represented): Now const.
5968 2018-06-01 Tom Tromey <tom@tromey.com>
5970 * cp-name-parser.y: Include parser-defs.h.
5971 (parser_fprintf): Remove declaration.
5973 2018-06-01 Tom Tromey <tom@tromey.com>
5975 * cp-name-parser.y: Use %pure-parser, %lex-param, and
5977 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5978 (global_result): Remove globals.
5979 (struct cpname_state): New.
5980 (yyparse): Don't declare.
5981 (yylex, yyerror): Move declarations after %union.
5982 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5983 (make_name): Add state parameter.
5985 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5987 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5989 (yylex): Add lvalp, state parameters.
5990 (yyerror): Add state parameter.
5991 (cp_demangled_name_to_comp): Update.
5993 2018-06-01 Tom Tromey <tom@tromey.com>
5995 * cp-name-parser.y (parser_fprintf): Declare.
5996 (GDB_YY_REMAP_PREFIX): Define.
5997 Include yy-remap.h. Don't redefine yy* identifiers.
5999 2018-06-01 Tom Tromey <tom@tromey.com>
6001 * python/py-type.c (typy_legacy_template_argument): Update.
6002 * cp-support.h (cp_demangled_name_to_comp): Update.
6003 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6004 parameter to be a "std::string *".
6007 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
6009 * ada-lex.l: Include "diagnostics.h" instead of
6010 "common/diagnostics.h".
6011 * unittests/environ-selftests.c: Likewise.
6012 * common/diagnostics.h: Moved to ../include.
6014 2018-06-01 Joel Brobecker <brobecker@adacore.com>
6016 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6017 to language_mode_manual while calling breakpoint_re_set_one.
6019 2018-06-01 Tom Tromey <tom@tromey.com>
6021 * valops.c (value_cast_structs, destructor_name_p): Update.
6022 * symtab.c (gdb_mangle_name): Update.
6023 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6025 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6026 (pascal_object_print_value_fields, pascal_object_print_value):
6028 * p-typeprint.c (pascal_type_print_derivation_info): Update.
6029 * linespec.c (find_methods): Update.
6030 * gdbtypes.h (type_name_no_tag): Remove.
6031 (type_name_or_error): Rename from type_name_no_tag_or_error.
6032 * gdbtypes.c (type_name_no_tag): Remove.
6033 (type_name_or_error): Rename from type_name_no_tag_or_error.
6034 (lookup_struct_elt_type, check_typedef): Update.
6035 * expprint.c (print_subexp_standard): Update.
6036 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6037 * d-namespace.c (d_lookup_nested_symbol): Update.
6038 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6039 (cp_print_class_member): Update.
6040 * cp-namespace.c (cp_lookup_nested_symbol): Update.
6041 * completer.c (add_struct_fields): Update.
6042 * c-typeprint.c (cp_type_print_derivation_info)
6043 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6045 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6046 (ada_prefer_type, ada_is_exception_sym): Update.
6048 2018-06-01 Tom Tromey <tom@tromey.com>
6050 * valops.c (enum_constant_from_type, value_namespace_elt)
6051 (value_maybe_namespace_elt): Update.
6052 * valarith.c (find_size_for_pointer_math): Update.
6053 * target-descriptions.c (make_gdb_type): Update.
6054 * symmisc.c (print_symbol): Update.
6055 * stabsread.c (define_symbol, read_type)
6056 (complain_about_struct_wipeout, add_undefined_type)
6057 (cleanup_undefined_types_1): Update.
6058 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6059 (rust_range_type_p, val_print_struct, rust_print_struct_def)
6060 (rust_internal_print_type, rust_composite_type)
6061 (rust_evaluate_funcall, rust_evaluate_subexp)
6062 (rust_inclusive_range_type_p): Update.
6063 * python/py-type.c (typy_get_tag): Update.
6064 * p-typeprint.c (pascal_type_print_base): Update.
6065 * mdebugread.c (parse_symbol, parse_type): Update.
6066 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6068 * guile/scm-type.c (gdbscm_type_tag): Update.
6069 * go-lang.c (sixg_string_p): Update.
6070 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6072 * gdbtypes.h (struct main_type) <tag_name>: Remove.
6073 (TYPE_TAG_NAME): Remove.
6074 * gdbtypes.c (type_name_no_tag): Simplify.
6075 (check_typedef, check_types_equal, recursive_dump_type)
6076 (copy_type_recursive, arch_composite_type): Update.
6077 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
6078 in summary mode when needed.
6079 * eval.c (evaluate_funcall): Update.
6080 * dwarf2read.c (fixup_go_packaging, read_structure_type)
6081 (process_structure_scope, read_enumeration_type)
6082 (read_namespace_type, read_module_type, determine_prefix): Update.
6083 * cp-support.c (inspect_type): Update.
6084 * coffread.c (process_coff_symbol, decode_base_type): Update.
6085 * c-varobj.c (c_is_path_expr_parent): Update.
6086 * c-typeprint.c (c_type_print_base_struct_union): Update.
6087 (c_type_print_base_1): Update. Print struct/class/union/enum in
6088 summary when using C language.
6089 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6090 (gen_maybe_namespace_elt): Update.
6091 * ada-lang.c (ada_type_name): Simplify.
6092 (empty_record, ada_template_to_fixed_record_type_1)
6093 (template_to_static_fixed_type)
6094 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6096 2018-06-01 Tom Tromey <tom@tromey.com>
6098 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6100 * c-typeprint.c (c_print_type_1): Add "language" parameter.
6101 (c_print_type): Update.
6102 (c_print_type): New overload.
6103 (c_type_print_varspec_prefix, c_type_print_args)
6104 (c_type_print_varspec_suffix, c_print_type_no_offsets)
6105 (c_type_print_base_struct_union, c_type_print_base_1)
6106 (cp_type_print_method_args): Add "language" parameter.
6107 (c_type_print_base): Update.
6108 * c-lang.h (c_print_type): Add new overload.
6110 2018-06-01 Tom Tromey <tom@tromey.com>
6112 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6113 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6115 2018-06-01 Alan Hayward <alan.hayward@arm.com>
6117 * aarch64-tdep.c (aarch64_sve_register_names): New const
6119 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6120 (AARCH64_SVE_Z_REGS_NUM): New define.
6121 (AARCH64_SVE_P_REGS_NUM): Likewise.
6122 (AARCH64_SVE_NUM_REGS): Likewise.
6124 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
6126 * nat/linux-ptrace.h [__alpha__]
6127 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6130 2018-05-31 Maciej W. Rozycki <macro@mips.com>
6132 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6133 the endianness selected.
6134 * NEWS: Document `set endian auto' mode operation update.
6136 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6138 * Makefile.in: Add new header.
6139 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6140 (sve_vl_from_vg): Likewise.
6141 (sve_vq_from_vl): Likewise.
6142 (sve_vl_from_vq): Likewise.
6143 (sve_vq_from_vg): Likewise.
6144 (sve_vg_from_vq): Likewise.
6145 * configure.nat: Add new c file.
6146 * nat/aarch64-sve-linux-ptrace.c: New file.
6147 * nat/aarch64-sve-linux-ptrace.h: New file.
6149 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6151 * aarch64-linux-nat.c (aarch64_linux_read_description):
6153 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6155 * aarch64-tdep.c (tdesc_aarch64_list): Add.
6156 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6157 (aarch64_gdbarch_init): Add parmeter zero.
6158 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6159 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6160 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6162 * doc/gdb.texinfo: Describe SVE feature
6163 * features/aarch64-sve.c: New file.
6165 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
6168 * gdbarch.sh (significant_addr_bit): Default to zero when
6169 not set by target architecture.
6170 * gdbarch.c: Re-generated.
6171 * utils.c (address_significant): Update.
6173 2018-05-30 Joel Brobecker <brobecker@adacore.com>
6175 * stack.c (func_command): Remove trailing newline in call to error.
6177 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6179 * regcache.h (regcache_raw_collect): Remove, update callers to
6180 use regcache::raw_collect.
6181 * regcache.c (regcache_raw_collect): Remove.
6183 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6185 * regcache.h (regcache_raw_supply): Remove, update callers to
6186 use detached_regcache::raw_supply.
6187 * regcache.c (regcache_raw_supply): Remove.
6189 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6191 * regcache.h (regcache_cooked_write_part): Remove, update
6192 callers to use regcache::cooked_write_part.
6193 * regcache.c (regcache_cooked_write_part): Remove.
6195 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6197 * regcache.h (regcache_cooked_read_part): Remove, update callers
6198 to use readable_regcache::cooked_read_part.
6199 * regcache.c (regcache_cooked_read_part): Remove.
6201 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6203 * regcache.h (regcache_cooked_read_value): Remove, update
6204 callers to use readable_regcache::cooked_read_value.
6205 * regcache.c (regcache_cooked_read_value): Remove.
6207 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6209 * regcache.h (regcache_cooked_write): Remove, update callers to
6210 use regcache::cooked_write.
6211 * regcache.c (regcache_cooked_write): Remove.
6213 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6215 * regcache.h (regcache_invalidate): Remove, update callers to
6216 use detached_regcache::invalidate instead.
6217 * regcache.c (regcache_invalidate): Remove.
6219 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6221 * regcache.h (regcache_raw_write_part): Remove, update callers
6222 to use regcache::raw_write_part instead.
6223 * regcache.c (regcache_raw_write_part): Remove.
6225 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6227 * regcache.h (regcache_raw_read_part): Remove, update callers to
6228 use readable_regcache::raw_read_part instead.
6229 * regcache.c (regcache_raw_read_part): Remove.
6231 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6233 * regcache.h (regcache_cooked_read): Remove, update callers to
6234 use readable_regcache::cooked_read instead.
6235 * regcache.c (regcache_cooked_read): Remove.
6237 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6239 * regcache.h (regcache_raw_write): Remove, update callers to use
6240 regcache::raw_write instead.
6241 * regcache.c (regcache_raw_write): Remove.
6243 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6245 * regcache.h (regcache_raw_read): Remove, update callers to use
6246 readable_regcache::raw_read instead.
6247 * regcache.c (regcache_raw_read): Remove.
6249 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6251 * regcache.h (regcache_raw_update): Remove, update callers to
6252 use readable_regcache::raw_update instead.
6253 * regcache.c (regcache_raw_update): Remove.
6255 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6257 * regcache.h (regcache_register_status): Remove, update callers
6258 to use reg_buffer::get_register_status directly instead.
6259 * regcache.c (regcache_register_status): Remove.
6261 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6263 * regcache.h (regcache_get_ptid): Remove, update all callers to
6264 call regcache::ptid instead.
6265 * regcache.c (regcache_get_ptid): Remove.
6267 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6269 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6271 2018-05-30 Pedro Alves <palves@redhat.com>
6273 * common/common-exceptions.h (exception_rethrow): Use
6276 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
6278 * breakpoint.c (print_solib_event, check_status_catch_solib):
6279 Remove struct keyword in range-based for loops.
6280 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6281 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6283 * linespec.c (find_superclass_methods, search_minsyms_for_name):
6285 * symfile.c (addr_info_make_relative): Likewise.
6286 * thread.c (value_in_thread_stack_temporaries): Likewise.
6288 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
6291 * valops.c (value_struct_elt_for_reference): Call check_typedef on
6292 aggregate type to get its real type before accessing it.
6294 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
6296 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6297 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6298 * coff-pe-read.c (add_pe_forwarded_sym): Replace
6299 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6300 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6301 * jit.c (jit_breakpoint_re_set_internal): Likewise.
6302 * printcmd.c (info_address_command): Likewise.
6304 2018-05-29 Tom Tromey <tom@tromey.com>
6306 * windows-nat.c (handle_exception): Update fall-through comment.
6308 2018-05-29 Tom Tromey <tom@tromey.com>
6310 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
6311 (struct program_space) <added_solibs>: Now a std::vector.
6312 * breakpoint.c (print_solib_event): Update.
6313 (check_status_catch_solib): Update.
6314 * progspace.c (clear_program_space_solib_cache): Update.
6315 * solib.c (update_solib_list): Update.
6317 2018-05-29 Tom Tromey <tom@tromey.com>
6319 * python/py-type.c (typy_richcompare): Update.
6320 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6321 * gdbtypes.h (types_deeply_equal): Return bool.
6322 (types_equal): Likewise.
6323 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
6325 (check_types_equal): Change worklist to std::vector. Return
6327 (struct type_equality_entry): Add constructor.
6328 (compare_maybe_null_strings): Return bool.
6329 (check_types_worklist): Return bool. Change worklist to
6331 (types_deeply_equal): Use std::vector.
6332 (types_equal): Return bool.
6333 (compare_maybe_null_strings): Simplify.
6335 2018-05-29 Tom Tromey <tom@tromey.com>
6337 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
6339 2018-05-29 Tom Tromey <tom@tromey.com>
6341 * objc-lang.h: Don't include cp-support.h.
6342 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
6345 2018-05-27 Tom Tromey <tom@tromey.com>
6347 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6349 2018-05-25 Tom Tromey <tom@tromey.com>
6351 * value.c (value::location): Initialize.
6353 2018-05-25 Tom Tromey <tom@tromey.com>
6355 * dbxread.c (init_bincl_list): Remove.
6356 (bincl_list): Now a std::vector.
6357 (bincls_allocated, next_bincl): Remove.
6358 (free_bincl_list, do_free_bincl_list_cleanup)
6359 (make_cleanup_free_bincl_list): Remove.
6360 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6362 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6363 (struct header_file_location): Add constructor.
6364 (add_bincl_to_list): Remove.
6366 2018-05-25 Tom Tromey <tom@tromey.com>
6368 * tui/tui.c (tui_enable): Update.
6369 * mi/mi-interp.c (mi_interp::init): Update.
6370 * interps.h (class interp) <name>: New method.
6371 <m_name>: Rename from name.
6372 (~scoped_restore_interp): Update.
6373 * interps.c (interp::interp): Update.
6374 (interp_add, interp_set, interp_lookup_existing)
6375 (current_interp_named_p): Update.
6377 2018-05-25 Tom Tromey <tom@tromey.com>
6379 * interps.c (interp_name): Remove.
6380 * mi/mi-interp.c (mi_interp::init): Update.
6381 * interps.h (interp_name): Remove.
6382 (~scoped_restore_interp): Update.
6383 * tui/tui.c (tui_enable): Update.
6385 2018-05-25 Tom Tromey <tom@tromey.com>
6387 * utils.c (fputs_maybe_filtered): Update.
6388 * linespec.c (decode_line_full): Update.
6389 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6390 (mi_print_breakpoint_for_event, mi_solib_loaded)
6391 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6392 (mi_user_selected_context_changed): Update.
6393 * mi/mi-main.c (mi_execute_command): Update.
6394 * cli/cli-script.c (execute_control_command): Update.
6395 * python/python.c (execute_gdb_command): Update.
6396 * solib.c (info_sharedlibrary_command): Update.
6397 * interps.c (interp_ui_out): Remove.
6398 * interps.h (interp_ui_out): Remove.
6400 2018-05-25 Tom Tromey <tom@tromey.com>
6402 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6403 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6404 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6406 2018-05-25 Tom Tromey <tom@tromey.com>
6408 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6409 * interps.c (interp_exec): Use scoped_restore.
6411 2018-05-25 Tom Tromey <tom@tromey.com>
6413 * remote.c (remote_target::remote_file_get): Use
6415 (remote_target::remote_file_put): Likewise.
6417 2018-05-25 Tom Tromey <tom@tromey.com>
6419 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6421 (get_pe_section_index, add_pe_exported_sym): Update.
6422 (read_pe_exported_syms): Use gdb::def_vector.
6424 2018-05-25 Tom Tromey <tom@tromey.com>
6426 * frame.c (remove_prev_frame): Remove.
6427 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6429 2018-05-25 Maciej W. Rozycki <macro@mips.com>
6431 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6433 * mips-linux-nat.c (supply_fpregset): Always call
6434 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6435 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6436 `mips_fill_fpregset'.
6437 * mips-linux-tdep.c (mips_supply_fpregset)
6438 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6439 (mips_fill_fpregset_wrapper): Remove functions.
6440 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6441 (mips_linux_fpregset): Remove variable.
6442 (mips_linux_iterate_over_regset_sections): Use
6443 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6444 (mips_linux_o32_sigframe_init): Remove comment.
6446 2018-05-25 Pedro Alves <palves@redhat.com>
6448 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6449 (struct readahead_cache, struct packet_reg, struct
6450 remote_arch_state, class remote_state): Move higher up in the
6452 (remote_target::m_remote_state): Now an object instead of a pointer.
6453 (remote_target::get_remote_state): Adjust.
6455 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6457 * stack.c (select_and_print_frame): Delete.
6458 (struct function_bounds): Move struct within function.
6459 (func_command): Most content moved into new function
6460 find_frame_for_function, use new function, print result, add
6462 (find_frame_for_function): New function, now returns a result.
6464 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6466 * stack.c (iterate_over_block_arg_vars): Fix comment.
6467 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6469 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6473 (scoped_restore_selected_frame::scoped_restore_selected_frame):
6475 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6477 * frame.h (class scoped_restore_selected_frame): New class.
6478 * stack.c (print_frame_local_vars): Remove catching and rethrowing
6479 of any exception, use scoped_restore_selected_frame to restore the
6482 2018-05-24 Pedro Alves <palves@redhat.com>
6484 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6487 2018-05-23 Tom Tromey <tom@tromey.com>
6489 * complaints.c (struct complaints): Remove.
6490 (symfile_complaint_book): Remove.
6491 (series): New global.
6492 (complaint_internal): Update.
6493 (clear_complaints): Update.
6495 2018-05-23 Tom Tromey <tom@tromey.com>
6497 * complaints.c (counters): New global.
6498 (struct complain): Remove.
6499 (struct complaints) <root>: Remove.
6500 (complaint_sentinel): Remove.
6501 (symfile_complaint_book): Update.
6502 (find_complaint) Remove.
6503 (complaint_internal, clear_complaints): Update.
6505 2018-05-23 Tom Tromey <tom@tromey.com>
6507 * complaints.c (struct complain) <file, line>: Remove.
6508 (find_complaint): Remove file, line parameters.
6509 (complaint_internal): Update.
6511 2018-05-23 Tom Tromey <tom@tromey.com>
6513 * complaints.c (vcomplaint): Remove.
6514 (complaint_internal) Merge in contents of vcomplaint.
6516 2018-05-23 Tom Tromey <tom@tromey.com>
6518 * complaints.c (struct complaints) <explanation>: Remove.
6519 (symfile_explanations): Remove.
6520 (symfile_complaint_book): Update.
6521 (vcomplaint): Update.
6522 (struct explanation): Remove.
6524 2018-05-23 Tom Tromey <tom@tromey.com>
6526 * complaints.c (symfile_complaints): Remove.
6527 (complaint_internal): Remove "complaints" parameter.
6528 (clear_complaints, vcomplaint): Remove "c" parameter.
6529 (get_complaints): Remove.
6530 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6531 (dwarf2_debug_line_missing_file_complaint)
6532 (dwarf2_debug_line_missing_end_sequence_complaint)
6533 (dwarf2_complex_location_expr_complaint)
6534 (dwarf2_const_value_length_mismatch_complaint)
6535 (dwarf2_section_buffer_overflow_complaint)
6536 (dwarf2_macro_malformed_definition_complaint)
6537 (dwarf2_invalid_attrib_class_complaint)
6538 (create_addrmap_from_index, dw2_symtab_iter_next)
6539 (dw2_expand_marked_cus)
6540 (dw2_debug_names_iterator::find_vec_in_debug_names)
6541 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6542 (create_debug_type_hash_table, init_cutu_and_read_dies)
6543 (partial_die_parent_scope, add_partial_enumeration)
6544 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6545 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6546 (read_import_statement, read_file_scope, create_dwo_cu_reader)
6547 (create_cus_hash_table, create_dwp_hash_table)
6548 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6549 (dwarf2_rnglists_process, dwarf2_ranges_process)
6550 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6551 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6552 (handle_struct_member_die, process_structure_scope)
6553 (read_array_type, read_common_block, read_module_type)
6554 (read_tag_pointer_type, read_typedef, read_base_type)
6555 (read_subrange_type, load_partial_dies, partial_die_info::read)
6556 (partial_die_info::read, partial_die_info::read)
6557 (partial_die_info::read, read_checked_initial_length_and_offset)
6558 (dwarf2_string_attr, read_formatted_entries)
6559 (dwarf_decode_line_header)
6560 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6561 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6562 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6563 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6564 (get_signatured_type, get_DW_AT_signature_type)
6565 (decode_locdesc, file_file_name, consume_improper_spaces)
6566 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6567 (dwarf_decode_macro_bytes, dwarf_decode_macros)
6568 (dwarf2_symbol_mark_computed, set_die_type)
6569 (read_attribute_value): Update.
6570 * stap-probe.c (handle_stap_probe, get_stap_base_address):
6572 * dbxread.c (unknown_symtype_complaint)
6573 (lbrac_mismatch_complaint, repeated_header_complaint)
6574 (set_namestring, function_outside_compilation_unit_complaint)
6575 (read_dbx_symtab, process_one_symbol): Update.
6576 * gdbtypes.c (stub_noname_complaint): Update.
6577 * windows-nat.c (handle_unload_dll): Update.
6578 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6579 (decode_base_type): Update.
6580 * xcoffread.c (bf_notfound_complaint, ef_complaint)
6581 (eb_complaint, record_include_begin, record_include_end)
6582 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6583 (process_xcoff_symbol, read_symbol)
6584 (function_outside_compilation_unit_complaint)
6585 (scan_xcoff_symtab): Update.
6586 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6587 * buildsym.c (finish_block_internal, make_blockvector)
6588 (end_symtab_get_static_block, augment_type_symtab): Update.
6589 * dtrace-probe.c (dtrace_process_dof)
6590 (dtrace_static_probe_ops::get_probes): Update.
6591 * complaints.h (struct complaint): Don't declare.
6592 (symfile_complaints): Remove.
6593 (complaint_internal): Remove "complaints" parameter.
6594 (complaint): Likewise.
6595 (clear_complaints): Likewise.
6596 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6597 (reread_symbols): Update.
6598 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6599 (dwarf2_frame_cache, decode_frame_entry): Update.
6600 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6601 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6602 (info_selectors_command): Update.
6603 * macrotab.c (macro_include, check_for_redefinition)
6604 (macro_undef): Update.
6605 * objfiles.c (filter_overlapping_sections): Update.
6606 * stabsread.c (invalid_cpp_abbrev_complaint)
6607 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6608 (define_symbol, error_type, read_type, rs6000_builtin_type)
6609 (stabs_method_name_from_physname, read_member_functions)
6610 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6611 (attach_fields_to_type, complain_about_struct_wipeout)
6612 (read_range_type, read_args, common_block_start)
6613 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6615 * mdebugread.c (index_complaint, unknown_ext_complaint)
6616 (basic_type_complaint, bad_tag_guess_complaint)
6617 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6618 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6619 (parse_procedure, parse_lines)
6620 (function_outside_compilation_unit_complaint)
6621 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6622 (bad_tag_guess_complaint, reg_value_complaint): Update.
6623 * cp-support.c (demangled_name_complaint): Update.
6624 * macroscope.c (sal_macro_scope): Update.
6625 * dwarf-index-write.c (class debug_names): Update.
6627 2018-05-23 Tom Tromey <tom@tromey.com>
6629 * complaints.c (clear_complaints): Remove "noisy" parameter.
6630 * complaints.h (clear_complaints): Update.
6631 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6632 (reread_symbols): Update.
6634 2018-05-23 Tom Tromey <tom@tromey.com>
6636 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6638 (vcomplaint, clear_complaints): Update.
6639 (symfile_explanations): Remove some messages.
6641 2018-05-23 Tom Tromey <tom@tromey.com>
6643 * complaints.c (internal_complaint): Remove.
6644 * complaints.h (internal_complaint): Remove.
6646 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6648 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6650 2018-05-22 Pedro Alves <palves@redhat.com>
6652 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6653 (remote_fileio_badfd, remote_fileio_return_errno)
6654 (remote_fileio_return_success, remote_fileio_func_open)
6655 (remote_fileio_func_open, remote_fileio_func_close)
6656 (remote_fileio_func_read, remote_fileio_func_write)
6657 (remote_fileio_func_lseek, remote_fileio_func_rename)
6658 (remote_fileio_func_unlink, remote_fileio_func_stat)
6659 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6660 (remote_fileio_func_isatty, remote_fileio_func_system): Add
6661 remote_target parameter.
6662 (remote_fio_func_map) <func>: Add remote_target parameter.
6663 (do_remote_fileio_request, remote_fileio_request):
6664 * remote-fileio.h (remote_fileio_request):
6665 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6666 remote_target parameter.
6667 (remote_notif_process, handle_notification): Adjust to pass down
6669 (remote_notif_state_allocate): Add remote_target parameter. Save
6671 * remote-notif.h (struct remote_target): Forward declare.
6672 (struct notif_client) <parse, ack, can_get_pending_events>: Add
6673 remote_target parameter.
6674 (struct remote_notif_state) <remote>: New field.
6675 (remote_notif_ack, remote_notif_parse): Add remote_target
6677 (remote_notif_state_allocate, remote_notif_state_allocate): Add
6678 remote_target parameter.
6679 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6680 (threads_listing_context, rmt_thread_action, protocol_feature)
6681 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6682 (packet_result, struct threads_listing_context, remote_state):
6683 Move definitions and declarations higher up.
6684 (remote_target) <~remote_target>: Declare.
6685 (remote_download_command_source, remote_file_put, remote_file_get)
6686 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6687 (remote_hostio_pread_vFile, remote_hostio_send_command)
6688 (remote_hostio_set_filesystem, remote_hostio_open)
6689 (remote_hostio_close, remote_hostio_unlink, remote_state)
6690 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6691 (get_memory_write_packet_size, get_memory_read_packet_size)
6692 (append_pending_thread_resumptions, remote_detach_1)
6693 (append_resumption, remote_resume_with_vcont)
6694 (add_current_inferior_and_thread, wait_ns, wait_as)
6695 (process_stop_reply, remote_notice_new_inferior)
6696 (process_initial_stop_replies, remote_add_thread)
6697 (btrace_sync_conf, remote_btrace_maybe_reopen)
6698 (remove_new_fork_children, kill_new_fork_children)
6699 (discard_pending_stop_replies, stop_reply_queue_length)
6700 (check_pending_events_prevent_wildcard_vcont)
6701 (discard_pending_stop_replies_in_queue, stop_reply)
6702 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6703 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6704 (remote_interrupt_as, remote_interrupt_ns)
6705 (remote_get_noisy_reply, remote_query_attached)
6706 (remote_add_inferior, remote_current_thread, get_current_thread)
6707 (set_thread, set_general_thread, set_continue_thread)
6708 (set_general_process, write_ptid)
6709 (remote_unpack_thread_info_response, remote_get_threadinfo)
6710 (parse_threadlist_response, remote_get_threadlist)
6711 (remote_threadlist_iterator, remote_get_threads_with_ql)
6712 (remote_get_threads_with_qxfer)
6713 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6714 (get_offsets, remote_check_symbols, remote_supported_packet)
6715 (remote_query_supported, remote_packet_size)
6716 (remote_serial_quit_handler, remote_detach_pid)
6717 (remote_vcont_probe, remote_resume_with_hc)
6718 (send_interrupt_sequence, interrupt_query)
6719 (remote_notif_get_pending_events, fetch_register_using_p)
6720 (send_g_packet, process_g_packet, fetch_registers_using_g)
6721 (store_register_using_P, store_registers_using_G)
6722 (set_remote_traceframe, check_binary_download)
6723 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6724 (remote_xfer_live_readonly_partial, remote_read_bytes)
6725 (remote_send_printf, remote_flash_write, readchar)
6726 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6727 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6728 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6729 (extended_remote_disable_randomization, extended_remote_run)
6730 (send_environment_packet, extended_remote_environment_support)
6731 (extended_remote_set_inferior_cwd, remote_write_qxfer)
6732 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6733 (packet_command): Now methods of ...
6734 (remote_target): ... this class.
6735 (m_remote_state) <remote_target>: New field.
6736 (struct remote_state) <stop_reply_queue,
6737 remote_async_inferior_event_token, wait_forever_enabled_p>: New
6739 (remote_state::remote_state): Allocate stop_reply_queue.
6740 (remote_state): Delete global.
6741 (get_remote_state_raw): Delete.
6742 (remote_target::get_remote_state): Allocate m_remote_state on
6744 (get_current_remote_target): New.
6745 (remote_ops, extended_remote_ops): Delete.
6746 (wait_forever_enabled_p, remote_async_inferior_event_token):
6747 Delete, moved to struct remote_state.
6748 (remote_target::close): Delete self. Destruction bits split to
6750 (remote_target::~remote_target): ... this.
6751 (show_memory_packet_size): Adjust to use
6752 get_current_remote_target.
6753 (struct protocol_feature) <func>: Add remote_target parameter.
6754 All callers adjusted.
6755 (curr_quit_handler_target): New.
6756 (remote_serial_quit_handler): Reimplement.
6757 (remote_target::open_1): Adjust to use get_current_remote_target.
6758 Heap-allocate remote_target/extended_remote_target instances.
6759 (vcont_builder::vcont_builder): Add remote_target parameter, and
6760 save it in m_remote. All callers adjusted.
6761 (vcont_builder::m_remote): New field.
6762 (vcont_builder::restart, vcont_builder::flush)
6763 (vcont_builder::push_action): Use it.
6764 (remote_target::commit_resume): Use it.
6765 (struct queue_iter_param) <remote>: New field.
6766 (remote_target::remove_new_fork_children): Fill in 'remote' field.
6767 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6768 (check_pending_event_prevents_wildcard_vcont_callback)
6769 (remote_target::check_pending_events_prevent_wildcard_vcont)
6770 (remote_target::discard_pending_stop_replies)
6771 (remote_target::discard_pending_stop_replies_in_queue)
6772 (remote_target::remote_notif_remove_queued_reply): Fill in
6774 (remote_notif_get_pending_events): New.
6775 (remote_target::readchar, remote_target::remote_serial_write):
6776 Save/restore curr_quit_handler_target.
6778 (kill_new_fork_children): Fill in 'remote' field.
6779 (packet_command): Use get_current_remote_target, defer to
6780 remote_target method of same name.
6781 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6782 parameter, and save it in m_remote. All callers adjusted.
6783 (scoped_remote_fd::release): Use m_remote.
6784 (scoped_remote_fd::m_remote): New field.
6785 (remote_file_put, remote_file_get, remote_file_delete): Use
6786 get_current_remote_target, defer to remote_target method of same
6788 (remote_btrace_reset): Add remote_state paremeter. Update all
6790 (remote_async_inferior_event_handler). Pass down 'data'.
6791 (remote_new_objfile): Use get_current_remote_target.
6792 (remote_target::vcont_r_supported): New.
6793 (set_range_stepping): Use get_current_remote_target and
6794 remote_target::vcont_r_supported.
6795 (_initialize_remote): Don't allocate 'remote_state' and
6796 'stop_reply_queue' globals.
6797 * remote.h (struct remote_target): Forward declare.
6798 (getpkt, putpkt, remote_notif_get_pending_events): Add
6799 'remote_target' parameter.
6801 2018-05-22 Pedro Alves <palves@redhat.com>
6803 * remote.c (vcont_builder): Now a class. Make all data members
6805 (vcont_builder) <vcont_builder, restart, flush, push_action>:
6807 (vcont_builder_restart): Rename to ...
6808 (vcont_builder::restart): ... this.
6809 (vcont_builder_flush): Rename to ...
6810 (vcont_builder::flush): ... this.
6811 (vcont_builder_push_action): Rename to ...
6812 (vcont_builder::push_action): ... this.
6813 (remote_target::commit_resume): Adjust.
6815 2018-05-22 Pedro Alves <palves@redhat.com>
6817 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6818 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6819 (get_fixed_memory_packet_size): New.
6820 (get_memory_packet_size): Use it.
6821 (set_memory_packet_size): Don't override the config size with
6822 DEFAULT_MAX_MEMORY_PACKET_SIZE.
6823 (show_memory_packet_size): Use get_fixed_memory_packet_size.
6824 Don't refer to get_memory_packet_size if not connected to a remote
6825 target. Show "(default)" if configured size is 0.
6827 2018-05-22 Pedro Alves <palves@redhat.com>
6829 * remote.c (remote_target::mourn_inferior): Move
6830 discard_pending_stop_replies call here from ...
6831 (_initialize_remote): ... here.
6833 2018-05-22 Pedro Alves <palves@redhat.com>
6835 * remote.c (compare_section_command): Remove set_general_process
6838 2018-05-22 Pedro Alves <palves@redhat.com>
6840 * remote.c (struct packet_reg, struct remote_arch_state):
6841 Move higher up in the file.
6842 (remote_state) <m_arch_states>: Store remote_arch_state values
6843 instead of remote_arch_state pointers.
6844 (remote_state::get_remote_arch_state): Adjust.
6846 2018-05-22 Pedro Alves <palves@redhat.com>
6848 * remote.c: Include <unordered_map>.
6849 (remote_state): Now a class.
6850 (remote_state) <get_remote_arch_state>: Declare method.
6851 <get_remote_arch_state>: New field.
6852 (remote_arch_state) <remote_arch_state>: Declare ctor.
6853 <regs>: Now a unique_ptr.
6854 (remote_gdbarch_data_handle): Delete.
6855 (get_remote_arch_state): Delete.
6856 (remote_state::get_remote_arch_state): New.
6857 (get_remote_state): Adjust to call remote_state's
6858 get_remote_arch_state method.
6859 (init_remote_state): Delete, bits factored out to ...
6860 (remote_arch_state::remote_arch_state): ... this new method.
6861 (get_remote_packet_size, get_memory_packet_size)
6862 (process_g_packet, remote_target::fetch_registers)
6863 (remote_target::prepare_to_store, store_registers_using_G)
6864 (remote_target::store_registers, remote_target::get_trace_status):
6865 Adjust to call remote_state's method.
6866 (_initialize_remote): Remove reference to
6867 remote_gdbarch_data_handle.
6869 2018-05-22 Pedro Alves <palves@redhat.com>
6871 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6872 pread>: New method declarations.
6873 (remote_target::open_1): Adjust.
6874 (readahead_cache_invalidate): Rename to ...
6875 (readahead_cache::invalidate): ... this, and adjust to be a class
6877 (readahead_cache_invalidate_fd): Rename to ...
6878 (readahead_cache::invalidate_fd): ... this, and adjust to be a
6880 (remote_hostio_pwrite): Adjust.
6881 (remote_hostio_pread_from_cache): Rename to ...
6882 (readahead_cache::pread): ... this, and adjust to be a class
6884 (remote_hostio_close): Adjust.
6886 2018-05-22 Pedro Alves <palves@redhat.com>
6888 * remote.c (remote_hostio_close_cleanup): Delete.
6889 (class scoped_remote_fd): New.
6890 (remote_file_put, remote_file_get): Use it.
6892 2018-05-22 Pedro Alves <palves@redhat.com>
6894 (struct vCont_action_support): Use bool and initialize all fields.
6895 (struct readahead_cache): Initialize all fields.
6896 (remote_state): Use bool and initialize all fields.
6897 (remote_state::remote_state, remote_state::~remote_state): New.
6898 (new_remote_state): Delete.
6899 (_initialize_remote): Use new to allocate remote_state.
6901 2018-05-22 Pedro Alves <palves@redhat.com>
6905 * c-exp.y: Include "c-support.h".
6906 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6907 of tolower. Use c_ident_is_alpha to scan names.
6908 * c-lang.c: Include "c-support.h".
6909 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6910 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6911 * c-support.h: New file, with bits factored out from ...
6912 * cp-name-parser.y: ... this file.
6913 Include "c-support.h".
6914 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6915 c-support.h and renamed.
6916 (symbol_end, yylex): Adjust.
6918 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6920 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6921 parameter type to CORE_ADDR.
6922 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6923 parameter type in declaration to CORE_ADDR.
6924 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6925 target_auxv_search to get AT_HWCAP and use the result to get the
6927 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6928 to CORE_ADDR. Remove the cast of the return value to unsigned
6929 long. Fix error predicate of target_auxv_search.
6930 (ppc_linux_nat_target::read_description): Change the type of the
6931 hwcap variable to CORE_ADDR.
6933 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6935 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6936 if the size of fpscr is larger than 32 bits.
6938 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6940 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6941 (ppc32_linux_vsxregmap): New global.
6942 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6943 regcache_supply_regset, and regcache_collect_regset.
6944 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6945 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6946 (fetch_vsx_register, store_vsx_register): Remove.
6947 (fetch_vsx_registers): Add regno parameter. Get regset using
6948 ppc_linux_vsxregset. Use regset to supply registers.
6949 (store_vsx_registers): Add regno parameter. Get regset using
6950 ppc_linux_vsxregset. Use regset to collect registers.
6951 (fetch_register): Call fetch_vsx_registers instead of
6953 (store_register): Call store_vsx_registers instead of
6955 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6956 new regno parameter.
6957 (store_ppc_registers): Call store_vsx_registers with -1 for the
6958 new regno parameter.
6959 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6960 (ppc_collect_vsxregset): Remove.
6962 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6964 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6966 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6967 for vector register offset fields.
6968 (ppc64_fbsd_reg_offsets): Likewise.
6969 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6970 to vector register offset fields.
6971 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6972 to vector register offset fields.
6973 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6974 vector register offset fields.
6975 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6976 initializers for vector register offset fields.
6977 (rs6000_aix64_reg_offsets): Likewise.
6978 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6979 (ppc_supply_vrregset): Remove.
6980 (ppc_collect_vrregset): Remove.
6981 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6982 (ppc_linux_vrregset) : New function.
6983 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6984 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6985 (ppc32_linux_vrregset): Remove.
6986 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6987 and use result instead of ppc32_linux_vrregset.
6988 (ppc32_linux_reg_offsets): Remove initializers for vector register
6990 (ppc64_linux_reg_offsets): Likewise.
6991 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6992 * ppc-linux-nat.c: Include regset.h.
6993 (gdb_vrregset_t): Adjust comment to account for little-endian
6995 (supply_vrregset, fill_vrregset): Remove.
6996 (fetch_altivec_register, store_altivec_register): Remove.
6997 (fetch_altivec_registers): Add regno parameter. Get regset using
6998 ppc_linux_vrregset. Use regset to supply registers.
6999 (store_altivec_registers): Add regno parameter. Get regset using
7000 ppc_linux_vrregset. Use regset to collect registers.
7001 (fetch_register): Call fetch_altivec_registers instead of
7002 fetch_altivec_register.
7003 (store_register): Call store_altivec_registers instead of
7004 store_altivec_register.
7005 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7006 the new regno parameter.
7007 (store_ppc_registers): Call store_altivec_registers with -1 for
7008 the new regno parameter.
7010 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7012 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7013 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7014 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7015 (gdb_vrregset_t): Change array type size to
7016 PPC_LINUX_SIZEOF_VRREGSET.
7017 (gdb_vsxregset_t): Change array type size to
7018 PPC_LINUX_SIZEOF_VSXREGSET.
7019 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7020 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7021 PPC_LINUX_SIZEOF_VSXREGSET.
7023 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7025 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7026 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7028 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7029 ppc_linux_target_wordsize with tid.
7030 (ppc_linux_nat_target::read_description): Call ppc_linux_target
7032 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7033 (ppc64_64bit_inferior_p): Add static and inline specifiers.
7034 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7035 tid parameter. Remove static specifier.
7036 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7037 (ppc_linux_target_wordsize): New declaration.
7039 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7041 * arch/ppc-linux-common.c: New file.
7042 * arch/ppc-linux-common.h: New file.
7043 * arch/ppc-linux-tdesc.h: New file.
7044 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7045 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7046 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7047 arch/ppc-linux-tdesc.h.
7048 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7049 arch/ppc-linux-tdesc.h.
7050 (ppc_linux_nat_target::read_description): Remove target
7051 description matching code. Fill a ppc_linux_features struct and
7052 call ppc_linux_match_description with it. Move comment about ISA
7053 2.05 to ppc-linux-common.c.
7054 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7055 arch/ppc-linux-tdesc.h.
7056 (ppc_linux_core_read_description): Remove target description
7057 matching code. Fill a ppc_linux_features struct and call
7058 ppc_linux_match_description with it.
7059 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7060 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7061 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7062 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7063 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7064 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7065 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7066 (tdesc_powerpc_e500l): Remove.
7068 2018-05-22 Joel Brobecker <brobecker@adacore.com>
7070 * ada-lang.c (catch_assert_command): Pass empty string instead
7071 of NULL for excep_string argument.
7073 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7075 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7076 the width of the requested register exceeds the width of the
7079 2018-05-21 Tom Tromey <tom@tromey.com>
7081 * printcmd.c (output_command): Remove.
7082 (output_command_const): Rename to output_command.
7083 * valprint.h (output_command): Rename from output_command_const.
7084 * tracepoint.c (trace_dump_actions): Call output_command.
7086 2018-05-21 Tom Tromey <tom@tromey.com>
7088 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7089 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7090 * ada-lang.h (create_ada_exception_catchpoint): Update.
7091 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7093 (create_excep_cond_exprs, ~ada_catchpoint)
7094 (should_stop_exception, print_one_exception)
7095 (print_mention_exception, print_recreate_exception): Update.
7096 (ada_get_next_arg): Remove.
7097 (catch_ada_exception_command_split): Use std::string. Change type
7098 of "excep_string", "cond_string".
7099 (catch_ada_exception_command): Update.
7100 (create_ada_exception_catchpoint): Change type of excep_string.
7101 (ada_exception_sal): Remove excep_string parameter.
7102 (~ada_catchpoint): Remove.
7104 2018-05-21 Tom Tromey <tom@tromey.com>
7106 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7109 2018-05-21 Tom Tromey <tom@tromey.com>
7111 * ada-lang.c (ada_exception_message_1, ada_exception_message):
7112 Return unique_xmalloc_ptr.
7113 (print_it_exception): Update.
7115 2018-05-21 Tom Tromey <tom@tromey.com>
7117 * tracepoint.c (trace_dump_actions): Use std::string.
7119 2018-05-21 Tom Tromey <tom@tromey.com>
7121 * symfile.c (reread_symbols): Use std::string for original_name.
7123 2018-05-21 Tom Tromey <tom@tromey.com>
7125 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7126 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
7129 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
7131 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7133 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7134 * objfiles.c (get_objfile_bfd_data): Allocate
7135 objfile_per_bfd_storage with obstack_new when allocating on
7138 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7140 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7142 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7143 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7144 * mdebugread.c (mdebug_build_psymtabs): Likewise.
7145 (add_pending): Likewise.
7146 (parse_symbol): Likewise.
7147 (parse_partial_symbols): Likewise.
7148 (psymtab_to_symtab_1): Likewise.
7149 (new_psymtab): Likewise.
7150 (elfmdebug_build_psymtabs): Likewise.
7151 * minsyms.c (terminate_minimal_symbol_table): Likewise.
7152 * objfiles.c (get_objfile_bfd_data): Likewise.
7153 (objfile_register_static_link): Likewise.
7154 * psymtab.c (allocate_psymtab): Likewise.
7155 * stabsread.c (read_member_functions): Likewise.
7156 * xcoffread.c (xcoff_end_psymtab): Likewise.
7158 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7160 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7161 compiler supports std::is_trivially_constructible.
7162 * common/poison.h: Include obstack.h.
7163 (IsMallocable): Define to is_trivially_constructible if the
7164 compiler supports it, define to true_type otherwise.
7168 (XOBNEWVEC): Redefine.
7169 * gdb_obstack.h (obstack_zalloc): New.
7170 (OBSTACK_ZALLOC): Redefine.
7171 (obstack_calloc): New.
7172 (OBSTACK_CALLOC): Redefine.
7174 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7175 (gdbarch_obstack): New declaration in gdbarch.h, definition in
7177 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7178 obstack_calloc/obstack_zalloc.
7179 (gdbarch_obstack_zalloc): Remove.
7180 * target-descriptions.c (tdesc_data_init): Use obstack_new.
7182 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7184 * stack.c (backtrace_command_1): Remove useless variable int i.
7186 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7188 * stack.c (print_frame_info): Fix comment.
7190 2018-05-18 Tom Tromey <tom@tromey.com>
7192 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7193 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7194 (~dwarf2_per_objfile): Update
7195 (dwarf2_get_dwz_file): Use new.
7196 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7199 2018-05-18 Tom Tromey <tom@tromey.com>
7201 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7203 * dwarf2read.c (struct dwp_file): Add constructor and
7205 (open_and_init_dwp_file): Return a unique_ptr.
7206 (dwarf2_per_objfile, create_dwp_hash_table)
7207 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7208 (lookup_dwo_unit_in_dwp): Update.
7209 (open_and_init_dwp_file, get_dwp_file): Update.
7211 2018-05-18 Tom Tromey <tom@tromey.com>
7213 * dwarf2read.c (dwarf2_per_objfile): Update.
7214 (struct mapped_index): Add initializers.
7215 (dwarf2_read_index): Use new.
7216 (dw2_symtab_iter_init): Update.
7217 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7220 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7222 * dwarf2read.c (mapped_index) <total_size>: Remove.
7224 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7226 * unittests/format_pieces-selftests.c (test_format_specifier):
7229 2018-05-18 Tom Tromey <tom@tromey.com>
7231 * c-typeprint.c (maybe_print_hole): New function.
7232 (c_print_type_struct_field_offset): Update.
7233 (c_type_print_base_struct_union): Call maybe_print_hole.
7235 2018-05-17 Keith Seitz <keiths@redhat.com>
7237 * breakpoint.c (build_bpstat_chain): New function, moved from
7239 (bpstat_stop_status): Add optional parameter, `stop_chain'.
7240 If no stop chain is passed, call build_bpstat_chain to build it.
7241 * breakpoint.h (build_bpstat_chain): Declare.
7242 (bpstat_stop_status): Move documentation here from breakpoint.c.
7243 * infrun.c (handle_signal_stop): Before eliding inlined frames,
7244 build the stop chain and pass it to skip_inline_frames.
7245 Pass this stop chain to bpstat_stop_status.
7246 * inline-frame.c: Include breakpoint.h.
7247 (stopped_by_user_bp_inline_frame): New function.
7248 (skip_inline_frames): Add parameter `stop_chain'.
7249 Move documention to inline-frame.h.
7250 If non-NULL, use stopped_by_user_bp_inline_frame to determine
7251 whether the frame should be elided.
7252 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7253 Add moved documentation and update for new parameter.
7255 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7258 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7259 unittests/format_pieces-selftests.c.
7260 * common/format.h (format_piece) <operator==>: New.
7261 (format_pieces) <operator[]>: Remove.
7262 * common/format.c (format_pieces::format_pieces): Handle \e.
7263 * unittests/format_pieces-selftests.c: New.
7265 2018-05-17 Tom Tromey <tom@tromey.com>
7268 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7269 (dw2_instantiate_symtab): Add skip_partial parameter.
7270 (dw2_find_last_source_symtab, dw2_map_expand_apply)
7271 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7272 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7273 (dw2_expand_symtabs_matching_one)
7274 (dw2_find_pc_sect_compunit_symtab)
7275 (dw2_debug_names_lookup_symbol)
7276 (dw2_debug_names_expand_symtabs_for_function): Update.
7277 (init_cutu_and_read_dies): Add skip_partial parameter.
7278 (process_psymtab_comp_unit, build_type_psymtabs_1)
7279 (process_skeletonless_type_unit, load_partial_comp_unit)
7280 (psymtab_to_symtab_1): Update.
7281 (load_full_comp_unit): Add skip_partial parameter.
7282 (process_imported_unit_die, dwarf2_read_addr_index)
7283 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7284 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7285 (read_signatured_type): Update.
7287 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7289 * value.c (release_value): Remove unused variable.
7290 (record_latest_value): Likewise.
7291 (access_value_history): Likewise.
7292 (preserve_values): Likewise.
7294 2018-05-17 Tom Tromey <tom@tromey.com>
7296 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7299 2018-05-16 Maciej W. Rozycki <macro@mips.com>
7302 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7303 Also handle registers whose width is not a multiple of
7305 (linux_nat_trad_target::store_register): Likewise.
7307 2018-05-16 Tom Tromey <tom@tromey.com>
7309 * gdbcore.h (core_bfd): Redefine.
7310 * corelow.c (core_target::close): Update.
7311 (core_target_open): Update.
7312 * progspace.h (struct program_space) <cbfd>: Now a
7315 2018-05-16 Tom Tromey <tom@tromey.com>
7318 * symfile-add-flags.h (enum symfile_add_flags)
7319 <SYMFILE_NOT_FILENAME>: New constant.
7320 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
7321 objfile name from BFD.
7322 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7323 * minidebug.c (find_separate_debug_file_in_section): Put
7324 ".gnu_debugdata" into BFD's file name.
7326 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
7328 * regcache.c (regcache_read_ftype, regcache_write_ftype):
7331 2018-05-15 Tamar Christina <tamar.christina@arm.com>
7334 * aarch64-tdep.c (aarch64_analyze_prologue,
7335 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7336 Indicate not interested in errors.
7338 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7340 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7341 Supply the MIPS_ZERO_REGNUM register.
7343 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7345 * mips-tdep.c (mask_address_var): Make variable static.
7347 2018-05-14 Tom Tromey <tom@tromey.com>
7349 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7351 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
7353 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7354 FXSAVE_ADDR for the mxcsr register.
7356 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
7358 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7360 2018-05-11 Pedro Alves <palves@redhat.com>
7362 * corelow.c (core_target) <core_target>: No longer inline.
7363 Initialize m_core_gdbarch, m_core_vec and build the section table
7365 <~core_target>: New.
7366 <core_gdbarch, get_core_register_section>: New methods.
7367 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7368 factored out from ...
7369 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7371 (sniff_core_bfd): Add gdbarch parameter.
7372 (core_close): Delete, merged into ...
7373 (core_target::close): ... here. Delete self.
7374 (core_close_cleanup): Delete.
7375 (core_target_open): Allocate a core_target on the heap. Use a
7376 unique_ptr instead of a cleanup. Bits moved into the core_target
7377 ctor. Adjust to use core_target methods instead of globals.
7378 (get_core_register_section): Rename to ...
7379 (core_target::get_core_register_section): ... this and adjust.
7380 (struct get_core_registers_cb_data): New.
7381 (get_core_registers_cb): Use it. Use bool.
7382 (core_target::fetch_registers, core_target::files_info)
7383 (core_target::xfer_partial, core_target::read_description)
7384 (core_target::pid_to, core_target::thread_name): Adjust to
7385 reference class fields instead of globals.
7386 * target.h (struct target_ops_deleter, target_ops_up): New.
7388 2018-05-11 Pedro Alves <palves@redhat.com>
7390 * corefile.c (core_file_command): Move to corelow.c.
7391 * corelow.c (the_core_target): Delete.
7392 (core_file_command): Moved from corefile.c. Check exec_bfd
7393 instead of the_core_target. Use target_detach instead of calling
7394 into the_core_target directly.
7395 (maybe_say_no_core_file_now): New.
7396 (core_target::detach): Use it.
7397 (_initialize_corelow): Remove references to the_core_target.
7398 * gdbcore.h (the_core_target): Delete.
7400 2018-05-11 Tom Tromey <tromey@redhat.com>
7401 Pedro Alves <palves@redhat.com>
7403 * corefile.c (core_bfd): Remove.
7404 * gdbcore.h (core_bfd): Now a macro.
7405 * progspace.h (struct program_space) <cbfd>: New field.
7407 2018-05-11 Tom Tromey <tom@tromey.com>
7409 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7412 2018-05-10 Tom Tromey <tom@tromey.com>
7414 * configure: Rebuild.
7415 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7417 2018-05-10 Joel Brobecker <brobecker@adacore.com>
7420 * regformats/regdat.sh: Adjust script, following the addition
7421 of the new expedite_regs parameter to init_target_desc.
7423 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
7426 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7427 set_gdbarch_significant_addr_bit.
7428 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7429 set_gdbarch_significant_addr_bit.
7430 * utils.c (address_significant): Update to sign extend addr.
7432 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
7434 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7435 (xtensa_linux_init_abi): Limit tdep->num_regs by
7436 tdep->num_nopriv_regs.
7437 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7438 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7441 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
7443 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7445 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
7447 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7448 (I387_MXCSR_INIT_VAL): New constant.
7449 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7450 buffer if it was supplied by the inferior.
7451 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7452 (i387_xsave_get_clear_bv): New function.
7453 (i387_supply_xsave): Only read x87 control registers from the
7454 xsave buffer if the feature is enabled, and the state will have
7455 been written, otherwise, provide a suitable default.
7456 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7457 including x87 control registers. Update control registers if they
7458 have changed from the default value, and mark features as enabled
7460 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7462 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7464 * spu-tdep.c (info_spu_event_command): Fix output formatting.
7466 2018-05-07 Tom Tromey <tom@tromey.com>
7468 * configure: Rebuild.
7469 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7471 2018-05-07 Tom Tromey <tom@tromey.com>
7474 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7475 bit. Use correct value for VDIV.
7477 2018-05-04 Tom Tromey <tom@tromey.com>
7479 * configure: Rebuild.
7480 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7482 2018-05-04 Tom Tromey <tom@tromey.com>
7484 * linux-record.c (record_linux_system_call) <case
7485 RECORD_SYS_RECVFROM>: Add "break".
7487 2018-05-04 Tom Tromey <tom@tromey.com>
7489 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7490 Add missing "break".
7491 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7492 Add missing "break".
7494 2018-05-04 Tom Tromey <tom@tromey.com>
7496 * rs6000-tdep.c (ppc_process_record_op4)
7497 (ppc_process_record_op63): Add fall-through comment.
7499 2018-05-04 Tom Tromey <tom@tromey.com>
7501 * i386-tdep.c (i386_process_record): Add fall-through comment.
7503 2018-05-04 Tom Tromey <tom@tromey.com>
7505 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7508 2018-05-04 Tom Tromey <tom@tromey.com>
7510 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7511 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7512 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7514 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7516 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7519 2018-05-04 Tom Tromey <tom@tromey.com>
7521 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7523 2018-05-04 Tom Tromey <tom@tromey.com>
7525 * s390-tdep.c (s390_process_record): Fix fall-through comments.
7526 * xcoffread.c (scan_xcoff_symtab): Move comment later.
7527 * symfile.c (section_is_mapped): Fix fall-through comment.
7528 * stabsread.c (define_symbol, read_member_functions): Fix
7529 fall-through comment.
7530 * s390-linux-tdep.c (s390_process_record): Fix fall-through
7532 * remote.c (remote_wait_as): Fix fall-through comment.
7533 * p-exp.y (yylex): Fix fall-through comment.
7534 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7536 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7537 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7538 * jv-exp.y (yylex): Fix fall-through comment.
7539 * go-exp.y (lex_one_token): Fix fall-through comment.
7540 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7541 fall-through comment.
7542 * f-exp.y (yylex): Fix fall-through comment.
7543 * dwarf2read.c (process_die): Fix fall-through comments.
7544 * dbxread.c (process_one_symbol): Fix fall-through comment.
7545 * d-exp.y (lex_one_token): Fix fall-through comment.
7546 * cp-name-parser.y (yylex): Fix fall-through comment.
7547 * coffread.c (coff_symtab_read): Fix fall-through comment.
7548 * c-exp.y (lex_one_token): Fix fall-through comment.
7549 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7551 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7554 2018-05-04 Tom Tromey <tom@tromey.com>
7557 * NEWS: Mention gdb.execute change.
7558 * gdbcmd.h (execute_control_command): Don't declare.
7559 * python/python.c (execute_gdb_command): Use read_command_lines_1,
7560 execute_control_commands, execute_control_commands_to_string.
7561 * cli/cli-script.h (execute_control_commands)
7562 (execute_control_commands_to_string): Declare.
7563 (execute_control_command): Add from_tty parameter.
7564 * cli/cli-script.c (execute_control_commands)
7565 (execute_control_commands_to_string): New functions.
7566 (execute_user_command): Use execute_control_commands.
7567 (execute_control_command_1): Add "from_tty" parameter. Update.
7568 (execute_control_command): Likewise.
7570 2018-05-04 Tom Tromey <tom@tromey.com>
7573 * NEWS: Mention that breakpoint commands are writable.
7574 * python/py-breakpoint.c (bppy_set_commands): New function.
7575 (breakpoint_object_getset) <"commands">: Use it.
7577 2018-05-04 Tom Tromey <tom@tromey.com>
7579 * tracepoint.c (actions_command): Update.
7580 * mi/mi-cmd-break.c (mi_command_line_array)
7581 (mi_command_line_array_cnt, mi_command_line_array_ptr)
7582 (mi_read_next_line): Remove.
7583 (mi_cmd_break_commands): Update.
7584 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7586 * cli/cli-script.c (get_command_line): Update.
7587 (process_next_line): Use function_view. Constify.
7588 (recurse_read_control_structure, read_command_lines)
7589 (read_command_lines_1): Change argument types to function_view.
7590 (do_define_command, document_command): Update.
7591 * breakpoint.h (check_tracepoint_command): Don't declare.
7592 * breakpoint.c (check_tracepoint_command): Remove.
7593 (commands_command_1, create_tracepoint_from_upload): Update.
7595 2018-05-04 Tom Tromey <tom@tromey.com>
7598 * cli/cli-script.h (enum command_control_type) <define_control>:
7600 * cli/cli-script.c (multi_line_command_p): Handle define_control.
7601 (build_command_line, execute_control_command_1)
7602 (process_next_line): Likewise.
7603 (do_define_command): New function, extracted from define_command.
7604 (define_command): Use it.
7606 2018-05-04 Tom Tromey <tom@tromey.com>
7608 * tracepoint.c (actions_command): Update.
7609 * cli/cli-script.h (read_command_lines): Update.
7610 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7611 (MAX_TMPBUF): Remove define.
7612 (define_command): Use string_printf.
7613 (document_command): Likewise.
7614 * breakpoint.c (commands_command_1): Update.
7616 2018-05-04 Tom Tromey <tom@tromey.com>
7618 * top.c (execute_command): Update.
7619 * cli/cli-script.h (print_command_lines): Now varargs.
7620 * cli/cli-script.c (print_command_lines): Now varargs.
7621 (execute_control_command_1) <case while_control, case if_control>:
7624 2018-05-04 Tom Tromey <tom@tromey.com>
7626 * tracepoint.c (all_tracepoint_actions): Rename from
7627 all_tracepoint_actions_and_cleanup. Change return type.
7628 (actions_command, encode_actions_1, encode_actions)
7629 (trace_dump_actions, tdump_command): Update.
7630 * remote.c (remote_download_command_source): Update.
7631 * python/python.c (gdbpy_eval_from_control_command)
7632 (python_command, python_interactive_command): Update.
7633 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7634 * guile/guile.c (guile_command)
7635 (gdbscm_eval_from_control_command, guile_command): Update.
7636 * compile/compile.c (compile_code_command)
7637 (compile_print_command, compile_to_object): Update.
7638 * cli/cli-script.h (struct command_lines_deleter): New.
7639 (counted_command_line): New typedef.
7640 (struct command_line): Add constructor, destructor.
7641 <body_list>: Remove.
7642 <body_list_0, body_list_1>: New members.
7643 (command_line_up): Remove typedef.
7644 (read_command_lines, read_command_lines_1, get_command_line):
7646 (copy_command_lines): Don't declare.
7647 * cli/cli-script.c (build_command_line): Use "new".
7648 (get_command_line): Return counted_command_line.
7649 (print_command_lines, execute_user_command)
7650 (execute_control_command_1, while_command, if_command): Update.
7651 (realloc_body_list): Remove.
7652 (process_next_line, recurse_read_control_structure): Update.
7653 (read_command_lines, read_command_lines_1): Return counted_command_line.
7654 (free_command_lines): Use "delete".
7655 (copy_command_lines): Remove.
7656 (define_command, document_command, show_user_1): Update.
7657 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7658 a counted_command_line.
7659 * breakpoint.h (counted_command_line): Remove typedef.
7660 (breakpoint_set_commands): Update.
7661 * breakpoint.c (check_no_tracepoint_commands)
7662 (validate_commands_for_breakpoint): Update.
7663 (breakpoint_set_commands): Change commands to be a
7664 counted_command_line.
7665 (commands_command_1, update_dprintf_command_list)
7666 (create_tracepoint_from_upload): Update.
7668 2018-05-04 Tom Tromey <tom@tromey.com>
7670 * cli/cli-decode.h (cmd_list_element): New constructor.
7671 (~cmd_list_element): New destructor.
7672 (struct cmd_list_element): Add initializers.
7673 * cli/cli-decode.c (do_add_cmd): Use "new".
7674 (delete_cmd): Use "delete".
7676 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
7677 Pedro Alves <palves@redhat.com>
7679 PR breakpoints/19806 and support for PR external/20207.
7680 * NEWS: Mention Aarch64 watchpoint improvements.
7681 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7682 watchpoints and PR external/20207 watchpoints.
7683 * nat/aarch64-linux-hw-point.c
7684 (kernel_supports_any_contiguous_range): New.
7685 (aarch64_watchpoint_offset): New.
7686 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7687 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7688 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7689 (aarch64_align_watchpoint): New parameters aligned_offset_p and
7690 next_addr_orig_p. Support PR external/20207 watchpoints.
7691 (aarch64_downgrade_regs): New.
7692 (aarch64_dr_state_insert_one_point): New parameters offset and
7694 (aarch64_dr_state_remove_one_point): Likewise.
7695 (aarch64_handle_breakpoint): Update caller.
7696 (aarch64_handle_aligned_watchpoint): Likewise.
7697 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7699 (aarch64_linux_set_debug_regs): Remove const from state. Call
7700 aarch64_downgrade_regs.
7701 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7702 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7703 (DR_CONTROL_MASK): ... this.
7704 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7705 (unsigned int aarch64_watchpoint_offset): New prototype.
7706 (aarch64_linux_set_debug_regs): Remove const from state.
7707 * utils.c (align_up, align_down): Move to ...
7708 * common/common-utils.c (align_up, align_down): ... here.
7709 * utils.h (align_up, align_down): Move to ...
7710 * common/common-utils.h (align_up, align_down): ... here.
7712 2018-05-04 Joel Brobecker <brobecker@adacore.com>
7714 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7715 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7716 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7717 Re-implement to match the ABI as summarized in GCC's
7718 gcc/config/sparc/sparc.c. All callers updated.
7719 (sparc32_store_arguments): Remove assertion.
7721 2018-05-04 Tom Tromey <tom@tromey.com>
7723 * printcmd.c: Don't include tui.h.
7724 (decode_format): Use skip_spaces.
7726 2018-05-04 Tom Tromey <tom@tromey.com>
7729 * printcmd.c (last_count): New global.
7730 (x_command): Use saved count when repeating.
7732 2018-05-04 Tom Tromey <tom@tromey.com>
7734 * nto-procfs.c (do_closedir_cleanup): Remove.
7735 (procfs_pidlist): Use gdb_dir_up.
7736 * procfs.c (do_closedir_cleanup): Remove.
7737 (proc_update_threads): Use gdb_dir_up.
7738 * common/filestuff.h (struct gdb_dir_deleter): New.
7739 (gdb_dir_up): New typedef.
7741 2018-05-04 Tom Tromey <tom@tromey.com>
7743 * ada-lang.c (print_mention_exception): Use std::string.
7745 2018-05-04 Tom Tromey <tom@tromey.com>
7747 * ada-lang.c (create_excep_cond_exprs): Update.
7748 (ada_exception_catchpoint_cond_string): Use std::string.
7750 2018-05-04 Tom Tromey <tom@tromey.com>
7752 * ada-lang.c (xget_renaming_scope): Return std::string.
7753 (old_renaming_is_invisible): Update.
7755 2018-05-04 Tom Tromey <tom@tromey.com>
7757 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7758 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7760 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
7762 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7764 2018-05-04 Tom Tromey <tom@tromey.com>
7766 * remote.c (remote_query_supported_append): Change type.
7767 (remote_check_symbols): Update.
7769 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
7772 * configure.ac: Prepend libpython.
7773 * python/python-config.py: Likewise.
7774 * configure: Regenerate.
7776 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
7778 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7780 2018-05-03 Pedro Alves <palves@redhat.com>
7783 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7784 override. Write 'true' instead of '1'.
7785 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7788 2018-05-02 Pedro Alves <palves@redhat.com>
7790 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7791 add_inf_child_target.
7792 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7793 add_inf_child_target.
7794 * aix-thread.c (aix_thread_target_info): New.
7795 (aix_thread_target) <shortname, longname, doc>: Delete.
7797 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7798 add_inf_child_target.
7799 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7800 add_inf_child_target.
7801 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7802 add_inf_child_target.
7803 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7804 add_inf_child_target.
7805 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7806 add_inf_child_target.
7807 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7808 add_inf_child_target.
7809 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7810 add_inf_child_target.
7811 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7812 add_inf_child_target.
7813 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7814 add_inf_child_target.
7815 * bfd-target.c (target_bfd_target_info): New.
7816 (target_bfd) <shortname, longname, doc>: Delete.
7818 * bsd-kvm.c (bsd_kvm_target_info): New.
7819 (bsd_kvm_target) <shortname, longname, doc>: Delete.
7821 (bsd_kvm_target::open): Rename to ...
7822 (bsd_kvm_target_open): ... this. Adjust.
7823 * bsd-uthread.c (bsd_uthread_target_info): New.
7824 (bsd_uthread_target) <shortname, longname, doc>: Delete.
7826 * corefile.c (core_file_command): Adjust.
7827 * corelow.c (core_target_info): New.
7828 (core_target) <shortname, longname, doc>: Delete.
7830 (core_target::open): Rename to ...
7831 (core_target_open): ... this. Adjust.
7832 * ctf.c (ctf_target_info): New.
7833 (ctf_target) <shortname, longname, doc>: Delete.
7835 (ctf_target::open): Rename to ...
7836 (ctf_target_open): ... this.
7837 (_initialize_ctf): Adjust.
7838 * exec.c (exec_target_info): New.
7839 (exec_target) <shortname, longname, doc>: Delete.
7841 (exec_target::open): Rename to ...
7842 (exec_target_open): ... this.
7843 * gdbcore.h (core_target_open): Declare.
7844 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7845 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7846 add_inf_child_target.
7847 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7848 add_inf_child_target.
7849 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7850 add_inf_child_target.
7851 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7852 add_inf_child_target.
7853 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7854 add_inf_child_target.
7855 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7856 add_inf_child_target.
7857 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7858 add_inf_child_target.
7859 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7860 add_inf_child_target.
7861 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7862 add_inf_child_target.
7863 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7864 add_inf_child_target.
7865 * inf-child.c (inf_child_target_info): New.
7866 (inf_child_target::info): New.
7867 (inf_child_open_target): Remove 'target' parameter. Use
7868 get_native_target instead.
7869 (inf_child_target::open): Delete.
7870 (add_inf_child_target): New.
7871 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7874 (add_inf_child_target): Declare.
7875 (inf_child_open_target): Declare.
7876 * linux-thread-db.c (thread_db_target_info): New.
7877 (thread_db_target) <shortname, longname, doc>: Delete.
7879 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7880 add_inf_child_target.
7881 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7882 add_inf_child_target.
7883 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7884 add_inf_child_target.
7885 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7886 add_inf_child_target.
7887 * make-target-delegates (print_class): Adjust.
7888 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7889 add_inf_child_target.
7890 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7891 add_inf_child_target.
7892 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7893 add_inf_child_target.
7894 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7895 add_inf_child_target.
7896 * nto-procfs.c (nto_native_target_info): New.
7897 (nto_procfs_target_native) <shortname, longname, doc>:
7900 (nto_procfs_target_info): New.
7901 (nto_procfs_target_procfs) <shortname, longname, doc>:
7904 (init_procfs_targets): Adjust.
7905 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7906 add_inf_child_target.
7907 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7908 add_inf_child_target.
7909 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7910 add_inf_child_target.
7911 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7912 add_inf_child_target.
7913 * ravenscar-thread.c (ravenscar_target_info): New.
7914 (ravenscar_thread_target) <shortname, longname, doc>:
7917 * record-btrace.c (record_btrace_target_info):
7918 (record_btrace_target) <shortname, longname, doc>: Delete.
7920 (record_btrace_target::open): Rename to ...
7921 (record_btrace_target_open): ... this. Adjust.
7922 * record-full.c (record_longname, record_doc): New.
7923 (record_full_base_target) <shortname, longname, doc>: Delete.
7925 (record_full_target_info): New.
7926 (record_full_target): <shortname>: Delete.
7928 (record_full_core_open_1, record_full_open_1): Update comments.
7929 (record_full_base_target::open): Rename to ...
7930 (record_full_open): ... this.
7931 (cmd_record_full_restore): Update.
7932 (_initialize_record_full): Update.
7933 * remote-sim.c (remote_sim_target_info): New.
7934 (gdbsim_target) <shortname, longname, doc>: Delete.
7936 (gdbsim_target::open): Rename to ...
7937 (gdbsim_target_open): ... this.
7938 (_initialize_remote_sim): Adjust.
7939 * remote.c (remote_doc): New.
7940 (remote_target_info): New.
7941 (remote_target) <shortname, longname, doc>: Delete.
7943 (extended_remote_target_info): New.
7944 (extended_remote_target) <shortname, longname, doc>: Delete.
7946 (remote_target::open_1): Make static. Adjust.
7947 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7948 * s390-linux-nat.c (_initialize_s390_nat): Use
7949 add_inf_child_target.
7950 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7951 add_inf_child_target.
7952 * sol-thread.c (thread_db_target_info): New.
7953 (sol_thread_target) <shortname, longname, doc>: Delete.
7955 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7956 add_inf_child_target.
7957 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7958 add_inf_child_target.
7959 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7960 add_inf_child_target.
7961 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7962 add_inf_child_target.
7963 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7964 add_inf_child_target.
7965 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7966 add_inf_child_target.
7967 * spu-linux-nat.c (_initialize_spu_nat): Use
7968 add_inf_child_target.
7969 * spu-multiarch.c (spu_multiarch_target_info): New.
7970 (spu_multiarch_target) <shortname, longname, doc>: Delete.
7972 * target-delegates.c: Regenerate.
7973 * target.c: Include <unordered_map>.
7974 (target_ops_p): Delete.
7975 (DEF_VEC_P(target_ops_p)): Delete.
7976 (target_factories): New.
7977 (test_target_info): New.
7978 (test_target_ops::info): New.
7979 (open_target): Adjust to use target_factories.
7980 (add_target_with_completer): Rename to ...
7981 (add_target): ... this. Change prototype. Register target_info
7982 and open callback in target_factories. Register target_info in
7983 command context instead of target_ops.
7984 (add_target): Delete old implementation.
7985 (add_deprecated_target_alias): Change prototype. Adjust.
7986 (the_native_target): New.
7987 (set_native_target, get_native_target): New.
7988 (find_default_run_target): Use the_native_target.
7989 (find_attach_target, find_run_target): Simplify.
7990 (target_ops::open): Delete.
7991 (dummy_target_info): New.
7992 (dummy_target::shortname, dummy_target::longname)
7993 (dummy_target::doc): Delete.
7994 (dummy_target::info): New.
7995 (debug_target::shortname, debug_target::longname)
7996 (debug_target::doc): Delete.
7997 (debug_target::info): New.
7998 * target.h (struct target_info): New.
7999 (target_ops::~target_ops): Add comment.
8000 (target_ops::info): New.
8001 (target_ops::shortname, target_ops::longname, target_ops::doc): No
8002 longer virtual. Implement in terms of target_info.
8003 (set_native_target, get_native_target): Declare.
8004 (target_open_ftype): New.
8005 (add_target, add_target_with_completer)
8006 (add_deprecated_target_alias): Change prototype.
8007 (test_target) <shortname, longname, doc>: Delete.
8009 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8010 add_inf_child_target.
8011 * tracefile-tfile.c (tfile_target_info): New.
8012 (tfile_target) <shortname, longname, doc>: Delete.
8014 (tfile_target::open): Rename to ...
8015 (tfile_target_open): ... this.
8016 (_initialize_tracefile_tfile): Adjust.
8017 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8018 add_inf_child_target.
8019 * windows-nat.c (_initialize_windows_nat): Use
8020 add_inf_child_target.
8021 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8022 add_inf_child_target.
8024 2018-05-02 Pedro Alves <palves@redhat.com>
8026 * linux-nat.h (linux_nat_target) <low_new_thread,
8027 low_delete_thread, low_new_fork, low_forget_process,
8028 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8029 New virtual methods.
8030 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8031 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8032 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8033 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8034 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8036 * linux-fork.c (delete_fork): Adjust to call low method.
8037 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8038 (linux_nat_new_fork, linux_nat_forget_process_hook)
8039 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8040 (linux_nat_status_is_event):
8041 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8042 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8044 (sigtrap_is_event): Rename to ...
8045 (linux_nat_target::low_status_is_event): ... this.
8046 (linux_nat_set_status_is_event): Delete.
8047 (save_stop_reason, linux_nat_wait_1)
8048 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8050 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8051 (linux_nat_set_new_fork, linux_nat_set_forget_process)
8052 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8053 (linux_nat_set_prepare_to_resume): Delete.
8054 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8055 low virtual methods.
8056 * amd64-linux-nat.c: Likewise.
8057 * arm-linux-nat.c: Likewise.
8058 * i386-linux-nat.c: Likewise.
8059 * ia64-linux-nat.c: Likewise.
8060 * mips-linux-nat.c: Likewise.
8061 * ppc-linux-nat.c: Likewise.
8062 * s390-linux-nat.c: Likewise.
8063 * sparc64-linux-nat.c: Likewise.
8064 * x86-linux-nat.c: Likewise.
8065 * x86-linux-nat.h: Include "nat/x86-linux.h".
8066 (x86_linux_nat_target) <low_new_fork, low_forget_process,
8067 low_prepare_to_resume, low_new_thread, low_delete_thread>:
8070 2018-05-02 Pedro Alves <palves@redhat.com>
8072 * target.h (target_ops)
8073 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8074 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8075 stopped_by_watchpoint, have_continuable_watchpoint,
8076 stopped_data_address, watchpoint_addr_within_range,
8077 can_accel_watchpoint_condition, can_run, thread_alive,
8078 has_all_memory, has_memory, has_stack, has_registers,
8079 has_execution, can_async_p, is_async_p, supports_non_stop,
8080 always_non_stop_p, can_execute_reverse, supports_multi_process,
8081 supports_enable_disable_tracepoint,
8082 supports_disable_randomization, supports_string_tracing,
8083 supports_evaluation_of_breakpoint_conditions,
8084 can_run_breakpoint_commands, filesystem_is_local,
8085 can_download_tracepoint, get_trace_state_variable_value,
8086 set_trace_notes, get_tib_address, use_agent, can_use_agent,
8087 record_is_replaying, record_will_replay,
8088 augmented_libraries_svr4_read>: Adjust to return bool.
8089 * aarch64-linux-nat.c: All implementations adjusted.
8090 * aix-thread.c: All implementations adjusted.
8091 * arm-linux-nat.c: All implementations adjusted.
8092 * breakpoint.c: All implementations adjusted.
8093 * bsd-kvm.c: All implementations adjusted.
8094 * bsd-uthread.c: All implementations adjusted.
8095 * corelow.c: All implementations adjusted.
8096 * ctf.c: All implementations adjusted.
8097 * darwin-nat.c: All implementations adjusted.
8098 * darwin-nat.h: All implementations adjusted.
8099 * exec.c: All implementations adjusted.
8100 * fbsd-nat.c: All implementations adjusted.
8101 * fbsd-nat.h: All implementations adjusted.
8102 * gnu-nat.c: All implementations adjusted.
8103 * gnu-nat.h: All implementations adjusted.
8104 * go32-nat.c: All implementations adjusted.
8105 * ia64-linux-nat.c: All implementations adjusted.
8106 * inf-child.c: All implementations adjusted.
8107 * inf-child.h: All implementations adjusted.
8108 * inf-ptrace.c: All implementations adjusted.
8109 * inf-ptrace.h: All implementations adjusted.
8110 * linux-nat.c: All implementations adjusted.
8111 * linux-nat.h: All implementations adjusted.
8112 * mips-linux-nat.c: All implementations adjusted.
8113 * nto-procfs.c: All implementations adjusted.
8114 * ppc-linux-nat.c: All implementations adjusted.
8115 * procfs.c: All implementations adjusted.
8116 * ravenscar-thread.c: All implementations adjusted.
8117 * record-btrace.c: All implementations adjusted.
8118 * record-full.c: All implementations adjusted.
8119 * remote-sim.c: All implementations adjusted.
8120 * remote.c: All implementations adjusted.
8121 * s390-linux-nat.c: All implementations adjusted.
8122 * sol-thread.c: All implementations adjusted.
8123 * spu-multiarch.c: All implementations adjusted.
8124 * target-delegates.c: All implementations adjusted.
8125 * target.c: All implementations adjusted.
8126 * target.h: All implementations adjusted.
8127 * tracefile-tfile.c: All implementations adjusted.
8128 * tracefile.c: All implementations adjusted.
8129 * tracefile.h: All implementations adjusted.
8130 * windows-nat.c: All implementations adjusted.
8131 * x86-linux-nat.h: All implementations adjusted.
8132 * x86-nat.h: All implementations adjusted.
8134 2018-05-02 Pedro Alves <palves@redhat.com>
8136 * make-target-delegates (scan_target_h): Don't trim lines here.
8137 Replace sequences of tabs and/or whitespace with a single
8139 (top level, parsing methods): Trim each line before processing it
8142 2018-05-02 Pedro Alves <palves@redhat.com>
8143 John Baldwin <jhb@freebsd.org>
8145 * target.h (enum strata) <debug_stratum>: New.
8146 (struct target_ops) <all delegation methods>: Replace by C++
8147 virtual methods, and drop "to_" prefix. All references updated
8149 <to_shortname, to_longname, to_doc, to_data,
8150 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8151 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8152 virtual methods. All references updated throughout.
8153 <can_attach, supports_terminal_ours, can_create_inferior,
8154 get_thread_control_capabilities, attach_no_wait>: New
8156 <insert_breakpoint, remove_breakpoint>: Now
8157 TARGET_DEFAULT_NORETURN methods.
8158 <info_proc>: Now returns bool.
8160 (OPS_MAGIC): Delete.
8161 (current_target): Delete. All references replaced by references
8163 (target_stack): ... this. New.
8164 (target_shortname, target_longname): Adjust.
8165 (target_can_run): Now a function declaration.
8166 (default_child_has_all_memory, default_child_has_memory)
8167 (default_child_has_stack, default_child_has_registers)
8168 (default_child_has_execution): Remove target_ops parameter.
8169 (complete_target_initialization): Delete.
8170 (memory_breakpoint_target): New template class.
8171 (test_target_ops): Refactor as a C++ class with virtual methods.
8172 * make-target-delegates (NAME_PART): Tighten.
8173 (POINTER_PART, CP_SYMBOL): New.
8174 (SIMPLE_RETURN_PART): Reimplement.
8175 (VEC_RETURN_PART): Expect less.
8176 (RETURN_PART, VIRTUAL_PART): New.
8177 (METHOD): Adjust to C++ virtual methods.
8178 (scan_target_h): Remove reference to C99.
8179 (dname): Output "target_ops::" prefix.
8180 (write_function_header): Adjust to output a C++ class method.
8181 (write_declaration): New.
8182 (write_delegator): Adjust to output a C++ class method.
8183 (tdname): Output "dummy_target::" prefix.
8184 (write_tdefault, write_debugmethod): Adjust to output a C++ class
8186 (tdefault_names, debug_names): Delete.
8187 (return_types, tdefaults, styles, argtypes_array): New.
8188 (top level): All methods are delegators.
8190 (top level): Print dummy_target and debug_target classes.
8191 * target-delegates.c: Regenerate.
8192 * target-debug.h (target_debug_print_enum_info_proc_what)
8193 (target_debug_print_thread_control_capabilities)
8194 (target_debug_print_thread_info_p): New.
8195 * target.c (dummy_target): Delete.
8196 (the_dummy_target, the_debug_target): New.
8197 (target_stack): Now extern.
8198 (set_targetdebug): Push/unpush debug target.
8199 (default_child_has_all_memory, default_child_has_memory)
8200 (default_child_has_stack, default_child_has_registers)
8201 (default_child_has_execution): Remove target_ops parameter.
8202 (complete_target_initialization): Delete.
8203 (add_target_with_completer): No longer call
8204 complete_target_initialization.
8205 (target_supports_terminal_ours): Use regular delegation.
8206 (update_current_target): Delete.
8207 (push_target): No longer check magic number. Don't call
8208 update_current_target.
8209 (unpush_target): Don't call update_current_target.
8210 (target_is_pushed): No longer check magic number.
8211 (target_require_runnable): Skip for all stratums over
8213 (target_ops::info_proc): New.
8214 (target_info_proc): Use find_target_at and
8215 find_default_run_target.
8216 (target_supports_disable_randomization): Use regular delegation.
8217 (target_get_osdata): Use find_target_at.
8218 (target_ops::open, target_ops::close, target_ops::can_attach)
8219 (target_ops::attach, target_ops::can_create_inferior)
8220 (target_ops::create_inferior, target_ops::can_run)
8221 (target_can_run): New.
8222 (default_fileio_target): Use regular delegation.
8223 (target_ops::fileio_open, target_ops::fileio_pwrite)
8224 (target_ops::fileio_pread, target_ops::fileio_fstat)
8225 (target_ops::fileio_close, target_ops::fileio_unlink)
8226 (target_ops::fileio_readlink): New.
8227 (target_fileio_open_1, target_fileio_unlink)
8228 (target_fileio_readlink): Always call the target method. Handle
8230 (return_zero, return_zero_has_execution): Delete.
8231 (init_dummy_target): Delete.
8232 (dummy_target::dummy_target, dummy_target::shortname)
8233 (dummy_target::longname, dummy_target::doc)
8234 (debug_target::debug_target, debug_target::shortname)
8235 (debug_target::longname, debug_target::doc): New.
8236 (target_supports_delete_record): Use regular delegation.
8237 (setup_target_debug): Delete.
8238 (maintenance_print_target_stack): Skip debug_stratum.
8239 (initialize_targets): Instantiate the_dummy_target and
8241 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
8243 (target_auxv_search, fprint_target_auxv): Adjust.
8244 (info_auxv_command): Adjust to use target_stack.
8245 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8246 * exceptions.c (print_flush): Handle a NULL target_stack.
8247 * regcache.c (target_ops_no_register): Refactor as class with
8250 * exec.c (exec_target): New class.
8251 (exec_ops): Now an exec_target.
8252 (exec_open, exec_close_1, exec_get_section_table)
8253 (exec_xfer_partial, exec_files_info, exec_has_memory)
8254 (exec_make_note_section): Refactor as exec_target methods.
8255 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8257 (exec_target::find_memory_regions): New.
8258 (_initialize_exec): Don't call init_exec_ops.
8259 * gdbcore.h (exec_file_clear): Delete.
8261 * corefile.c (core_target): Delete.
8262 (core_file_command): Adjust.
8263 * corelow.c (core_target): New class.
8264 (the_core_target): New.
8265 (core_close): Remove target_ops parameter.
8266 (core_close_cleanup): Adjust.
8267 (core_target::close): New.
8268 (core_open, core_detach, get_core_registers, core_files_info)
8269 (core_xfer_partial, core_thread_alive, core_read_description)
8270 (core_pid_to_str, core_thread_name, core_has_memory)
8271 (core_has_stack, core_has_registers, core_info_proc): Rework as
8272 core_target methods.
8273 (ignore, core_remove_breakpoint, init_core_ops): Delete.
8274 (_initialize_corelow): Initialize the_core_target.
8275 * gdbcore.h (core_target): Delete.
8276 (the_core_target): New.
8278 * ctf.c: (ctf_target): New class.
8279 (ctf_ops): Now a ctf_target.
8280 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8281 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8282 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8284 (init_ctf_ops): Delete.
8285 (_initialize_ctf): Don't call it.
8286 * tracefile-tfile.c (tfile_target): New class.
8287 (tfile_ops): Now a tfile_target.
8288 (tfile_open, tfile_close, tfile_files_info)
8289 (tfile_get_tracepoint_status, tfile_trace_find)
8290 (tfile_fetch_registers, tfile_xfer_partial)
8291 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8292 Refactor as tfile_target methods.
8293 (tfile_xfer_partial_features): Remove target_ops parameter.
8294 (init_tfile_ops): Delete.
8295 (_initialize_tracefile_tfile): Don't call it.
8296 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8297 (tracefile_has_stack, tracefile_has_registers)
8298 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8299 tracefile_target methods.
8300 (init_tracefile_ops): Delete.
8301 (tracefile_target::tracefile_target): New.
8302 * tracefile.h: Include "target.h".
8303 (tracefile_target): New class.
8304 (init_tracefile_ops): Delete.
8306 * spu-multiarch.c (spu_multiarch_target): New class.
8307 (spu_ops): Now a spu_multiarch_target.
8308 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8309 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8310 (spu_search_memory, spu_mourn_inferior): Refactor as
8311 spu_multiarch_target methods.
8312 (init_spu_ops): Delete.
8313 (_initialize_spu_multiarch): Remove references to init_spu_ops,
8314 complete_target_initialization.
8316 * ravenscar-thread.c (ravenscar_thread_target): New class.
8317 (ravenscar_ops): Now a ravenscar_thread_target.
8318 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8319 (ravenscar_thread_alive, ravenscar_pid_to_str)
8320 (ravenscar_fetch_registers, ravenscar_store_registers)
8321 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8322 (ravenscar_stopped_by_hw_breakpoint)
8323 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8324 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8325 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8327 (init_ravenscar_thread_ops): Delete.
8328 (_initialize_ravenscar): Remove references to
8329 init_ravenscar_thread_ops and complete_target_initialization.
8331 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8332 (bsd_uthread_target): New class.
8333 (bsd_uthread_ops): Now a bsd_uthread_target.
8334 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8335 (bsd_uthread_close, bsd_uthread_mourn_inferior)
8336 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8337 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8338 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8339 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8340 (bsd_uthread_target): Delete function.
8341 (_initialize_bsd_uthread): Remove reference to
8342 complete_target_initialization.
8344 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
8345 (target_bfd): ... this new class.
8346 (target_bfd_xfer_partial, target_bfd_get_section_table)
8347 (target_bfd_close): Refactor as target_bfd methods.
8348 (target_bfd::~target_bfd): New.
8349 (target_bfd_reopen): Adjust.
8350 (target_bfd::close): New.
8352 * record-btrace.c (record_btrace_target): New class.
8353 (record_btrace_ops): Now a record_btrace_target.
8354 (record_btrace_open, record_btrace_stop_recording)
8355 (record_btrace_disconnect, record_btrace_close)
8356 (record_btrace_async, record_btrace_info)
8357 (record_btrace_insn_history, record_btrace_insn_history_range)
8358 (record_btrace_insn_history_from, record_btrace_call_history)
8359 (record_btrace_call_history_range)
8360 (record_btrace_call_history_from, record_btrace_record_method)
8361 (record_btrace_is_replaying, record_btrace_will_replay)
8362 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8363 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8364 (record_btrace_store_registers, record_btrace_prepare_to_store)
8365 (record_btrace_to_get_unwinder)
8366 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8367 (record_btrace_commit_resume, record_btrace_wait)
8368 (record_btrace_stop, record_btrace_can_execute_reverse)
8369 (record_btrace_stopped_by_sw_breakpoint)
8370 (record_btrace_supports_stopped_by_sw_breakpoint)
8371 (record_btrace_stopped_by_hw_breakpoint)
8372 (record_btrace_supports_stopped_by_hw_breakpoint)
8373 (record_btrace_update_thread_list, record_btrace_thread_alive)
8374 (record_btrace_goto_begin, record_btrace_goto_end)
8375 (record_btrace_goto, record_btrace_stop_replaying_all)
8376 (record_btrace_execution_direction)
8377 (record_btrace_prepare_to_generate_core)
8378 (record_btrace_done_generating_core): Refactor as
8379 record_btrace_target methods.
8380 (init_record_btrace_ops): Delete.
8381 (_initialize_record_btrace): Remove reference to
8382 init_record_btrace_ops.
8383 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8384 the execution_direction global.
8385 (record_full_base_target, record_full_target)
8386 (record_full_core_target): New classes.
8387 (record_full_ops): Now a record_full_target.
8388 (record_full_core_ops): Now a record_full_core_target.
8389 (record_full_target::detach, record_full_target::disconnect)
8390 (record_full_core_target::disconnect)
8391 (record_full_target::mourn_inferior, record_full_target::kill):
8393 (record_full_open, record_full_close, record_full_async): Refactor
8394 as methods of the record_full_base_target class.
8395 (record_full_resume, record_full_commit_resume): Refactor
8396 as methods of the record_full_target class.
8397 (record_full_wait, record_full_stopped_by_watchpoint)
8398 (record_full_stopped_data_address)
8399 (record_full_stopped_by_sw_breakpoint)
8400 (record_full_supports_stopped_by_sw_breakpoint)
8401 (record_full_stopped_by_hw_breakpoint)
8402 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8403 methods of the record_full_base_target class.
8404 (record_full_store_registers, record_full_xfer_partial)
8405 (record_full_insert_breakpoint, record_full_remove_breakpoint):
8406 Refactor as methods of the record_full_target class.
8407 (record_full_can_execute_reverse, record_full_get_bookmark)
8408 (record_full_goto_bookmark, record_full_execution_direction)
8409 (record_full_record_method, record_full_info, record_full_delete)
8410 (record_full_is_replaying, record_full_will_replay)
8411 (record_full_goto_begin, record_full_goto_end, record_full_goto)
8412 (record_full_stop_replaying): Refactor as methods of the
8413 record_full_base_target class.
8414 (record_full_core_resume, record_full_core_kill)
8415 (record_full_core_fetch_registers)
8416 (record_full_core_prepare_to_store)
8417 (record_full_core_store_registers, record_full_core_xfer_partial)
8418 (record_full_core_insert_breakpoint)
8419 (record_full_core_remove_breakpoint)
8420 (record_full_core_has_execution): Refactor
8421 as methods of the record_full_core_target class.
8422 (record_full_base_target::supports_delete_record): New.
8423 (init_record_full_ops): Delete.
8424 (init_record_full_core_ops): Delete.
8425 (record_full_save): Refactor as method of the
8426 record_full_base_target class.
8427 (_initialize_record_full): Remove references to
8428 init_record_full_ops and init_record_full_core_ops.
8430 * remote.c (remote_target, extended_remote_target): New classes.
8431 (remote_ops): Now a remote_target.
8432 (extended_remote_ops): Now an extended_remote_target.
8433 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8434 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8435 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8436 (remote_pass_signals, remote_set_syscall_catchpoint)
8437 (remote_program_signals, )
8438 (remote_thread_always_alive): Remove target_ops parameter.
8439 (remote_thread_alive, remote_thread_name)
8440 (remote_update_thread_list, remote_threads_extra_info)
8441 (remote_static_tracepoint_marker_at)
8442 (remote_static_tracepoint_markers_by_strid)
8443 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8444 (remote_open): Refactor as methods of remote_target.
8445 (extended_remote_open, extended_remote_detach)
8446 (extended_remote_attach, extended_remote_post_attach):
8447 (extended_remote_supports_disable_randomization)
8448 (extended_remote_create_inferior): : Refactor as method of
8449 extended_remote_target.
8450 (remote_set_permissions, remote_open_1, remote_detach)
8451 (remote_follow_fork, remote_follow_exec, remote_disconnect)
8452 (remote_resume, remote_commit_resume, remote_stop)
8453 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8454 (remote_terminal_ours, remote_wait, remote_fetch_registers)
8455 (remote_prepare_to_store, remote_store_registers)
8456 (remote_flash_erase, remote_flash_done, remote_files_info)
8457 (remote_kill, remote_mourn, remote_insert_breakpoint)
8458 (remote_remove_breakpoint, remote_insert_watchpoint)
8459 (remote_watchpoint_addr_within_range)
8460 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8461 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8462 (remote_supports_stopped_by_sw_breakpoint)
8463 (remote_stopped_by_hw_breakpoint)
8464 (remote_supports_stopped_by_hw_breakpoint)
8465 (remote_stopped_by_watchpoint, remote_stopped_data_address)
8466 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8467 (remote_verify_memory): Refactor as methods of remote_target.
8468 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8470 (remote_xfer_partial, remote_get_memory_xfer_limit)
8471 (remote_search_memory, remote_rcmd, remote_memory_map)
8472 (remote_pid_to_str, remote_get_thread_local_address)
8473 (remote_get_tib_address, remote_read_description): Refactor as
8474 methods of remote_target.
8475 (remote_target::fileio_open, remote_target::fileio_pwrite)
8476 (remote_target::fileio_pread, remote_target::fileio_close): New.
8477 (remote_hostio_readlink, remote_hostio_fstat)
8478 (remote_filesystem_is_local, remote_can_execute_reverse)
8479 (remote_supports_non_stop, remote_supports_disable_randomization)
8480 (remote_supports_multi_process, remote_supports_cond_breakpoints)
8481 (remote_supports_enable_disable_tracepoint)
8482 (remote_supports_string_tracing)
8483 (remote_can_run_breakpoint_commands, remote_trace_init)
8484 (remote_download_tracepoint, remote_can_download_tracepoint)
8485 (remote_download_trace_state_variable, remote_enable_tracepoint)
8486 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8487 (remote_trace_start, remote_get_trace_status)
8488 (remote_get_tracepoint_status, remote_trace_stop)
8489 (remote_trace_find, remote_get_trace_state_variable_value)
8490 (remote_save_trace_data, remote_get_raw_trace_data)
8491 (remote_set_disconnected_tracing, remote_core_of_thread)
8492 (remote_set_circular_trace_buffer, remote_traceframe_info)
8493 (remote_get_min_fast_tracepoint_insn_len)
8494 (remote_set_trace_buffer_size, remote_set_trace_notes)
8495 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8496 (remote_disable_btrace, remote_teardown_btrace)
8497 (remote_read_btrace, remote_btrace_conf)
8498 (remote_augmented_libraries_svr4_read, remote_load)
8499 (remote_pid_to_exec_file, remote_can_do_single_step)
8500 (remote_execution_direction, remote_thread_handle_to_thread_info):
8501 Refactor as methods of remote_target.
8502 (init_remote_ops, init_extended_remote_ops): Delete.
8503 (remote_can_async_p, remote_is_async_p, remote_async)
8504 (remote_thread_events, remote_upload_tracepoints)
8505 (remote_upload_trace_state_variables): Refactor as methods of
8507 (_initialize_remote): Remove references to init_remote_ops and
8508 init_extended_remote_ops.
8510 * remote-sim.c (gdbsim_target): New class.
8511 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8512 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8513 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8514 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8515 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8516 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8517 Refactor as methods of gdbsim_target.
8518 (gdbsim_ops): Now a gdbsim_target.
8519 (init_gdbsim_ops): Delete.
8520 (gdbsim_cntrl_c): Adjust.
8521 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8523 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8524 (the_amd64_linux_nat_target): New.
8525 (amd64_linux_fetch_inferior_registers)
8526 (amd64_linux_store_inferior_registers): Refactor as methods of
8527 amd64_linux_nat_target.
8528 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
8529 * i386-linux-nat.c: Don't include "linux-nat.h".
8530 (i386_linux_nat_target): New class.
8531 (the_i386_linux_nat_target): New.
8532 (i386_linux_fetch_inferior_registers)
8533 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8534 as methods of i386_linux_nat_target.
8535 (_initialize_i386_linux_nat): Adjust. Set linux_target.
8536 * inf-child.c (inf_child_ops): Delete.
8537 (inf_child_fetch_inferior_registers)
8538 (inf_child_store_inferior_registers): Delete.
8539 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8540 methods of inf_child_target.
8541 (inf_child_target::supports_terminal_ours)
8542 (inf_child_target::terminal_init)
8543 (inf_child_target::terminal_inferior)
8544 (inf_child_target::terminal_ours_for_output)
8545 (inf_child_target::terminal_ours, inf_child_target::interrupt)
8546 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8548 (inf_child_open, inf_child_disconnect, inf_child_close)
8549 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8550 (inf_child_post_startup_inferior, inf_child_can_run)
8551 (inf_child_pid_to_exec_file): Refactor as methods of
8553 (inf_child_follow_fork): Delete.
8554 (inf_child_target::can_create_inferior)
8555 (inf_child_target::can_attach): New.
8556 (inf_child_target::has_all_memory, inf_child_target::has_memory)
8557 (inf_child_target::has_stack, inf_child_target::has_registers)
8558 (inf_child_target::has_execution): New.
8559 (inf_child_fileio_open, inf_child_fileio_pwrite)
8560 (inf_child_fileio_pread, inf_child_fileio_fstat)
8561 (inf_child_fileio_close, inf_child_fileio_unlink)
8562 (inf_child_fileio_readlink, inf_child_use_agent)
8563 (inf_child_can_use_agent): Refactor as methods of
8565 (return_zero, inf_child_target): Delete.
8566 (inf_child_target::inf_child_target): New.
8567 * inf-child.h: Include "target.h".
8568 (inf_child_target): Delete function prototype.
8569 (inf_child_target): New class.
8570 (inf_child_open_target, inf_child_mourn_inferior)
8571 (inf_child_maybe_unpush_target): Delete.
8572 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8573 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8574 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8575 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8576 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8577 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8578 (inf_ptrace_wait, inf_ptrace_xfer_partial)
8579 (inf_ptrace_thread_alive, inf_ptrace_files_info)
8580 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8581 methods of inf_ptrace_target.
8582 (inf_ptrace_target): Delete function.
8583 * inf-ptrace.h: Include "inf-child.h".
8584 (inf_ptrace_target): Delete function declaration.
8585 (inf_ptrace_target): New class.
8586 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8587 * linux-nat.c (linux_target): New.
8588 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8589 (linux_nat_target::~linux_nat_target): New.
8590 (linux_child_post_attach, linux_child_post_startup_inferior)
8591 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8592 (linux_child_remove_fork_catchpoint)
8593 (linux_child_insert_vfork_catchpoint)
8594 (linux_child_remove_vfork_catchpoint)
8595 (linux_child_insert_exec_catchpoint)
8596 (linux_child_remove_exec_catchpoint)
8597 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8598 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8599 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8600 (linux_nat_stopped_data_address)
8601 (linux_nat_stopped_by_sw_breakpoint)
8602 (linux_nat_supports_stopped_by_sw_breakpoint)
8603 (linux_nat_stopped_by_hw_breakpoint)
8604 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8605 (linux_nat_kill, linux_nat_mourn_inferior)
8606 (linux_nat_xfer_partial, linux_nat_thread_alive)
8607 (linux_nat_update_thread_list, linux_nat_pid_to_str)
8608 (linux_nat_thread_name, linux_child_pid_to_exec_file)
8609 (linux_child_static_tracepoint_markers_by_strid)
8610 (linux_nat_is_async_p, linux_nat_can_async_p)
8611 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8612 (linux_nat_supports_multi_process)
8613 (linux_nat_supports_disable_randomization, linux_nat_async)
8614 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8615 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8616 (linux_nat_fileio_open, linux_nat_fileio_readlink)
8617 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8618 methods of linux_nat_target.
8619 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8620 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8622 (check_stopped_by_watchpoint): Adjust.
8623 (linux_xfer_partial): Delete.
8624 (linux_target_install_ops, linux_target, linux_nat_add_target):
8626 (linux_nat_target::linux_nat_target): New.
8627 * linux-nat.h: Include "inf-ptrace.h".
8628 (linux_nat_target): New.
8629 (linux_target, linux_target_install_ops, linux_nat_add_target):
8630 Delete function declarations.
8631 (linux_target): Declare global.
8632 * linux-thread-db.c (thread_db_target): New.
8633 (thread_db_target::thread_db_target): New.
8634 (thread_db_ops): Delete.
8635 (the_thread_db_target): New.
8636 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8637 (thread_db_update_thread_list, thread_db_pid_to_str)
8638 (thread_db_extra_thread_info)
8639 (thread_db_thread_handle_to_thread_info)
8640 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8641 (thread_db_resume): Refactor as methods of thread_db_target.
8642 (init_thread_db_ops): Delete.
8643 (_initialize_thread_db): Remove reference to init_thread_db_ops.
8644 * x86-linux-nat.c: Don't include "linux-nat.h".
8645 (super_post_startup_inferior): Delete.
8646 (x86_linux_nat_target::~x86_linux_nat_target): New.
8647 (x86_linux_child_post_startup_inferior)
8648 (x86_linux_read_description, x86_linux_enable_btrace)
8649 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8650 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8651 methods of x86_linux_nat_target.
8652 (x86_linux_create_target): Delete. Bits folded ...
8653 (x86_linux_add_target): ... here. Now takes a linux_nat_target
8655 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8656 (x86_linux_nat_target): New class.
8657 (x86_linux_create_target): Delete.
8658 (x86_linux_add_target): Now takes a linux_nat_target pointer.
8659 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8660 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8661 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8662 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8663 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8665 (x86_use_watchpoints): Delete.
8666 * x86-nat.h: Include "breakpoint.h" and "target.h".
8667 (x86_use_watchpoints): Delete.
8668 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8669 (x86_stopped_by_watchpoint, x86_stopped_data_address)
8670 (x86_insert_watchpoint, x86_remove_watchpoint)
8671 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8672 (x86_stopped_by_hw_breakpoint): New declarations.
8673 (x86_nat_target): New template class.
8675 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8676 (the_ppc_linux_nat_target): New.
8677 (ppc_linux_fetch_inferior_registers)
8678 (ppc_linux_can_use_hw_breakpoint)
8679 (ppc_linux_region_ok_for_hw_watchpoint)
8680 (ppc_linux_ranged_break_num_registers)
8681 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8682 (ppc_linux_insert_mask_watchpoint)
8683 (ppc_linux_remove_mask_watchpoint)
8684 (ppc_linux_can_accel_watchpoint_condition)
8685 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8686 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8687 (ppc_linux_watchpoint_addr_within_range)
8688 (ppc_linux_masked_watch_num_registers)
8689 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8690 (ppc_linux_read_description): Refactor as methods of
8691 ppc_linux_nat_target.
8692 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
8694 * procfs.c (procfs_xfer_partial): Delete forward declaration.
8695 (procfs_target): New class.
8696 (the_procfs_target): New.
8697 (procfs_target): Delete function.
8698 (procfs_auxv_parse, procfs_attach, procfs_detach)
8699 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8700 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8701 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8702 (procfs_create_inferior, procfs_update_thread_list)
8703 (procfs_thread_alive, procfs_pid_to_str)
8704 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8705 (procfs_stopped_data_address, procfs_insert_watchpoint)
8706 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8707 (proc_find_memory_regions, procfs_info_proc)
8708 (procfs_make_note_section): Refactor as methods of procfs_target.
8709 (_initialize_procfs): Adjust.
8710 * sol-thread.c (sol_thread_target): New class.
8711 (sol_thread_ops): Now a sol_thread_target.
8712 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8713 (sol_thread_fetch_registers, sol_thread_store_registers)
8714 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8715 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8716 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8717 (init_sol_thread_ops): Delete.
8718 (_initialize_sol_thread): Adjust. Remove references to
8719 init_sol_thread_ops and complete_target_initialization.
8721 * windows-nat.c (windows_nat_target): New class.
8722 (windows_fetch_inferior_registers)
8723 (windows_store_inferior_registers, windows_resume, windows_wait)
8724 (windows_attach, windows_detach, windows_pid_to_exec_file)
8725 (windows_files_info, windows_create_inferior)
8726 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8727 (windows_close, windows_pid_to_str, windows_xfer_partial)
8728 (windows_get_tib_address, windows_get_ada_task_ptid)
8729 (windows_thread_name, windows_thread_alive): Refactor as
8730 windows_nat_target methods.
8731 (do_initial_windows_stuff): Adjust.
8732 (windows_target): Delete function.
8733 (_initialize_windows_nat): Adjust.
8735 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8736 (darwin_mourn_inferior, darwin_kill_inferior)
8737 (darwin_create_inferior, darwin_attach, darwin_detach)
8738 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8739 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8740 (darwin_supports_multi_process): Refactor as darwin_nat_target
8742 (darwin_resume_to, darwin_files_info): Delete.
8743 (_initialize_darwin_inferior): Rename to ...
8744 (_initialize_darwin_nat): ... this. Adjust to C++ification.
8745 * darwin-nat.h: Include "inf-child.h".
8746 (darwin_nat_target): New class.
8747 (darwin_complete_target): Delete.
8748 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8749 (darwin_target): New.
8750 (i386_darwin_fetch_inferior_registers)
8751 (i386_darwin_store_inferior_registers): Refactor as methods of
8753 (darwin_complete_target): Delete, with ...
8754 (_initialize_i386_darwin_nat): ... bits factored out here.
8756 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8757 (the_alpha_linux_nat_target): New.
8758 (alpha_linux_register_u_offset): Refactor as
8759 alpha_linux_nat_target method.
8760 (_initialize_alpha_linux_nat): Adjust.
8761 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8762 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8763 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8764 methods of linux_nat_trad_target.
8765 (linux_trad_target): Delete.
8766 * linux-nat-trad.h (linux_trad_target): Delete function.
8767 (linux_nat_trad_target): New class.
8768 * mips-linux-nat.c (mips_linux_nat_target): New class.
8769 (super_fetch_registers, super_store_registers, super_close):
8771 (the_mips_linux_nat_target): New.
8772 (mips64_linux_regsets_fetch_registers)
8773 (mips64_linux_regsets_store_registers)
8774 (mips64_linux_fetch_registers, mips64_linux_store_registers)
8775 (mips_linux_register_u_offset, mips_linux_read_description)
8776 (mips_linux_can_use_hw_breakpoint)
8777 (mips_linux_stopped_by_watchpoint)
8778 (mips_linux_stopped_data_address)
8779 (mips_linux_region_ok_for_hw_watchpoint)
8780 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8781 (mips_linux_close): Refactor as methods of mips_linux_nat.
8782 (_initialize_mips_linux_nat): Adjust to C++ification.
8784 * aix-thread.c (aix_thread_target): New class.
8785 (aix_thread_ops): Now an aix_thread_target.
8786 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8787 (aix_thread_fetch_registers, aix_thread_store_registers)
8788 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8789 (aix_thread_thread_alive, aix_thread_pid_to_str)
8790 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8791 Refactor as methods of aix_thread_target.
8792 (init_aix_thread_ops): Delete.
8793 (_initialize_aix_thread): Remove references to init_aix_thread_ops
8794 and complete_target_initialization.
8795 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8796 (rs6000_nat_target): New class.
8797 (the_rs6000_nat_target): New.
8798 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8799 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8800 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8801 (super_create_inferior): Delete.
8802 (_initialize_rs6000_nat): Adjust to C++ification.
8804 * arm-linux-nat.c (arm_linux_nat_target): New class.
8805 (the_arm_linux_nat_target): New.
8806 (arm_linux_fetch_inferior_registers)
8807 (arm_linux_store_inferior_registers, arm_linux_read_description)
8808 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8809 (arm_linux_remove_hw_breakpoint)
8810 (arm_linux_region_ok_for_hw_watchpoint)
8811 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8812 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8813 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8814 arm_linux_nat_target.
8815 (_initialize_arm_linux_nat): Adjust to C++ification.
8817 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8818 (the_aarch64_linux_nat_target): New.
8819 (aarch64_linux_fetch_inferior_registers)
8820 (aarch64_linux_store_inferior_registers)
8821 (aarch64_linux_child_post_startup_inferior)
8822 (aarch64_linux_read_description)
8823 (aarch64_linux_can_use_hw_breakpoint)
8824 (aarch64_linux_insert_hw_breakpoint)
8825 (aarch64_linux_remove_hw_breakpoint)
8826 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8827 (aarch64_linux_region_ok_for_hw_watchpoint)
8828 (aarch64_linux_stopped_data_address)
8829 (aarch64_linux_stopped_by_watchpoint)
8830 (aarch64_linux_watchpoint_addr_within_range)
8831 (aarch64_linux_can_do_single_step): Refactor as methods of
8832 aarch64_linux_nat_target.
8833 (super_post_startup_inferior): Delete.
8834 (_initialize_aarch64_linux_nat): Adjust to C++ification.
8836 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8837 (the_hppa_linux_nat_target): New.
8838 (hppa_linux_fetch_inferior_registers)
8839 (hppa_linux_store_inferior_registers): Refactor as methods of
8840 hppa_linux_nat_target.
8841 (_initialize_hppa_linux_nat): Adjust to C++ification.
8843 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8844 (the_ia64_linux_nat_target): New.
8845 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8846 (ia64_linux_stopped_data_address)
8847 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8848 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8849 ia64_linux_nat_target methods.
8850 (super_xfer_partial): Delete.
8851 (_initialize_ia64_linux_nat): Adjust to C++ification.
8853 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8854 (the_m32r_linux_nat_target): New.
8855 (m32r_linux_fetch_inferior_registers)
8856 (m32r_linux_store_inferior_registers): Refactor as
8857 m32r_linux_nat_target methods.
8858 (_initialize_m32r_linux_nat): Adjust to C++ification.
8860 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8861 (the_m68k_linux_nat_target): New.
8862 (m68k_linux_fetch_inferior_registers)
8863 (m68k_linux_store_inferior_registers): Refactor as
8864 m68k_linux_nat_target methods.
8865 (_initialize_m68k_linux_nat): Adjust to C++ification.
8867 * s390-linux-nat.c (s390_linux_nat_target): New class.
8868 (the_s390_linux_nat_target): New.
8869 (s390_linux_fetch_inferior_registers)
8870 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8871 (s390_insert_watchpoint, s390_remove_watchpoint)
8872 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8873 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8874 (s390_auxv_parse, s390_read_description): Refactor as methods of
8875 s390_linux_nat_target.
8876 (_initialize_s390_nat): Adjust to C++ification.
8878 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8879 (the_sparc_linux_nat_target): New.
8880 (_initialize_sparc_linux_nat): Adjust to C++ification.
8881 * sparc-nat.c (sparc_fetch_inferior_registers)
8882 (sparc_store_inferior_registers): Remove target_ops parameter.
8883 * sparc-nat.h (sparc_fetch_inferior_registers)
8884 (sparc_store_inferior_registers): Remove target_ops parameter.
8885 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8886 (the_sparc64_linux_nat_target): New.
8887 (_initialize_sparc64_linux_nat): Adjust to C++ification.
8889 * spu-linux-nat.c (spu_linux_nat_target): New class.
8890 (the_spu_linux_nat_target): New.
8891 (spu_child_post_startup_inferior, spu_child_post_attach)
8892 (spu_child_wait, spu_fetch_inferior_registers)
8893 (spu_store_inferior_registers, spu_xfer_partial)
8894 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8896 (_initialize_spu_nat): Adjust to C++ification.
8898 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8899 (the_tilegx_linux_nat_target): New.
8900 (fetch_inferior_registers, store_inferior_registers):
8901 Refactor as methods.
8902 (_initialize_tile_linux_nat): Adjust to C++ification.
8904 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8905 (the_xtensa_linux_nat_target): New.
8906 (xtensa_linux_fetch_inferior_registers)
8907 (xtensa_linux_store_inferior_registers): Refactor as
8908 xtensa_linux_nat_target methods.
8909 (_initialize_xtensa_linux_nat): Adjust to C++ification.
8911 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8912 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8913 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8914 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8915 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8916 (fbsd_stopped_by_sw_breakpoint)
8917 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8918 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8919 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8920 (fbsd_post_startup_inferior, fbsd_post_attach)
8921 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8922 (fbsd_set_syscall_catchpoint)
8923 (super_xfer_partial, super_resume, super_wait)
8924 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8925 (fbsd_handle_debug_trap): Remove target_ops parameter.
8926 (fbsd_nat_add_target): Delete.
8927 * fbsd-nat.h: Include "inf-ptrace.h".
8928 (fbsd_nat_add_target): Delete.
8929 (USE_SIGTRAP_SIGINFO): Define.
8930 (fbsd_nat_target): New class.
8932 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8933 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8934 (amd64bsd_target): Delete.
8935 * amd64-bsd-nat.h: New file.
8936 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8938 (amd64_fbsd_nat_target): New class.
8939 (the_amd64_fbsd_nat_target): New.
8940 (amd64fbsd_read_description): Refactor as method of
8941 amd64_fbsd_nat_target.
8942 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8943 (_initialize_amd64fbsd_nat): Adjust to C++ification.
8944 * amd64-nat.h (amd64bsd_target): Delete function declaration.
8945 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8946 (i386bsd_store_inferior_registers): Remove target_ops parameter.
8947 (i386bsd_target): Delete.
8948 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8949 (i386bsd_fetch_inferior_registers)
8950 (i386bsd_store_inferior_registers): Declare.
8951 (i386_bsd_nat_target): New class.
8952 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8953 (the_i386_fbsd_nat_target): New.
8954 (i386fbsd_resume, i386fbsd_read_description): Refactor as
8955 i386_fbsd_nat_target methods.
8956 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8957 (_initialize_i386fbsd_nat): Adjust to C++ification.
8958 * x86-bsd-nat.c (super_mourn_inferior): Delete.
8959 (x86bsd_mourn_inferior, x86bsd_target): Delete.
8960 (_initialize_x86_bsd_nat): Adjust to C++ification.
8961 * x86-bsd-nat.h: Include "x86-nat.h".
8962 (x86bsd_target): Delete declaration.
8963 (x86bsd_nat_target): New class.
8965 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8966 (the_aarch64_fbsd_nat_target): New.
8967 (aarch64_fbsd_fetch_inferior_registers)
8968 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8969 aarch64_fbsd_nat_target.
8970 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8971 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8972 (the_alpha_bsd_nat_target): New.
8973 (alphabsd_fetch_inferior_registers)
8974 (alphabsd_store_inferior_registers): Refactor as
8975 alpha_bsd_nat_target methods.
8976 (_initialize_alphabsd_nat): Refactor as methods of
8977 alpha_bsd_nat_target.
8978 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8979 (the_amd64_nbsd_nat_target): New.
8980 (_initialize_amd64nbsd_nat): Adjust to C++ification.
8981 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8982 (the_amd64_obsd_nat_target): New.
8983 (_initialize_amd64obsd_nat): Adjust to C++ification.
8984 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8985 (the_arm_fbsd_nat_target): New.
8986 (arm_fbsd_fetch_inferior_registers)
8987 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8988 (_initialize_arm_fbsd_nat): Refactor as methods of
8989 arm_fbsd_nat_target.
8990 (_initialize_arm_fbsd_nat): Adjust to C++ification.
8991 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8992 (the_arm_netbsd_nat_target): New.
8993 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8994 arm_netbsd_nat_target.
8995 (_initialize_arm_netbsd_nat): Adjust to C++ification.
8996 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8997 (the_hppa_nbsd_nat_target): New.
8998 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8999 hppa_nbsd_nat_target methods.
9000 (_initialize_hppanbsd_nat): Adjust to C++ification.
9001 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9002 (the_hppa_obsd_nat_target): New.
9003 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9004 methods of hppa_obsd_nat_target.
9005 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
9007 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9008 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
9010 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9011 (_initialize_i386obsd_nat): Use add_target.
9012 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9013 (the_m68k_bsd_nat_target): New.
9014 (m68kbsd_fetch_inferior_registers)
9015 (m68kbsd_store_inferior_registers): Refactor as methods of
9016 m68k_bsd_nat_target.
9017 (_initialize_m68kbsd_nat): Adjust to C++ification.
9018 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9019 (the_mips_fbsd_nat_target): New.
9020 (mips_fbsd_fetch_inferior_registers)
9021 (mips_fbsd_store_inferior_registers): Refactor as methods of
9022 mips_fbsd_nat_target.
9023 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
9025 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9026 (the_mips_nbsd_nat_target): New.
9027 (mipsnbsd_fetch_inferior_registers)
9028 (mipsnbsd_store_inferior_registers): Refactor as methods of
9029 mips_nbsd_nat_target.
9030 (_initialize_mipsnbsd_nat): Adjust to C++ification.
9031 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9032 (the_mips64_obsd_nat_target): New.
9033 (mips64obsd_fetch_inferior_registers)
9034 (mips64obsd_store_inferior_registers): Refactor as methods of
9035 mips64_obsd_nat_target.
9036 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
9038 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9040 * nbsd-nat.h: Include "inf-ptrace.h".
9041 (nbsd_nat_target): New class.
9042 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9043 (obsd_wait): Refactor as methods of obsd_nat_target.
9044 (obsd_add_target): Delete.
9045 * obsd-nat.h: Include "inf-ptrace.h".
9046 (obsd_nat_target): New class.
9047 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9048 (the_ppc_fbsd_nat_target): New.
9049 (ppcfbsd_fetch_inferior_registers)
9050 (ppcfbsd_store_inferior_registers): Refactor as methods of
9051 ppc_fbsd_nat_target.
9052 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
9054 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9055 (the_ppc_nbsd_nat_target): New.
9056 (ppcnbsd_fetch_inferior_registers)
9057 (ppcnbsd_store_inferior_registers): Refactor as methods of
9058 ppc_nbsd_nat_target.
9059 (_initialize_ppcnbsd_nat): Adjust to C++ification.
9060 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9061 (the_ppc_obsd_nat_target): New.
9062 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9063 methods of ppc_obsd_nat_target.
9064 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
9066 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9067 (the_sh_nbsd_nat_target): New.
9068 (shnbsd_fetch_inferior_registers)
9069 (shnbsd_store_inferior_registers): Refactor as methods of
9071 (_initialize_shnbsd_nat): Adjust to C++ification.
9072 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9073 (inf_ptrace_xfer_partial): Delete.
9074 (sparc_xfer_partial, sparc_target): Delete.
9075 * sparc-nat.h (sparc_fetch_inferior_registers)
9076 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9077 (sparc_target): Delete function declaration.
9078 (sparc_target): New template class.
9079 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9080 (_initialize_sparcnbsd_nat): Adjust to C++ification.
9081 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9082 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
9084 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9085 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9086 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9087 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
9089 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9090 (the_vax_bsd_nat_target): New.
9091 (vaxbsd_fetch_inferior_registers)
9092 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9094 (_initialize_vaxbsd_nat): Adjust to C++ification.
9096 * bsd-kvm.c (bsd_kvm_target): New class.
9097 (bsd_kvm_ops): Now a bsd_kvm_target.
9098 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9099 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9100 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9102 (bsd_kvm_return_one): Delete.
9103 (bsd_kvm_add_target): Adjust to C++ification.
9105 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9106 (nto_procfs_target_procfs): New classes.
9107 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9108 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9109 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9110 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9111 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9112 (procfs_remove_hw_breakpoint, procfs_resume)
9113 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9114 (procfs_kill_inferior, procfs_store_registers)
9115 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9116 as methods of nto_procfs_target.
9117 (nto_procfs_ops): Now an nto_procfs_target_procfs.
9118 (nto_native_ops): Delete.
9119 (procfs_open, procfs_native_open): Delete.
9120 (nto_native_ops): Now an nto_procfs_target_native.
9121 (init_procfs_targets): Adjust to C++ification.
9122 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9123 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9124 Refactor as methods of nto_procfs_target.
9126 * go32-nat.c (go32_nat_target): New class.
9127 (the_go32_nat_target): New.
9128 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9129 (go32_store_registers, go32_xfer_partial, go32_files_info)
9130 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9131 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9132 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9133 (go32_pid_to_str): Refactor as methods of go32_nat_target.
9134 (go32_target): Delete.
9135 (_initialize_go32_nat): Adjust to C++ification.
9137 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9138 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9139 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9140 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9142 (gnu_target): Delete.
9143 * gnu-nat.h (gnu_target): Delete.
9144 (gnu_nat_target): New class.
9145 * i386-gnu-nat.c (gnu_base_target): New.
9146 (i386_gnu_nat_target): New class.
9147 (the_i386_gnu_nat_target): New.
9148 (_initialize_i386gnu_nat): Adjust to C++ification.
9150 2018-05-02 Pedro Alves <palves@redhat.com>
9152 * bfd-target.c (target_bfd_xclose): Rename to ...
9153 (target_bfd_close): ... this.
9154 (target_bfd_reopen): Adjust.
9155 * target.c (target_close): Remove references to to_xclose.
9156 * target.h (target_ops::to_xclose): Delete.
9157 (target_ops::to_close): Update comments.
9159 2018-05-02 Pedro Alves <palves@redhat.com>
9161 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9163 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9164 * inf-ptrace.c (inf_ptrace_register_u_offset)
9165 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9166 (inf_ptrace_store_register, inf_ptrace_store_registers)
9167 (inf_ptrace_trad_target): Move to ...
9168 * linux-nat-trad.c: ... this new file.
9169 * linux-nat-trad.h: New file.
9170 * linux-nat.c (linux_target_install_ops): Make extern.
9171 (linux_trad_target): Delete.
9172 * linux-nat.h (linux_trad_target): Delete declaration.
9173 (linux_target_install_ops): Declare.
9174 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9177 2018-05-02 Pedro Alves <palves@redhat.com>
9179 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9180 procfs_target/add_target here.
9181 * procfs.c (procfs_target): Make static.
9182 (_initialize_procfs): Call add_target here.
9183 * procfs.h (struct target_ops): Remove forward declaration.
9184 (procfs_target): Remove declaration.
9185 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9187 2018-05-02 Pedro Alves <palves@redhat.com>
9189 * procfs.c (procfs_stopped_by_watchpoint)
9190 (procfs_insert_watchpoint, procfs_remove_watchpoint)
9191 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9193 (procfs_use_watchpoints): Delete, move contents...
9194 (procfs_target): ... here.
9195 * procfs.h (procfs_use_watchpoints): Delete declaration.
9196 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9197 procfs_use_watchpoints.
9198 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9199 procfs_use_watchpoints.
9201 2018-05-02 Tom Tromey <tom@tromey.com>
9204 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9205 and var_zuinteger_unlimited.
9206 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9207 and PARAM_ZUINTEGER_UNLIMITED.
9208 (set_parameter_value): Handle var_zuinteger and
9209 var_zuinteger_unlimited.
9210 (add_setshow_generic): Likewise.
9211 (parmpy_init): Likewise.
9213 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
9216 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9217 pointer is not null before dereferencing it.
9219 2018-04-30 Tom Tromey <tom@tromey.com>
9221 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9224 2018-04-30 Tom Tromey <tom@tromey.com>
9226 * breakpoint.c (mention): Remove use of is_mi_like_p.
9227 (print_mention_ranged_breakpoint): Likewise.
9228 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9231 2018-04-30 Tom Tromey <tom@tromey.com>
9233 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9235 2018-04-30 Tom Tromey <tom@tromey.com>
9237 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9238 (info_spu_event_command): Remove some uses of is_mi_like_p.
9240 2018-04-30 Tom Tromey <tom@tromey.com>
9242 * python/py-framefilter.c (py_print_single_arg)
9243 (enumerate_locals, py_print_args, py_print_frame): Remove some
9244 uses of is_mi_like_p.
9246 2018-04-30 Tom Tromey <tom@tromey.com>
9249 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9250 * ui-out.h (ui_out::is_mi_like_p): Now const.
9251 (ui_out::do_is_mi_like_p): Now const.
9252 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9254 2018-04-30 Tom Tromey <tom@tromey.com>
9256 * varobj.c (varobj_set_visualizer): Use new_reference.
9257 * python/python.c (gdbpy_decode_line): Use new_reference.
9258 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9261 2018-04-30 Tom Tromey <tom@tromey.com>
9263 * varobj.c (install_new_value): Use new_reference.
9264 * value.h (value_incref): Return void. Swap intro comment with
9266 * value.c (set_value_parent): Use new_reference.
9267 (value_incref): Return void. Update intro comment.
9268 (release_value): Use new_reference.
9269 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9271 2018-04-30 Tom Tromey <tom@tromey.com>
9273 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9274 * gdb_bfd.h (new_bfd_ref): Remove.
9275 (gdb_bfd_open): Update comment.
9276 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9277 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9278 (gdb_bfd_fdopenr): Use new_reference.
9279 * exec.c (exec_file_attach): Use new_reference.
9281 2018-04-30 Tom Tromey <tom@tromey.com>
9283 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9286 2018-04-30 Tom Tromey <tom@tromey.com>
9288 * jit.c (jit_read_code_entry): Use type_align.
9289 * i386-tdep.c (i386_gdbarch_init): Don't call
9290 set_gdbarch_long_long_align_bit.
9291 * gdbarch.sh: Remove long_long_align_bit.
9292 * gdbarch.c, gdbarch.h: Rebuild.
9293 * arc-tdep.c (arc_type_align): New function.
9294 (arc_gdbarch_init): Use arc_type_align. Don't call
9295 set_gdbarch_long_long_align_bit.
9297 2018-04-30 Tom Tromey <tom@tromey.com>
9299 * rust-lang.c (rust_type_alignment): Remove.
9300 (rust_composite_type): Use type_align.
9302 2018-04-30 Tom Tromey <tom@tromey.com>
9304 * NEWS: Mention Type.align.
9305 * python/py-type.c (typy_get_alignof): New function.
9306 (type_object_getset): Add "alignof".
9308 2018-04-30 Tom Tromey <tom@tromey.com>
9312 * std-operator.def (UNOP_ALIGNOF): New operator.
9313 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9315 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9316 * c-lang.c (c_op_print_tab): Add alignof.
9317 * c-exp.y (ALIGNOF): New token.
9318 (exp): Add "ALIGNOF" production.
9319 (ident_tokens): Add _Alignof and alignof.
9321 2018-04-30 Tom Tromey <tom@tromey.com>
9323 * i386-tdep.c (i386_type_align): New function.
9324 (i386_gdbarch_init): Update.
9325 * gdbarch.sh (type_align): New method.
9326 * gdbarch.c, gdbarch.h: Rebuild.
9327 * arch-utils.h (default_type_align): Declare.
9328 * arch-utils.c (default_type_align): New function.
9329 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9330 (struct type) <align_log2>: New field.
9331 <instance_flags>: Now a bitfield.
9332 (TYPE_RAW_ALIGN): New macro.
9333 (type_align, type_raw_align, set_type_align): Declare.
9334 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9336 * dwarf2read.c (quirk_rust_enum): Set type alignment.
9337 (get_alignment, maybe_set_alignment): New functions.
9338 (read_structure_type, read_enumeration_type, read_array_type)
9339 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9340 (read_subrange_type, read_base_type): Set type alignment.
9342 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
9344 * dwarf2read.c (read_index_from_section): Use bool.
9346 2018-04-29 Fabian Groffen <grobian@gentoo.org>
9349 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9352 2018-04-29 John Reiser <jreiser@BitWagon.com>
9355 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9356 last step, and do it atomically.
9358 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
9360 * compile/compile-c-types.c (convert_int, convert_float):
9363 2018-04-27 Tom Tromey <tom@tromey.com>
9366 * rust-lang.c (rust_inclusive_range_type_p): New function.
9367 (rust_range): Handle inclusive ranges.
9368 (rust_compute_range): Likewise.
9369 * rust-exp.y (struct rust_op) <inclusive>: New field.
9370 (DOTDOTEQ): New constant.
9371 (range_expr): Add "..=" productions.
9372 (operator_tokens): Add "..=" token.
9373 (ast_range): Add "inclusive" parameter.
9374 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9376 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9378 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9379 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9381 * expprint.c (print_subexp_standard): Handle new bounds values.
9382 (dump_subexp_body_standard): Likewise.
9384 2018-04-27 Tom Tromey <tom@tromey.com>
9386 * configure: Rebuild.
9387 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9388 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9390 (class symbol_needs_eval_context): Likewise.
9391 * dwarf2read.c (mock_mapped_index::symbol_name_count)
9392 (mock_mapped_index::symbol_name_at): Use "override". Remove
9394 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9396 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9397 * aarch64-tdep.c (instruction_reader::read): Use "override".
9398 (instruction_reader_test::read): Likewise.
9399 * arm-tdep.c (instruction_reader::read): Use "override".
9400 (instruction_reader_thumb::read): Likewise.
9402 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
9405 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9406 instead of remote_send.
9407 (remote_send): Remove.
9409 2018-04-26 Pedro Alves <palves@redhat.com>
9411 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9412 find_function_start_sal instead of find_pc_line.
9414 2018-04-26 Pedro Alves <palves@redhat.com>
9416 * breakpoint.c (set_breakpoint_location_function): Handle
9418 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9419 * elfread.c (elf_symtab_read): Give data symbols with
9420 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9421 (elf_rel_plt_read): Update comment.
9422 * linespec.c (convert_linespec_to_sals): Handle
9424 (minsym_found): Handle mst_data_gnu_ifunc.
9425 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9426 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9427 * parse.c (find_minsym_type_and_address): Handle
9429 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9430 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9431 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9433 <mst_data_gnu_ifunc>: New enumerator.
9435 2018-04-26 Pedro Alves <palves@redhat.com>
9437 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9438 (lookup_minimal_symbol_by_pc_section): ... this. Replace
9439 'want_trampoline' parameter by a lookup_msym_prefer parameter.
9441 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9442 (lookup_minimal_symbol_by_pc): Adjust.
9443 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9444 (lookup_solib_trampoline_symbol_by_pc): Adjust.
9445 * minsyms.h (lookup_msym_prefer): New enum.
9446 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9447 parameter by a lookup_msym_prefer parameter.
9449 2018-04-26 Pedro Alves <palves@redhat.com>
9451 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9452 ends in "@plt" instead of looking at the symbol's section.
9454 2018-04-26 Pedro Alves <palves@redhat.com>
9456 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
9458 (find_pc_partial_function_gnu_ifunc): Rename to ...
9459 (find_pc_partial_function): ... this, and remove references to
9461 (find_pc_partial_function): Delete old implementation.
9462 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9464 2018-04-26 Pedro Alves <palves@redhat.com>
9466 * linespec.c (struct bound_minimal_symbol_search_key): New.
9467 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
9468 skip first line if we found a GNU ifunc minimal symbol by name.
9469 (compare_msymbols): Change parameters to work with a destructured
9471 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9474 2018-04-26 Pedro Alves <palves@redhat.com>
9476 * breakpoint.c (set_breakpoint_location_function): Don't resolve
9477 ifunc targets here. Instead, if we have an ifunc minsym, use its
9479 (add_location_to_breakpoint): Store the minsym and the objfile in
9480 the breakpoint location.
9481 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9482 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9483 Record the minsym in the sal.
9484 * symtab.h (symtab_and_line) <msymbol>: New field.
9486 2018-04-26 Pedro Alves <palves@redhat.com>
9488 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9489 unless we actually resolved the ifunc.
9491 2018-04-26 Pedro Alves <palves@redhat.com>
9493 * c-exp.y (variable production): Prefer ifunc minsyms over
9494 regular function symbols.
9495 * symtab.c (find_gnu_ifunc): New function.
9496 * minsyms.h (lookup_msym_prefer): New enum.
9497 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9498 parameter by a lookup_msym_prefer parameter.
9499 * symtab.h (find_gnu_ifunc): New declaration.
9501 2018-04-26 Pedro Alves <palves@redhat.com>
9503 * blockframe.c (find_gnu_ifunc_target_type): New function.
9504 (find_function_type): New.
9505 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9506 return a value with a memory address.
9507 (eval_call): For calls to GNU ifunc functions, try to find the
9508 type of the target function from the type that the resolver
9510 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9512 * infcall.c (find_function_return_type): Delete.
9513 (find_function_addr): Add 'function_type' parameter. For calls to
9514 GNU ifunc functions, try to find the type of the target function
9515 from the type that the resolver returns, and return it via
9517 (call_function_by_hand_dummy): Adjust to use the function type
9518 returned by find_function_addr.
9519 (find_function_addr): Add 'function_type' parameter and move
9521 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9524 2018-04-26 Pedro Alves <palves@redhat.com>
9526 * c-exp.y (variable production): Skip finding an alias for ifunc
9529 2018-04-26 Pedro Alves <palves@redhat.com>
9531 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9533 2018-04-25 Pedro Alves <palves@redhat.com>
9535 * infcmd.c (kill_command): Print the pid as string, not the whole
9536 thread's ptid. Add comment. s/has been killed/killed/ in output
9538 * remote.c (remote_detach_1): Print the pid as string, not the
9539 whole thread's ptid.
9541 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9542 Sergio Durigan Junior <sergiodj@redhat.com>
9543 Pedro Alves <palves@redhat.com>
9545 * infcmd.c (kill_command): Print message when inferior has
9547 * inferior.c (print_inferior_events): Remove 'static'. Set as
9549 (add_inferior): Improve message printed when
9550 'print_inferior_events' is on.
9551 (exit_inferior): Remove message printed when
9552 'print_inferior_events' is on.
9553 (detach_inferior): Improve message printed when
9554 'print_inferior_events' is on.
9555 (initialize_inferiors): Use 'add_inferior_silent' to set
9556 'current_inferior_'.
9557 * inferior.h (print_inferior_events): Declare here as
9559 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9560 '[Detaching...]' messages when 'print_inferior_events' is on.
9561 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
9562 as prefix/suffix for messages. Remove periods. Fix erroneous
9563 'Detaching after fork from child...', replace it by '... from
9565 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9566 prefix/suffix when printing 'Detaching...' messages. Print
9567 them when 'print_inferior_events' is on.
9568 * remote.c (remote_detach_1): Print message when detaching
9569 from inferior and '!is_fork_parent'.
9571 2018-04-24 Tom Tromey <tom@tromey.com>
9573 * cli-out.h: Reindent.
9575 2018-04-24 Tom Tromey <tom@tromey.com>
9577 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9578 (cli_ui_out::do_field_string): Use fputs_filtered.
9579 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9581 2018-04-23 Tom Tromey <tom@tromey.com>
9583 * guile/scm-frame.c (gdbscm_frame_read_var): Use
9584 gdb::unique_xmalloc_ptr.
9586 2018-04-23 Tom Tromey <tom@tromey.com>
9588 * configure: Rebuild.
9590 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
9593 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9594 prepare_for_testing. Set normal_bp to r_debug_state if target
9597 2018-04-21 Pedro Alves <palves@redhat.com>
9598 Rajendra SY <rajendra.sy@gmail.com>
9600 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9601 * remote.c (extended_remote_attach): In all-stop mode, mark the
9602 thread as executing.
9604 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9606 * thread.c (thread_apply_all_command): Fix comment.
9607 (thread_command): Fix comment.
9609 2018-04-10 Alan Hayward <alan.hayward@arm.com>
9611 * common/tdesc.h (tdesc_create_feature): Remove xml filename
9613 * features/aarch64-core.c (create_feature_aarch64_core):
9615 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9617 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9619 * features/i386/32bit-avx512.c
9620 (create_feature_i386_32bit_avx512): Likewise.
9621 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9623 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9625 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9627 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9629 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9631 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9633 * features/i386/64bit-avx512.c
9634 (create_feature_i386_64bit_avx512): Likewise.
9635 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9637 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9639 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9641 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9643 * features/i386/64bit-segments.c
9644 (create_feature_i386_64bit_segments): Likewise.
9645 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9647 * features/i386/x32-core.c
9648 (create_feature_i386_x32_core): Likewise.
9649 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9650 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9651 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9652 * target-descriptions.c: In generated code, don't pass xml
9655 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9657 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9658 (print_xml_feature::visit_post): Likewise.
9659 (print_xml_feature::visit): Likewise.
9660 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9661 (print_xml_feature): Add new class.
9662 * regformats/regdat.sh: Null xmltarget on feature targets.
9663 * target-descriptions.c (struct target_desc): Add xmltarget.
9664 (maintenance_check_tdesc_xml_convert): Add unittest function.
9665 (tdesc_get_features_xml): Add function to get xml.
9666 (maintenance_check_xml_descriptions): Test xml generation.
9667 * xml-tdesc.c (string_read_description_xml): Add function.
9668 * xml-tdesc.h (string_read_description_xml): Add declaration.
9670 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9672 * features/Makefile: Add feature marker to targets with new style
9673 target descriptions.
9674 * regformats/aarch64.dat: Regenerate.
9675 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9676 * regformats/i386/amd64-avx-linux.dat: Likewise.
9677 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9678 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9679 * regformats/i386/amd64-linux.dat: Likewise.
9680 * regformats/i386/amd64-mpx-linux.dat: Likewise.
9681 * regformats/i386/amd64.dat: Likewise.
9682 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9683 * regformats/i386/i386-avx-linux.dat: Likewise.
9684 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9685 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9686 * regformats/i386/i386-linux.dat: Likewise.
9687 * regformats/i386/i386-mmx-linux.dat: Likewise.
9688 * regformats/i386/i386-mpx-linux.dat: Likewise.
9689 * regformats/i386/i386.dat: Likewise.
9690 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9691 * regformats/i386/x32-avx-linux.dat: Likewise.
9692 * regformats/i386/x32-linux.dat: Likewise.
9693 * regformats/tic6x-c62x-linux.dat: Likewise.
9694 * regformats/tic6x-c64x-linux.dat: Likewise.
9695 * regformats/tic6x-c64xp-linux.dat: Likewise.
9696 * regformats/regdat.sh: Parse feature marker.
9698 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9700 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9701 (tdesc_osabi_name): Likewise.
9702 * target-descriptions.c (tdesc_architecture_name): Add new
9704 (tdesc_osabi_name): Likewise.
9706 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9708 * common/tdesc.c (tdesc_predefined_type): Move to here.
9709 (tdesc_named_type): Likewise.
9710 (tdesc_create_vector): Likewise.
9711 (tdesc_create_struct): Likewise.
9712 (tdesc_set_struct_size): Likewise.
9713 (tdesc_create_union): Likewise.
9714 (tdesc_create_flags): Likewise.
9715 (tdesc_create_enum): Likewise.
9716 (tdesc_add_field): Likewise.
9717 (tdesc_add_typed_bitfield): Likewise.
9718 (tdesc_add_bitfield): Likewise.
9719 (tdesc_add_flag): Likewise.
9720 (tdesc_add_enum_value): Likewise.
9721 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9722 (struct tdesc_type_vector): Likewise.
9723 (struct tdesc_type_field): Likewise.
9724 (struct tdesc_type_with_fields): Likewise.
9725 (tdesc_create_enum): Add declaration.
9726 (tdesc_add_typed_bitfield): Likewise.
9727 (tdesc_add_enum_value): Likewise.
9728 * target-descriptions.c (tdesc_type_field): Move from here.
9729 (tdesc_type_builtin): Likewise.
9730 (tdesc_type_vector): Likewise.
9731 (tdesc_type_with_fields): Likewise.
9732 (tdesc_predefined_types): Likewise.
9733 (tdesc_named_type): Likewise.
9734 (tdesc_create_vector): Likewise.
9735 (tdesc_create_struct): Likewise.
9736 (tdesc_set_struct_size): Likewise.
9737 (tdesc_create_union): Likewise.
9738 (tdesc_create_flags): Likewise.
9739 (tdesc_create_enum): Likewise.
9740 (tdesc_add_field): Likewise.
9741 (tdesc_add_typed_bitfield): Likewise.
9742 (tdesc_add_bitfield): Likewise.
9743 (tdesc_add_flag): Likewise.
9744 (tdesc_add_enum_value): Likewise.
9745 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9746 (tdesc_add_typed_bitfield): Likewise.
9747 (tdesc_add_enum_value): Likewise.
9749 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9751 * common/tdesc.c (tdesc_feature::accept): Move to here.
9752 (tdesc_feature::operator==): Likewise.
9753 (tdesc_create_reg): Likewise.
9754 * common/tdesc.h (tdesc_type_kind): Likewise.
9755 (struct tdesc_type): Likewise.
9756 (struct tdesc_feature): Likewise.
9757 * regformats/regdat.sh: Create a feature.
9758 * target-descriptions.c (tdesc_type_kind): Move from here.
9759 (tdesc_type): Likewise.
9760 (tdesc_type_up): Likewise.
9761 (tdesc_feature): Likewise.
9762 (tdesc_create_reg): Likewise.
9764 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9766 * Makefile.in: Add arch/tdesc.c
9767 * common/tdesc.c: New file.
9768 * common/tdesc.h (tdesc_element_visitor): Move to here.
9769 (tdesc_element): Likewise.
9770 (tdesc_reg): Likewise.
9771 (tdesc_reg_up): Likewise.
9772 * regformats/regdef.h (reg): Add offset to constructors.
9773 * target-descriptions.c (tdesc_element_visitor): Move from here.
9774 (tdesc_element): Likewise.
9775 (tdesc_reg): Likewise.
9776 (tdesc_reg_up): Likewise.
9778 2018-04-17 Tom Tromey <tom@tromey.com>
9780 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9783 2018-04-17 Tom Tromey <tom@tromey.com>
9785 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9787 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
9789 * symtab.c (print_symbol_info): Skip printing filename and line
9790 number when `last' is NULL.
9791 (symtab_symbol_info): Use empty string instead of NULL for first
9792 invocation of print_symbol_info.
9793 (rbreak_command): Pass NULL to `last' parameter of
9796 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
9798 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9801 2018-04-16 Pedro Alves <palves@redhat.com>
9803 * MAINTAINERS (sh): Remove.
9804 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9805 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9806 (ALLDEPFILES): Remove sh64-tdep.c.
9807 * NEWS: Mentions that support for SH-5/SH64 is removed.
9808 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9809 (sh*-*-openbsd*): Ditto.
9810 (sh64-*-elf*): Remove.
9812 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9813 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9814 * sh-tdep.c: No longer include "sh64-tdep.h".
9815 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9816 * sh64-tdep.c, sh64-tdep.h: Remove files.
9818 2018-04-16 Pedro Alves <palves@redhat.com>
9820 * MAINTAINERS: Remove m88k.
9821 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9822 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9823 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9824 * NEWS: Mention that support for m88k was removed.
9825 * configure.host (m88*-*-*): Remove support.
9826 * configure.nat (m88k-*-*): Remove support.
9827 * configure.tgt (m88*-*-openbsd*): Remove.
9828 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9830 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
9832 * configure.tgt (x86_tobjs): New variable.
9833 (amd64_tobjs, i386_tobjs): Use it.
9835 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9837 * symtab.c (print_symbol_info): Precede the symbol definition by
9838 the line number when available.
9839 * NEWS: Advertise this enhancement.
9841 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9843 * NEWS (New options): announce set/show record btrace cpu.
9844 * btrace.c: Include record-btrace.h.
9845 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9846 the vendor is unknown.
9847 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
9848 Maybe overwrite the btrace configuration's cpu.
9849 (btrace_compute_ftrace): Add cpu parameter. Update callers.
9850 (btrace_fetch): Add cpu parameter. Update callers.
9851 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9852 Maybe overwrite the btrace configuration's cpu. Skip enabling
9853 errata workarounds if the vendor is unknown.
9854 * python/py-record-btrace.c: Include record-btrace.h.
9855 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9856 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9857 * record-btrace.c (record_btrace_cpu_state_kind): New.
9858 (record_btrace_cpu): New.
9859 (set_record_btrace_cpu_cmdlist): New.
9860 (record_btrace_get_cpu): New.
9861 (require_btrace_thread, record_btrace_info)
9862 (record_btrace_resume_thread): Call record_btrace_get_cpu.
9863 (cmd_set_record_btrace_cpu_none): New.
9864 (cmd_set_record_btrace_cpu_auto): New.
9865 (cmd_set_record_btrace_cpu): New.
9866 (cmd_show_record_btrace_cpu): New.
9867 (_initialize_record_btrace): Initialize set/show record btrace cpu
9869 * record-btrace.h (record_btrace_get_cpu): New.
9871 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9873 * record.c (set_record_command): Fix typo in message.
9875 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9877 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9879 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9881 * infrun.c (process_event_stop_test): Call
9882 gdbarch_in_indirect_branch_thunk.
9883 * gdbarch.sh (in_indirect_branch_thunk): New.
9884 * gdbarch.c: Regenerated.
9885 * gdbarch.h: Regenerated.
9888 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9889 (HFILES_NO_SRCDIR): Add x86-tdep.h.
9890 (ALLDEPFILES): Add x86-tdep.c.
9891 * arch-utils.h (default_in_indirect_branch_thunk): New.
9892 * arch-utils.c (default_in_indirect_branch_thunk): New.
9893 * i386-tdep: Include x86-tdep.h.
9894 (i386_in_indirect_branch_thunk): New.
9895 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9897 * amd64-tdep: Include x86-tdep.h.
9898 (amd64_in_indirect_branch_thunk): New.
9899 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9901 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9904 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9905 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9906 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9909 2018-04-12 Tom Tromey <tom@tromey.com>
9911 * rust-lang.c (rust_print_struct_def): Remove univariant code.
9912 (rust_evaluate_subexp): Likewise.
9914 2018-04-12 Pedro Alves <palves@redhat.com>
9916 * procfs.c (procfs_detach): Make forward declaration's prototype
9917 match definition's protototype.
9918 (proc_get_LDT_entry): Remove stale do_cleanups call.
9920 2018-04-12 Pedro Alves <palves@redhat.com>
9922 * target.h (target_ops::to_has_exited): Delete.
9923 (target_has_exited): Delete.
9924 * target-delegates.c: Regenerate.
9926 2018-04-11 Pedro Alves <palves@redhat.com>
9928 * target.c (fileio_fh_t::t): Add comment.
9929 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9930 (target_fileio_close): Handle a NULL target.
9931 (invalidate_fileio_fh): New.
9932 (target_close): Call it.
9933 * remote.c (remote_hostio_send_command): No longer check whether
9934 remote_desc is open.
9936 2018-04-11 Pedro Alves <palves@redhat.com>
9938 * target.c (fileio_fh_t): Make it a named struct instead of a
9940 (fileio_fh_t::is_closed): New method.
9941 (DEF_VEC_O (fileio_fh_t)): Remove.
9942 (fileio_fhandles): Now a std::vector.
9943 (is_closed_fileio_fh): Delete.
9944 (acquire_fileio_fd): Adjust. Rename parameters.
9945 (release_fileio_fd): Adjust.
9946 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9947 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9948 (target_fileio_close): Adjust.
9950 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
9952 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9955 2018-04-10 Pedro Alves <palves@redhat.com>
9957 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9958 (scoped_finish_thread_state): New class.
9959 * infcmd.c (run_command_1): Use it instead of finish_thread_state
9961 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9962 (fetch_inferior_event, normal_stop): Likewise.
9963 * thread.c (finish_thread_state_cleanup): Delete.
9965 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9966 Pedro Alves <palves@redhat.com>
9968 * value.c: Include "selftest.h" and "common/array-view.h".
9969 (struct range) <operator ==>: New.
9970 (test_ranges_contain): New.
9971 (check_ranges_vector): New.
9972 (test_insert_into_bit_range_vector): New.
9973 (_initialize_values): Register selftests.
9974 * common/array-view.h (operator==, operator!=): New.
9976 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9978 * common/gdb_vecs.h (unordered_remove): Add overload that takes
9980 * inline-frame.c: Include <algorithm>.
9981 (struct inline_state): Add constructor.
9982 (inline_state_s): Remove.
9983 (DEF_VEC_O(inline_state_s)): Remove.
9984 (inline_states): Change type to std::vector.
9985 (find_inline_frame_state): Adjust to std::vector.
9986 (allocate_inline_frame_state): Remove.
9987 (clear_inline_frame_state): Adjust to std::vector.
9988 (skip_inline_frames): Adjust to std::vector.
9990 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9992 * tracepoint.h (struct trace_state_variable): Add constructor.
9993 <name>: Change type to std::string.
9994 * tracepoint.c (tsv_s): Remove.
9995 (DEF_VEC_O(tsv_s)): Remove.
9996 (tvariables): Change to std::vector.
9997 (create_trace_state_variable): Adjust to std::vector.
9998 (find_trace_state_variable): Likewise.
9999 (find_trace_state_variable_by_number): Likewise.
10000 (delete_trace_state_variable): Likewise.
10001 (trace_variable_command): Adjust to std::string.
10002 (delete_trace_variable_command): Likewise.
10003 (tvariables_info_1): Adjust to std::vector.
10004 (save_trace_state_variables): Likewise.
10005 (start_tracing): Likewise.
10006 (merge_uploaded_trace_state_variables): Adjust to std::vector
10008 * target.h (struct target_ops)
10009 <to_download_trace_state_variable>: Pass reference to
10010 trace_state_variable.
10011 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10012 * target-delegates.c: Re-generate.
10013 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10014 (mi_tsv_deleted): Likewise.
10015 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10016 * remote.c (remote_download_trace_state_variable): Change
10017 pointer to reference and adjust.
10018 * make-target-delegates (parse_argtypes): Handle references.
10019 (write_function_header): Likewise.
10020 (munge_type): Likewise.
10022 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10024 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10025 string_view-selftests.c.
10026 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10028 * unittests/basic_string_view/cons/char/1.cc: Likewise.
10029 * unittests/basic_string_view/cons/char/2.cc: Likewise.
10030 * unittests/basic_string_view/cons/char/3.cc: Likewise.
10031 * unittests/basic_string_view/element_access/char/1.cc:
10033 * unittests/basic_string_view/element_access/char/empty.cc:
10035 * unittests/basic_string_view/element_access/char/front_back.cc:
10037 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10038 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10040 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10042 * unittests/basic_string_view/modifiers/swap/char/1.cc:
10044 * unittests/basic_string_view/operations/compare/char/1.cc:
10046 * unittests/basic_string_view/operations/compare/char/13650.cc:
10048 * unittests/basic_string_view/operations/copy/char/1.cc:
10050 * unittests/basic_string_view/operations/data/char/1.cc:
10052 * unittests/basic_string_view/operations/find/char/1.cc:
10054 * unittests/basic_string_view/operations/find/char/2.cc:
10056 * unittests/basic_string_view/operations/find/char/3.cc:
10058 * unittests/basic_string_view/operations/find/char/4.cc:
10060 * unittests/basic_string_view/operations/rfind/char/1.cc:
10062 * unittests/basic_string_view/operations/rfind/char/2.cc:
10064 * unittests/basic_string_view/operations/rfind/char/3.cc:
10066 * unittests/basic_string_view/operations/substr/char/1.cc:
10068 * unittests/basic_string_view/operators/char/2.cc: Likewise.
10069 * unittests/string_view-selftests.c: New file.
10071 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10073 * unittests/basic_string_view/capacity/1.cc: New file.
10074 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10075 * unittests/basic_string_view/cons/char/1.cc: New file.
10076 * unittests/basic_string_view/cons/char/2.cc: New file.
10077 * unittests/basic_string_view/cons/char/3.cc: New file.
10078 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10079 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10080 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10081 * unittests/basic_string_view/element_access/char/1.cc: New file.
10082 * unittests/basic_string_view/element_access/char/2.cc: New file.
10083 * unittests/basic_string_view/element_access/char/empty.cc: New file.
10084 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10085 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10086 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10087 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10088 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10089 * unittests/basic_string_view/include.cc: New file.
10090 * unittests/basic_string_view/inserters/char/1.cc: New file.
10091 * unittests/basic_string_view/inserters/char/2.cc: New file.
10092 * unittests/basic_string_view/inserters/char/3.cc: New file.
10093 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10094 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10095 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10096 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10097 * unittests/basic_string_view/literals/types.cc: New file.
10098 * unittests/basic_string_view/literals/values.cc: New file.
10099 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10100 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10101 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10102 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10103 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10104 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10105 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10106 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10107 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10108 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10109 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10110 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10111 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10112 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10113 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10114 * unittests/basic_string_view/operations/data/char/1.cc: New file.
10115 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10116 * unittests/basic_string_view/operations/find/char/1.cc: New file.
10117 * unittests/basic_string_view/operations/find/char/2.cc: New file.
10118 * unittests/basic_string_view/operations/find/char/3.cc: New file.
10119 * unittests/basic_string_view/operations/find/char/4.cc: New file.
10120 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10121 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10122 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10123 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10124 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10125 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10126 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10127 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10128 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10129 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10130 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10131 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10132 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10133 * unittests/basic_string_view/operators/char/2.cc: New file.
10134 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10135 * unittests/basic_string_view/range_access/char/1.cc: New file.
10136 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10137 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10138 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10139 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10140 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10141 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10142 * unittests/basic_string_view/requirements/typedefs.cc: New file.
10143 * unittests/basic_string_view/typedefs.cc: New file.
10144 * unittests/basic_string_view/types/1.cc: New file.
10146 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10148 * common/gdb_string_view.h: Remove libstdc++ implementation
10149 details, adjust to gdb reality.
10150 * common/gdb_string_view.tcc: Likewise.
10151 * cli/cli-script.c (struct string_view): Remove.
10152 (user_args) <m_args>: Change element type to gdb::string_view.
10153 (user_args::insert_args): Adjust.
10155 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10157 * common/gdb_string_view.h: New file.
10158 * common/gdb_string_view.tcc: New file.
10160 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10162 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10163 * configure: Re-generate.
10165 2018-04-09 Pedro Alves <palves@redhat.com>
10167 * gdbarch.sh: Include "observable.h" instead of "observer.h".
10168 (set_target_gdbarch): Call
10169 gdb::observers::architecture_changed.notify instead of
10170 observer_notify_architecture_changed.
10172 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10174 * tracepoint.c (struct current_traceframe_cleanup): Remove.
10175 (do_restore_current_traceframe_cleanup): Remove.
10176 (restore_current_traceframe_cleanup_dtor): Remove.
10177 (make_cleanup_restore_current_traceframe): Remove.
10178 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10180 * tracepoint.h (struct scoped_restore_current_traceframe): New.
10181 * infrun.c (fetch_inferior_event): Use
10182 scoped_restore_current_traceframe.
10184 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10186 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10188 <n_allocated_type_units>: Remove.
10189 <all_type_units>: Change to std::vector.
10190 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10191 to std::vector change.
10192 (dwarf2_per_objfile::get_cutu): Likewise.
10193 (dwarf2_per_objfile::get_tu): Likewise.
10194 (create_signatured_type_table_from_index): Likewise.
10195 (create_signatured_type_table_from_debug_names): Likewise.
10196 (dw2_symtab_iter_next): Likewise.
10197 (dw2_print_stats): Likewise.
10198 (dw2_expand_all_symtabs): Likewise.
10199 (dw2_expand_marked_cus): Likewise.
10200 (dw2_debug_names_iterator::next): Likewise.
10201 (dwarf2_initialize_objfile): Likewise.
10202 (add_signatured_type_cu_to_table): Likewise.
10203 (create_all_type_units): Likewise.
10204 (add_type_unit): Likewise.
10205 (struct tu_abbrev_offset): Add constructor.
10206 (build_type_psymtabs_1): Adjust to std::vector change.
10207 (print_tu_stats): Likewise.
10208 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10209 (write_debug_names): Likewise.
10211 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10213 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10214 Make an std::vector.
10215 <n_comp_units>: Remove.
10216 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10217 to std::vector change.
10218 (dwarf2_per_objfile::get_cutu): Likewise.
10219 (dwarf2_per_objfile::get_cu): Likewise.
10220 (create_cus_from_index): Likewise.
10221 (create_addrmap_from_index): Likewise.
10222 (create_addrmap_from_aranges): Likewise.
10223 (dwarf2_read_index): Likewise.
10224 (dw2_find_last_source_symtab): Likewise.
10225 (dw2_map_symtabs_matching_filename): Likewise.
10226 (dw2_symtab_iter_next): Likewise.
10227 (dw2_print_stats): Likewise.
10228 (dw2_expand_all_symtabs): Likewise.
10229 (dw2_expand_symtabs_with_fullname): Likewise.
10230 (dw2_expand_marked_cus): Likewise.
10231 (dw2_map_symbol_filenames): Likewise.
10232 (create_cus_from_debug_names): Likewise.
10233 (dwarf2_read_debug_names): Likewise.
10234 (dw2_debug_names_iterator::next): Likewise.
10235 (dwarf2_initialize_objfile): Likewise.
10236 (set_partial_user): Likewise.
10237 (dwarf2_build_psymtabs_hard): Likewise.
10238 (read_comp_units_from_section): Remove arguments, adjust to
10239 std::vector change.
10240 (create_all_comp_units): Adjust to std::vector and
10241 read_comp_units_from_section changes.
10242 (dwarf2_find_containing_comp_unit): Adjust to std::vector
10244 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10245 (psyms_seen_size): Likewise.
10246 (write_gdbindex): Likewise.
10247 (write_debug_names): Likewise.
10249 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10251 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10252 with dwarf2_per_objfile.
10253 (create_cus_from_index): Likewise.
10254 (create_signatured_type_table_from_index): Likewise.
10255 (dwarf2_read_index): Likewise.
10256 (dwarf2_initialize_objfile): Likewise.
10257 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
10258 per_cu rather than get_dwarf2_per_objfile.
10260 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10262 * dwarf2read.h (struct signatured_type): Forward declare.
10263 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10265 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10266 (dw2_get_cutu): ...this.
10267 (dwarf2_per_objfile::get_cu): Rename from...
10268 (dw2_get_cu): ...this.
10269 (dwarf2_per_objfile::get_tu): New.
10270 (create_addrmap_from_index): Adjust.
10271 (create_addrmap_from_aranges): Adjust.
10272 (dw2_find_last_source_symtab): Adjust.
10273 (dw2_map_symtabs_matching_filename): Adjust.
10274 (dw2_symtab_iter_next): Adjust.
10275 (dw2_print_stats): Adjust.
10276 (dw2_expand_all_symtabs): Adjust.
10277 (dw2_expand_symtabs_with_fullname): Adjust.
10278 (dw2_expand_marked_cus): Adjust.
10279 (dw_expand_symtabs_matching_file_matcher): Adjust.
10280 (dw2_map_symbol_filenames): Adjust.
10281 (dw2_debug_names_iterator::next): Adjust.
10282 (dwarf2_initialize_objfile): Adjust.
10283 (set_partial_user): Adjust.
10284 (dwarf2_build_psymtabs_hard): Adjust.
10286 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10288 * dwarf2read.c (create_signatured_type_table_from_debug_names):
10289 Remove unused variables.
10290 (dw2_map_symtabs_matching_filename): Likewise.
10291 (dwarf2_record_block_ranges): Likewise.
10292 (dwarf2_read_addr_index): Likewise.
10293 (follow_die_offset): Likewise.
10295 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10297 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10298 to symbol_file_add_main.
10300 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10303 * mi/mi-console.c (do_fputc_async_safe): New.
10304 (mi_console_file::write_async_safe): New.
10305 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10306 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10308 * ui-file.c (ui_file::putstrn): Adjust call to
10309 fputstrn_unfiltered.
10310 * utils.c (printchar): Replace do_fputs and do_fprintf
10311 parameters by do_fputc.
10312 (fputstr_filtered): Adjust call to printchar.
10313 (fputstr_unfiltered): Likewise.
10314 (fputstrn_filtered): Likewise.
10315 (fputstrn_unfiltered): Add do_fputc parameter, pass to
10317 * utils.h (do_fputc_ftype): New typedef.
10318 (fputstrn_unfiltered): Add do_fputc parameter.
10320 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10322 * regformats/i386/i386-avx.dat: Remove.
10324 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10327 * amd64-tdep.c (amd64_none_init_abi): New function.
10328 (amd64_x32_none_init_abi): New function.
10329 (_initialize_amd64_tdep): Register handlers for x86-64 and
10330 x64_32 with GDB_OSABI_NONE.
10331 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10332 GDB_OSABI_NONE osabi.
10334 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10337 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10339 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10340 * osabi.c (gdb_osabi_names): Add "unknown" entry.
10342 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10344 * common/byte-vector.h (char_vector): New type.
10345 * target.h (target_read_alloc): Return
10346 gdb::optional<byte_vector>.
10347 (target_read_stralloc): Return gdb::optional<char_vector>.
10348 (target_get_osdata): Return gdb::optional<char_vector>.
10349 * target.c (target_read_alloc_1): Templatize. Replacement
10350 manual memory management with vector.
10351 (target_read_alloc): Change return type, adjust.
10352 (target_read_stralloc): Change return type, adjust.
10353 (target_get_osdata): Change return type, adjust.
10354 * auxv.c (struct auxv_info) <length>: Remove.
10355 <data>: Change type to gdb::optional<byte_vector>.
10356 (auxv_inferior_data_cleanup): Free auxv_info with delete.
10357 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10358 (target_auxv_search): Adjust.
10359 (fprint_target_auxv): Adjust.
10360 * avr-tdep.c (avr_io_reg_read_command): Adjust.
10361 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10362 (linux_make_corefile_notes): Adjust.
10363 * osdata.c (get_osdata): Adjust.
10364 * remote.c (remote_get_threads_with_qxfer): Adjust.
10365 (remote_memory_map): Adjust.
10366 (remote_traceframe_info): Adjust.
10367 (btrace_read_config): Adjust.
10368 (remote_read_btrace): Adjust.
10369 (remote_pid_to_exec_file): Adjust.
10370 * solib-aix.c (solib_aix_get_library_list): Adjust.
10371 * solib-dsbt.c (decode_loadmap): Don't free buf.
10372 (dsbt_get_initial_loadmaps): Adjust.
10373 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10374 * solib-target.c (solib_target_current_sos): Adjust.
10375 * tracepoint.c (sdata_make_value): Adjust.
10376 * xml-support.c (xinclude_start_include): Adjust.
10377 (xml_fetch_content_from_file): Adjust.
10378 * xml-support.h (xml_fetch_another): Change return type.
10379 (xml_fetch_content_from_file): Change return type.
10380 * xml-syscall.c (xml_init_syscalls_info): Adjust.
10381 * xml-tdesc.c (file_read_description_xml): Adjust.
10382 (fetch_available_features_from_target): Change return type.
10383 (target_fetch_description_xml): Adjust.
10384 (target_read_description_xml): Adjust.
10386 2018-04-06 Tom Tromey <tom@tromey.com>
10388 * value.c (~value): Update.
10389 (struct value) <contents>: Now unique_xmalloc_ptr.
10390 (value_contents_bits_eq, allocate_value_contents)
10391 (value_contents_raw, value_contents_all_raw)
10392 (value_contents_for_printing, value_contents_for_printing_const)
10393 (set_value_enclosing_type): Update.
10395 2018-04-06 Tom Tromey <tom@tromey.com>
10397 * value.c (range_s): Remove typedef, VEC.
10398 (struct range): Add operator<.
10399 (range_lessthan): Remove.
10400 (ranges_contain): Change type.
10402 (struct value) <unavailable, optimized_out>: Now std::vector.
10403 (value_entirely_available)
10404 (value_entirely_covered_by_range_vector)
10405 (value_entirely_unavailable, value_entirely_optimized_out):
10407 (insert_into_bit_range_vector): Change argument type.
10408 (find_first_range_overlap): Likewise.
10409 (struct ranges_and_idx, value_contents_bits_eq)
10410 (require_not_optimized_out, require_available): Update.
10411 (ranges_copy_adjusted): Change argument types.
10412 (value_optimized_out, value_copy, value_fetch_lazy): Update.
10414 2018-04-06 Tom Tromey <tom@tromey.com>
10416 * value.c (~value): Update.
10417 (struct value) <parent>: Now a value_ref_ptr.
10418 (value_parent, set_value_parent, value_address, value_copy):
10421 2018-04-06 Tom Tromey <tom@tromey.com>
10423 * value.c (struct value): Add constructor, destructor, and member
10425 (allocate_value_lazy, value_decref): Update.
10427 2018-04-06 Tom Tromey <tom@tromey.com>
10429 * value.c (struct value) <released, next>: Remove.
10430 (all_values): Now a std::vector.
10431 (allocate_value_lazy): Update.
10432 (value_next): Remove.
10433 (value_mark, value_free_to_mark, release_value)
10434 (value_release_to_mark): Update.
10436 2018-04-06 Tom Tromey <tom@tromey.com>
10438 * value.h (fetch_subexp_value, value_release_to_mark): Update.
10439 (free_value_chain): Remove.
10440 * value.c (free_value_chain): Remove.
10441 (value_release_to_mark): Return a std::vector.
10442 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10444 (check_condition): Update.
10445 * eval.c (fetch_subexp_value): Change "val_chain" to a
10447 * breakpoint.c (update_watchpoint): Update.
10448 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10450 2018-04-06 Tom Tromey <tom@tromey.com>
10452 * value.h (free_all_values): Remove.
10453 * value.c (free_all_values): Remove.
10455 2018-04-06 Tom Tromey <tom@tromey.com>
10457 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10458 (value_history_chain, value_history_count): Remove.
10459 (value_history): New global.
10460 (record_latest_value, access_value_history, show_values)
10461 (preserve_values): Update.
10463 2018-04-06 Tom Tromey <tom@tromey.com>
10465 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10466 * varobj.c (varobj_set_display_format, varobj_set_value)
10467 (install_default_visualizer, construct_visualizer)
10468 (install_new_value, ~varobj, varobj_get_value_type)
10469 (my_value_of_variable, varobj_editable_p): Update.
10470 * c-varobj.c (c_describe_child, c_value_of_variable)
10471 (cplus_number_of_children, cplus_describe_child): Update.
10472 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10473 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10474 (ada_value_of_variable, ada_value_is_changeable_p): Update.
10476 2018-04-06 Tom Tromey <tom@tromey.com>
10478 * printcmd.c (last_examine_address): Change type to
10480 (do_examine, x_command): Update.
10482 2018-04-06 Tom Tromey <tom@tromey.com>
10484 * value.c (release_value): Update.
10485 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10486 (struct bpstats) <val>: Now a value_ref_ptr.
10487 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10488 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10489 (~watchpoint, print_it_watchpoint, watch_command_1)
10490 (invalidate_bp_value_on_memory_change): Update.
10492 2018-04-06 Tom Tromey <tom@tromey.com>
10494 * varobj.c (varobj_clear_saved_item)
10495 (update_dynamic_varobj_children, install_new_value, ~varobj):
10497 * value.h (value_incref): Move declaration earlier.
10498 (value_decref): Rename from value_free.
10499 (struct value_ref_policy): New.
10500 (value_ref_ptr): New typedef.
10501 (struct value_deleter): Remove.
10502 (gdb_value_up): Remove typedef.
10503 (release_value): Change return type.
10504 (release_value_or_incref): Remove.
10505 * value.c (set_value_parent): Update.
10506 (value_incref): Change return type.
10507 (value_decref): Rename from value_free.
10508 (value_free_to_mark, free_all_values, free_value_chain): Update.
10509 (release_value): Return value_ref_ptr.
10510 (release_value_or_incref): Remove.
10511 (record_latest_value, set_internalvar, clear_internalvar):
10513 * stack.c (info_frame_command): Don't call value_free.
10514 * python/py-value.c (valpy_dealloc, valpy_new)
10515 (value_to_value_object): Update.
10516 * printcmd.c (do_examine): Update.
10517 * opencl-lang.c (lval_func_free_closure): Update.
10518 * mi/mi-main.c (register_changed_p): Don't call value_free.
10519 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10520 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10521 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10523 * guile/scm-value.c (vlscm_free_value_smob)
10524 (vlscm_scm_from_value): Update.
10525 * frame.c (frame_register_unwind, frame_unwind_register_signed)
10526 (frame_unwind_register_unsigned, get_frame_register_bytes)
10527 (put_frame_register_bytes): Don't call value_free.
10528 * findvar.c (address_from_register): Don't call value_free.
10529 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10530 * dwarf2loc.c (entry_data_value_free_closure)
10531 (value_of_dwarf_reg_entry, free_pieced_value_closure)
10532 (dwarf2_evaluate_loc_desc_full): Update.
10533 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10534 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10535 (~watchpoint, watch_command_1)
10536 (invalidate_bp_value_on_memory_change): Update.
10537 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10539 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
10542 * warning.m4: Add -Wno-error=deprecated-register.
10543 * configure: Re-generate.
10545 2018-04-05 Tom Tromey <tom@tromey.com>
10547 * linespec.h: Remove include of "vec.h".
10549 2018-04-05 Tom Tromey <tom@tromey.com>
10551 * linespec.c (typep): Remove typedef.
10552 (find_methods, find_superclass_methods): Take a std::vector.
10553 (find_method): Use std::vector.
10555 2018-04-05 Tom Tromey <tom@tromey.com>
10557 * utils.c (compare_strings): Remove.
10558 * utils.h (compare_strings): Remove.
10559 * objc-lang.h (find_imps): Update.
10560 * objc-lang.c (find_methods): Take a std::vector.
10561 (uniquify_strings, find_imps): Likewise.
10562 * linespec.c (find_methods): Take a std::vector.
10563 (decode_objc): Use std::vector.
10564 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10566 (find_method, find_function_symbols): Use std::vector.
10568 2018-04-05 Tom Tromey <tom@tromey.com>
10570 * completer.c (completion_tracker::completion_tracker): Remove
10572 (completion_tracker::discard_completions): Likewise.
10573 * breakpoint.c (ambiguous_names_p): Remove cast.
10574 * ada-lang.c (_initialize_ada_language): Remove cast.
10575 * utils.h (streq): Update.
10576 (streq_hash): Add new declaration.
10577 * utils.c (streq): Return bool.
10578 (streq_hash): New function.
10580 2018-04-05 Tom Tromey <tom@tromey.com>
10582 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10583 Remove a string copy.
10585 2018-04-05 Tom Tromey <tom@tromey.com>
10587 * linespec.c (filter_results): Use std::vector.
10588 (decode_line_2, decode_line_full): Update.
10590 2018-04-05 Tom Tromey <tom@tromey.com>
10592 * linespec.c (canonical_to_fullform): Return std::string.
10593 (filter_results): Update.
10594 (struct decode_line_2_item): Add constructor.
10595 <fullform, displayform>: Now std::string.
10596 (decode_line_2_compare_items): Now a std::sort comparator.
10597 (decode_line_2): Update.
10599 2018-04-05 Tom Tromey <tom@tromey.com>
10601 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10602 (unexpected_linespec_error): Update.
10603 (linespec_parse_basic, parse_linespec): Update.
10605 2018-04-05 Tom Tromey <tom@tromey.com>
10607 * linespec.c (linespec_parse_basic): Reindent.
10609 2018-04-05 Tom Tromey <tom@tromey.com>
10611 * minsyms.h (iterate_over_minimal_symbols): Update.
10612 * minsyms.c (iterate_over_minimal_symbols): Take a
10613 gdb::function_view.
10614 * linespec.c (struct collect_minsyms): Remove.
10615 (compare_msyms): Now a std::sort comparator.
10616 (add_minsym): Add parameters.
10617 (search_minsyms_for_name): Update. Use std::vector.
10619 2018-04-03 Tom Tromey <tom@tromey.com>
10621 * mipsread.c (read_alphacoff_dynamic_symtab): Use
10624 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10626 * MAINTAINERS (Write After Approval): Add Weimin Pan.
10628 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10631 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
10632 printing static type.
10634 2018-04-01 Tom Tromey <tom@tromey.com>
10636 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10637 (rs6000_xfer_shared_libraries): Update.
10639 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
10641 * common/gdb_vecs.h (char_ptr): Remove.
10642 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10644 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10646 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10648 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10650 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10652 * tracepoint.h (struct uploaded_tp): Initialize fields.
10653 <actions, step_actions, cmd_strings>: Change type to
10654 std::vector<char *>.
10655 * tracepoint.c (get_uploaded_tp): Allocate with new.
10656 (free_uploaded_tps): Free with delete.
10657 (parse_tracepoint_definition): Adjust to std::vector change.
10658 * breakpoint.c (read_uploaded_action): Likewise.
10659 (create_tracepoint_from_upload): Likewise.
10660 * ctf.c (ctf_write_uploaded_tp): Likewise.
10661 (SET_ARRAY_FIELD): Likewise.
10662 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10664 2018-03-30 Tom Tromey <tom@tromey.com>
10666 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
10668 (svr4_keep_data_in_core): Update.
10669 (svr4_read_so_list): Update.
10671 2018-03-30 Tom Tromey <tom@tromey.com>
10673 * windows-nat.c (handle_output_debug_string, handle_exception):
10675 * target.h (target_read_string): Update.
10676 * target.c (target_read_string): Change "string" to
10677 unique_xmalloc_ptr.
10678 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10680 * solib-frv.c (frv_current_sos): Update.
10681 * solib-dsbt.c (dsbt_current_sos): Update.
10682 * solib-darwin.c (darwin_current_sos): Update.
10683 * linux-thread-db.c (inferior_has_bug): Update.
10684 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10685 Update. Remove alloca.
10686 * ada-lang.c (ada_main_name): Update.
10688 2018-03-30 Tom Tromey <tom@tromey.com>
10690 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10691 (struct dwo_file_deleter): New.
10692 (dwo_file_up): New typedef.
10693 (open_and_init_dwo_file): Use dwo_file_up.
10694 (free_dwo_file_cleanup): Remove.
10696 2018-03-30 Tom Tromey <tom@tromey.com>
10698 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10699 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10701 2018-03-30 Tom Tromey <tom@tromey.com>
10703 * dwarf2read.c (class free_cached_comp_units): New class.
10704 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10705 (free_cached_comp_units): Remove function.
10707 2018-03-30 Tom Tromey <tom@tromey.com>
10709 * utils.h (make_cleanup_unpush_target): Remove.
10710 * inf-ptrace.c (struct target_unpusher): New.
10711 (target_unpush_up) New typedef.
10712 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10714 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10716 2018-03-27 Tom Tromey <tom@tromey.com>
10718 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10720 2018-03-27 Pedro Alves <palves@redhat.com>
10721 Tom Tromey <tom@tromey.com>
10723 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10724 destructor. Now a class.
10725 (gdb_readline_wrapper_cleanup): Remove function.
10726 (gdb_readline_wrapper): Remove cleanups.
10728 2018-03-27 Tom Tromey <tom@tromey.com>
10730 * typeprint.h (struct type_print_options) <local_typedefs,
10731 global_typedefs>: Remove "struct" keyword.
10732 (class typedef_hash_table): New class.
10733 (recursively_update_typedef_hash, add_template_parameters)
10734 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10735 (find_typedef_in_hash): Don't declare.
10736 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10737 (typedef_hash_table::recursively_update): Rename from
10738 recursively_update_typedef_hash. Now a member.
10739 (typedef_hash_table::add_template_parameters): Rename from
10740 add_template_parameters. Now a member.
10741 (typedef_hash_table::typedef_hash_table): Now a constructor;
10742 rename from create_typedef_hash.
10743 (typedef_hash_table::~typedef_hash_table): Now a destructor;
10744 rename from free_typedef_hash.
10745 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10746 (do_free_global_table): Remove.
10747 (typedef_hash_table::typedef_hash_table): New constructor; renamed
10748 from copy_type_recursive.
10749 (create_global_typedef_table): Remove.
10750 (typedef_hash_table::find_global_typedef): Now a member of
10751 typedef_hash_table.
10752 (typedef_hash_table::find_typedef): Rename from
10753 find_typedef_in_hash; now a member.
10754 (whatis_exp): Update.
10755 * extension.h (struct ext_lang_type_printers): Add constructor and
10757 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10759 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10760 Now a constructor; rename from start_ext_lang_type_printers.
10761 (ext_lang_type_printers): Now a destructor; rename from
10762 free_ext_lang_type_printers.
10763 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10765 (c_type_print_base_struct_union): Update. Remove cleanups.
10767 2018-03-27 Tom Tromey <tom@tromey.com>
10769 * dwarf-index-write.c: Include <cmath>.
10771 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10773 * NEWS: Add entry describing new "set|show varsize-limit" command.
10774 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10776 * printcmd.c (_initialize_printcmd): Add "set var" alias of
10779 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
10781 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10782 dwarf-index-write.c
10783 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10784 * dwarf-index-common.c: New file.
10785 * dwarf-index-common.h: New file.
10786 * dwarf-index-write.c: New file.
10787 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10788 (struct dwarf2_section_info): Move from here.
10789 (dwarf2_section_info_def): Likewise.
10790 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10791 (offset_type): Likewise.
10792 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10793 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10794 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10795 (byte_swap): Likewise.
10796 (MAYBE_SWAP): Likewise.
10797 (dwarf2_per_cu_ptr): Likewise.
10798 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10799 (struct tu_stats): Likewise.
10800 (struct dwarf2_per_objfile): Likewise.
10801 (struct dwarf2_per_cu_data): Likewise.
10802 (struct signatured_type): Likewise.
10803 (sig_type_ptr): Likewise.
10804 (DEF_VEC_P (sig_type_ptr)): Likewise.
10805 (INDEX4_SUFFIX): Likewise.
10806 (INDEX5_SUFFIX): Likewise.
10807 (DEBUG_STR_SUFFIX): Likewise.
10808 (dwarf2_read_section): Make non-static.
10809 (mapped_index_string_hash): Move from here.
10810 (dwarf5_djb_hash): Likewise.
10811 (file_write): Likewise.
10812 (class data_buf): Likewise.
10813 (struct symtab_index_entry): Likewise.
10814 (struct mapped_symtab): Likewise.
10815 (find_slot): Likewise.
10816 (hash_expand): Likewise.
10817 (add_index_entry): Likewise.
10818 (uniquify_cu_indices): Likewise.
10819 (class c_str_view): Likewise.
10820 (class c_str_view_hasher): Likewise.
10821 (class vector_hasher): Likewise.
10822 (write_hash_table): Likewise.
10823 (psym_index_map): Likewise.
10824 (struct addrmap_index_data): Likewise.
10825 (add_address_entry): Likewise.
10826 (add_address_entry_worker): Likewise.
10827 (write_address_map): Likewise.
10828 (symbol_kind): Likewise.
10829 (write_psymbols): Likewise.
10830 (struct signatured_type_index_data): Likewise.
10831 (write_one_signatured_type): Likewise.
10832 (recursively_count_psymbols): Likewise.
10833 (recursively_write_psymbols): Likewise.
10834 (class debug_names): Likewise.
10835 (check_dwarf64_offsets): Likewise.
10836 (psyms_seen_size): Likewise.
10837 (write_gdbindex): Likewise.
10838 (write_debug_names): Likewise.
10839 (assert_file_size): Likewise.
10840 (write_psymtabs_to_index): Likewise.
10841 (save_gdb_index_command): Likewise.
10842 (_initialize_dwarf2_read): Don't register the "save gdb-index"
10844 * dwarf2read.h: New file.
10846 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10849 * dwarf2read.c (dwarf2_physname): Do not return the demangled
10850 symbol name if the CU's language stores symbol names in linkage
10852 * language.h (struct language_defn)
10853 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
10854 all instances of this struct.
10856 2018-03-26 Tom Tromey <tom@tromey.com>
10858 * stack.c (backtrace_command_1): Remove verbose code.
10860 2018-03-26 Tom Tromey <tom@tromey.com>
10862 * python/py-framefilter.c (py_print_type): Don't catch
10863 exceptions. Return void.
10864 (py_print_value): Likewise.
10865 (py_print_single_arg): Likewise.
10866 (enumerate_args): Don't catch exceptions.
10867 (py_print_args): Likewise.
10868 (py_print_frame): Likewise.
10869 (gdbpy_apply_frame_filter): Catch exceptions here.
10871 2018-03-26 Tom Tromey <tom@tromey.com>
10873 * stack.c (_initialize_stack): Remove trailing newlines from help
10874 text. Add "Usage" line to "backtrace" help.
10876 2018-03-26 Tom Tromey <tom@tromey.com>
10879 * python/py-framefilter.c (py_print_args): Call wrap_hint.
10881 2018-03-26 Tom Tromey <tom@tromey.com>
10883 * python/py-framefilter.c (py_print_single_arg): Return
10884 EXT_LANG_BT_ERROR from catch.
10886 2018-03-26 Tom Tromey <tom@tromey.com>
10888 PR backtrace/15584:
10889 * stack.c (backtrace_command_1): Move some code into no-filters
10892 2018-03-26 Tom Tromey <tom@tromey.com>
10894 * python/py-framefilter.c (throw_quit_or_print_exception): New
10896 (gdbpy_apply_frame_filter): Use it.
10898 2018-03-26 Tom Tromey <tom@tromey.com>
10901 * python/py-framefilter.c (py_print_type, py_print_value)
10902 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10905 2018-03-26 Tom Tromey <tom@tromey.com>
10907 * python/py-framefilter.c (enumerate_args): Use
10908 gdb::unique_xmalloc_ptr.
10910 2018-03-26 Tom Tromey <tom@tromey.com>
10912 * python/py-framefilter.c (py_print_frame): Return
10914 (gdbpy_apply_frame_filter): Update comment.
10915 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10917 <EXT_LANG_BT_NO_FILTERS>: Change value.
10919 2018-03-26 Tom Tromey <tom@tromey.com>
10921 PR backtrace/15582:
10922 * stack.c (backtrace_command): Parse "hide" argument.
10923 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10924 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10927 2018-03-26 Tom Tromey <tom@tromey.com>
10929 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10931 (backtrace_command): Remove "fulltrace", add "flags".
10933 2018-03-26 Tom Tromey <tom@tromey.com>
10935 * stack.c (backtrace_command): Rewrite command line parsing.
10937 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10939 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10941 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10943 * filename-seen-cache.h: Add include guard.
10945 2018-03-26 Keith Seitz <keiths@redhat.com>
10947 * symfile.c (place_section): Remove "struct" from section_addr_info
10949 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10950 "struct" keyword from section_addr_info.
10952 2018-03-26 Alan Hayward <alan.hayward@arm.com>
10954 * regformats/regdef.h (reg): Add constructors.
10956 2018-03-25 Pedro Alves <palves@redhat.com>
10958 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10959 if then/else bodies in var_func_name extraction.
10961 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
10963 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10964 lookup_minimal_symbol() to find symbol entry.
10965 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10967 2018-03-23 Keith Seitz <keiths@redhat.com>
10970 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10971 nested type definitions for C++, too.
10973 2018-03-23 Tom Tromey <tom@tromey.com>
10975 * machoread.c (struct oso_el): Add a constructor. Don't define as
10977 (macho_register_oso): Remove.
10978 (macho_symtab_read): Take a std::vector.
10979 (oso_el_compare_name): Now a std::sort comparator.
10980 (macho_symfile_read_all_oso): Take a std::vector.
10981 (macho_symfile_read): Use std::vector. Remove cleanups.
10983 2018-03-22 Tom Tromey <tom@tromey.com>
10985 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10986 (record_full_goto_bookmark): Use std::string.
10988 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10991 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10994 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10996 * rs6000-tdep.c (store_insn_p): New function.
10997 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10998 and cr_reg to their unshifted values. Use store_insn_p to
10999 match LR saves using either R1 or fdata->alloca_reg. Use
11000 store_insn_p to match CR saves. Set alloca_reg_offset
11001 when alloca_reg and framep are set. Remove lr_reg shift
11002 when assigning to fdata->lr_register.
11004 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
11006 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11007 command line args instead of emitting a warning.
11009 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11011 * tracepoint.h (struct static_tracepoint_marker): Initialize
11012 fields, define default constructor, move constructor and move
11013 assignment, disable the rest.
11014 <str_id, extra>: Make std::string.
11015 (release_static_tracepoint_marker): Remove.
11016 (free_current_marker): Remove.
11017 * tracepoint.c (free_current_marker): Remove.
11018 (parse_static_tracepoint_marker_definition): Adjust to
11019 std::string, use new hex2str overload.
11020 (release_static_tracepoint_marker): Remove.
11021 (print_one_static_tracepoint_marker): Get marker by reference
11022 and adjust to std::string.
11023 (info_static_tracepoint_markers_command): Adjust to std::vector
11025 * target.h (static_tracepoint_marker_p): Remove typedef.
11026 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11027 (struct target_ops) <to_static_tracepoint_marker_at>: Return
11029 <to_static_tracepoint_markers_by_strid>: Return std::vector.
11031 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11032 (target_debug_print_std_vector_static_tracepoint_marker): New.
11033 (target_debug_print_struct_static_tracepoint_marker_p): Rename
11035 (target_debug_print_static_tracepoint_marker_p): ... this.
11036 * target-delegates.c: Re-generate.
11037 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11039 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11040 (decode_static_tracepoint_spec): Adjust to std::vector.
11041 (tracepoint_print_one_detail): Adjust to std::string.
11042 (strace_marker_decode_location): Adjust to std::string.
11043 (update_static_tracepoint): Adjust to std::string, remove call
11044 to release_static_tracepoint_marker.
11045 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11046 Adjust to std::vector.
11047 * remote.c (remote_static_tracepoint_marker_at): Return bool.
11048 (remote_static_tracepoint_markers_by_strid): Adjust to
11050 * common/rsp-low.h (hex2str): New overload with explicit count
11052 * common/rsp-low.c (hex2str): New overload with explicit count
11054 * unittests/rsp-low-selftests.c (test_hex2str): New function.
11055 (_initialize_rsp_low_selftests): Add test_hex2str test.
11056 * unittests/tracepoint-selftests.c
11057 (test_parse_static_tracepoint_marker_definition): Adjust to
11060 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11062 * tracepoint.c (parse_static_tracepoint_marker_definition):
11063 Consider case where the definition is followed by more
11065 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11066 tracepoint-selftests.c.
11067 * unittests/tracepoint-selftests.c: New.
11069 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11071 * MAINTAINERS (Write After Approval): Add Pedro Franco de
11074 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11076 * symtab.c (find_pc_sect_line): fixed indentation.
11078 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11080 * symtab.c (find_pc_sect_line): now uses binary search.
11082 2018-03-19 Tom Tromey <tom@tromey.com>
11084 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11085 "IDENT" production.
11087 2018-03-19 Pedro Alves <palves@redhat.com>
11088 Tom Tromey <tom@tromey.com>
11090 * unittests/observable-selftests.c: New file.
11091 * common/observable.h: New file.
11092 * observable.h: New file.
11093 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11094 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11095 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11096 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11097 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11098 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11099 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11100 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11101 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11102 python/py-breakpoint.c, python/py-finishbreakpoint.c,
11103 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11104 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11105 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11106 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11107 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11108 tui/tui-interp.c, valops.c: Update all users.
11109 * tui/tui-hooks.c (tui_bp_created_observer)
11110 (tui_bp_deleted_observer, tui_bp_modified_observer)
11111 (tui_inferior_exit_observer, tui_before_prompt_observer)
11112 (tui_normal_stop_observer, tui_register_changed_observer):
11114 (tui_observers_token): New global.
11115 (attach_or_detach, tui_attach_detach_observers): New functions.
11116 (tui_install_hooks, tui_remove_hooks): Use
11117 tui_attach_detach_observers.
11118 * record-btrace.c (record_btrace_thread_observer): Remove.
11119 (record_btrace_thread_observer_token): New global.
11120 * observer.sh: Remove.
11121 * observer.c: Rename to observable.c.
11122 * observable.c (namespace gdb_observers): Define new objects.
11123 (observer_debug): Move into gdb_observers namespace.
11124 (struct observer, struct observer_list, xalloc_observer_list_node)
11125 (xfree_observer_list_node, generic_observer_attach)
11126 (generic_observer_detach, generic_observer_notify): Remove.
11127 (_initialize_observer): Update.
11128 Don't include observer.inc.
11129 * Makefile.in (generated_files): Remove observer.h, observer.inc.
11130 (clean mostlyclean): Likewise.
11131 (observer.h, observer.inc): Remove targets.
11132 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11133 (COMMON_SFILES): Use observable.c, not observer.c.
11134 * .gitignore: Remove observer.h.
11136 2018-03-18 Tom Tromey <tom@tromey.com>
11138 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11140 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11142 2018-03-17 Tom Tromey <tom@tromey.com>
11144 * auto-load.c (auto_load_objfile_script_1): Use std::string.
11146 2018-03-17 Tom Tromey <tom@tromey.com>
11148 * target.c (class scoped_target_fd): New.
11149 (target_fileio_close_cleanup): Remove.
11150 (target_fileio_read_alloc_1): Use scoped_target_fd.
11152 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
11154 * silent-rules.mk: New.
11155 * Makefile.in: Include silent-rules.mk
11156 (srcdir, VPATH, top_srcdir): Move up.
11157 (COMPILE): Add ECHO_CXX.
11158 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11159 (init.c): Add ECHO_INIT_C.
11160 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11161 (version.c): Add ECHO_GEN.
11162 (printcmd.o): Add ECHO_CXX.
11163 (target-float.o): Add ECHO_CXX.
11164 (ada-exp.o): Add ECHO_CXX.
11165 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11166 (insight$(EXEEXT)): Add ECHO_CXXLD.
11167 * gnulib/configure.ac: Add AM_SILENT_RULES.
11168 * gnulib/aclocal.m4: Re-generate.
11169 * gnulib/configure: Re-generate.
11170 * gnulib/import/Makefile.in: Re-generate.
11172 2018-03-16 Tom Tromey <tom@tromey.com>
11174 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11175 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11176 * utils.c (do_free_section_addr_info)
11177 (make_cleanup_free_section_addr_info): Remove.
11178 * symfile.h (struct other_sections): Add constructor.
11179 (struct section_addr_info): Remove.
11180 (section_addr_info): New typedef.
11181 (struct sym_fns) <sym_offsets>: Change type of parameter.
11182 (build_section_addr_info_from_objfile)
11183 (relative_addr_info_to_section_offsets, addr_info_make_relative)
11184 (default_symfile_offsets, symbol_file_add)
11185 (symbol_file_add_from_bfd)
11186 (build_section_addr_info_from_section_table): Update.
11187 (alloc_section_addr_info, free_section_addr_info): Don't declare.
11188 * symfile.c (alloc_section_addr_info): Remove.
11189 (build_section_addr_info_from_section_table): Change return type.
11191 (build_section_addr_info_from_bfd)
11192 (build_section_addr_info_from_objfile): Likewise.
11193 (free_section_addr_info): Remove.
11194 (relative_addr_info_to_section_offsets): Change type of "addrs".
11195 (addrs_section_compar): Now a std::sort comparator.
11196 (addrs_section_sort): Change return type.
11197 (addr_info_make_relative): Change type of "addrs". Update.
11198 (default_symfile_offsets, syms_from_objfile_1)
11199 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11200 (symbol_file_add_separate): Update.
11201 (symbol_file_add): Change type of "addrs". Update.
11202 (add_symbol_file_command): Update. Remove cleanups.
11203 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
11205 * symfile-debug.c (debug_sym_offsets): Change type of "info".
11206 * solib.c (solib_read_symbols): Update.
11207 * objfiles.c (objfile_relocate): Update. Remove cleanups.
11208 * machoread.c (macho_symfile_offsets): Update.
11209 * jit.c (jit_bfd_try_read_symtab): Update.
11211 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
11213 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11214 unittests/utils-selftests.c.
11215 * unittests/utils-selftests.c: New file.
11217 2018-03-14 Tom Tromey <tom@tromey.com>
11220 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11223 2018-03-14 Tom Tromey <tom@tromey.com>
11226 * printcmd.c (printf_pointer): Allow "-" in format.
11228 2018-03-14 Tom Tromey <tom@tromey.com>
11230 * printcmd.c (_initialize_printcmd): Add usage to printf.
11232 2018-03-14 Yao Qi <qiyao@sourceware.org>
11234 * MAINTAINERS: Update my email address.
11236 2018-03-13 Tom Tromey <tom@tromey.com>
11238 * machoread.c (macho_check_dsym): Change filenamep to a
11240 (macho_symfile_read): Update.
11241 * symfile.c (load_command): Use std::string.
11243 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
11245 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11246 to error message string.
11247 (riscv_register_name): Use xsnprintf instead of sprintf.
11248 (riscv_insn::fetch_instruction): Use gdb_assert instead of
11250 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11252 (riscv_push_dummy_call): Likewise.
11254 2018-03-12 Tom Tromey <tom@tromey.com>
11256 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11257 Use gdb::byte_vector.
11258 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11260 2018-03-12 Yao Qi <yao.qi@linaro.org>
11262 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11263 parameter type to readable_regcache.
11264 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11267 2018-03-11 Tom Tromey <tom@tromey.com>
11269 * dwarf2read.c (struct nextfield): Add initializers.
11270 (struct nextfnfield): Remove.
11271 (struct fnfieldlist): Add initializers. Remove "length" and
11272 "head", use std::vector.
11273 (struct decl_field_list): Remove.
11274 (struct field_info): Add initializers.
11275 <fields, baseclasses>: Now std::vector.
11276 <nbaseclasses, nfnfields, typedef_field_list_count,
11277 nested_types_list_count>: Remove.
11278 (dwarf2_add_field, dwarf2_add_type_defn)
11279 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11280 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11281 (process_structure_scope): Update.
11283 2018-03-11 Tom Tromey <tom@tromey.com>
11285 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11286 for use by std::sort.
11287 (build_type_psymtabs_1): Use std::vector.
11289 2018-03-09 Eli Zaretskii <eliz@gnu.org>
11291 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11292 and LIBMPFR in the printed configuration.
11294 2018-03-08 Tom Tromey <tom@tromey.com>
11296 * source.c (get_filename_and_charpos): Use scoped_fd.
11297 * nto-procfs.c (procfs_open_1): Use scoped_fd.
11298 (procfs_pidlist): Likewise.
11299 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11300 (iterate_over_mappings): Likewise.
11302 2018-03-08 Tom Tromey <tom@tromey.com>
11304 * infcall.c (struct call_return_meta_info)
11305 <stack_temporaries_enabled>: Remove.
11306 (get_call_return_value, call_function_by_hand_dummy): Update.
11307 * thread.c (disable_thread_stack_temporaries): Remove.
11308 (enable_thread_stack_temporaries): Remove.
11309 (thread_stack_temporaries_enabled_p): Return bool.
11310 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11311 (get_last_thread_stack_temporary): Update.
11312 * eval.c (evaluate_subexp): Update.
11313 * gdbthread.h (class enable_thread_stack_temporaries): Now a
11314 class, not a function.
11315 (value_ptr, value_vec): Remove typedefs.
11316 (class thread_info) <stack_temporaries_enabled>: Now bool.
11317 <stack_temporaries>: Now a std::vector.
11318 (thread_stack_temporaries_enabled_p)
11319 (value_in_thread_stack_temporaries): Return bool.
11321 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
11323 * remote.c (putpkt_binary): Fix omitted bytes reporting.
11324 (getpkt_or_notif_sane_1): Likewise.
11326 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11328 * build-id.c (build_id_to_debug_bfd): Use std::string.
11330 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11332 * build-id.c (find_separate_debug_file_by_buildid): Return
11334 * build-id.h (find_separate_debug_file_by_buildid): Return
11336 * coffread.c (coff_symfile_read): Adjust to std::string.
11337 * elfread.c (elf_symfile_read): Adjust to std::string.
11338 * symfile.c (separate_debug_file_exists): Change parameter to
11340 (find_separate_debug_file): Return std::string.
11341 (find_separate_debug_file_by_debuglink): Return std::string.
11342 * symfile.h (find_separate_debug_file_by_debuglink): Return
11345 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11347 * common/xml-utils.c (xml_escape_text): Move code to...
11348 (xml_escape_text_append): ... this new function.
11349 * common/xml-utils.h (xml_escape_text_append): New declaration.
11350 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11352 (_initialize_xml_utils): register test_xml_escape_text_append as
11355 2018-03-07 Alan Hayward <alan.hayward@arm.com>
11357 * defs.h: Remove MAX_REGISTER_SIZE.
11358 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11360 * python/py-unwind.c (pyuw_sniffer): Likewise.
11362 2018-03-07 Tom Tromey <tom@tromey.com>
11364 * linux-tdep.c (linux_info_proc): Update.
11365 * target.h (struct target_ops) <to_fileio_readlink>: Return
11367 (target_fileio_readlink): Return optional<string>.
11368 * remote.c (remote_hostio_readlink): Return optional<string>.
11369 * inf-child.c (inf_child_fileio_readlink): Return
11371 * target.c (target_fileio_readlink): Return optional<string>.
11373 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
11375 * regcache.c (cooked_read_test): Add riscv to the list of
11376 architectures that have a save_reggroup.
11378 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
11380 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11381 value is not a dynamic class object.
11383 2018-03-06 Tom Tromey <tom@tromey.com>
11385 * rust-exp.y: Formatting fixes.
11387 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11389 * riscv-tdep.c (riscv_register_name): Remove target description
11391 (riscv_gdbarch_init): Remove target description check.
11393 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11395 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11397 * riscv-tdep.h: Likewise.
11399 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11401 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11402 (riscv_pseudo_register_write): Delete.
11403 (riscv_gdbarch_init): Remove all use of pseudo registers.
11405 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11407 * record-btrace.c (btrace_print_lines): Replace cleanup
11408 parameter with RAII equivalents.
11409 (btrace_insn_history): Replace cleanup with RAII equivalents.
11410 * ui-out.h (make_cleanup_ui_out_list_begin_end,
11411 make_cleanup_ui_out_tuple_begin_end): Remove.
11412 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11413 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11414 make_cleanup_ui_out_list_begin_end): Remove.
11416 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11418 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11419 parameter types to std::vector. Use bool.
11420 (record_btrace_wait): Replace VEC(tp_t) with
11421 std::vector<thread_info *>.
11422 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11424 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11426 * record-btrace.c (record_btrace_disable_callback): Remove.
11427 (struct scoped_btrace_disable): New.
11428 (record_btrace_open): Use scoped_btrace_disable.
11430 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11432 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11433 reading values from registers.
11435 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11437 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11440 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11442 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11443 change parameter type. Use GDB's print functions, and use
11444 core_addr_to_string where appropriate.
11445 (riscv_push_dummy_call): Use core_addr_to_string where
11446 appropriate, update call to riscv_print_arg_location, and reindent
11448 (riscv_return_value): Update call to riscv_print_arg_location.
11450 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11451 Tim Newsome <tim@sifive.com>
11452 Albert Ou <a0u@eecs.berkeley.edu>
11453 Darius Rad <darius@bluespec.com>
11455 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11456 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11457 (ALLDEPFILES): Add riscv-tdep.c
11458 * configure.tgt: Add riscv support.
11459 * riscv-tdep.c: New file.
11460 * riscv-tdep.h: New file.
11461 * NEWS: Mention new target.
11462 * MAINTAINERS: Add entry for riscv.
11464 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11466 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11467 fields within aggregates.
11469 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
11471 * record-btrace.c (btrace_print_lines): Change type of flags to
11472 gdb_disassembly_flags.
11474 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11476 * fbsd-nat.c: Include "inf-ptrace.h".
11477 (USE_SIGTRAP_SIGINFO): Conditionally define.
11478 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11479 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11480 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11482 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11484 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11486 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11487 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11488 "supports_stopped_by_hw_breakpoint" target methods.
11490 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11492 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11493 * fbsd-nat.c (debug_fbsd_nat): New variable.
11494 (show_fbsd_nat_debug): New function.
11495 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11496 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11498 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11500 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11501 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11503 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11504 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11507 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11509 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11510 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11512 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11514 * charset.c (struct charset_vector): New.
11515 (charsets): Change type to charset_vector.
11516 (find_charset_names): Adjust.
11518 (_initialize_charset): Adjust.
11520 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11522 * progspace.h (struct program_space) <deleted_solibs>: Change
11523 type to std::vector<std::string>.
11524 * progspace.c (clear_program_space_solib_cache): Adjust.
11525 * breakpoint.c (print_solib_event): Adjust.
11526 (check_status_catch_solib): Adjust.
11527 * solib.c (update_solib_list): Adjust.
11528 * ui-out.h (class ui_out) <field_string>: New overload.
11529 * ui-out.c (ui_out::field_string): New overload.
11531 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11533 * progspace.h (struct program_space): Add constructor and
11534 destructor, initialize fields.
11535 (add_program_space): Remove.
11536 * progspace.c (add_program_space): Rename to...
11537 (program_space::program_space): ... this.
11538 (release_program_space): Rename to...
11539 (program_space::~program_space): ... this.
11540 (delete_program_space): Use delete to delete program_space.
11541 (initialize_progspace): Use new to allocate program_space.
11542 * inferior.c (add_inferior_with_spaces): Likewise.
11543 (clone_inferior_command): Likewise.
11544 * infrun.c (follow_fork_inferior): Likewise.
11545 (handle_vfork_child_exec_or_exit): Likewise.
11547 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11549 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11550 (delim_string_to_char_ptr_vec): Return std::vector of
11551 gdb::unique_xmalloc_ptr.
11552 (dirnames_to_char_ptr_vec_append): Take std::vector of
11553 gdb::unique_xmalloc_ptr.
11554 (dirnames_to_char_ptr_vec): Return std::vector of
11555 gdb::unique_xmalloc_ptr.
11556 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11557 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11558 (delim_string_to_char_ptr_vec): Return an std::vector of
11559 gdb::unique_xmalloc_ptr, adjust the code.
11560 (dirnames_to_char_ptr_vec_append): Take an std::vector of
11561 gdb::unique_xmalloc_ptr, adjust the code.
11562 (dirnames_to_char_ptr_vec): Return an std::vector of
11563 gdb::unique_xmalloc_ptr, adjust the code.
11564 * auto-load.c (auto_load_safe_path_vec): Change type to
11565 std::vector of gdb::unique_xmalloc_ptr.
11566 (auto_load_expand_dir_vars): Return an std::vector of
11567 gdb::unique_xmalloc_ptr, adjust the code.
11568 (auto_load_safe_path_vec_update): Adjust.
11569 (filename_is_in_auto_load_safe_path_vec): Adjust.
11570 (auto_load_objfile_script_1): Adjust.
11571 * build-id.c (build_id_to_debug_bfd): Adjust.
11572 * linux-thread-db.c (thread_db_load_search): Adjust.
11573 * source.c (add_path): Adjust.
11575 * symfile.c (find_separate_debug_file): Adjust.
11576 * utils.c (do_free_char_ptr_vec): Remove.
11577 (make_cleanup_free_char_ptr_vec): Remove.
11579 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
11582 * common/pathstuff.c: Conditionally include "<windows.h>".
11584 2018-03-01 Georg Sauthoff <mail@georg.so>
11587 * gcore.in: Quote variables and switch interpreter to bash.
11589 2018-03-01 Tom Tromey <tom@tromey.com>
11591 * dwarf2read.c (alloc_discriminant_info): Fix default_index
11592 assertion. Add assertion for discriminant_index.
11593 (quirk_rust_enum): Use correct base type name in univariant case.
11595 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
11597 * record.c (get_call_history_modifiers): Return a
11598 record_print_flags.
11599 (cmd_record_call_history): Adjust.
11600 * record-btrace.c (record_btrace_call_history): Adjust.
11601 (record_btrace_call_history_range): Adjust.
11602 (record_btrace_call_history_from): Adjust.
11603 * target-debug.h (target_debug_print_record_print_flags): New.
11604 * target-delegates.c: Re-generate.
11605 * target.c (target_call_history): Change flags type.
11606 (target_call_history_from): Likewise.
11607 (target_call_history_range): Likewise.
11608 * target.h (struct target_ops) <target_call_history>: Likewise.
11609 (target_call_history_from): Likewise.
11610 (target_call_history_range): Likewise.
11612 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11613 Simon Marchi <simon.marchi@polymtl.ca>
11615 * common/common-utils.c: Include "sys/stat.h".
11616 (is_regular_file): Move here from "source.c"; change return
11618 * common/common-utils.h (is_regular_file): New prototype.
11619 * common/pathstuff.c (contains_dir_separator): New function.
11620 * common/pathstuff.h (contains_dir_separator): New prototype.
11621 * source.c: Don't include "sys/stat.h".
11622 (is_regular_file): Move to "common/common-utils.c".
11624 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11626 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11627 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11628 * auto-load.c: Include "common/pathstuff.h".
11629 * common/common-def.h (current_directory): Move here.
11630 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11632 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11634 * common/pathstuff.c: New file.
11635 * common/pathstuff.h: New file.
11636 * compile/compile.c: Include "common/pathstuff.h".
11637 * defs.h (current_directory): Move to "common/common-defs.h".
11638 * dwarf2read.c: Include "common/pathstuff.h".
11639 * exec.c: Likewise.
11640 * guile/scm-safe-call.c: Likewise.
11641 * linux-thread-db.c: Likewise.
11642 * main.c: Likewise.
11643 * nto-tdep.c: Likewise.
11644 * objfiles.c: Likewise.
11645 * source.c: Likewise.
11646 * symtab.c: Likewise.
11647 * utils.c: Include "common/pathstuff.h".
11648 (gdb_realpath): Move to "common/pathstuff.c".
11649 (gdb_realpath_keepfile): Likewise.
11650 (gdb_abspath): Likewise.
11651 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11652 (gdb_realpath_keepfile): Likewise.
11653 (gdb_abspath): Likewise.
11655 2018-02-28 John Baldwin <jhb@FreeBSD.org>
11657 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11658 wildcard process pid for super_resume for kernels with a
11661 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
11663 * compile/compile.c (get_args): Add additional comments
11664 explaining function.
11666 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
11667 Tom Tromey <tom@tromey.com>
11669 * target.h (memory_write_request_s): Remove typedef. Don't define
11671 (target_write_memory_blocks): Change argument to std::vector.
11672 (struct memory_write_request): Add constructor.
11673 * target-memory.c (compare_block_starting_address): Return bool.
11674 Change argument types.
11675 (claim_memory): Change arguments to use std::vector.
11676 (split_regular_and_flash_blocks, blocks_to_erase)
11677 (compute_garbled_blocks): Likewise.
11678 (cleanup_request_data, cleanup_write_requests_vector): Remove.
11679 (target_write_memory_blocks): Change argument to std::vector.
11680 * symfile.c (struct load_section_data): Add constructor and
11681 destructor. Use std::vector for "requests".
11682 (struct load_progress_data): Add initializers.
11683 (load_section_callback): Update. Use "new".
11684 (clear_memory_write_data): Remove.
11685 (generic_load): Update.
11687 2018-02-27 Alan Hayward <alan.hayward@arm.com>
11689 * arch/aarch64.h: Use common/tdesc.h.
11691 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11693 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11694 architecture with a 64-bit ABI.
11696 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11698 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11699 ahead of target description loading.
11701 2018-02-26 Tom Tromey <tom@tromey.com>
11703 * stack.c (backtrace_command_1): Update.
11704 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11706 * python/py-framefilter.c (py_print_frame)
11707 (gdbpy_apply_frame_filter): Change type of "flags".
11708 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11710 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11711 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11712 * extension.h (enum frame_filter_flag): Rename from
11713 frame_filter_flags.
11714 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11715 (apply_ext_lang_frame_filter): Change type of "flags".
11716 * extension.c (apply_ext_lang_frame_filter): Change type of
11718 * extension-priv.h (struct extension_language_ops)
11719 <apply_frame_filter>: Change type of "flags".
11721 2018-02-26 Tom Tromey <tom@tromey.com>
11724 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
11725 off-by-one in py_end computation.
11726 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11728 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11731 2018-02-26 Tom Tromey <tom@tromey.com>
11733 * dwarf2read.c (struct variant_field): New.
11734 (struct nextfield) <variant>: New field.
11735 (dwarf2_add_field): Handle DW_TAG_variant_part.
11736 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11737 discriminated union.
11738 (read_structure_type): Handle DW_TAG_variant_part.
11739 (handle_struct_member_die): New function, extracted from
11740 process_structure_scope. Handle DW_TAG_variant.
11741 (process_structure_scope): Handle discriminated unions. Call
11742 handle_struct_member_die.
11744 2018-02-26 Tom Tromey <tom@tromey.com>
11746 * rust-lang.h (rust_last_path_segment): Declare.
11747 * rust-lang.c (rust_last_path_segment): Now public. Change
11749 (struct disr_info): Remove.
11750 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11751 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11752 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11753 (rust_enum_p, rust_enum_variant): New function.
11754 (rust_underscore_fields): Remove "offset" parameter.
11755 (rust_print_enum): New function.
11756 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11757 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11758 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
11760 (rust_internal_print_type): New function, from rust_print_type.
11762 (rust_print_type): Call rust_internal_print_type.
11763 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11764 Update enum handling.
11765 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11766 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11767 (rust_union_quirks): New functions.
11768 (process_full_comp_unit, process_full_type_unit): Call
11770 (process_structure_scope): Update rust_unions if necessary.
11772 2018-02-26 Tom Tromey <tom@tromey.com>
11774 * value.h (value_union_variant): Declare.
11775 * valops.c (value_union_variant): New function.
11776 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11777 (struct discriminant_info): New.
11778 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11780 (struct main_type) <flag_discriminated_union>: New field.
11782 2018-02-26 Tom Tromey <tom@tromey.com>
11784 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11785 unittests/unpack-selftests.c.
11786 * unittests/unpack-selftests.c: New file.
11787 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11789 2018-02-26 Yao Qi <yao.qi@linaro.org>
11791 * dwarf2read.c (struct partial_die_info) <read>: New method.
11792 (read_partial_die): Remove the declaration.
11793 (load_partial_dies): Update.
11794 (partial_die_info::partial_die_info):
11795 (read_partial_die): Change it to partial_die_info::read.
11797 2018-02-26 Yao Qi <yao.qi@linaro.org>
11799 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11800 (fixup_partial_die): Remove declaration.
11801 (scan_partial_symbols): Update.
11802 (partial_die_parent_scope): Likewise.
11803 (partial_die_full_name): Likewise.
11804 (fixup_partial_die): Change it to partial_die_info::fixup.
11806 2018-02-26 Yao Qi <yao.qi@linaro.org>
11808 * dwarf2read.c (read_partial_die): Update the declaration.
11809 (load_partial_dies): Caller update.
11810 (read_partial_die): Remove one argument abbrev_len.
11812 2018-02-26 Yao Qi <yao.qi@linaro.org>
11814 * dwarf2read.c (struct partial_die_info): Add ctor, delete
11815 assignment operator.
11816 (load_partial_dies): Use ctor and copy ctor.
11817 (read_partial_die): Update.
11818 (dwarf2_cu::find_partial_die): Use ctor.
11820 2018-02-26 Yao Qi <yao.qi@linaro.org>
11822 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11823 (find_partial_die_in_comp_unit): Change it to
11824 dwarf2_cu::find_partial_die.
11825 (find_partial_die): Update.
11827 2018-02-26 Yao Qi <yao.qi@linaro.org>
11829 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11832 2018-02-26 Yao Qi <yao.qi@linaro.org>
11834 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11836 2018-02-26 Alan Hayward <alan.hayward@arm.com>
11838 * arch/amd64.h: Use common/tdesc.h.
11839 * arch/i386.c: Likewise.
11840 * arch/i386.h: Likewise.
11841 * arch/tic6x.c: Likewise.
11842 * arch/tdesc.h: Move file from here...
11843 * common/tdesc.h: ...to here.
11844 * features/aarch64-core.c: Regenerate.
11845 * features/aarch64-fpu.c: Regenerate.
11846 * features/i386/32bit-avx.c: Regenerate.
11847 * features/i386/32bit-avx512.c: Regenerate.
11848 * features/i386/32bit-core.c: Regenerate.
11849 * features/i386/32bit-linux.c: Regenerate.
11850 * features/i386/32bit-mpx.c: Regenerate.
11851 * features/i386/32bit-pkeys.c: Regenerate.
11852 * features/i386/32bit-sse.c: Regenerate.
11853 * features/i386/64bit-avx.c: Regenerate.
11854 * features/i386/64bit-avx512.c: Regenerate.
11855 * features/i386/64bit-core.c: Regenerate.
11856 * features/i386/64bit-linux.c: Regenerate.
11857 * features/i386/64bit-mpx.c: Regenerate.
11858 * features/i386/64bit-pkeys.c: Regenerate.
11859 * features/i386/64bit-segments.c: Regenerate.
11860 * features/i386/64bit-sse.c: Regenerate.
11861 * features/i386/x32-core.c: Regenerate.
11862 * features/tic6x-c6xp.c: Regenerate.
11863 * features/tic6x-core.c: Regenerate.
11864 * features/tic6x-gp.c: Regenerate.
11865 * target-descriptions.c: Use common/tdesc.h.
11866 * target-descriptions.h: Likewise.
11868 2018-02-24 Tom Tromey <tom@tromey.com>
11870 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11871 (try_thread_db_load_from_dir, thread_db_load_search): Use
11873 (info_auto_load_libthread_db_compare): Return bool. Change
11875 (info_auto_load_libthread_db): Use std::vector, std::string.
11878 2018-02-24 Tom Tromey <tom@tromey.com>
11880 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11882 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11884 * gdbarch.c: Rebuild.
11885 * gdbarch.h: Rebuild.
11886 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11887 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11888 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11891 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
11893 * gdbtypes.h (sect_offset): Change type to uint64_t.
11894 (sect_offset_str): New function.
11895 * dwarf2read.c (create_addrmap_from_aranges): Use
11897 (error_check_comp_unit_head): Likewise.
11898 (create_debug_type_hash_table): Likewise.
11899 (read_cutu_die_from_dwo): Likewise.
11900 (init_cutu_and_read_dies): Likewise.
11901 (init_cutu_and_read_dies_no_follow): Likewise.
11902 (process_psymtab_comp_unit_reader): Likewise.
11903 (partial_die_parent_scope): Likewise.
11904 (peek_die_abbrev): Likewise.
11905 (process_queue): Likewise.
11906 (dwarf2_physname): Likewise.
11907 (read_namespace_alias): Likewise.
11908 (read_import_statement): Likewise.
11909 (create_dwo_cu_reader): Likewise.
11910 (create_cus_hash_table): Likewise.
11911 (lookup_dwo_cutu): Likewise.
11912 (inherit_abstract_dies): Likewise.
11913 (read_func_scope): Likewise.
11914 (read_call_site_scope): Likewise.
11915 (dwarf2_add_member_fn): Likewise.
11916 (read_common_block): Likewise.
11917 (read_module_type): Likewise.
11918 (read_typedef): Likewise.
11919 (read_subrange_type): Likewise.
11920 (load_partial_dies): Likewise.
11921 (read_partial_die): Likewise.
11922 (find_partial_die): Likewise.
11923 (read_str_index): Likewise.
11924 (dwarf2_string_attr): Likewise.
11925 (build_error_marker_type): Likewise.
11926 (lookup_die_type): Likewise.
11927 (dump_die_shallow): Likewise.
11928 (follow_die_ref): Likewise.
11929 (dwarf2_fetch_die_loc_sect_off): Likewise.
11930 (dwarf2_fetch_constant_bytes): Likewise.
11931 (follow_die_sig): Likewise.
11932 (get_signatured_type): Likewise.
11933 (get_DW_AT_signature_type): Likewise.
11934 (dwarf2_find_containing_comp_unit): Likewise.
11935 (set_die_type): Likewise.
11937 2018-02-21 John Baldwin <jhb@FreeBSD.org>
11939 * arch/aarch64.c: Include "common-defs.h".
11940 * arch/amd64.c: Likewise.
11941 * arch/i386.c: Likewise.
11943 2018-02-21 Tom Tromey <tom@tromey.com>
11945 * value.h: (extract_field_op): Update.
11946 * eval.c (extract_field_op): Return a const char *.
11947 * expression.h (parse_expression_for_completion): Update.
11948 * completer.c (complete_expression): Update.
11949 (add_struct_fields): Make fieldname const.
11950 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11951 (mark_completion_tag, parse_exp_in_context_1): Update.
11952 (parse_expression_for_completion): Change "name" to
11953 unique_xmalloc_ptr*.
11955 2018-02-21 Tom Tromey <tom@tromey.com>
11957 * infcall.c (call_function_by_hand_dummy): Use std::vector.
11959 2018-02-21 Yao Qi <yao.qi@linaro.org>
11961 * avr-tdep.c (avr_read_pc): Change parameter type to
11963 * gdbarch.sh (read_pc): Likewise.
11964 * gdbarch.c: Re-generated.
11965 * gdbarch.h: Re-generated.
11966 * hppa-tdep.c (hppa_read_pc): Change parameter type to
11968 * ia64-tdep.c (ia64_read_pc): Likewise.
11969 * mips-tdep.c (mips_read_pc): Likewise.
11970 * spu-tdep.c (spu_read_pc): Likewise.
11972 2018-02-21 Yao Qi <yao.qi@linaro.org>
11974 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11975 * regcache-dump.c: New file.
11976 * regcache.c: Move register_dump to regcache-dump.c.
11977 (maintenance_print_registers): Likewise.
11978 (maintenance_print_raw_registers): Likewise.
11979 (maintenance_print_cooked_registers): Likewise.
11980 (maintenance_print_register_groups): Likewise.
11981 (maintenance_print_remote_registers): Likewise.
11982 (_initialize_regcache): Likewise.
11983 * regcache.h (register_dump): Moved from regcache.c.
11985 2018-02-21 Yao Qi <yao.qi@linaro.org>
11987 * regcache.c (regcache::regcache): Update.
11988 (regcache::invalidate): Move it to detached_regcache::invalidate.
11989 (get_thread_arch_aspace_regcache): Update.
11990 (regcache::raw_update): Update.
11991 (regcache::cooked_read): Remove some code.
11992 (regcache::cooked_read_value): Likewise.
11993 (regcache::raw_write): Remove assert on m_readonly_p.
11994 (regcache::raw_supply_integer): Move it to
11995 detached_regcache::raw_supply_integer.
11996 (regcache::raw_supply_zeroed): Likewise.
11997 * regcache.h (detached_regcache) <raw_supply_integer>: New
11999 <raw_supply_zeroed, invalidate>: Likewise.
12000 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12001 <invalidate>: Likewise.
12002 <m_readonly_p>: Removed.
12004 2018-02-21 Yao Qi <yao.qi@linaro.org>
12006 * infcmd.c (get_return_value): Let stop_regs point to
12007 get_current_regcache.
12008 * regcache.c (regcache::regcache): Remove.
12009 (register_dump_reg_buffer): New class.
12010 (regcache_print): Adjust.
12011 * regcache.h (regcache): Remove constructors.
12013 2018-02-21 Yao Qi <yao.qi@linaro.org>
12015 * regcache.c (class register_dump): New class.
12016 (register_dump_regcache, register_dump_none): New class.
12017 (register_dump_remote, register_dump_groups): New class.
12018 (regcache_print): Update.
12019 * regcache.h (regcache_dump_what): Move it to regcache.c.
12020 (regcache) <dump>: Remove.
12022 2018-02-21 Yao Qi <yao.qi@linaro.org>
12024 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12026 (jit_unwind_reg_set_impl): Call raw_supply.
12027 (jit_frame_sniffer): Use reg_buffer_rw.
12028 * record-full.c (record_full_core_regbuf): Change its type.
12029 (record_full_core_open_1): Use reg_buffer_rw.
12030 (record_full_close): Likewise.
12031 (record_full_core_fetch_registers): Use regcache->raw_supply.
12032 (record_full_core_store_registers): Likewise.
12033 * regcache.c (regcache::get_register_status): Move it to
12035 (regcache_raw_set_cached_value): Remove.
12036 (regcache::raw_set_cached_value): Remove.
12037 (regcache::raw_write): Call raw_supply.
12038 (regcache::raw_supply): Move it to reg_buffer_rw.
12039 * regcache.h (regcache_raw_set_cached_value): Remove.
12040 (reg_buffer_rw): New class.
12042 2018-02-21 Yao Qi <yao.qi@linaro.org>
12044 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12045 readonly_detached_regcache.
12046 (dummy_frame_prev_register): Use regcache->cooked_read.
12047 * frame.c (frame_save_as_regcache): Change return type.
12048 (frame_pop): Update.
12049 * frame.h (frame_save_as_regcache): Update declaration.
12050 * inferior.h (get_infcall_suspend_state_regcache): Update
12052 * infrun.c (infcall_suspend_state) <registers>: use
12053 readonly_detached_regcache.
12054 (save_infcall_suspend_state): Don't use regcache_dup.
12055 (get_infcall_suspend_state_regcache): Change return type.
12056 * linux-fork.c (struct fork_info) <savedregs>: Change to
12057 readonly_detached_regcache.
12059 (fork_save_infrun_state): Don't use regcache_dup.
12060 (info_checkpoints_command): Adjust.
12061 * mi/mi-main.c (register_changed_p): Update declaration.
12062 (mi_cmd_data_list_changed_registers): Use
12063 readonly_detached_regcache.
12064 (register_changed_p): Change parameter type to
12065 readonly_detached_regcache.
12066 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12067 readonly_detached_regcache.
12068 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12069 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12071 (regcache::save): Move it to reg_buffer.
12072 (regcache::restore): Change parameter type.
12073 (regcache_dup): Remove.
12074 * regcache.h (reg_buffer) <save>: New method.
12075 (readonly_detached_regcache): New class.
12076 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12077 readonly_detached_regcache.
12078 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12080 2018-02-21 Yao Qi <yao.qi@linaro.org>
12082 * frame.c (frame_save_as_regcache): Use regcache method save.
12083 (frame_pop): Use regcache method restore.
12084 * infrun.c (restore_infcall_suspend_state): Likewise.
12085 * linux-fork.c (fork_load_infrun_state): Likewise.
12086 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12088 * regcache.c (regcache_save): Remove.
12089 (regcache::restore): More asserts.
12090 (regcache_cpy): Remove.
12091 * regcache.h (regcache_save): Remove the declaration.
12092 (regcache::restore): Move from private to public.
12093 Remove the friend declaration of regcache_cpy.
12094 (regcache_cpy): Remove declaration.
12096 2018-02-21 Yao Qi <yao.qi@linaro.org>
12098 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12099 parameter type to 'readable_regcache *'.
12100 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12101 * arm-tdep.c (arm_neon_quad_read): Likewise.
12102 (arm_pseudo_read): Likewise.
12103 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12104 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12105 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12106 * gdbarch.c: Re-generated.
12107 * gdbarch.h: Re-generated.
12108 * gdbarch.sh (pseudo_register_read): Change parameter type to
12109 'readable_regcache *'.
12110 (pseudo_register_read_value): Likewise.
12111 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12112 (h8300_pseudo_register_read): Likewise.
12113 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12114 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12115 (i386_pseudo_register_read_into_value): Likewise.
12116 (i386_pseudo_register_read_value): Likewise.
12117 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12119 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12120 * m32c-tdep.c (m32c_raw_read): Likewise.
12121 (m32c_read_flg): Likewise.
12122 (m32c_banked_register): Likewise.
12123 (m32c_banked_read): Likewise.
12124 (m32c_sb_read): Likewise.
12125 (m32c_part_read): Likewise.
12126 (m32c_cat_read): Likewise.
12127 (m32c_r3r2r1r0_read): Likewise.
12128 (m32c_pseudo_register_read): Likewise.
12129 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12130 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12131 (mep_pseudo_cr64_read): Likewise.
12132 (mep_pseudo_register_read): Likewise.
12133 * mips-tdep.c (mips_pseudo_register_read): Likewise.
12134 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12135 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12136 * regcache.c (regcache::raw_read): Move it to readable_regcache.
12137 (regcache::cooked_read): Likewise.
12138 (regcache::cooked_read_value): Likewise.
12139 (regcache_cooked_read_signed):
12140 (regcache::cooked_read): Likewise.
12141 * regcache.h (readable_regcache): New class.
12142 (regcache): Inherit readable_regcache. Move some methods to
12144 * rl78-tdep.c (rl78_pseudo_register_read): Change
12145 parameter type to 'readable_regcache *'.
12146 * rs6000-tdep.c (do_regcache_raw_read): Remove.
12147 (e500_pseudo_register_read): Change parameter type to
12148 'readable_regcache *'.
12149 (dfp_pseudo_register_read): Likewise.
12150 (vsx_pseudo_register_read): Likewise.
12151 (efpr_pseudo_register_read): Likewise.
12152 * s390-tdep.c (s390_pseudo_register_read): Likewise.
12153 * sh-tdep.c (sh_pseudo_register_read): Likewise.
12154 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12155 (sh64_pseudo_register_read): Likewise.
12156 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12157 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12158 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12159 (spu_pseudo_register_read): Likewise.
12160 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12161 (xtensa_pseudo_register_read): Likewise.
12163 2018-02-21 Yao Qi <yao.qi@linaro.org>
12165 * regcache.c (regcache::regcache): Call reg_buffer ctor.
12166 (regcache::arch): Move it to reg_buffer::arch.
12167 (regcache::register_buffer): Likewise.
12168 (regcache::assert_regnum): Likewise.
12169 (regcache::num_raw_registers): Likewise.
12170 * regcache.h (reg_buffer): New class.
12171 (regcache): Inherit reg_buffer.
12173 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
12175 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12176 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12178 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
12180 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12182 2018-02-19 Alan Hayward <alan.hayward@arm.com>
12184 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12185 (SFILES): Remove common/*.c files.
12186 (COMMON_OBS): Remove some *.o files built from common/*.c files.
12187 * common/common.host: Add common reference.
12188 * configure.ac: Likewise.
12189 * configure: Regenerate.
12191 2018-02-16 Yao Qi <yao.qi@linaro.org>
12193 * block.c (block_namespace_info): Inherit allocate_on_obstack.
12194 (block_initialize_namespace): Use new.
12195 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12196 (dwarf2_free_objfile): Use delete.
12197 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12198 (copy_type_recursive): Use new.
12199 * gdb_obstack.h (allocate_on_obstack): New.
12201 2018-02-15 Yao Qi <yao.qi@linaro.org>
12204 * inferior.c (exit_inferior_1): Reset inf->control.
12206 2018-02-15 Joel Brobecker <brobecker@adacore.com>
12208 * ada-lang.c (ada_to_fixed_value_create): Delete advance
12211 2018-02-14 Pedro Alves <palves@redhat.com>
12213 * frame-unwind.c (frame_unwind_try_unwinder): Always call
12214 frame_cleanup_after_sniffer on exception.
12216 2018-02-14 Tom Tromey <tom@tromey.com>
12218 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12220 (solib_bfd_open): Make pathname const.
12221 * solib.c (solib_bfd_open): Make pathname const.
12222 * solib-spu.c (spu_bfd_fopen): Make name const.
12223 (spu_bfd_open): Make pathname const.
12224 * solib-darwin.c (darwin_bfd_open): Make pathname const.
12225 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12227 2018-02-14 Tom Tromey <tom@tromey.com>
12229 * symfile.c (symfile_bfd_open): Update.
12230 * source.h (openp, source_full_path_of, find_and_open_source):
12231 Change argument type to unique_xmalloc_ptr.
12232 * source.c (openp): Take a unique_xmalloc_ptr.
12233 (source_full_path_of, find_and_open_source): Likewise.
12234 (open_source_file, symtab_to_fullname): Update.
12235 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12236 unique_xmalloc_ptr.
12237 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12238 (exec_file_find): Update.
12239 * psymtab.c (psymtab_to_fullname): Update.
12240 * nto-tdep.h (nto_find_and_open_solib): Update.
12241 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12242 unique_xmalloc_ptr.
12243 * exec.c (exec_file_attach): Update.
12244 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12245 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12247 2018-02-14 Tom Tromey <tom@tromey.com>
12249 * solib.c: Include source.h.
12250 * nto-tdep.c: Include source.h.
12251 * mi/mi-cmd-env.c: Include source.h.
12252 * infcmd.c: Include source.h.
12253 * exec.c: Include source.h.
12254 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12255 (add_path, directory_switch, source_path, init_source_path): Move
12257 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12258 (add_path, directory_switch, source_path, init_source_path):
12261 2018-02-14 Tom Tromey <tom@tromey.com>
12263 * solist.h (exec_file_find, solib_find): Return
12264 unique_xmalloc_ptr.
12265 (solib_bfd_fopen): Take a const char *.
12266 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12267 (exec_file_find, solib_find): Likewise.
12268 (solib_bfd_fopen): Do not take ownership of "pathname".
12269 (solib_bfd_open): Use unique_xmalloc_ptr.
12270 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12271 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12272 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12273 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12275 2018-02-14 Joel Brobecker <brobecker@adacore.com>
12277 * ada-lang.c (name_match_type_from_name): Remove reference to
12278 ada_name_for_lookup in function's documentation.
12279 * ada-lang.h (ada_name_for_lookup): Delete declaration.
12281 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12283 * defs.h (enum openp_flags): New enum.
12284 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12285 Move to enum openp_flags.
12286 (openp_flags): New enum flags.
12287 (openp): Change parameter type to openp_flags.
12288 * source.c (openp): Change parameter type to openp_flags.
12289 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12290 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12292 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12294 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12297 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
12299 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12301 (class dwarf2_queue_guard): ...the destructor of this new class.
12302 (dw2_do_instantiate_symtab): Create instance of the new class
12303 dwarf2_queue_guard, remove cleanup.
12305 2018-02-09 Tom Tromey <tom@tromey.com>
12307 * source.c (find_source_lines): Don't reference past the end of
12310 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12312 * remote.c (remote_btrace_maybe_reopen): Change error message.
12313 * btrace.c (btrace_enable): Likewise.
12314 (parse_xml_btrace): Likewise.
12315 (parse_xml_btrace_conf): Likewise.
12317 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12319 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12320 (linux_enable_pt, linux_enable_bts): Call
12321 diagnose_perf_event_open_fail.
12323 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12325 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12326 Remove parameter and change return type. Update callers. Move it.
12327 (linux_enable_bts, linux_enable_pt): Improve error message.
12328 (linux_enable_pt): Remove zero buffer size check.
12329 (linux_enable_btrace): Improve error messages. Remove NULL return
12332 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12334 * btrace.c (btrace_enable): Remove target_supports_btrace call.
12335 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12336 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12337 (linux_supports_pt, linux_supports_btrace): Remove.
12338 (linux_enable_bts): Call cpu_supports_bts.
12339 * nat/linux-btrace.h (linux_supports_btrace): Remove.
12340 * remote.c (remote_supports_btrace): Remove.
12341 (init_remote_ops): Remove remote_supports_btrace.
12342 * target-delegates.c: Regenerated.
12343 * target.c (target_supports_btrace): Remove.
12344 * target.h (target_ops) <to_supports_btrace>: Remove
12345 (target_supports_btrace): Remove.
12346 * x86-linux-nat.c (x86_linux_create_target): Remove
12347 linux_supports_btrace.
12349 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12351 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12353 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12354 exception and use message in own exception.
12356 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12358 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12359 (perf_event_pt_event_type): Use gdb_file_up.
12360 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12361 scoped_fd, and scoped_mmap.
12363 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12365 * common/scoped_mmap.h: New.
12366 * unittests/scoped_mmap-selftest.c: New.
12367 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12368 unittests/scoped_mmap-selftest.c.
12370 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12372 * common/scoped_fd.h: New.
12373 * unittests/scoped_fd-selftest.c: New.
12374 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12375 unittests/scoped_fd-selftest.c.
12377 2018-02-09 Tom Tromey <tom@tromey.com>
12379 * auto-load.c (auto_load_section_scripts): Use
12380 gdb::unique_xmalloc_ptr.
12382 2018-02-09 Tom Tromey <tom@tromey.com>
12384 * auto-load.c (execute_script_contents): Use std::string.
12386 2018-02-09 Joel Brobecker <brobecker@adacore.com>
12388 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12389 Python function, rather than a new command.
12391 2018-02-08 Tom Tromey <tom@tromey.com>
12393 * solib.c (solib_find_1): Use std::string.
12394 (solib_bfd_fopen): Use unique_xmalloc_ptr.
12396 2018-02-08 Tom Tromey <tom@tromey.com>
12398 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12400 2018-02-08 Tom Tromey <tom@tromey.com>
12402 * source.c (find_source_lines): Use gdb::def_vector.
12404 2018-02-08 Tom Tromey <tom@tromey.com>
12406 * macrocmd.c (struct temporary_macro_definition): New.
12407 (macro_define_command): Use temporary_macro_definition. Remove
12409 (free_macro_definition_ptr): Remove.
12411 2018-02-08 Tom Tromey <tom@tromey.com>
12413 * macroexp.c (maybe_expand): Use std::string.
12415 2018-02-08 Tom Tromey <tom@tromey.com>
12417 * macroexp.c (struct macro_buffer): Add initializers for some
12419 (init_buffer, init_shared_buffer, free_buffer)
12420 (free_buffer_return_text): Remove.
12421 (macro_buffer): New constructors.
12422 (~macro_buffer): New destructor.
12423 (macro_buffer::set_shared): New method.
12424 (macro_buffer::resize_buffer, macro_buffer::appendc)
12425 (macro_buffer::appendmem): Now methods, not free functions.
12426 (set_token, append_tokens_without_splicing, stringify)
12427 (macro_stringify): Update.
12428 (gather_arguments): Change return type. Remove argc_p argument,
12429 add args_ptr argument. Use std::vector.
12430 (substitute_args): Remove argc argument. Accept std::vector.
12431 (expand): Update. Use std::vector.
12432 (scan, macro_expand, macro_expand_next): Update.
12434 2018-02-08 Tom Tromey <tom@tromey.com>
12436 * symtab.c (default_collect_symbol_completion_matches_break_on):
12437 Use unique_xmalloc_ptr.
12438 * macroscope.h: (sal_macro_scope, user_macro_scope)
12439 (default_macro_scope): Return unique_xmalloc_ptr.
12440 * macroscope.c (sal_macro_scope, user_macro_scope)
12441 (default_macro_scope): Return unique_xmalloc_ptr.
12442 * macroexp.h (macro_expand, macro_expand_once): Return
12443 unique_xmalloc_ptr.
12444 * macroexp.c (macro_expand, macro_expand_once): Return
12445 unique_xmalloc_ptr.
12446 * macrocmd.c (macro_expand_command, macro_expand_once_command)
12447 (info_macro_command, info_macros_command): Use
12448 unique_xmalloc_ptr.
12449 * compile/compile-c-support.c (write_macro_definitions): Use
12450 unique_xmalloc_ptr.
12451 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12453 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
12455 * value.c (value_static_field): Assign field type instead of
12456 containing type when returning an optimized out value.
12458 2018-02-06 Yao Qi <yao.qi@linaro.org>
12460 * ft32-tdep.c (ft32_read_pc): Remove.
12461 (ft32_write_pc): Remove.
12462 (ft32_gdbarch_init): Update.
12463 * m32r-tdep.c (m32r_read_pc): Remove.
12464 (m32r_gdbarch_init): Update.
12465 * mep-tdep.c (mep_read_pc): Remove.
12466 (mep_gdbarch_init): Update.
12467 * microblaze-tdep.c (microblaze_write_pc): Remove.
12468 (microblaze_gdbarch_init): Update.
12469 * mn10300-tdep.c (mn10300_read_pc): Remove.
12470 (mn10300_write_pc): Remove.
12471 (mn10300_gdbarch_init): Update.
12472 * moxie-tdep.c (moxie_read_pc): Remove.
12473 (moxie_write_pc): Remove.
12474 (moxie_gdbarch_init): Update.
12476 2018-02-06 Yao Qi <yao.qi@linaro.org>
12478 * expprint.c (print_subexp_standard): Handle
12479 OP_F77_UNDETERMINED_ARGLIST.
12480 (dump_subexp_body_standard): Likewise.
12482 2018-02-05 Alan Hayward <alan.hayward@arm.com>
12484 * target-descriptions.c (tdesc_element_visitor) Add empty
12486 (tdesc_type): Move make_gdb_type from here.
12487 (tdesc_type_builtin): Likewise.
12488 (tdesc_type_vector): Likewise.
12489 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12490 (make_gdb_type_struct): Move from tdesc_type_with_fields.
12491 (make_gdb_type_union): Likewise.
12492 (make_gdb_type_flags): Likewise.
12493 (make_gdb_type_enum): Likewise.
12494 (make_gdb_type): New function.
12495 (tdesc_register_type): Use static make_gdb_type.
12497 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
12499 * infcmd.c (default_print_one_register_info): Align natural-format
12500 column values consistently one under another.
12501 (pad_to_column): New function.
12503 2018-02-05 Joel Brobecker <brobecker@adacore.com>
12505 * dwarf2read.c (dwarf2_physname): Move commment.
12507 2018-02-01 Leszek Swirski <leszeks@google.com>
12509 * varobj.c (varobj_formatted_print_options): Allow recursive
12510 pretty printing if pretty printing is enabled.
12512 2018-02-01 Leszek Swirski <leszeks@google.com>
12514 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12515 names after a structop as a filename.
12517 2018-02-01 Yao Qi <yao.qi@linaro.org>
12519 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12520 (arm_record_coproc_data_proc): Likewise.
12522 2018-02-01 Yao Qi <yao.qi@linaro.org>
12524 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12526 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
12528 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12529 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12531 2018-01-31 Pedro Alves <palves@redhat.com>
12533 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12534 * inflow.c (child_terminal_save_inferior): Wrap reference to
12535 tcgetpgrp in HAVE_TERMIOS_H.
12536 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12538 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12539 always iterate over all inferiors.
12540 (gdbsim_cntrl_c): Adjust.
12541 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12543 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12545 * gdbtypes.c (lookup_array_range_type): Make sure the array's
12546 index type is objfile-owned if the element type is as well.
12548 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12552 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
12554 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12555 "features/s390x-linux64.c".
12556 (_initialize_s390_linux_tdep): Remove initialization of tdescs
12557 s390_linux32 and s390x_linux64.
12558 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12560 * s390-tdep.c: Include "features/s390-linux32.c" and
12561 "features/s390x-linux64.c".
12562 (s390_tdesc_valid): Add check for tdesc_has_registers.
12563 (s390_gdbarch_init): Make sure there is always a valid tdesc.
12564 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12565 tdesc_s390x_linux64.
12566 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12567 tdesc_s390x_linux64 to...
12568 * s390-tdep.h: ...here.
12570 2018-01-30 Pedro Alves <palves@redhat.com>
12573 * config.in, configure: Regenerate.
12574 * configure.ac: Check for getpgid.
12575 * go32-nat.c (go32_pass_ctrlc): New.
12576 (go32_target): Install it.
12577 * inf-child.c (inf_child_target): Install
12578 child_terminal_save_inferior, child_pass_ctrlc and
12580 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12581 (inf_ptrace_target): No longer install it.
12582 * infcmd.c (interrupt_target_1): Adjust.
12583 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12584 (child_interrupt): Declare.
12585 (inferior::terminal_state): New.
12586 * inflow.c (struct terminal_info): Update comments.
12587 (inferior_process_group): Delete.
12588 (terminal_is_ours): Delete.
12589 (gdb_tty_state): New.
12590 (child_terminal_init): Adjust.
12591 (is_gdb_terminal, sharing_input_terminal_1)
12592 (sharing_input_terminal): New functions.
12593 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
12594 Set the process's actual process group in the foreground if
12595 possible. Handle is_ours_for_output/is_ours distinction. Don't
12596 mark terminal as the inferior's if not sharing GDB's terminal.
12597 Don't check attach_flag.
12598 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12599 pass down a target_terminal_state.
12600 (child_terminal_save_inferior): New, factored out from ...
12601 (child_terminal_ours_1): ... this. Handle
12602 target_terminal_state::is_ours_for_output.
12603 (child_interrupt, child_pass_ctrlc): New.
12604 (inflow_inferior_exit): Clear the inferior's terminal_state.
12605 (copy_terminal_info): Copy the inferior's terminal state.
12606 (_initialize_inflow): Remove reference to terminal_is_ours.
12607 * inflow.h (inferior_process_group): Delete.
12608 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12609 * procfs.c (procfs_target): Don't install procfs_interrupt.
12610 (procfs_interrupt): Delete.
12611 * remote.c (remote_serial_quit_handler): Adjust.
12612 (remote_interrupt): Remove ptid parameter. Adjust.
12613 * target-delegates.c: Regenerate.
12614 * target.c: Include "terminal.h".
12615 (target_terminal::terminal_state): Rename to ...
12616 (target_terminal::m_terminal_state): ... this.
12617 (target_terminal::init): Adjust.
12618 (target_terminal::inferior): Adjust to per-inferior
12620 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12621 (target_terminal::ours, target_terminal::ours_for_output): Use
12622 target_terminal_is_ours_kind.
12623 (target_interrupt): Remove ptid parameter. Adjust.
12624 (default_target_pass_ctrlc): Adjust.
12625 * target.h (target_ops::to_terminal_save_inferior): New field.
12626 (target_ops::to_interrupt): Remove ptid_t parameter.
12627 (target_interrupt): Remove ptid_t parameter. Update comment.
12628 (target_pass_ctrlc): Update comment.
12629 * target/target.h (target_terminal_state): New scoped enum,
12630 factored out of ...
12631 (target_terminal::terminal_state): ... here.
12632 (target_terminal::inferior): Update comments.
12633 (target_terminal::restore_inferior): New.
12634 (target_terminal::is_inferior, target_terminal::is_ours)
12635 (target_terminal::is_ours_for_output): Adjust.
12636 (target_terminal::scoped_restore_terminal_state): Adjust to
12637 rename, and call restore_inferior() instead of inferior().
12638 (target_terminal::scoped_restore_terminal_state::m_state): Change
12640 (target_terminal::terminal_state): Rename to ...
12641 (target_terminal::m_terminal_state): ... this and change type.
12643 2018-01-30 Pedro Alves <palves@redhat.com>
12645 * linux-nat.c (wait_for_signal): New function.
12646 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12648 (async_terminal_is_ours)
12649 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12650 (linux_nat_add_target): Don't override
12651 to_terminal_inferior/to_terminal_ours.
12653 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
12655 * remote.c (remote_follow_fork): Don't call "detach_inferior".
12657 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
12659 * dwarf2read.c (free_dwo_files): Add forward-declaration.
12660 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12661 dwarf2_per_objfile_free here.
12662 (dwarf2_per_objfile_free): Remove.
12663 (_initialize_dwarf2_read): Don't register
12664 dwarf2_per_objfile_free as a registry cleanup.
12666 2018-01-27 Eli Zaretskii <eliz@gnu.org>
12668 Avoid compilation errors in MinGW native builds
12670 The error is triggered by including python-internal.h, and the
12673 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12674 from build-gnulib/import/math.h:27,
12675 from d:/usr/Python26/include/pyport.h:235,
12676 from d:/usr/Python26/include/Python.h:58,
12677 from python/python-internal.h:94,
12678 from python/py-arch.c:24:
12679 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12683 This happens because Python headers define 'hypot' to expand t
12684 '_hypot' in the Windows builds.
12685 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12686 'hypoth'. This avoids a compilation error.
12688 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12690 * MAINTAINERS (Write After Approval): Fix ordering.
12692 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12694 * MAINTAINERS (Write After Approval): Add Alan Hayward.
12696 2018-01-26 Alan Modra <amodra@gmail.com>
12698 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12699 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12700 Remove nop. Make const. Comment.
12701 (powerpc32_plt_stub_so_2): New.
12702 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12703 Correct count. Update uses.
12704 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12705 Move common code reading PLT entry word. Correct
12706 powerpc32_plt_stub PLT address calculation.
12707 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12708 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12709 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12710 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12711 (ppc64_standard_linkage8): Likewise.
12712 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12713 Correct insns description.
12714 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12716 2018-01-24 Pedro Alves <palves@redhat.com>
12718 GCC PR libstdc++/83906
12719 * gdbtypes.c (operator==(const dynamic_prop &,
12720 const dynamic_prop &)): New.
12721 (operator==(const range_bounds &, const range_bounds &)): New.
12722 (check_types_equal): Use them instead of memcmp.
12723 * gdbtypes.h (operator==(const dynamic_prop &,
12724 const dynamic_prop &)): Declare.
12725 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12726 (operator==(const range_bounds &, const range_bounds &)): Declare.
12727 (operator!=(const range_bounds &, const range_bounds &)): Declare.
12729 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12731 * s390-linux-tdep.c (s390_record_address_mask)
12732 (s390_record_calc_disp_common, s390_record_calc_disp)
12733 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12734 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12735 (s390_process_record): Move to s390-tdep.c.
12736 (s390_linux_init_abi_any): Adjust.
12737 * s390-tdep.c (s390_record_address_mask)
12738 (s390_record_calc_disp_common, s390_record_calc_disp)
12739 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12740 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12741 (s390_process_record): Moved from s390-linux-tdep.c
12742 (s390_gdbarch_init): Adjust.
12744 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12746 * s390-linux-nat.c (s390-tdep.h): New include.
12747 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12748 (HFILES_NO_SRCDIR): Add s390-tdep.h.
12749 (ALLDEPFILES): Add s390-tdep.c.
12750 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12751 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12752 * s390-tdep.h: ...this. New file.
12753 * s390-linux-tdep.c (s390-tdep.h): New include.
12754 (_initialize_s390_tdep): Rename to...
12755 (_initialize_s390_linux_tdep): ...this and adjust.
12756 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12757 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12759 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12760 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12761 (s390_is_partial_instruction, s390_software_single_step)
12762 (is_non_branch_ril, s390_displaced_step_copy_insn)
12763 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12764 (s390_prologue_data, s390_addr, s390_store, s390_load)
12765 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12766 (s390_register_call_saved, s390_guess_tracepoint_registers)
12767 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12768 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12769 (s390_pseudo_register_name, s390_pseudo_register_type)
12770 (s390_pseudo_register_read, s390_pseudo_register_write)
12771 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12772 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12773 (s390_addr_bits_remove, s390_address_class_type_flags)
12774 (s390_address_class_type_flags_to_name)
12775 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12776 (s390_function_arg_float, s390_function_arg_vector)
12777 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12778 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12779 (s390_frame_align, s390_register_return_value, s390_return_value)
12780 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12781 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12782 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12783 (s390_trad_frame_prev_register, s390_unwind_cache)
12784 (s390_prologue_frame_unwind_cache)
12785 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12786 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12787 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12788 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12789 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12790 (s390_frame_base_address, s390_local_base_address)
12791 (s390_frame_base, s390_gcc_target_options)
12792 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12793 (s390_validate_reg_range, s390_tdesc_valid)
12794 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12795 * s390-tdep.c: ...this. New file.
12797 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12799 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12800 (s390_process_record, s390_gdbarch_tdep_alloc)
12801 (s390_linux_init_abi_any): Use/set new hook.
12803 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12805 * s390-linux-tdep.c (osabi.h): New include.
12806 (s390_linux_init_abi_31, s390_linux_init_abi_64)
12807 (s390_linux_init_abi_any): New functions.
12808 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12810 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12812 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12813 tdesc_has_registers check
12815 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12817 * s390-linux-tdep.c (s390_tdesc_valid): New function.
12818 (s390_validate_reg_range): New macro.
12819 (s390_gdbarch_init): Adjust.
12821 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12823 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12824 (s390_gdbarch_tdep_alloc): Adjust.
12825 (s390_gdbarch_init): Adjust.
12827 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12829 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12830 <have_tdb>: Change type to bool.
12831 (s390_gdbarch_tdep_alloc): Adjust.
12832 (s390_gdbarch_init): Adjust.
12834 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12836 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12837 (gdbarch_tdep) <have_upper, have_vx>: New fields.
12838 (s390_gdbarch_tdep_alloc): New function.
12839 (s390_gdbarch_init): Allocate tdep at start and use its fields
12840 instead of separate variables.
12842 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12844 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12845 when looking for cached gdbarch and add comment for remaining.
12847 2018-01-22 Pedro Alves <palves@redhat.com>
12848 Sergio Durigan Junior <sergiodj@redhat.com>
12850 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12853 2018-01-22 Maciej W. Rozycki <macro@mips.com>
12855 * MAINTAINERS: Update my company e-mail address.
12857 2018-01-22 Yao Qi <yao.qi@linaro.org>
12859 * regcache.c (cooked_write_test): New function.
12860 (_initialize_regcache): Register the test.
12862 2018-01-22 Yao Qi <yao.qi@linaro.org>
12864 * ia64-tdep.c (ia64_pseudo_register_read): Call
12865 regcache->cooked_read instead of regcache_cooked_read_unsigned.
12866 * m32c-tdep.c (m32c_cat_read): Likewise.
12867 (m32c_r3r2r1r0_read): Likewise.
12868 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12869 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12871 2018-01-22 Yao Qi <yao.qi@linaro.org>
12873 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12874 method raw_read instead of regcache_raw_read.
12875 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12876 * arm-tdep.c (arm_neon_quad_read): Likewise.
12877 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12878 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12879 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12880 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12881 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12882 (i386_pseudo_register_read_into_value): Likewise.
12883 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12884 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12885 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12886 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12887 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12888 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12889 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12890 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12891 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12893 2018-01-22 Yao Qi <yao.qi@linaro.org>
12895 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12896 * configure.tgt: Remove target mt.
12897 * mt-tdep.c: Remove.
12898 * regcache.c (cooked_read_test): Remove the check for mt.
12900 2018-01-22 Yao Qi <yao.qi@linaro.org>
12902 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12903 instead of gdbarch_pseudo_register_read_value.
12905 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12907 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12910 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12912 * linespec.c (create_sals_line_offset): Remove code that preserved
12913 the symtab_and_line's line number.
12915 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12917 * varobj.c (varobj_create): Don't set valid_block when creating a
12920 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12922 * varobj.c (varobj_create): Remove out of date comment.
12924 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12927 * ada-exp.y (write_var_from_sym): Pass extra parameter when
12928 updating innermost block.
12929 * parse.c (innermost_block_tracker::update): Take extra type
12930 parameter, and check types match before updating innermost block.
12931 (write_dollar_variable): Update innermost block for registers.
12932 * parser-defs.h (enum innermost_block_tracker_type): New enum.
12933 (innermost_block_tracker::innermost_block_tracker): Initialise
12935 (innermost_block_tracker::reset): Take type parameter.
12936 (innermost_block_tracker::update): Take type parameter, and pass
12937 type through as needed.
12938 (innermost_block_tracker::m_types): New member.
12939 * varobj.c (varobj_create): Pass type when reseting innermost
12942 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12944 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12945 * ada-lang.c (resolve_subexp): Likewise.
12946 * breakpoint.c (set_breakpoint_condition) Likewise.
12947 (watch_command_1) Likewise.
12948 * c-exp.y (variable): Likewise.
12949 * d-exp.y (PrimaryExpression): Likewise.
12950 * f-exp.y (variable): Likewise.
12951 * go-exp.y (variable): Likewise.
12952 * m2-exp.y (variable): Likewise.
12953 * objfiles.c (objfile::~objfile): Likewise.
12954 * p-exp.y (variable): Likewise.
12955 * parse.c (innermost_block): Change type.
12956 * parser-defs.h (class innermost_block_tracker): New.
12957 (innermost_block): Change to innermost_block_tracker.
12958 * printcmd.c (display_command): Switch to innermost_block API.
12959 (do_one_display): Likewise.
12960 * rust-exp.y (do_one_display): Likewise.
12961 * symfile.c (clear_symtab_users): Likewise.
12962 * varobj.c (varobj_create): Switch to innermost_block API, replace
12963 use of innermost_block with block stored on varobj object.
12965 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12967 * expression.h (innermost_block): Remove declaration.
12968 * varobj.c: Add 'parser-defs.h' include.
12970 2018-01-19 Tom Tromey <tom@tromey.com>
12972 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12973 symbols in the static and global blocks.
12975 2018-01-19 James Clarke <jrtc27@jrtc27.com>
12977 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12978 gdb_ptrace.h, and move including gdb_wait.h ...
12979 * nat/linux-ptrace.h: ... to here.
12981 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12983 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12984 inf_ptrace_detach_success.
12985 (inf_ptrace_detach_success): Add inferior parameter, use it
12986 instead of inferior_ptid, pass it to detach_inferior.
12987 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12989 * inferior.c (detach_inferior): Add overload that takes an
12991 * inferior.h (detach_inferior): Likewise.
12992 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12993 use inferior_ptid, adjust call to inf_ptrace_detach_success.
12994 * linux-thread-db.c (thread_db_detach): Use inf parameter.
12996 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12998 * target.h (struct target_ops) <to_detach>: Add inferior
13000 (target_detach): Likewise.
13001 * target.c (dispose_inferior): Pass inferior down.
13002 (target_detach): Pass inferior down. Assert that it is equal to
13003 the current inferior.
13004 * aix-thread.c (aix_thread_detach): Pass inferior down.
13005 * corefile.c (core_file_command): Pass current_inferior() down.
13006 * corelow.c (core_detach): Add inferior parameter.
13007 * darwin-nat.c (darwin_detach): Likewise.
13008 * gnu-nat.c (gnu_detach): Likewise.
13009 * inf-ptrace.c (inf_ptrace_detach): Likewise.
13010 * infcmd.c (detach_command): Pass current_inferior() down to
13012 * infrun.c (follow_fork_inferior): Pass parent_inf to
13014 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13016 * linux-nat.c (linux_nat_detach): Add inferior parameter.
13017 * linux-thread-db.c (thread_db_detach): Likewise.
13018 * nto-procfs.c (procfs_detach): Likewise.
13019 * procfs.c (procfs_detach): Likewise.
13020 * record.c (record_detach): Likewise.
13021 * record.h (struct inferior): Forward-declare.
13022 (record_detach): Add inferior parameter.
13023 * remote-sim.c (gdbsim_detach): Likewise.
13024 * remote.c (remote_detach_1): Likewise.
13025 (remote_detach): Likewise.
13026 (extended_remote_detach): Likewise.
13027 * sol-thread.c (sol_thread_detach): Likewise.
13028 * target-debug.h (target_debug_print_inferior_p): New macro.
13029 * target-delegates.c: Re-generate.
13030 * top.c (kill_or_detach): Pass inferior down to target_detach.
13031 * windows-nat.c (windows_detach): Add inferior parameter.
13033 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13035 * target.h (struct target_ops) <to_detach>: Remove args
13037 (target_detach): Likewise.
13038 * target.c (dispose_inferior): Adjust.
13039 (target_detach): Remove args parameter, adjust.
13040 * aix-thread.c (aix_thread_detach): Adjust.
13041 * corefile.c (core_file_command): Adjust.
13042 * corelow.c (core_detach): Adjust.
13043 * darwin-nat.c (darwin_detach): Adjust.
13044 * gnu-nat.c (gnu_detach): Adjust.
13045 * inf-ptrace.c (inf_ptrace_detach): Adjust.
13046 * infcmd.c (detach_command): Adjust
13047 * infrun.c (follow_fork_inferior): Adjust.
13048 (handle_vfork_child_exec_or_exit): Adjust.
13049 * linux-fork.c (linux_fork_detach): Remove args parameter.
13050 * linux-fork.h (linux_fork_detach): Likewise.
13051 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13052 * linux-thread-db.c (thread_db_detach): Likewise.
13053 * nto-procfs.c (procfs_detach): Likewise.
13054 * procfs.c (procfs_detach): Likewise.
13055 (do_detach): Remove signo parameter.
13056 * record.c (record_detach): Remove args parameter.
13057 * record.h (record_detach): Likewise.
13058 * remote-sim.c (gdbsim_detach): Likewise.
13059 * remote.c (remote_detach_1): Likewise.
13060 (remote_detach): Likewise.
13061 (extended_remote_detach): Likewise.
13062 * sol-thread.c (sol_thread_detach): Likewise.
13063 * target-delegates.c: Re-generate.
13064 * top.c (struct qt_args) <args>: Remove field.
13065 (kill_or_detach): Don't pass args.
13066 (quit_force): Don't set args.
13067 * windows-nat.c (windows_detach): Remove args parameter.
13069 2018-01-19 Yao Qi <yao.qi@linaro.org>
13071 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13072 (arm_linux_init_abi): Install it.
13074 2018-01-19 Yao Qi <yao.qi@linaro.org>
13076 * osabi.c (gdb_osabi_names): Extend the regexp for
13077 arm-linux-gnueabihf.
13079 2018-01-18 Yao Qi <yao.qi@linaro.org>
13081 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13083 (abbrev_table::add_abbrev): Update.
13084 (abbrev_table::lookup_abbrev): Update.
13086 2018-01-18 Yao Qi <yao.qi@linaro.org>
13088 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13090 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
13092 * compile/compile.c (compile_to_object): Convert "triplet_rx"
13095 2018-01-17 Tom Tromey <tom@tromey.com>
13097 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
13099 2018-01-17 Tom Tromey <tom@tromey.com>
13101 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13102 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13103 (create_array_type_with_stride): Update.
13104 * dwarf2read.c (set_die_type): Update.
13106 2018-01-17 Tom Tromey <tom@tromey.com>
13108 * dwarf2read.c (delayed_method_info): Remove typedef.
13109 (dwarf2_cu::method_info): Now a std::vector.
13110 (add_to_method_list): Update.
13111 (free_delayed_list): Remove.
13112 (compute_delayed_physnames): Update.
13113 (process_full_comp_unit, process_full_type_unit): Clear the method
13114 list. Remove cleanups.
13115 (psymtab_include_file_name): Add name_holder parameter. Use
13116 unique_xmalloc_ptr.
13117 (dwarf_decode_lines): Update.
13119 2018-01-17 Tom Tromey <tom@tromey.com>
13120 Simon Marchi <simon.marchi@ericsson.com>
13122 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13123 (dwarf2_per_objfile::free_cached_comp_units)
13124 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13125 (init_cutu_and_read_dies_no_follow): Update.
13126 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13127 (dwarf2_cu::~dwarf2_cu): New.
13128 (free_heap_comp_unit, free_stack_comp_unit): Remove.
13129 (age_cached_comp_units, free_one_cached_comp_unit): Update.
13131 2018-01-17 Tom Tromey <tom@tromey.com>
13132 Simon Marchi <simon.marchi@ericsson.com>
13134 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13135 (struct die_reader_specs) <abbrev_table>: New member.
13136 (struct abbrev_table): Add constructor.
13137 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13138 <abbrev_obstack>: Now an auto_obstack.
13139 (abbrev_table_up): New typedef.
13140 (init_cu_die_reader): Add abbrev_table parameter.
13141 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13142 Add result_dwo_abbrev_table.
13143 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13144 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13146 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13148 (skip_children): Update.
13149 (abbrev_table::alloc_abbrev): Rename from
13150 abbrev_table_alloc_abbrev.
13151 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13152 (abbrev_table::lookup_abbrev): Rename from
13153 abbrev_table_lookup_abbrev.
13154 (abbrev_table_read_table): Return abbrev_table_up.
13155 (abbrev_table_free, abbrev_table_free_cleanup)
13156 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13157 (load_partial_dies): Update.
13159 2018-01-17 Tom Tromey <tom@tromey.com>
13161 * dwarf2read.c (dwarf2_compute_name): Update comment.
13162 (read_func_scope, read_variable): Update.
13163 (new_symbol): Remove.
13164 (new_symbol_full): Rename to new_symbol.
13166 2018-01-17 Mike Gulick <mgulick@mathworks.com>
13169 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13170 a warning instead of throwing an error, set section size to 0 and return
13172 * gdb_bfd.h (gdb_bfd_map_section): Update description.
13174 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13176 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13178 (linux_ptrace_attach_fail_reason_string): Likewise.
13179 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13181 (linux_ptrace_attach_fail_reason_string): Likewise.
13182 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13184 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13186 * linux-nat.c (linux_nat_attach): Remove xstrdup.
13188 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
13191 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13192 checking for fs_base/gs_base fields in struct user_regs_struct.
13193 * configure: Regenerate.
13195 2018-01-17 Yao Qi <yao.qi@linaro.org>
13197 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13199 (aarch64_linux_init_abi): Install it to gdbarch hook
13200 gcc_target_options.
13202 2018-01-15 Pedro Alves <palves@redhat.com>
13204 * common/signals-state-save-restore.c
13205 (save_original_signals_state): Fix typos.
13207 2017-01-12 Tom Tromey <tom@tromey.com>
13208 Sergio Durigan Junior <sergiodj@redhat.com>
13210 * Makefile.in (install-only): Install gdb-add-index.
13212 2018-01-12 John Baldwin <jhb@FreeBSD.org>
13214 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13216 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
13218 * infrun.c (keep_going_pass_signal): Clear step-over info when
13219 insert_breakpoints fails.
13221 2018-01-11 Pedro Alves <palves@redhat.com>
13224 * infrun.c (resume): Rename to ...
13225 (resume_1): ... this.
13226 (resume): Reimplement as wrapper around resume_1.
13228 2018-01-11 Pedro Alves <palves@redhat.com>
13231 * remote.c (remote_parse_stop_reply): Default to the last-set
13232 general thread instead of to 'magic_null_ptid'.
13234 2018-01-10 Pedro Alves <palves@redhat.com>
13236 * language.h (language_get_symbol_name_matcher): Rename ...
13237 (get_symbol_name_matcher): ... this.
13238 * language.c (language_get_symbol_name_matcher): Ditto.
13239 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13242 2018-01-10 Pedro Alves <palves@redhat.com>
13246 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13247 Adjust to use language_get_symbol_name_matcher instead of
13248 language_defn::la_get_symbol_name_matcher.
13249 * language.c (language_get_symbol_name_matcher): If in Ada mode
13250 and the lookup name is a verbatim match, return Ada's matcher.
13251 * language.h (language_get_symbol_name_matcher): Adjust comment.
13252 (ada_lookup_name_info::verbatim_p):: New method.
13254 2018-01-10 Pedro Alves <palves@redhat.com>
13257 * ada-lang.c (ada_collect_symbol_completion_matches): If the
13258 minsym's language is language_auto or language_cplus, pass down
13259 language_ada instead.
13260 * symtab.c (compare_symbol_name): Don't frob symbol language here.
13262 2018-01-10 Pedro Alves <palves@redhat.com>
13265 * minsyms.c (linkage_name_str): New function.
13266 (iterate_over_minimal_symbols): Use it.
13268 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13270 * NEWS: Document that 'info proc' now works on FreeBSD.
13272 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13274 * configure.ac: Check for kinfo_getfile in libutil.
13275 * configure: Regenerate.
13276 * config.in: Regenerate.
13277 * fbsd-nat.c: Include "fbsd-tdep.h".
13278 (fbsd_fetch_cmdline): New.
13279 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13280 rather than calling error.
13281 (fbsd_info_proc): New.
13282 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13283 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13284 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13286 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13288 * fbsd-nat.c (struct free_deleter): Remove.
13289 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13291 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13293 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13294 NULL for an empty pathname.
13296 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13298 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13299 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13300 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13301 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13302 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13303 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13304 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13305 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13306 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13307 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13308 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13309 (fbsd_core_fetch_timeval, fbsd_print_sigset)
13310 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13311 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
13312 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13314 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
13316 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13317 (gnu_xfer_auxv): New function.
13318 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13319 TARGET_OBJECT_AUXV.
13321 2018-01-08 Yao Qi <yao.qi@linaro.org>
13322 Simon Marchi <simon.marchi@ericsson.com>
13324 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13326 (COMMON_OBS): Remove selftest.o.
13327 * configure.ac: Append selftest-arch.c and common/selftest.c to
13328 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
13329 * configure: Re-generated.
13330 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13332 (maintenance_info_selftests): Likewise.
13334 2018-01-08 Xavier Roirand <roirand@adacore.com>
13336 * ada-valprint.c (val_print_packed_array_elements): Use
13337 proper number of elements when printing an array indexed
13338 by an enumeration type.
13340 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13342 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13343 (dw2_get_file_names_reader): Adjust.
13344 (lookup_dwo_signatured_type): Adjust.
13345 (lookup_dwp_signatured_type): Adjust.
13346 (lookup_signatured_type): Adjust.
13347 (create_type_unit_group): Adjust.
13348 (get_type_unit_group): Adjust.
13349 (process_psymtab_comp_unit_reader): Adjust.
13350 (build_type_psymtabs_reader): Adjust.
13351 (scan_partial_symbols): Adjust.
13352 (add_partial_symbol): Adjust.
13353 (add_partial_subprogram): Adjust.
13354 (peek_die_abbrev): Adjust.
13355 (fixup_go_packaging): Adjust.
13356 (process_imported_unit_die): Adjust.
13357 (dwarf2_compute_name): Adjust.
13358 (dwarf2_physname): Adjust.
13359 (read_import_statement): Adjust.
13360 (handle_DW_AT_stmt_list): Adjust.
13361 (read_file_scope): Adjust.
13362 (read_func_scope): Adjust.
13363 (read_lexical_block_scope): Adjust.
13364 (read_call_site_scope): Adjust.
13365 (read_variable): Adjust.
13366 (dwarf2_rnglists_process): Adjust.
13367 (dwarf2_ranges_process): Adjust.
13368 (dwarf2_ranges_read): Adjust.
13369 (dwarf2_get_pc_bounds): Adjust.
13370 (dwarf2_record_block_ranges): Adjust.
13371 (dwarf2_add_field): Adjust.
13372 (dwarf2_add_member_fn): Adjust.
13373 (read_structure_type): Adjust.
13374 (process_structure_scope): Adjust.
13375 (read_enumeration_type): Adjust.
13376 (read_array_type): Adjust.
13377 (mark_common_block_symbol_computed): Adjust.
13378 (read_common_block): Adjust.
13379 (read_namespace_type): Adjust.
13380 (read_namespace): Adjust.
13381 (read_module_type): Adjust.
13382 (read_tag_pointer_type): Adjust.
13383 (read_tag_ptr_to_member_type): Adjust.
13384 (read_tag_string_type): Adjust.
13385 (read_subroutine_type): Adjust.
13386 (read_typedef): Adjust.
13387 (read_base_type): Adjust.
13388 (attr_to_dynamic_prop): Adjust.
13389 (read_subrange_type): Adjust.
13390 (read_unspecified_type): Adjust.
13391 (dwarf2_read_abbrevs): Adjust.
13392 (load_partial_dies): Adjust.
13393 (read_partial_die): Adjust.
13394 (find_partial_die): Adjust.
13395 (guess_partial_die_structure_name): Adjust.
13396 (fixup_partial_die): Adjust.
13397 (read_attribute_value): Adjust.
13398 (read_addr_index): Adjust.
13399 (read_addr_index_from_leb128): Adjust.
13400 (read_str_index): Adjust.
13401 (dwarf2_string_attr): Adjust.
13402 (get_debug_line_section): Adjust.
13403 (dwarf_decode_line_header): Adjust.
13404 (lnp_state_machine::check_line_address): Adjust.
13405 (dwarf_decode_lines_1): Adjust.
13406 (dwarf_decode_lines): Adjust.
13407 (dwarf2_start_symtab): Adjust.
13408 (var_decode_location): Adjust.
13409 (new_symbol_full): Adjust.
13410 (dwarf2_const_value_data): Adjust.
13411 (dwarf2_const_value_attr): Adjust.
13412 (dwarf2_const_value): Adjust.
13413 (die_type): Adjust.
13414 (die_containing_type): Adjust.
13415 (build_error_marker_type): Adjust.
13416 (lookup_die_type): Adjust.
13417 (guess_full_die_structure_name): Adjust.
13418 (anonymous_struct_prefix): Adjust.
13419 (determine_prefix): Adjust.
13420 (dwarf2_name): Adjust.
13421 (follow_die_ref_or_sig): Adjust.
13422 (follow_die_offset): Adjust.
13423 (follow_die_ref): Adjust.
13424 (follow_die_sig_1): Adjust.
13425 (follow_die_sig): Adjust.
13426 (get_signatured_type): Adjust.
13427 (get_DW_AT_signature_type): Adjust.
13428 (decode_locdesc): Adjust.
13429 (dwarf_decode_macros): Adjust.
13430 (cu_debug_loc_section): Adjust.
13431 (fill_in_loclist_baton): Adjust.
13432 (dwarf2_symbol_mark_computed): Adjust.
13433 (init_one_comp_unit): Don't assign
13434 dwarf2_cu::dwarf2_per_objfile.
13435 (set_die_type): Adjust.
13437 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13439 * dwarf2read.c (struct mapped_debug_names): Add constructor.
13440 <dwarf2_per_objfile>: New field.
13441 (dwarf2_per_objfile): Remove global.
13442 (get_dwarf2_per_objfile): New function.
13443 (set_dwarf2_per_objfile): New function.
13444 (dwarf2_build_psymtabs_hard): Change objfile parameter to
13445 dwarf2_per_objfile.
13446 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13447 (read_abbrev_offset): Likewise.
13448 (read_indirect_string): Likewise.
13449 (read_indirect_line_string): Likewise.
13450 (read_indirect_string_at_offset): Likewise.
13451 (read_indirect_string_from_dwz): Likewise.
13452 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13453 dwarf2_per_objfile.
13454 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13455 (create_all_comp_units): Change objfile parameter to
13456 dwarf2_per_objfile.
13457 (create_all_type_units): Likewise.
13458 (process_queue): Add dwarf2_per_objfile parameter.
13459 (read_and_check_comp_unit_head): Likewise.
13460 (lookup_dwo_unit_in_dwp): Likewise.
13461 (get_dwp_file): Likewise.
13462 (process_cu_includes): Likewise.
13463 (struct free_dwo_file_cleanup_data): New struct.
13464 (dwarf2_has_info): Use get_dwarf2_per_objfile and
13465 set_dwarf2_per_objfile.
13466 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13467 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13468 context, adjust calls.
13469 (dw2_instantiate_symtab): Likewise.
13470 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13471 (dw2_get_cu): Likewise.
13472 (create_cu_from_index_list): Change objfile parameter to
13473 dwarf2_per_objfile.
13474 (create_cus_from_index_list): Get dwarf2_per_objfile from
13475 context, adjust calls.
13476 (create_cus_from_index): Likewise.
13477 (create_signatured_type_table_from_index): Change objfile
13478 parameter to dwarf2_per_objfile.
13479 (create_signatured_type_table_from_debug_names): Change objfile
13480 parameter to dwarf2_per_objfile.
13481 (create_addrmap_from_index): Likewise.
13482 (create_addrmap_from_aranges): Likewise.
13483 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13484 (dw2_setup): Remove.
13485 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13487 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13488 get_dwarf2_per_objfile.
13489 (dw2_forget_cached_source_info): Likewise.
13490 (dw2_map_symtabs_matching_filename): Likewise.
13491 (struct dw2_symtab_iterator) <index>: Remove.
13492 <dwarf2_per_objfile>: New field.
13493 (dw2_symtab_iter_init): Replace index parameter with
13494 dwarf2_per_objfile.
13495 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13496 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13497 (dw2_print_stats): Likewise.
13498 (dw2_dump): Likewise.
13499 (dw2_expand_symtabs_for_function): Likewise.
13500 (dw2_expand_all_symtabs): Likewise.
13501 (dw2_expand_symtabs_with_fullname): Likewise.
13502 (dw2_expand_marked_cus): Replace index and objfile parameters
13503 with dwarf2_per_objfile.
13504 (dw_expand_symtabs_matching_file_matcher): Add
13505 dwarf2_per_objfile parameter and adjust calls.
13506 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13508 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13509 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13511 (create_cus_from_debug_names_list): Replace objfile parameter
13512 with dwarf2_per_objfile and adjust calls.
13513 (create_cus_from_debug_names): Likewise.
13514 (dwarf2_read_debug_names): Likewise.
13515 (mapped_debug_names::namei_to_name): Adjust call.
13516 (dw2_debug_names_iterator::next): Likewise.
13517 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13518 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13519 (dw2_debug_names_dump): Likewise.
13520 (dw2_debug_names_expand_symtabs_for_function): Likewise.
13521 (dw2_debug_names_expand_symtabs_matching): Likewise.
13522 (dwarf2_initialize_objfile): Likewise.
13523 (dwarf2_build_psymtabs): Likewise.
13524 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13526 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13527 (read_and_check_comp_unit_head): Likewise.
13528 (read_abbrev_offset): Likewise.
13529 (create_debug_type_hash_table): Likewise.
13530 (create_debug_types_hash_table): Likewise.
13531 (create_all_type_units): Replace objfile parameter with
13532 dwarf2_per_objfile.
13533 (add_type_unit): Add dwarf2_per_objfile parameter.
13534 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13535 with dwarf2_per_objfile.
13536 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13537 (lookup_dwp_signatured_type): Likewise.
13538 (lookup_signatured_type): Likewise.
13539 (read_cutu_die_from_dwo): Likewise.
13540 (init_tu_and_read_dwo_dies): Likewise.
13541 (init_cutu_and_read_dies): Likewise.
13542 (init_cutu_and_read_dies_no_follow): Likewise.
13543 (allocate_type_unit_groups_table): Add objfile parameter.
13544 (create_type_unit_group): Use dwarf2_per_objfile from cu.
13545 (get_type_unit_group): Likewise.
13546 (process_psymtab_comp_unit): Update call.
13547 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13548 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13549 (print_tu_stats): Likewise.
13550 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13551 in void* parameter.
13552 (build_type_psymtabs): Change objfile parameter to
13553 dwarf2_per_objfile.
13554 (process_skeletonless_type_unit): Use dwarf2_per_objfile
13555 passed in void* parameter.
13556 (process_skeletonless_type_units): Change objfile parameter to
13557 dwarf2_per_objfile.
13558 (set_partial_user): Likewise.
13559 (dwarf2_build_psymtabs_hard): Likewise.
13560 (read_comp_units_from_section): Likewise.
13561 (create_all_comp_units): Likewise.
13562 (scan_partial_symbols): Update calls.
13563 (add_partial_symbol): Likewise.
13564 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13565 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13566 (process_queue): Add dwarf2_per_objfile parameter.
13567 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13568 (compute_compunit_symtab_includes): Likewise.
13569 (process_cu_includes): Add dwarf2_per_objfile parameter.
13570 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13571 (process_full_type_unit): Likewise.
13572 (process_imported_unit_die): Update call.
13573 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13574 (read_file_scope): Likewise.
13575 (allocate_dwo_file_hash_table): Add objfile parameter.
13576 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13577 (create_cus_hash_table): Likewise.
13578 (create_dwp_hash_table): Likewise.
13579 (create_dwo_unit_in_dwp_v1): Likewise.
13580 (create_dwp_v2_section): Likewise.
13581 (create_dwo_unit_in_dwp_v2): Likewise.
13582 (lookup_dwo_unit_in_dwp): Likewise.
13583 (try_open_dwop_file): Likewise.
13584 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13585 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13586 cleanup to include a reference to dwarf2_per_objfile.
13587 (open_dwp_file): Add dwarf2_per_objfile parameter.
13588 (open_and_init_dwp_file): Likewise.
13589 (get_dwp_file): Likewise.
13590 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13591 (queue_and_load_all_dwo_tus): Update call.
13592 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13594 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13595 (dwarf2_ranges_process): Likewise.
13596 (dwarf2_get_pc_bounds): Likewise.
13597 (mark_common_block_symbol_computed): Likewise.
13598 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13599 (dwarf2_read_abbrevs): Update call.
13600 (read_partial_die): Use dwarf2_per_objfile from cu.
13601 (find_partial_die): Likewise.
13602 (fixup_partial_die): Likewise.
13603 (read_attribute_value): Likewise.
13604 (read_indirect_string_at_offset_from): Add objfile parameter.
13605 (read_indirect_string_at_offset): Add dwarf2_per_objfile
13607 (read_indirect_string_from_dwz): Add objfile parameter.
13608 (read_indirect_string): Add objfile parameter.
13609 (read_addr_index_1): Add dwarf2_per_objfile parameter.
13610 (read_addr_index): Use dwarf2_per_objfile from cu.
13611 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13613 (read_str_index): Use dwarf2_per_objfile from cu.
13614 (get_debug_line_section): Likewise.
13615 (read_formatted_entries): Add dwarf2_per_objfile parameter.
13616 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13617 (new_symbol_full): Use dwarf2_per_objfile from cu.
13618 (build_error_marker_type): Likewise.
13619 (lookup_die_type): Likewise.
13620 (determine_prefix): Likewise.
13621 (follow_die_offset): Likewise.
13622 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13623 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13624 (dwarf2_fetch_die_type_sect_off): Likewise.
13625 (dwarf2_get_die_type): Likewise.
13626 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13627 (get_signatured_type): Likewise.
13628 (get_DW_AT_signature_type): Likewise.
13629 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13630 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13631 (cu_debug_loc_section): Likewise.
13632 (fill_in_loclist_baton): Likewise.
13633 (dwarf2_symbol_mark_computed): Likewise.
13634 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13635 dwarf2_per_objfile.
13636 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13638 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13639 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13640 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13641 (set_die_type): Use dwarf2_free_objfile from cu.
13642 (get_die_type_at_offset): Likewise.
13643 (dwarf2_per_objfile_free): Don't assign global variable.
13644 (debug_names) <constructor>: Add dwarf2_per_objfile
13645 parameter, update m_debugstrlookup construction.
13646 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13648 <m_dwarf2_per_objfile>: New field.
13649 <lookup>: Use m_dwarf2_per_objfile.
13650 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13651 (psyms_seen_size): Likewise.
13652 (write_gdbindex): Replace objfile parameter with
13653 dwarf2_per_objfile.
13654 (write_debug_names): Likewise.
13655 (write_psymtabs_to_index): Likewise.
13656 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13659 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13661 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13662 <dwarf2_per_objfile>: New field.
13663 (struct dwarf2_per_cu_data) <objfile>: Remove.
13664 <dwarf2_per_objfile>: New field.
13665 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13667 (create_signatured_type_table_from_index): Likewise.
13668 (create_debug_type_hash_table): Likewise.
13669 (fill_in_sig_entry_from_dwo_entry): Likewise.
13670 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13671 (create_type_unit_group): Assign dwarf2_per_objfile instead of
13673 (create_partial_symtab): Access objfile through
13674 dwarf2_per_objfile.
13675 (process_psymtab_comp_unit_reader): Likewise.
13676 (read_comp_units_from_section): Likewise.
13677 (scan_partial_symbols): Likewise.
13678 (add_partial_symbol): Likewise.
13679 (add_partial_subprogram): Likewise.
13680 (peek_die_abbrev): Likewise.
13681 (fixup_go_packaging): Likewise.
13682 (process_full_comp_unit): Likewise.
13683 (process_full_type_unit): Likewise.
13684 (process_imported_unit_die): Likewise.
13685 (dwarf2_compute_name): Likewise.
13686 (dwarf2_physname): Likewise.
13687 (read_import_statement): Likewise.
13688 (create_cus_hash_table): Assign dwarf2_physname instead of
13690 (read_func_scope): Access objfile through dwarf2_per_objfile.
13691 (read_lexical_block_scope): Likewise.
13692 (read_call_site_scope): Likewise.
13693 (read_variable): Likewise.
13694 (dwarf2_rnglists_process): Likewise.
13695 (dwarf2_ranges_process): Likewise.
13696 (dwarf2_ranges_read): Likewise.
13697 (dwarf2_record_block_ranges): Likewise.
13698 (dwarf2_add_field): Likewise.
13699 (dwarf2_add_member_fn): Likewise.
13700 (read_structure_type): Likewise.
13701 (process_structure_scope): Likewise.
13702 (read_enumeration_type): Likewise.
13703 (read_array_type): Likewise.
13704 (read_common_block): Likewise.
13705 (read_namespace_type): Likewise.
13706 (read_namespace): Likewise.
13707 (read_module_type): Likewise.
13708 (read_tag_pointer_type): Likewise.
13709 (read_tag_ptr_to_member_type): Likewise.
13710 (read_tag_string_type): Likewise.
13711 (read_subroutine_type): Likewise.
13712 (read_typedef): Likewise.
13713 (read_base_type): Likewise.
13714 (attr_to_dynamic_prop): Likewise.
13715 (read_subrange_type): Likewise.
13716 (read_unspecified_type): Likewise.
13717 (load_partial_dies): Likewise.
13718 (read_partial_die): Likewise.
13719 (find_partial_die): Likewise.
13720 (guess_partial_die_structure_name): Likewise.
13721 (fixup_partial_die): Likewise.
13722 (read_attribute_value): Likewise.
13723 (read_addr_index_from_leb128): Likewise.
13724 (dwarf2_read_addr_index): Likewise.
13725 (dwarf2_string_attr): Likewise.
13726 (lnp_state_machine::check_line_address): Likewise.
13727 (dwarf_decode_lines_1): Likewise.
13728 (dwarf_decode_lines): Likewise.
13729 (dwarf2_start_symtab): Likewise.
13730 (var_decode_location): Likewise.
13731 (new_symbol_full): Likewise.
13732 (dwarf2_const_value_data): Likewise.
13733 (dwarf2_const_value_attr): Likewise.
13734 (dwarf2_const_value): Likewise.
13735 (die_type): Likewise.
13736 (die_containing_type): Likewise.
13737 (lookup_die_type): Likewise.
13738 (guess_full_die_structure_name): Likewise.
13739 (anonymous_struct_prefix): Likewise.
13740 (dwarf2_name): Likewise.
13741 (follow_die_ref_or_sig): Likewise.
13742 (follow_die_offset): Likewise.
13743 (follow_die_ref): Likewise.
13744 (dwarf2_fetch_die_loc_sect_off): Likewise.
13745 (dwarf2_fetch_constant_bytes): Likewise.
13746 (dwarf2_fetch_die_type_sect_off): Likewise.
13747 (dwarf2_get_die_type): Likewise.
13748 (follow_die_sig): Likewise.
13749 (decode_locdesc): Likewise.
13750 (dwarf2_per_cu_objfile): Likewise.
13751 (dwarf2_per_cu_text_offset): Likewise.
13752 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13754 (set_die_type): Access objfile through
13755 dwarf2_per_objfile.
13757 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13759 * valprint.c (converted_character_d): Remove typedef.
13760 (DEF_VEC_O (converted_character_d)): Remove.
13761 (count_next_character): Use std::vector.
13762 (print_converted_chars_to_obstack): Likewise.
13763 (generic_printstr): Likewise.
13765 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13767 * xml-support.h (struct gdb_xml_value): Add constructor.
13768 <value>: Change type to unique_xmalloc_ptr.
13769 (gdb_xml_value_s): Remove typedef.
13770 (DEF_VEC_O (gdb_xml_value_s)): Remove.
13771 (gdb_xml_element_start_handler): Change parameter type to
13773 (xml_find_attribute): Likewise.
13774 * xml-support.c (xml_find_attribute): Change parameter type to
13775 std::vector and adjust.
13776 (gdb_xml_values_cleanup): Remove.
13777 (gdb_xml_parser::start_element): Adjust to std::vector.
13778 (xinclude_start_include): Change paraeter type to std::vector
13780 * btrace.c (check_xml_btrace_version): Likewise.
13781 (parse_xml_btrace_block): Likewise.
13782 (parse_xml_btrace_pt_config_cpu): Likewise.
13783 (parse_xml_btrace_pt): Likewise.
13784 (parse_xml_btrace_conf_bts): Likewise.
13785 (parse_xml_btrace_conf_pt): Likewise.
13786 * memory-map.c (memory_map_start_memory): Likewise.
13787 (memory_map_start_property): Likewise.
13788 * osdata.c (osdata_start_osdata): Likewise.
13789 (osdata_start_item): Likewise.
13790 (osdata_start_column): Likewise.
13791 * remote.c (start_thread): Likewise.
13792 * solib-aix.c (library_list_start_library): Likewise.
13793 (library_list_start_list): Likewise.
13794 * solib-svr4.c (library_list_start_library): Likewise.
13795 (svr4_library_list_start_list): Likewise.
13796 * solib-target.c (library_list_start_segment): Likewise.
13797 (library_list_start_section): Likewise.
13798 (library_list_start_library): Likewise.
13799 (library_list_start_list): Likewise.
13800 * tracepoint.c (traceframe_info_start_memory): Likewise.
13801 (traceframe_info_start_tvar): Likewise.
13802 * xml-syscall.c (syscall_start_syscall): Likewise.
13803 * xml-tdesc.c (tdesc_start_target): Likewise.
13804 (tdesc_start_feature): Likewise.
13805 (tdesc_start_reg): Likewise.
13806 (tdesc_start_union): Likewise.
13807 (tdesc_start_struct): Likewise.
13808 (tdesc_start_flags): Likewise.
13809 (tdesc_start_enum): Likewise.
13810 (tdesc_start_field): Likewise.
13811 (tdesc_start_enum_value): Likewise.
13812 (tdesc_start_vector): Likewise.
13814 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13816 * extension.h (struct xmethod_worker) <clone>: Remove.
13817 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13819 (python_xmethod_worker::clone): Remove.
13820 * valops.c (find_overload_match): Use std::move instead of
13823 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13825 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13826 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13827 <free_xmethod_worker_data>: Remove.
13828 <get_matching_xmethod_workers>: Chance VEC to std::vector.
13829 <get_xmethod_arg_types>: Remove.
13830 <get_xmethod_result_type>: Remove.
13831 <invoke_xmethod>: Remove.
13832 * extension.c (new_xmethod_worker): Remove.
13833 (clone_xmethod_worker): Remove.
13834 (get_matching_xmethod_workers): Return void, pass std::vector by
13836 (get_xmethod_arg_types): Rename to...
13837 (xmethod_worker::get_arg_types): ... this, and adjust.
13838 (get_xmethod_result_type): Rename to...
13839 (xmethod_worker::get_result_type): ... this, and adjust.
13840 (invoke_xmethod): Remove.
13841 (free_xmethod_worker): Remove.
13842 (free_xmethod_worker_vec): Remove.
13843 * extension.h (enum ext_lang_rc): Move here from
13845 (struct xmethod_worker): Add constructor and destructor.
13848 <invoke, clone, do_get_result_type, do_get_arg_types>: New
13849 virtual pure methods.
13850 <get_arg_types, get_result_type>: New methods.
13851 (xmethod_worker_ptr): Remove typedef.
13852 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13853 (xmethod_worker_vec): Remove typedef.
13854 (xmethod_worker_up): New typedef.
13855 (invoke_xmethod): Remove.
13856 (clone_xmethod_worker): Remove.
13857 (free_xmethod_worker): Remove.
13858 (free_xmethod_worker_vec): Remove.
13859 (get_xmethod_arg_types): Remove.
13860 (get_xmethod_result_type): Remove.
13861 * valops.c (find_method_list): Use std::vector, don't use
13862 intermediate vector.
13863 (value_find_oload_method_list): Use std::vector.
13864 (find_overload_match): Use std::vector.
13865 (find_oload_champ): Use std::vector.
13866 * value.c (value_free): Use operator delete.
13867 (value_of_xmethod): Rename to...
13868 (value_from_xmethod): ... this. Don't assign
13869 xmethod_worker::value, take rvalue-reference.
13870 (result_type_of_xmethod): Adjust.
13871 (call_xmethod): Adjust.
13872 * value.h: Include extension.h.
13873 (struct xmethod_worker): Don't forward-declare.
13874 (value_of_xmethod): Rename to...
13875 (value_from_xmethod): ... this, take rvalue-reference.
13876 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13877 (struct python_xmethod_worker): ... this, add constructor and
13879 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13880 (gdbpy_free_xmethod_worker_data): Rename to...
13881 (python_xmethod_worker::~python_xmethod_worker): ... this and
13883 (gdbpy_clone_xmethod_worker_data): Rename to...
13884 (python_xmethod_worker::clone): ... this and adjust.
13885 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13887 (gdbpy_get_xmethod_arg_types): Rename to...
13888 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13889 (gdbpy_get_xmethod_result_type): Rename to...
13890 (python_xmethod_worker::do_get_result_type): ... this and
13892 (gdbpy_invoke_xmethod): Rename to...
13893 (python_xmethod_worker::invoke): ... this and adjust.
13894 (new_python_xmethod_worker): Rename to...
13895 (python_xmethod_worker::python_xmethod_worker): ... this and
13897 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13899 (gdbpy_free_xmethod_worker_data): Remove.
13900 (gdbpy_get_matching_xmethod_workers): Use std::vector.
13901 (gdbpy_get_xmethod_arg_types): Remove.
13902 (gdbpy_get_xmethod_result_type): Remove.
13903 (gdbpy_invoke_xmethod): Remove.
13904 * python/python.c (python_extension_ops): Remove obsolete
13907 2018-01-05 Pedro Alves <palves@redhat.com>
13910 * common/signals-state-save-restore.c
13911 (save_original_signals_state): New parameter 'quiet'. Warn if we
13912 find a custom handler preinstalled, instead of internal erroring.
13913 But only warn if !quiet.
13914 * common/signals-state-save-restore.h
13915 (save_original_signals_state): New parameter 'quiet'.
13916 * main.c (captured_main_1): Move save_original_signals_state call
13917 after option handling, and pass QUIET.
13919 2018-01-05 Pedro Alves <palves@redhat.com>
13921 * spu-tdep.c (spu_catch_start): Pass
13922 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13924 2018-01-05 Pedro Alves <palves@redhat.com>
13927 * ada-lang.c (literal_symbol_name_matcher): New function.
13928 (ada_get_symbol_name_matcher): Use it for
13929 symbol_name_match_type::SEARCH_NAME.
13930 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
13931 it down instead of assuming symbol_name_match_type::FULL.
13932 * block.h (block_lookup_symbol): New parameter 'match_type'.
13933 * c-valprint.c (print_unpacked_pointer): Use
13934 lookup_symbol_search_name instead of lookup_symbol.
13935 * compile/compile-object-load.c (get_out_value_type): Pass down
13936 symbol_name_match_type::SEARCH_NAME.
13937 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13938 symbol_name_match_type::FULL.
13939 * cp-support.c (cp_get_symbol_name_matcher): Handle
13940 symbol_name_match_type::SEARCH_NAME.
13941 * infrun.c (insert_exception_resume_breakpoint): Use
13942 lookup_symbol_search_name.
13943 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13944 * psymtab.c (maintenance_check_psymtabs): Use
13945 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13946 * stack.c (print_frame_args): Use lookup_symbol_search_name and
13947 SYMBOL_SEARCH_NAME.
13948 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13949 if symbol_name_match_type::SEARCH_NAME.
13950 (lookup_symbol_in_language): Pass down
13951 symbol_name_match_type::FULL.
13952 (lookup_symbol_search_name): New.
13953 (lookup_language_this): Pass down
13954 symbol_name_match_type::SEARCH_NAME.
13955 (lookup_symbol_aux, lookup_local_symbol): New parameter
13956 'match_type'. Pass it down.
13957 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13958 (lookup_symbol_search_name): New declaration.
13959 (lookup_symbol_in_block): New 'match_type' parameter.
13961 2018-01-05 Pedro Alves <palves@redhat.com>
13964 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13966 (ada_lookup_symbol): Reimplement in terms of
13967 ada_lookup_symbol_list, bits factored out from
13968 ada_lookup_encoded_symbol.
13970 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13972 * ada-exp.y (write_object_renaming): When subscripting an array
13973 using a symbol as the index, pass the block in call to
13974 ada_lookup_encoded_symbol when looking that symbol up.
13976 2018-01-05 Jerome Guitton <guitton@adacore.com>
13978 * ada-lang.c (ada_array_length): Use ada_index_type instead of
13981 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13983 * ada-lang.c (ada_to_fixed_value_create): Add handling of
13984 the case where VALUE_LVAL (val0) is not lval_memory.
13986 2018-01-05 Xavier Roirand <roirand@adacore.com>
13988 * ada-valprint.c (print_optional_low_bound): Handle
13989 character-indexed array printing like boolean-indexed array
13992 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13994 * NEWS: Create a new section for the next release branch.
13995 Rename the section of the current branch, now that it has
13998 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14000 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14001 * version.in: Bump version to 8.1.50.DATE-git.
14003 2018-01-03 Xavier Roirand <roirand@adacore.com>
14005 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14007 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14009 (default_exception_support_info) <catch_handlers_sym>: Add field.
14010 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14011 (ada_exception_name_addr_1): Add "catch handlers" handling.
14012 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14013 Update all callers.
14014 (create_excep_cond_exprs) <ex>: Add parameter.
14015 (re_set_exception): Update create_excep_cond_exprs call.
14016 (print_it_exception, print_one_exception, print_mention_exception)
14017 (print_recreate_exception): Add "catch handler" handling.
14018 (allocate_location_catch_handlers, re_set_catch_handlers)
14019 (check_status_catch_handlers, print_it_catch_handlers)
14020 (print_one_catch_handlers, print_mention_catch_handlers)
14021 (print_recreate_catch_handlers): New function.
14022 (catch_handlers_breakpoint_ops): New variable.
14023 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14024 Add parameter. Add "catch handler" handling.
14025 (ada_exception_sym_name, ada_exception_breakpoint_ops):
14026 Add "catch handler" handling.
14027 (ada_exception_catchpoint_cond_string): Add "catch handler"
14029 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14031 (catch_ada_handlers_command): New function.
14032 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14033 operations structure.
14034 (_initialize_ada_language): Add "catch handlers" command entry.
14035 * NEWS: Document "catch handlers" feature.
14037 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14039 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14040 account when creating the array type of the slice.
14041 (ada_value_slice): Likewise.
14043 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14045 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14047 (create_array_type_with_stride): Add byte_stride_prop parameter.
14048 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14049 New parameter. Update all callers in this file.
14050 (array_type_has_dynamic_stride): New function.
14051 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14052 of arrays with dynamic byte strides.
14053 * dwarf2read.c (read_array_type): Add support for dynamic
14054 DW_AT_byte_stride attributes.
14056 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14058 * dwarf2read.c (read_unspecified_type): Treat
14059 DW_TAG_enumeration_type DIEs from Ada units as stubs.
14061 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14063 Update copyright year range in all GDB files.
14065 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14067 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14068 and gdb/testsuite/gdb.base/step-line.c.
14070 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14072 * copyright.py (main): Dump the contents of
14073 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14074 even if BY_HAND is empty.
14076 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14078 * top.c (print_gdb_version): Update Copyright year in version
14081 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14083 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14085 For older changes see ChangeLog-2017.
14091 version-control: never