[PATCH] D81319: [Dexter] Add --source-dir-root flag

Tom Weaver via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 11 10:28:08 PDT 2020


TWeaver added a comment.

> First off, thanks for the feedback!
> 
> I also wondered where the best place would be for this path mapping. However, I still think DebuggerBase is a good spot as the debuggers currently rely on knowing context.source_files. So whichever tool wants to use the debuggers will also have to fill context.source_files, and therefore also run in the problem of needing to remap paths to the ones used in the compilation unit. Moving this mapping into the test tool would prevent other tools from reusing it.
> 
> Also, moving this mapping into the test tool would require to make the source_files be relative paths (to the source_root_dir) before calling the debuggers.
>  This leads to a future me now needing to remember what kind of path is used where: An absolute file system path (test tool), a path relative to source_root_dir (DebuggerController), or a debug info path (Debugger).
> 
> WDYT?

After musing on it I do agree that having this at the point of use is probably better for reuse of this code and does remove the need for propagating this behaviour around other parts of Dexter too. Happy for this to go ahead from a 'this goes in debuggerbase' point of view now.

thanks for the explanation.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81319





More information about the llvm-commits mailing list