testranges.s 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Test .debug_info can reference .debug_ranges entries without ordering the
  2. # offsets strictly as increasing.
  3. .text
  4. start:
  5. .byte 1
  6. sub:
  7. .byte 2
  8. end:
  9. .section .debug_ranges,"",%progbits
  10. range:
  11. range_sub:
  12. .4byte sub, end
  13. .4byte 0, 0 ;# range terminator
  14. range_cu:
  15. .4byte start, end
  16. .4byte 0, 0 ;# range terminator
  17. .section .debug_info,"",%progbits
  18. .4byte debugE - debugS ;# Length of Compilation Unit Info
  19. debugS:
  20. .short 0x2 ;# DWARF version number
  21. .4byte abbrev0 ;# Offset Into Abbrev. Section
  22. .byte 0x4 ;# Pointer Size (in bytes)
  23. .uleb128 0x1 ;# (DIE (0xb) DW_TAG_compile_unit)
  24. .4byte range_cu - range ;# DW_AT_ranges
  25. .uleb128 0x2 ;# (DIE (0x6d) DW_TAG_subprogram)
  26. .ascii "A\0" ;# DW_AT_name
  27. .4byte range_sub - range ;# DW_AT_ranges
  28. ;# minimal section alignment on alpha-* is 2, ensure no new invalid CU
  29. ;# will be started.
  30. .balign 2
  31. debugE:
  32. .section .debug_abbrev,"",%progbits
  33. abbrev0:
  34. .uleb128 0x1 ;# (abbrev code)
  35. .uleb128 0x11 ;# (TAG: DW_TAG_compile_unit)
  36. .byte 0x0 ;# DW_children_no
  37. .uleb128 0x55 ;# (DW_AT_ranges)
  38. .uleb128 0x6 ;# (DW_FORM_data4)
  39. .byte 0x0
  40. .byte 0x0
  41. .uleb128 0x2 ;# (abbrev code)
  42. .uleb128 0x2e ;# (TAG: DW_TAG_subprogram)
  43. .byte 0x0 ;# DW_children_no
  44. .uleb128 0x3 ;# (DW_AT_name)
  45. .uleb128 0x8 ;# (DW_FORM_string)
  46. .uleb128 0x55 ;# (DW_AT_ranges)
  47. .uleb128 0x6 ;# (DW_FORM_data4)
  48. .byte 0x0
  49. .byte 0x0
  50. .byte 0x0 ;# abbrevs terminator