[PATCH] D111447: [Dexter] Add DexDeclareAddress command and address function

Stephen Tozer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 8 10:51:46 PDT 2021


StephenTozer created this revision.
StephenTozer added reviewers: Orlando, jmorse, TWeaver.
StephenTozer added a project: debug-info.
StephenTozer requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch adds a new Dexter command, DexDeclareAddress, which is used to test the relative values of pointer variables. The motivation for adding this command is to allow meaningful assertions to be made about pointers that go beyond checking variable availability and null equality.

The full explanation and syntax is given in Commands.md, but as an example the following code tests that the pointer `foo` is equal to `bar`, and `baz` is equal to `foo + 16`:

  DexDeclareAddress('my_addr')
  DexExpectWatchValue('foo', address('my_addr'))
  DexExpectWatchValue('bar', address('my_addr'))
  DexExpectWatchValue('baz', address('my_addr', 16))




Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D111447

Files:
  cross-project-tests/debuginfo-tests/dexter-tests/address.cpp
  cross-project-tests/debuginfo-tests/dexter/Commands.md
  cross-project-tests/debuginfo-tests/dexter/dex/command/ParseCommand.py
  cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexDeclareAddress.py
  cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectWatchBase.py
  cross-project-tests/debuginfo-tests/dexter/dex/heuristic/Heuristic.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111447.378293.patch
Type: text/x-patch
Size: 16089 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211008/d438fd84/attachment.bin>


More information about the llvm-commits mailing list