DWARFExpression

public enum DWARFExpression

DWARF expressions describe how to compute a value or specify a location. They are expressed in terms of DWARF operations that operate on a stack of values.

A DWARF expression is encoded as a stream of operations, each consisting of an opcode followed by zero or more literal operands.

Literals

  • Encodes a single machine address value whose size is the size of an address on the target machine.

    Declaration

    Swift

    case addr(UInt64)
  • Encodes the unsigned literal value 0.

    Declaration

    Swift

    case lit0
  • Encodes the unsigned literal value 1.

    Declaration

    Swift

    case lit1
  • Encodes the unsigned literal value 2.

    Declaration

    Swift

    case lit2
  • Encodes the unsigned literal value 3.

    Declaration

    Swift

    case lit3
  • Encodes the unsigned literal value 4.

    Declaration

    Swift

    case lit4
  • Encodes the unsigned literal value 5.

    Declaration

    Swift

    case lit5
  • Encodes the unsigned literal value 6.

    Declaration

    Swift

    case lit6
  • Encodes the unsigned literal value 7.

    Declaration

    Swift

    case lit7
  • Encodes the unsigned literal value 8.

    Declaration

    Swift

    case lit8
  • Encodes the unsigned literal value 9.

    Declaration

    Swift

    case lit9
  • Encodes the unsigned literal value 10.

    Declaration

    Swift

    case lit10
  • Encodes the unsigned literal value 11.

    Declaration

    Swift

    case lit11
  • Encodes the unsigned literal value 12.

    Declaration

    Swift

    case lit12
  • Encodes the unsigned literal value 13.

    Declaration

    Swift

    case lit13
  • Encodes the unsigned literal value 14.

    Declaration

    Swift

    case lit14
  • Encodes the unsigned literal value 15.

    Declaration

    Swift

    case lit15
  • Encodes the unsigned literal value 16.

    Declaration

    Swift

    case lit16
  • Encodes the unsigned literal value 17.

    Declaration

    Swift

    case lit17
  • Encodes the unsigned literal value 18.

    Declaration

    Swift

    case lit18
  • Encodes the unsigned literal value 19.

    Declaration

    Swift

    case lit19
  • Encodes the unsigned literal value 20.

    Declaration

    Swift

    case lit20
  • Encodes the unsigned literal value 21.

    Declaration

    Swift

    case lit21
  • Encodes the unsigned literal value 22.

    Declaration

    Swift

    case lit22
  • Encodes the unsigned literal value 23.

    Declaration

    Swift

    case lit23
  • Encodes the unsigned literal value 24.

    Declaration

    Swift

    case lit24
  • Encodes the unsigned literal value 25.

    Declaration

    Swift

    case lit25
  • Encodes the unsigned literal value 26.

    Declaration

    Swift

    case lit26
  • Encodes the unsigned literal value 27.

    Declaration

    Swift

    case lit27
  • Encodes the unsigned literal value 28.

    Declaration

    Swift

    case lit28
  • Encodes the unsigned literal value 29.

    Declaration

    Swift

    case lit29
  • Encodes the unsigned literal value 30.

    Declaration

    Swift

    case lit30
  • Encodes the unsigned literal value 31.

    Declaration

    Swift

    case lit31
  • Encodes a 1-byte unsigned integer constant.

    Declaration

    Swift

    case const1u(UInt8)
  • Encodes a 1-byte signed integer constant.

    Declaration

    Swift

    case const1s(Int8)
  • Encodes a 2-byte unsigned integer constant.

    Declaration

    Swift

    case const2u(UInt16)
  • Encodes a 2-byte signed integer constant.

    Declaration

    Swift

    case const2s(Int16)
  • Encodes a 4-byte unsigned integer constant.

    Declaration

    Swift

    case const4u(UInt32)
  • Encodes a 4-byte signed integer constant.

    Declaration

    Swift

    case const4s(Int32)
  • Encodes a 8-byte unsigned integer constant.

    Declaration

    Swift

    case const8u(UInt64)
  • Encodes a 8-byte signed integer constant.

    Declaration

    Swift

    case const8s(Int64)
  • Encodes a little-endian base-128 unsigned integer constant.

    Declaration

    Swift

    case constu(UInt64)
  • Encodes a little-endian base-128 signed integer constant.

    Declaration

    Swift

    case consts(Int64)
  • Encodes an unsigned little-endian base-128 value, which is a zero-based index into the .debug_addr section where a machine address is stored. This index is relative to the value of the DW_AT_addr_base attribute of the associated compilation unit.

    Declaration

    Swift

    case addrx(UInt64)
  • Encodes an unsigned little-endian base-128 value, which is a zero-based index into the .debug_addr section where a constant, the size of a machine address, is stored. This index is relative to the value of the DW_AT_addr_base attribute of the associated compilation unit.

    This operation is provided for constants that require link-time relocation but should not be interpreted by the consumer as a relocatable address ( for example, offsets to thread-local storage).

    Declaration

    Swift

    case constx(UInt64)

