[PATCH] D118633: [Symbolizer] Add Build ID flag to llvm-symbolizer.

Daniel Thornburgh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 2 14:45:58 PST 2022


mysterymath added inline comments.


================
Comment at: llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp:369-372
+    if (!Symbolizer.findDebugBinary(BuildID, BinaryName)) {
+      errs() << "Could not find build ID: '" << toHex(BuildID) << "'\n";
+      exit(1);
+    }
----------------
jhenderson wrote:
> This is untested.
> 
> Also, the error format is not consistent with the LLVM coding standards or what llvm-symbolizer prints when there's a missing file, as far as I can see.
There were some considerable semantic divergences between --obj and --build-id; the former would return EXIT_SUCCESS and keep going, producing only one error, while the latter would immediately exit with a nonzero status.

The current approach also doesn't extend well to handling multiple build IDs specified on a line-by-line basis, which is a near-term TODO.

Accordingly, I've reworked this functionality to take place inside the Symbolizer, rather than in the wrapping tool. This makes BuildIDs a first-class mechanism that can be used to specify modules; it thus intrinsically has similar error behavior to the other ways of specifying modules. This will also make it easy to build syntax into the stdin mechanism to switch out the module specifier type.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118633



More information about the llvm-commits mailing list