This adds a BUILD_ID prefix to the llvm-symbolizer stdin and argument
syntax. The prefix causes the given binary name to be interpreted as a
build ID instead of an object file path. The semantics are analagous to
the behavior of --obj and --build-id.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
I'm not at all familiar with the debuginfod stuff, so this probably needs a second pair of eyes from someone with more knowledge in this area.
Do you need a test-case where BUILD_ID is used and --obj is specified?
llvm/docs/CommandGuide/llvm-symbolizer.rst | ||
---|---|---|
34 | I have a marginal preference for BUILDID (withotu the underscore), as I dislike typing underscores. I don't feel strongly about this though, so if you prefer with the underscore, that's fine. The use of the term "object file" seems a bit unintuitive here though, since a build ID is neither an object file itself, nor a path to one. Perhaps it would be better to rephrase the references to "object file" earlier in this section with "input name" or similar, then here, I'd start this paragraph with something like "By default, input names are interpreted as object file paths. However, prefixing the command with ...". Finally, I'd then put this paragraph second or third in order in this section. | |
179 | It would be good to have a test case that tests the interaction of BUILD_ID and DATA and/or CODE. | |
llvm/test/tools/llvm-symbolizer/debuginfod.test | ||
54 | Add some indentation to make the output line up, as if it were on the command-line. |
llvm/docs/CommandGuide/llvm-symbolizer.rst | ||
---|---|---|
34 | Could we reverse the order and instead do something like: [CODE] [FILE:]<file> <address> DATA [FILE:]<file> <address> [CODE] BUILDID:<build ID> <address> DATA BUILDID:<build ID> <address> This would avoid the confusion between file and build ID. |
llvm/docs/CommandGuide/llvm-symbolizer.rst | ||
---|---|---|
113–121 | Rather than add FILE: prefixes here, I'd instead modify Example 4 to say "BUILDID and FILE prefixes" or similar, like Example 5's "CODE and DATA prefixes". | |
llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp | ||
149–150 | This piece of code makes me wonder whether a test case with something like FILE:BUILDID:<hex> and/or BUILDID:FILE:<path> or similar might be useful. Not sure either way. |
- Update docs.
- The semantics of mixing multiple input name prefixes isn't obvious, so detect all combinations of more than one prefix reject the line as a syntax error.
I have a marginal preference for BUILDID (withotu the underscore), as I dislike typing underscores. I don't feel strongly about this though, so if you prefer with the underscore, that's fine.
The use of the term "object file" seems a bit unintuitive here though, since a build ID is neither an object file itself, nor a path to one. Perhaps it would be better to rephrase the references to "object file" earlier in this section with "input name" or similar, then here, I'd start this paragraph with something like "By default, input names are interpreted as object file paths. However, prefixing the command with ...". Finally, I'd then put this paragraph second or third in order in this section.