Register Values

  • Provides a signeed little-endian base-128 offset from the address specified by the location description in the DW_AT_frame_base attribute of the current function.

    Declaration

    Swift

    case fbreg(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 0.

    Declaration

    Swift

    case breg0(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 1.

    Declaration

    Swift

    case breg1(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 2.

    Declaration

    Swift

    case breg2(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 3.

    Declaration

    Swift

    case breg3(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 4.

    Declaration

    Swift

    case breg4(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 5.

    Declaration

    Swift

    case breg5(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 6.

    Declaration

    Swift

    case breg6(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 7.

    Declaration

    Swift

    case breg7(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 8.

    Declaration

    Swift

    case breg8(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 9.

    Declaration

    Swift

    case breg9(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 10.

    Declaration

    Swift

    case breg10(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 11.

    Declaration

    Swift

    case breg11(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 12.

    Declaration

    Swift

    case breg12(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 13.

    Declaration

    Swift

    case breg13(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 14.

    Declaration

    Swift

    case breg14(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 15.

    Declaration

    Swift

    case breg15(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 16.

    Declaration

    Swift

    case breg16(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 17.

    Declaration

    Swift

    case breg17(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 18.

    Declaration

    Swift

    case breg18(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 19.

    Declaration

    Swift

    case breg19(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 20.

    Declaration

    Swift

    case breg20(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 21.

    Declaration

    Swift

    case breg21(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 22.

    Declaration

    Swift

    case breg22(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 23.

    Declaration

    Swift

    case breg23(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 24.

    Declaration

    Swift

    case breg24(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 25.

    Declaration

    Swift

    case breg25(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 26.

    Declaration

    Swift

    case breg26(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 27.

    Declaration

    Swift

    case breg27(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 28.

    Declaration

    Swift

    case breg28(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 29.

    Declaration

    Swift

    case breg29(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 30.

    Declaration

    Swift

    case breg30(Int64)
  • The single operand of the breg operation provides a signed little-endian base-128 offset from the contents of register 31.

    Declaration

    Swift

    case breg31(Int64)
  • Provides the sum of two values specified by its two operands. The first operand being a register number which is in unsigned little-endian base-128 form. The second being an offset in signed little-endian base-128 form.

    Declaration

    Swift

    case bregx(UInt64, Int64)
  • Provides an operation with three operands: The first is an unsigned little-endian base-128 integer that represents the offset of a debugging information entry in the current compilation unit, which must be a base type entry that provides the type of the constant provided. The second operand is a 1-byte unsigned integer that specifies the size of the constant value, which is the same size as the base type referenced by the first operand. The third operand is a sequence of bytes of the given size that is interpreted as a value of the referenced type.

    Declaration

    Swift

    case constType(DIAttributeTypeEncoding, UInt8, [UInt8])
  • Provides the contents of a given register interpreted as a value of a given type. The first operand is an unsigned little-endian base-128 number which identifies a register whose contents are pushed onto the stack. The second operand is an unsigned little-endian base-128 number that represents the offset of a debugging information entry in the current compilation unit which must have base type.

    Declaration

    Swift

    case regvalType(UInt64, DIAttributeTypeEncoding)

Stack Operations

  • dup

    Duplicates the value (including its type identifier) at the top of the stack.

    Declaration

    Swift

    case dup
  • Pops the value (including its type identifier) at the top of the stack.

    Declaration

    Swift

    case drop
  • Provides a 1-byte index that is used to index into the stack. A copy of stack entry at that index is pushed onto the stack.

    Declaration

    Swift

    case pick(UInt8)
  • Duplicates the entry currently second in the stack and pushes it onto the stack.

    This operation is equivalent to .pick(1).

    Declaration

    Swift

    case over
  • Swaps the top two stack entries. The entry at the top of the stack (including its type identifier) becomes the second stack entry, and the second entry (including its type identifier) becomes the top of the stack.

    Declaration

    Swift

    case swap
  • rot

    Rotates the first three stack entries. The entry at the top of the stack (including its type identifier) becomes the third stack entry, the second stack entry (including its type identifier) becomes the top of the stack, and the third entry (including its type identifier) becomes the second entry.

    Declaration

    Swift

    case rot
  • Pops the top stack entry and treats it as an address.

    The popped value must have an integral type. The value retrieved from that address is pushed, and has the generic type. The size of the data retrieved from the dereferenced address is the size of an address on the target machine.

    Declaration

    Swift

    case deref
  • Pops the top stack entry and treats it as an address.

    The popped value must have an integral type. The value retrieved from that address is pushed, and has the generic type. The size of the data retrieved from the dereferenced address is specified by the operand, whose value is a 1-byte unsigned integral constant. The data retrieved is zero-extended to the size of an address on the target machine before being pushed onto the expression stack.

    Declaration

    Swift

    case derefSize(UInt8)
  • Pops the top stack entry and treats it as an address.

    The popped value must have an integral type. The size of the data retrieved from the dereferenced address is specified by the first operand, whose value is a 1-byte unsigned integral constant. The data retrieved is zero-extended to the size of an address on the target machine before being pushed onto the expression stack. The second operand is an unsigned little-endian base-128 integer that represents the offset of a debugging information entry in the current compilation unit which must have a base type entry that provides the type of the data pushed.

    Declaration

    Swift

    case derefType(UInt8, UInt64)
  • Provides an extended dereference mechanism.

    The entry at the top of the stack is treated as an address. The second stack entry is treated as an “address space identifier” for those architectures that support multiple address spaces. Both of these entries must have integral type identifiers.

    The top two stack elements are popped, and a data item is retrieved through an implementation-defined address calculation and pushed as the new stack top together with the generic type identifier. The size of the data retrieved from the dereferenced address is the size of the generic type.

    Declaration

    Swift

    case xderef
  • Provides an extended dereference mechanism.

    The entry at the top of the stack is treated as an address. The second stack entry is treated as an “address space identifier” for those architectures that support multiple address spaces. Both of these entries must have integral type identifiers.

    The top two stack elements are popped, and a data item is retrieved through an implementation-defined address calculation and pushed as the new stack top together with the generic type identifier. The size of the data retrieved from the dereferenced address is specified by the operand, whose value is a 1-byte unsigned integral constant. The data retrieved is zero-extended to the size of an address on the target machine before being pushed onto the expression stack.

    Declaration

    Swift

    case xderefSize(UInt8)
  • Pops the top two stack entries, treats them as an address and an address space identifier, and pushes the value retrieved. The size of the data retrieved from the dereferenced address is specified by the first operand, whose value is a 1-byte unsigned integral constant. The data retrieved is zero-extended to the size of an address on the target machine before being pushed onto the expression stack. The second operand is an unsigned little-endian base-128 integer that represents the offset of a debugging information entry in the current compilation unit, which must have base type that provides the type of the data pushed.

    Declaration

    Swift

    case xderefType(UInt8, UInt64)
  • Pushes the address of the object currently being evaluated as part of evaluationo of a user-presented expression. The object may correspond to an indepdendent variable deescribed by its own debugging information entry or it may be a component of an array, structure, or class whose address has been dynamically determined by an earlier step during user expression evaluation.

    Declaration

    Swift

    case pushObjectAddress
  • Pops a value from the stack, which must have an integral type identifier, translates this value into an address in the thread-local storage for a thread, and pushes the addreess onto the stack together with the generic type identifier. The meaning of the value on the top of the stack prior to this operation is defined by the run-time environment. If the run-time environment supports multiple thread-local storage blocks for a single thread, then the block corresponding to the executable or shared library containing this DWARF expreession is used.

    Declaration

    Swift

    case formTLSAddress
  • Pushes the value of the Canonical Frame Address (CFA), obtained from the Call Frame Information.

    Declaration

    Swift

    case callFrameCFA

Arithmetic and Logical Operations

  • abs

    Pops the top stack entry, interprets it as a signed value and pushes its absolute value. If the absolute value cannot be represented, the result is undefined.

    Declaration

    Swift

    case abs
  • and

    Pops the top two stack values, performs a bitwise and operation on the two, and pushes the result.

    Declaration

    Swift

    case and
  • div

    Pops the top two stack values, divides the former second entry by the former top of the stack using signed division, and pushes the result.

    Declaration

    Swift

    case div
  • Pops the top two stack values, subtracts the former second entry by the former top of the stack, and pushes the result.

    Declaration

    Swift

    case minus
  • mod

    Pops the top two stack values, performs a modulo operation on the two, and pushes the result.

    Declaration

    Swift

    case mod
  • mul

    Pops the top two stack values, multiplies the former second entry by the former top of the stack, and pushes the result.

    Declaration

    Swift

    case mul
  • neg

    Pops the top stack entry, interprets it as a signed value, and pushes its negation. If the negation cannot be represented, the result is undefined.

    Declaration

    Swift

    case neg
  • not

    Pops the top stack entry, and pushes its bitwise complement.

    Declaration

    Swift

    case not
  • or

    Pops the top two stack entries, performs a bitwise or operation on the two, and pushes the result.

    Declaration

    Swift

    case or
  • Pops the top two stack entries, adds them together, and pushes the result.

    Declaration

    Swift

    case plus
  • Pops the top stack entry, adds it to the unsigned little-endian base-128 constant operand interpreted as the same type as the operand popped from the top of the stack and pushes the result.

    Declaration

    Swift

    case plus_uconst(UInt64)
  • shl

    Pops the top twoo stack entries, shifts the former second entry left (filling with zero bits) by the number of bits specified by the former top of the stack, and pushes the result.

    Declaration

    Swift

    case shl
  • shr

    Pops the top two stack entries, shifts the former second entry right logically (filling with zero bits) by the number of bits specified by the former top of the stack, and pushes the result.

    Declaration

    Swift

    case shr
  • Pops the top two stack entries, shifts the former second entry right arithmetically (divides the magnitude by 2, keeps the same sign for the result) by the number of bits specified by the former top of the stack, and pushes the result.

    Declaration

    Swift

    case shra
  • xor

    Pops the top two stack entries, performs a bitwise exclusive-or operation on the two, and pushes the result.

    Declaration

    Swift

    case xor

Control Flow Operations

  • eq

    Pops the top two stack values, which must have the same type, either the base type or the generic type, compares them using the = relational operator, and pushes the constant 1 onto the stack if the result is true, else pushes the constnat value 0 if the result is false.

    Declaration

    Swift

    case eq
  • ge

    Pops the top two stack values, which must have the same type, either the base type or the generic type, compares them using the >= relational operator, and pushes the constant 1 onto the stack if the result is true, else pushes the constnat value 0 if the result is false.

    Declaration

    Swift

    case ge
  • gt

    Pops the top two stack values, which must have the same type, either the base type or the generic type, compares them using the > relational operator, and pushes the constant 1 onto the stack if the result is true, else pushes the constnat value 0 if the result is false.

    Declaration

    Swift

    case gt
  • le

    Pops the top two stack values, which must have the same type, either the base type or the generic type, compares them using the <= relational operator, and pushes the constant 1 onto the stack if the result is true, else pushes the constnat value 0 if the result is false.

    Declaration

    Swift

    case le
  • lt

    Pops the top two stack values, which must have the same type, either the base type or the generic type, compares them using the < relational operator, and pushes the constant 1 onto the stack if the result is true, else pushes the constnat value 0 if the result is false.

    Declaration

    Swift

    case lt
  • ne

    Pops the top two stack values, which must have the same type, either the base type or the generic type, compares them using the != relational operator, and pushes the constant 1 onto the stack if the result is true, else pushes the constnat value 0 if the result is false.

    Declaration

    Swift

    case ne
  • Unconditionally branches forward or backward by the number of bytes specified in its operand.

    Declaration

    Swift

    case skip(Int16)
  • Conditionally branches forward or backward by the number of bytes specified in its operand according to the value at the top of the stack. The top of the stack is popped, and if it is non-zero then the branch is performed.

    Declaration

    Swift

    case bra(Int16)
  • Performs a DWARF procedure call during the evaluation of a DWARF expression or location description. The operand is the 2-byte unsigned offset of a debugging information entry in the current compilation unit.

    For references from one executable or shared object file to another, the relocation must be performed by the consumer.

    This operation transfers control of DWARF expression evaluation to the DW_AT_location attribute of the referenced debugging information entry. If there is no such attribute, then there is no effect. Execution returns to the point following the call when the end of the attribute is reached.

    Declaration

    Swift

    case call2(UInt16)
  • Performs a DWARF procedure call during the evaluation of a DWARF expression or location description. The operand is the 4-byte unsigned offset of a debugging information entry in the current compilation unit.

    For references from one executable or shared object file to another, the relocation must be performed by the consumer.

    This operation transfers control of DWARF expression evaluation to the DW_AT_location attribute of the referenced debugging information entry. If there is no such attribute, then there is no effect. Execution returns to the point following the call when the end of the attribute is reached.

    Declaration

    Swift

    case call4(UInt32)
  • Performs a DWARF procedure call during the evaluation of a DWARF expression or location description. The operand is used as the offset of a debugging information entry in a .debug_info section which may be contained in an executable or shared object file rather than that containing the operator.

    For references from one executable or shared object file to another, the relocation must be performed by the consumer.

    This operation transfers control of DWARF expression evaluation to the DW_AT_location attribute of the referenced debugging information entry. If there is no such attribute, then there is no effect. Execution returns to the point following the call when the end of the attribute is reached.

    Declaration

    Swift

    case callRef(UInt64)

Type Conversions

  • Pops the top stack entry, converts it to a different type, then pushes the result.

    The operand is an unsigned little-endian base-128 integer that represents the offset of a debugging information entry in the current compilation unit, or value 0 which represents the generic type. If the operand is non-zero, the referenced entry must be a base type entry that provides the type to which the value is converted.

    Declaration

    Swift

    case convert(UInt64)
  • Pops the top stack entry, reinterprets the bits in its value as a value of a different type, then pushes the result.

    The operand is an unsigned little-endian base-128 integer that represents the offset of a debugging information entry in the current compilation unit, or value 0 which represents the generic type. If the operand is non-zero, the referenced entry must be a base type entry that provides the type to which the value is converted.

    Declaration

    Swift

    case reinterpret(UInt64)

Special Operations

  • nop

    This operation has no effect on the location stack or any of its values.

    Declaration

    Swift

    case nop
  • Pushes the value that the described location held upon entering the current subprogram. The first operand is an unsigned little-endian base-128 number expressing the length of the second operand in bytes. The second operand is a block containing a DWARF expression or a register location description.

    Declaration

    Swift

    indirect case entryValue(UInt64, DWARFExpression)

Location Descriptions

  • Encodes the name of the register numbered 0.

    Declaration

    Swift

    case reg0
  • Encodes the name of the register numbered 1.

    Declaration

    Swift

    case reg1
  • Encodes the name of the register numbered 2.

    Declaration

    Swift

    case reg2
  • Encodes the name of the register numbered 3.

    Declaration

    Swift

    case reg3
  • Encodes the name of the register numbered 4.

    Declaration

    Swift

    case reg4
  • Encodes the name of the register numbered 5.

    Declaration

    Swift

    case reg5
  • Encodes the name of the register numbered 6.

    Declaration

    Swift

    case reg6
  • Encodes the name of the register numbered 7.

    Declaration

    Swift

    case reg7
  • Encodes the name of the register numbered 8.

    Declaration

    Swift

    case reg8
  • Encodes the name of the register numbered 9.

    Declaration

    Swift

    case reg9
  • Encodes the name of the register numbered 10.

    Declaration

    Swift

    case reg10
  • Encodes the name of the register numbered 11.

    Declaration

    Swift

    case reg11
  • Encodes the name of the register numbered 12.

    Declaration

    Swift

    case reg12
  • Encodes the name of the register numbered 13.

    Declaration

    Swift

    case reg13
  • Encodes the name of the register numbered 14.

    Declaration

    Swift

    case reg14
  • Encodes the name of the register numbered 15.

    Declaration

    Swift

    case reg15
  • Encodes the name of the register numbered 16.

    Declaration

    Swift

    case reg16
  • Encodes the name of the register numbered 17.

    Declaration

    Swift

    case reg17
  • Encodes the name of the register numbered 18.

    Declaration

    Swift

    case reg18
  • Encodes the name of the register numbered 19.

    Declaration

    Swift

    case reg19
  • Encodes the name of the register numbered 20.

    Declaration

    Swift

    case reg20
  • Encodes the name of the register numbered 21.

    Declaration

    Swift

    case reg21
  • Encodes the name of the register numbered 22.

    Declaration

    Swift

    case reg22
  • Encodes the name of the register numbered 23.

    Declaration

    Swift

    case reg23
  • Encodes the name of the register numbered 24.

    Declaration

    Swift

    case reg24
  • Encodes the name of the register numbered 25.

    Declaration

    Swift

    case reg25
  • Encodes the name of the register numbered 26.

    Declaration

    Swift

    case reg26
  • Encodes the name of the register numbered 27.

    Declaration

    Swift

    case reg27
  • Encodes the name of the register numbered 28.

    Declaration

    Swift

    case reg28
  • Encodes the name of the register numbered 29.

    Declaration

    Swift

    case reg29
  • Encodes the name of the register numbered 30.

    Declaration

    Swift

    case reg30
  • Encodes the name of the register numbered 31.

    Declaration

    Swift

    case reg31
  • Contains a single unsigned little-endian base-128 literal operand that encodes the name of a register.

    Declaration

    Swift

    case regx(UInt64)

Implicit Location Descriptionos

  • Specifies an immediate value using two operands: an unsigned little-endian base-128 length, followed by a sequence of bytes of the given length that contain the value.

    Declaration

    Swift

    case implicitValue(UInt64, [UInt8])
  • Specifies that the object does not exist in memory, but its value is nonetheless known and is at the top of the DWARF expression stack. In this form of location description, the DWARF expression represents the actual value of the object, rather than its location.

    stackValue acts as an expression terminator.

    Declaration

    Swift

    case stackValue

Composite Location Descriptions

  • Takes a single operand in little-endian base-128 form. This operand describes the size in bytes of the piece of the object referenced by the preceding simple location description. If the piece is located in a register, but does not occupy the entire register, the placement of the piece within that register is defined by the ABI.

    Declaration

    Swift

    case piece(UInt64)
  • Takes two operands, an unsigned little-endian base-128 form number that gives the size in bits of the piece. The second is an unsigned little- endian base-128 number that gives the offset in bits from the location defined by the preceding DWARF location description.

    bitPiece is used instead of piece when the piece to be assembled into a value or assigned to is not byte-sized or is not at the start of a register or addressable unit of memory.

    Interpretation of the offset depends on the location description. If the location description is empty, the offset doesn’t matter and the bitPiece operation describes a piece consisting of the given number of bits whose values are undefined. If the location is a register, the offset is from the least significant bit end of the register. If the location is a memory address, the bitPiece operation describes a sequence of bits relative to the location whose address is on the top of the DWARF stack using the bit numbering and direction conventions that are appropriate to the current language on the target system. If the location is any implicit value or stack value, the bitPiece operation describes a sequence of bits using the least significant bits of that value.

    Declaration

    Swift

    case bitPiece(UInt64, UInt64)
  • Specifies that the object is a pointer that cannot be represented as a real pointer, even though the value it would point to can be described.

    In this form of location description, the DWARF expression refers to a debugging information entry that represents the actual value of the object to which the pointer would point. Thus, a consumer of the debug information would be able to show the value of the dereferenced pointer, even when it cannot show the value of the pointer itself.

    The first operand is used as the offset of a debugging information entry in a .debug_info section, which may be contained in an executable or shared object file other than that containing the operator.

    For references from one executable or shared object file to another, the relocation must be performed by the consumer.

    Declaration

    Swift

    case implicitPointer(UInt64, Int64)