dw2-compressed.S 4.4 KB

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