[Lldb-commits] [PATCH] D118794: [lldb][AArch64] Remove non-address bits from addresses passed to ptrace on Linux

David Spickett via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 24 09:42:32 PDT 2022


DavidSpickett updated this revision to Diff 417960.
DavidSpickett added a comment.
Herald added a project: All.

Switch to removing non-address bits in lldb instead of lldb-server.

The breakpoint issues I mention only really happen if you try to break on a tagged
function pointer. Which is pretty niche, but I hope to address it later anyway.

On the issue of whether to use FixData vs FixCode there's 2 maybe 3 ways to go:

- Assume that they're the same, which does work for Linux, for now.
- Add a method that does both fixes, on the assumption that the virtual address size for code and data is the same so no harm done and all bits will be removed either way.
- Extensively track whether addresses refer to code or data. In some situations this is possible (looking at the exec bits of a memory mapping for example) but I don't have a great idea what that looks like at this time.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118794/new/

https://reviews.llvm.org/D118794

Files:
  lldb/source/Target/Process.cpp
  lldb/source/Target/ProcessTrace.cpp
  lldb/source/Target/Target.cpp
  lldb/test/API/linux/aarch64/non_address_bit_memory_access/Makefile
  lldb/test/API/linux/aarch64/non_address_bit_memory_access/TestAArch64LinuxNonAddressBitMemoryAccess.py
  lldb/test/API/linux/aarch64/non_address_bit_memory_access/main.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118794.417960.patch
Type: text/x-patch
Size: 13549 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220324/3b4dcc25/attachment-0001.bin>


More information about the lldb-commits mailing list