[all-commits] [llvm/llvm-project] 4b5510: [dexter] Change --source-root-dir and add --debugg...

Orlando Cazalet-Hyams via All-commits all-commits at lists.llvm.org
Tue May 25 05:29:07 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4b55102aff29f5ce82b38a9e4a819b959e29ecd7
      https://github.com/llvm/llvm-project/commit/4b55102aff29f5ce82b38a9e4a819b959e29ecd7
  Author: OCHyams <orlando.hyams at sony.com>
  Date:   2021-05-25 (Tue, 25 May 2021)

  Changed paths:
    M debuginfo-tests/dexter/dex/command/ParseCommand.py
    M debuginfo-tests/dexter/dex/debugger/DebuggerBase.py
    M debuginfo-tests/dexter/dex/debugger/Debuggers.py
    M debuginfo-tests/dexter/dex/tools/clang_opt_bisect/Tool.py
    M debuginfo-tests/dexter/dex/tools/test/Tool.py
    A debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary_different_dir/dex_commands/source_root_dir.dex
    M debuginfo-tests/dexter/feature_tests/subtools/test/source-root-dir.cpp

  Log Message:
  -----------
  [dexter] Change --source-root-dir and add --debugger-use-relative-paths

We want to use `DexDeclareFile` to specify paths relative to a project root
directory. The option `--source-root-dir`, prior to this patch, causes dexter
to strip the path prefix from commands before passing them to a debugger, and
appends the prefix to file paths returned from a debugger. This patch changes
the behviour of `--source-root-dir`. Relative paths in commands, made possible
with `DexDeclareFile(relative/path)`, are appended to the `--source-root-dir`
directory.

A new option, `--debugger-use-relative-paths`, can be used alongside
`--source-root-dir` to reproduce the old behaviour: all paths passed to the
debugger will be made relative to `--source-root-dir`.

I've added a regression test source_root_dir.dex for this new behaviour, and
modified the existing `--source-root-dir` regression and unit tests to use
`--debugger-use-relative-paths`.

Reviewed By: jmorse

Differential Revision: https://reviews.llvm.org/D100307




More information about the All-commits mailing list