Input

Context

Expression

Presets

Output

Preprocessed Input

    

Evaluation Trace

Notes

Source

This is generated from the DWARF expression evaluator at barisaktemur/dwarf-locstack. The web playground is implemented by Scott Linder using ocsigen/js_of_ocaml.

The set of implemented DWARF operators is the same as the set of constructors for type dwarf_op in the expression evaluator.

Supported Ops (type dwarf_op)
  | DW_OP_const4s of int
  | DW_OP_lit0  | DW_OP_lit1  | DW_OP_lit2  | DW_OP_lit3
  | DW_OP_lit4  | DW_OP_lit5  | DW_OP_lit6  | DW_OP_lit7
  | DW_OP_lit8  | DW_OP_lit9  | DW_OP_lit10 | DW_OP_lit11
  | DW_OP_lit12 | DW_OP_lit13 | DW_OP_lit14 | DW_OP_lit15
  | DW_OP_lit16 | DW_OP_lit17 | DW_OP_lit18 | DW_OP_lit19
  | DW_OP_lit20 | DW_OP_lit21 | DW_OP_lit22 | DW_OP_lit23
  | DW_OP_lit24 | DW_OP_lit25 | DW_OP_lit26 | DW_OP_lit27
  | DW_OP_lit28 | DW_OP_lit29 | DW_OP_lit30 | DW_OP_lit31
  | DW_OP_plus
  | DW_OP_mul
  | DW_OP_dup
  | DW_OP_drop
  | DW_OP_pick of int
  | DW_OP_over
  | DW_OP_swap
  | DW_OP_rot
  | DW_OP_push_lane
  | DW_OP_regval of int
  | DW_OP_lt
  | DW_OP_eq
  | DW_OP_skip of int (* Number of operators to skip.  *)
  | DW_OP_bra of int (* Number of operators to skip.  *)
  | DW_OP_call of string (* Name of the DW_AT_location element in the context.  *)
  | DW_OP_addr of int
  | DW_OP_regx of int
  | DW_OP_reg0  | DW_OP_reg1  | DW_OP_reg2  | DW_OP_reg3
  | DW_OP_reg4  | DW_OP_reg5  | DW_OP_reg6  | DW_OP_reg7
  | DW_OP_reg8  | DW_OP_reg9  | DW_OP_reg10 | DW_OP_reg11
  | DW_OP_reg12 | DW_OP_reg13 | DW_OP_reg14 | DW_OP_reg15
  | DW_OP_reg16 | DW_OP_reg17 | DW_OP_reg18 | DW_OP_reg19
  | DW_OP_reg20 | DW_OP_reg21 | DW_OP_reg22 | DW_OP_reg23
  | DW_OP_reg24 | DW_OP_reg25 | DW_OP_reg26 | DW_OP_reg27
  | DW_OP_reg28 | DW_OP_reg29 | DW_OP_reg30 | DW_OP_reg31
  | DW_OP_bregx of int * int
  | DW_OP_breg0 of int  | DW_OP_breg1 of int  | DW_OP_breg2 of int  | DW_OP_breg3 of int
  | DW_OP_breg4 of int  | DW_OP_breg5 of int  | DW_OP_breg6 of int  | DW_OP_breg7 of int
  | DW_OP_breg8 of int  | DW_OP_breg9 of int  | DW_OP_breg10 of int | DW_OP_breg11 of int
  | DW_OP_breg12 of int | DW_OP_breg13 of int | DW_OP_breg14 of int | DW_OP_breg15 of int
  | DW_OP_breg16 of int | DW_OP_breg17 of int | DW_OP_breg18 of int | DW_OP_breg19 of int
  | DW_OP_breg20 of int | DW_OP_breg21 of int | DW_OP_breg22 of int | DW_OP_breg23 of int
  | DW_OP_breg24 of int | DW_OP_breg25 of int | DW_OP_breg26 of int | DW_OP_breg27 of int
  | DW_OP_breg28 of int | DW_OP_breg29 of int | DW_OP_breg30 of int | DW_OP_breg31 of int
  | DW_OP_undefined
  | DW_OP_implicit_value of int * data
  | DW_OP_stack_value
  | DW_OP_implicit_pointer of string * int
  | DW_OP_composite
  | DW_OP_piece of int
  | DW_OP_overlay
  | DW_OP_push_object_location
  | DW_OP_deref
  | DW_OP_offset
        

Input Syntax

The (simplified) input format is one DWARF operation per line, with space-delimited parameters. Comments begin with ; and extend to the end of the line.

The full expression syntax is just an sexp list as described at janestreet/sexplib. A preprocessor implements the simplified format and generates the canonical sexp form. If any non-comment parenthesis character (either "(" or ")") is present the preprocessor is disabled.