[llvm] [llvm-objdump] Add --substitute-path and --source-dir for --source (PR #201096)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 8 04:55:32 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.
----------------
VladimirMedic wrote:

In the implementation of gdb that I investigated, the behavior is that path is added to the beginning of the list, as per the comment:
"\
Add directory DIR to beginning of search path for source files.\n\
Forget cached info on source file locations and line positions.\n\
DIR can also be $cwd for the current working directory, or $cdir for the\n\
directory in which the source file was compiled into object code.\n\
With no argument, reset the search path to $cdir:$cwd, the default."

https://github.com/llvm/llvm-project/pull/201096


More information about the llvm-commits mailing list