Rewrote the initial DW_OP_piece support to be able to support opcodes like:
authorGreg Clayton <gclayton@apple.com>
Thu, 31 Jul 2014 18:19:28 +0000 (18:19 +0000)
committerGreg Clayton <gclayton@apple.com>
Thu, 31 Jul 2014 18:19:28 +0000 (18:19 +0000)
commitac583610479c63056a64356a1d3bd3b40814f60d
treec718602c5422dcd57385517f84424b52b32b5947
parent0f4fbf17f57f4697cbda98f544920cfbcda22762
Rewrote the initial DW_OP_piece support to be able to support opcodes like:

DW_OP_fbreg(N) DW_OP_piece(4) DW_OP_fbreg(M) DW_OP_piece(8)
DW_OP_fbreg(N) DW_OP_piece(4) DW_OP_piece(8)

The first grabs 4 bytes from FP+N followed by 8 bytes from FP+M, the second grabs 4 bytes from FP+N followed by zero filling 8 bytes which are unavailable. Of course regiters are stuff supported:

DW_OP_reg3 DW_OP_piece(4) DW_OP_reg8 DW_OP_piece(8)

The fix does the following:
1 - don't push the full piece value onto the stack, keep it on the side
2 - fill zeros for DW_OP_piece(N) opcodes that have nothing on the stack (instead of previously consuming the full piece that was pushed onto the stack)
3 - simplify the logic

<rdar://problem/16930524>

llvm-svn: 214415
lldb/include/lldb/Core/Value.h
lldb/source/Core/Value.cpp
lldb/source/Expression/DWARFExpression.cpp