dw2-1.S 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. /* This testcase is derived from a similar test in GDB.
  2. Copyright (C) 2008-2017 Free Software Foundation, Inc.
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 3 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  13. /* Dummy function to provide debug information for. */
  14. .text
  15. .globl _start
  16. _start:
  17. .4byte 0
  18. .Lbegin_text1:
  19. .globl func_cu1
  20. .type func_cu1, %function
  21. func_cu1:
  22. .Lbegin_func_cu1:
  23. .4byte 0
  24. .Lend_func_cu1:
  25. .size func_cu1, .-func_cu1
  26. .Lend_text1:
  27. /* Debug information */
  28. .section .debug_info
  29. .Lcu1_begin:
  30. /* CU header */
  31. .4byte .Lcu1_end - .Lcu1_start /* Length of Compilation Unit */
  32. .Lcu1_start:
  33. .2byte 2 /* DWARF Version */
  34. .4byte .Labbrev1_begin /* Offset into abbrev section */
  35. .byte 4 /* Pointer size */
  36. /* CU die */
  37. .uleb128 1 /* Abbrev: DW_TAG_compile_unit */
  38. .4byte .Lline1_begin /* DW_AT_stmt_list */
  39. .4byte .Lend_text1 /* DW_AT_high_pc */
  40. .4byte .Lbegin_text1 /* DW_AT_low_pc */
  41. .ascii "file1.txt\0" /* DW_AT_name */
  42. .ascii "GNU C 3.3.3\0" /* DW_AT_producer */
  43. .byte 1 /* DW_AT_language (C) */
  44. /* func_cu1 */
  45. .uleb128 2 /* Abbrev: DW_TAG_subprogram */
  46. .byte 1 /* DW_AT_external */
  47. .byte 1 /* DW_AT_decl_file */
  48. .byte 2 /* DW_AT_decl_line */
  49. .ascii "func_cu1\0" /* DW_AT_name */
  50. .4byte .Ltype_int-.Lcu1_begin /* DW_AT_type */
  51. .4byte .Lbegin_func_cu1 /* DW_AT_low_pc */
  52. .4byte .Lend_func_cu1 /* DW_AT_high_pc */
  53. .byte 1 /* DW_AT_frame_base: length */
  54. .byte 0x55 /* DW_AT_frame_base: DW_OP_reg5 */
  55. .Ltype_int:
  56. .uleb128 3 /* Abbrev: DW_TAG_base_type */
  57. .ascii "int\0" /* DW_AT_name */
  58. .byte 4 /* DW_AT_byte_size */
  59. .byte 5 /* DW_AT_encoding */
  60. .byte 0 /* End of children of CU */
  61. .Lcu1_end:
  62. /* Line table */
  63. .section .debug_line
  64. .Lline1_begin:
  65. .4byte .Lline1_end - .Lline1_start /* Initial length */
  66. .Lline1_start:
  67. .2byte 2 /* Version */
  68. .4byte .Lline1_lines - .Lline1_hdr /* header_length */
  69. .Lline1_hdr:
  70. .byte 1 /* Minimum insn length */
  71. .byte 1 /* default_is_stmt */
  72. .byte 1 /* line_base */
  73. .byte 1 /* line_range */
  74. .byte 0x10 /* opcode_base */
  75. /* Standard lengths */
  76. .byte 0
  77. .byte 1
  78. .byte 1
  79. .byte 1
  80. .byte 1
  81. .byte 0
  82. .byte 0
  83. .byte 0
  84. .byte 1
  85. .byte 0
  86. .byte 0
  87. .byte 1
  88. .byte 0
  89. .byte 0
  90. .byte 0
  91. /* Include directories */
  92. .byte 0
  93. /* File names */
  94. .ascii "file1.txt\0"
  95. .uleb128 0
  96. .uleb128 0
  97. .uleb128 0
  98. .byte 0
  99. .Lline1_lines:
  100. .byte 0 /* DW_LNE_set_address */
  101. .uleb128 5
  102. .byte 2
  103. .4byte .Lbegin_func_cu1
  104. .byte 3 /* DW_LNS_advance_line */
  105. .sleb128 3 /* ... to 4 */
  106. .byte 1 /* DW_LNS_copy */
  107. .byte 1 /* DW_LNS_copy (second time as an end-of-prologue marker) */
  108. .byte 0 /* DW_LNE_set_address */
  109. .uleb128 5
  110. .byte 2
  111. .4byte .Lend_func_cu1
  112. .byte 0 /* DW_LNE_end_of_sequence */
  113. .uleb128 1
  114. .byte 1
  115. .Lline1_end:
  116. /* Abbrev table */
  117. .section .debug_abbrev
  118. .Labbrev1_begin:
  119. .uleb128 1 /* Abbrev code */
  120. .uleb128 0x11 /* DW_TAG_compile_unit */
  121. .byte 1 /* has_children */
  122. .uleb128 0x10 /* DW_AT_stmt_list */
  123. .uleb128 0x6 /* DW_FORM_data4 */
  124. .uleb128 0x12 /* DW_AT_high_pc */
  125. .uleb128 0x1 /* DW_FORM_addr */
  126. .uleb128 0x11 /* DW_AT_low_pc */
  127. .uleb128 0x1 /* DW_FORM_addr */
  128. .uleb128 0x3 /* DW_AT_name */
  129. .uleb128 0x8 /* DW_FORM_string */
  130. .uleb128 0x25 /* DW_AT_producer */
  131. .uleb128 0x8 /* DW_FORM_string */
  132. .uleb128 0x13 /* DW_AT_language */
  133. .uleb128 0xb /* DW_FORM_data1 */
  134. .byte 0x0 /* Terminator */
  135. .byte 0x0 /* Terminator */
  136. .uleb128 2 /* Abbrev code */
  137. .uleb128 0x2e /* DW_TAG_subprogram */
  138. .byte 0 /* has_children */
  139. .uleb128 0x3f /* DW_AT_external */
  140. .uleb128 0xc /* DW_FORM_flag */
  141. .uleb128 0x3a /* DW_AT_decl_file */
  142. .uleb128 0xb /* DW_FORM_data1 */
  143. .uleb128 0x3b /* DW_AT_decl_line */
  144. .uleb128 0xb /* DW_FORM_data1 */
  145. .uleb128 0x3 /* DW_AT_name */
  146. .uleb128 0x8 /* DW_FORM_string */
  147. .uleb128 0x49 /* DW_AT_type */
  148. .uleb128 0x13 /* DW_FORM_ref4 */
  149. .uleb128 0x11 /* DW_AT_low_pc */
  150. .uleb128 0x1 /* DW_FORM_addr */
  151. .uleb128 0x12 /* DW_AT_high_pc */
  152. .uleb128 0x1 /* DW_FORM_addr */
  153. .uleb128 0x40 /* DW_AT_frame_base */
  154. .uleb128 0xa /* DW_FORM_block1 */
  155. .byte 0x0 /* Terminator */
  156. .byte 0x0 /* Terminator */
  157. .uleb128 3 /* Abbrev code */
  158. .uleb128 0x24 /* DW_TAG_base_type */
  159. .byte 0 /* has_children */
  160. .uleb128 0x3 /* DW_AT_name */
  161. .uleb128 0x8 /* DW_FORM_string */
  162. .uleb128 0xb /* DW_AT_byte_size */
  163. .uleb128 0xb /* DW_FORM_data1 */
  164. .uleb128 0x3e /* DW_AT_encoding */
  165. .uleb128 0xb /* DW_FORM_data1 */
  166. .byte 0x0 /* Terminator */
  167. .byte 0x0 /* Terminator */
  168. .byte 0x0 /* Terminator */
  169. .byte 0x0 /* Terminator */