dw2-compressed.S 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. /* This testcase is part of GDB, the GNU debugger.
  2. Copyright 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. /* This tests that gdb can read compressed sections. The contents
  14. are the same as dw2-basic.S, but the .debug_abbrev section has been
  15. comrpessed using zlib. */
  16. /* Dummy function to provide debug information for. */
  17. .text
  18. .globl _start
  19. .globl __start
  20. _start:
  21. __start:
  22. .int 0
  23. .Lbegin_text1:
  24. .globl func_cu1
  25. .type func_cu1, %function
  26. func_cu1:
  27. .Lbegin_func_cu1:
  28. .int 0
  29. .Lend_func_cu1:
  30. .size func_cu1, .-func_cu1
  31. .Lend_text1:
  32. /* Debug information */
  33. .section .debug_info
  34. .Lcu1_begin:
  35. /* CU header */
  36. .4byte .Lcu1_end - .Lcu1_start /* Length of Compilation Unit */
  37. .Lcu1_start:
  38. .2byte 2 /* DWARF Version */
  39. .4byte .Labbrev1_begin /* Offset into abbrev section */
  40. .byte 4 /* Pointer size */
  41. /* CU die */
  42. .uleb128 1 /* Abbrev: DW_TAG_compile_unit */
  43. .4byte .Lline1_begin /* DW_AT_stmt_list */
  44. .4byte .Lend_text1 /* DW_AT_high_pc */
  45. .4byte .Lbegin_text1 /* DW_AT_low_pc */
  46. .ascii "file1.txt\0" /* DW_AT_name */
  47. .ascii "GNU C 3.3.3\0" /* DW_AT_producer */
  48. .byte 1 /* DW_AT_language (C) */
  49. /* func_cu1 */
  50. .uleb128 2 /* Abbrev: DW_TAG_subprogram */
  51. .byte 1 /* DW_AT_external */
  52. .byte 1 /* DW_AT_decl_file */
  53. .byte 2 /* DW_AT_decl_line */
  54. .ascii "func_cu1\0" /* DW_AT_name */
  55. .4byte .Ltype_int-.Lcu1_begin /* DW_AT_type */
  56. .4byte .Lbegin_func_cu1 /* DW_AT_low_pc */
  57. .4byte .Lend_func_cu1 /* DW_AT_high_pc */
  58. .byte 1 /* DW_AT_frame_base: length */
  59. .byte 0x55 /* DW_AT_frame_base: DW_OP_reg5 */
  60. .Ltype_int:
  61. .uleb128 3 /* Abbrev: DW_TAG_base_type */
  62. .ascii "int\0" /* DW_AT_name */
  63. .byte 4 /* DW_AT_byte_size */
  64. .byte 5 /* DW_AT_encoding */
  65. .byte 0 /* End of children of CU */
  66. .Lcu1_end:
  67. /* Line table */
  68. .section .debug_line
  69. .Lline1_begin:
  70. .4byte .Lline1_end - .Lline1_start /* Initial length */
  71. .Lline1_start:
  72. .2byte 2 /* Version */
  73. .4byte .Lline1_lines - .Lline1_hdr /* header_length */
  74. .Lline1_hdr:
  75. .byte 1 /* Minimum insn length */
  76. .byte 1 /* default_is_stmt */
  77. .byte 1 /* line_base */
  78. .byte 1 /* line_range */
  79. .byte 0x10 /* opcode_base */
  80. /* Standard lengths */
  81. .byte 0
  82. .byte 1
  83. .byte 1
  84. .byte 1
  85. .byte 1
  86. .byte 0
  87. .byte 0
  88. .byte 0
  89. .byte 1
  90. .byte 0
  91. .byte 0
  92. .byte 1
  93. .byte 0
  94. .byte 0
  95. .byte 0
  96. /* Include directories */
  97. .byte 0
  98. /* File names */
  99. .ascii "file1.txt\0"
  100. .uleb128 0
  101. .uleb128 0
  102. .uleb128 0
  103. .byte 0
  104. .Lline1_lines:
  105. .byte 0 /* DW_LNE_set_address */
  106. .uleb128 5
  107. .byte 2
  108. .4byte .Lbegin_func_cu1
  109. .byte 3 /* DW_LNS_advance_line */
  110. .sleb128 3 /* ... to 4 */
  111. .byte 1 /* DW_LNS_copy */
  112. .byte 1 /* DW_LNS_copy (second time as an end-of-prologue marker) */
  113. .byte 0 /* DW_LNE_set_address */
  114. .uleb128 5
  115. .byte 2
  116. .4byte .Lend_func_cu1
  117. .byte 0 /* DW_LNE_end_of_sequence */
  118. .uleb128 1
  119. .byte 1
  120. .Lline1_end:
  121. /* Abbrev table -- compressed */
  122. .section .zdebug_abbrev
  123. .Labbrev1_begin:
  124. .ascii "ZLIB"
  125. .4byte 0
  126. .2byte 0
  127. .byte 0
  128. .byte 51
  129. .byte 0x78
  130. .byte 0x5e
  131. .byte 0x63
  132. .byte 0x14
  133. .byte 0x64
  134. .byte 0x14
  135. .byte 0x60
  136. .byte 0x13
  137. .byte 0x62
  138. .byte 0x14
  139. .byte 0x64
  140. .byte 0x64
  141. .byte 0xe6
  142. .byte 0x50
  143. .byte 0xe5
  144. .byte 0x10
  145. .byte 0xe6
  146. .byte 0x66
  147. .byte 0x60
  148. .byte 0x60
  149. .byte 0xd2
  150. .byte 0x63
  151. .byte 0xb0
  152. .byte 0xe7
  153. .byte 0xb1
  154. .byte 0xe2
  155. .byte 0xb6
  156. .byte 0xe6
  157. .byte 0x66
  158. .byte 0xe6
  159. .byte 0xf0
  160. .byte 0x14
  161. .byte 0x16
  162. .byte 0x64
  163. .byte 0x14
  164. .byte 0x62
  165. .byte 0x74
  166. .byte 0xe0
  167. .byte 0x02
  168. .byte 0x00
  169. .byte 0x25
  170. .byte 0x78
  171. .byte 0x02
  172. .byte 0x81
  173. .byte 0x78
  174. .byte 0x9c
  175. .byte 0x63
  176. .byte 0x60
  177. .byte 0x60
  178. .byte 0x56
  179. .byte 0x61
  180. .byte 0x60
  181. .byte 0xe6
  182. .byte 0xe0
  183. .byte 0xe6
  184. .byte 0xb6
  185. .byte 0xe3
  186. .byte 0x66
  187. .byte 0x00
  188. .byte 0x02
  189. .byte 0x00
  190. .byte 0x04
  191. .byte 0x9c
  192. .byte 0x00
  193. .byte 0x92