[llvm] [llvm-objdump] Add --substitute-path and --source-dir for --source (PR #201096)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 12 01:19:08 PDT 2026
================
@@ -4,13 +4,13 @@
;; lives in this test's Inputs directory. Without path remapping, --source
;; cannot load the file from disk.
;;
-;; --source-dir: each flag is prepended to the search list, so later flags on
-;; the command line are tried first.
+;; --source-dir: one directory per flag; later flags on the command line are
+;; searched before earlier ones.
----------------
jh7370 wrote:
If I'm following things, the difference here is that with llvm-objdump you have to specify all the options upfront when invoking the tool, whereas in GDB, you specify them one at a time, potentially at vastly different points in the debugging process (with the ability to reset in between).
Given this, I think we need to go with the precedent of other similar options in non-interactive tools, i.e. first to last processing. See for example the --debug-file-directory, which is conceptually similar to this option. That uses first to last sequencing.
https://github.com/llvm/llvm-project/pull/201096
More information about the llvm-commits
mailing list