I'm in the process of converting LLDB to use LLVM's DWARFUnitHeader
instead of its own implementation. One big difference between the two is
that LLDB actually provides an error when applying an index entry to a
DWARFHeaderUnit in a DWO context. LLVM's implementation would be more
useful if it did the same.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Time | Test | |
---|---|---|
240 ms | x64 debian > Flang.Driver::compiler_options.f90 |
Event Timeline
I realize this should have a test as well. I didn't find any existing tests that I could easily extend so if anybody has any suggestions for a way to construct a test, please let me know!
llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp | ||
---|---|---|
358 | Are these actually specific to DWP files or should the error messages be more generic? |
llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp | ||
---|---|---|
358 | These error messages are inspired by the equivalent ones in LLDB, but I'm not entirely sure. My understanding is that this code only executes in the context of DWO, so if it's specific to DWP I wouldn't be surprised. Maybe somebody else can chime in and give some better context. |
I realize this should have a test as well. I didn't find any existing tests that I could easily extend so if anybody has any suggestions for a way to construct a test, please let me know!
Yeah, would be good to have test coverage. I'd start by adding an assert(false) to the function you're modifying (or maybe just to one of the error paths, though it's likely they're not so well tested/might not have coverage) - to identify some test cases that exercise this code,t hen maybe you can extend those tests or create new ones inspired by the existing ones?
Are these actually specific to DWP files or should the error messages be more generic?