1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082
|
(module
(type $none_=>_none (func))
(type $i32_=>_i32 (func (param i32) (result i32)))
(type $none_=>_i32 (func (result i32)))
(type $i32_i32_=>_i32 (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 $none_=>_none (func))
(type $i32_=>_i32 (func (param i32) (result i32)))
(type $none_=>_i32 (func (result i32)))
(type $i32_i32_=>_i32 (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
)
|