X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Faarch64-linux-tdep.c;h=b6052bafd6d47e594b1452b565371f9bc1d84200;hb=f1735a53a63040cc4b4a735bf18a3f20d308e519;hp=50c9c3f60f3ae7cb71e2f38b501b0436de9d5c6f;hpb=c955ae7389e1c5dba0aef5c88c64f647c13e01c5;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c index 50c9c3f60f..b6052bafd6 100644 --- a/gdb/aarch64-linux-tdep.c +++ b/gdb/aarch64-linux-tdep.c @@ -1,6 +1,6 @@ /* Target-dependent code for GNU/Linux AArch64. - Copyright (C) 2009-2016 Free Software Foundation, Inc. + Copyright (C) 2009-2017 Free Software Foundation, Inc. Contributed by ARM Ltd. This file is part of GDB. @@ -45,6 +45,8 @@ #include "record-full.h" #include "linux-record.h" +#include "auxv.h" +#include "elf/common.h" /* Signal frame handling. @@ -143,7 +145,6 @@ aarch64_linux_sigframe_init (const struct tramp_frame *self, struct trad_frame_cache *this_cache, CORE_ADDR func) { - struct gdbarch *gdbarch = get_frame_arch (this_frame); CORE_ADDR sp = get_frame_register_unsigned (this_frame, AARCH64_SP_REGNUM); CORE_ADDR sigcontext_addr = sp @@ -232,6 +233,20 @@ aarch64_linux_iterate_over_regset_sections (struct gdbarch *gdbarch, NULL, cb_data); } +/* Implement the "core_read_description" gdbarch method. */ + +static const struct target_desc * +aarch64_linux_core_read_description (struct gdbarch *gdbarch, + struct target_ops *target, bfd *abfd) +{ + CORE_ADDR aarch64_hwcap = 0; + + if (target_auxv_search (target, AT_HWCAP, &aarch64_hwcap) != 1) + return NULL; + + return tdesc_aarch64; +} + /* Implementation of `gdbarch_stap_is_single_operand', as defined in gdbarch.h. */ @@ -290,7 +305,7 @@ aarch64_stap_parse_special_token (struct gdbarch *gdbarch, regname, p->saved_arg); ++tmp; - tmp = skip_spaces_const (tmp); + tmp = skip_spaces (tmp); /* Now we expect a number. It can begin with '#' or simply a digit. */ if (*tmp == '#') @@ -673,17 +688,14 @@ aarch64_canonicalize_syscall (enum aarch64_syscall syscall_number) SYSCALL_MAP (fremovexattr); SYSCALL_MAP (getcwd); SYSCALL_MAP (lookup_dcookie); - UNSUPPORTED_SYSCALL_MAP (eventfd2); - - case aarch64_sys_epoll_create1: - return gdb_sys_epoll_create; - + SYSCALL_MAP (eventfd2); + SYSCALL_MAP (epoll_create1); SYSCALL_MAP (epoll_ctl); SYSCALL_MAP (epoll_pwait); SYSCALL_MAP (dup); - UNSUPPORTED_SYSCALL_MAP (dup3); + SYSCALL_MAP (dup3); SYSCALL_MAP (fcntl); - UNSUPPORTED_SYSCALL_MAP (inotify_init1); + SYSCALL_MAP (inotify_init1); SYSCALL_MAP (inotify_add_watch); SYSCALL_MAP (inotify_rm_watch); SYSCALL_MAP (ioctl); @@ -703,7 +715,7 @@ aarch64_canonicalize_syscall (enum aarch64_syscall syscall_number) SYSCALL_MAP (statfs); SYSCALL_MAP (truncate); SYSCALL_MAP (ftruncate); - UNSUPPORTED_SYSCALL_MAP (fallocate); + SYSCALL_MAP (fallocate); SYSCALL_MAP (faccessat); SYSCALL_MAP (fchdir); SYSCALL_MAP (chroot); @@ -714,7 +726,7 @@ aarch64_canonicalize_syscall (enum aarch64_syscall syscall_number) SYSCALL_MAP (openat); SYSCALL_MAP (close); SYSCALL_MAP (vhangup); - UNSUPPORTED_SYSCALL_MAP (pipe2); + SYSCALL_MAP (pipe2); SYSCALL_MAP (quotactl); SYSCALL_MAP (getdents64); SYSCALL_MAP (lseek); @@ -1022,6 +1034,8 @@ aarch64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) set_gdbarch_iterate_over_regset_sections (gdbarch, aarch64_linux_iterate_over_regset_sections); + set_gdbarch_core_read_description + (gdbarch, aarch64_linux_core_read_description); /* SystemTap related. */ set_gdbarch_stap_integer_prefixes (gdbarch, stap_integer_prefixes); @@ -1208,16 +1222,11 @@ aarch64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) set_gdbarch_displaced_step_copy_insn (gdbarch, aarch64_displaced_step_copy_insn); set_gdbarch_displaced_step_fixup (gdbarch, aarch64_displaced_step_fixup); - set_gdbarch_displaced_step_free_closure (gdbarch, - simple_displaced_step_free_closure); set_gdbarch_displaced_step_location (gdbarch, linux_displaced_step_location); set_gdbarch_displaced_step_hw_singlestep (gdbarch, aarch64_displaced_step_hw_singlestep); } -/* Provide a prototype to silence -Wmissing-prototypes. */ -extern initialize_file_ftype _initialize_aarch64_linux_tdep; - void _initialize_aarch64_linux_tdep (void) {