[PATCH] D95232: Symbolizer - Teach symbolizer to work directly on object file.

praveen velliengiri via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 18 08:38:51 PST 2021


pvellien added a comment.

In D95232#2566234 <https://reviews.llvm.org/D95232#2566234>, @MaskRay wrote:

> From my reads of the history of this component, I think DebugInfo/Symbolize was extracted from llvm-symbolizer because sanitizer runtime needs it. Later other LLVM internal tools (sanitizer runtime, sancov, sanstats, llvm-xray, etc) use the API as well.
> I don't find usage from open-source projects. There could be, but I speculate that if do some refactoring the friction will be small.
>
> Currently the `std::string` overloads are mainly used. It seems to me that we don't need to `std::string` overloads. They can likely all switch to the `const ObjectFile &` overloads.
> I will take a stab at cleaning up the call sites.
>
> @pvellien @scott.linder The concern with not testing the new API is that they are otherwise unused (I guess that you may have downstream projects which may adopt them soon) and may be deleted by other contributors as dead code.
> If you have some specific use cases, contributing unittests would probably be a good idea.
> I'll try refactoring the API, if `const std::string&` is replaced with `const ObjectFile &` overloads, then the API will be used by in-tree code and will be less likely deleted as dead code.

@MaskRay Yes, we planned to use those APIs for the heterogeneous address sanitizer, where we have a device (gpu) object code embedded in a data section of the executable. If we want to symbolize the device object code it would to good to have llvm-symbolizer to symbolize directly on the in-memory instance rather than dumping data to a file and passing the file name to llvm-symbolizer.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95232



More information about the llvm-commits mailing list