[gdb/testsuite] Fix assembly comments in gdb.dwarf2/clang-debug-names.exp.tcl
authorTom de Vries <tdevries@suse.de>
Thu, 28 Oct 2021 12:18:15 +0000 (14:18 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 28 Oct 2021 12:18:15 +0000 (14:18 +0200)
On openSUSE Leap 15.2 aarch64 I ran into:
...
clang-debug-names-debug.S:72: \
  Error: junk at end of line, first unrecognized character is `#'
...
due to:
...
    71  .Ldebug_names_start:
    72    .short 5                      # Header: version
...

Fix this by using the /* ... */ comment style instead:
...
$ sed -i 's% #\([^"]*\)%/*\1 */%' clang-debug-names.exp.tcl
...

Tested on aarch64-linux and x86_64-linux.

gdb/testsuite/gdb.dwarf2/clang-debug-names.exp.tcl

index 6c2858aef0a3f2e078ad6c85e2ac51338bc886da..4700024c7882cea67e6db439d456b73ce6241b02 100644 (file)
@@ -31,50 +31,50 @@ set debug_names \
     [list \
          "  .4byte  .Ldebug_names_end - .Ldebug_names_start" \
          ".Ldebug_names_start:" \
-         "  .short 5                      # Header: version" \
-         "  .short 0                      # Header: padding" \
-         "  .long 1                       # Header: compilation unit count" \
-         "  .long 0                       # Header: local type unit count" \
-         "  .long 0                       # Header: foreign type unit count" \
-         "  .long 2                       # Header: bucket count" \
-         "  .long 2                       # Header: name count" \
+         "  .short 5                     /* Header: version */" \
+         "  .short 0                     /* Header: padding */" \
+         "  .long 1                      /* Header: compilation unit count */" \
+         "  .long 0                      /* Header: local type unit count */" \
+         "  .long 0                      /* Header: foreign type unit count */" \
+         "  .long 2                      /* Header: bucket count */" \
+         "  .long 2                      /* Header: name count */" \
          "  .long .Lnames_abbrev_end0-.Lnames_abbrev_start0 " \
-         "                                # Header: abbreviation table size" \
-         "  .long 8                       # Header: augmentation string size" \
-         "  .ascii \"LLVM0700\"    # Header: augmentation string" \
-         "  .long .Lcu1_begin             # Compilation unit 0" \
-         "  .long 1                       # Bucket 0" \
-         "  .long 0                       # Bucket 1" \
-         "  .long 193495088               # Hash in Bucket 0" \
-         "  .long 2090499946              # Hash in Bucket 0" \
-         "  .long $int_str_label          # String in Bucket 0: int" \
-         "  .long $main_str_label         # String in Bucket 0: main" \
-         "  .long .Lnames1-.Lnames_entries0 # Offset in Bucket 0" \
-         "  .long .Lnames0-.Lnames_entries0 # Offset in Bucket 0" \
+         "                               /* Header: abbreviation table size */" \
+         "  .long 8                      /* Header: augmentation string size */" \
+         "  .ascii \"LLVM0700\"   /* Header: augmentation string */" \
+         "  .long .Lcu1_begin            /* Compilation unit 0 */" \
+         "  .long 1                      /* Bucket 0 */" \
+         "  .long 0                      /* Bucket 1 */" \
+         "  .long 193495088              /* Hash in Bucket 0 */" \
+         "  .long 2090499946             /* Hash in Bucket 0 */" \
+         "  .long $int_str_label         /* String in Bucket 0: int */" \
+         "  .long $main_str_label        /* String in Bucket 0: main */" \
+         "  .long .Lnames1-.Lnames_entries0/* Offset in Bucket 0 */" \
+         "  .long .Lnames0-.Lnames_entries0/* Offset in Bucket 0 */" \
          ".Lnames_abbrev_start0:" \
-         "  .byte 46                      # Abbrev code" \
-         "  .byte 46                      # DW_TAG_subprogram" \
-         "  .byte 3                       # DW_IDX_die_offset" \
-         "  .byte 19                      # DW_FORM_ref4" \
-         "  .byte 0                       # End of abbrev" \
-         "  .byte 0                       # End of abbrev" \
-         "  .byte 36                      # Abbrev code" \
-         "  .byte 36                      # DW_TAG_base_type" \
-         "  .byte 3                       # DW_IDX_die_offset" \
-         "  .byte 19                      # DW_FORM_ref4" \
-         "  .byte 0                       # End of abbrev" \
-         "  .byte 0                       # End of abbrev" \
-         "  .byte 0                       # End of abbrev list" \
+         "  .byte 46                     /* Abbrev code */" \
+         "  .byte 46                     /* DW_TAG_subprogram */" \
+         "  .byte 3                      /* DW_IDX_die_offset */" \
+         "  .byte 19                     /* DW_FORM_ref4 */" \
+         "  .byte 0                      /* End of abbrev */" \
+         "  .byte 0                      /* End of abbrev */" \
+         "  .byte 36                     /* Abbrev code */" \
+         "  .byte 36                     /* DW_TAG_base_type */" \
+         "  .byte 3                      /* DW_IDX_die_offset */" \
+         "  .byte 19                     /* DW_FORM_ref4 */" \
+         "  .byte 0                      /* End of abbrev */" \
+         "  .byte 0                      /* End of abbrev */" \
+         "  .byte 0                      /* End of abbrev list */" \
          ".Lnames_abbrev_end0:" \
          ".Lnames_entries0:" \
          ".Lnames1:" \
-         "  .byte 36                      # Abbreviation code" \
-         "  .long $int_die_label - .Lcu1_begin # DW_IDX_die_offset" \
-         "  .long 0                       # End of list: int" \
+         "  .byte 36                     /* Abbreviation code */" \
+         "  .long $int_die_label - .Lcu1_begin/* DW_IDX_die_offset */" \
+         "  .long 0                      /* End of list: int */" \
          ".Lnames0:" \
-         "  .byte 46                      # Abbreviation code" \
-         "  .long $main_die_label - .Lcu1_begin # DW_IDX_die_offset" \
-         "  .long 0                       # End of list: main" \
+         "  .byte 46                     /* Abbreviation code */" \
+         "  .long $main_die_label - .Lcu1_begin/* DW_IDX_die_offset */" \
+         "  .long 0                      /* End of list: main */" \
          "  .p2align 2" \
          ".Ldebug_names_end:"]