[PATCH] D157210: [symbolizer] Change reaction on invalid input
Serge Pavlov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 27 00:44:49 PDT 2023
sepavloff marked an inline comment as done.
sepavloff added inline comments.
================
Comment at: llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp:299
+ if (Interactive)
+ printUnknownLineInfo(ModuleName, Printer);
+ },
----------------
jhenderson wrote:
> Does this really need to be conditional on interactive mode? It seems an unnecessary complication to me.
This is an unneeded complication, removed.
================
Comment at: llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp:198
if (Name.empty())
- // Wrong name for module file.
- return false;
+ return makeStringError("input file name is incorrect");
if (HasBuildIDPrefix) {
----------------
jhenderson wrote:
> sepavloff wrote:
> > MaskRay wrote:
> > > `cannot be empty` seems better than `is incorrect`
> > It is not for missing argument but for the case of unterminated strings:
> > ```
> > $ cat sym.inp
> > FILE:"addr.exe 0x400540
> > $ ./llvm-symbolizer <sym.inp
> > $ ./llvm-symbolizer: error: 'FILE:"addr.exe 0x400540': input file name is incorrect
> > ```
> "is incorrect" doesn't seem right to me either. It doesn't tell the user how it is incorrect.
>
> Also, I couldn't see a test case for this?
Changed to more specific message about unbalanced quotes.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157210/new/
https://reviews.llvm.org/D157210
More information about the llvm-commits
mailing list