This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Fix tagged pointer support


*** TEST RESULTS FOR COMMIT 8727de56b0dbe25b7b4a3bd04f72ac41992463ed ***

Author: Omair Javaid <omair.javaid@linaro.org>
Branch: master
Commit: 8727de56b0dbe25b7b4a3bd04f72ac41992463ed

Fix tagged pointer support

This patch fixes tagged pointer support for AArch64 GDB. Linux kernel
debugging failure was reported after tagged pointer support was committed.

After a discussion around best path forward to manage tagged pointers
on GDB side we are going to disable tagged pointers support for
aarch64-none-elf-gdb because for non-linux applications we cant be
sure if tagged pointers will be used by MMU or not.

Also for aarch64-linux-gdb we are going to sign extend user-space
address after clearing tag bits. This will help debug both kernel
and user-space addresses based on information from linux kernel
documentation given below:

According to AArch64 memory map:
https://www.kernel.org/doc/Documentation/arm64/memory.txt

"User addresses have bits 63:48 set to 0 while the kernel addresses have
the same bits set to 1."

According to AArch64 tagged pointers document:
https://www.kernel.org/doc/Documentation/arm64/tagged-pointers.txt

The kernel configures the translation tables so that translations made
via TTBR0 (i.e. userspace mappings) have the top byte (bits 63:56) of
the virtual address ignored by the translation hardware. This frees up
this byte for application use.

Running gdb testsuite after applying this patch introduces no regressions
and tagged pointer test cases still pass.

gdb/ChangeLog:
2018-05-10  Omair Javaid  <omair.javaid@linaro.org>

	PR gdb/23127
	* aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
	set_gdbarch_significant_addr_bit.
	* aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
	set_gdbarch_significant_addr_bit.
	* utils.c (address_significant): Update to sign extend addr.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]