compress1.s 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. /* This testcase is derived from a similar test in GDB.
  2. Copyright (C) 2008-2022 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. .Lbegin_text1:
  16. .globl func_cu2
  17. .type func_cu2, %function
  18. func_cu2:
  19. .Lbegin_func_cu2:
  20. .int 0
  21. .Lend_func_cu2:
  22. .size func_cu2, .-func_cu2
  23. .Lend_text1:
  24. /* Debug information */
  25. .section .debug_info
  26. .Lcu1_begin:
  27. /* CU header */
  28. .4byte .Lcu1_end - .Lcu1_start /* Length of Compilation Unit */
  29. .Lcu1_start:
  30. .2byte 2 /* DWARF Version */
  31. .4byte .Labbrev1_begin /* Offset into abbrev section */
  32. .byte 4 /* Pointer size */
  33. /* CU die */
  34. .uleb128 1 /* Abbrev: DW_TAG_compile_unit */
  35. .4byte .Lline1_begin /* DW_AT_stmt_list */
  36. .4byte .Lend_text1 /* DW_AT_high_pc */
  37. .4byte .Lbegin_text1 /* DW_AT_low_pc */
  38. .ascii "file1.txt\0" /* DW_AT_name */
  39. .ascii "GNU C 3.3.3\0" /* DW_AT_producer */
  40. .byte 1 /* DW_AT_language (C) */
  41. /* func_cu2 */
  42. .uleb128 2 /* Abbrev: DW_TAG_subprogram */
  43. .byte 1 /* DW_AT_external */
  44. .byte 1 /* DW_AT_decl_file */
  45. .byte 2 /* DW_AT_decl_line */
  46. .ascii "func_cu2\0" /* DW_AT_name */
  47. .4byte .Ltype_int-.Lcu1_begin /* DW_AT_type */
  48. .4byte .Lbegin_func_cu2 /* DW_AT_low_pc */
  49. .4byte .Lend_func_cu2 /* DW_AT_high_pc */
  50. .byte 1 /* DW_AT_frame_base: length */
  51. .byte 0x55 /* DW_AT_frame_base: DW_OP_reg5 */
  52. .Ltype_int:
  53. .uleb128 3 /* Abbrev: DW_TAG_base_type */
  54. .ascii "int\0" /* DW_AT_name */
  55. .byte 4 /* DW_AT_byte_size */
  56. .byte 5 /* DW_AT_encoding */
  57. .byte 0 /* End of children of CU */
  58. .Lcu1_end:
  59. /* Line table */
  60. .section .debug_line
  61. .Lline1_begin:
  62. .4byte .Lline1_end - .Lline1_start /* Initial length */
  63. .Lline1_start:
  64. .2byte 2 /* Version */
  65. .4byte .Lline1_lines - .Lline1_hdr /* header_length */
  66. .Lline1_hdr:
  67. .byte 1 /* Minimum insn length */
  68. .byte 1 /* default_is_stmt */
  69. .byte 1 /* line_base */
  70. .byte 1 /* line_range */
  71. .byte 0x10 /* opcode_base */
  72. /* Standard lengths */
  73. .byte 0
  74. .byte 1
  75. .byte 1
  76. .byte 1
  77. .byte 1
  78. .byte 0
  79. .byte 0
  80. .byte 0
  81. .byte 1
  82. .byte 0
  83. .byte 0
  84. .byte 1
  85. .byte 0
  86. .byte 0
  87. .byte 0
  88. /* Include directories */
  89. .byte 0
  90. /* File names */
  91. .ascii "file1.txt\0"
  92. .uleb128 0
  93. .uleb128 0
  94. .uleb128 0
  95. .byte 0
  96. .Lline1_lines:
  97. .byte 0 /* DW_LNE_set_address */
  98. .uleb128 5
  99. .byte 2
  100. .4byte .Lbegin_func_cu2
  101. .byte 3 /* DW_LNS_advance_line */
  102. .sleb128 3 /* ... to 4 */
  103. .byte 1 /* DW_LNS_copy */
  104. .byte 1 /* DW_LNS_copy (second time as an end-of-prologue marker) */
  105. .byte 0 /* DW_LNE_set_address */
  106. .uleb128 5
  107. .byte 2
  108. .4byte .Lend_func_cu2
  109. .byte 0 /* DW_LNE_end_of_sequence */
  110. .uleb128 1
  111. .byte 1
  112. .Lline1_end:
  113. /* Abbrev table */
  114. .section .debug_abbrev
  115. .Labbrev1_begin:
  116. .uleb128 1 /* Abbrev code */
  117. .uleb128 0x11 /* DW_TAG_compile_unit */
  118. .byte 1 /* has_children */
  119. .uleb128 0x10 /* DW_AT_stmt_list */
  120. .uleb128 0x6 /* DW_FORM_data4 */
  121. .uleb128 0x12 /* DW_AT_high_pc */
  122. .uleb128 0x1 /* DW_FORM_addr */
  123. .uleb128 0x11 /* DW_AT_low_pc */
  124. .uleb128 0x1 /* DW_FORM_addr */
  125. .uleb128 0x3 /* DW_AT_name */
  126. .uleb128 0x8 /* DW_FORM_string */
  127. .uleb128 0x25 /* DW_AT_producer */
  128. .uleb128 0x8 /* DW_FORM_string */
  129. .uleb128 0x13 /* DW_AT_language */
  130. .uleb128 0xb /* DW_FORM_data1 */
  131. .byte 0x0 /* Terminator */
  132. .byte 0x0 /* Terminator */
  133. .uleb128 2 /* Abbrev code */
  134. .uleb128 0x2e /* DW_TAG_subprogram */
  135. .byte 0 /* has_children */
  136. .uleb128 0x3f /* DW_AT_external */
  137. .uleb128 0xc /* DW_FORM_flag */
  138. .uleb128 0x3a /* DW_AT_decl_file */
  139. .uleb128 0xb /* DW_FORM_data1 */
  140. .uleb128 0x3b /* DW_AT_decl_line */
  141. .uleb128 0xb /* DW_FORM_data1 */
  142. .uleb128 0x3 /* DW_AT_name */
  143. .uleb128 0x8 /* DW_FORM_string */
  144. .uleb128 0x49 /* DW_AT_type */
  145. .uleb128 0x13 /* DW_FORM_ref4 */
  146. .uleb128 0x11 /* DW_AT_low_pc */
  147. .uleb128 0x1 /* DW_FORM_addr */
  148. .uleb128 0x12 /* DW_AT_high_pc */
  149. .uleb128 0x1 /* DW_FORM_addr */
  150. .uleb128 0x40 /* DW_AT_frame_base */
  151. .uleb128 0xa /* DW_FORM_block1 */
  152. .byte 0x0 /* Terminator */
  153. .byte 0x0 /* Terminator */
  154. .uleb128 3 /* Abbrev code */
  155. .uleb128 0x24 /* DW_TAG_base_type */
  156. .byte 0 /* has_children */
  157. .uleb128 0x3 /* DW_AT_name */
  158. .uleb128 0x8 /* DW_FORM_string */
  159. .uleb128 0xb /* DW_AT_byte_size */
  160. .uleb128 0xb /* DW_FORM_data1 */
  161. .uleb128 0x3e /* DW_AT_encoding */
  162. .uleb128 0xb /* DW_FORM_data1 */
  163. .byte 0x0 /* Terminator */
  164. .byte 0x0 /* Terminator */
  165. .byte 0x0 /* Terminator */
  166. .byte 0x0 /* Terminator */
  167. .section .debug_pubnames,"",%progbits
  168. .4byte 0x19
  169. .2byte 0x2
  170. .4byte .Lcu1_begin
  171. .4byte 0x43
  172. .4byte 0x25
  173. .string "func_cu2"
  174. .4byte 0x0
  175. .section .debug_aranges,"",%progbits
  176. .4byte 0x1c
  177. .2byte 0x2
  178. .4byte .Lcu1_begin
  179. .byte 0x4
  180. .byte 0x0
  181. .2byte 0x0
  182. .2byte 0x0
  183. .4byte .Lbegin_text1
  184. .4byte .Lbegin_text1-.Lend_text1
  185. .4byte 0x0
  186. .4byte 0x0