* [pushed 1/2] [gdb/testsuite] Fix assembly comments in gdb.dwarf2/clang-debug-names.exp.tcl
@ 2021-10-28 12:17 Tom de Vries
2021-10-28 12:17 ` [pushed 2/2] [gdb/testsuite] Require python in gdb.server/server-kill-python.exp Tom de Vries
0 siblings, 1 reply; 2+ messages in thread
From: Tom de Vries @ 2021-10-28 12:17 UTC (permalink / raw)
To: gdb-patches
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.dwarf2/clang-debug-names.exp.tcl | 76 +++++++++----------
1 file changed, 38 insertions(+), 38 deletions(-)
diff --git a/gdb/testsuite/gdb.dwarf2/clang-debug-names.exp.tcl b/gdb/testsuite/gdb.dwarf2/clang-debug-names.exp.tcl
index 6c2858aef0a..4700024c788 100644
--- a/gdb/testsuite/gdb.dwarf2/clang-debug-names.exp.tcl
+++ b/gdb/testsuite/gdb.dwarf2/clang-debug-names.exp.tcl
@@ -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:"]
base-commit: 5b151607e1faf27238e9dce6d3124741779dcc3a
--
2.26.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pushed 2/2] [gdb/testsuite] Require python in gdb.server/server-kill-python.exp
2021-10-28 12:17 [pushed 1/2] [gdb/testsuite] Fix assembly comments in gdb.dwarf2/clang-debug-names.exp.tcl Tom de Vries
@ 2021-10-28 12:17 ` Tom de Vries
0 siblings, 0 replies; 2+ messages in thread
From: Tom de Vries @ 2021-10-28 12:17 UTC (permalink / raw)
To: gdb-patches
I came across this when running test-case gdb.server/server-kill-python.exp
with a gdb configured without python:
...
builtin_spawn gdb -nw -nx -data-directory data-directory -iex set height 0 \
-iex set width 0 -quiet -iex set height 0 -iex set width 0 \
-ex source outputs/gdb.server/server-kill-python/file1.py^M
FAIL: gdb.server/server-kill-python.exp: ensure inferior is running
Executing on target: kill -9 28535 (timeout = 300)
builtin_spawn -ignore SIGHUP kill -9 28535^M
file1.py:1: Error in sourced command file:^M
Undefined command: "import". Try "help".^M
...
Fix this by testing for python support in the test-case.
Tested on aarch64-linux (with python support disabled) and x86_64-linux (with
python support enabled).
---
gdb/testsuite/gdb.server/server-kill-python.exp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/gdb/testsuite/gdb.server/server-kill-python.exp b/gdb/testsuite/gdb.server/server-kill-python.exp
index 0a41df0fd3b..3e58c514e4c 100644
--- a/gdb/testsuite/gdb.server/server-kill-python.exp
+++ b/gdb/testsuite/gdb.server/server-kill-python.exp
@@ -27,6 +27,14 @@ if {[skip_gdbserver_tests]} {
return 0
}
+# Gdb needs to be running for skip_python_tests, but exit once we're done,
+# we'll start a custom gdb after this.
+clean_restart
+if { [skip_python_tests] } {
+ return 0
+}
+gdb_exit
+
if {[build_executable "failed to prepare" ${testfile} \
${srcfile}] == -1} {
return -1
--
2.26.2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-28 12:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-28 12:17 [pushed 1/2] [gdb/testsuite] Fix assembly comments in gdb.dwarf2/clang-debug-names.exp.tcl Tom de Vries
2021-10-28 12:17 ` [pushed 2/2] [gdb/testsuite] Require python in gdb.server/server-kill-python.exp Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).