1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/lib/DebugInfo
Pavel Labath 3703cd20d6 DWARFDebugLoc: Make parsing and error reporting more robust
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
2019-08-29 14:26:05 +00:00
..
CodeView Removing block comments from CodeView records in assembly files & related code cleanup 2019-08-25 01:09:11 +00:00
DWARF DWARFDebugLoc: Make parsing and error reporting more robust 2019-08-29 14:26:05 +00:00
GSYM Add FileWriter to GSYM and encode/decode functions to AddressRange and AddressRanges 2019-08-21 21:48:11 +00:00
MSF [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
PDB [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
Symbolize [llvm-objdump] Add warning messages if disassembly + source for problematic inputs 2019-08-15 05:15:22 +00:00
CMakeLists.txt Add GSYM utility files along with unit tests. 2019-06-26 14:09:09 +00:00
LLVMBuild.txt Fix build in shared lib mode. 2019-06-26 15:46:48 +00:00