1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/lib/DebugInfo
Pavel Labath ad86d0ceb5 [debug_loc] Fix typo in DWARFExpression constructor
Summary:
The positions of the DwarfVersion and AddressSize arguments were
reversed, which caused parsing for dwarf opcodes which contained
address-size-dependent operands (such as DW_OP_addr). Amusingly enough,
none of the address-size asserts fired, as dwarf version was always 4,
which is a valid address size.

I ran into this when constructing weird inputs for the DWARF verifier. I
I add a test case as hand-written dwarf -- I am not sure how to trigger
this differently, as having a DW_OP_addr inside a location list is a
fairly non-standard thing to do.

Fixing this error exposed a bug in the debug_loc.dwo parser, which was
always being constructed with an address size of 0. I fix that as well
by following the pattern in the non-dwo parser of picking up the address
size from the first compile unit (which is technically not correct, but
probably good enough in practice).

Reviewers: JDevlieghere, aprantl, dblaikie

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D45324

llvm-svn: 329381
2018-04-06 08:49:57 +00:00
..
CodeView [DebugInfo] Change std::sort to llvm::sort in response to r327219 2018-04-01 16:18:49 +00:00
DWARF [debug_loc] Fix typo in DWARFExpression constructor 2018-04-06 08:49:57 +00:00
MSF [MSF] Default to FPM2, and always mark FPM pages allocated. 2018-03-29 18:34:15 +00:00
PDB [llvm-pdbutil] Add the ability to explain binary files. 2018-04-04 17:29:09 +00:00
Symbolize Fix build broken by r326959 2018-03-08 00:07:26 +00:00
CMakeLists.txt [msf] Resubmit "Rename Msf -> MSF". 2016-07-29 20:56:36 +00:00
LLVMBuild.txt [msf] Resubmit "Rename Msf -> MSF". 2016-07-29 20:56:36 +00:00