[Lldb-commits] [PATCH] D147606: [lldb] fix #61942, discard "empty" ranges in DWARF to better handle gcc binary

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 11 01:10:29 PDT 2023


labath added a comment.

In D147606#4249283 <https://reviews.llvm.org/D147606#4249283>, @JDevlieghere wrote:

> In D147606#4247462 <https://reviews.llvm.org/D147606#4247462>, @jwnhy wrote:
>
>> In D147606#4246832 <https://reviews.llvm.org/D147606#4246832>, @JDevlieghere wrote:
>>
>>> The change looks fine and regardless of whether this makes sense or even complies with the standard, we should be resilient against it. I would like to see a test though.
>>
>> Thanks a lot for the comment, I am new to lldb community, and got one thing a bit silly to ask.
>> Up to now, a few patches I submitted is kind of "depending on the compiler-generated" binary?
>> What am I supposed to do to **ensure the compiler generates these "easy-to-fault" binaries in the test?**
>>
>> Like in this one, not every compiler will generate "empty ranges", and in the other one that is "DW_OP_div"...
>
> Yes, this would require a test that checks in what the compiler generates (as opposed to the majority of our "API tests" that build test cases from source). This can either be an assembly file (something like `dwarf5-implicit-const.s`) or a YAML file created with `obj2yaml` (something like `section-overlap.yaml`).

You may be able to adapt/extend `lldb/test/Shell/SymbolFile/DWARF/x86/debug_ranges.s`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147606



More information about the lldb-commits mailing list