blob: e860be189ad5d74d9866707c4ef50d34e7dfe3fd [file] [log] [blame]
(module
(type $func.0 (func))
(type $func.1 (func (param i32) (result i32)))
(type $func.2 (func (result i32)))
(type $func.3 (func (param i32 i32) (result i32)))
(import "env" "memory" (memory $mimport$0 256 256))
(data (i32.const 1024) "\nvoid used(int x) {\n x++;\n x--;\n return x;\n}\n\nvoid unused(int x) {\n x >>= 1;\n x <<= 1;\n return x;\n}\n\nint main() {\n return used(42);\n}\n\00")
(data (i32.const 1168) "\00\04\00\00")
(import "env" "__indirect_function_table" (table $timport$0 1 funcref))
(global $global$0 (mut i32) (i32.const 5244064))
(global $global$1 i32 (i32.const 1172))
(export "__wasm_call_ctors" (func $__wasm_call_ctors))
(export "main" (func $main))
(export "__data_end" (global $global$1))
(func $__wasm_call_ctors
)
(func $used\28int\29 (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(local $9 i32)
(local $10 i32)
;; code offset: 0xe
(local.set $1
;; code offset: 0x8
(global.get $global$0)
)
;; code offset: 0x12
(local.set $2
;; code offset: 0x10
(i32.const 16)
)
;; code offset: 0x19
(local.set $3
;; code offset: 0x18
(i32.sub
;; code offset: 0x14
(local.get $1)
;; code offset: 0x16
(local.get $2)
)
)
;; code offset: 0x1f
(i32.store offset=12
;; code offset: 0x1b
(local.get $3)
;; code offset: 0x1d
(local.get $0)
)
;; code offset: 0x27
(local.set $4
;; code offset: 0x24
(i32.load offset=12
;; code offset: 0x22
(local.get $3)
)
)
;; code offset: 0x2b
(local.set $5
;; code offset: 0x29
(i32.const 1)
)
;; code offset: 0x32
(local.set $6
;; code offset: 0x31
(i32.add
;; code offset: 0x2d
(local.get $4)
;; code offset: 0x2f
(local.get $5)
)
)
;; code offset: 0x38
(i32.store offset=12
;; code offset: 0x34
(local.get $3)
;; code offset: 0x36
(local.get $6)
)
;; code offset: 0x40
(local.set $7
;; code offset: 0x3d
(i32.load offset=12
;; code offset: 0x3b
(local.get $3)
)
)
;; code offset: 0x44
(local.set $8
;; code offset: 0x42
(i32.const -1)
)
;; code offset: 0x4b
(local.set $9
;; code offset: 0x4a
(i32.add
;; code offset: 0x46
(local.get $7)
;; code offset: 0x48
(local.get $8)
)
)
;; code offset: 0x51
(i32.store offset=12
;; code offset: 0x4d
(local.get $3)
;; code offset: 0x4f
(local.get $9)
)
;; code offset: 0x59
(local.set $10
;; code offset: 0x56
(i32.load offset=12
;; code offset: 0x54
(local.get $3)
)
)
;; code offset: 0x5d
(return
;; code offset: 0x5b
(local.get $10)
)
)
(func $__original_main (result i32)
(local $0 i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(local $9 i32)
(local $10 i32)
;; code offset: 0x69
(local.set $0
;; code offset: 0x63
(global.get $global$0)
)
;; code offset: 0x6d
(local.set $1
;; code offset: 0x6b
(i32.const 16)
)
;; code offset: 0x74
(local.set $2
;; code offset: 0x73
(i32.sub
;; code offset: 0x6f
(local.get $0)
;; code offset: 0x71
(local.get $1)
)
)
;; code offset: 0x78
(global.set $global$0
;; code offset: 0x76
(local.get $2)
)
;; code offset: 0x80
(local.set $3
;; code offset: 0x7e
(i32.const 42)
)
;; code offset: 0x84
(local.set $4
;; code offset: 0x82
(i32.const 0)
)
;; code offset: 0x8a
(i32.store offset=12
;; code offset: 0x86
(local.get $2)
;; code offset: 0x88
(local.get $4)
)
;; code offset: 0x95
(local.set $5
;; code offset: 0x8f
(call $used\28int\29
;; code offset: 0x8d
(local.get $3)
)
)
;; code offset: 0x99
(local.set $6
;; code offset: 0x97
(i32.const 0)
)
;; code offset: 0xa4
(local.set $7
;; code offset: 0x9d
(i32.load offset=1168
;; code offset: 0x9b
(local.get $6)
)
)
;; code offset: 0xab
(local.set $8
;; code offset: 0xaa
(i32.add
;; code offset: 0xa6
(local.get $5)
;; code offset: 0xa8
(local.get $7)
)
)
;; code offset: 0xaf
(local.set $9
;; code offset: 0xad
(i32.const 16)
)
;; code offset: 0xb6
(local.set $10
;; code offset: 0xb5
(i32.add
;; code offset: 0xb1
(local.get $2)
;; code offset: 0xb3
(local.get $9)
)
)
;; code offset: 0xba
(global.set $global$0
;; code offset: 0xb8
(local.get $10)
)
;; code offset: 0xc2
(return
;; code offset: 0xc0
(local.get $8)
)
)
(func $main (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
;; code offset: 0xce
(local.set $2
;; code offset: 0xc8
(call $__original_main)
)
;; code offset: 0xd2
(return
;; code offset: 0xd0
(local.get $2)
)
)
;; custom section ".debug_info", size 175
;; custom section ".debug_ranges", size 32
;; custom section ".debug_abbrev", size 117
;; custom section ".debug_line", size 128
;; custom section ".debug_str", size 235
;; custom section "producers", size 180
)
DWARF debug info
================
Contains section .debug_info (175 bytes)
Contains section .debug_ranges (32 bytes)
Contains section .debug_abbrev (117 bytes)
Contains section .debug_line (128 bytes)
Contains section .debug_str (235 bytes)
.debug_abbrev contents:
Abbrev table for offset: 0x00000000
[1] DW_TAG_compile_unit DW_CHILDREN_yes
DW_AT_producer DW_FORM_strp
DW_AT_language DW_FORM_data2
DW_AT_name DW_FORM_strp
DW_AT_stmt_list DW_FORM_sec_offset
DW_AT_comp_dir DW_FORM_strp
DW_AT_low_pc DW_FORM_addr
DW_AT_ranges DW_FORM_sec_offset
[2] DW_TAG_variable DW_CHILDREN_no
DW_AT_name DW_FORM_strp
DW_AT_type DW_FORM_ref4
DW_AT_external DW_FORM_flag_present
DW_AT_decl_file DW_FORM_data1
DW_AT_decl_line DW_FORM_data1
DW_AT_location DW_FORM_exprloc
[3] DW_TAG_pointer_type DW_CHILDREN_no
DW_AT_type DW_FORM_ref4
[4] DW_TAG_const_type DW_CHILDREN_no
DW_AT_type DW_FORM_ref4
[5] DW_TAG_base_type DW_CHILDREN_no
DW_AT_name DW_FORM_strp
DW_AT_encoding DW_FORM_data1
DW_AT_byte_size DW_FORM_data1
[6] DW_TAG_subprogram DW_CHILDREN_yes
DW_AT_low_pc DW_FORM_addr
DW_AT_high_pc DW_FORM_data4
DW_AT_linkage_name DW_FORM_strp
DW_AT_name DW_FORM_strp
DW_AT_decl_file DW_FORM_data1
DW_AT_decl_line DW_FORM_data1
DW_AT_type DW_FORM_ref4
DW_AT_external DW_FORM_flag_present
[7] DW_TAG_formal_parameter DW_CHILDREN_no
DW_AT_location DW_FORM_exprloc
DW_AT_name DW_FORM_strp
DW_AT_decl_file DW_FORM_data1
DW_AT_decl_line DW_FORM_data1
DW_AT_type DW_FORM_ref4
[8] DW_TAG_subprogram DW_CHILDREN_no
DW_AT_low_pc DW_FORM_addr
DW_AT_high_pc DW_FORM_data4
DW_AT_name DW_FORM_strp
DW_AT_decl_file DW_FORM_data1
DW_AT_decl_line DW_FORM_data1
DW_AT_type DW_FORM_ref4
DW_AT_external DW_FORM_flag_present
.debug_info contents:
0x00000000: Compile Unit: length = 0x000000ab version = 0x0004 abbr_offset = 0x0000 addr_size = 0x04 (next unit at 0x000000af)
0x0000000b: DW_TAG_compile_unit [1] *
DW_AT_producer [DW_FORM_strp] ( .debug_str[0x00000000] = "clang version 10.0.0 (/b/s/w/ir/cache/git/chromium.googlesource.com-external-github.com-llvm-llvm--project f39277c1d370ccbbec2e20a20375ee6fb7281ae4)")
DW_AT_language [DW_FORM_data2] (DW_LANG_C_plus_plus)
DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000095] = "a.cpp")
DW_AT_stmt_list [DW_FORM_sec_offset] (0x00000000)
DW_AT_comp_dir [DW_FORM_strp] ( .debug_str[0x0000009b] = "/home/alon/Dev/emscripten")
DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
DW_AT_ranges [DW_FORM_sec_offset] (0x00000000
[0x00000005, 0x0000005f))
0x00000026: DW_TAG_variable [2]
DW_AT_name [DW_FORM_strp] ( .debug_str[0x000000b5] = "quine")
DW_AT_type [DW_FORM_ref4] (cu + 0x0037 => {0x00000037} "const char*")
DW_AT_external [DW_FORM_flag_present] (true)
DW_AT_decl_file [DW_FORM_data1] ("/home/alon/Dev/emscripten/a.cpp")
DW_AT_decl_line [DW_FORM_data1] (2)
DW_AT_location [DW_FORM_exprloc] (DW_OP_addr 0x490)
0x00000037: DW_TAG_pointer_type [3]
DW_AT_type [DW_FORM_ref4] (cu + 0x003c => {0x0000003c} "const char")
0x0000003c: DW_TAG_const_type [4]
DW_AT_type [DW_FORM_ref4] (cu + 0x0041 => {0x00000041} "char")
0x00000041: DW_TAG_base_type [5]
DW_AT_name [DW_FORM_strp] ( .debug_str[0x000000bb] = "char")
DW_AT_encoding [DW_FORM_data1] (DW_ATE_signed_char)
DW_AT_byte_size [DW_FORM_data1] (0x01)
0x00000048: DW_TAG_base_type [5]
DW_AT_name [DW_FORM_strp] ( .debug_str[0x000000c0] = "int")
DW_AT_encoding [DW_FORM_data1] (DW_ATE_signed)
DW_AT_byte_size [DW_FORM_data1] (0x04)
0x0000004f: DW_TAG_subprogram [6] *
DW_AT_low_pc [DW_FORM_addr] (0x0000000000000005)
DW_AT_high_pc [DW_FORM_data4] (0x0000005a)
DW_AT_linkage_name [DW_FORM_strp] ( .debug_str[0x000000c4] = "_Z4usedi")
DW_AT_name [DW_FORM_strp] ( .debug_str[0x000000cd] = "used")
DW_AT_decl_file [DW_FORM_data1] ("/home/alon/Dev/emscripten/a.cpp")
DW_AT_decl_line [DW_FORM_data1] (4)
DW_AT_type [DW_FORM_ref4] (cu + 0x0048 => {0x00000048} "int")
DW_AT_external [DW_FORM_flag_present] (true)
0x00000066: DW_TAG_formal_parameter [7]
DW_AT_location [DW_FORM_exprloc] (DW_OP_plus_uconst 0xc)
DW_AT_name [DW_FORM_strp] ( .debug_str[0x000000e9] = "x")
DW_AT_decl_file [DW_FORM_data1] ("/home/alon/Dev/emscripten/a.cpp")
DW_AT_decl_line [DW_FORM_data1] (4)
DW_AT_type [DW_FORM_ref4] (cu + 0x0048 => {0x00000048} "int")
0x00000074: NULL
0x00000075: DW_TAG_subprogram [6] *
DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
DW_AT_high_pc [DW_FORM_data4] (0x0000005a)
DW_AT_linkage_name [DW_FORM_strp] ( .debug_str[0x000000d2] = "_Z6unusedi")
DW_AT_name [DW_FORM_strp] ( .debug_str[0x000000dd] = "unused")
DW_AT_decl_file [DW_FORM_data1] ("/home/alon/Dev/emscripten/a.cpp")
DW_AT_decl_line [DW_FORM_data1] (10)
DW_AT_type [DW_FORM_ref4] (cu + 0x0048 => {0x00000048} "int")
DW_AT_external [DW_FORM_flag_present] (true)
0x0000008c: DW_TAG_formal_parameter [7]
DW_AT_location [DW_FORM_exprloc] (DW_OP_plus_uconst 0xc)
DW_AT_name [DW_FORM_strp] ( .debug_str[0x000000e9] = "x")
DW_AT_decl_file [DW_FORM_data1] ("/home/alon/Dev/emscripten/a.cpp")
DW_AT_decl_line [DW_FORM_data1] (10)
DW_AT_type [DW_FORM_ref4] (cu + 0x0048 => {0x00000048} "int")
0x0000009a: NULL
0x0000009b: DW_TAG_subprogram [8]
DW_AT_low_pc [DW_FORM_addr] (0x0000000000000060)
DW_AT_high_pc [DW_FORM_data4] (0x00000064)
DW_AT_name [DW_FORM_strp] ( .debug_str[0x000000e4] = "main")
DW_AT_decl_file [DW_FORM_data1] ("/home/alon/Dev/emscripten/a.cpp")
DW_AT_decl_line [DW_FORM_data1] (16)
DW_AT_type [DW_FORM_ref4] (cu + 0x0048 => {0x00000048} "int")
DW_AT_external [DW_FORM_flag_present] (true)
0x000000ae: NULL
.debug_line contents:
debug_line[0x00000000]
Line table prologue:
total_length: 0x0000007c
version: 4
prologue_length: 0x0000001d
min_inst_length: 1
max_ops_per_inst: 1
default_is_stmt: 1
line_base: -5
line_range: 14
opcode_base: 13
standard_opcode_lengths[DW_LNS_copy] = 0
standard_opcode_lengths[DW_LNS_advance_pc] = 1
standard_opcode_lengths[DW_LNS_advance_line] = 1
standard_opcode_lengths[DW_LNS_set_file] = 1
standard_opcode_lengths[DW_LNS_set_column] = 1
standard_opcode_lengths[DW_LNS_negate_stmt] = 0
standard_opcode_lengths[DW_LNS_set_basic_block] = 0
standard_opcode_lengths[DW_LNS_const_add_pc] = 0
standard_opcode_lengths[DW_LNS_fixed_advance_pc] = 1
standard_opcode_lengths[DW_LNS_set_prologue_end] = 0
standard_opcode_lengths[DW_LNS_set_epilogue_begin] = 0
standard_opcode_lengths[DW_LNS_set_isa] = 1
file_names[ 1]:
name: "a.cpp"
dir_index: 0
mod_time: 0x00000000
length: 0x00000000
0x00000027: 00 DW_LNE_set_address (0x0000000000000005)
0x0000002e: 15 address += 0, line += 3
0x0000000000000005 4 0 1 0 0 is_stmt
0x0000002f: 05 DW_LNS_set_column (4)
0x00000031: 0a DW_LNS_set_prologue_end
0x00000032: 08 DW_LNS_const_add_pc (0x0000000000000011)
0x00000033: bb address += 12, line += 1
0x0000000000000022 5 4 1 0 0 is_stmt prologue_end
0x00000034: 08 DW_LNS_const_add_pc (0x0000000000000011)
0x00000035: 83 address += 8, line += 1
0x000000000000003b 6 4 1 0 0 is_stmt
0x00000036: 05 DW_LNS_set_column (10)
0x00000038: 08 DW_LNS_const_add_pc (0x0000000000000011)
0x00000039: 83 address += 8, line += 1
0x0000000000000054 7 10 1 0 0 is_stmt
0x0000003a: 05 DW_LNS_set_column (3)
0x0000003c: 06 DW_LNS_negate_stmt
0x0000003d: 74 address += 7, line += 0
0x000000000000005b 7 3 1 0 0
0x0000003e: 02 DW_LNS_advance_pc (4)
0x00000040: 00 DW_LNE_end_sequence
0x000000000000005f 7 3 1 0 0 end_sequence
0x00000043: 00 DW_LNE_set_address (0x0000000000000000)
0x0000004a: 03 DW_LNS_advance_line (10)
0x0000004c: 01 DW_LNS_copy
0x0000000000000000 10 0 1 0 0 is_stmt
0x0000004d: 05 DW_LNS_set_column (5)
0x0000004f: 0a DW_LNS_set_prologue_end
0x00000050: 08 DW_LNS_const_add_pc (0x0000000000000011)
0x00000051: bb address += 12, line += 1
0x000000000000001d 11 5 1 0 0 is_stmt prologue_end
0x00000052: 08 DW_LNS_const_add_pc (0x0000000000000011)
0x00000053: 83 address += 8, line += 1
0x0000000000000036 12 5 1 0 0 is_stmt
0x00000054: 05 DW_LNS_set_column (10)
0x00000056: 08 DW_LNS_const_add_pc (0x0000000000000011)
0x00000057: 83 address += 8, line += 1
0x000000000000004f 13 10 1 0 0 is_stmt
0x00000058: 05 DW_LNS_set_column (3)
0x0000005a: 06 DW_LNS_negate_stmt
0x0000005b: 74 address += 7, line += 0
0x0000000000000056 13 3 1 0 0
0x0000005c: 02 DW_LNS_advance_pc (4)
0x0000005e: 00 DW_LNE_end_sequence
0x000000000000005a 13 3 1 0 0 end_sequence
0x00000061: 00 DW_LNE_set_address (0x0000000000000060)
0x00000068: 03 DW_LNS_advance_line (16)
0x0000006a: 01 DW_LNS_copy
0x0000000000000060 16 0 1 0 0 is_stmt
0x0000006b: 05 DW_LNS_set_column (10)
0x0000006d: 0a DW_LNS_set_prologue_end
0x0000006e: 02 DW_LNS_advance_pc (45)
0x00000070: 13 address += 0, line += 1
0x000000000000008d 17 10 1 0 0 is_stmt prologue_end
0x00000071: 05 DW_LNS_set_column (25)
0x00000073: 06 DW_LNS_negate_stmt
0x00000074: 9e address += 10, line += 0
0x0000000000000097 17 25 1 0 0
0x00000075: 05 DW_LNS_set_column (19)
0x00000077: e4 address += 15, line += 0
0x00000000000000a6 17 19 1 0 0
0x00000078: 05 DW_LNS_set_column (3)
0x0000007a: 74 address += 7, line += 0
0x00000000000000ad 17 3 1 0 0
0x0000007b: 02 DW_LNS_advance_pc (23)
0x0000007d: 00 DW_LNE_end_sequence
0x00000000000000c4 17 3 1 0 0 end_sequence
.debug_str contents:
0x00000000: "clang version 10.0.0 (/b/s/w/ir/cache/git/chromium.googlesource.com-external-github.com-llvm-llvm--project f39277c1d370ccbbec2e20a20375ee6fb7281ae4)"
0x00000095: "a.cpp"
0x0000009b: "/home/alon/Dev/emscripten"
0x000000b5: "quine"
0x000000bb: "char"
0x000000c0: "int"
0x000000c4: "_Z4usedi"
0x000000cd: "used"
0x000000d2: "_Z6unusedi"
0x000000dd: "unused"
0x000000e4: "main"
0x000000e9: "x"
.debug_ranges contents:
00000000 00000005 0000005f
00000000 <End of list>
00000010 00000060 000000c4
00000010 <End of list>
DWARF debug info
================
Contains section .debug_info (175 bytes)
Contains section .debug_ranges (32 bytes)
Contains section .debug_abbrev (117 bytes)
Contains section .debug_line (169 bytes)
Contains section .debug_str (235 bytes)
.debug_abbrev contents:
Abbrev table for offset: 0x00000000
[1] DW_TAG_compile_unit DW_CHILDREN_yes
DW_AT_producer DW_FORM_strp
DW_AT_language DW_FORM_data2
DW_AT_name DW_FORM_strp
DW_AT_stmt_list DW_FORM_sec_offset
DW_AT_comp_dir DW_FORM_strp
DW_AT_low_pc DW_FORM_addr
DW_AT_ranges DW_FORM_sec_offset
[2] DW_TAG_variable DW_CHILDREN_no
DW_AT_name DW_FORM_strp
DW_AT_type DW_FORM_ref4
DW_AT_external DW_FORM_flag_present
DW_AT_decl_file DW_FORM_data1
DW_AT_decl_line DW_FORM_data1
DW_AT_location DW_FORM_exprloc
[3] DW_TAG_pointer_type DW_CHILDREN_no
DW_AT_type DW_FORM_ref4
[4] DW_TAG_const_type DW_CHILDREN_no
DW_AT_type DW_FORM_ref4
[5] DW_TAG_base_type DW_CHILDREN_no
DW_AT_name DW_FORM_strp
DW_AT_encoding DW_FORM_data1
DW_AT_byte_size DW_FORM_data1
[6] DW_TAG_subprogram DW_CHILDREN_yes
DW_AT_low_pc DW_FORM_addr
DW_AT_high_pc DW_FORM_data4
DW_AT_linkage_name DW_FORM_strp
DW_AT_name DW_FORM_strp
DW_AT_decl_file DW_FORM_data1
DW_AT_decl_line DW_FORM_data1
DW_AT_type DW_FORM_ref4
DW_AT_external DW_FORM_flag_present
[7] DW_TAG_formal_parameter DW_CHILDREN_no
DW_AT_location DW_FORM_exprloc
DW_AT_name DW_FORM_strp
DW_AT_decl_file DW_FORM_data1
DW_AT_decl_line DW_FORM_data1
DW_AT_type DW_FORM_ref4
[8] DW_TAG_subprogram DW_CHILDREN_no
DW_AT_low_pc DW_FORM_addr
DW_AT_high_pc DW_FORM_data4
DW_AT_name DW_FORM_strp
DW_AT_decl_file DW_FORM_data1
DW_AT_decl_line DW_FORM_data1
DW_AT_type DW_FORM_ref4
DW_AT_external DW_FORM_flag_present
.debug_info contents:
0x00000000: Compile Unit: length = 0x000000ab version = 0x0004 abbr_offset = 0x0000 addr_size = 0x04 (next unit at 0x000000af)
0x0000000b: DW_TAG_compile_unit [1] *
DW_AT_producer [DW_FORM_strp] ( .debug_str[0x00000000] = "clang version 10.0.0 (/b/s/w/ir/cache/git/chromium.googlesource.com-external-github.com-llvm-llvm--project f39277c1d370ccbbec2e20a20375ee6fb7281ae4)")
DW_AT_language [DW_FORM_data2] (DW_LANG_C_plus_plus)
DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000095] = "a.cpp")
DW_AT_stmt_list [DW_FORM_sec_offset] (0x00000000)
DW_AT_comp_dir [DW_FORM_strp] ( .debug_str[0x0000009b] = "/home/alon/Dev/emscripten")
DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
DW_AT_ranges [DW_FORM_sec_offset] (0x00000000
[0x00000005, 0x0000006d))
0x00000026: DW_TAG_variable [2]
DW_AT_name [DW_FORM_strp] ( .debug_str[0x000000b5] = "quine")
DW_AT_type [DW_FORM_ref4] (cu + 0x0037 => {0x00000037} "const char*")
DW_AT_external [DW_FORM_flag_present] (true)
DW_AT_decl_file [DW_FORM_data1] ("/home/alon/Dev/emscripten/a.cpp")
DW_AT_decl_line [DW_FORM_data1] (2)
DW_AT_location [DW_FORM_exprloc] (DW_OP_addr 0x490)
0x00000037: DW_TAG_pointer_type [3]
DW_AT_type [DW_FORM_ref4] (cu + 0x003c => {0x0000003c} "const char")
0x0000003c: DW_TAG_const_type [4]
DW_AT_type [DW_FORM_ref4] (cu + 0x0041 => {0x00000041} "char")
0x00000041: DW_TAG_base_type [5]
DW_AT_name [DW_FORM_strp] ( .debug_str[0x000000bb] = "char")
DW_AT_encoding [DW_FORM_data1] (DW_ATE_signed_char)
DW_AT_byte_size [DW_FORM_data1] (0x01)
0x00000048: DW_TAG_base_type [5]
DW_AT_name [DW_FORM_strp] ( .debug_str[0x000000c0] = "int")
DW_AT_encoding [DW_FORM_data1] (DW_ATE_signed)
DW_AT_byte_size [DW_FORM_data1] (0x04)
0x0000004f: DW_TAG_subprogram [6] *
DW_AT_low_pc [DW_FORM_addr] (0x0000000000000005)
DW_AT_high_pc [DW_FORM_data4] (0x00000068)
DW_AT_linkage_name [DW_FORM_strp] ( .debug_str[0x000000c4] = "_Z4usedi")
DW_AT_name [DW_FORM_strp] ( .debug_str[0x000000cd] = "used")
DW_AT_decl_file [DW_FORM_data1] ("/home/alon/Dev/emscripten/a.cpp")
DW_AT_decl_line [DW_FORM_data1] (4)
DW_AT_type [DW_FORM_ref4] (cu + 0x0048 => {0x00000048} "int")
DW_AT_external [DW_FORM_flag_present] (true)
0x00000066: DW_TAG_formal_parameter [7]
DW_AT_location [DW_FORM_exprloc] (DW_OP_plus_uconst 0xc)
DW_AT_name [DW_FORM_strp] ( .debug_str[0x000000e9] = "x")
DW_AT_decl_file [DW_FORM_data1] ("/home/alon/Dev/emscripten/a.cpp")
DW_AT_decl_line [DW_FORM_data1] (4)
DW_AT_type [DW_FORM_ref4] (cu + 0x0048 => {0x00000048} "int")
0x00000074: NULL
0x00000075: DW_TAG_subprogram [6] *
DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
DW_AT_high_pc [DW_FORM_data4] (0x00000000)
DW_AT_linkage_name [DW_FORM_strp] ( .debug_str[0x000000d2] = "_Z6unusedi")
DW_AT_name [DW_FORM_strp] ( .debug_str[0x000000dd] = "unused")
DW_AT_decl_file [DW_FORM_data1] ("/home/alon/Dev/emscripten/a.cpp")
DW_AT_decl_line [DW_FORM_data1] (10)
DW_AT_type [DW_FORM_ref4] (cu + 0x0048 => {0x00000048} "int")
DW_AT_external [DW_FORM_flag_present] (true)
0x0000008c: DW_TAG_formal_parameter [7]
DW_AT_location [DW_FORM_exprloc] (DW_OP_plus_uconst 0xc)
DW_AT_name [DW_FORM_strp] ( .debug_str[0x000000e9] = "x")
DW_AT_decl_file [DW_FORM_data1] ("/home/alon/Dev/emscripten/a.cpp")
DW_AT_decl_line [DW_FORM_data1] (10)
DW_AT_type [DW_FORM_ref4] (cu + 0x0048 => {0x00000048} "int")
0x0000009a: NULL
0x0000009b: DW_TAG_subprogram [8]
DW_AT_low_pc [DW_FORM_addr] (0x000000000000006e)
DW_AT_high_pc [DW_FORM_data4] (0x00000065)
DW_AT_name [DW_FORM_strp] ( .debug_str[0x000000e4] = "main")
DW_AT_decl_file [DW_FORM_data1] ("/home/alon/Dev/emscripten/a.cpp")
DW_AT_decl_line [DW_FORM_data1] (16)
DW_AT_type [DW_FORM_ref4] (cu + 0x0048 => {0x00000048} "int")
DW_AT_external [DW_FORM_flag_present] (true)
0x000000ae: NULL
.debug_line contents:
debug_line[0x00000000]
Line table prologue:
total_length: 0x000000a5
version: 4
prologue_length: 0x0000001d
min_inst_length: 1
max_ops_per_inst: 1
default_is_stmt: 1
line_base: -5
line_range: 14
opcode_base: 13
standard_opcode_lengths[DW_LNS_copy] = 0
standard_opcode_lengths[DW_LNS_advance_pc] = 1
standard_opcode_lengths[DW_LNS_advance_line] = 1
standard_opcode_lengths[DW_LNS_set_file] = 1
standard_opcode_lengths[DW_LNS_set_column] = 1
standard_opcode_lengths[DW_LNS_negate_stmt] = 0
standard_opcode_lengths[DW_LNS_set_basic_block] = 0
standard_opcode_lengths[DW_LNS_const_add_pc] = 0
standard_opcode_lengths[DW_LNS_fixed_advance_pc] = 1
standard_opcode_lengths[DW_LNS_set_prologue_end] = 0
standard_opcode_lengths[DW_LNS_set_epilogue_begin] = 0
standard_opcode_lengths[DW_LNS_set_isa] = 1
file_names[ 1]:
name: "a.cpp"
dir_index: 0
mod_time: 0x00000000
length: 0x00000000
0x00000027: 00 DW_LNE_set_address (0x0000000000000005)
0x0000002e: 03 DW_LNS_advance_line (4)
0x00000030: 01 DW_LNS_copy
0x0000000000000005 4 0 1 0 0 is_stmt
0x00000031: 00 DW_LNE_set_address (0x0000000000000030)
0x00000038: 03 DW_LNS_advance_line (5)
0x0000003a: 05 DW_LNS_set_column (4)
0x0000003c: 0a DW_LNS_set_prologue_end
0x0000003d: 01 DW_LNS_copy
0x0000000000000030 5 4 1 0 0 is_stmt prologue_end
0x0000003e: 00 DW_LNE_set_address (0x0000000000000049)
0x00000045: 03 DW_LNS_advance_line (6)
0x00000047: 01 DW_LNS_copy
0x0000000000000049 6 4 1 0 0 is_stmt
0x00000048: 00 DW_LNE_set_address (0x0000000000000062)
0x0000004f: 03 DW_LNS_advance_line (7)
0x00000051: 05 DW_LNS_set_column (10)
0x00000053: 01 DW_LNS_copy
0x0000000000000062 7 10 1 0 0 is_stmt
0x00000054: 00 DW_LNE_set_address (0x0000000000000069)
0x0000005b: 05 DW_LNS_set_column (3)
0x0000005d: 06 DW_LNS_negate_stmt
0x0000005e: 01 DW_LNS_copy
0x0000000000000069 7 3 1 0 0
0x0000005f: 00 DW_LNE_set_address (0x000000000000006d)
0x00000066: 00 DW_LNE_end_sequence
0x000000000000006d 7 3 1 0 0 end_sequence
0x00000069: 00 DW_LNE_set_address (0x000000000000006e)
0x00000070: 03 DW_LNS_advance_line (16)
0x00000072: 01 DW_LNS_copy
0x000000000000006e 16 0 1 0 0 is_stmt
0x00000073: 00 DW_LNE_set_address (0x00000000000000a7)
0x0000007a: 03 DW_LNS_advance_line (17)
0x0000007c: 05 DW_LNS_set_column (10)
0x0000007e: 0a DW_LNS_set_prologue_end
0x0000007f: 01 DW_LNS_copy
0x00000000000000a7 17 10 1 0 0 is_stmt prologue_end
0x00000080: 00 DW_LNE_set_address (0x00000000000000ad)
0x00000087: 05 DW_LNS_set_column (25)
0x00000089: 06 DW_LNS_negate_stmt
0x0000008a: 01 DW_LNS_copy
0x00000000000000ad 17 25 1 0 0
0x0000008b: 00 DW_LNE_set_address (0x00000000000000b9)
0x00000092: 05 DW_LNS_set_column (19)
0x00000094: 01 DW_LNS_copy
0x00000000000000b9 17 19 1 0 0
0x00000095: 00 DW_LNE_set_address (0x00000000000000c0)
0x0000009c: 05 DW_LNS_set_column (3)
0x0000009e: 01 DW_LNS_copy
0x00000000000000c0 17 3 1 0 0
0x0000009f: 00 DW_LNE_set_address (0x00000000000000d3)
0x000000a6: 00 DW_LNE_end_sequence
0x00000000000000d3 17 3 1 0 0 end_sequence
.debug_str contents:
0x00000000: "clang version 10.0.0 (/b/s/w/ir/cache/git/chromium.googlesource.com-external-github.com-llvm-llvm--project f39277c1d370ccbbec2e20a20375ee6fb7281ae4)"
0x00000095: "a.cpp"
0x0000009b: "/home/alon/Dev/emscripten"
0x000000b5: "quine"
0x000000bb: "char"
0x000000c0: "int"
0x000000c4: "_Z4usedi"
0x000000cd: "used"
0x000000d2: "_Z6unusedi"
0x000000dd: "unused"
0x000000e4: "main"
0x000000e9: "x"
.debug_ranges contents:
00000000 00000005 0000006d
00000000 <End of list>
00000010 0000006e 000000d3
00000010 <End of list>
(module
(type $func.0 (func))
(type $func.1 (func (param i32) (result i32)))
(type $func.2 (func (result i32)))
(type $func.3 (func (param i32 i32) (result i32)))
(import "env" "memory" (memory $mimport$0 256 256))
(data (i32.const 1024) "\nvoid used(int x) {\n x++;\n x--;\n return x;\n}\n\nvoid unused(int x) {\n x >>= 1;\n x <<= 1;\n return x;\n}\n\nint main() {\n return used(42);\n}\n\00")
(data (i32.const 1168) "\00\04\00\00")
(import "env" "__indirect_function_table" (table $timport$0 1 funcref))
(global $global$0 (mut i32) (i32.const 5244064))
(global $global$1 i32 (i32.const 1172))
(export "__wasm_call_ctors" (func $__wasm_call_ctors))
(export "main" (func $main))
(export "__data_end" (global $global$1))
(func $__wasm_call_ctors
)
(func $used\28int\29 (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(local $9 i32)
(local $10 i32)
;; code offset: 0x1c
(local.set $1
;; code offset: 0x1a
(global.get $global$0)
)
;; code offset: 0x20
(local.set $2
;; code offset: 0x1e
(i32.const 16)
)
;; code offset: 0x27
(local.set $3
;; code offset: 0x26
(i32.sub
;; code offset: 0x22
(local.get $1)
;; code offset: 0x24
(local.get $2)
)
)
;; code offset: 0x2d
(i32.store offset=12
;; code offset: 0x29
(local.get $3)
;; code offset: 0x2b
(local.get $0)
)
;; code offset: 0x35
(local.set $4
;; code offset: 0x32
(i32.load offset=12
;; code offset: 0x30
(local.get $3)
)
)
;; code offset: 0x39
(local.set $5
;; code offset: 0x37
(i32.const 1)
)
;; code offset: 0x40
(local.set $6
;; code offset: 0x3f
(i32.add
;; code offset: 0x3b
(local.get $4)
;; code offset: 0x3d
(local.get $5)
)
)
;; code offset: 0x46
(i32.store offset=12
;; code offset: 0x42
(local.get $3)
;; code offset: 0x44
(local.get $6)
)
;; code offset: 0x4e
(local.set $7
;; code offset: 0x4b
(i32.load offset=12
;; code offset: 0x49
(local.get $3)
)
)
;; code offset: 0x52
(local.set $8
;; code offset: 0x50
(i32.const -1)
)
;; code offset: 0x59
(local.set $9
;; code offset: 0x58
(i32.add
;; code offset: 0x54
(local.get $7)
;; code offset: 0x56
(local.get $8)
)
)
;; code offset: 0x5f
(i32.store offset=12
;; code offset: 0x5b
(local.get $3)
;; code offset: 0x5d
(local.get $9)
)
;; code offset: 0x67
(local.set $10
;; code offset: 0x64
(i32.load offset=12
;; code offset: 0x62
(local.get $3)
)
)
;; code offset: 0x6b
(return
;; code offset: 0x69
(local.get $10)
)
)
(func $__original_main (result i32)
(local $0 i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(local $9 i32)
(local $10 i32)
;; code offset: 0x87
(local.set $0
;; code offset: 0x85
(global.get $global$0)
)
;; code offset: 0x8b
(local.set $1
;; code offset: 0x89
(i32.const 16)
)
;; code offset: 0x92
(local.set $2
;; code offset: 0x91
(i32.sub
;; code offset: 0x8d
(local.get $0)
;; code offset: 0x8f
(local.get $1)
)
)
;; code offset: 0x96
(global.set $global$0
;; code offset: 0x94
(local.get $2)
)
;; code offset: 0x9a
(local.set $3
;; code offset: 0x98
(i32.const 42)
)
;; code offset: 0x9e
(local.set $4
;; code offset: 0x9c
(i32.const 0)
)
;; code offset: 0xa4
(i32.store offset=12
;; code offset: 0xa0
(local.get $2)
;; code offset: 0xa2
(local.get $4)
)
;; code offset: 0xab
(local.set $5
;; code offset: 0xa9
(call $used\28int\29
;; code offset: 0xa7
(local.get $3)
)
)
;; code offset: 0xaf
(local.set $6
;; code offset: 0xad
(i32.const 0)
)
;; code offset: 0xb7
(local.set $7
;; code offset: 0xb3
(i32.load offset=1168
;; code offset: 0xb1
(local.get $6)
)
)
;; code offset: 0xbe
(local.set $8
;; code offset: 0xbd
(i32.add
;; code offset: 0xb9
(local.get $5)
;; code offset: 0xbb
(local.get $7)
)
)
;; code offset: 0xc2
(local.set $9
;; code offset: 0xc0
(i32.const 16)
)
;; code offset: 0xc9
(local.set $10
;; code offset: 0xc8
(i32.add
;; code offset: 0xc4
(local.get $2)
;; code offset: 0xc6
(local.get $9)
)
)
;; code offset: 0xcd
(global.set $global$0
;; code offset: 0xcb
(local.get $10)
)
;; code offset: 0xd1
(return
;; code offset: 0xcf
(local.get $8)
)
)
(func $main (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
;; code offset: 0xd9
(local.set $2
;; code offset: 0xd7
(call $__original_main)
)
;; code offset: 0xdd
(return
;; code offset: 0xdb
(local.get $2)
)
)
;; custom section ".debug_info", size 175
;; custom section ".debug_ranges", size 32
;; custom section ".debug_abbrev", size 117
;; custom section ".debug_line", size 169
;; custom section ".debug_str", size 235
;; custom section "producers", size 180
)