summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo/X86/dwarfdump-debug-loclists-error-cases.s
Commit message (Collapse)AuthorAgeFilesLines
* DWARFDebugLoc: Make parsing and error reporting more robustPavel Labath2019-08-291-0/+71
Summary: While examining this class for possible use in lldb, I noticed two things: - it spits out parsing errors directly to stderr - the loclists parser can incorrectly return valid location lists when parsing malformed (truncated) data I improve the stderr situation by making the parseOneLocationList functions return Expected<T>s. The errors are still dumped to stderr by their callers, so this is only a partial fix, but it is enough for my use case, as I intend to parse the locations lists one by one. I fix the behavior in the truncated scenario by using the newly introduced DataExtractor Cursor API. I also add tests for handling the error cases, as they currently have no coverage. Reviewers: dblaikie, JDevlieghere, probinson Subscribers: lldb-commits, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63591 llvm-svn: 370363
OpenPOWER on IntegriCloud