[Lldb-commits] [PATCH] D142715: [LLDB] Apply FixCodeAddress to all forms of address arguments

David Spickett via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 27 06:32:13 PST 2023


DavidSpickett created this revision.
Herald added a subscriber: kristof.beyls.
Herald added a project: All.
DavidSpickett requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

This is a follow up to https://reviews.llvm.org/D141629
and applies the change it made to all paths through ToAddress
(now DoToAddress).

I have included the test from my previous attempt
https://reviews.llvm.org/D136938.

The initial change only applied fixing to addresses that
would parse as integers, so my test case failed. Since
ToAddress has multiple exit points, I've wrapped it into
a new method DoToAddress.

Now you can call ToAddress, it will call DoToAddress and
no matter what path you take, the address will be fixed.

For the memory tagging commands we actually want the full
address (to work out mismatches). So I added ToRawAddress
for that.

I have tested this on a QEMU AArch64 Linux system with
Memory Tagging, Pointer Authentication and Top Byte Ignore
enabled. By running the new test and all other tests in
API/linux/aarch64.

Some commands have had calls to the ABI plugin removed
as ToAddress now does this for them.

The "memory region" command still needs to use the ABI plugin
to detect the end of memory when there are non-address bits.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142715

Files:
  lldb/include/lldb/Interpreter/OptionArgParser.h
  lldb/source/Commands/CommandObjectMemory.cpp
  lldb/source/Commands/CommandObjectMemoryTag.cpp
  lldb/source/Interpreter/OptionArgParser.cpp
  lldb/test/API/linux/aarch64/non_address_bit_code_break/Makefile
  lldb/test/API/linux/aarch64/non_address_bit_code_break/TestAArch64LinuxNonAddressBitCodeBreak.py
  lldb/test/API/linux/aarch64/non_address_bit_code_break/main.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142715.492734.patch
Type: text/x-patch
Size: 11089 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230127/227c6023/attachment.bin>


More information about the lldb-commits mailing list