[PATCH] D149759: [symbolizer] Support symbol lookup

Serge Pavlov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 7 12:16:19 PDT 2023


sepavloff added inline comments.


================
Comment at: llvm/lib/DebugInfo/Symbolize/Symbolize.cpp:238-239
+  auto InfoOrErr = getOrCreateModuleInfo(ModuleSpecifier);
+  if (!InfoOrErr)
+    return InfoOrErr.takeError();
+
----------------
sepavloff wrote:
> jhenderson wrote:
> > Is there testing covering this failure for this specific case?
> It is unlikely that this code fails, because `getOrCreateModuleInfo` is called early to check existence and validity of binary file.
I was wrong. If binary file name was not specified via `--obj` option, it will be extracted from command line arguments. In this case `getOrCreateModuleInfo` is called just in this code and may fail. The relevant test is added to `symbol-search.test`.


================
Comment at: llvm/lib/DebugInfo/Symbolize/Symbolize.cpp:246-247
+  // result.
+  if (!Info)
+    return Result;
+
----------------
sepavloff wrote:
> jhenderson wrote:
> > Ditto.
> Actually this code was copied from `symbolize*Common`, it will fail exactly in the same cases when fail those functions.
It seems this case (no error from `getOrCreateModuleInfo` but zero pointer to `SymbolizableModule`) cannot be realized.


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

https://reviews.llvm.org/D149759



More information about the llvm-commits mailing list