Page MenuHomePhabricator

[lldb] Improve error handling around GetRngListData()
Needs ReviewPublic

Authored by kimanh on Sep 3 2021, 5:53 AM.

Details

Reviewers
jankratochvil
Summary

This adds more informative error handling around the
usage of GetRngListData.

Diff Detail

Event Timeline

kimanh created this revision.Sep 3 2021, 5:53 AM
kimanh published this revision for review.Sep 3 2021, 5:54 AM
kimanh added a reviewer: jankratochvil.

I've split up the other CL (https://reviews.llvm.org/D107456) into the part that was reviewed, and this: the error handling that was requested on that CL. Please take a look whenever you have time!

Herald added a project: Restricted Project. · View Herald TranscriptSep 3 2021, 5:55 AM
shafik added a subscriber: shafik.Sep 7 2021, 8:29 AM
shafik added inline comments.
lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
522

If I am reading this correctly, it looks like this will only be set on the non-error case which will leave contribution_off in the caller uninitialized in the cases you care about logging.

kimanh added inline comments.Sep 23 2021, 10:17 PM
lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
522

Sorry for the very late reply (I had a long vacation)! And thanks for the comment.

If GetRnglistData didn't work, the error will be thrown below (line 526) in here. However, if it is successful, but another problem occurs (callers of GetRnglistData throw an error) the Offset will be initialized, and it can be logged. Example: ParseListTableHeader using it in ll. 548. Does that make sense?