[PATCH] D112759: [llvm] [Debuginfo] Add llvm-debuginfod-find tool and end-to-end-tests.
    Noah Shutty via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Sun Dec  5 19:36:18 PST 2021
    
    
  
noajshu added a comment.
Hi @labath thanks for all of your comments on `debuginfod-find.py`. I agree it is cleaner to use FileCheck for the lit tests, and I rewrote these tests into `debuginfod.test` incorporating your suggestions and also some feedback on the tests in D113717 <https://reviews.llvm.org/D113717>.
Regarding the output behavior, Elfutils `debuginfod-find` prints the path of the fetched/cached artifact file to stdout. By default, `llvm-debuginfod-find` does the same. I've also added a command line flag `llvm-debuginfod-find --dump` which dumps the //contents// of the artifact to stdout instead of its file path.
If you can only print the path to the cached file, you have to read the stdout and then use that path as the argument to another program (e.g. `cat`). This is easy to do in a full shell using `xargs`, or  a subshell or variable, but inconvenient in LLVM Lit scripts which use a sequence of LLVM commands chained by pipes.
Does this output behavior of `llvm-debuginfod-find` and the `--dump` flag seem reasonable to you? If it's more clear we could change the name to `--print-contents` or something else. Thanks!
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112759/new/
https://reviews.llvm.org/D112759
    
    
More information about the llvm-commits
mailing list