summaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2017-10-23 14:52:28 +0100
committerChristoph Muellner <christoph.muellner@theobroma-systems.com>2018-04-27 14:38:50 +0200
commit3adb5fee9ee3d784d8547029be2cb07a4802ace8 (patch)
tree1773005896589d4f3183f7c0764d865d90b26342 /gdb/gdbserver
parent4e556d512fa9014a7c68d33310171f18301236e4 (diff)
Rebased 5e5a2a68c772d59c41d4e536949ce4ba3dc9b3ea from linaro's gdb-aarch64-ilp32 branch on GDB 8.1-release. gdb: 2017-03-06 Andrew Pinski <apinski@cavium.com> Steve Ellcey <sellcey@cavium.com> Yao Qi <yao.qi@linaro.org> * aarch64-linux-nat.c (IS_ARM32): New macro. (fetch_gregs_from_thread): Use IS_ARM32 macro. (store_gregs_to_thread): Ditto. (fetch_fpregs_from_thread): Ditto. (store_fpregs_to_thread): Ditto. (ps_get_thread_area): Ditto. (aarch64_linux_siginfo_fixup): Ditto. * aarch64-linux-tdep.c (aarch64_linux_init_abi): Set link map offsets to 32 or 64 bits. * aarch64-tdep.c (aarch64_ilp32_register_type): New function. (aarch64_gdbarch_init): Setup ILP32 support. Make sure the gdbarches have compatible ilp32 flags. Set long and ptr sizes correctly for ilp32. * aarch64-tdep.h (gdbarch_tdep) <ilp32>: New field. gdb/gdbserver: 2017-03-06 Andrew Pinski <apinski@cavium.com> Steve Ellcey <sellcey@cavium.com> * linux-aarch64-low.c (aarch64_linux_read_description):
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/linux-aarch64-low.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c
index eccac4da13..d49c6e15e7 100644
--- a/gdb/gdbserver/linux-aarch64-low.c
+++ b/gdb/gdbserver/linux-aarch64-low.c
@@ -477,7 +477,12 @@ aarch64_arch_setup (void)
is_elf64 = linux_pid_exe_is_elf_64_file (tid, &machine);
- if (is_elf64)
+ /* There are problems with ptrace when gdbserver is 32 bits and the
+ program being debugged is 64 bits. */
+ if (sizeof (void *) == 4 && is_elf64)
+ error (_("Can't debug 64-bit process with 32-bit GDBserver"));
+
+ if (machine == EM_AARCH64)
current_process ()->tdesc = aarch64_linux_read_description ();
else
current_process ()->tdesc = tdesc_arm_with_neon;