Skip to content

Commit 020994e

Browse files
authored
Merge pull request #165 from CodaFi/stack-em
Fix encoding of DW_OP_implicit_value
2 parents 162f163 + e7e3ff9 commit 020994e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/LLVM/DWARFExpression.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ public enum DWARFExpression {
598598
/// Specifies an immediate value using two operands: an unsigned little-endian
599599
/// base-128 length, followed by a sequence of bytes of the given length that
600600
/// contain the value.
601-
case implicitValue(UInt64)
601+
case implicitValue(UInt64, [UInt8])
602602

603603
/// Specifies that the object does not exist in memory, but its value is
604604
/// nonetheless known and is at the top of the DWARF expression stack. In
@@ -963,8 +963,8 @@ extension DWARFExpression {
963963
return [ 0x9c ]
964964
case let .bitPiece(val1, val2):
965965
return [ 0x9d, val1, val2 ]
966-
case let .implicitValue(val):
967-
return [ 0x9e, val ]
966+
case let .implicitValue(val, bytes):
967+
return [ 0x9e, val ] + packBytes(bytes)
968968
case .stackValue:
969969
return [ 0x9f ]
970970
case let .implicitPointer(val1, val2):

0 commit comments

Comments
 (0)