* gdb-rhbz1773651-gdb-index-internal-error.patch - Patches added (backport from master): * gdb-support-rseq-auxvs.patch * gdb-symtab-fix-line-number-of-static-const-class-mem.patch * gdb-symtab-fix-too-many-symbols-in-gdbpy_lookup_stat.patch * gdb-symtab-handle-pu-in-iterate_over_some_symtabs.patch * gdb-symtab-work-around-pr-gas-29517.patch * gdb-testsuite-add-kfail-for-pr-ada-30908.patch * gdb-testsuite-add-xfail-for-gdb-29965-in-gdb.threads.patch * gdb-testsuite-fix-gdb.ada-mi_task_arg.exp-with-newer.patch * gdb-testsuite-fix-gdb.arch-i386-signal.exp-on-x86_64.patch * gdb-testsuite-fix-gdb.cp-m-static.exp-regression-on-.patch * gdb-testsuite-fix-gdb.dwarf2-nullptr_t.exp-with-cc-w.patch * gdb-testsuite-fix-regexps-in-gdb.base-step-over-sysc.patch * gdb-symtab-find-main-language-without-symtab-expansi.patch * gdb-testsuite-add-wait-for-index-cache-in-gdb.dwarf2.patch - Patches moved (from "Backport from gdb-patches" to "Backports from master, available in next release"): * gdb-cli-handle-pending-c-after-rl_callback_read_char.patch * gdb-testsuite-add-have_host_locale.patch - Maintenance script qa.sh: * Remove PR28463, PR28108, PR29247 and PR29160 kfails. * Remove PR30540, PR30908, PR29965 kfails. * Remove gdb.ada/mi_task_arg.exp kfail. - Limit "Suggests: %{python}-Pygments" to SLE-15 and later. OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=365
92 lines
2.8 KiB
Diff
92 lines
2.8 KiB
Diff
From ef58dedc82b17919360bf51f7efcbf6d74c11329 Mon Sep 17 00:00:00 2001
|
|
From: Tom de Vries <tdevries@suse.de>
|
|
Date: Sun, 1 Oct 2023 13:00:23 +0200
|
|
Subject: [PATCH 01/12] [gdb/testsuite] Fix gdb.arch/i386-signal.exp on x86_64
|
|
|
|
On x86_64-linux, with test-case gdb.arch/i386-signal.exp I run into:
|
|
...
|
|
builtin_spawn -ignore SIGHUP gcc -fno-stack-protector i386-signal.c \
|
|
-fdiagnostics-color=never -fno-pie -g -no-pie -lm -o i386-signal^M
|
|
/tmp/cc2xydTG.s: Assembler messages:^M
|
|
/tmp/cc2xydTG.s:50: Error: operand size mismatch for `push'^M
|
|
compiler exited with status 1
|
|
output is:
|
|
/tmp/cc2xydTG.s: Assembler messages:^M
|
|
/tmp/cc2xydTG.s:50: Error: operand size mismatch for `push'^M
|
|
|
|
gdb compile failed, /tmp/cc2xydTG.s: Assembler messages:
|
|
/tmp/cc2xydTG.s:50: Error: operand size mismatch for `push'
|
|
UNTESTED: gdb.arch/i386-signal.exp: failed to compile
|
|
...
|
|
|
|
This is with gas 2.41, it compiles without problems with gas 2.40. Some more
|
|
strict checking was added in commit 5cc007751cd ("x86: further adjust
|
|
extend-to-32bit-address conditions").
|
|
|
|
The offending bit is:
|
|
...
|
|
" push $sigframe\n"
|
|
...
|
|
which refers to a function:
|
|
...
|
|
" .globl sigframe\n"
|
|
"sigframe:\n"
|
|
...
|
|
|
|
The test-case passes with target board unix/-m32.
|
|
|
|
Make the test-case work by using pushq instead of push for the
|
|
is_amd64_regs_target case.
|
|
|
|
Tested on x86_64-linux, with target boards:
|
|
- unix/-m64 (is_amd64_regs_target == 1), and
|
|
- unix/-m32 (is_amd64_regs_target == 0),
|
|
|
|
PR testsuite/30928
|
|
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30928
|
|
---
|
|
gdb/testsuite/gdb.arch/i386-signal.c | 4 ++++
|
|
gdb/testsuite/gdb.arch/i386-signal.exp | 7 ++++++-
|
|
2 files changed, 10 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/gdb/testsuite/gdb.arch/i386-signal.c b/gdb/testsuite/gdb.arch/i386-signal.c
|
|
index 19bb1bbaaf8..4bf97e5f159 100644
|
|
--- a/gdb/testsuite/gdb.arch/i386-signal.c
|
|
+++ b/gdb/testsuite/gdb.arch/i386-signal.c
|
|
@@ -45,7 +45,11 @@ asm(".text\n"
|
|
" .align 8\n"
|
|
" .globl setup\n"
|
|
"setup:\n"
|
|
+#if IS_AMD64_REGS_TARGET
|
|
+ " pushq $sigframe\n"
|
|
+#else
|
|
" push $sigframe\n"
|
|
+#endif
|
|
" jmp func\n"
|
|
"\n"
|
|
" .cfi_startproc\n"
|
|
diff --git a/gdb/testsuite/gdb.arch/i386-signal.exp b/gdb/testsuite/gdb.arch/i386-signal.exp
|
|
index 9806970b245..0a413f73a5b 100644
|
|
--- a/gdb/testsuite/gdb.arch/i386-signal.exp
|
|
+++ b/gdb/testsuite/gdb.arch/i386-signal.exp
|
|
@@ -22,8 +22,13 @@ if {![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"]} {
|
|
|
|
standard_testfile
|
|
|
|
+set opts {}
|
|
+lappend opts debug
|
|
+lappend opts nopie
|
|
+lappend opts additional_flags=-DIS_AMD64_REGS_TARGET=[is_amd64_regs_target]
|
|
+
|
|
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
|
|
- executable { debug nopie }] != "" } {
|
|
+ executable $opts] != "" } {
|
|
untested "failed to compile"
|
|
return -1
|
|
}
|
|
|
|
base-commit: b671ae32ae890a373abcfe4b19a3b662fd5e86f2
|
|
--
|
|
2.35.3
|
|
|