dw2-compdir-oldgcc.S 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. /* This testcase is part of GDB, the GNU debugger.
  2. Copyright 2012-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. #define CONCAT1(a, b) CONCAT2(a, b)
  14. #define CONCAT2(a, b) a ## b
  15. #ifdef SYMBOL_PREFIX
  16. # define SYMBOL(str) CONCAT1(SYMBOL_PREFIX, str)
  17. #else
  18. # define SYMBOL(str) str
  19. #endif
  20. .text
  21. SYMBOL(main): .globl SYMBOL(main)
  22. gcc42: .globl gcc42
  23. .Lgcc42_procstart:
  24. .int 0
  25. .type gcc42, %function
  26. .size gcc42, . - gcc42
  27. .Lgcc42_procend:
  28. gcc43: .globl gcc43
  29. .Lgcc43_procstart:
  30. .int 0
  31. .type gcc43, %function
  32. .size gcc43, . - gcc43
  33. .Lgcc43_procend:
  34. /* Debug information */
  35. .section .debug_info
  36. .Lcu1_begin:
  37. /* CU header */
  38. .4byte .Lcu1_end - .Lcu1_start /* Length of Compilation Unit */
  39. .Lcu1_start:
  40. .2byte 2 /* DWARF Version */
  41. .4byte .Labbrev1_begin /* Offset into abbrev section */
  42. .byte 4 /* Pointer size */
  43. .uleb128 1 /* Abbrev: DW_TAG_compile_unit */
  44. .4byte .Lgcc42_begin /* DW_AT_stmt_list */
  45. .4byte .Lgcc42_procstart /* DW_AT_low_pc */
  46. .4byte .Lgcc42_procend /* DW_AT_high_pc */
  47. .ascii "/dir/d/dw2-compdir-oldgcc42.S\0" /* DW_AT_name */
  48. .ascii "GNU C 4.2.0\0" /* DW_AT_producer */
  49. .byte 1 /* DW_AT_language (C) */
  50. .uleb128 2 /* Abbrev: DW_TAG_subprogram */
  51. .byte 1 /* DW_AT_external */
  52. .byte 1 /* DW_AT_decl_file */
  53. .byte 1 /* DW_AT_decl_line */
  54. .ascii "gcc42\0" /* DW_AT_name */
  55. .4byte .Lgcc42_procstart /* DW_AT_low_pc */
  56. .4byte .Lgcc42_procend /* DW_AT_high_pc */
  57. .byte 0 /* End of children of CU */
  58. .Lcu1_end:
  59. .Lcu2_begin:
  60. /* CU header */
  61. .4byte .Lcu2_end - .Lcu2_start /* Length of Compilation Unit */
  62. .Lcu2_start:
  63. .2byte 2 /* DWARF Version */
  64. .4byte .Labbrev1_begin /* Offset into abbrev section */
  65. .byte 4 /* Pointer size */
  66. .uleb128 1 /* Abbrev: DW_TAG_compile_unit */
  67. .4byte .Lgcc43_begin /* DW_AT_stmt_list */
  68. .4byte .Lgcc43_procstart /* DW_AT_low_pc */
  69. .4byte .Lgcc43_procend /* DW_AT_high_pc */
  70. .ascii "/dir/d/dw2-compdir-oldgcc43.S\0" /* DW_AT_name */
  71. .ascii "GNU C 4.3.0\0" /* DW_AT_producer */
  72. .byte 1 /* DW_AT_language (C) */
  73. .uleb128 2 /* Abbrev: DW_TAG_subprogram */
  74. .byte 1 /* DW_AT_external */
  75. .byte 1 /* DW_AT_decl_file */
  76. .byte 1 /* DW_AT_decl_line */
  77. .ascii "gcc43\0" /* DW_AT_name */
  78. .4byte .Lgcc43_procstart /* DW_AT_low_pc */
  79. .4byte .Lgcc43_procend /* DW_AT_high_pc */
  80. .byte 0 /* End of children of CU */
  81. .Lcu2_end:
  82. /* Abbrev table */
  83. .section .debug_abbrev
  84. .Labbrev1_begin:
  85. .uleb128 1 /* Abbrev code */
  86. .uleb128 0x11 /* DW_TAG_compile_unit */
  87. .byte 1 /* has_children */
  88. .uleb128 0x10 /* DW_AT_stmt_list */
  89. .uleb128 0x6 /* DW_FORM_data4 */
  90. .uleb128 0x11 /* DW_AT_low_pc */
  91. .uleb128 0x1 /* DW_FORM_addr */
  92. .uleb128 0x12 /* DW_AT_high_pc */
  93. .uleb128 0x1 /* DW_FORM_addr */
  94. .uleb128 0x3 /* DW_AT_name */
  95. .uleb128 0x8 /* DW_FORM_string */
  96. .uleb128 0x25 /* DW_AT_producer */
  97. .uleb128 0x8 /* DW_FORM_string */
  98. .uleb128 0x13 /* DW_AT_language */
  99. .uleb128 0xb /* DW_FORM_data1 */
  100. .byte 0x0 /* Terminator */
  101. .byte 0x0 /* Terminator */
  102. .uleb128 2 /* Abbrev code */
  103. .uleb128 0x2e /* DW_TAG_subprogram */
  104. .byte 0 /* has_children */
  105. .uleb128 0x3f /* DW_AT_external */
  106. .uleb128 0xc /* DW_FORM_flag */
  107. .uleb128 0x3a /* DW_AT_decl_file */
  108. .uleb128 0xb /* DW_FORM_data1 */
  109. .uleb128 0x3b /* DW_AT_decl_line */
  110. .uleb128 0xb /* DW_FORM_data1 */
  111. .uleb128 0x3 /* DW_AT_name */
  112. .uleb128 0x8 /* DW_FORM_string */
  113. .uleb128 0x11 /* DW_AT_low_pc */
  114. .uleb128 0x1 /* DW_FORM_addr */
  115. .uleb128 0x12 /* DW_AT_high_pc */
  116. .uleb128 0x1 /* DW_FORM_addr */
  117. .byte 0x0 /* Terminator */
  118. .byte 0x0 /* Terminator */
  119. .byte 0x0 /* Terminator */
  120. .byte 0x0 /* Terminator */
  121. /* Line table */
  122. .section .debug_line
  123. .Lgcc42_begin:
  124. .4byte .Lgcc42_end - .Lgcc42_start /* Initial length */
  125. .Lgcc42_start:
  126. .2byte 2 /* Version */
  127. .4byte .Lgcc42_lines - .Lgcc42_hdr /* header_length */
  128. .Lgcc42_hdr:
  129. .byte 1 /* Minimum insn length */
  130. .byte 1 /* default_is_stmt */
  131. .byte 1 /* line_base */
  132. .byte 1 /* line_range */
  133. .byte 4 /* opcode_base */
  134. /* Standard lengths */
  135. .byte 0
  136. .byte 1
  137. .byte 1
  138. /* Include directories */
  139. .byte 0
  140. /* File names */
  141. .ascii "dw2-compdir-oldgcc42.S\0"
  142. .uleb128 0 /* directory */
  143. .uleb128 0
  144. .uleb128 0
  145. .byte 0
  146. .Lgcc42_lines:
  147. .byte 0 /* DW_LNE_set_address */
  148. .uleb128 5
  149. .byte 2
  150. .4byte gcc42
  151. .byte 3 /* DW_LNS_advance_line */
  152. .sleb128 41 /* ... to 42 */
  153. .byte 1 /* DW_LNS_copy */
  154. .byte 0 /* DW_LNE_set_address */
  155. .uleb128 5
  156. .byte 2
  157. .4byte .Lgcc42_procend
  158. .byte 0 /* DW_LNE_end_of_sequence */
  159. .uleb128 1
  160. .byte 1
  161. .Lgcc42_end:
  162. .Lgcc43_begin:
  163. .4byte .Lgcc43_end - .Lgcc43_start /* Initial length */
  164. .Lgcc43_start:
  165. .2byte 2 /* Version */
  166. .4byte .Lgcc43_lines - .Lgcc43_hdr /* header_length */
  167. .Lgcc43_hdr:
  168. .byte 1 /* Minimum insn length */
  169. .byte 1 /* default_is_stmt */
  170. .byte 1 /* line_base */
  171. .byte 1 /* line_range */
  172. .byte 4 /* opcode_base */
  173. /* Standard lengths */
  174. .byte 0
  175. .byte 1
  176. .byte 1
  177. /* Include directories */
  178. .byte 0
  179. /* File names */
  180. .ascii "dw2-compdir-oldgcc43.S\0"
  181. .uleb128 0 /* directory */
  182. .uleb128 0
  183. .uleb128 0
  184. .byte 0
  185. .Lgcc43_lines:
  186. .byte 0 /* DW_LNE_set_address */
  187. .uleb128 5
  188. .byte 2
  189. .4byte gcc43
  190. .byte 3 /* DW_LNS_advance_line */
  191. .sleb128 42 /* ... to 43 */
  192. .byte 1 /* DW_LNS_copy */
  193. .byte 0 /* DW_LNE_set_address */
  194. .uleb128 5
  195. .byte 2
  196. .4byte .Lgcc43_procend
  197. .byte 0 /* DW_LNE_end_of_sequence */
  198. .uleb128 1
  199. .byte 1
  200. .Lgcc43_end: