[PATCH] D149058: [BPF][DebugInfo] Use .BPF.ext for line info when DWARF is not available

Eduard Zingerman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 8 05:28:35 PDT 2023


eddyz87 added a comment.

In D149058#4325770 <https://reviews.llvm.org/D149058#4325770>, @yonghong-song wrote:

> From BPF perspective, it looks good to me. The only thing I am not sure is in struct DILineInfo, `std::optional<StringRef> LineSource;` is added which sounds a little bit weird since 'Source' is there. But the 'LineSource' is used to differentiate from dwarf 'Source'. If this is not preferred, we could remove it and hide the LineSource info in BTFContext instead.

Sorry, not sure I understand. The only way to preserve old interface for `DILineInfo` that I see is to collect all lines stored in .BTF.ext, sort those lines by file name, line number and create `std::string` instances with "fake" source code for each file (which is a bit wasteful from cpu/memory pov). Is that what you mean or am I missing something?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149058



More information about the llvm-commits mailing list