Accepting request 1093460 from home:tomdevries:branches:devel:gcc:gdb-13-1-upgrade
gdb 13.2 update OBS-URL: https://build.opensuse.org/request/show/1093460 OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=358
This commit is contained in:
parent
7477f9e542
commit
1212e0f90c
50
aarch64-avoid-initializers-for-vlas.patch
Normal file
50
aarch64-avoid-initializers-for-vlas.patch
Normal file
@ -0,0 +1,50 @@
|
||||
From 0f363ed540fef466f45eab4570c23853e1f14898 Mon Sep 17 00:00:00 2001
|
||||
From: Roland McGrath <mcgrathr@google.com>
|
||||
Date: Thu, 9 Feb 2023 10:47:17 -0800
|
||||
Subject: [PATCH] [aarch64] Avoid initializers for VLAs
|
||||
|
||||
Clang doesn't accept initializer syntax for variable-length
|
||||
arrays in C. Just use memset instead.
|
||||
---
|
||||
gdb/aarch64-linux-nat.c | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c
|
||||
index e4158236db2..ecb2eeb9540 100644
|
||||
--- a/gdb/aarch64-linux-nat.c
|
||||
+++ b/gdb/aarch64-linux-nat.c
|
||||
@@ -56,6 +56,8 @@
|
||||
|
||||
#include "nat/aarch64-mte-linux-ptrace.h"
|
||||
|
||||
+#include <string.h>
|
||||
+
|
||||
#ifndef TRAP_HWBKPT
|
||||
#define TRAP_HWBKPT 0x0004
|
||||
#endif
|
||||
@@ -445,7 +447,9 @@ fetch_tlsregs_from_thread (struct regcache *regcache)
|
||||
gdb_assert (regno != -1);
|
||||
gdb_assert (tdep->tls_register_count > 0);
|
||||
|
||||
- uint64_t tpidrs[tdep->tls_register_count] = { 0 };
|
||||
+ uint64_t tpidrs[tdep->tls_register_count];
|
||||
+ memset(tpidrs, 0, sizeof(tpidrs));
|
||||
+
|
||||
struct iovec iovec;
|
||||
iovec.iov_base = tpidrs;
|
||||
iovec.iov_len = sizeof (tpidrs);
|
||||
@@ -471,7 +475,8 @@ store_tlsregs_to_thread (struct regcache *regcache)
|
||||
gdb_assert (regno != -1);
|
||||
gdb_assert (tdep->tls_register_count > 0);
|
||||
|
||||
- uint64_t tpidrs[tdep->tls_register_count] = { 0 };
|
||||
+ uint64_t tpidrs[tdep->tls_register_count];
|
||||
+ memset(tpidrs, 0, sizeof(tpidrs));
|
||||
|
||||
for (int i = 0; i < tdep->tls_register_count; i++)
|
||||
{
|
||||
|
||||
base-commit: a39101060cdf2ee239833106fb3bdf9585f858aa
|
||||
--
|
||||
2.35.3
|
||||
|
@ -1,29 +0,0 @@
|
||||
From f41928feb3e44fb27776afa062a1cd06263b7d1d Mon Sep 17 00:00:00 2001
|
||||
From: Cary Coutant <ccoutant@gmail.com>
|
||||
Date: Tue, 2 Aug 2022 16:19:43 -0700
|
||||
Subject: [PATCH 1/2] Add ELFCOMPRESS_ZSTD.
|
||||
|
||||
include/elf/
|
||||
* common.h: Add ELFCOMPRESS_ZSTD.
|
||||
---
|
||||
include/elf/common.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/include/elf/common.h b/include/elf/common.h
|
||||
index 70d63e3299c..c409da2bd16 100644
|
||||
--- a/include/elf/common.h
|
||||
+++ b/include/elf/common.h
|
||||
@@ -588,6 +588,8 @@
|
||||
|
||||
/* Compression types. */
|
||||
#define ELFCOMPRESS_ZLIB 1 /* Compressed with zlib. */
|
||||
+#define ELFCOMPRESS_ZSTD 2 /* Compressed with zstd */
|
||||
+ /* (see http://www.zstandard.org). */
|
||||
#define ELFCOMPRESS_LOOS 0x60000000 /* OS-specific semantics, lo */
|
||||
#define ELFCOMPRESS_HIOS 0x6FFFFFFF /* OS-specific semantics, hi */
|
||||
#define ELFCOMPRESS_LOPROC 0x70000000 /* Processor-specific semantics, lo */
|
||||
|
||||
base-commit: 835a10f8541c7c4150098c82e097c4f606475cfa
|
||||
--
|
||||
2.35.3
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,270 +0,0 @@
|
||||
Fix comparison of unsigned long int to int in record_linux_system_call.
|
||||
|
||||
The if statement in case gdb_sys_ioctl in function
|
||||
record_linux_system_call in file gdb/linux-record.c is as follows:
|
||||
|
||||
if (tmpulongest == tdep->ioctl_FIOCLEX
|
||||
|| tmpulongest == tdep->ioctl_FIONCLEX
|
||||
....
|
||||
|| tmpulongest == tdep->ioctl_TCSETSW
|
||||
...
|
||||
}
|
||||
|
||||
The PowerPC ioctl value for ioctl_TCSETW is 0x802c7415. The variable
|
||||
ioctl_TCSETW is defined in gdb/linux-record.h as an int. The TCSETW value
|
||||
has the MSB set to one so it is a negative integer. The comparison of the
|
||||
unsigned long value tmpulongest to a negative integer value for
|
||||
ioctl_TCSETSW fails.
|
||||
|
||||
This patch changes the declarations for the ioctl_* values in struct
|
||||
linux_record_tdep to unsigned long to fix the comparisons between
|
||||
tmpulongest and the tdep->ioctl_* values.
|
||||
|
||||
An additional test gdb.reverse/test_ioctl_TCSETSW.exp is added to verify
|
||||
the gdb record_linux_system_call() if statement for the ioctl TCSETSW
|
||||
succeeds.
|
||||
|
||||
This patch has been tested on Power 10 and Intel with no test failures.
|
||||
|
||||
---
|
||||
gdb/linux-record.h | 130 +++++++++++------------
|
||||
gdb/testsuite/gdb.reverse/test_ioctl_TCSETSW.c | 38 +++++++
|
||||
gdb/testsuite/gdb.reverse/test_ioctl_TCSETSW.exp | 45 ++++++++
|
||||
3 files changed, 148 insertions(+), 65 deletions(-)
|
||||
|
||||
diff --git a/gdb/linux-record.h b/gdb/linux-record.h
|
||||
index 219c67f888d..39d7d4b54d0 100644
|
||||
--- a/gdb/linux-record.h
|
||||
+++ b/gdb/linux-record.h
|
||||
@@ -92,71 +92,71 @@ struct linux_record_tdep
|
||||
int size_time_t;
|
||||
|
||||
/* The values of the second argument of system call "sys_ioctl". */
|
||||
- int ioctl_TCGETS;
|
||||
- int ioctl_TCSETS;
|
||||
- int ioctl_TCSETSW;
|
||||
- int ioctl_TCSETSF;
|
||||
- int ioctl_TCGETA;
|
||||
- int ioctl_TCSETA;
|
||||
- int ioctl_TCSETAW;
|
||||
- int ioctl_TCSETAF;
|
||||
- int ioctl_TCSBRK;
|
||||
- int ioctl_TCXONC;
|
||||
- int ioctl_TCFLSH;
|
||||
- int ioctl_TIOCEXCL;
|
||||
- int ioctl_TIOCNXCL;
|
||||
- int ioctl_TIOCSCTTY;
|
||||
- int ioctl_TIOCGPGRP;
|
||||
- int ioctl_TIOCSPGRP;
|
||||
- int ioctl_TIOCOUTQ;
|
||||
- int ioctl_TIOCSTI;
|
||||
- int ioctl_TIOCGWINSZ;
|
||||
- int ioctl_TIOCSWINSZ;
|
||||
- int ioctl_TIOCMGET;
|
||||
- int ioctl_TIOCMBIS;
|
||||
- int ioctl_TIOCMBIC;
|
||||
- int ioctl_TIOCMSET;
|
||||
- int ioctl_TIOCGSOFTCAR;
|
||||
- int ioctl_TIOCSSOFTCAR;
|
||||
- int ioctl_FIONREAD;
|
||||
- int ioctl_TIOCINQ;
|
||||
- int ioctl_TIOCLINUX;
|
||||
- int ioctl_TIOCCONS;
|
||||
- int ioctl_TIOCGSERIAL;
|
||||
- int ioctl_TIOCSSERIAL;
|
||||
- int ioctl_TIOCPKT;
|
||||
- int ioctl_FIONBIO;
|
||||
- int ioctl_TIOCNOTTY;
|
||||
- int ioctl_TIOCSETD;
|
||||
- int ioctl_TIOCGETD;
|
||||
- int ioctl_TCSBRKP;
|
||||
- int ioctl_TIOCTTYGSTRUCT;
|
||||
- int ioctl_TIOCSBRK;
|
||||
- int ioctl_TIOCCBRK;
|
||||
- int ioctl_TIOCGSID;
|
||||
- int ioctl_TCGETS2;
|
||||
- int ioctl_TCSETS2;
|
||||
- int ioctl_TCSETSW2;
|
||||
- int ioctl_TCSETSF2;
|
||||
- int ioctl_TIOCGPTN;
|
||||
- int ioctl_TIOCSPTLCK;
|
||||
- int ioctl_FIONCLEX;
|
||||
- int ioctl_FIOCLEX;
|
||||
- int ioctl_FIOASYNC;
|
||||
- int ioctl_TIOCSERCONFIG;
|
||||
- int ioctl_TIOCSERGWILD;
|
||||
- int ioctl_TIOCSERSWILD;
|
||||
- int ioctl_TIOCGLCKTRMIOS;
|
||||
- int ioctl_TIOCSLCKTRMIOS;
|
||||
- int ioctl_TIOCSERGSTRUCT;
|
||||
- int ioctl_TIOCSERGETLSR;
|
||||
- int ioctl_TIOCSERGETMULTI;
|
||||
- int ioctl_TIOCSERSETMULTI;
|
||||
- int ioctl_TIOCMIWAIT;
|
||||
- int ioctl_TIOCGICOUNT;
|
||||
- int ioctl_TIOCGHAYESESP;
|
||||
- int ioctl_TIOCSHAYESESP;
|
||||
- int ioctl_FIOQSIZE;
|
||||
+ ULONGEST ioctl_TCGETS;
|
||||
+ ULONGEST ioctl_TCSETS;
|
||||
+ ULONGEST ioctl_TCSETSW;
|
||||
+ ULONGEST ioctl_TCSETSF;
|
||||
+ ULONGEST ioctl_TCGETA;
|
||||
+ ULONGEST ioctl_TCSETA;
|
||||
+ ULONGEST ioctl_TCSETAW;
|
||||
+ ULONGEST ioctl_TCSETAF;
|
||||
+ ULONGEST ioctl_TCSBRK;
|
||||
+ ULONGEST ioctl_TCXONC;
|
||||
+ ULONGEST ioctl_TCFLSH;
|
||||
+ ULONGEST ioctl_TIOCEXCL;
|
||||
+ ULONGEST ioctl_TIOCNXCL;
|
||||
+ ULONGEST ioctl_TIOCSCTTY;
|
||||
+ ULONGEST ioctl_TIOCGPGRP;
|
||||
+ ULONGEST ioctl_TIOCSPGRP;
|
||||
+ ULONGEST ioctl_TIOCOUTQ;
|
||||
+ ULONGEST ioctl_TIOCSTI;
|
||||
+ ULONGEST ioctl_TIOCGWINSZ;
|
||||
+ ULONGEST ioctl_TIOCSWINSZ;
|
||||
+ ULONGEST ioctl_TIOCMGET;
|
||||
+ ULONGEST ioctl_TIOCMBIS;
|
||||
+ ULONGEST ioctl_TIOCMBIC;
|
||||
+ ULONGEST ioctl_TIOCMSET;
|
||||
+ ULONGEST ioctl_TIOCGSOFTCAR;
|
||||
+ ULONGEST ioctl_TIOCSSOFTCAR;
|
||||
+ ULONGEST ioctl_FIONREAD;
|
||||
+ ULONGEST ioctl_TIOCINQ;
|
||||
+ ULONGEST ioctl_TIOCLINUX;
|
||||
+ ULONGEST ioctl_TIOCCONS;
|
||||
+ ULONGEST ioctl_TIOCGSERIAL;
|
||||
+ ULONGEST ioctl_TIOCSSERIAL;
|
||||
+ ULONGEST ioctl_TIOCPKT;
|
||||
+ ULONGEST ioctl_FIONBIO;
|
||||
+ ULONGEST ioctl_TIOCNOTTY;
|
||||
+ ULONGEST ioctl_TIOCSETD;
|
||||
+ ULONGEST ioctl_TIOCGETD;
|
||||
+ ULONGEST ioctl_TCSBRKP;
|
||||
+ ULONGEST ioctl_TIOCTTYGSTRUCT;
|
||||
+ ULONGEST ioctl_TIOCSBRK;
|
||||
+ ULONGEST ioctl_TIOCCBRK;
|
||||
+ ULONGEST ioctl_TIOCGSID;
|
||||
+ ULONGEST ioctl_TCGETS2;
|
||||
+ ULONGEST ioctl_TCSETS2;
|
||||
+ ULONGEST ioctl_TCSETSW2;
|
||||
+ ULONGEST ioctl_TCSETSF2;
|
||||
+ ULONGEST ioctl_TIOCGPTN;
|
||||
+ ULONGEST ioctl_TIOCSPTLCK;
|
||||
+ ULONGEST ioctl_FIONCLEX;
|
||||
+ ULONGEST ioctl_FIOCLEX;
|
||||
+ ULONGEST ioctl_FIOASYNC;
|
||||
+ ULONGEST ioctl_TIOCSERCONFIG;
|
||||
+ ULONGEST ioctl_TIOCSERGWILD;
|
||||
+ ULONGEST ioctl_TIOCSERSWILD;
|
||||
+ ULONGEST ioctl_TIOCGLCKTRMIOS;
|
||||
+ ULONGEST ioctl_TIOCSLCKTRMIOS;
|
||||
+ ULONGEST ioctl_TIOCSERGSTRUCT;
|
||||
+ ULONGEST ioctl_TIOCSERGETLSR;
|
||||
+ ULONGEST ioctl_TIOCSERGETMULTI;
|
||||
+ ULONGEST ioctl_TIOCSERSETMULTI;
|
||||
+ ULONGEST ioctl_TIOCMIWAIT;
|
||||
+ ULONGEST ioctl_TIOCGICOUNT;
|
||||
+ ULONGEST ioctl_TIOCGHAYESESP;
|
||||
+ ULONGEST ioctl_TIOCSHAYESESP;
|
||||
+ ULONGEST ioctl_FIOQSIZE;
|
||||
|
||||
/* The values of the second argument of system call "sys_fcntl"
|
||||
and "sys_fcntl64". */
|
||||
diff --git a/gdb/testsuite/gdb.reverse/test_ioctl_TCSETSW.c b/gdb/testsuite/gdb.reverse/test_ioctl_TCSETSW.c
|
||||
new file mode 100644
|
||||
index 00000000000..6365f968b30
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.reverse/test_ioctl_TCSETSW.c
|
||||
@@ -0,0 +1,38 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2012-2022 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#include <sys/ioctl.h>
|
||||
+#include <termios.h>
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+/* The purpose of this test is to verify gdb record_linux_system_call()
|
||||
+ recognizes the call for ioctl TCSETSW. */
|
||||
+
|
||||
+int
|
||||
+main(void)
|
||||
+{
|
||||
+
|
||||
+ struct termios term;
|
||||
+ int result;
|
||||
+ int fd = 0;
|
||||
+
|
||||
+ /* The test just needs to generate an ioctl call for TCSETSW to see if gdb
|
||||
+ record detected it or not. Success or failure of the ioctl call is
|
||||
+ irrelevant. */
|
||||
+ result = tcsetattr(fd, TCSADRAIN, &term); /* TCSETSW call */
|
||||
+ result = 0; /* TCSETSW called */
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.reverse/test_ioctl_TCSETSW.exp b/gdb/testsuite/gdb.reverse/test_ioctl_TCSETSW.exp
|
||||
new file mode 100644
|
||||
index 00000000000..86a62ebe5e5
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.reverse/test_ioctl_TCSETSW.exp
|
||||
@@ -0,0 +1,45 @@
|
||||
+# Copyright 2008-2022 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+#
|
||||
+# Test ioctl TCSETSW record for PowerPC.
|
||||
+#
|
||||
+
|
||||
+standard_testfile .c
|
||||
+
|
||||
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if ![runto_main] then {
|
||||
+ untested "could not run to main"
|
||||
+ continue
|
||||
+}
|
||||
+
|
||||
+# Recording of ioctls calls requires record full
|
||||
+gdb_test_no_output "record full"
|
||||
+
|
||||
+set stop [gdb_get_line_number "TCSETSW call"]
|
||||
+gdb_test "break $stop" ".*Breakpoint .*" "stop at TCSETSW"
|
||||
+gdb_test "continue" ".*Breakpoint .*" "at TCSETSW call"
|
||||
+
|
||||
+set test "handle TCSETSW"
|
||||
+gdb_test_multiple "step" $test {
|
||||
+ -re "Process record and replay target doesn't support ioctl request 0x.*$gdb_prompt $" {
|
||||
+ fail $test
|
||||
+ }
|
||||
+ -re ".*result = 0.*$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
@ -1,161 +0,0 @@
|
||||
Fix core-file -> detach -> crash (corefiles/29275)
|
||||
|
||||
After loading a core file, you're supposed to be able to use "detach"
|
||||
to unload the core file. That unfortunately regressed starting with
|
||||
GDB 11, with these commits:
|
||||
|
||||
1192f124a308 - gdb: generalize commit_resume, avoid commit-resuming when threads have pending statuses
|
||||
408f66864a1a - detach in all-stop with threads running
|
||||
|
||||
resulting in a GDB crash:
|
||||
|
||||
...
|
||||
Thread 1 "gdb" received signal SIGSEGV, Segmentation fault.
|
||||
0x0000555555e842bf in maybe_set_commit_resumed_all_targets () at ../../src/gdb/infrun.c:2899
|
||||
2899 if (proc_target->commit_resumed_state)
|
||||
(top-gdb) bt
|
||||
#0 0x0000555555e842bf in maybe_set_commit_resumed_all_targets () at ../../src/gdb/infrun.c:2899
|
||||
#1 0x0000555555e848bf in scoped_disable_commit_resumed::reset (this=0x7fffffffd440) at ../../src/gdb/infrun.c:3023
|
||||
#2 0x0000555555e84a0c in scoped_disable_commit_resumed::reset_and_commit (this=0x7fffffffd440) at ../../src/gdb/infrun.c:3049
|
||||
#3 0x0000555555e739cd in detach_command (args=0x0, from_tty=1) at ../../src/gdb/infcmd.c:2791
|
||||
#4 0x0000555555c0ba46 in do_simple_func (args=0x0, from_tty=1, c=0x55555662a600) at ../../src/gdb/cli/cli-decode.c:95
|
||||
#5 0x0000555555c112b0 in cmd_func (cmd=0x55555662a600, args=0x0, from_tty=1) at ../../src/gdb/cli/cli-decode.c:2514
|
||||
#6 0x0000555556173b1f in execute_command (p=0x5555565c5916 "", from_tty=1) at ../../src/gdb/top.c:699
|
||||
|
||||
The code that crashes looks like:
|
||||
|
||||
static void
|
||||
maybe_set_commit_resumed_all_targets ()
|
||||
{
|
||||
scoped_restore_current_thread restore_thread;
|
||||
|
||||
for (inferior *inf : all_non_exited_inferiors ())
|
||||
{
|
||||
process_stratum_target *proc_target = inf->process_target ();
|
||||
|
||||
if (proc_target->commit_resumed_state)
|
||||
^^^^^^^^^^^
|
||||
|
||||
With 'proc_target' above being null. all_non_exited_inferiors filters
|
||||
out inferiors that have pid==0. We get here at the end of
|
||||
detach_command, after core_target::detach has already run, at which
|
||||
point the inferior _should_ have pid==0 and no process target. It is
|
||||
clear it no longer has a process target, but, it still has a pid!=0
|
||||
somehow.
|
||||
|
||||
The reason the inferior still has pid!=0, is that core_target::detach
|
||||
just unpushes, and relies on core_target::close to actually do the
|
||||
getting rid of the core and exiting the inferior. The problem with
|
||||
that is that detach_command grabs an extra strong reference to the
|
||||
process stratum target, so the unpush_target inside
|
||||
core_target::detach doesn't actually result in a call to
|
||||
core_target::close.
|
||||
|
||||
Fix this my moving the cleaning up the core inferior to a shared
|
||||
routine called by both core_target::close and core_target::detach. We
|
||||
still need to cleanup the inferior from within core_file::close
|
||||
because there are paths to it that want to get rid of the core without
|
||||
going through detach. E.g., "core-file" -> "run".
|
||||
|
||||
This commit includes a new test added to gdb.base/corefile.exp to
|
||||
cover the "core-file core" -> "detach" scenario.
|
||||
|
||||
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29275
|
||||
|
||||
Change-Id: Ic42bdd03182166b19f598428b0dbc2ce6f67c893
|
||||
|
||||
---
|
||||
gdb/corelow.c | 27 +++++++++++++++++++++------
|
||||
gdb/testsuite/gdb.base/corefile.exp | 12 ++++++++++++
|
||||
2 files changed, 33 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gdb/corelow.c b/gdb/corelow.c
|
||||
index 001c4f147fc..bdd7ddc59c2 100644
|
||||
--- a/gdb/corelow.c
|
||||
+++ b/gdb/corelow.c
|
||||
@@ -120,6 +120,9 @@ class core_target final : public process_stratum_target
|
||||
|
||||
private: /* per-core data */
|
||||
|
||||
+ /* Get rid of the core inferior. */
|
||||
+ void clear_core ();
|
||||
+
|
||||
/* The core's section table. Note that these target sections are
|
||||
*not* mapped in the current address spaces' set of target
|
||||
sections --- those should come only from pure executable or
|
||||
@@ -290,10 +293,8 @@ core_target::build_file_mappings ()
|
||||
/* An arbitrary identifier for the core inferior. */
|
||||
#define CORELOW_PID 1
|
||||
|
||||
-/* Close the core target. */
|
||||
-
|
||||
void
|
||||
-core_target::close ()
|
||||
+core_target::clear_core ()
|
||||
{
|
||||
if (core_bfd)
|
||||
{
|
||||
@@ -307,6 +308,14 @@ core_target::close ()
|
||||
|
||||
current_program_space->cbfd.reset (nullptr);
|
||||
}
|
||||
+}
|
||||
+
|
||||
+/* Close the core target. */
|
||||
+
|
||||
+void
|
||||
+core_target::close ()
|
||||
+{
|
||||
+ clear_core ();
|
||||
|
||||
/* Core targets are heap-allocated (see core_target_open), so here
|
||||
we delete ourselves. */
|
||||
@@ -592,9 +601,15 @@ core_target_open (const char *arg, int from_tty)
|
||||
void
|
||||
core_target::detach (inferior *inf, int from_tty)
|
||||
{
|
||||
- /* Note that 'this' is dangling after this call. unpush_target
|
||||
- closes the target, and our close implementation deletes
|
||||
- 'this'. */
|
||||
+ /* Get rid of the core. Don't rely on core_target::close doing it,
|
||||
+ because target_detach may be called with core_target's refcount > 1,
|
||||
+ meaning core_target::close may not be called yet by the
|
||||
+ unpush_target call below. */
|
||||
+ clear_core ();
|
||||
+
|
||||
+ /* Note that 'this' may be dangling after this call. unpush_target
|
||||
+ closes the target if the refcount reaches 0, and our close
|
||||
+ implementation deletes 'this'. */
|
||||
inf->unpush_target (this);
|
||||
|
||||
/* Clear the register cache and the frame cache. */
|
||||
diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp
|
||||
index 4ed92a02955..7f3d2efe3a2 100644
|
||||
--- a/gdb/testsuite/gdb.base/corefile.exp
|
||||
+++ b/gdb/testsuite/gdb.base/corefile.exp
|
||||
@@ -207,6 +207,16 @@ gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(.*\\).*" "up in corefile.exp (
|
||||
|
||||
gdb_test "core" "No core file now."
|
||||
|
||||
+# Test that we can unload the core with the "detach" command.
|
||||
+
|
||||
+proc_with_prefix corefile_detach {} {
|
||||
+ clean_restart $::binfile
|
||||
+
|
||||
+ gdb_test "core-file $::corefile" "Core was generated by .*" "load core"
|
||||
+ gdb_test "detach" "No core file now\\." "detach core"
|
||||
+}
|
||||
+
|
||||
+corefile_detach
|
||||
|
||||
# Test a run (start) command will clear any loaded core file.
|
||||
|
||||
@@ -222,6 +232,8 @@ proc corefile_test_run {} {
|
||||
return
|
||||
}
|
||||
|
||||
+ clean_restart $::binfile
|
||||
+
|
||||
gdb_test "core-file $corefile" "Core was generated by .*" "run: load core again"
|
||||
gdb_test "info files" "\r\nLocal core dump file:\r\n.*" "run: sanity check we see the core file"
|
||||
|
@ -1,140 +0,0 @@
|
||||
Fix for gdb.base/solib-search.exp test.
|
||||
|
||||
The variable right_lib_flags is not being set correctly to define RIGHT.
|
||||
The value RIGHT is needed to force the address of the library functions
|
||||
lib1_func3 and lib2_func4 to occur at different address in the wrong and
|
||||
right libraries.
|
||||
|
||||
With RIGHT defined correctly, functions lib1_func3 and lib2_func4 occur
|
||||
at different addresses the test runs correctly on Powerpc.
|
||||
|
||||
The test needs the lib2 addresses to be different in the right and
|
||||
wrong cases. That is the point of introducing function lib2_spacer
|
||||
with the ifdef RIGHT compiler directive.
|
||||
|
||||
On Intel, the ARRAY_SIZE of 1 versus 8192 is sufficient to get the
|
||||
dynamic linker to move the addresses of the library. You can also get
|
||||
the same effect on PowerPC but you must use a value much larger than
|
||||
8192.
|
||||
|
||||
The key thing is that the test was not properly setting RIGHT to
|
||||
defined to get the lib2_spacer function on Intel and Powerpc.
|
||||
|
||||
Without the patch, we have the Intel backtrace for the bad libraries:
|
||||
|
||||
backtrace
|
||||
#0 break_here () at /home/ ... /gdb/testsuite/gdb.base/solib-search.c:30
|
||||
#1 0x00007ffff7fae156 in ?? ()
|
||||
#2 0x00007fffffffc150 in ?? ()
|
||||
#3 0x00007ffff7fbb156 in ?? ()
|
||||
#4 0x00007fffffffc160 in ?? ()
|
||||
#5 0x00007ffff7fae146 in ?? ()
|
||||
#6 0x00007fffffffc170 in ?? ()
|
||||
#7 0x00007ffff7fbb146 in ?? ()
|
||||
#8 0x00007fffffffc180 in ?? ()
|
||||
#9 0x0000555555555156 in main () at /home/ ... /binutils-gdb/gdb/testsuite/gdb.base/solib-search.c:23
|
||||
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
|
||||
(gdb) PASS: gdb.base/solib-search.exp: backtrace (with wrong libs) (data collection)
|
||||
|
||||
The backtrace on Intel with the good libraries is:
|
||||
|
||||
backtrace
|
||||
#0 break_here () at /.../binutils-gdb/gdb/testsuite/gdb.base/solib-search.c:30
|
||||
#1 0x00007ffff7fae156 in lib2_func4 () at /.../binutils-gdb/gdb/testsuite/gdb.base/solib-search-lib2.c:49
|
||||
#2 0x00007ffff7fbb156 in lib1_func3 () at /.../gdb.base/solib-search-lib1.c:49
|
||||
#3 0x00007ffff7fae146 in lib2_func2 () at /.../testsuite/gdb.base/solib-search-lib2.c:30
|
||||
#4 0x00007ffff7fbb146 in lib1_func1 () at /.../gdb.base/solib-search-lib1.c:30
|
||||
#5 0x0000555555555156 in main () at /...solib-search.c:23
|
||||
(gdb) PASS: gdb.base/solib-search.exp: backtrace (with right libs) (data collection)
|
||||
PASS: gdb.base/solib-search.exp: backtrace (with right libs)
|
||||
|
||||
In one case the backtrace is correct and the other it
|
||||
is wrong on Intel. This is due to the fact that the ARRAY_SIZE caused
|
||||
the dynamic linker to move the library function addresses around. I
|
||||
believe it has to do with the default size of the data and code
|
||||
sections used by the dynamic linker.
|
||||
|
||||
So without the patch the backtrace on PowerPC looks like:
|
||||
|
||||
backtrace
|
||||
#0 break_here () at /.../solib-search.c:30
|
||||
#1 0x00007ffff7f007f4 in lib2_func4 () at /.../solib-search-lib2.c:49
|
||||
#2 0x00007ffff7f307f4 in lib1_func3 () at /.../solib-search-lib1.c:49
|
||||
#3 0x00007ffff7f007ac in lib2_func2 () at /.../solib-search-lib2.c:30
|
||||
#4 0x00007ffff7f307ac in lib1_func1 () at /.../solib-search-lib1.c:30
|
||||
#5 0x000000001000074c in main () at /.../solib-search.c:23
|
||||
|
||||
for both the good and bad libraries.
|
||||
|
||||
The patch fixes defining RIGHT in solib-search-lib1.c and solib-search-
|
||||
lib2.c. Note, without the patch the lib1_spacer and lib2_spacer
|
||||
functions do not show up in the object dump of the Intel or Powerpc
|
||||
libraries as it should. The patch fixes that by making sure RIGHT gets
|
||||
defined.
|
||||
|
||||
Now with the patch the backtrace for the bad library on PowerPC looks
|
||||
like:
|
||||
|
||||
backtrace
|
||||
#0 break_here () at /.../solib-search.c:30
|
||||
#1 0x00007ffff7f0083c in __glink_PLTresolve () from /.../solib-search-lib2.so
|
||||
Backtrace stopped: frame did not save the PC
|
||||
|
||||
And the backtrace for the good libraries on PowerPC looks like:
|
||||
|
||||
backtrace
|
||||
#0 break_here () at /.../solib-search.c:30
|
||||
#1 0x00007ffff7f0083c in lib2_func4 () at /.../solib-search-lib2.c:49
|
||||
#2 0x00007ffff7f3083c in lib1_func3 () at /.../solib-search-lib1.c:49
|
||||
#3 0x00007ffff7f007cc in lib2_func2 () at /.../solib-search-lib2.c:30
|
||||
#4 0x00007ffff7f307cc in lib1_func1 () at /.../solib-search-lib1.c:30
|
||||
#5 0x000000001000074c in main () at /.../solib-search.c:23
|
||||
(gdb) PASS: gdb.base/solib-search.exp: backtrace (with right libs) (data collection)
|
||||
PASS: gdb.base/solib-search.exp: backtrace (with right libs)
|
||||
|
||||
The issue then is on Power where the ARRAY_SIZE of 1 versus 8192 is not
|
||||
sufficient to cause the dymanic linker to allocate the libraries at
|
||||
different addresses. I don't claim to understand the specifics of how
|
||||
the dynamic linker works and what the default size is for the data and
|
||||
code sections are. My guess is by default PowerPC allocates a larger
|
||||
data size by default, which is large enough to hold array[8192]. The
|
||||
default size of the data section allocated by the dynamic linker on
|
||||
Intel is not large enough to hold array[8192] thus causing the code
|
||||
section on Intel to have to move when the large array is defined.
|
||||
|
||||
Note on PowerPC, if you make ARRAY_SIZE big enough, then you will cause
|
||||
the library addresses to occur at different addresses as the larger
|
||||
data section forces the code section to a different address. That was
|
||||
actually my original fix for the program until I spoke with Doug Evans
|
||||
who originally wrote the test. Doug noticed that RIGHT was not getting
|
||||
defined as he originally intended in the test.
|
||||
|
||||
With the patch to fix the definition of RIGHT, PowerPC has a bad and a
|
||||
good backtrace because the address of lib1_func3 and lib2_func4 both
|
||||
move because lib1_spacer and lib2_spacer are now defined
|
||||
before lib1_func3 and lib2_func4.
|
||||
|
||||
Without the patch, the lib1_spacer and lib2_spacer function doesn't show
|
||||
up in the binary for the correct or incorrect library on Intel or PowerPC.
|
||||
With the patch, RIGHT gets defined as originally intended for the test on
|
||||
both architectures and lib1_spacer and lib2_spacer function show up in the
|
||||
binaries on both architectures changing the other function addresses as
|
||||
intended thus causing the test work as intended on PowerPC.
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.base/solib-search.exp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/solib-search.exp b/gdb/testsuite/gdb.base/solib-search.exp
|
||||
index eaabe508bf0..202e79d85de 100644
|
||||
--- a/gdb/testsuite/gdb.base/solib-search.exp
|
||||
+++ b/gdb/testsuite/gdb.base/solib-search.exp
|
||||
@@ -54,7 +54,7 @@ set binfile2_lib [standard_output_file ${libname2}.so]
|
||||
|
||||
set lib_flags [list debug ldflags=-Wl,-Bsymbolic]
|
||||
set wrong_lib_flags "$lib_flags additional_flags=-DARRAY_SIZE=1"
|
||||
-set right_lib_flags "$lib_flags additional_flags=-DARRAY_SIZE=8192 -DRIGHT"
|
||||
+set right_lib_flags "$lib_flags additional_flags=-DARRAY_SIZE=8192 additional_flags=-DRIGHT"
|
||||
|
||||
# Binary file.
|
||||
standard_testfile .c
|
@ -1,101 +0,0 @@
|
||||
From 1907d04cb6cb94052369995cf8373f2670908e2a Mon Sep 17 00:00:00 2001
|
||||
From: Pedro Alves <pedro@palves.net>
|
||||
Date: Wed, 28 Sep 2022 11:33:30 +0100
|
||||
Subject: [PATCH] Fix GDB build: ELF support check & -lzstd
|
||||
|
||||
GDB fails to build for me, on Ubuntu 20.04. I get:
|
||||
|
||||
...
|
||||
CXXLD gdb
|
||||
/usr/bin/ld: linux-tdep.o: in function `linux_corefile_thread(thread_info*, linux_corefile_thread_data*)':
|
||||
/home/pedro/gdb/binutils-gdb/src/gdb/linux-tdep.c:1831: undefined reference to `gcore_elf_build_thread_register_notes(gdbarch*, thread_info*, gdb_signal, bfd*, std::unique_ptr<char, gdb::xfree_deleter<char> >*, int*)'
|
||||
/usr/bin/ld: linux-tdep.o: in function `linux_make_corefile_notes(gdbarch*, bfd*, int*)':
|
||||
/home/pedro/gdb/binutils-gdb/src/gdb/linux-tdep.c:2117: undefined reference to `gcore_elf_make_tdesc_note(bfd*, std::unique_ptr<char, gdb::xfree_deleter<char> >*, int*)'
|
||||
collect2: error: ld returned 1 exit status
|
||||
make[2]: *** [Makefile:2149: gdb] Error 1
|
||||
make[2]: Leaving directory '/home/pedro/gdb/binutils-gdb/build/gdb'
|
||||
make[1]: *** [Makefile:11847: all-gdb] Error 2
|
||||
make[1]: Leaving directory '/home/pedro/gdb/binutils-gdb/build'
|
||||
make: *** [Makefile:1004: all] Error 2
|
||||
|
||||
Those undefined functions exist in gdb/gcore-elf.c, which is only
|
||||
included in the build if GDB's configure thinks that the target you're
|
||||
configuring for is an ELF target. GDB's configure thinks my system
|
||||
isn't ELF, which is incorrect.
|
||||
|
||||
For the ELF support check, gdb/config.log shows:
|
||||
|
||||
configure:17387: checking for ELF support in BFD
|
||||
configure:17407: gcc -o conftest -I/home/pedro/gdb/binutils-gdb/src/gdb/../include -I../bfd -I/home/pedro/gdb/binutils-gdb/src/gdb/../bfd -g3 -O0 -L../bfd -L../libiberty -lzstd conftest.c -lbfd -liberty -lz -lncursesw -lm -ldl >&5
|
||||
/usr/bin/ld: ../bfd/libbfd.a(compress.o): in function `decompress_contents':
|
||||
/home/pedro/gdb/binutils-gdb/src/bfd/compress.c:42: undefined reference to `ZSTD_decompress'
|
||||
/usr/bin/ld: /home/pedro/gdb/binutils-gdb/src/bfd/compress.c:44: undefined reference to `ZSTD_isError'
|
||||
/usr/bin/ld: ../bfd/libbfd.a(compress.o): in function `bfd_compress_section_contents':
|
||||
/home/pedro/gdb/binutils-gdb/src/bfd/compress.c:195: undefined reference to `ZSTD_compress'
|
||||
/usr/bin/ld: /home/pedro/gdb/binutils-gdb/src/bfd/compress.c:198: undefined reference to `ZSTD_isError'
|
||||
collect2: error: ld returned 1 exit status
|
||||
configure:17407: $? = 1
|
||||
...
|
||||
configure:17417: result: no
|
||||
|
||||
Note how above, in the gcc command line, "-lzstd" appears before
|
||||
"-lbfd". That explain the link failure. It should appear after, like
|
||||
-lz does.
|
||||
|
||||
This commit fixes it, by moving ZSTD_LIBS from LDFLAGS to LIBS, next
|
||||
to -lz, in GDB_AC_CHECK_BFD, and regenerating gdb/configure.
|
||||
|
||||
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29630
|
||||
Change-Id: I1f4128dde634e8ea04c9002904f1005a8b3a6863
|
||||
---
|
||||
gdb/acinclude.m4 | 4 ++--
|
||||
gdb/configure | 8 ++++----
|
||||
2 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gdb/acinclude.m4 b/gdb/acinclude.m4
|
||||
index 28846119dcb..62fa66c7af3 100644
|
||||
--- a/gdb/acinclude.m4
|
||||
+++ b/gdb/acinclude.m4
|
||||
@@ -234,9 +234,9 @@ AC_DEFUN([GDB_AC_CHECK_BFD], [
|
||||
# always want our bfd.
|
||||
CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
|
||||
ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
|
||||
- LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $ZSTD_LIBS $LDFLAGS"
|
||||
+ LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
|
||||
intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
|
||||
- LIBS="-lbfd -liberty -lz $intl $LIBS"
|
||||
+ LIBS="-lbfd -liberty -lz $ZSTD_LIBS $intl $LIBS"
|
||||
AC_CACHE_CHECK(
|
||||
[$1],
|
||||
[$2],
|
||||
diff --git a/gdb/configure b/gdb/configure
|
||||
index 2fcba76b5e8..a5f33ce65d9 100755
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -17963,9 +17963,9 @@ WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
|
||||
# always want our bfd.
|
||||
CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
|
||||
ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
|
||||
- LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $ZSTD_LIBS $LDFLAGS"
|
||||
+ LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
|
||||
intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
|
||||
- LIBS="-lbfd -liberty -lz $intl $LIBS"
|
||||
+ LIBS="-lbfd -liberty -lz $ZSTD_LIBS $intl $LIBS"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
|
||||
$as_echo_n "checking for ELF support in BFD... " >&6; }
|
||||
if ${gdb_cv_var_elf+:} false; then :
|
||||
@@ -18078,9 +18078,9 @@ fi
|
||||
# always want our bfd.
|
||||
CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
|
||||
ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
|
||||
- LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $ZSTD_LIBS $LDFLAGS"
|
||||
+ LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
|
||||
intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
|
||||
- LIBS="-lbfd -liberty -lz $intl $LIBS"
|
||||
+ LIBS="-lbfd -liberty -lz $ZSTD_LIBS $intl $LIBS"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
|
||||
$as_echo_n "checking for Mach-O support in BFD... " >&6; }
|
||||
if ${gdb_cv_var_macho+:} false; then :
|
||||
--
|
||||
2.35.3
|
||||
|
148
fix-pr30369-regression-on-aarch64-arm-pr30506.patch
Normal file
148
fix-pr30369-regression-on-aarch64-arm-pr30506.patch
Normal file
@ -0,0 +1,148 @@
|
||||
From 11a41bc318ba0307248eadf29bf7d4a1af31d3a8 Mon Sep 17 00:00:00 2001
|
||||
From: Tom de Vries <tdevries@suse.de>
|
||||
Date: Tue, 16 May 2023 17:00:51 +0100
|
||||
Subject: [PATCH 2/2] Fix PR30369 regression on aarch64/arm (PR30506)
|
||||
|
||||
The gdb.dwarf2/dw2-prologue-end-2.exp test was failing for both AArch64 and
|
||||
Arm.
|
||||
|
||||
As Tom pointed out here (https://inbox.sourceware.org/gdb-patches/6663707c-4297-c2f2-a0bd-f3e84fc62aad@suse.de/),
|
||||
there are issues with both the prologue skipper for AArch64 and Arm and an
|
||||
incorrect assumption by the testcase.
|
||||
|
||||
This patch fixes both of AArch64's and Arm's prologue skippers to not skip past
|
||||
the end of a function. It also incorporates a fix to the testcase so it
|
||||
doesn't assume the prologue skipper will stop at the first instruction of the
|
||||
functions/labels.
|
||||
|
||||
Regression-tested on aarch64-linux/arm-linux Ubuntu 20.04/22.04 and
|
||||
x86_64-linux Ubuntu 20.04.
|
||||
|
||||
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30506
|
||||
|
||||
Co-Authored-By: Tom de Vries <tdevries@suse.de>
|
||||
Co-Authored-By: Luis Machado <luis.machado@arm.com>
|
||||
---
|
||||
gdb/aarch64-tdep.c | 10 +++++++--
|
||||
gdb/arm-tdep.c | 21 ++++++++++++++++---
|
||||
.../gdb.dwarf2/dw2-prologue-end-2.exp | 12 +++++------
|
||||
3 files changed, 32 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
|
||||
index 499b87ef480..e21d18f5c8c 100644
|
||||
--- a/gdb/aarch64-tdep.c
|
||||
+++ b/gdb/aarch64-tdep.c
|
||||
@@ -896,12 +896,15 @@ aarch64_analyze_prologue_test (void)
|
||||
static CORE_ADDR
|
||||
aarch64_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
{
|
||||
- CORE_ADDR func_addr, limit_pc;
|
||||
+ CORE_ADDR func_addr, func_end_addr, limit_pc;
|
||||
|
||||
/* See if we can determine the end of the prologue via the symbol
|
||||
table. If so, then return either PC, or the PC after the
|
||||
prologue, whichever is greater. */
|
||||
- if (find_pc_partial_function (pc, NULL, &func_addr, NULL))
|
||||
+ bool func_addr_found
|
||||
+ = find_pc_partial_function (pc, NULL, &func_addr, &func_end_addr);
|
||||
+
|
||||
+ if (func_addr_found)
|
||||
{
|
||||
CORE_ADDR post_prologue_pc
|
||||
= skip_prologue_using_sal (gdbarch, func_addr);
|
||||
@@ -921,6 +924,9 @@ aarch64_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
if (limit_pc == 0)
|
||||
limit_pc = pc + 128; /* Magic. */
|
||||
|
||||
+ limit_pc
|
||||
+ = func_end_addr == 0? limit_pc : std::min (limit_pc, func_end_addr - 4);
|
||||
+
|
||||
/* Try disassembling prologue. */
|
||||
return aarch64_analyze_prologue (gdbarch, pc, limit_pc, NULL);
|
||||
}
|
||||
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
|
||||
index 58b9c5f4bd8..ecffb9223e1 100644
|
||||
--- a/gdb/arm-tdep.c
|
||||
+++ b/gdb/arm-tdep.c
|
||||
@@ -1768,12 +1768,18 @@ arm_skip_stack_protector(CORE_ADDR pc, struct gdbarch *gdbarch)
|
||||
static CORE_ADDR
|
||||
arm_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
{
|
||||
- CORE_ADDR func_addr, limit_pc;
|
||||
+ CORE_ADDR func_addr, func_end_addr, limit_pc;
|
||||
|
||||
/* See if we can determine the end of the prologue via the symbol table.
|
||||
If so, then return either PC, or the PC after the prologue, whichever
|
||||
is greater. */
|
||||
- if (find_pc_partial_function (pc, NULL, &func_addr, NULL))
|
||||
+ bool func_addr_found
|
||||
+ = find_pc_partial_function (pc, NULL, &func_addr, &func_end_addr);
|
||||
+
|
||||
+ /* Whether the function is thumb mode or not. */
|
||||
+ bool func_is_thumb = false;
|
||||
+
|
||||
+ if (func_addr_found)
|
||||
{
|
||||
CORE_ADDR post_prologue_pc
|
||||
= skip_prologue_using_sal (gdbarch, func_addr);
|
||||
@@ -1810,7 +1816,8 @@ arm_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
associate prologue code with the opening brace; so this
|
||||
lets us skip the first line if we think it is the opening
|
||||
brace. */
|
||||
- if (arm_pc_is_thumb (gdbarch, func_addr))
|
||||
+ func_is_thumb = arm_pc_is_thumb (gdbarch, func_addr);
|
||||
+ if (func_is_thumb)
|
||||
analyzed_limit = thumb_analyze_prologue (gdbarch, func_addr,
|
||||
post_prologue_pc, NULL);
|
||||
else
|
||||
@@ -1836,6 +1843,14 @@ arm_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
if (limit_pc == 0)
|
||||
limit_pc = pc + 64; /* Magic. */
|
||||
|
||||
+ /* Set the correct adjustment based on whether the function is thumb mode or
|
||||
+ not. We use it to get the address of the last instruction in the
|
||||
+ function (as opposed to the first address of the next function). */
|
||||
+ CORE_ADDR adjustment = func_is_thumb? 2 : 4;
|
||||
+
|
||||
+ limit_pc
|
||||
+ = func_end_addr == 0? limit_pc : std::min (limit_pc,
|
||||
+ func_end_addr - adjustment);
|
||||
|
||||
/* Check if this is Thumb code. */
|
||||
if (arm_pc_is_thumb (gdbarch, pc))
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-prologue-end-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-prologue-end-2.exp
|
||||
index 642b73fe2a1..da49902c13c 100644
|
||||
--- a/gdb/testsuite/gdb.dwarf2/dw2-prologue-end-2.exp
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-prologue-end-2.exp
|
||||
@@ -95,17 +95,17 @@ if { $break_addr == "" } {
|
||||
return
|
||||
}
|
||||
|
||||
-# Get the "foo_label" address.
|
||||
+# Get the "bar_label" address.
|
||||
|
||||
-set foo_label_addr ""
|
||||
-gdb_test_multiple "print /x &foo_label" "" {
|
||||
+set bar_label_addr ""
|
||||
+gdb_test_multiple "print /x &bar_label" "" {
|
||||
-re -wrap "= ($hex)" {
|
||||
- set foo_label_addr $expect_out(1,string)
|
||||
+ set bar_label_addr $expect_out(1,string)
|
||||
pass $gdb_test_name
|
||||
}
|
||||
}
|
||||
|
||||
-if { $foo_label_addr == "" } {
|
||||
+if { $bar_label_addr == "" } {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -117,4 +117,4 @@ gdb_test "print &foo_end == &bar_label" " = 1"
|
||||
# Check that the breakpoint is set at the expected address. Regression test
|
||||
# for PR30369.
|
||||
|
||||
-gdb_assert { $break_addr == $foo_label_addr }
|
||||
+gdb_assert { $break_addr < $bar_label_addr }
|
||||
--
|
||||
2.35.3
|
||||
|
30
fixup-gdb-6.3-attach-see-vdso-test.patch
Normal file
30
fixup-gdb-6.3-attach-see-vdso-test.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From 19dc95258888a9e110ad54fa25a613611956a13f Mon Sep 17 00:00:00 2001
|
||||
From: Tom de Vries <tdevries@suse.de>
|
||||
Date: Tue, 13 Jun 2023 15:04:32 +0200
|
||||
Subject: [PATCH 5/6] fixup gdb-6.3-attach-see-vdso-test.patch
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.base/attach-see-vdso.exp | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/attach-see-vdso.exp b/gdb/testsuite/gdb.base/attach-see-vdso.exp
|
||||
index 5457ec4129d..35c49731f0b 100644
|
||||
--- a/gdb/testsuite/gdb.base/attach-see-vdso.exp
|
||||
+++ b/gdb/testsuite/gdb.base/attach-see-vdso.exp
|
||||
@@ -34,10 +34,11 @@ set escapedbinfile [string_to_regexp [standard_output_file ${testfile}]]
|
||||
# The kernel VDSO is used for the syscalls returns only on i386 (not x86_64).
|
||||
#
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-m32}] != "" } {
|
||||
- gdb_suppress_entire_file "Testcase nonthraded compile failed, so all tests in this file will automatically fail."
|
||||
+ unsupported "Testcase nonthreaded compile failed, so all tests in this file will automatically fail."
|
||||
+ return
|
||||
}
|
||||
|
||||
-if [get_compiler_info ${binfile}] {
|
||||
+if [get_compiler_info] {
|
||||
return -1
|
||||
}
|
||||
|
||||
--
|
||||
2.35.3
|
||||
|
25
fixup-gdb-6.3-gstack-20050411.patch
Normal file
25
fixup-gdb-6.3-gstack-20050411.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 8c0ae8c3c6fa34f046131f76871db13bc392a440 Mon Sep 17 00:00:00 2001
|
||||
From: Tom de Vries <tdevries@suse.de>
|
||||
Date: Tue, 13 Jun 2023 14:56:55 +0200
|
||||
Subject: [PATCH 4/6] fixup gdb-6.3-gstack-20050411.patch
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.base/gstack.exp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/gstack.exp b/gdb/testsuite/gdb.base/gstack.exp
|
||||
index 089407ec04a..a5dacd582ff 100644
|
||||
--- a/gdb/testsuite/gdb.base/gstack.exp
|
||||
+++ b/gdb/testsuite/gdb.base/gstack.exp
|
||||
@@ -52,7 +52,7 @@ gdb_expect {
|
||||
# exiting the function. Still we could retry the gstack command if we fail.
|
||||
|
||||
set test "spawn gstack"
|
||||
-set command "sh -c GDB=$GDB\\ GDBARGS=-data-directory\\\\\\ $BUILD_DATA_DIRECTORY\\ sh\\ ${srcdir}/../gstack.sh\\ $pid\\;echo\\ GSTACK-END"
|
||||
+set command "sh -c GDB=$GDB\\ GDBARGS=-data-directory\\\\\\ $GDB_DATA_DIRECTORY\\ sh\\ ${srcdir}/../gstack.sh\\ $pid\\;echo\\ GSTACK-END"
|
||||
set res [remote_spawn host $command];
|
||||
if { $res < 0 || $res == "" } {
|
||||
perror "Spawning $command failed."
|
||||
--
|
||||
2.35.3
|
||||
|
22
fixup-gdb-bz634108-solib_address.patch
Normal file
22
fixup-gdb-bz634108-solib_address.patch
Normal file
@ -0,0 +1,22 @@
|
||||
From 023314feb400836eb377a5bc9151850fcdd81b11 Mon Sep 17 00:00:00 2001
|
||||
From: Tom de Vries <tdevries@suse.de>
|
||||
Date: Tue, 6 Jun 2023 09:43:36 +0200
|
||||
Subject: [PATCH 3/4] Fixup gdb-bz634108-solib_address.patch
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.python/rh634108-solib_address.exp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.python/rh634108-solib_address.exp b/gdb/testsuite/gdb.python/rh634108-solib_address.exp
|
||||
index 99e6aaba831..ebf00babc34 100644
|
||||
--- a/gdb/testsuite/gdb.python/rh634108-solib_address.exp
|
||||
+++ b/gdb/testsuite/gdb.python/rh634108-solib_address.exp
|
||||
@@ -21,4 +21,4 @@ gdb_start
|
||||
# Skip all tests if Python scripting is not enabled.
|
||||
if { [skip_python_tests] } { continue }
|
||||
|
||||
-gdb_test "python print (gdb.solib_name(-1))" "None" "gdb.solib_name exists"
|
||||
+gdb_test "python print (gdb.solib_name(0))" "None" "gdb.solib_name exists"
|
||||
--
|
||||
2.35.3
|
||||
|
26
fixup-gdb-lineno-makeup-test.patch
Normal file
26
fixup-gdb-lineno-makeup-test.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 266359a17e77a53d4ebaa4f3b15c2ae39e43fca0 Mon Sep 17 00:00:00 2001
|
||||
From: Tom de Vries <tdevries@suse.de>
|
||||
Date: Tue, 13 Jun 2023 15:07:22 +0200
|
||||
Subject: [PATCH 6/6] fixup gdb-lineno-makeup-test.patch
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.base/lineno-makeup.exp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/lineno-makeup.exp b/gdb/testsuite/gdb.base/lineno-makeup.exp
|
||||
index 9e11d78bf9c..d31e063bdc2 100644
|
||||
--- a/gdb/testsuite/gdb.base/lineno-makeup.exp
|
||||
+++ b/gdb/testsuite/gdb.base/lineno-makeup.exp
|
||||
@@ -21,7 +21,8 @@ set binfuncfile [standard_output_file ${testfile}-func.bin]
|
||||
set binfile [standard_output_file ${testfile}]
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfuncfile}" "${objfuncfile}" object {}] != "" } {
|
||||
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
|
||||
+ unsupported "Testcase compile failed, so all tests in this file will automatically fail."
|
||||
+ return
|
||||
}
|
||||
|
||||
set objcopy [catch "exec objcopy -O binary --only-section .text ${objfuncfile} ${binfuncfile}" output]
|
||||
--
|
||||
2.35.3
|
||||
|
43
fixup-gdb-rhbz1261564-aarch64-hw-watchpoint-test.pat.patch
Normal file
43
fixup-gdb-rhbz1261564-aarch64-hw-watchpoint-test.pat.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From e452307ba07f5d798edad73631182e137265da7d Mon Sep 17 00:00:00 2001
|
||||
From: Tom de Vries <tdevries@suse.de>
|
||||
Date: Tue, 13 Jun 2023 17:58:42 +0200
|
||||
Subject: [PATCH 9/9] fixup gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
|
||||
|
||||
---
|
||||
.../rhbz1261564-aarch64-watchpoint.exp | 18 ++++++++++++++----
|
||||
1 file changed, 14 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/rhbz1261564-aarch64-watchpoint.exp b/gdb/testsuite/gdb.base/rhbz1261564-aarch64-watchpoint.exp
|
||||
index b1cf7115663..42ebc25cc49 100644
|
||||
--- a/gdb/testsuite/gdb.base/rhbz1261564-aarch64-watchpoint.exp
|
||||
+++ b/gdb/testsuite/gdb.base/rhbz1261564-aarch64-watchpoint.exp
|
||||
@@ -20,12 +20,22 @@ if { [prepare_for_testing rhbz1261564-aarch64-watchpoint.exp "rhbz1261564-aarch6
|
||||
if { ! [ runto main ] } then { return 0 }
|
||||
|
||||
set test "rwatch aligned.var4"
|
||||
-if [istarget "s390*-*-*"] {
|
||||
- gdb_test $test {Target does not support this type of hardware watchpoint\.}
|
||||
- untested "s390* does not support hw read watchpoint"
|
||||
+
|
||||
+set supported 1
|
||||
+gdb_test_multiple $test "" {
|
||||
+ -re -wrap "Hardware read watchpoint \[0-9\]+: aligned.var4" {
|
||||
+ pass $gdb_test_name
|
||||
+ }
|
||||
+ -re -wrap "Target does not support this type of hardware watchpoint\\." {
|
||||
+ set supported 0
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+if { !$supported } {
|
||||
+ unsupported $test
|
||||
return
|
||||
}
|
||||
-gdb_test $test "Hardware read watchpoint \[0-9\]+: aligned.var4"
|
||||
+
|
||||
|
||||
proc checkvar { address } {
|
||||
global gdb_prompt
|
||||
--
|
||||
2.35.3
|
||||
|
@ -1,19 +0,0 @@
|
||||
fixup-gdb-rhbz1325795-framefilters-test.patch
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.python/py-framefilter-thread.exp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.python/py-framefilter-thread.exp b/gdb/testsuite/gdb.python/py-framefilter-thread.exp
|
||||
index 71f97463372..156a4d7bbf3 100644
|
||||
--- a/gdb/testsuite/gdb.python/py-framefilter-thread.exp
|
||||
+++ b/gdb/testsuite/gdb.python/py-framefilter-thread.exp
|
||||
@@ -39,7 +39,7 @@ gdb_breakpoint [gdb_get_line_number "Backtrace end breakpoint"]
|
||||
gdb_continue_to_breakpoint "Backtrace end breakpoint"
|
||||
|
||||
# #2 0x00007ffff75f228d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113^M
|
||||
-gdb_test "bt no-filters" " in (\\.?_*clone|thread_start) \[^\r\n\]*" "bt no-filters"
|
||||
+gdb_test "bt no-filters" " in (\\.?_*clone3?|thread_start) \[^\r\n\]*" "bt no-filters"
|
||||
|
||||
# #2 0x00007ffff75f228d in 941595343737041 () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113^M
|
||||
# vs.
|
BIN
gdb-12.1.tar.bz2
(Stored with Git LFS)
BIN
gdb-12.1.tar.bz2
(Stored with Git LFS)
Binary file not shown.
BIN
gdb-13.2.tar.bz2
(Stored with Git LFS)
Normal file
BIN
gdb-13.2.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,320 +0,0 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-bz140532-ppc-unwinding-test.patch
|
||||
|
||||
;; Update PPC unwinding patches to their upstream variants (BZ 140532).
|
||||
;;=fedoratest
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S
|
||||
@@ -0,0 +1,78 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 2 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program; if not, write to the Free Software
|
||||
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
+
|
||||
+ .section ".text"
|
||||
+ .align 2
|
||||
+ .globl func0
|
||||
+ .type func0, @function
|
||||
+func0:
|
||||
+ stwu 1,-16(1)
|
||||
+ mflr 0
|
||||
+ stw 31,12(1)
|
||||
+ stw 0,20(1)
|
||||
+ mr 31,1
|
||||
+ bl abort
|
||||
+ .size func0, .-func0
|
||||
+ .align 2
|
||||
+ .globl func1
|
||||
+ .type func1, @function
|
||||
+func1:
|
||||
+ stwu 1,-16(1)
|
||||
+ mflr 0
|
||||
+/* 20 = BO = branch always
|
||||
+ 31 = BI = CR bit (ignored) */
|
||||
+ bcl 20,31,.Lpie
|
||||
+.Lpie: stw 31,12(1)
|
||||
+ stw 0,20(1)
|
||||
+ mr 31,1
|
||||
+ bl func0
|
||||
+ mr 0,3
|
||||
+ lis 9,var@ha
|
||||
+ lwz 9,var@l(9)
|
||||
+ add 0,0,9
|
||||
+ mr 3,0
|
||||
+ lwz 11,0(1)
|
||||
+ lwz 0,4(11)
|
||||
+ mtlr 0
|
||||
+ lwz 31,-4(11)
|
||||
+ mr 1,11
|
||||
+ blr
|
||||
+ .size func1, .-func1
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+ .ident "GCC: (GNU) 3.4.6 20060404 (Red Hat 3.4.6-8)"
|
||||
+
|
||||
+/* Original source file:
|
||||
+
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
+extern volatile int var;
|
||||
+
|
||||
+int func0 (void) __attribute__((__noinline__));
|
||||
+int func0 (void)
|
||||
+{
|
||||
+ abort ();
|
||||
+ return var;
|
||||
+}
|
||||
+
|
||||
+int func1 (void) __attribute__((__noinline__));
|
||||
+int func1 (void)
|
||||
+{
|
||||
+ return func0 () + var;
|
||||
+}
|
||||
+
|
||||
+*/
|
||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S
|
||||
@@ -0,0 +1,98 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 2 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program; if not, write to the Free Software
|
||||
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
+
|
||||
+ .section ".toc","aw"
|
||||
+ .section ".text"
|
||||
+ .align 2
|
||||
+ .globl func0
|
||||
+ .section ".opd","aw"
|
||||
+ .align 3
|
||||
+func0:
|
||||
+ .quad .L.func0,.TOC.@tocbase
|
||||
+ .previous
|
||||
+ .type func0, @function
|
||||
+.L.func0:
|
||||
+ mflr 0
|
||||
+ std 31,-8(1)
|
||||
+ std 0,16(1)
|
||||
+ stdu 1,-128(1)
|
||||
+ mr 31,1
|
||||
+ bl abort
|
||||
+ nop
|
||||
+ .long 0
|
||||
+ .byte 0,0,0,1,128,1,0,1
|
||||
+ .size func0,.-.L.func0
|
||||
+ .section ".toc","aw"
|
||||
+.LC1:
|
||||
+ .tc var[TC],var
|
||||
+ .section ".text"
|
||||
+ .align 2
|
||||
+ .globl func1
|
||||
+ .section ".opd","aw"
|
||||
+ .align 3
|
||||
+func1:
|
||||
+ .quad .L.func1,.TOC.@tocbase
|
||||
+ .previous
|
||||
+ .type func1, @function
|
||||
+.L.func1:
|
||||
+ mflr 0
|
||||
+/* 20 = BO = branch always
|
||||
+ 31 = BI = CR bit (ignored) */
|
||||
+ bcl 20,31,.Lpie
|
||||
+.Lpie: std 31,-8(1)
|
||||
+ std 0,16(1)
|
||||
+ stdu 1,-128(1)
|
||||
+ mr 31,1
|
||||
+ bl func0
|
||||
+ mr 11,3
|
||||
+ ld 9,.LC1@toc(2)
|
||||
+ lwz 0,0(9)
|
||||
+ add 0,11,0
|
||||
+ extsw 0,0
|
||||
+ mr 3,0
|
||||
+ ld 1,0(1)
|
||||
+ ld 0,16(1)
|
||||
+ mtlr 0
|
||||
+ ld 31,-8(1)
|
||||
+ blr
|
||||
+ .long 0
|
||||
+ .byte 0,0,0,1,128,1,0,1
|
||||
+ .size func1,.-.L.func1
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+ .ident "GCC: (GNU) 3.4.6 20060404 (Red Hat 3.4.6-8)"
|
||||
+
|
||||
+/* Original source file:
|
||||
+
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
+extern volatile int var;
|
||||
+
|
||||
+int func0 (void) __attribute__((__noinline__));
|
||||
+int func0 (void)
|
||||
+{
|
||||
+ abort ();
|
||||
+ return var;
|
||||
+}
|
||||
+
|
||||
+int func1 (void) __attribute__((__noinline__));
|
||||
+int func1 (void)
|
||||
+{
|
||||
+ return func0 () + var;
|
||||
+}
|
||||
+
|
||||
+*/
|
||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c
|
||||
@@ -0,0 +1,29 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 2 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program; if not, write to the Free Software
|
||||
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
+
|
||||
+/* Force `-fpie' double jump bl->blrl. */
|
||||
+/* No longer used. */
|
||||
+volatile int var;
|
||||
+
|
||||
+extern int func1 (void);
|
||||
+
|
||||
+int main (void)
|
||||
+{
|
||||
+ func1 ();
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
|
||||
@@ -0,0 +1,72 @@
|
||||
+# Copyright 2006, 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 2 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program; if not, write to the Free Software
|
||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+
|
||||
+# Test unwinding fixes of the PPC platform, specifically on the coping with BCL
|
||||
+# jump of the PIE code.
|
||||
+
|
||||
+if ![istarget "powerpc*-*-linux*"] then {
|
||||
+ verbose "Skipping powerpc-linux prologue tests."
|
||||
+ return
|
||||
+}
|
||||
+
|
||||
+set testfile "powerpc-bcl-prologue"
|
||||
+set srcfile1 ${testfile}.c
|
||||
+set flags "debug"
|
||||
+if [istarget "powerpc-*"] then {
|
||||
+ set srcfile2 ${testfile}-asm32.S
|
||||
+ set flags "$flags additional_flags=-m32"
|
||||
+} elseif [istarget "powerpc64-*"] then {
|
||||
+ set srcfile2 ${testfile}-asm64.S
|
||||
+ set flags "$flags additional_flags=-m64"
|
||||
+} else {
|
||||
+ fail "powerpc arch test"
|
||||
+ return
|
||||
+}
|
||||
+set objfile2 [standard_output_file ${testfile}-asm.o]
|
||||
+set binfile [standard_output_file ${testfile}]
|
||||
+
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1} ${srcdir}/${subdir}/${srcfile2}" ${binfile} executable $flags] != ""} {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load ${binfile}
|
||||
+
|
||||
+# We should stop in abort(3).
|
||||
+
|
||||
+gdb_run_cmd
|
||||
+
|
||||
+gdb_test_multiple {} "continue to abort()" {
|
||||
+ -re ".*Program received signal SIGABRT,.*$gdb_prompt $" {
|
||||
+ pass "continue to abort()"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# Check backtrace:
|
||||
+# #3 0x0804835f in func0 ()
|
||||
+# #4 0x0804836a in func1 ()
|
||||
+# #5 0x0804838c in main ()
|
||||
+# (gdb)
|
||||
+# `\\.?' prefixes are needed for ppc64 without `debug' (another bug).
|
||||
+
|
||||
+set test "matching unwind"
|
||||
+gdb_test_multiple "backtrace" $test {
|
||||
+ -re "\r\n#\[0-9\]\[^\r\n\]* in \\.?func0 \\(\[^\r\n\]*\r\n#\[0-9\]\[^\r\n\]* in \\.?func1 \\(\[^\r\n\]*\r\n#\[0-9\]\[^\r\n\]* in \\.?main \\(\[^\r\n\]*\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-prologue.exp
|
||||
--- a/gdb/testsuite/gdb.arch/powerpc-prologue.exp
|
||||
+++ b/gdb/testsuite/gdb.arch/powerpc-prologue.exp
|
||||
@@ -16,8 +16,9 @@
|
||||
# Test PowerPC prologue analyzer.
|
||||
|
||||
# Do not run on AIX (where we won't be able to build the tests without
|
||||
-# some surgery) or on PowerPC64 (ditto, dot symbols).
|
||||
-if {[istarget *-*-aix*] || ![istarget "powerpc-*-*"]} then {
|
||||
+# some surgery). PowerPC64 target would break due to dot symbols but we build
|
||||
+# there PowerPC32 inferior.
|
||||
+if {[istarget *-*-aix*] || ![istarget "powerpc*-*-*"]} then {
|
||||
verbose "Skipping PowerPC prologue tests."
|
||||
return
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-focus-cmd-prev-test.patch
|
||||
|
||||
;; Test a crash on `focus cmd', `focus prev' commands.
|
||||
;;=fedoratest
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/focus-cmd-prev.exp b/gdb/testsuite/gdb.base/focus-cmd-prev.exp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/focus-cmd-prev.exp
|
||||
@@ -0,0 +1,40 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 2 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program; if not, write to the Free Software
|
||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+
|
||||
+if $tracelevel then {
|
||||
+ strace $tracelevel
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+
|
||||
+# Do not use gdb_test or \r\n there since:
|
||||
+# commit d7e747318f4d04af033f16325f9b6d74f67079ec
|
||||
+# Eliminate make_cleanup_ui_file_delete / make ui_file a class hierarchy
|
||||
+
|
||||
+set test "focus cmd"
|
||||
+gdb_test_multiple $test $test {
|
||||
+ -re "$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+set test "focus prev"
|
||||
+gdb_test_multiple $test $test {
|
||||
+ -re "$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
@ -16,7 +16,7 @@ Subject: gdb-6.3-gstack-20050411.patch
|
||||
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
|
||||
--- a/gdb/Makefile.in
|
||||
+++ b/gdb/Makefile.in
|
||||
@@ -1767,7 +1767,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force
|
||||
@@ -2011,7 +2011,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force
|
||||
install: all
|
||||
@$(MAKE) $(FLAGS_TO_PASS) install-only
|
||||
|
||||
@ -25,7 +25,7 @@ diff --git a/gdb/Makefile.in b/gdb/Makefile.in
|
||||
transformed_name=`t='$(program_transform_name)'; \
|
||||
echo gdb | sed -e "$$t"` ; \
|
||||
if test "x$$transformed_name" = x; then \
|
||||
@@ -1816,7 +1816,25 @@ install-guile:
|
||||
@@ -2061,7 +2061,25 @@ install-guile:
|
||||
install-python:
|
||||
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
|
||||
|
||||
@ -52,7 +52,7 @@ diff --git a/gdb/Makefile.in b/gdb/Makefile.in
|
||||
transformed_name=`t='$(program_transform_name)'; \
|
||||
echo gdb | sed -e $$t` ; \
|
||||
if test "x$$transformed_name" = x; then \
|
||||
@@ -1847,6 +1865,18 @@ uninstall: force $(CONFIG_UNINSTALL)
|
||||
@@ -2092,6 +2110,18 @@ uninstall: force $(CONFIG_UNINSTALL)
|
||||
rm -f $(DESTDIR)$(bindir)/$$transformed_name
|
||||
@$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
|
||||
|
||||
|
@ -1,160 +0,0 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Jeff Johnston <jjohnstn@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-inheritancetest-20050726.patch
|
||||
|
||||
;; Verify printing of inherited members test
|
||||
;;=fedoratest
|
||||
|
||||
2005-07-26 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* gdb.cp/b146835.exp: New testcase.
|
||||
* gdb.cp/b146835.cc: Ditto.
|
||||
* gdb.cp/b146835b.cc: Ditto.
|
||||
* gdb.cp/b146835.h: Ditto.
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.cp/b146835.cc b/gdb/testsuite/gdb.cp/b146835.cc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/b146835.cc
|
||||
@@ -0,0 +1,31 @@
|
||||
+#include "b146835.h"
|
||||
+#include <iostream>
|
||||
+
|
||||
+class F : public C {
|
||||
+
|
||||
+protected:
|
||||
+
|
||||
+ virtual void funcA (unsigned long a, B *b);
|
||||
+ virtual void funcB (E *e);
|
||||
+ virtual void funcC (unsigned long x, bool y);
|
||||
+
|
||||
+ char *s1, *s2;
|
||||
+ bool b1;
|
||||
+ int k;
|
||||
+
|
||||
+public:
|
||||
+ void foo() {
|
||||
+ std::cout << "foo" << std::endl;
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+
|
||||
+void F::funcA (unsigned long a, B *b) {}
|
||||
+void F::funcB (E *e) {}
|
||||
+void F::funcC (unsigned long x, bool y) {}
|
||||
+
|
||||
+int main()
|
||||
+{
|
||||
+ F f;
|
||||
+ f.foo();
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.cp/b146835.exp b/gdb/testsuite/gdb.cp/b146835.exp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/b146835.exp
|
||||
@@ -0,0 +1,47 @@
|
||||
+# This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+# Copyright 2005 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 2 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program; if not, write to the Free Software
|
||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+
|
||||
+# Check that GDB can properly print an inherited member variable
|
||||
+# (Bugzilla 146835)
|
||||
+
|
||||
+set testfile "b146835"
|
||||
+set srcfile ${testfile}.cc
|
||||
+set srcfile2 ${testfile}b.cc
|
||||
+set binfile [standard_output_file ${testfile}]
|
||||
+if {[gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile2}" "${binfile}" executable {debug c++}] != "" } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load ${binfile}
|
||||
+
|
||||
+#
|
||||
+# Run to `main' where we begin our tests.
|
||||
+#
|
||||
+
|
||||
+if ![runto_main] then {
|
||||
+ gdb_suppress_tests
|
||||
+}
|
||||
+
|
||||
+gdb_test "break 'F::foo()'" ""
|
||||
+gdb_continue_to_breakpoint "First line foo"
|
||||
+
|
||||
+# Verify that we can access the inherited member d
|
||||
+gdb_test "p d" " = \\(D \\*\\) *0x0" "Verify inherited member d accessible"
|
||||
diff --git a/gdb/testsuite/gdb.cp/b146835.h b/gdb/testsuite/gdb.cp/b146835.h
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/b146835.h
|
||||
@@ -0,0 +1,36 @@
|
||||
+
|
||||
+class A {
|
||||
+
|
||||
+protected:
|
||||
+
|
||||
+ virtual void funcA (unsigned long a, class B *b) = 0;
|
||||
+ virtual void funcB (class E *e) = 0;
|
||||
+ virtual void funcC (unsigned long x, bool y) = 0;
|
||||
+
|
||||
+ void funcD (class E *e, class D* d);
|
||||
+ virtual void funcE (E *e, D *d);
|
||||
+ virtual void funcF (unsigned long x, D *d);
|
||||
+};
|
||||
+
|
||||
+
|
||||
+class C : public A {
|
||||
+
|
||||
+protected:
|
||||
+
|
||||
+ int x;
|
||||
+ class K *k;
|
||||
+ class H *h;
|
||||
+
|
||||
+ D *d;
|
||||
+
|
||||
+ class W *w;
|
||||
+ class N *n;
|
||||
+ class L *l;
|
||||
+ unsigned long *r;
|
||||
+
|
||||
+public:
|
||||
+
|
||||
+ C();
|
||||
+ int z (char *s);
|
||||
+ virtual ~C();
|
||||
+};
|
||||
diff --git a/gdb/testsuite/gdb.cp/b146835b.cc b/gdb/testsuite/gdb.cp/b146835b.cc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/b146835b.cc
|
||||
@@ -0,0 +1,11 @@
|
||||
+#include "b146835.h"
|
||||
+
|
||||
+C::C() { d = 0; x = 3; }
|
||||
+
|
||||
+int C::z (char *s) { return 0; }
|
||||
+
|
||||
+C::~C() {}
|
||||
+
|
||||
+void A::funcD (class E *e, class D *d) {}
|
||||
+void A::funcE (E *e, D *d) {}
|
||||
+void A::funcF (unsigned long x, D *d) {}
|
@ -1,247 +0,0 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-test-dtorfix-20050121.patch
|
||||
|
||||
;; Test support of multiple destructors just like multiple constructors
|
||||
;;=fedoratest
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.cp/constructortest.cc b/gdb/testsuite/gdb.cp/constructortest.cc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/constructortest.cc
|
||||
@@ -0,0 +1,99 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2005 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 2 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program; if not, write to the Free Software
|
||||
+ Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
+ Boston, MA 02111-1307, USA. */
|
||||
+
|
||||
+class A
|
||||
+{
|
||||
+ public:
|
||||
+ A();
|
||||
+ ~A();
|
||||
+ int k;
|
||||
+ private:
|
||||
+ int x;
|
||||
+};
|
||||
+
|
||||
+class B: public A
|
||||
+{
|
||||
+ public:
|
||||
+ B();
|
||||
+ private:
|
||||
+ int y;
|
||||
+};
|
||||
+
|
||||
+/* C and D are for the $delete destructor. */
|
||||
+
|
||||
+class C
|
||||
+{
|
||||
+ public:
|
||||
+ C();
|
||||
+ virtual ~C();
|
||||
+ private:
|
||||
+ int x;
|
||||
+};
|
||||
+
|
||||
+class D: public C
|
||||
+{
|
||||
+ public:
|
||||
+ D();
|
||||
+ private:
|
||||
+ int y;
|
||||
+};
|
||||
+
|
||||
+int main(int argc, char *argv[])
|
||||
+{
|
||||
+ A* a = new A;
|
||||
+ B* b = new B;
|
||||
+ D* d = new D;
|
||||
+ delete a;
|
||||
+ delete b;
|
||||
+ delete d;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+A::A() /* Constructor A */
|
||||
+{
|
||||
+ x = 1; /* First line A */
|
||||
+ k = 4; /* Second line A */
|
||||
+}
|
||||
+
|
||||
+A::~A() /* Destructor A */
|
||||
+{
|
||||
+ x = 3; /* First line ~A */
|
||||
+ k = 6; /* Second line ~A */
|
||||
+}
|
||||
+
|
||||
+B::B()
|
||||
+{
|
||||
+ y = 2; /* First line B */
|
||||
+ k = 5;
|
||||
+}
|
||||
+
|
||||
+C::C() /* Constructor C */
|
||||
+{
|
||||
+ x = 1; /* First line C */
|
||||
+}
|
||||
+
|
||||
+C::~C() /* Destructor C */
|
||||
+{
|
||||
+ x = 3; /* First line ~C */
|
||||
+}
|
||||
+
|
||||
+D::D()
|
||||
+{
|
||||
+ y = 2; /* First line D */
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.cp/constructortest.exp b/gdb/testsuite/gdb.cp/constructortest.exp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/constructortest.exp
|
||||
@@ -0,0 +1,130 @@
|
||||
+# This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+# Copyright 2005, 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 2 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program; if not, write to the Free Software
|
||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+
|
||||
+# Check that GDB can break at multiple forms of constructors.
|
||||
+
|
||||
+set testfile "constructortest"
|
||||
+set srcfile ${testfile}.cc
|
||||
+set binfile [standard_output_file ${testfile}]
|
||||
+# PIE is required for testing proper BREAKPOINT_RE_SET of the multiple-PC
|
||||
+# breakpoints.
|
||||
+if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++ "additional_flags=-fpie -pie"}] != "" } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load ${binfile}
|
||||
+
|
||||
+#
|
||||
+# Run to `main' where we begin our tests.
|
||||
+#
|
||||
+
|
||||
+if ![runto_main] then {
|
||||
+ gdb_suppress_tests
|
||||
+}
|
||||
+
|
||||
+# Break on the various forms of the A::A constructor.
|
||||
+# " (2 locations)" is displayed depending on G++ version.
|
||||
+gdb_test "break A\:\:A" "Breakpoint 2 at .*" "breaking on A::A"
|
||||
+
|
||||
+# Verify that we break for the A constructor two times
|
||||
+# Once for new A and once for new B
|
||||
+gdb_continue_to_breakpoint "First line A"
|
||||
+gdb_test "bt" "#0.*A.*#1.*main.*" "Verify in in-charge A::A"
|
||||
+gdb_continue_to_breakpoint "First line A"
|
||||
+gdb_test "bt" "#0.*A.*#1.*B.*#2.*main.*" "Verify in not-in-charge A::A"
|
||||
+
|
||||
+# Now do the same for destructors
|
||||
+gdb_test "break 'A::~A()'" ""
|
||||
+
|
||||
+# Verify that we break for the A destructor two times
|
||||
+# Once for delete a and once for delete b
|
||||
+gdb_continue_to_breakpoint "First line ~A"
|
||||
+gdb_test "bt" "#0.*~A.*#1.*main.*" "Verify in in-charge A::~A"
|
||||
+gdb_continue_to_breakpoint "First line ~A"
|
||||
+gdb_test "bt" "#0.*~A.*#1.*~B.*#2.*main.*" "Verify in not-in-charge A::~A"
|
||||
+
|
||||
+
|
||||
+# Verify that we can break by line number in a constructor and find
|
||||
+# both occurrences
|
||||
+runto_main
|
||||
+gdb_test "break 'A::A()'" "" "break in constructor A 2"
|
||||
+gdb_continue_to_breakpoint "First line A"
|
||||
+set second_line [gdb_get_line_number "Second line A"]
|
||||
+# " (2 locations)" is displayed depending on G++ version.
|
||||
+gdb_test "break $second_line" "Breakpoint .*, line $second_line\\..*" "break by line in constructor"
|
||||
+gdb_continue_to_breakpoint "Second line A"
|
||||
+gdb_test "bt" "#0.*A.*#1.*main.*" "Verify in in-charge A::A second line"
|
||||
+gdb_continue_to_breakpoint "Second line A"
|
||||
+gdb_test "bt" "#0.*A.*#1.*B.*#2.*main.*" "Verify in not-in-charge A::A second line"
|
||||
+
|
||||
+# Verify that we can break by line number in a destructor and find
|
||||
+# both occurrences
|
||||
+gdb_test "break 'A::~A()'" "" "break in constructor ~A 2"
|
||||
+gdb_continue_to_breakpoint "First line ~A"
|
||||
+set second_line_dtor [gdb_get_line_number "Second line ~A"]
|
||||
+# " (2 locations)" is displayed depending on G++ version.
|
||||
+gdb_test "break $second_line_dtor" "Breakpoint .*, line $second_line_dtor\\..*" "break by line in destructor"
|
||||
+gdb_continue_to_breakpoint "Second line ~A"
|
||||
+gdb_test "bt" "#0.*A.*#1.*main.*" "Verify in in-charge A::~A second line"
|
||||
+# FIXME: Analyse this case better.
|
||||
+gdb_continue_to_breakpoint "Second line ~A"
|
||||
+gdb_test "bt" "#0.*A.*#1.*main.*" "Verify in A::~A second line #2"
|
||||
+gdb_continue_to_breakpoint "Second line ~A"
|
||||
+gdb_test "bt" "#0.*A.*#1.*B.*#2.*main.*" "Verify in not-in-charge A::~A second line"
|
||||
+
|
||||
+
|
||||
+# Test now the $delete destructors.
|
||||
+
|
||||
+gdb_load ${binfile}
|
||||
+runto_main
|
||||
+
|
||||
+set first_line_dtor [gdb_get_line_number "First line ~C"]
|
||||
+set define_line_dtor [gdb_get_line_number "Destructor C"]
|
||||
+# Break on the various forms of the C::~C destructor
|
||||
+# " ([23] locations)" is displayed depending on G++ version.
|
||||
+gdb_test "break C\:\:~C" "Breakpoint .*: C::~C\\. \\(2 locations\\)" "breaking on C::~C"
|
||||
+gdb_continue_to_breakpoint "First line ~C"
|
||||
+
|
||||
+# Verify that we can break by line number in a destructor and find
|
||||
+# the $delete occurence
|
||||
+
|
||||
+gdb_load ${binfile}
|
||||
+delete_breakpoints
|
||||
+
|
||||
+# " (3 locations)" is displayed depending on G++ version.
|
||||
+gdb_test "break $first_line_dtor" "Breakpoint .*, line $first_line_dtor\\..*" "break by line in destructor"
|
||||
+
|
||||
+# Run to `main' where we begin our tests.
|
||||
+# Set the breakpoints first to test PIE multiple-PC BREAKPOINT_RE_SET.
|
||||
+# RUNTO_MAIN or RUNTO MAIN are not usable here as it runs DELETE_BREAKPOINTS.
|
||||
+
|
||||
+if ![gdb_breakpoint main] {
|
||||
+ gdb_suppress_tests
|
||||
+}
|
||||
+gdb_run_cmd
|
||||
+set test "running to main"
|
||||
+gdb_test_multiple "" $test {
|
||||
+ -re "Breakpoint \[0-9\]*, main .*$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+gdb_continue_to_breakpoint "First line ~C"
|
@ -1,101 +0,0 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Elena Zannoni <ezannoni@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-test-movedir-20050125.patch
|
||||
|
||||
;; Fix to support executable moving
|
||||
;;=fedoratest
|
||||
|
||||
2005-01-25 Elena Zannoni <ezannoni@redhat.com>
|
||||
|
||||
* gdb.base/move-dir.exp: New test.
|
||||
* gdb.base/move-dir.c: Ditto.
|
||||
* gdb.base/move-dir.h: Ditto.
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/move-dir.c b/gdb/testsuite/gdb.base/move-dir.c
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/move-dir.c
|
||||
@@ -0,0 +1,9 @@
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include "move-dir.h"
|
||||
+
|
||||
+int main() {
|
||||
+ const char* hw = "hello world.";
|
||||
+ printf ("%s\n", hw);;
|
||||
+ other();
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/move-dir.exp b/gdb/testsuite/gdb.base/move-dir.exp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/move-dir.exp
|
||||
@@ -0,0 +1,57 @@
|
||||
+# Copyright 2005
|
||||
+# Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 2 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program; if not, write to the Free Software
|
||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+
|
||||
+set testfile "move-dir"
|
||||
+set srcfile ${testfile}.c
|
||||
+set incfile ${testfile}.h
|
||||
+set binfile [standard_output_file ${testfile}]
|
||||
+
|
||||
+set testdir [standard_output_file incdir]
|
||||
+
|
||||
+remote_exec build "mkdir $testdir"
|
||||
+remote_exec build "cp ${srcdir}/${subdir}/${srcfile} [standard_output_file ${srcfile}]"
|
||||
+remote_exec build "cp ${srcdir}/${subdir}/${incfile} [standard_output_file ${incfile}]"
|
||||
+
|
||||
+set additional_flags "additional_flags=-I${subdir}/incdir"
|
||||
+
|
||||
+if { [gdb_compile [standard_output_file ${srcfile}] "${binfile}" executable [list debug $additional_flags]] != "" } {
|
||||
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
|
||||
+}
|
||||
+
|
||||
+# Create and source the file that provides information about the compiler
|
||||
+# used to compile the test case.
|
||||
+
|
||||
+if [get_compiler_info ${binfile}] {
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+set oldtimeout $timeout
|
||||
+set timeout [expr "$timeout + 60"]
|
||||
+
|
||||
+# Start with a fresh gdb.
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_test "cd ../.." "" ""
|
||||
+gdb_load ${binfile}
|
||||
+gdb_test "list main" ".*hw.*other.*" "found main"
|
||||
+gdb_test "list other" ".*ostring.*" "found include file"
|
||||
+
|
||||
+
|
||||
+set timeout $oldtimeout
|
||||
+return 0
|
||||
diff --git a/gdb/testsuite/gdb.base/move-dir.h b/gdb/testsuite/gdb.base/move-dir.h
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/move-dir.h
|
||||
@@ -0,0 +1,6 @@
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
+void other() {
|
||||
+ const char* ostring = "other";
|
||||
+ printf ("%s\n", ostring);;
|
||||
+}
|
@ -1,253 +0,0 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Jeff Johnston <jjohnstn@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-threaded-watchpoints2-20050225.patch
|
||||
|
||||
;; Test sibling threads to set threaded watchpoints for x86 and x86-64
|
||||
;;=fedoratest
|
||||
|
||||
2005-02-28 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* config/i386/nm-linux.h: Change dr register routines to
|
||||
accept a ptid_t first argument. Change all calling macros
|
||||
to default the inferior_ptid for the first argument.
|
||||
(i386_linux_insert_watchpoint): New prototype.
|
||||
(i386_linux_remove_watchpoint, i386_linux_insert_hw_breakpoint): Ditto.
|
||||
(i386_linux_remove_hw_breakpoint): Ditto.
|
||||
(target_insert_watchpoint, target_remove_watchpoint): Undef and
|
||||
override.
|
||||
(target_insert_hw_breakpoint, target_remove_hw_breakpoint): Ditto.
|
||||
* config/i386/nm-linux64.h: Ditto except add amd64 versions of
|
||||
the watchpoint/hw-breakpoint insert/remove routines.
|
||||
* i386-nat.c: Include "inferior.h" to define inferior_ptid.
|
||||
* i386-linux-nat.c: Change all dr get/set routines to accept
|
||||
ptid_t as first argument and to use this argument to determine
|
||||
the tid for PTRACE.
|
||||
(i386_linux_set_debug_regs_for_thread): New function.
|
||||
(i386_linux_sync_debug_registers_callback): Ditto.
|
||||
(i386_linux_sync_debug_registers_across_threads): Ditto.
|
||||
(i386_linux_insert_watchpoint, i386_linux_remove_watchpoint): Ditto.
|
||||
(i386_linux_hw_breakpoint, i386_linux_remove_hw_breakpoint): Ditto.
|
||||
(i386_linux_new_thread): Ditto.
|
||||
(_initialize_i386_linux_nat): Ditto.
|
||||
* amd64-linux-nat.c: Change all dr get/set routines to accept
|
||||
ptid_t as first argument and to use this argument to determine
|
||||
the tid for PTRACE.
|
||||
(amd64_linux_set_debug_regs_for_thread): New function.
|
||||
(amd64_linux_sync_debug_registers_callback): Ditto.
|
||||
(amd64_linux_sync_debug_registers_across_threads): Ditto.
|
||||
(amd64_linux_insert_watchpoint, amd64_linux_remove_watchpoint): Ditto.
|
||||
(amd64_linux_hw_breakpoint, amd64_linux_remove_hw_breakpoint): Ditto.
|
||||
(amd64_linux_new_thread): Ditto.
|
||||
(_initialize_amd64_linux_nat): Register linux new thread observer.
|
||||
* testsuite/gdb.threads/watchthreads-threaded.c: New test case.
|
||||
* testsuite/gdb.threads/watchthreads-threaded.exp: Ditto.
|
||||
|
||||
[ With recent upstream GDB (6.8) reduced only to the testcase. ]
|
||||
|
||||
[ It was called watchthreads2.{exp,c} before but it conflicted with FSF GDB new
|
||||
testcase of the same name. ]
|
||||
|
||||
FIXME: The testcase does not expects multiple watchpoints hits per one stop.
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.threads/watchthreads-threaded.c b/gdb/testsuite/gdb.threads/watchthreads-threaded.c
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/watchthreads-threaded.c
|
||||
@@ -0,0 +1,65 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 2 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program; if not, write to the Free Software
|
||||
+ Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
+ Boston, MA 02111-1307, USA.
|
||||
+
|
||||
+ This file is copied from schedlock.c. */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+#include <unistd.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <pthread.h>
|
||||
+
|
||||
+void *thread_function(void *arg); /* Pointer to function executed by each thread */
|
||||
+
|
||||
+#define NUM 5
|
||||
+
|
||||
+unsigned int args[NUM+1];
|
||||
+
|
||||
+int main() {
|
||||
+ int res;
|
||||
+ pthread_t threads[NUM];
|
||||
+ void *thread_result;
|
||||
+ long i;
|
||||
+
|
||||
+ for (i = 0; i < NUM; i++)
|
||||
+ {
|
||||
+ args[i] = 1; /* Init value. */
|
||||
+ res = pthread_create(&threads[i],
|
||||
+ NULL,
|
||||
+ thread_function,
|
||||
+ (void *) i);
|
||||
+ }
|
||||
+
|
||||
+ args[i] = 1;
|
||||
+ thread_function ((void *) i);
|
||||
+
|
||||
+ exit(EXIT_SUCCESS);
|
||||
+}
|
||||
+
|
||||
+void *thread_function(void *arg) {
|
||||
+ int my_number = (long) arg;
|
||||
+ int *myp = (int *) &args[my_number];
|
||||
+
|
||||
+ /* Don't run forever. Run just short of it :) */
|
||||
+ while (*myp > 0)
|
||||
+ {
|
||||
+ (*myp) ++; usleep (1); /* Loop increment. */
|
||||
+ }
|
||||
+
|
||||
+ pthread_exit(NULL);
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.threads/watchthreads-threaded.exp b/gdb/testsuite/gdb.threads/watchthreads-threaded.exp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/watchthreads-threaded.exp
|
||||
@@ -0,0 +1,126 @@
|
||||
+# This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+# Copyright 2005 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 2 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program; if not, write to the Free Software
|
||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+
|
||||
+# Check that GDB can support multiple watchpoints across threads.
|
||||
+
|
||||
+# This test verifies that a watchpoint is detected in the proper thread
|
||||
+# so the test is only meaningful on a system with hardware watchpoints.
|
||||
+if [target_info exists gdb,no_hardware_watchpoints] {
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+set testfile "watchthreads-threaded"
|
||||
+set srcfile ${testfile}.c
|
||||
+set binfile [standard_output_file ${testfile}]
|
||||
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load ${binfile}
|
||||
+
|
||||
+gdb_test "set can-use-hw-watchpoints 1" "" ""
|
||||
+
|
||||
+#
|
||||
+# Run to `main' where we begin our tests.
|
||||
+#
|
||||
+
|
||||
+if ![runto_main] then {
|
||||
+ gdb_suppress_tests
|
||||
+}
|
||||
+
|
||||
+set args_2 0
|
||||
+set args_3 0
|
||||
+
|
||||
+gdb_breakpoint "thread_function"
|
||||
+gdb_continue_to_breakpoint "thread_function"
|
||||
+gdb_test "disable 2" ""
|
||||
+
|
||||
+gdb_test_multiple "p args\[2\]" "get initial args2" {
|
||||
+ -re "\\\$\[0-9\]* = (.*)$gdb_prompt $" {
|
||||
+ set init_args_2 $expect_out(1,string)
|
||||
+ pass "get initial args2"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+gdb_test_multiple "p args\[3\]" "get initial args3" {
|
||||
+ -re "\\\$\[0-9\]* = (.*)$gdb_prompt $" {
|
||||
+ set init_args_3 $expect_out(1,string)
|
||||
+ pass "get initial args3"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+set args_2 $init_args_2
|
||||
+set args_3 $init_args_3
|
||||
+
|
||||
+# Watch values that will be modified by distinct threads.
|
||||
+gdb_test "watch args\[2\]" "Hardware watchpoint 3: args\\\[2\\\]"
|
||||
+gdb_test "watch args\[3\]" "Hardware watchpoint 4: args\\\[3\\\]"
|
||||
+
|
||||
+set init_line [expr [gdb_get_line_number "Init value"]+1]
|
||||
+set inc_line [gdb_get_line_number "Loop increment"]
|
||||
+
|
||||
+# Loop and continue to allow both watchpoints to be triggered.
|
||||
+for {set i 0} {$i < 30} {incr i} {
|
||||
+ set test_flag 0
|
||||
+ gdb_test_multiple "continue" "threaded watch loop" {
|
||||
+ -re "Hardware watchpoint 3: args\\\[2\\\].*Old value = 0.*New value = 1.*main \\\(\\\) at .*watchthreads-threaded.c:$init_line.*$gdb_prompt $"
|
||||
+ { set args_2 1; set test_flag 1 }
|
||||
+ -re "Hardware watchpoint 4: args\\\[3\\\].*Old value = 0.*New value = 1.*main \\\(\\\) at .*watchthreads-threaded.c:$init_line.*$gdb_prompt $"
|
||||
+ { set args_3 1; set test_flag 1 }
|
||||
+ -re "Hardware watchpoint 3: args\\\[2\\\].*Old value = $args_2.*New value = [expr $args_2+1].*thread_function \\\(arg=0x2\\\) at .*watchthreads-threaded.c:$inc_line.*$gdb_prompt $"
|
||||
+ { set args_2 [expr $args_2+1]; set test_flag 1 }
|
||||
+ -re "Hardware watchpoint 4: args\\\[3\\\].*Old value = $args_3.*New value = [expr $args_3+1].*thread_function \\\(arg=0x3\\\) at .*watchthreads-threaded.c:$inc_line.*$gdb_prompt $"
|
||||
+ { set args_3 [expr $args_3+1]; set test_flag 1 }
|
||||
+ }
|
||||
+ # If we fail above, don't bother continuing loop
|
||||
+ if { $test_flag == 0 } {
|
||||
+ set i 30;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# Print success message if loop succeeded.
|
||||
+if { $test_flag == 1 } {
|
||||
+ pass "threaded watch loop"
|
||||
+}
|
||||
+
|
||||
+# Verify that we hit first watchpoint in child thread.
|
||||
+set message "watchpoint on args\[2\] hit in thread"
|
||||
+if { $args_2 > 1 } {
|
||||
+ pass $message
|
||||
+} else {
|
||||
+ fail $message
|
||||
+}
|
||||
+
|
||||
+# Verify that we hit second watchpoint in child thread.
|
||||
+set message "watchpoint on args\[3\] hit in thread"
|
||||
+if { $args_3 > 1 } {
|
||||
+ pass $message
|
||||
+} else {
|
||||
+ fail $message
|
||||
+}
|
||||
+
|
||||
+# Verify that all watchpoint hits are accounted for.
|
||||
+set message "combination of threaded watchpoints = 30 + initial values"
|
||||
+if { [expr $args_2+$args_3] == [expr [expr 30+$init_args_2]+$init_args_3] } {
|
||||
+ pass $message
|
||||
+} else {
|
||||
+ fail $message
|
||||
+}
|
@ -44,7 +44,7 @@ glibc-debuginfo-2.7-2.x86_64: /usr/lib/debug/lib64/libc.so.6.debug:
|
||||
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
|
||||
--- a/gdb/printcmd.c
|
||||
+++ b/gdb/printcmd.c
|
||||
@@ -1301,6 +1301,10 @@ process_print_command_args (const char *args, value_print_options *print_opts,
|
||||
@@ -1300,6 +1300,10 @@ process_print_command_args (const char *args, value_print_options *print_opts,
|
||||
|
||||
if (exp != nullptr && *exp)
|
||||
{
|
||||
|
@ -1,42 +0,0 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.6-buildid-locate-rpm-scl.patch
|
||||
|
||||
;; [SCL] Skip deprecated .gdb_index warning for Red Hat built files (BZ 953585).
|
||||
;;=push+jan
|
||||
|
||||
warning: Skipping deprecated .gdb_index section
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=953585
|
||||
|
||||
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
|
||||
--- a/gdb/dwarf2/read.c
|
||||
+++ b/gdb/dwarf2/read.c
|
||||
@@ -2797,6 +2797,16 @@ read_gdb_index_from_buffer (const char *filename,
|
||||
"set use-deprecated-index-sections on". */
|
||||
if (version < 6 && !deprecated_ok)
|
||||
{
|
||||
+#ifdef GDB_INDEX_VERIFY_VENDOR
|
||||
+ extern int rpm_verify_vendor (const char *filename);
|
||||
+
|
||||
+ /* Red Hat Developer Toolset exception. */
|
||||
+ if (rpm_verify_vendor (filename))
|
||||
+ {}
|
||||
+ else
|
||||
+ {
|
||||
+
|
||||
+#endif
|
||||
static int warning_printed = 0;
|
||||
if (!warning_printed)
|
||||
{
|
||||
@@ -2808,6 +2818,10 @@ to use the section anyway."),
|
||||
warning_printed = 1;
|
||||
}
|
||||
return 0;
|
||||
+#ifdef GDB_INDEX_VERIFY_VENDOR
|
||||
+
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
/* Version 7 indices generated by gold refer to the CU for a symbol instead
|
||||
of the TU (for symbols coming from TUs),
|
@ -1,8 +1,17 @@
|
||||
Index: gdb-9.1/gdb/build-id.c
|
||||
===================================================================
|
||||
--- gdb-9.1.orig/gdb/build-id.c
|
||||
+++ gdb-9.1/gdb/build-id.c
|
||||
@@ -861,19 +861,17 @@ missing_rpm_enlist_1 (const char *filena
|
||||
From 444f438fe775a9480b93dc7d63418e0e169b4fbd Mon Sep 17 00:00:00 2001
|
||||
From: Tom de Vries <tdevries@suse.de>
|
||||
Date: Fri, 21 Apr 2023 09:08:03 +0200
|
||||
Subject: [PATCH 1/5] gdb-6.6-buildid-locate-rpm-suse.patch
|
||||
|
||||
---
|
||||
gdb/build-id.c | 71 +++++++++-----------------------------------------
|
||||
1 file changed, 13 insertions(+), 58 deletions(-)
|
||||
|
||||
diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
index 86dfc8409b5..29aa10d8225 100644
|
||||
--- a/gdb/build-id.c
|
||||
+++ b/gdb/build-id.c
|
||||
@@ -863,10 +863,8 @@ missing_rpm_enlist_1 (const char *filename, int verify_vendor)
|
||||
#endif
|
||||
{
|
||||
Header h;
|
||||
@ -14,11 +23,10 @@ Index: gdb-9.1/gdb/build-id.c
|
||||
rpmdbMatchIterator mi_debuginfo;
|
||||
|
||||
h = rpmdbNextIterator_p (mi);
|
||||
if (h == NULL)
|
||||
break;
|
||||
@@ -875,7 +873,9 @@ missing_rpm_enlist_1 (const char *filename, int verify_vendor)
|
||||
|
||||
/* Verify the debuginfo file is not already installed. */
|
||||
|
||||
- /* Verify the debuginfo file is not already installed. */
|
||||
-
|
||||
- debuginfo = headerFormat_p (h, "%{sourcerpm}-debuginfo.%{arch}",
|
||||
+ /* The allocated memory gets utilized below for MISSING_RPM_HASH. */
|
||||
+ debuginfo = headerFormat_p (h,
|
||||
@ -26,7 +34,7 @@ Index: gdb-9.1/gdb/build-id.c
|
||||
&err);
|
||||
if (!debuginfo)
|
||||
{
|
||||
@@ -881,60 +879,19 @@ missing_rpm_enlist_1 (const char *filena
|
||||
@@ -883,60 +883,19 @@ missing_rpm_enlist_1 (const char *filename, int verify_vendor)
|
||||
err);
|
||||
continue;
|
||||
}
|
||||
@ -65,7 +73,7 @@ Index: gdb-9.1/gdb/build-id.c
|
||||
+ /* Verify the debuginfo file is not already installed. */
|
||||
/* RPMDBI_PACKAGES requires keylen == sizeof (int). */
|
||||
/* RPMDBI_LABEL is an interface for NVR-based dbiFindByLabel(). */
|
||||
mi_debuginfo = rpmtsInitIterator_p (ts, (rpmTag) RPMDBI_LABEL, debuginfo, 0);
|
||||
mi_debuginfo = rpmtsInitIterator_p (ts, (rpmDbiTagVal) RPMDBI_LABEL, debuginfo, 0);
|
||||
- xfree (debuginfo);
|
||||
if (mi_debuginfo)
|
||||
{
|
||||
@ -89,23 +97,23 @@ Index: gdb-9.1/gdb/build-id.c
|
||||
/* Base package name for `debuginfo-install'. We do not use the
|
||||
`yum' command directly as the line
|
||||
yum --enablerepo='*debug*' install NAME-debuginfo.ARCH
|
||||
@@ -1076,10 +1033,7 @@ missing_rpm_list_print (void)
|
||||
@@ -1085,10 +1044,7 @@ missing_rpm_list_print (void)
|
||||
missing_rpm_list_entries = 0;
|
||||
|
||||
printf_unfiltered (_("Missing separate debuginfos, use: %s"),
|
||||
gdb_printf (_("Missing separate debuginfos, use: %s"),
|
||||
-#ifdef DNF_DEBUGINFO_INSTALL
|
||||
- "dnf "
|
||||
-#endif
|
||||
- "debuginfo-install");
|
||||
+ "zypper install");
|
||||
+ "zypper install");
|
||||
for (const char *el : array)
|
||||
{
|
||||
puts_unfiltered (" ");
|
||||
@@ -1287,13 +1241,12 @@ debug_print_missing (const char *binary,
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
_("Missing separate debuginfo for %s\n"), binary);
|
||||
gdb_printf (" %s", el);
|
||||
@@ -1295,13 +1251,12 @@ debug_print_missing (const char *binary, const char *debug)
|
||||
gdb_printf (gdb_stdlog,
|
||||
_("Missing separate debuginfo for %s\n"), binary);
|
||||
if (debug != NULL)
|
||||
- fprintf_unfiltered (gdb_stdlog, _("Try: %s %s\n"),
|
||||
- gdb_printf (gdb_stdlog, _("Try: %s %s\n"),
|
||||
-#ifdef DNF_DEBUGINFO_INSTALL
|
||||
- "dnf"
|
||||
-#else
|
||||
@ -114,10 +122,15 @@ Index: gdb-9.1/gdb/build-id.c
|
||||
- " --enablerepo='*debug*' install", debug);
|
||||
+ {
|
||||
+ const char *p = strrchr (debug, '/');
|
||||
+ fprintf_unfiltered (gdb_stdlog, _("Try: %s%.2s%.38s\"\n"),
|
||||
+ "zypper install -C \"debuginfo(build-id)=",
|
||||
+ p - 2, p + 1);
|
||||
+ gdb_printf (gdb_stdlog, _("Try: %s%.2s%.38s\"\n"),
|
||||
+ "zypper install -C \"debuginfo(build-id)=",
|
||||
+ p - 2, p + 1);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
base-commit: 91ac179279557e27e6a149cbb78e4052a348f109
|
||||
--
|
||||
2.35.3
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
From: Kevin Buettner <kevinb@redhat.com>
|
||||
Date: Wed, 22 Feb 2023 22:30:40 -0700
|
||||
Subject: gdb-6.6-buildid-locate-rpm.patch
|
||||
|
||||
;;=push+jan
|
||||
@ -232,6 +232,40 @@ diff --git a/gdb/aclocal.m4 b/gdb/aclocal.m4
|
||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001-2017 Free Software Foundation, Inc.
|
||||
diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
--- a/gdb/build-id.c
|
||||
+++ b/gdb/build-id.c
|
||||
@@ -771,10 +771,10 @@ missing_rpm_enlist_1 (const char *filename, int verify_vendor)
|
||||
static rpmts (*rpmtsCreate_p) (void);
|
||||
extern rpmts rpmtsFree(rpmts ts);
|
||||
static rpmts (*rpmtsFree_p) (rpmts ts);
|
||||
- extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
|
||||
+ extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmDbiTagVal rpmtag,
|
||||
const void * keyp, size_t keylen);
|
||||
static rpmdbMatchIterator (*rpmtsInitIterator_p) (const rpmts ts,
|
||||
- rpmTag rpmtag,
|
||||
+ rpmDbiTagVal rpmtag,
|
||||
const void *keyp,
|
||||
size_t keylen);
|
||||
#else /* !DLOPEN_LIBRPM */
|
||||
@@ -829,7 +829,7 @@ missing_rpm_enlist_1 (const char *filename, int verify_vendor)
|
||||
&& (rpmdbNextIterator_p = (Header (*) (rpmdbMatchIterator mi)) dlsym (h, "rpmdbNextIterator"))
|
||||
&& (rpmtsCreate_p = (rpmts (*) (void)) dlsym (h, "rpmtsCreate"))
|
||||
&& (rpmtsFree_p = (rpmts (*) (rpmts ts)) dlsym (h, "rpmtsFree"))
|
||||
- && (rpmtsInitIterator_p = (rpmdbMatchIterator (*) (const rpmts ts, rpmTag rpmtag, const void *keyp, size_t keylen)) dlsym (h, "rpmtsInitIterator"))))
|
||||
+ && (rpmtsInitIterator_p = (rpmdbMatchIterator (*) (const rpmts ts, rpmDbiTagVal rpmtag, const void *keyp, size_t keylen)) dlsym (h, "rpmtsInitIterator"))))
|
||||
{
|
||||
warning (_("Opened library \"%s\" is incompatible (%s), "
|
||||
"missing debuginfos notifications will not be displayed"),
|
||||
@@ -917,7 +917,7 @@ missing_rpm_enlist_1 (const char *filename, int verify_vendor)
|
||||
|
||||
/* RPMDBI_PACKAGES requires keylen == sizeof (int). */
|
||||
/* RPMDBI_LABEL is an interface for NVR-based dbiFindByLabel(). */
|
||||
- mi_debuginfo = rpmtsInitIterator_p (ts, (rpmTag) RPMDBI_LABEL, debuginfo, 0);
|
||||
+ mi_debuginfo = rpmtsInitIterator_p (ts, (rpmDbiTagVal) RPMDBI_LABEL, debuginfo, 0);
|
||||
xfree (debuginfo);
|
||||
if (mi_debuginfo)
|
||||
{
|
||||
diff --git a/gdb/config.in b/gdb/config.in
|
||||
--- a/gdb/config.in
|
||||
+++ b/gdb/config.in
|
||||
@ -258,7 +292,7 @@ diff --git a/gdb/config.in b/gdb/config.in
|
||||
diff --git a/gdb/configure b/gdb/configure
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -775,6 +775,11 @@ TARGET_OBS
|
||||
@@ -783,6 +783,11 @@ TARGET_OBS
|
||||
ENABLE_BFD_64_BIT_FALSE
|
||||
ENABLE_BFD_64_BIT_TRUE
|
||||
subdirs
|
||||
@ -270,7 +304,7 @@ diff --git a/gdb/configure b/gdb/configure
|
||||
GDB_DATADIR
|
||||
DEBUGDIR
|
||||
MAKEINFO_EXTRA_FLAGS
|
||||
@@ -880,6 +885,7 @@ with_gdb_datadir
|
||||
@@ -912,6 +917,7 @@ with_gdb_datadir
|
||||
with_relocated_sources
|
||||
with_auto_load_dir
|
||||
with_auto_load_safe_path
|
||||
@ -278,7 +312,7 @@ diff --git a/gdb/configure b/gdb/configure
|
||||
enable_targets
|
||||
enable_64_bit_bfd
|
||||
enable_gdbmi
|
||||
@@ -959,6 +965,8 @@ PKG_CONFIG_PATH
|
||||
@@ -992,6 +998,8 @@ PKG_CONFIG_PATH
|
||||
PKG_CONFIG_LIBDIR
|
||||
DEBUGINFOD_CFLAGS
|
||||
DEBUGINFOD_LIBS
|
||||
@ -286,8 +320,8 @@ diff --git a/gdb/configure b/gdb/configure
|
||||
+RPM_LIBS
|
||||
YACC
|
||||
YFLAGS
|
||||
XMKMF'
|
||||
@@ -1635,6 +1643,8 @@ Optional Packages:
|
||||
ZSTD_CFLAGS
|
||||
@@ -1678,6 +1686,8 @@ Optional Packages:
|
||||
do not restrict auto-loaded files locations
|
||||
--with-debuginfod Enable debuginfo lookups with debuginfod
|
||||
(auto/yes/no)
|
||||
@ -296,7 +330,7 @@ diff --git a/gdb/configure b/gdb/configure
|
||||
--with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
|
||||
--with-curses use the curses library instead of the termcap
|
||||
library
|
||||
@@ -1715,6 +1725,8 @@ Some influential environment variables:
|
||||
@@ -1761,6 +1771,8 @@ Some influential environment variables:
|
||||
C compiler flags for DEBUGINFOD, overriding pkg-config
|
||||
DEBUGINFOD_LIBS
|
||||
linker flags for DEBUGINFOD, overriding pkg-config
|
||||
@ -305,7 +339,7 @@ diff --git a/gdb/configure b/gdb/configure
|
||||
YACC The `Yet Another Compiler Compiler' implementation to use.
|
||||
Defaults to the first program found out of: `bison -y', `byacc',
|
||||
`yacc'.
|
||||
@@ -6634,6 +6646,494 @@ _ACEOF
|
||||
@@ -17848,6 +17860,494 @@ _ACEOF
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
|
||||
$as_echo "$with_auto_load_safe_path" >&6; }
|
||||
|
||||
@ -485,7 +519,7 @@ diff --git a/gdb/configure b/gdb/configure
|
||||
+extern Header rpmdbNextIterator(rpmdbMatchIterator mi);
|
||||
+extern rpmts rpmtsCreate(void);
|
||||
+extern rpmts rpmtsFree(rpmts ts);
|
||||
+extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
|
||||
+extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmDbiTagVal rpmtag,
|
||||
+ const void * keyp, size_t keylen);
|
||||
+
|
||||
+int
|
||||
@ -747,7 +781,7 @@ diff --git a/gdb/configure b/gdb/configure
|
||||
+extern Header rpmdbNextIterator(rpmdbMatchIterator mi);
|
||||
+extern rpmts rpmtsCreate(void);
|
||||
+extern rpmts rpmtsFree(rpmts ts);
|
||||
+extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
|
||||
+extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmDbiTagVal rpmtag,
|
||||
+ const void * keyp, size_t keylen);
|
||||
+
|
||||
+int
|
||||
@ -803,7 +837,7 @@ diff --git a/gdb/configure b/gdb/configure
|
||||
diff --git a/gdb/configure.ac b/gdb/configure.ac
|
||||
--- a/gdb/configure.ac
|
||||
+++ b/gdb/configure.ac
|
||||
@@ -153,6 +153,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escape_dir,
|
||||
@@ -160,6 +160,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escape_dir,
|
||||
[Directories safe to hold auto-loaded files.])
|
||||
AC_MSG_RESULT([$with_auto_load_safe_path])
|
||||
|
||||
@ -947,7 +981,7 @@ diff --git a/gdb/configure.ac b/gdb/configure.ac
|
||||
+extern Header rpmdbNextIterator(rpmdbMatchIterator mi);
|
||||
+extern rpmts rpmtsCreate(void);
|
||||
+extern rpmts rpmtsFree(rpmts ts);
|
||||
+extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
|
||||
+extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmDbiTagVal rpmtag,
|
||||
+ const void * keyp, size_t keylen);
|
||||
+ ]]), [
|
||||
+ LIBRPM_COMPAT=true
|
||||
@ -1006,15 +1040,15 @@ diff --git a/gdb/configure.ac b/gdb/configure.ac
|
||||
diff --git a/gdb/event-top.c b/gdb/event-top.c
|
||||
--- a/gdb/event-top.c
|
||||
+++ b/gdb/event-top.c
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "gdbsupport/gdb-sigmask.h"
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "async-event.h"
|
||||
#include "bt-utils.h"
|
||||
#include "pager.h"
|
||||
+#include "symfile.h"
|
||||
|
||||
/* readline include files. */
|
||||
#include "readline/readline.h"
|
||||
@@ -374,6 +375,8 @@ display_gdb_prompt (const char *new_prompt)
|
||||
@@ -391,6 +392,8 @@ display_gdb_prompt (const char *new_prompt)
|
||||
/* Reset the nesting depth used when trace-commands is set. */
|
||||
reset_command_nest_depth ();
|
||||
|
||||
@ -1023,7 +1057,7 @@ diff --git a/gdb/event-top.c b/gdb/event-top.c
|
||||
/* Do not call the python hook on an explicit prompt change as
|
||||
passed to this function, as this forms a secondary/local prompt,
|
||||
IE, displayed but not set. */
|
||||
@@ -800,7 +803,10 @@ command_line_handler (gdb::unique_xmalloc_ptr<char> &&rl)
|
||||
@@ -852,7 +855,10 @@ command_line_handler (gdb::unique_xmalloc_ptr<char> &&rl)
|
||||
command_handler (cmd);
|
||||
|
||||
if (ui->prompt_state != PROMPTED)
|
||||
@ -1038,7 +1072,7 @@ diff --git a/gdb/event-top.c b/gdb/event-top.c
|
||||
diff --git a/gdb/symfile.h b/gdb/symfile.h
|
||||
--- a/gdb/symfile.h
|
||||
+++ b/gdb/symfile.h
|
||||
@@ -342,6 +342,7 @@ extern void generic_load (const char *args, int from_tty);
|
||||
@@ -352,6 +352,7 @@ extern void generic_load (const char *args, int from_tty);
|
||||
/* build-id support. */
|
||||
extern struct bfd_build_id *build_id_addr_get (CORE_ADDR addr);
|
||||
extern void debug_print_missing (const char *binary, const char *debug);
|
||||
|
@ -14,7 +14,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1339862
|
||||
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
|
||||
--- a/gdb/solib-svr4.c
|
||||
+++ b/gdb/solib-svr4.c
|
||||
@@ -1250,14 +1250,28 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||
@@ -1321,14 +1321,28 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||
}
|
||||
|
||||
{
|
||||
@ -45,7 +45,7 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
|
||||
if (build_id != NULL)
|
||||
{
|
||||
char *name, *build_id_filename;
|
||||
@@ -1272,23 +1286,7 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||
@@ -1343,23 +1357,7 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||
xfree (name);
|
||||
}
|
||||
else
|
||||
|
@ -21,7 +21,7 @@ diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h
|
||||
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
|
||||
--- a/bfd/libbfd.h
|
||||
+++ b/bfd/libbfd.h
|
||||
@@ -120,7 +120,7 @@ static inline char *
|
||||
@@ -121,7 +121,7 @@ static inline char *
|
||||
bfd_strdup (const char *str)
|
||||
{
|
||||
size_t len = strlen (str) + 1;
|
||||
@ -59,8 +59,8 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
+show_build_id_verbose (struct ui_file *file, int from_tty,
|
||||
+ struct cmd_list_element *c, const char *value)
|
||||
+{
|
||||
+ fprintf_filtered (file, _("Verbosity level of the build-id locator is %s.\n"),
|
||||
+ value);
|
||||
+ gdb_printf (file, _("Verbosity level of the build-id locator is %s.\n"),
|
||||
+ value);
|
||||
+}
|
||||
+/* Locate NT_GNU_BUILD_ID and return its matching debug filename.
|
||||
+ FIXME: NOTE decoding should be unified with the BFD core notes decoding. */
|
||||
@ -517,9 +517,9 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
+
|
||||
if (separate_debug_file_debug)
|
||||
{
|
||||
- fprintf_unfiltered (gdb_stdlog, _(" Trying %s..."), link.c_str ());
|
||||
- gdb_printf (gdb_stdlog, _(" Trying %s..."), link.c_str ());
|
||||
- gdb_flush (gdb_stdlog);
|
||||
+ fprintf_unfiltered (gdb_stdlog, _(" Trying %s..."), orig_link.c_str ());
|
||||
+ gdb_printf (gdb_stdlog, _(" Trying %s..."), orig_link.c_str ());
|
||||
+ gdb_flush (gdb_stdout);
|
||||
}
|
||||
|
||||
@ -539,8 +539,8 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
- if (filename == NULL)
|
||||
- {
|
||||
- if (separate_debug_file_debug)
|
||||
- fprintf_unfiltered (gdb_stdlog,
|
||||
- _(" no, unable to compute real path\n"));
|
||||
- gdb_printf (gdb_stdlog,
|
||||
- _(" no, unable to compute real path\n"));
|
||||
+ if (seqno > 0)
|
||||
+ {
|
||||
+ /* There can be multiple build-id symlinks pointing to real files
|
||||
@ -559,7 +559,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
- if (debug_bfd == NULL)
|
||||
- {
|
||||
- if (separate_debug_file_debug)
|
||||
- fprintf_unfiltered (gdb_stdlog, _(" no, unable to open.\n"));
|
||||
- gdb_printf (gdb_stdlog, _(" no, unable to open.\n"));
|
||||
+ struct stat statbuf_trash;
|
||||
+
|
||||
+ /* `access' automatically dereferences LINK. */
|
||||
@ -583,7 +583,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
+ if (filename == NULL)
|
||||
+ {
|
||||
+ if (separate_debug_file_debug)
|
||||
+ fprintf_unfiltered (gdb_stdlog,
|
||||
+ gdb_printf (gdb_stdlog,
|
||||
+ _(" no, unable to compute real path\n"));
|
||||
+
|
||||
+ continue;
|
||||
@ -595,7 +595,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
+ if (debug_bfd == NULL)
|
||||
+ {
|
||||
+ if (separate_debug_file_debug)
|
||||
+ fprintf_unfiltered (gdb_stdlog, _(" no, unable to open.\n"));
|
||||
+ gdb_printf (gdb_stdlog, _(" no, unable to open.\n"));
|
||||
|
||||
- return {};
|
||||
+ continue;
|
||||
@ -604,8 +604,8 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
+ if (!build_id_verify (debug_bfd.get(), build_id_len, build_id))
|
||||
+ {
|
||||
+ if (separate_debug_file_debug)
|
||||
+ fprintf_unfiltered (gdb_stdlog,
|
||||
+ _(" no, build-id does not match.\n"));
|
||||
+ gdb_printf (gdb_stdlog,
|
||||
+ _(" no, build-id does not match.\n"));
|
||||
+
|
||||
+ continue;
|
||||
+ }
|
||||
@ -620,8 +620,8 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
+ if (ret_bfd != NULL)
|
||||
{
|
||||
if (separate_debug_file_debug)
|
||||
- fprintf_unfiltered (gdb_stdlog, _(" no, build-id does not match.\n"));
|
||||
+ fprintf_unfiltered (gdb_stdlog, _(" yes!\n"));
|
||||
- gdb_printf (gdb_stdlog, _(" no, build-id does not match.\n"));
|
||||
+ gdb_printf (gdb_stdlog, _(" yes!\n"));
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
@ -646,7 +646,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
}
|
||||
|
||||
- if (separate_debug_file_debug)
|
||||
- fprintf_unfiltered (gdb_stdlog, _(" yes!\n"));
|
||||
- gdb_printf (gdb_stdlog, _(" yes!\n"));
|
||||
+ if (link_return != NULL)
|
||||
+ {
|
||||
+ if (ret_bfd != NULL)
|
||||
@ -694,17 +694,16 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
if (debug_bfd != NULL)
|
||||
return debug_bfd;
|
||||
|
||||
@@ -174,7 +678,8 @@ build_id_to_bfd_suffix (size_t build_id_len, const bfd_byte *build_id,
|
||||
@@ -174,7 +678,7 @@ build_id_to_bfd_suffix (size_t build_id_len, const bfd_byte *build_id,
|
||||
if (!gdb_sysroot.empty ())
|
||||
{
|
||||
link = gdb_sysroot + link;
|
||||
- debug_bfd = build_id_to_debug_bfd_1 (link, build_id_len, build_id);
|
||||
+ debug_bfd = build_id_to_debug_bfd_1 (link, build_id_len, build_id,
|
||||
+ link_return);
|
||||
+ debug_bfd = build_id_to_debug_bfd_1 (link, build_id_len, build_id, NULL);
|
||||
if (debug_bfd != NULL)
|
||||
return debug_bfd;
|
||||
}
|
||||
@@ -183,30 +688,649 @@ build_id_to_bfd_suffix (size_t build_id_len, const bfd_byte *build_id,
|
||||
@@ -183,30 +687,655 @@ build_id_to_bfd_suffix (size_t build_id_len, const bfd_byte *build_id,
|
||||
return {};
|
||||
}
|
||||
|
||||
@ -1095,20 +1094,26 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
+ debug_flush_missing -> missing_rpm_list_print ...
|
||||
+
|
||||
+ For this reason, we make sure MISSING_RPM_LIST_ENTRIES is zero
|
||||
+ *before* calling any print function. */
|
||||
+ *before* calling any print function.
|
||||
+
|
||||
+ Note: kevinb/2023-02-22: The code below used to call
|
||||
+ puts_unfiltered() and printf_unfiltered(), but calls to these
|
||||
+ functions have been replaced by calls to gdb_printf(). The call
|
||||
+ chain shown above (probably) used to be the case at one time and
|
||||
+ hopefully something similar is still the case now that
|
||||
+ gdb_printf() is being used instead. */
|
||||
+ missing_rpm_list_entries = 0;
|
||||
+
|
||||
+ printf_unfiltered (_("Missing separate debuginfos, use: %s"),
|
||||
+ gdb_printf (_("Missing separate debuginfos, use: %s"),
|
||||
+#ifdef DNF_DEBUGINFO_INSTALL
|
||||
+ "dnf "
|
||||
+#endif
|
||||
+ "debuginfo-install");
|
||||
+ for (const char *el : array)
|
||||
+ {
|
||||
+ puts_unfiltered (" ");
|
||||
+ puts_unfiltered (el);
|
||||
+ gdb_printf (" %s", el);
|
||||
+ }
|
||||
+ puts_unfiltered ("\n");
|
||||
+ gdb_printf ("\n");
|
||||
+
|
||||
+ while (missing_rpm_list != NULL)
|
||||
+ {
|
||||
@ -1307,10 +1312,10 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
+ /* We do not collect and flush these messages as each such message
|
||||
+ already requires its own separate lines. */
|
||||
+
|
||||
+ fprintf_unfiltered (gdb_stdlog,
|
||||
+ _("Missing separate debuginfo for %s\n"), binary);
|
||||
+ gdb_printf (gdb_stdlog,
|
||||
+ _("Missing separate debuginfo for %s\n"), binary);
|
||||
+ if (debug != NULL)
|
||||
+ fprintf_unfiltered (gdb_stdlog, _("Try: %s %s\n"),
|
||||
+ gdb_printf (gdb_stdlog, _("Try: %s %s\n"),
|
||||
+#ifdef DNF_DEBUGINFO_INSTALL
|
||||
+ "dnf"
|
||||
+#else
|
||||
@ -1352,17 +1357,17 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
{
|
||||
const struct bfd_build_id *build_id;
|
||||
|
||||
- build_id = build_id_bfd_get (objfile->obfd);
|
||||
- build_id = build_id_bfd_get (objfile->obfd.get ());
|
||||
+ if (build_id_filename_return)
|
||||
+ *build_id_filename_return = NULL;
|
||||
+
|
||||
+ build_id = build_id_bfd_shdr_get (objfile->obfd);
|
||||
+ build_id = build_id_bfd_shdr_get (objfile->obfd.get ());
|
||||
if (build_id != NULL)
|
||||
{
|
||||
if (separate_debug_file_debug)
|
||||
@@ -214,8 +1338,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
|
||||
_("\nLooking for separate debug info (build-id) for "
|
||||
"%s\n"), objfile_name (objfile));
|
||||
@@ -214,8 +1343,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
|
||||
_("\nLooking for separate debug info (build-id) for "
|
||||
"%s\n"), objfile_name (objfile));
|
||||
|
||||
+ char *build_id_filename_cstr = NULL;
|
||||
gdb_bfd_ref_ptr abfd (build_id_to_debug_bfd (build_id->size,
|
||||
@ -1383,7 +1388,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
/* Prevent looping on a stripped .debug file. */
|
||||
if (abfd != NULL
|
||||
&& filename_cmp (bfd_get_filename (abfd.get ()),
|
||||
@@ -228,3 +1365,22 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
|
||||
@@ -228,3 +1370,22 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
|
||||
|
||||
return std::string ();
|
||||
}
|
||||
@ -1456,7 +1461,7 @@ diff --git a/gdb/build-id.h b/gdb/build-id.h
|
||||
diff --git a/gdb/coffread.c b/gdb/coffread.c
|
||||
--- a/gdb/coffread.c
|
||||
+++ b/gdb/coffread.c
|
||||
@@ -710,7 +710,8 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
|
||||
@@ -734,7 +734,8 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
|
||||
/* Try to add separate debug file if no symbols table found. */
|
||||
if (!objfile->has_partial_symbols ())
|
||||
{
|
||||
@ -1480,7 +1485,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
|
||||
#include "inferior.h"
|
||||
#include "infrun.h"
|
||||
#include "symtab.h"
|
||||
@@ -356,6 +360,8 @@ add_to_thread_list (asection *asect, asection *reg_sect)
|
||||
@@ -391,6 +395,8 @@ add_to_thread_list (asection *asect, asection *reg_sect)
|
||||
switch_to_thread (thr); /* Yes, make it current. */
|
||||
}
|
||||
|
||||
@ -1489,7 +1494,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
|
||||
/* Issue a message saying we have no core to debug, if FROM_TTY. */
|
||||
|
||||
static void
|
||||
@@ -392,19 +398,26 @@ core_file_command (const char *filename, int from_tty)
|
||||
@@ -427,12 +433,14 @@ core_file_command (const char *filename, int from_tty)
|
||||
static void
|
||||
locate_exec_from_corefile_build_id (bfd *abfd, int from_tty)
|
||||
{
|
||||
@ -1504,8 +1509,9 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
|
||||
+ = build_id_to_exec_bfd (build_id->size, build_id->data,
|
||||
+ &build_id_filename);
|
||||
|
||||
if (execbfd != nullptr)
|
||||
if (execbfd == nullptr)
|
||||
{
|
||||
@@ -460,7 +468,12 @@ locate_exec_from_corefile_build_id (bfd *abfd, int from_tty)
|
||||
exec_file_attach (bfd_get_filename (execbfd.get ()), from_tty);
|
||||
symbol_file_add_main (bfd_get_filename (execbfd.get ()),
|
||||
symfile_add_flag (from_tty ? SYMFILE_VERBOSE : 0));
|
||||
@ -1518,7 +1524,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
|
||||
}
|
||||
|
||||
/* See gdbcore.h. */
|
||||
@@ -1209,4 +1222,11 @@ _initialize_corelow ()
|
||||
@@ -1325,4 +1338,11 @@ _initialize_corelow ()
|
||||
maintenance_print_core_file_backed_mappings,
|
||||
_("Print core file's file-backed mappings."),
|
||||
&maintenanceprintlist);
|
||||
@ -1533,7 +1539,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
|
||||
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
|
||||
--- a/gdb/doc/gdb.texinfo
|
||||
+++ b/gdb/doc/gdb.texinfo
|
||||
@@ -21524,6 +21524,27 @@ information files.
|
||||
@@ -22037,6 +22037,27 @@ information files.
|
||||
|
||||
@end table
|
||||
|
||||
@ -1564,16 +1570,16 @@ diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
|
||||
diff --git a/gdb/dwarf2/index-cache.c b/gdb/dwarf2/index-cache.c
|
||||
--- a/gdb/dwarf2/index-cache.c
|
||||
+++ b/gdb/dwarf2/index-cache.c
|
||||
@@ -97,7 +97,7 @@ index_cache::store (dwarf2_per_objfile *per_objfile)
|
||||
@@ -101,7 +101,7 @@ index_cache::store (dwarf2_per_objfile *per_objfile)
|
||||
return;
|
||||
|
||||
/* Get build id of objfile. */
|
||||
- const bfd_build_id *build_id = build_id_bfd_get (obj->obfd);
|
||||
+ const bfd_build_id *build_id = build_id_bfd_shdr_get (obj->obfd);
|
||||
- const bfd_build_id *build_id = build_id_bfd_get (obj->obfd.get ());
|
||||
+ const bfd_build_id *build_id = build_id_bfd_shdr_get (obj->obfd.get ());
|
||||
if (build_id == nullptr)
|
||||
{
|
||||
index_cache_debug ("objfile %s has no build id",
|
||||
@@ -114,7 +114,8 @@ index_cache::store (dwarf2_per_objfile *per_objfile)
|
||||
@@ -118,7 +118,8 @@ index_cache::store (dwarf2_per_objfile *per_objfile)
|
||||
|
||||
if (dwz != nullptr)
|
||||
{
|
||||
@ -1586,16 +1592,16 @@ diff --git a/gdb/dwarf2/index-cache.c b/gdb/dwarf2/index-cache.c
|
||||
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
|
||||
--- a/gdb/dwarf2/read.c
|
||||
+++ b/gdb/dwarf2/read.c
|
||||
@@ -5476,7 +5476,7 @@ get_gdb_index_contents_from_section (objfile *obj, T *section_owner)
|
||||
@@ -5328,7 +5328,7 @@ get_gdb_index_contents_from_section (objfile *obj, T *section_owner)
|
||||
static gdb::array_view<const gdb_byte>
|
||||
get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_bfd *dwarf2_per_bfd)
|
||||
{
|
||||
- const bfd_build_id *build_id = build_id_bfd_get (obj->obfd);
|
||||
+ const bfd_build_id *build_id = build_id_bfd_shdr_get (obj->obfd);
|
||||
- const bfd_build_id *build_id = build_id_bfd_get (obj->obfd.get ());
|
||||
+ const bfd_build_id *build_id = build_id_bfd_shdr_get (obj->obfd.get ());
|
||||
if (build_id == nullptr)
|
||||
return {};
|
||||
|
||||
@@ -5489,7 +5489,7 @@ get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_bfd *dwarf2_per_bfd)
|
||||
@@ -5341,7 +5341,7 @@ get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_bfd *dwarf2_per_bfd)
|
||||
static gdb::array_view<const gdb_byte>
|
||||
get_gdb_index_contents_from_cache_dwz (objfile *obj, dwz_file *dwz)
|
||||
{
|
||||
@ -1607,7 +1613,7 @@ diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
|
||||
diff --git a/gdb/elfread.c b/gdb/elfread.c
|
||||
--- a/gdb/elfread.c
|
||||
+++ b/gdb/elfread.c
|
||||
@@ -1270,7 +1270,9 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
|
||||
@@ -1213,7 +1213,9 @@ elf_symfile_read_dwarf2 (struct objfile *objfile,
|
||||
&& objfile->separate_debug_objfile == NULL
|
||||
&& objfile->separate_debug_objfile_backlink == NULL)
|
||||
{
|
||||
@ -1618,21 +1624,22 @@ diff --git a/gdb/elfread.c b/gdb/elfread.c
|
||||
|
||||
if (debugfile.empty ())
|
||||
debugfile = find_separate_debug_file_by_debuglink (objfile);
|
||||
@@ -1285,7 +1287,7 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
|
||||
else
|
||||
@@ -1229,7 +1231,7 @@ elf_symfile_read_dwarf2 (struct objfile *objfile,
|
||||
{
|
||||
has_dwarf2 = false;
|
||||
- const struct bfd_build_id *build_id = build_id_bfd_get (objfile->obfd);
|
||||
+ const struct bfd_build_id *build_id = build_id_bfd_shdr_get (objfile->obfd);
|
||||
const struct bfd_build_id *build_id
|
||||
- = build_id_bfd_get (objfile->obfd.get ());
|
||||
+ = build_id_bfd_shdr_get (objfile->obfd.get ());
|
||||
const char *filename = bfd_get_filename (objfile->obfd.get ());
|
||||
|
||||
if (build_id != nullptr)
|
||||
{
|
||||
@@ -1310,6 +1312,10 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
|
||||
@@ -1256,6 +1258,11 @@ elf_symfile_read_dwarf2 (struct objfile *objfile,
|
||||
has_dwarf2 = true;
|
||||
}
|
||||
}
|
||||
+ /* Check if any separate debug info has been extracted out. */
|
||||
+ else if (bfd_get_section_by_name (objfile->obfd, ".gnu_debuglink")
|
||||
+ else if (bfd_get_section_by_name (objfile->obfd.get (),
|
||||
+ ".gnu_debuglink")
|
||||
+ != NULL)
|
||||
+ debug_print_missing (objfile_name (objfile), build_id_filename.get ());
|
||||
}
|
||||
@ -1641,7 +1648,7 @@ diff --git a/gdb/elfread.c b/gdb/elfread.c
|
||||
diff --git a/gdb/exec.c b/gdb/exec.c
|
||||
--- a/gdb/exec.c
|
||||
+++ b/gdb/exec.c
|
||||
@@ -238,7 +238,7 @@ validate_exec_file (int from_tty)
|
||||
@@ -237,7 +237,7 @@ validate_exec_file (int from_tty)
|
||||
current_exec_file = get_exec_file (0);
|
||||
|
||||
const bfd_build_id *exec_file_build_id
|
||||
@ -1650,7 +1657,7 @@ diff --git a/gdb/exec.c b/gdb/exec.c
|
||||
if (exec_file_build_id != nullptr)
|
||||
{
|
||||
/* Prepend the target prefix, to force gdb_bfd_open to open the
|
||||
@@ -251,7 +251,7 @@ validate_exec_file (int from_tty)
|
||||
@@ -250,7 +250,7 @@ validate_exec_file (int from_tty)
|
||||
if (abfd != nullptr)
|
||||
{
|
||||
const bfd_build_id *target_exec_file_build_id
|
||||
@ -1662,7 +1669,7 @@ diff --git a/gdb/exec.c b/gdb/exec.c
|
||||
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
|
||||
--- a/gdb/objfiles.h
|
||||
+++ b/gdb/objfiles.h
|
||||
@@ -769,6 +769,10 @@ struct objfile
|
||||
@@ -786,6 +786,10 @@ struct objfile
|
||||
bool skip_jit_symbol_lookup = false;
|
||||
};
|
||||
|
||||
@ -1676,24 +1683,24 @@ diff --git a/gdb/objfiles.h b/gdb/objfiles.h
|
||||
diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c
|
||||
--- a/gdb/python/py-objfile.c
|
||||
+++ b/gdb/python/py-objfile.c
|
||||
@@ -132,7 +132,7 @@ objfpy_get_build_id (PyObject *self, void *closure)
|
||||
@@ -158,7 +158,7 @@ objfpy_get_build_id (PyObject *self, void *closure)
|
||||
|
||||
try
|
||||
{
|
||||
- build_id = build_id_bfd_get (objfile->obfd);
|
||||
+ build_id = build_id_bfd_shdr_get (objfile->obfd);
|
||||
- build_id = build_id_bfd_get (objfile->obfd.get ());
|
||||
+ build_id = build_id_bfd_shdr_get (objfile->obfd.get ());
|
||||
}
|
||||
catch (const gdb_exception &except)
|
||||
{
|
||||
@@ -600,7 +600,7 @@ objfpy_lookup_objfile_by_build_id (const char *build_id)
|
||||
/* Don't return separate debug files. */
|
||||
if (objfile->separate_debug_objfile_backlink != NULL)
|
||||
continue;
|
||||
- obfd_build_id = build_id_bfd_get (objfile->obfd);
|
||||
+ obfd_build_id = build_id_bfd_shdr_get (objfile->obfd);
|
||||
if (obfd_build_id == NULL)
|
||||
continue;
|
||||
if (objfpy_build_id_matches (obfd_build_id, build_id))
|
||||
@@ -629,7 +629,7 @@ gdbpy_lookup_objfile (PyObject *self, PyObject *args, PyObject *kw)
|
||||
if (obfd == nullptr)
|
||||
return 0;
|
||||
|
||||
- const bfd_build_id *obfd_build_id = build_id_bfd_get (obfd);
|
||||
+ const bfd_build_id *obfd_build_id = build_id_bfd_shdr_get (obfd);
|
||||
if (obfd_build_id == nullptr)
|
||||
return 0;
|
||||
|
||||
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
|
||||
--- a/gdb/solib-svr4.c
|
||||
+++ b/gdb/solib-svr4.c
|
||||
@ -1703,9 +1710,9 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
|
||||
#include "probe.h"
|
||||
+#include "build-id.h"
|
||||
|
||||
static struct link_map_offsets *svr4_fetch_link_map_offsets (void);
|
||||
static int svr4_have_link_map_offsets (void);
|
||||
@@ -1248,9 +1249,51 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||
#include <map>
|
||||
|
||||
@@ -1319,9 +1320,51 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1763,19 +1770,19 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
|
||||
diff --git a/gdb/source.c b/gdb/source.c
|
||||
--- a/gdb/source.c
|
||||
+++ b/gdb/source.c
|
||||
@@ -1199,7 +1199,7 @@ open_source_file (struct symtab *s)
|
||||
srcpath += s->filename;
|
||||
@@ -1196,7 +1196,7 @@ open_source_file (struct symtab *s)
|
||||
}
|
||||
|
||||
- const struct bfd_build_id *build_id = build_id_bfd_get (ofp->obfd);
|
||||
+ const struct bfd_build_id *build_id = build_id_bfd_shdr_get (ofp->obfd);
|
||||
const struct bfd_build_id *build_id
|
||||
- = build_id_bfd_get (ofp->obfd.get ());
|
||||
+ = build_id_bfd_shdr_get (ofp->obfd.get ());
|
||||
|
||||
/* Query debuginfod for the source file. */
|
||||
if (build_id != nullptr && !srcpath.empty ())
|
||||
diff --git a/gdb/symfile.h b/gdb/symfile.h
|
||||
--- a/gdb/symfile.h
|
||||
+++ b/gdb/symfile.h
|
||||
@@ -332,12 +332,18 @@ bool expand_symtabs_matching
|
||||
@@ -342,12 +342,18 @@ bool expand_symtabs_matching
|
||||
void map_symbol_filenames (gdb::function_view<symbol_filename_ftype> fun,
|
||||
bool need_fullname);
|
||||
|
||||
@ -1797,7 +1804,7 @@ diff --git a/gdb/symfile.h b/gdb/symfile.h
|
||||
diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp
|
||||
--- a/gdb/testsuite/gdb.base/corefile.exp
|
||||
+++ b/gdb/testsuite/gdb.base/corefile.exp
|
||||
@@ -343,3 +343,33 @@ gdb_test_multiple "core-file $corefile" $test {
|
||||
@@ -349,3 +349,33 @@ gdb_test_multiple "core-file $corefile" $test {
|
||||
pass $test
|
||||
}
|
||||
}
|
||||
@ -1858,17 +1865,17 @@ diff --git a/gdb/testsuite/gdb.base/new-ui-pending-input.exp b/gdb/testsuite/gdb
|
||||
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
|
||||
--- a/gdb/testsuite/lib/gdb.exp
|
||||
+++ b/gdb/testsuite/lib/gdb.exp
|
||||
@@ -141,7 +141,8 @@ if ![info exists INTERNAL_GDBFLAGS] {
|
||||
@@ -217,7 +217,8 @@ if ![info exists INTERNAL_GDBFLAGS] {
|
||||
"-nw" \
|
||||
"-nx" \
|
||||
"-data-directory $BUILD_DATA_DIRECTORY" \
|
||||
{-iex "set height 0"} \
|
||||
- {-iex "set width 0"}]]
|
||||
+ {-iex "set width 0"} \
|
||||
+ {-iex "set build-id-verbose 0"}]]
|
||||
}
|
||||
|
||||
# The variable gdb_prompt is a regexp which matches the gdb prompt.
|
||||
@@ -2200,6 +2201,17 @@ proc default_gdb_start { } {
|
||||
set INTERNAL_GDBFLAGS [append_gdb_data_directory_option $INTERNAL_GDBFLAGS]
|
||||
}
|
||||
@@ -2349,6 +2350,17 @@ proc default_gdb_start { } {
|
||||
}
|
||||
}
|
||||
|
||||
@ -1889,7 +1896,7 @@ diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
|
||||
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
|
||||
--- a/gdb/testsuite/lib/mi-support.exp
|
||||
+++ b/gdb/testsuite/lib/mi-support.exp
|
||||
@@ -322,6 +322,16 @@ proc default_mi_gdb_start { args } {
|
||||
@@ -330,6 +330,16 @@ proc default_mi_gdb_start { { flags {} } } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
|
@ -1,94 +0,0 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.6-bz230000-power6-disassembly-test.patch
|
||||
|
||||
;; Testcase for PPC Power6/DFP instructions disassembly (BZ 230000).
|
||||
;;=fedoratest
|
||||
|
||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000
|
||||
|
||||
The original testcase
|
||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000#c1
|
||||
requires too recent GCC.
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-power6.exp b/gdb/testsuite/gdb.arch/powerpc-power6.exp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/powerpc-power6.exp
|
||||
@@ -0,0 +1,54 @@
|
||||
+# Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 2 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program; if not, write to the Free Software
|
||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+
|
||||
+# Test PowerPC Power6 instructions disassembly.
|
||||
+
|
||||
+if {![istarget "powerpc*-*-*"]} then {
|
||||
+ verbose "Skipping PowerPC Power6 instructions disassembly."
|
||||
+ return
|
||||
+}
|
||||
+
|
||||
+set testfile "powerpc-power6"
|
||||
+set srcfile ${testfile}.s
|
||||
+set objfile [standard_output_file ${testfile}.o]
|
||||
+
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
|
||||
+ untested "PowerPC prologue tests"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load ${objfile}
|
||||
+
|
||||
+# Disassemble the function.
|
||||
+
|
||||
+gdb_test "disass func" ":\tblr\r\n.*" "Basic disassembly"
|
||||
+
|
||||
+gdb_test "disass func" ":\tdcbzl *r8,r9\r\n.*" "Power5 disassembly dcbzl"
|
||||
+gdb_test "disass func" ":\tfrsqrtes *f10,f11\r\n.*" "Power5 disassembly frsqrtes"
|
||||
+gdb_test "disass func" ":\tdadd *f1,f2,f1\r\n.*" "Power6 disassembly dadd"
|
||||
+gdb_test "disass func" ":\tdaddq *f0,f2,f0\r\n.*" "Power6 disassembly daddq"
|
||||
+gdb_test "disass func" ":\tdsub *f1,f2,f1\r\n.*" "Power6 disassembly dsub"
|
||||
+gdb_test "disass func" ":\tdsubq *f0,f2,f0\r\n.*" "Power6 disassembly dsubq"
|
||||
+gdb_test "disass func" ":\tdmul *f1,f2,f1\r\n.*" "Power6 disassembly dmul"
|
||||
+gdb_test "disass func" ":\tdmulq *f0,f2,f0\r\n.*" "Power6 disassembly dmulq"
|
||||
+gdb_test "disass func" ":\tddiv *f1,f2,f1\r\n.*" "Power6 disassembly ddiv"
|
||||
+gdb_test "disass func" ":\tddivq *f0,f2,f0\r\n.*" "Power6 disassembly ddivq"
|
||||
+gdb_test "disass func" ":\tdcmpu *cr1,f2,f1\r\n.*" "Power6 disassembly dcmpu"
|
||||
+gdb_test "disass func" ":\tdcmpuq *cr1,f2,f0\r\n.*" "Power6 disassembly dcmpuq"
|
||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-power6.s b/gdb/testsuite/gdb.arch/powerpc-power6.s
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/powerpc-power6.s
|
||||
@@ -0,0 +1,16 @@
|
||||
+ .text
|
||||
+ .globl func
|
||||
+func:
|
||||
+ blr
|
||||
+ .long 0x7c284fec /* dcbzl r8,r9 */
|
||||
+ .long 0xed405834 /* frsqrtes f10,f11 */
|
||||
+ .long 0xec220804 /* dadd f1,f2,f1 */
|
||||
+ .long 0xfc020004 /* daddq f0,f2,f0 */
|
||||
+ .long 0xec220c04 /* dsub f1,f2,f1 */
|
||||
+ .long 0xfc020404 /* dsubq f0,f2,f0 */
|
||||
+ .long 0xec220844 /* dmul f1,f2,f1 */
|
||||
+ .long 0xfc020044 /* dmulq f0,f2,f0 */
|
||||
+ .long 0xec220c44 /* ddiv f1,f2,f1 */
|
||||
+ .long 0xfc020444 /* ddivq f0,f2,f0 */
|
||||
+ .long 0xec820d04 /* dcmpu cr1,f2,f1 */
|
||||
+ .long 0xfc820504 /* dcmpuq cr1,f2,f0 */
|
@ -72,7 +72,7 @@ diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.e
|
||||
}
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
|
||||
@@ -47,7 +47,8 @@ set dir2 [standard_output_file dir2.fileio.test]
|
||||
@@ -40,7 +40,8 @@ set dir2 [standard_output_file dir2.fileio.test]
|
||||
if {[file exists $dir2] && ![file writable $dir2]} {
|
||||
system "chmod +w $dir2"
|
||||
}
|
||||
@ -82,7 +82,7 @@ diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.e
|
||||
|
||||
set oldtimeout $timeout
|
||||
set timeout [expr "$timeout + 60"]
|
||||
@@ -89,7 +90,7 @@ gdb_test continue \
|
||||
@@ -81,7 +82,7 @@ gdb_test continue \
|
||||
|
||||
gdb_test "continue" ".*" ""
|
||||
|
||||
@ -91,7 +91,7 @@ diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.e
|
||||
|
||||
gdb_test continue \
|
||||
"Continuing\\..*open 5:.*EACCES$stop_msg" \
|
||||
@@ -276,9 +277,7 @@ gdb_test continue \
|
||||
@@ -268,9 +269,7 @@ gdb_test continue \
|
||||
gdb_exit
|
||||
|
||||
# Make dir2 writable again so rm -rf of a build tree Just Works.
|
||||
|
@ -1,374 +0,0 @@
|
||||
[gdb] Add gdb/syscalls/Makefile
|
||||
|
||||
Add a Makefile in gdb/syscalls that can be used to translate
|
||||
gdb/syscalls/*.xml.in into gdb/syscalls/*.xml.
|
||||
|
||||
Calling make reveals that bfin-linux.xml is missing, so add it.
|
||||
|
||||
Tested on x86_64-linux.
|
||||
|
||||
---
|
||||
gdb/syscalls/Makefile | 25 ++++
|
||||
gdb/syscalls/bfin-linux.xml | 323 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 348 insertions(+)
|
||||
|
||||
diff --git a/gdb/syscalls/Makefile b/gdb/syscalls/Makefile
|
||||
new file mode 100644
|
||||
index 00000000000..f9550f5a44d
|
||||
--- /dev/null
|
||||
+++ b/gdb/syscalls/Makefile
|
||||
@@ -0,0 +1,25 @@
|
||||
+# Copyright (C) 2022 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This file is part of GDB.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+# Generate .xml files from .xml.in files.
|
||||
+
|
||||
+FILES=$(shell ls *.xml.in | grep -v linux-defaults.xml.in | sed 's/\.in//')
|
||||
+
|
||||
+all:
|
||||
+ for f in $(FILES); do \
|
||||
+ xsltproc --output $$f apply-defaults.xsl $$f.in; \
|
||||
+ done
|
||||
diff --git a/gdb/syscalls/bfin-linux.xml b/gdb/syscalls/bfin-linux.xml
|
||||
new file mode 100644
|
||||
index 00000000000..e73923f8631
|
||||
--- /dev/null
|
||||
+++ b/gdb/syscalls/bfin-linux.xml
|
||||
@@ -0,0 +1,323 @@
|
||||
+<?xml version="1.0"?>
|
||||
+<!DOCTYPE syscalls_info SYSTEM "gdb-syscalls.dtd">
|
||||
+<!-- Copyright (C) 2010-2021 Free Software Foundation, Inc.
|
||||
+
|
||||
+ Copying and distribution of this file, with or without modification,
|
||||
+ are permitted in any medium without royalty provided the copyright
|
||||
+ notice and this notice are preserved. -->
|
||||
+<!-- This file was generated using the following file:
|
||||
+
|
||||
+ gawk '$2 ~ /^__NR_/ { gsub(/__NR_/,""); print " <syscall name=\"" $2 "\" number=\"" $3 "\"/>" }'
|
||||
+ /usr/src/linux/arch/blackfin/include/asm/unistd.h
|
||||
+
|
||||
+ The file mentioned above belongs to the Linux Kernel. -->
|
||||
+<syscalls_info>
|
||||
+ <syscall name="restart_syscall" number="0"/>
|
||||
+ <syscall name="exit" number="1" groups="process"/>
|
||||
+ <syscall name="fork" number="2" groups="process"/>
|
||||
+ <syscall name="read" number="3" groups="descriptor"/>
|
||||
+ <syscall name="write" number="4" groups="descriptor"/>
|
||||
+ <syscall name="open" number="5" groups="descriptor,file"/>
|
||||
+ <syscall name="close" number="6" groups="descriptor"/>
|
||||
+ <syscall name="creat" number="8" groups="descriptor,file"/>
|
||||
+ <syscall name="link" number="9" groups="file"/>
|
||||
+ <syscall name="unlink" number="10" groups="file"/>
|
||||
+ <syscall name="execve" number="11" groups="file,process"/>
|
||||
+ <syscall name="chdir" number="12" groups="file"/>
|
||||
+ <syscall name="time" number="13"/>
|
||||
+ <syscall name="mknod" number="14" groups="file"/>
|
||||
+ <syscall name="chmod" number="15" groups="file"/>
|
||||
+ <syscall name="chown" number="16" groups="file"/>
|
||||
+ <syscall name="lseek" number="19" groups="descriptor"/>
|
||||
+ <syscall name="getpid" number="20"/>
|
||||
+ <syscall name="mount" number="21" groups="file"/>
|
||||
+ <syscall name="setuid" number="23"/>
|
||||
+ <syscall name="getuid" number="24"/>
|
||||
+ <syscall name="stime" number="25"/>
|
||||
+ <syscall name="ptrace" number="26"/>
|
||||
+ <syscall name="alarm" number="27"/>
|
||||
+ <syscall name="pause" number="29" groups="signal"/>
|
||||
+ <syscall name="access" number="33" groups="file"/>
|
||||
+ <syscall name="nice" number="34"/>
|
||||
+ <syscall name="sync" number="36"/>
|
||||
+ <syscall name="kill" number="37" groups="signal"/>
|
||||
+ <syscall name="rename" number="38" groups="file"/>
|
||||
+ <syscall name="mkdir" number="39" groups="file"/>
|
||||
+ <syscall name="rmdir" number="40" groups="file"/>
|
||||
+ <syscall name="dup" number="41" groups="descriptor"/>
|
||||
+ <syscall name="pipe" number="42" groups="descriptor"/>
|
||||
+ <syscall name="times" number="43"/>
|
||||
+ <syscall name="brk" number="45" groups="memory"/>
|
||||
+ <syscall name="setgid" number="46"/>
|
||||
+ <syscall name="getgid" number="47"/>
|
||||
+ <syscall name="geteuid" number="49"/>
|
||||
+ <syscall name="getegid" number="50"/>
|
||||
+ <syscall name="acct" number="51" groups="file"/>
|
||||
+ <syscall name="umount2" number="52" groups="file"/>
|
||||
+ <syscall name="ioctl" number="54" groups="descriptor"/>
|
||||
+ <syscall name="fcntl" number="55" groups="descriptor"/>
|
||||
+ <syscall name="setpgid" number="57"/>
|
||||
+ <syscall name="umask" number="60"/>
|
||||
+ <syscall name="chroot" number="61" groups="file"/>
|
||||
+ <syscall name="ustat" number="62"/>
|
||||
+ <syscall name="dup2" number="63" groups="descriptor"/>
|
||||
+ <syscall name="getppid" number="64"/>
|
||||
+ <syscall name="getpgrp" number="65"/>
|
||||
+ <syscall name="setsid" number="66"/>
|
||||
+ <syscall name="sgetmask" number="68" groups="signal"/>
|
||||
+ <syscall name="ssetmask" number="69" groups="signal"/>
|
||||
+ <syscall name="setreuid" number="70"/>
|
||||
+ <syscall name="setregid" number="71"/>
|
||||
+ <syscall name="sethostname" number="74"/>
|
||||
+ <syscall name="setrlimit" number="75"/>
|
||||
+ <syscall name="getrusage" number="77"/>
|
||||
+ <syscall name="gettimeofday" number="78"/>
|
||||
+ <syscall name="settimeofday" number="79"/>
|
||||
+ <syscall name="getgroups" number="80"/>
|
||||
+ <syscall name="setgroups" number="81"/>
|
||||
+ <syscall name="symlink" number="83" groups="file"/>
|
||||
+ <syscall name="readlink" number="85" groups="file"/>
|
||||
+ <syscall name="reboot" number="88"/>
|
||||
+ <syscall name="munmap" number="91" groups="memory"/>
|
||||
+ <syscall name="truncate" number="92" groups="file"/>
|
||||
+ <syscall name="ftruncate" number="93" groups="descriptor"/>
|
||||
+ <syscall name="fchmod" number="94" groups="descriptor"/>
|
||||
+ <syscall name="fchown" number="95" groups="descriptor"/>
|
||||
+ <syscall name="getpriority" number="96"/>
|
||||
+ <syscall name="setpriority" number="97"/>
|
||||
+ <syscall name="statfs" number="99" groups="file"/>
|
||||
+ <syscall name="fstatfs" number="100" groups="descriptor"/>
|
||||
+ <syscall name="syslog" number="103"/>
|
||||
+ <syscall name="setitimer" number="104"/>
|
||||
+ <syscall name="getitimer" number="105"/>
|
||||
+ <syscall name="stat" number="106" groups="file"/>
|
||||
+ <syscall name="lstat" number="107" groups="file"/>
|
||||
+ <syscall name="fstat" number="108" groups="descriptor"/>
|
||||
+ <syscall name="vhangup" number="111"/>
|
||||
+ <syscall name="wait4" number="114" groups="process"/>
|
||||
+ <syscall name="sysinfo" number="116"/>
|
||||
+ <syscall name="fsync" number="118" groups="descriptor"/>
|
||||
+ <syscall name="clone" number="120" groups="process"/>
|
||||
+ <syscall name="setdomainname" number="121"/>
|
||||
+ <syscall name="uname" number="122"/>
|
||||
+ <syscall name="adjtimex" number="124"/>
|
||||
+ <syscall name="mprotect" number="125" groups="memory"/>
|
||||
+ <syscall name="init_module" number="128"/>
|
||||
+ <syscall name="delete_module" number="129"/>
|
||||
+ <syscall name="quotactl" number="131" groups="file"/>
|
||||
+ <syscall name="getpgid" number="132"/>
|
||||
+ <syscall name="fchdir" number="133" groups="descriptor"/>
|
||||
+ <syscall name="bdflush" number="134"/>
|
||||
+ <syscall name="personality" number="136"/>
|
||||
+ <syscall name="setfsuid" number="138"/>
|
||||
+ <syscall name="setfsgid" number="139"/>
|
||||
+ <syscall name="_llseek" number="140" groups="descriptor"/>
|
||||
+ <syscall name="getdents" number="141" groups="descriptor"/>
|
||||
+ <syscall name="flock" number="143" groups="descriptor"/>
|
||||
+ <syscall name="readv" number="145" groups="descriptor"/>
|
||||
+ <syscall name="writev" number="146" groups="descriptor"/>
|
||||
+ <syscall name="getsid" number="147"/>
|
||||
+ <syscall name="fdatasync" number="148" groups="descriptor"/>
|
||||
+ <syscall name="_sysctl" number="149"/>
|
||||
+ <syscall name="sched_setparam" number="154"/>
|
||||
+ <syscall name="sched_getparam" number="155"/>
|
||||
+ <syscall name="sched_setscheduler" number="156"/>
|
||||
+ <syscall name="sched_getscheduler" number="157"/>
|
||||
+ <syscall name="sched_yield" number="158"/>
|
||||
+ <syscall name="sched_get_priority_max" number="159"/>
|
||||
+ <syscall name="sched_get_priority_min" number="160"/>
|
||||
+ <syscall name="sched_rr_get_interval" number="161"/>
|
||||
+ <syscall name="nanosleep" number="162"/>
|
||||
+ <syscall name="mremap" number="163" groups="memory"/>
|
||||
+ <syscall name="setresuid" number="164"/>
|
||||
+ <syscall name="getresuid" number="165"/>
|
||||
+ <syscall name="nfsservctl" number="169"/>
|
||||
+ <syscall name="setresgid" number="170"/>
|
||||
+ <syscall name="getresgid" number="171"/>
|
||||
+ <syscall name="prctl" number="172"/>
|
||||
+ <syscall name="rt_sigreturn" number="173" groups="signal"/>
|
||||
+ <syscall name="rt_sigaction" number="174" groups="signal"/>
|
||||
+ <syscall name="rt_sigprocmask" number="175" groups="signal"/>
|
||||
+ <syscall name="rt_sigpending" number="176" groups="signal"/>
|
||||
+ <syscall name="rt_sigtimedwait" number="177" groups="signal"/>
|
||||
+ <syscall name="rt_sigqueueinfo" number="178" groups="signal"/>
|
||||
+ <syscall name="rt_sigsuspend" number="179" groups="signal"/>
|
||||
+ <syscall name="pread" number="180" groups="descriptor"/>
|
||||
+ <syscall name="pwrite" number="181" groups="descriptor"/>
|
||||
+ <syscall name="lchown" number="182" groups="file"/>
|
||||
+ <syscall name="getcwd" number="183" groups="file"/>
|
||||
+ <syscall name="capget" number="184"/>
|
||||
+ <syscall name="capset" number="185"/>
|
||||
+ <syscall name="sigaltstack" number="186" groups="signal"/>
|
||||
+ <syscall name="sendfile" number="187" groups="descriptor,network"/>
|
||||
+ <syscall name="vfork" number="190" groups="process"/>
|
||||
+ <syscall name="getrlimit" number="191"/>
|
||||
+ <syscall name="mmap2" number="192" groups="descriptor,memory"/>
|
||||
+ <syscall name="truncate64" number="193" groups="file"/>
|
||||
+ <syscall name="ftruncate64" number="194" groups="descriptor"/>
|
||||
+ <syscall name="stat64" number="195" groups="file"/>
|
||||
+ <syscall name="lstat64" number="196" groups="file"/>
|
||||
+ <syscall name="fstat64" number="197" groups="descriptor"/>
|
||||
+ <syscall name="chown32" number="198" groups="file"/>
|
||||
+ <syscall name="getuid32" number="199"/>
|
||||
+ <syscall name="getgid32" number="200"/>
|
||||
+ <syscall name="geteuid32" number="201"/>
|
||||
+ <syscall name="getegid32" number="202"/>
|
||||
+ <syscall name="setreuid32" number="203"/>
|
||||
+ <syscall name="setregid32" number="204"/>
|
||||
+ <syscall name="getgroups32" number="205"/>
|
||||
+ <syscall name="setgroups32" number="206"/>
|
||||
+ <syscall name="fchown32" number="207" groups="descriptor"/>
|
||||
+ <syscall name="setresuid32" number="208"/>
|
||||
+ <syscall name="getresuid32" number="209"/>
|
||||
+ <syscall name="setresgid32" number="210"/>
|
||||
+ <syscall name="getresgid32" number="211"/>
|
||||
+ <syscall name="lchown32" number="212" groups="file"/>
|
||||
+ <syscall name="setuid32" number="213"/>
|
||||
+ <syscall name="setgid32" number="214"/>
|
||||
+ <syscall name="setfsuid32" number="215"/>
|
||||
+ <syscall name="setfsgid32" number="216"/>
|
||||
+ <syscall name="pivot_root" number="217" groups="file"/>
|
||||
+ <syscall name="getdents64" number="220" groups="descriptor"/>
|
||||
+ <syscall name="fcntl64" number="221" groups="descriptor"/>
|
||||
+ <syscall name="gettid" number="224"/>
|
||||
+ <syscall name="readahead" number="225" groups="descriptor"/>
|
||||
+ <syscall name="setxattr" number="226" groups="file"/>
|
||||
+ <syscall name="lsetxattr" number="227" groups="file"/>
|
||||
+ <syscall name="fsetxattr" number="228" groups="descriptor"/>
|
||||
+ <syscall name="getxattr" number="229" groups="file"/>
|
||||
+ <syscall name="lgetxattr" number="230" groups="file"/>
|
||||
+ <syscall name="fgetxattr" number="231" groups="descriptor"/>
|
||||
+ <syscall name="listxattr" number="232" groups="file"/>
|
||||
+ <syscall name="llistxattr" number="233" groups="file"/>
|
||||
+ <syscall name="flistxattr" number="234" groups="descriptor"/>
|
||||
+ <syscall name="removexattr" number="235" groups="file"/>
|
||||
+ <syscall name="lremovexattr" number="236" groups="file"/>
|
||||
+ <syscall name="fremovexattr" number="237" groups="descriptor"/>
|
||||
+ <syscall name="tkill" number="238" groups="signal"/>
|
||||
+ <syscall name="sendfile64" number="239" groups="descriptor,network"/>
|
||||
+ <syscall name="futex" number="240"/>
|
||||
+ <syscall name="sched_setaffinity" number="241"/>
|
||||
+ <syscall name="sched_getaffinity" number="242"/>
|
||||
+ <syscall name="io_setup" number="245"/>
|
||||
+ <syscall name="io_destroy" number="246"/>
|
||||
+ <syscall name="io_getevents" number="247"/>
|
||||
+ <syscall name="io_submit" number="248"/>
|
||||
+ <syscall name="io_cancel" number="249"/>
|
||||
+ <syscall name="exit_group" number="252" groups="process"/>
|
||||
+ <syscall name="lookup_dcookie" number="253"/>
|
||||
+ <syscall name="bfin_spinlock" number="254"/>
|
||||
+ <syscall name="epoll_create" number="255" groups="descriptor"/>
|
||||
+ <syscall name="epoll_ctl" number="256" groups="descriptor"/>
|
||||
+ <syscall name="epoll_wait" number="257" groups="descriptor"/>
|
||||
+ <syscall name="set_tid_address" number="259"/>
|
||||
+ <syscall name="timer_create" number="260"/>
|
||||
+ <syscall name="timer_settime" number="261"/>
|
||||
+ <syscall name="timer_gettime" number="262"/>
|
||||
+ <syscall name="timer_getoverrun" number="263"/>
|
||||
+ <syscall name="timer_delete" number="264"/>
|
||||
+ <syscall name="clock_settime" number="265"/>
|
||||
+ <syscall name="clock_gettime" number="266"/>
|
||||
+ <syscall name="clock_getres" number="267"/>
|
||||
+ <syscall name="clock_nanosleep" number="268"/>
|
||||
+ <syscall name="statfs64" number="269" groups="file"/>
|
||||
+ <syscall name="fstatfs64" number="270" groups="descriptor"/>
|
||||
+ <syscall name="tgkill" number="271" groups="signal"/>
|
||||
+ <syscall name="utimes" number="272" groups="file"/>
|
||||
+ <syscall name="fadvise64_64" number="273" groups="descriptor"/>
|
||||
+ <syscall name="mq_open" number="278"/>
|
||||
+ <syscall name="mq_unlink" number="279"/>
|
||||
+ <syscall name="mq_timedsend" number="280"/>
|
||||
+ <syscall name="mq_timedreceive" number="281"/>
|
||||
+ <syscall name="mq_notify" number="282"/>
|
||||
+ <syscall name="mq_getsetattr" number="283"/>
|
||||
+ <syscall name="kexec_load" number="284"/>
|
||||
+ <syscall name="waitid" number="285" groups="process"/>
|
||||
+ <syscall name="add_key" number="286"/>
|
||||
+ <syscall name="request_key" number="287"/>
|
||||
+ <syscall name="keyctl" number="288"/>
|
||||
+ <syscall name="ioprio_set" number="289"/>
|
||||
+ <syscall name="ioprio_get" number="290"/>
|
||||
+ <syscall name="inotify_init" number="291" groups="descriptor"/>
|
||||
+ <syscall name="inotify_add_watch" number="292" groups="descriptor"/>
|
||||
+ <syscall name="inotify_rm_watch" number="293" groups="descriptor"/>
|
||||
+ <syscall name="openat" number="295" groups="descriptor,file"/>
|
||||
+ <syscall name="mkdirat" number="296" groups="descriptor,file"/>
|
||||
+ <syscall name="mknodat" number="297" groups="descriptor,file"/>
|
||||
+ <syscall name="fchownat" number="298" groups="descriptor,file"/>
|
||||
+ <syscall name="futimesat" number="299" groups="descriptor,file"/>
|
||||
+ <syscall name="fstatat64" number="300" groups="descriptor,file"/>
|
||||
+ <syscall name="unlinkat" number="301" groups="descriptor,file"/>
|
||||
+ <syscall name="renameat" number="302" groups="descriptor,file"/>
|
||||
+ <syscall name="linkat" number="303" groups="descriptor,file"/>
|
||||
+ <syscall name="symlinkat" number="304" groups="descriptor,file"/>
|
||||
+ <syscall name="readlinkat" number="305" groups="descriptor,file"/>
|
||||
+ <syscall name="fchmodat" number="306" groups="descriptor,file"/>
|
||||
+ <syscall name="faccessat" number="307" groups="descriptor,file"/>
|
||||
+ <syscall name="pselect6" number="308" groups="descriptor"/>
|
||||
+ <syscall name="ppoll" number="309" groups="descriptor"/>
|
||||
+ <syscall name="unshare" number="310" groups="process"/>
|
||||
+ <syscall name="sram_alloc" number="311"/>
|
||||
+ <syscall name="sram_free" number="312"/>
|
||||
+ <syscall name="dma_memcpy" number="313"/>
|
||||
+ <syscall name="accept" number="314" groups="network"/>
|
||||
+ <syscall name="bind" number="315" groups="network"/>
|
||||
+ <syscall name="connect" number="316" groups="network"/>
|
||||
+ <syscall name="getpeername" number="317" groups="network"/>
|
||||
+ <syscall name="getsockname" number="318" groups="network"/>
|
||||
+ <syscall name="getsockopt" number="319" groups="network"/>
|
||||
+ <syscall name="listen" number="320" groups="network"/>
|
||||
+ <syscall name="recv" number="321" groups="network"/>
|
||||
+ <syscall name="recvfrom" number="322" groups="network"/>
|
||||
+ <syscall name="recvmsg" number="323" groups="network"/>
|
||||
+ <syscall name="send" number="324" groups="network"/>
|
||||
+ <syscall name="sendmsg" number="325" groups="network"/>
|
||||
+ <syscall name="sendto" number="326" groups="network"/>
|
||||
+ <syscall name="setsockopt" number="327" groups="network"/>
|
||||
+ <syscall name="shutdown" number="328" groups="network"/>
|
||||
+ <syscall name="socket" number="329" groups="network"/>
|
||||
+ <syscall name="socketpair" number="330" groups="network"/>
|
||||
+ <syscall name="semctl" number="331" groups="ipc"/>
|
||||
+ <syscall name="semget" number="332" groups="ipc"/>
|
||||
+ <syscall name="semop" number="333" groups="ipc"/>
|
||||
+ <syscall name="msgctl" number="334" groups="ipc"/>
|
||||
+ <syscall name="msgget" number="335" groups="ipc"/>
|
||||
+ <syscall name="msgrcv" number="336" groups="ipc"/>
|
||||
+ <syscall name="msgsnd" number="337" groups="ipc"/>
|
||||
+ <syscall name="shmat" number="338" groups="ipc,memory"/>
|
||||
+ <syscall name="shmctl" number="339" groups="ipc"/>
|
||||
+ <syscall name="shmdt" number="340" groups="ipc,memory"/>
|
||||
+ <syscall name="shmget" number="341" groups="ipc"/>
|
||||
+ <syscall name="splice" number="342" groups="descriptor"/>
|
||||
+ <syscall name="sync_file_range" number="343" groups="descriptor"/>
|
||||
+ <syscall name="tee" number="344" groups="descriptor"/>
|
||||
+ <syscall name="vmsplice" number="345" groups="descriptor"/>
|
||||
+ <syscall name="epoll_pwait" number="346" groups="descriptor"/>
|
||||
+ <syscall name="utimensat" number="347" groups="descriptor,file"/>
|
||||
+ <syscall name="signalfd" number="348" groups="descriptor,signal"/>
|
||||
+ <syscall name="timerfd_create" number="349" groups="descriptor"/>
|
||||
+ <syscall name="eventfd" number="350" groups="descriptor"/>
|
||||
+ <syscall name="pread64" number="351" groups="descriptor"/>
|
||||
+ <syscall name="pwrite64" number="352" groups="descriptor"/>
|
||||
+ <syscall name="fadvise64" number="353" groups="descriptor"/>
|
||||
+ <syscall name="set_robust_list" number="354"/>
|
||||
+ <syscall name="get_robust_list" number="355"/>
|
||||
+ <syscall name="fallocate" number="356" groups="descriptor"/>
|
||||
+ <syscall name="semtimedop" number="357" groups="ipc"/>
|
||||
+ <syscall name="timerfd_settime" number="358" groups="descriptor"/>
|
||||
+ <syscall name="timerfd_gettime" number="359" groups="descriptor"/>
|
||||
+ <syscall name="signalfd4" number="360" groups="descriptor,signal"/>
|
||||
+ <syscall name="eventfd2" number="361" groups="descriptor"/>
|
||||
+ <syscall name="epoll_create1" number="362" groups="descriptor"/>
|
||||
+ <syscall name="dup3" number="363" groups="descriptor"/>
|
||||
+ <syscall name="pipe2" number="364" groups="descriptor"/>
|
||||
+ <syscall name="inotify_init1" number="365" groups="descriptor"/>
|
||||
+ <syscall name="preadv" number="366" groups="descriptor"/>
|
||||
+ <syscall name="pwritev" number="367" groups="descriptor"/>
|
||||
+ <syscall name="rt_tgsigqueueinfo" number="368" groups="process,signal"/>
|
||||
+ <syscall name="perf_event_open" number="369" groups="descriptor"/>
|
||||
+ <syscall name="recvmmsg" number="370" groups="network"/>
|
||||
+ <syscall name="fanotify_init" number="371" groups="descriptor"/>
|
||||
+ <syscall name="fanotify_mark" number="372" groups="descriptor,file"/>
|
||||
+ <syscall name="prlimit64" number="373"/>
|
||||
+</syscalls_info>
|
@ -1,36 +0,0 @@
|
||||
From 1add37b567a7dee39d99f37b37802034c3fce9c4 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Schwab <schwab@linux-m68k.org>
|
||||
Date: Sun, 20 Mar 2022 14:01:54 +0100
|
||||
Subject: [PATCH] Add support for readline 8.2
|
||||
|
||||
In readline 8.2 the type of rl_completer_word_break_characters changed to
|
||||
include const.
|
||||
---
|
||||
gdb/completer.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gdb/completer.c b/gdb/completer.c
|
||||
index d3900ae2014..a51c16ac7f8 100644
|
||||
--- a/gdb/completer.c
|
||||
+++ b/gdb/completer.c
|
||||
@@ -36,7 +36,7 @@
|
||||
calling a hook instead so we eliminate the CLI dependency. */
|
||||
#include "gdbcmd.h"
|
||||
|
||||
-/* Needed for rl_completer_word_break_characters() and for
|
||||
+/* Needed for rl_completer_word_break_characters and for
|
||||
rl_filename_completion_function. */
|
||||
#include "readline/readline.h"
|
||||
|
||||
@@ -2011,7 +2011,7 @@ gdb_completion_word_break_characters_throw ()
|
||||
rl_basic_quote_characters = NULL;
|
||||
}
|
||||
|
||||
- return rl_completer_word_break_characters;
|
||||
+ return (char *) rl_completer_word_break_characters;
|
||||
}
|
||||
|
||||
char *
|
||||
--
|
||||
2.31.1
|
||||
|
24
gdb-binutils29988-read_indexed_address.patch
Normal file
24
gdb-binutils29988-read_indexed_address.patch
Normal file
@ -0,0 +1,24 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Nick Clifton <nickc@redhat.com>
|
||||
Date: Wed, 11 Jan 2023 12:13:46 +0000
|
||||
Subject: gdb-binutils29988-read_indexed_address.patch
|
||||
|
||||
;; Backport "Fix a potential illegal memory access in the BFD library..."
|
||||
;; (Nick Clifton, binutils/29988)
|
||||
|
||||
PR 29988
|
||||
* dwarf2.c (read_indexed_address): Fix check for an out of range
|
||||
offset.
|
||||
|
||||
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
|
||||
--- a/bfd/dwarf2.c
|
||||
+++ b/bfd/dwarf2.c
|
||||
@@ -1412,7 +1412,7 @@ read_indexed_address (uint64_t idx, struct comp_unit *unit)
|
||||
offset += unit->dwarf_addr_offset;
|
||||
if (offset < unit->dwarf_addr_offset
|
||||
|| offset > file->dwarf_addr_size
|
||||
- || file->dwarf_addr_size - offset < unit->offset_size)
|
||||
+ || file->dwarf_addr_size - offset < unit->addr_size)
|
||||
return 0;
|
||||
|
||||
info_ptr = file->dwarf_addr_buffer + offset;
|
@ -1,254 +0,0 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-bz601887-dwarf4-rh-test.patch
|
||||
|
||||
;; Backport DWARF-4 support (BZ 601887, Tom Tromey).
|
||||
;;=fedoratest
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S
|
||||
@@ -0,0 +1,167 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+ .file "rh-dwarf4-x86_64.c"
|
||||
+ .section .debug_abbrev,"",@progbits
|
||||
+.Ldebug_abbrev0:
|
||||
+ .section .debug_info,"",@progbits
|
||||
+.Ldebug_info0:
|
||||
+ .section .debug_line,"",@progbits
|
||||
+.Ldebug_line0:
|
||||
+ .text
|
||||
+.Ltext0:
|
||||
+.globl main
|
||||
+ .type main, @function
|
||||
+main:
|
||||
+.LFB0:
|
||||
+ .file 1 "gdb.dwarf2/rh-dwarf4-x86_64.c"
|
||||
+ # gdb.dwarf2/rh-dwarf4-x86_64.c:20
|
||||
+ .loc 1 20 0
|
||||
+ .cfi_startproc
|
||||
+ # basic block 2
|
||||
+ pushq %rbp
|
||||
+ .cfi_def_cfa_offset 16
|
||||
+ movq %rsp, %rbp
|
||||
+ .cfi_offset 6, -16
|
||||
+ .cfi_def_cfa_register 6
|
||||
+ # gdb.dwarf2/rh-dwarf4-x86_64.c:21
|
||||
+ .loc 1 21 0
|
||||
+ movl $0, %eax
|
||||
+ # gdb.dwarf2/rh-dwarf4-x86_64.c:22
|
||||
+ .loc 1 22 0
|
||||
+ leave
|
||||
+ .cfi_def_cfa 7, 8
|
||||
+ ret
|
||||
+ .cfi_endproc
|
||||
+.LFE0:
|
||||
+ .size main, .-main
|
||||
+.Letext0:
|
||||
+ .section .debug_info
|
||||
+ .long 0x4e # Length of Compilation Unit Info
|
||||
+ .value 0x4 # DWARF version number
|
||||
+ .long .Ldebug_abbrev0 # Offset Into Abbrev. Section
|
||||
+ .byte 0x8 # Pointer Size (in bytes)
|
||||
+ .uleb128 0x1 # (DIE (0xb) DW_TAG_compile_unit)
|
||||
+ .long .LASF0 # DW_AT_producer: "GNU C 4.4.4 20100503 (Red Hat 4.4.4-2)"
|
||||
+ .byte 0x1 # DW_AT_language
|
||||
+ .long .LASF1 # DW_AT_name: "gdb.dwarf2/rh-dwarf4-x86_64.c"
|
||||
+ .long .LASF2 # DW_AT_comp_dir
|
||||
+ .quad .Ltext0 # DW_AT_low_pc
|
||||
+ .quad .Letext0 # DW_AT_high_pc
|
||||
+ .long .Ldebug_line0 # DW_AT_stmt_list
|
||||
+ .uleb128 0x2 # (DIE (0x2d) DW_TAG_subprogram)
|
||||
+ # DW_AT_external
|
||||
+ .long .LASF3 # DW_AT_name: "main"
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.dwarf2/rh-dwarf4-x86_64.c)
|
||||
+ .byte 0x13 # DW_AT_decl_line
|
||||
+ # DW_AT_prototyped
|
||||
+ .long 0x4a # DW_AT_type
|
||||
+ .quad .LFB0 # DW_AT_low_pc
|
||||
+ .quad .LFE0 # DW_AT_high_pc
|
||||
+ .uleb128 0x1 # DW_AT_frame_base
|
||||
+ .byte 0x9c # DW_OP_call_frame_cfa
|
||||
+ .uleb128 0x3 # (DIE (0x4a) DW_TAG_base_type)
|
||||
+ .byte 0x4 # DW_AT_byte_size
|
||||
+ .byte 0x5 # DW_AT_encoding
|
||||
+ .ascii "int\0" # DW_AT_name
|
||||
+ .byte 0x0 # end of children of DIE 0xb
|
||||
+ .section .debug_abbrev
|
||||
+ .uleb128 0x1 # (abbrev code)
|
||||
+ .uleb128 0x11 # (TAG: DW_TAG_compile_unit)
|
||||
+ .byte 0x1 # DW_children_yes
|
||||
+ .uleb128 0x25 # (DW_AT_producer)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x13 # (DW_AT_language)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x1b # (DW_AT_comp_dir)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x11 # (DW_AT_low_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x12 # (DW_AT_high_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x10 # (DW_AT_stmt_list)
|
||||
+ .uleb128 0x17 # (DW_FORM_sec_offset)
|
||||
+ .byte 0x0
|
||||
+ .byte 0x0
|
||||
+ .uleb128 0x2 # (abbrev code)
|
||||
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
|
||||
+ .byte 0x0 # DW_children_no
|
||||
+ .uleb128 0x3f # (DW_AT_external)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x3a # (DW_AT_decl_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3b # (DW_AT_decl_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x27 # (DW_AT_prototyped)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .uleb128 0x11 # (DW_AT_low_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x12 # (DW_AT_high_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x40 # (DW_AT_frame_base)
|
||||
+ .uleb128 0x18 # (DW_FORM_exprloc)
|
||||
+ .byte 0x0
|
||||
+ .byte 0x0
|
||||
+ .uleb128 0x3 # (abbrev code)
|
||||
+ .uleb128 0x24 # (TAG: DW_TAG_base_type)
|
||||
+ .byte 0x0 # DW_children_no
|
||||
+ .uleb128 0xb # (DW_AT_byte_size)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3e # (DW_AT_encoding)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0x8 # (DW_FORM_string)
|
||||
+ .byte 0x0
|
||||
+ .byte 0x0
|
||||
+ .byte 0x0
|
||||
+ .section .debug_pubnames,"",@progbits
|
||||
+ .long 0x17 # Length of Public Names Info
|
||||
+ .value 0x2 # DWARF Version
|
||||
+ .long .Ldebug_info0 # Offset of Compilation Unit Info
|
||||
+ .long 0x52 # Compilation Unit Length
|
||||
+ .long 0x2d # DIE offset
|
||||
+ .ascii "main\0" # external name
|
||||
+ .long 0x0
|
||||
+ .section .debug_aranges,"",@progbits
|
||||
+ .long 0x2c # Length of Address Ranges Info
|
||||
+ .value 0x2 # DWARF Version
|
||||
+ .long .Ldebug_info0 # Offset of Compilation Unit Info
|
||||
+ .byte 0x8 # Size of Address
|
||||
+ .byte 0x0 # Size of Segment Descriptor
|
||||
+ .value 0x0 # Pad to 16 byte boundary
|
||||
+ .value 0x0
|
||||
+ .quad .Ltext0 # Address
|
||||
+ .quad .Letext0-.Ltext0 # Length
|
||||
+ .quad 0x0
|
||||
+ .quad 0x0
|
||||
+ .section .debug_str,"MS",@progbits,1
|
||||
+.LASF2:
|
||||
+ .string "."
|
||||
+.LASF0:
|
||||
+ .string "GNU C 4.4.4 20100503 (Red Hat 4.4.4-2)"
|
||||
+.LASF1:
|
||||
+ .string "gdb.dwarf2/rh-dwarf4-x86_64.c"
|
||||
+.LASF3:
|
||||
+ .string "main"
|
||||
+ .ident "GCC: (GNU) 4.4.4 20100503 (Red Hat 4.4.4-2)"
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c
|
||||
@@ -0,0 +1,22 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp
|
||||
@@ -0,0 +1,42 @@
|
||||
+# Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+# This test can only be run on targets which support DWARF-2 and use gas.
|
||||
+# For now pick a sampling of likely targets.
|
||||
+if {![istarget *-*-linux*]
|
||||
+ && ![istarget *-*-gnu*]
|
||||
+ && ![istarget *-*-elf*]
|
||||
+ && ![istarget *-*-openbsd*]
|
||||
+ && ![istarget arm-*-eabi*]
|
||||
+ && ![istarget powerpc-*-eabi*]} {
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+if {![istarget x86_64-*]} {
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+set testfile "rh-dwarf4-x86_64"
|
||||
+set srcfile ${testfile}.S
|
||||
+set executable ${testfile}.x
|
||||
+set binfile [standard_output_file ${executable}]
|
||||
+
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+clean_restart $executable
|
||||
+
|
||||
+gdb_test "ptype main" {type = int \(void\)}
|
@ -9,9 +9,9 @@ Subject: gdb-ccache-workaround.patch
|
||||
diff --git a/gdb/testsuite/gdb.base/macscp.exp b/gdb/testsuite/gdb.base/macscp.exp
|
||||
--- a/gdb/testsuite/gdb.base/macscp.exp
|
||||
+++ b/gdb/testsuite/gdb.base/macscp.exp
|
||||
@@ -27,6 +27,14 @@ if { [test_compiler_info "gcc-*"] } {
|
||||
lappend options additional_flags=-fdebug-macro
|
||||
}
|
||||
@@ -20,6 +20,14 @@ set objfile [standard_output_file ${testfile}.o]
|
||||
|
||||
set options {debug macros additional_flags=-DFROM_COMMANDLINE=ARG}
|
||||
|
||||
+# Workaround ccache making lineno non-zero for command-line definitions.
|
||||
+if {[find_gcc] == "gcc" && [file executable "/usr/bin/gcc"]} {
|
||||
|
69
gdb-cli-handle-pending-c-after-rl_callback_read_char.patch
Normal file
69
gdb-cli-handle-pending-c-after-rl_callback_read_char.patch
Normal file
@ -0,0 +1,69 @@
|
||||
From 3f5ef7bf512c7565279832bad3d5c743e9d8ae4b Mon Sep 17 00:00:00 2001
|
||||
From: Tom de Vries <tdevries@suse.de>
|
||||
Date: Wed, 24 May 2023 10:53:02 +0200
|
||||
Subject: [PATCH 1/4] [gdb/cli] Handle pending ^C after rl_callback_read_char
|
||||
for readline 7
|
||||
|
||||
In commit faf01aee1d0 ("[gdb] Handle pending ^C after rl_callback_read_char")
|
||||
we handled a problem (described in detail in that commit) for readline >= 8
|
||||
using public readline functions rl_pending_signal and rl_check_signals.
|
||||
|
||||
For readline 7 (note that we require at least readline 7 so there's no need to
|
||||
worry about readline 6), there was no fix though, because rl_check_signals was
|
||||
not available.
|
||||
|
||||
Fix this by instead using the private readline function _rl_signal_handler.
|
||||
|
||||
There is precedent for using private readline variables and functions, but
|
||||
it's something we want to get rid of (PR build/10723). Nevertheless, I think
|
||||
we can allow this specific instance because it's not used when building
|
||||
against readline >= 8.
|
||||
|
||||
[ In the meanwhile, a fix was committed in the devel branch of the readline
|
||||
repo, contained in commit 8d0c439 ("rollup of changes since readline-8.2"),
|
||||
first proposed here (
|
||||
https://lists.gnu.org/archive/html/bug-readline/2022-10/msg00008.html ). ]
|
||||
|
||||
Tested on x86_64-linux, against system readline 7.0 on openSUSE Leap 15.4.
|
||||
|
||||
PR cli/27813
|
||||
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27813
|
||||
---
|
||||
gdb/event-top.c | 11 ++++++++++-
|
||||
1 file changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/event-top.c b/gdb/event-top.c
|
||||
index 9181e4bdcff..399582698c1 100644
|
||||
--- a/gdb/event-top.c
|
||||
+++ b/gdb/event-top.c
|
||||
@@ -134,6 +134,9 @@ static struct async_signal_handler *async_sigterm_token;
|
||||
character is processed. */
|
||||
void (*after_char_processing_hook) (void);
|
||||
|
||||
+#if RL_VERSION_MAJOR == 7
|
||||
+EXTERN_C void _rl_signal_handler (int);
|
||||
+#endif
|
||||
|
||||
/* Wrapper function for calling into the readline library. This takes
|
||||
care of a couple things:
|
||||
@@ -200,8 +203,14 @@ gdb_rl_callback_read_char_wrapper_noexcept () noexcept
|
||||
pending signal. I'm not sure if that's possible, but it seems
|
||||
better to handle the scenario than to assert. */
|
||||
rl_check_signals ();
|
||||
+#elif RL_VERSION_MAJOR == 7
|
||||
+ /* Unfortunately, rl_check_signals is not available. Use private
|
||||
+ function _rl_signal_handler instead. */
|
||||
+
|
||||
+ while (rl_pending_signal () != 0)
|
||||
+ _rl_signal_handler (rl_pending_signal ());
|
||||
#else
|
||||
- /* Unfortunately, rl_check_signals is not available. */
|
||||
+#error "Readline major version >= 7 expected"
|
||||
#endif
|
||||
if (after_char_processing_hook)
|
||||
(*after_char_processing_hook) ();
|
||||
|
||||
base-commit: 7f7fcd7031430953f41b284069d1ed0cf3c8734a
|
||||
--
|
||||
2.35.3
|
||||
|
@ -25,9 +25,9 @@ diff --git a/gdb/testsuite/gdb.base/solib-symbol.exp b/gdb/testsuite/gdb.base/so
|
||||
set bin_flags [list debug shlib=${binfile_lib}]
|
||||
+set executable ${testfile}
|
||||
|
||||
if [get_compiler_info] {
|
||||
return -1
|
||||
@@ -70,8 +71,26 @@ gdb_test "br foo2" \
|
||||
if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $lib_flags] != ""
|
||||
|| [gdb_compile ${srcfile} ${binfile} executable $bin_flags] != "" } {
|
||||
@@ -66,8 +67,26 @@ gdb_test "br foo2" \
|
||||
"Breakpoint.*: foo2. .2 locations..*" \
|
||||
"foo2 in mdlib"
|
||||
|
||||
|
@ -1,272 +0,0 @@
|
||||
gdb: disable commit resumed in target_kill
|
||||
|
||||
New in this version:
|
||||
|
||||
- Better comment in target_kill
|
||||
- Uncomment line in test to avoid hanging when exiting, when testing on
|
||||
native-extended-gdbserver
|
||||
|
||||
PR 28275 shows that doing a sequence of:
|
||||
|
||||
- Run inferior in background (run &)
|
||||
- kill that inferior
|
||||
- Run again
|
||||
|
||||
We get into this assertion:
|
||||
|
||||
/home/smarchi/src/binutils-gdb/gdb/target.c:2590: internal-error: target_wait: Assertion `!proc_target->commit_resumed_state' failed.
|
||||
|
||||
#0 internal_error_loc (file=0x5606b344e740 "/home/smarchi/src/binutils-gdb/gdb/target.c", line=2590, fmt=0x5606b344d6a0 "%s: Assertion `%s' failed.") at /home/smarchi/src/binutils-gdb/gdbsupport/errors.cc:54
|
||||
#1 0x00005606b6296475 in target_wait (ptid=..., status=0x7fffb9390630, options=...) at /home/smarchi/src/binutils-gdb/gdb/target.c:2590
|
||||
#2 0x00005606b5767a98 in startup_inferior (proc_target=0x5606bfccb2a0 <the_amd64_linux_nat_target>, pid=3884857, ntraps=1, last_waitstatus=0x0, last_ptid=0x0) at /home/smarchi/src/binutils-gdb/gdb/nat/fork-inferior.c:482
|
||||
#3 0x00005606b4e6c9c5 in gdb_startup_inferior (pid=3884857, num_traps=1) at /home/smarchi/src/binutils-gdb/gdb/fork-child.c:132
|
||||
#4 0x00005606b50f14a5 in inf_ptrace_target::create_inferior (this=0x5606bfccb2a0 <the_amd64_linux_nat_target>, exec_file=0x604000039f50 "/home/smarchi/build/binutils-gdb/gdb/test", allargs="", env=0x61500000a580, from_tty=1)
|
||||
at /home/smarchi/src/binutils-gdb/gdb/inf-ptrace.c:105
|
||||
#5 0x00005606b53b6d23 in linux_nat_target::create_inferior (this=0x5606bfccb2a0 <the_amd64_linux_nat_target>, exec_file=0x604000039f50 "/home/smarchi/build/binutils-gdb/gdb/test", allargs="", env=0x61500000a580, from_tty=1)
|
||||
at /home/smarchi/src/binutils-gdb/gdb/linux-nat.c:978
|
||||
#6 0x00005606b512b79b in run_command_1 (args=0x0, from_tty=1, run_how=RUN_NORMAL) at /home/smarchi/src/binutils-gdb/gdb/infcmd.c:468
|
||||
#7 0x00005606b512c236 in run_command (args=0x0, from_tty=1) at /home/smarchi/src/binutils-gdb/gdb/infcmd.c:526
|
||||
|
||||
When running the kill command, commit_resumed_state for the
|
||||
process_stratum_target (linux-nat, here) is true. After the kill, when
|
||||
there are no more threads, commit_resumed_state is still true, as
|
||||
nothing touches this flag during the kill operation. During the
|
||||
subsequent run command, run_command_1 does:
|
||||
|
||||
scoped_disable_commit_resumed disable_commit_resumed ("running");
|
||||
|
||||
We would think that this would clear the commit_resumed_state flag of
|
||||
our native target, but that's not the case, because
|
||||
scoped_disable_commit_resumed iterates on non-exited inferiors in order
|
||||
to find active process targets. And after the kill, the inferior is
|
||||
exited, and the native target was unpushed from it anyway. So
|
||||
scoped_disable_commit_resumed doesn't touch the commit_resumed_state
|
||||
flag of the native target, it stays true. When reaching target_wait, in
|
||||
startup_inferior (to consume the initial expect stop events while the
|
||||
inferior is starting up and working its way through the shell),
|
||||
commit_resumed_state is true, breaking the contract saying that
|
||||
commit_resumed_state is always false when calling the targets' wait
|
||||
method.
|
||||
|
||||
(note: to be correct, I think that startup_inferior should toggle
|
||||
commit_resumed between the target_wait and target_resume calls, but I'll
|
||||
ignore that for now)
|
||||
|
||||
I can see multiple ways to fix this. In the end, we need
|
||||
commit_resumed_state to be cleared by the time we get to that
|
||||
target_wait. It could be done at the end of the kill command, or at the
|
||||
beginning of the run command.
|
||||
|
||||
To keep things in a coherent state, I'd like to make it so that after
|
||||
the kill command, when the target is left with no threads, its
|
||||
commit_resumed_state flag is left to false. This way, we can keep
|
||||
working with the assumption that a target with no threads (and therefore
|
||||
no running threads) has commit_resumed_state == false.
|
||||
|
||||
Do this by adding a scoped_disable_commit_resumed in target_kill. It
|
||||
clears the target's commit_resumed_state on entry, and leaves it false
|
||||
if the target does not have any resumed thread on exit. That means,
|
||||
even if the target has another inferior with stopped threads,
|
||||
commit_resumed_state will be left to false, which makes sense.
|
||||
|
||||
Add a test that tries to cover various combinations of actions done
|
||||
while an inferior is running (and therefore while commit_resumed_state
|
||||
is true on the process target).
|
||||
|
||||
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28275
|
||||
Change-Id: I8e6fe6dc1f475055921520e58cab68024039a1e9
|
||||
Approved-By: Andrew Burgess <aburgess@redhat.com>
|
||||
|
||||
---
|
||||
gdb/target.c | 9 ++
|
||||
.../gdb.base/run-control-while-bg-execution.c | 33 ++++++
|
||||
.../gdb.base/run-control-while-bg-execution.exp | 122 +++++++++++++++++++++
|
||||
3 files changed, 164 insertions(+)
|
||||
|
||||
diff --git a/gdb/target.c b/gdb/target.c
|
||||
index 0c86b571e1c..0eae5307785 100644
|
||||
--- a/gdb/target.c
|
||||
+++ b/gdb/target.c
|
||||
@@ -908,6 +908,15 @@ add_deprecated_target_alias (const target_info &tinfo, const char *alias)
|
||||
void
|
||||
target_kill (void)
|
||||
{
|
||||
+
|
||||
+ /* If the commit_resume_state of the to-be-killed-inferior's process stratum
|
||||
+ is true, and this inferior is the last live inferior with resumed threads
|
||||
+ of that target, then we want to leave commit_resume_state to false, as the
|
||||
+ target won't have any resumed threads anymore. We achieve this with
|
||||
+ this scoped_disable_commit_resumed. On construction, it will set the flag
|
||||
+ to false. On destruction, it will only set it to true if there are resumed
|
||||
+ threads left. */
|
||||
+ scoped_disable_commit_resumed disable ("killing");
|
||||
current_inferior ()->top_target ()->kill ();
|
||||
}
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/run-control-while-bg-execution.c b/gdb/testsuite/gdb.base/run-control-while-bg-execution.c
|
||||
new file mode 100644
|
||||
index 00000000000..8092fadc8b9
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/run-control-while-bg-execution.c
|
||||
@@ -0,0 +1,33 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2020-2022 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+ //
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+static pid_t mypid = -1;
|
||||
+
|
||||
+static void
|
||||
+after_getpid (void)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ mypid = getpid ();
|
||||
+ after_getpid ();
|
||||
+ sleep (30);
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/run-control-while-bg-execution.exp b/gdb/testsuite/gdb.base/run-control-while-bg-execution.exp
|
||||
new file mode 100644
|
||||
index 00000000000..5b4834f0b32
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/run-control-while-bg-execution.exp
|
||||
@@ -0,0 +1,122 @@
|
||||
+# Copyright 2022 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+# This test aims at testing various operations after getting rid of an inferior
|
||||
+# that was running in background, or while we have an inferior running in
|
||||
+# background. The original intent was to expose cases where the commit-resumed
|
||||
+# state of the process stratum target was not reset properly after killing an
|
||||
+# inferior running in background, which would be a problem when trying to run
|
||||
+# again. The test was expanded to test various combinations of
|
||||
+# run-control-related actions done with an inferior running in background.
|
||||
+
|
||||
+if {[use_gdb_stub]} {
|
||||
+ unsupported "test requires running"
|
||||
+ return
|
||||
+}
|
||||
+
|
||||
+standard_testfile
|
||||
+
|
||||
+if {[build_executable "failed to prepare" $testfile $srcfile]} {
|
||||
+ return
|
||||
+}
|
||||
+
|
||||
+# Run one variation of the test:
|
||||
+#
|
||||
+# 1. Start an inferior in the background with "run &"
|
||||
+# 2. Do action 1
|
||||
+# 3. Do action 2
|
||||
+#
|
||||
+# Action 1 indicates what to do with the inferior running in background:
|
||||
+#
|
||||
+# - kill: kill it
|
||||
+# - detach: detach it
|
||||
+# - add: add a new inferior and switch to it, leave the inferior running in
|
||||
+# background alone
|
||||
+# - none: do nothing, leave the inferior running in background alone
|
||||
+#
|
||||
+# Action 2 indicates what to do after that:
|
||||
+#
|
||||
+# - start: use the start command
|
||||
+# - run: use the run command
|
||||
+# - attach: start a process outside of GDB and attach it
|
||||
+proc do_test { action1 action2 } {
|
||||
+ save_vars { ::GDBFLAGS } {
|
||||
+ append ::GDBFLAGS " -ex \"maintenance set target-non-stop on\""
|
||||
+ clean_restart $::binfile
|
||||
+ }
|
||||
+
|
||||
+ # Ensure we are at least after the getpid call, should we need it.
|
||||
+ if { ![runto "after_getpid"] } {
|
||||
+ return
|
||||
+ }
|
||||
+
|
||||
+ # Some commands below ask for confirmation. Turn that off for simplicity.
|
||||
+ gdb_test "set confirm off"
|
||||
+ gdb_test_multiple "continue &" "" {
|
||||
+ -re ".*\r\n$::gdb_prompt " {
|
||||
+ pass $gdb_test_name
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if { $action1 == "kill" } {
|
||||
+ gdb_test "kill" "Inferior 1 .* killed.*"
|
||||
+ } elseif { $action1 == "detach" } {
|
||||
+ set child_pid [get_integer_valueof "mypid" -1]
|
||||
+ if { $child_pid == -1 } {
|
||||
+ fail "failed to extract child pid"
|
||||
+ return
|
||||
+ }
|
||||
+
|
||||
+ gdb_test "detach" "Inferior 1 .* detached.*" "detach from first instance"
|
||||
+
|
||||
+ # Kill the detached process, to avoid hanging when exiting GDBserver,
|
||||
+ # when testing with the native-extended-gdbserver board.
|
||||
+ remote_exec target "kill $child_pid"
|
||||
+ } elseif { $action1 == "add" } {
|
||||
+ gdb_test "add-inferior -exec $::binfile" \
|
||||
+ "Added inferior 2 on connection 1.*" "add-inferior"
|
||||
+ gdb_test "inferior 2" "Switching to inferior 2 .*"
|
||||
+ } elseif { $action1 == "none" } {
|
||||
+
|
||||
+ } else {
|
||||
+ error "invalid action 1"
|
||||
+ }
|
||||
+
|
||||
+ if { $action2 == "start" } {
|
||||
+ gdb_test "start" "Temporary breakpoint $::decimal\(?:\.$::decimal\)?, main .*"
|
||||
+ } elseif { $action2 == "run" } {
|
||||
+ gdb_test "break main" "Breakpoint $::decimal at $::hex.*"
|
||||
+ gdb_test "run" "Breakpoint $::decimal\(?:\.$::decimal\)?, main .*"
|
||||
+ } elseif { $action2 == "attach" } {
|
||||
+ set test_spawn_id [spawn_wait_for_attach $::binfile]
|
||||
+ set test_pid [spawn_id_get_pid $test_spawn_id]
|
||||
+
|
||||
+ if { [gdb_attach $test_pid] } {
|
||||
+ gdb_test "detach" "Inferior $::decimal .* detached.*" \
|
||||
+ "detach from second instance"
|
||||
+ }
|
||||
+
|
||||
+ # Detach and kill this inferior so we don't leave it around.
|
||||
+ kill_wait_spawned_process $test_spawn_id
|
||||
+ } else {
|
||||
+ error "invalid action 2"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+foreach_with_prefix action1 { kill detach add none } {
|
||||
+ foreach_with_prefix action2 { start run attach } {
|
||||
+ do_test $action1 $action2
|
||||
+ }
|
||||
+}
|
@ -12,7 +12,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1270534
|
||||
diff --git a/gdb/configure b/gdb/configure
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -9567,6 +9567,7 @@ if test x"$prefer_curses" = xyes; then
|
||||
@@ -20915,6 +20915,7 @@ if test x"$prefer_curses" = xyes; then
|
||||
# search /usr/local/include, if ncurses is installed in /usr/local. A
|
||||
# default installation of ncurses on alpha*-dec-osf* will lead to such
|
||||
# a situation.
|
||||
@ -20,7 +20,7 @@ diff --git a/gdb/configure b/gdb/configure
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
|
||||
$as_echo_n "checking for library containing waddstr... " >&6; }
|
||||
if ${ac_cv_search_waddstr+:} false; then :
|
||||
@@ -9591,7 +9592,7 @@ return waddstr ();
|
||||
@@ -20939,7 +20940,7 @@ return waddstr ();
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
@ -29,7 +29,7 @@ diff --git a/gdb/configure b/gdb/configure
|
||||
if test -z "$ac_lib"; then
|
||||
ac_res="none required"
|
||||
else
|
||||
@@ -9665,6 +9666,7 @@ case $host_os in
|
||||
@@ -21013,6 +21014,7 @@ case $host_os in
|
||||
esac
|
||||
|
||||
# These are the libraries checked by Readline.
|
||||
@ -37,7 +37,7 @@ diff --git a/gdb/configure b/gdb/configure
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
|
||||
$as_echo_n "checking for library containing tgetent... " >&6; }
|
||||
if ${ac_cv_search_tgetent+:} false; then :
|
||||
@@ -9689,7 +9691,7 @@ return tgetent ();
|
||||
@@ -21037,7 +21039,7 @@ return tgetent ();
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
@ -49,7 +49,7 @@ diff --git a/gdb/configure b/gdb/configure
|
||||
diff --git a/gdb/configure.ac b/gdb/configure.ac
|
||||
--- a/gdb/configure.ac
|
||||
+++ b/gdb/configure.ac
|
||||
@@ -713,7 +713,8 @@ if test x"$prefer_curses" = xyes; then
|
||||
@@ -704,7 +704,8 @@ if test x"$prefer_curses" = xyes; then
|
||||
# search /usr/local/include, if ncurses is installed in /usr/local. A
|
||||
# default installation of ncurses on alpha*-dec-osf* will lead to such
|
||||
# a situation.
|
||||
@ -59,7 +59,7 @@ diff --git a/gdb/configure.ac b/gdb/configure.ac
|
||||
|
||||
if test "$ac_cv_search_waddstr" != no; then
|
||||
curses_found=yes
|
||||
@@ -755,7 +756,8 @@ case $host_os in
|
||||
@@ -746,7 +747,8 @@ case $host_os in
|
||||
esac
|
||||
|
||||
# These are the libraries checked by Readline.
|
||||
|
@ -1,46 +0,0 @@
|
||||
[gdb] Fix assert in handle_jit_event
|
||||
|
||||
With the cc-with-tweaks.sh patch submitted here (
|
||||
https://sourceware.org/pipermail/gdb-patches/2022-October/192586.html ) we run
|
||||
with:
|
||||
...
|
||||
$ export STRIP_ARGS_STRIP_DEBUG=--strip-all
|
||||
$ make check RUNTESTFLAGS="gdb.base/jit-reader.exp \
|
||||
--target_board cc-with-gnu-debuglink"
|
||||
...
|
||||
into the following assert:
|
||||
...
|
||||
(gdb) run ^M
|
||||
Starting program: jit-reader ^M
|
||||
gdb/jit.c:1247: internal-error: jit_event_handler: \
|
||||
Assertion `jiter->jiter_data != nullptr' failed.^M
|
||||
...
|
||||
|
||||
Fix this by handling the
|
||||
jit_bp_sym.objfile->separate_debug_objfile_backlink != nullptr case in
|
||||
handle_jit_event.
|
||||
|
||||
Tested on x86_64-linux.
|
||||
|
||||
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29277
|
||||
|
||||
---
|
||||
gdb/breakpoint.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
|
||||
index b046adf08f9..34f35135dfe 100644
|
||||
--- a/gdb/breakpoint.c
|
||||
+++ b/gdb/breakpoint.c
|
||||
@@ -5566,7 +5566,10 @@ handle_jit_event (CORE_ADDR address)
|
||||
function needs to be updated too. */
|
||||
bound_minimal_symbol jit_bp_sym = lookup_minimal_symbol_by_pc (address);
|
||||
gdb_assert (jit_bp_sym.objfile != nullptr);
|
||||
- jit_event_handler (gdbarch, jit_bp_sym.objfile);
|
||||
+ objfile *objfile = jit_bp_sym.objfile;
|
||||
+ if (objfile->separate_debug_objfile_backlink)
|
||||
+ objfile = objfile->separate_debug_objfile_backlink;
|
||||
+ jit_event_handler (gdbarch, objfile);
|
||||
|
||||
target_terminal::inferior ();
|
||||
}
|
@ -1,174 +0,0 @@
|
||||
gdb: fix assert when quitting GDB while a thread is stepping
|
||||
|
||||
This commit addresses one of the issues identified in PR gdb/28275.
|
||||
|
||||
Bug gdb/28275 identifies a number of situations in which this assert:
|
||||
|
||||
Assertion `!proc_target->commit_resumed_state' failed.
|
||||
|
||||
could be triggered. There's actually a number of similar places where
|
||||
this assert is found in GDB, the two of interest in gdb/28275 are in
|
||||
target_wait and target_stop.
|
||||
|
||||
In one of the comments:
|
||||
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=28275#c1
|
||||
|
||||
steps to trigger the assertion within target_stop were identified when
|
||||
using a modified version of the gdb.threads/detach-step-over.exp test
|
||||
script.
|
||||
|
||||
In the gdb.threads/detach-step-over.exp test, we attach to a
|
||||
multi-threaded inferior, and continue the inferior in asynchronous
|
||||
(background) mode. Each thread is continuously hitting a conditional
|
||||
breakpoint where the condition is always false. While the inferior is
|
||||
running we detach. The goal is that we detach while GDB is performing a
|
||||
step-over for the conditional breakpoint in at least one thread.
|
||||
|
||||
While detaching, if a step-over is in progress, then GDB has to
|
||||
complete the step over before we can detach. This involves calling
|
||||
target_stop and target_wait (see prepare_for_detach).
|
||||
|
||||
As far as gdb/28275 is concerned, the interesting part here, is the
|
||||
the process_stratum_target::commit_resumed_state variable must be
|
||||
false when target_stop and target_wait are called.
|
||||
|
||||
This is currently ensured because, in detach_command (infrun.c), we
|
||||
create an instance of scoped_disable_commit_resumed, this ensures that
|
||||
when target_detach is called, ::commit_resumed_state will be false.
|
||||
|
||||
The modification to the test that I propose here, and which exposed
|
||||
the bug, is that, instead of using "detach" to detach from the
|
||||
inferior, we instead use "quit". Quitting GDB after attaching to an
|
||||
inferior will cause GDB to first detach, and then exit.
|
||||
|
||||
When we quit GDB we end up calling target_detach via a different code
|
||||
path, the stack looks like:
|
||||
|
||||
#0 target_detach
|
||||
#1 kill_or_detach
|
||||
#2 quit_force
|
||||
#3 quit_command
|
||||
|
||||
Along this path there is no scoped_disable_commit_resumed created.
|
||||
::commit_resumed_state can be true when we reach prepare_for_detach,
|
||||
which calls target_wait and target_stop, so the assertion will trigger.
|
||||
|
||||
In this commit, I propose fixing this by adding the creation of a
|
||||
scoped_disable_commit_resumed into target_detach. This will ensure
|
||||
that ::commit_resumed_state is false when calling prepare_for_detach
|
||||
from within target_detach.
|
||||
|
||||
I did consider placing the scoped_disable_commit_resumed in
|
||||
prepare_for_detach, however, placing it in target_detach ensures that
|
||||
the target's commit_resumed_state flag is left to false if the detached
|
||||
inferior was the last one for that target. It's the same rationale as
|
||||
for patch "gdb: disable commit resumed in target_kill" that comes later
|
||||
in this series, but for detach instead of kill.
|
||||
|
||||
detach_command still includes a scoped_disable_commit_resumed too, but I
|
||||
think it is still relevant to cover the resumption at the end of the
|
||||
function.
|
||||
|
||||
Co-Authored-By: Simon Marchi <simon.marchi@efficios.com>
|
||||
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28275
|
||||
Change-Id: Ie128f7aba6ef0e018859275eca372e6ea738e96f
|
||||
|
||||
---
|
||||
gdb/target.c | 5 +++
|
||||
gdb/testsuite/gdb.threads/detach-step-over.exp | 52 ++++++++++++++++++++++++++
|
||||
2 files changed, 57 insertions(+)
|
||||
|
||||
diff --git a/gdb/target.c b/gdb/target.c
|
||||
index 1ee051b520a..0c86b571e1c 100644
|
||||
--- a/gdb/target.c
|
||||
+++ b/gdb/target.c
|
||||
@@ -2558,6 +2558,9 @@ target_preopen (int from_tty)
|
||||
void
|
||||
target_detach (inferior *inf, int from_tty)
|
||||
{
|
||||
+ /* Thread's don't need to be resumed until the end of this function. */
|
||||
+ scoped_disable_commit_resumed disable_commit_resumed ("detaching");
|
||||
+
|
||||
/* After we have detached, we will clear the register cache for this inferior
|
||||
by calling registers_changed_ptid. We must save the pid_ptid before
|
||||
detaching, as the target detach method will clear inf->pid. */
|
||||
@@ -2588,6 +2591,8 @@ target_detach (inferior *inf, int from_tty)
|
||||
inferior_ptid matches save_pid_ptid, but in our case, it does not
|
||||
call it, as inferior_ptid has been reset. */
|
||||
reinit_frame_cache ();
|
||||
+
|
||||
+ disable_commit_resumed.reset_and_commit ();
|
||||
}
|
||||
|
||||
void
|
||||
diff --git a/gdb/testsuite/gdb.threads/detach-step-over.exp b/gdb/testsuite/gdb.threads/detach-step-over.exp
|
||||
index ad9b08f549e..d2cb52423d9 100644
|
||||
--- a/gdb/testsuite/gdb.threads/detach-step-over.exp
|
||||
+++ b/gdb/testsuite/gdb.threads/detach-step-over.exp
|
||||
@@ -284,6 +284,56 @@ proc_with_prefix test_detach_command {condition_eval target_non_stop non_stop di
|
||||
kill_wait_spawned_process $test_spawn_id
|
||||
}
|
||||
|
||||
+# Similar to the proc above, but this time, instead of detaching using
|
||||
+# the 'detach' command, we quit GDB, this will also trigger a detach, but
|
||||
+# through a slightly different path, which can expose different bugs.
|
||||
+proc_with_prefix test_detach_quit {condition_eval target_non_stop \
|
||||
+ non_stop displaced} {
|
||||
+ # If debugging with target remote, check whether the all-stop variant
|
||||
+ # of the RSP is being used. If so, we can't run the background tests.
|
||||
+ if {!$non_stop
|
||||
+ && [target_info exists gdb_protocol]
|
||||
+ && ([target_info gdb_protocol] == "remote"
|
||||
+ || [target_info gdb_protocol] == "extended-remote")} {
|
||||
+ start_gdb_for_test $condition_eval $target_non_stop \
|
||||
+ $non_stop $displaced
|
||||
+
|
||||
+ gdb_test_multiple "maint show target-non-stop" "" {
|
||||
+ -wrap -re "(is|currently) on.*" {
|
||||
+ }
|
||||
+ -wrap -re "(is|currently) off.*" {
|
||||
+ return
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ set test_spawn_id [spawn_wait_for_attach $::binfile]
|
||||
+ set testpid [spawn_id_get_pid $test_spawn_id]
|
||||
+
|
||||
+ set attempts 3
|
||||
+ for {set attempt 1} { $attempt <= $attempts } { incr attempt } {
|
||||
+ with_test_prefix "iter $attempt" {
|
||||
+
|
||||
+ start_gdb_for_test $condition_eval $target_non_stop \
|
||||
+ $non_stop $displaced
|
||||
+
|
||||
+ if {![prepare_test_iter $testpid $non_stop \
|
||||
+ $attempt $attempts "$::decimal"]} {
|
||||
+ kill_wait_spawned_process $test_spawn_id
|
||||
+ return
|
||||
+ }
|
||||
+
|
||||
+ gdb_test_multiple "with confirm off -- quit" "" {
|
||||
+ eof {
|
||||
+ pass $gdb_test_name
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ kill_wait_spawned_process $test_spawn_id
|
||||
+}
|
||||
+
|
||||
# The test program exits after a while, in case GDB crashes. Make it
|
||||
# wait at least as long as we may wait before declaring a time out
|
||||
# failure.
|
||||
@@ -331,6 +381,8 @@ foreach_with_prefix breakpoint-condition-evaluation {"host" "target"} {
|
||||
foreach_with_prefix displaced {"off" "auto"} {
|
||||
test_detach_command ${breakpoint-condition-evaluation} \
|
||||
${target-non-stop} ${non-stop} ${displaced}
|
||||
+ test_detach_quit ${breakpoint-condition-evaluation} \
|
||||
+ ${target-non-stop} ${non-stop} ${displaced}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
gdb: fix for gdb.base/eof-exit.exp test failures
|
||||
|
||||
This fix relates to PR gdb/29032, this makes the test more stable by
|
||||
ensuring that the Ctrl-D is only sent once the prompt has been
|
||||
displayed. This issue was also discussed on the mailing list here:
|
||||
|
||||
https://sourceware.org/pipermail/gdb-patches/2022-April/187670.html
|
||||
|
||||
The problem identified in the bug report is that sometimes the Ctrl-D
|
||||
(that the test sends to GDB) arrives while GDB is processing a
|
||||
command. When this happens the Ctrl-D is handled differently than if
|
||||
the Ctrl-D is sent while GDB is waiting for input at a prompt.
|
||||
|
||||
The original intent of the test was that the Ctrl-D be sent while GDB
|
||||
was waiting at a prompt, and that is the case the occurs most often,
|
||||
but, when the Ctrl-D arrives during command processing, then GDB will
|
||||
ignore the Ctrl-D, and the test will fail.
|
||||
|
||||
This commit ensures the Ctrl-D is always sent while GDB is waiting at
|
||||
a prompt, which makes this test stable.
|
||||
|
||||
But, that still leaves an open question, what should happen when the
|
||||
Ctrl-D arrives while GDB is processing a command? This commit doesn't
|
||||
attempt to answer that question, which is while bug PR gdb/29032 will
|
||||
not be closed once this commit is merged.
|
||||
|
||||
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29032
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.base/eof-exit.exp | 18 ++++++++++++++++++
|
||||
1 file changed, 18 insertions(+)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/eof-exit.exp b/gdb/testsuite/gdb.base/eof-exit.exp
|
||||
index d604d029974..53a3b56dce8 100644
|
||||
--- a/gdb/testsuite/gdb.base/eof-exit.exp
|
||||
+++ b/gdb/testsuite/gdb.base/eof-exit.exp
|
||||
@@ -25,9 +25,27 @@ proc run_test {} {
|
||||
#
|
||||
# Send a newline character, which will cause GDB to redisplay the
|
||||
# prompt.
|
||||
+ #
|
||||
+ # We then consume the newline characters, and then make use of
|
||||
+ # expect's -notransfer option to ensure that the prompt has been
|
||||
+ # displayed, but to leave the prompt in expect's internal buffer.
|
||||
+ # This is important as the following test wants to check how GDB
|
||||
+ # displays the 'quit' message relative to the prompt, this is much
|
||||
+ # easier to do if the prompt is still in expect's buffers.
|
||||
+ #
|
||||
+ # The other special thing we do here is avoid printing a 'PASS'
|
||||
+ # result. The reason for this is so that the GDB output in the
|
||||
+ # log file will match what a user should see, this makes it much
|
||||
+ # easier to debug issues. Obviously we could print a 'PASS' here
|
||||
+ # as the text printed by expect is not considered part of GDB's
|
||||
+ # output, so the pattern matching will work just fine... but, the
|
||||
+ # log file becomes much harder to read.
|
||||
send_gdb "\n"
|
||||
gdb_test_multiple "" "discard newline" {
|
||||
-re "^\r\n" {
|
||||
+ exp_continue
|
||||
+ }
|
||||
+ -notransfer -re "^\[^\n\]*$::gdb_prompt $" {
|
||||
}
|
||||
}
|
||||
|
@ -1,35 +0,0 @@
|
||||
Fix selftest FAILs with gdb build with -O2 -flto
|
||||
|
||||
diff --git a/gdb/complaints.h b/gdb/complaints.h
|
||||
index 6ad056d257..cac09ff573 100644
|
||||
--- a/gdb/complaints.h
|
||||
+++ b/gdb/complaints.h
|
||||
@@ -42,9 +42,10 @@ extern int stop_whining;
|
||||
while (0)
|
||||
|
||||
/* Clear out / initialize all complaint counters that have ever been
|
||||
- incremented. */
|
||||
+ incremented. Prevent inlining this function for the benefit of GDB's
|
||||
+ selftests in the testsuite. */
|
||||
|
||||
-extern void clear_complaints ();
|
||||
+extern void clear_complaints () __attribute__((noinline));
|
||||
|
||||
|
||||
#endif /* !defined (COMPLAINTS_H) */
|
||||
diff --git a/gdb/main.c b/gdb/main.c
|
||||
index 19bbb92388..9d35f9baa8 100644
|
||||
--- a/gdb/main.c
|
||||
+++ b/gdb/main.c
|
||||
@@ -1235,6 +1235,11 @@ captured_main_1 (struct captured_main_args *context)
|
||||
}
|
||||
}
|
||||
|
||||
+/* Prevent inlining this function for the benefit of GDB's selftests in the
|
||||
+ testsuite. */
|
||||
+
|
||||
+static void captured_main (void *data) __attribute__((noinline));
|
||||
+
|
||||
static void
|
||||
captured_main (void *data)
|
||||
{
|
@ -1,104 +0,0 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-fortran-frame-string.patch
|
||||
|
||||
;; Display Fortran strings in backtraces.
|
||||
;;=fedoratest
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2014-07/msg00709.html
|
||||
|
||||
Hi,
|
||||
|
||||
for Fortran it fixes displaying normal strings also in frames/backtraces:
|
||||
|
||||
(gdb) frame
|
||||
->
|
||||
|
||||
The patch is simple and I do not see why it should not be this way.
|
||||
|
||||
For C/C++ TYPE_CODE_STRING is not used. I am not aware of Pascal but that
|
||||
language is currently not really much supported in GDB anyway.
|
||||
|
||||
This was a part of my archer/jankratochvil/vla branch but it is not a part of
|
||||
the Intel VLA patchset as it in fact is completely unrelated to "VLA".
|
||||
|
||||
No regressions on {x86_64,x86_64-m32,i686}-fedora22pre-linux-gnu.
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.fortran/fortran-frame-string.exp b/gdb/testsuite/gdb.fortran/fortran-frame-string.exp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/fortran-frame-string.exp
|
||||
@@ -0,0 +1,36 @@
|
||||
+# Copyright 2014 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 2 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program; if not, write to the Free Software
|
||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+
|
||||
+standard_testfile .f90
|
||||
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90}] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if ![runto MAIN__] then {
|
||||
+ perror "couldn't run to breakpoint MAIN__"
|
||||
+ continue
|
||||
+}
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "s = s"]
|
||||
+gdb_continue_to_breakpoint "s = s"
|
||||
+
|
||||
+gdb_test "ptype s" {type = character\*3}
|
||||
+gdb_test "p s" " = 'foo'"
|
||||
+
|
||||
+# Fix rejected upstream:
|
||||
+# https://sourceware.org/ml/gdb-patches/2014-07/msg00768.html
|
||||
+setup_kfail "rejected" *-*-*
|
||||
+gdb_test "frame" { \(s='foo', .*}
|
||||
diff --git a/gdb/testsuite/gdb.fortran/fortran-frame-string.f90 b/gdb/testsuite/gdb.fortran/fortran-frame-string.f90
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/fortran-frame-string.f90
|
||||
@@ -0,0 +1,28 @@
|
||||
+! Copyright 2014 Free Software Foundation, Inc.
|
||||
+!
|
||||
+! This program is free software; you can redistribute it and/or modify
|
||||
+! it under the terms of the GNU General Public License as published by
|
||||
+! the Free Software Foundation; either version 2 of the License, or
|
||||
+! (at your option) any later version.
|
||||
+!
|
||||
+! This program is distributed in the hope that it will be useful,
|
||||
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+! GNU General Public License for more details.
|
||||
+!
|
||||
+! You should have received a copy of the GNU General Public License
|
||||
+! along with this program; if not, write to the Free Software
|
||||
+! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+!
|
||||
+! Ihis file is the Fortran source file for dynamic.exp.
|
||||
+! Original file written by Jakub Jelinek <jakub@redhat.com>.
|
||||
+! Modified for the GDB testcase by Jan Kratochvil <jan.kratochvil@redhat.com>.
|
||||
+
|
||||
+ subroutine f(s)
|
||||
+ character*3 s
|
||||
+ s = s
|
||||
+ end
|
||||
+
|
||||
+ program main
|
||||
+ call f ('foo')
|
||||
+ end
|
@ -6,5 +6,5 @@ index b9770ea415..3149f6e1fe 100644
|
||||
-#!/usr/bin/env bash
|
||||
+#!/bin/bash
|
||||
|
||||
# Copyright (C) 2003-2022 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003-2023 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -1,65 +0,0 @@
|
||||
[gdb] Handle pending ^C after rl_callback_read_char
|
||||
|
||||
In completion tests in various test-cases, we've been running into these
|
||||
"clearing input line" timeouts:
|
||||
...
|
||||
(gdb) $cmd^GPASS: gdb.gdb/unittest.exp: tab complete "$cmd"
|
||||
FAIL: gdb.gdb/unittest.exp: tab complete "$cmd" (clearing input line) (timeout)
|
||||
...
|
||||
where $cmd == "maintenance selftest name_that_does_not_exist".
|
||||
|
||||
AFAIU, the following scenario happens:
|
||||
- expect sends "$cmd\t"
|
||||
- gdb detects the stdin event, and calls rl_callback_read_char until it
|
||||
comes to handle \t
|
||||
- readline interprets the \t as completion, tries to complete, fails to do so,
|
||||
outputs a bell (^G)
|
||||
- expect sees the bell, and proceeds to send ^C
|
||||
- readline is still in the call to rl_callback_read_char, and stores the
|
||||
signal in _rl_caught_signal
|
||||
- readline returns from the call to rl_callback_read_char, without having
|
||||
handled _rl_caught_signal
|
||||
- gdb goes to wait for the next event
|
||||
- expect times out waiting for "Quit", the expected reaction for ^C
|
||||
|
||||
Fix this by handling pending signals after each call to rl_callback_read_char.
|
||||
|
||||
The fix is only available for readline 8.x, if --with-system-readline provides
|
||||
an older version, then the fix is disabled due to missing function
|
||||
rl_check_signals.
|
||||
|
||||
Tested on x86_64-linux.
|
||||
|
||||
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27813
|
||||
|
||||
---
|
||||
gdb/event-top.c | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/gdb/event-top.c b/gdb/event-top.c
|
||||
index 96df89e0901..c7aa9e7d06a 100644
|
||||
--- a/gdb/event-top.c
|
||||
+++ b/gdb/event-top.c
|
||||
@@ -186,6 +186,22 @@ gdb_rl_callback_read_char_wrapper_noexcept () noexcept
|
||||
TRY_SJLJ
|
||||
{
|
||||
rl_callback_read_char ();
|
||||
+#if RL_VERSION_MAJOR >= 8
|
||||
+ /* It can happen that readline (while in rl_callback_read_char)
|
||||
+ received a signal, but didn't handle it yet. Make sure it's handled
|
||||
+ now. If we don't do that we run into two related problems:
|
||||
+ - we have to wait for another event triggering
|
||||
+ rl_callback_read_char before the signal is handled
|
||||
+ - there's no guarantee that the signal will be processed before the
|
||||
+ event. */
|
||||
+ while (rl_pending_signal () != 0)
|
||||
+ /* Do this in a while loop, in case rl_check_signals also leaves a
|
||||
+ pending signal. I'm not sure if that's possible, but it seems
|
||||
+ better to handle the scenario than to assert. */
|
||||
+ rl_check_signals ();
|
||||
+#else
|
||||
+ /* Unfortunately, rl_check_signals is not available. */
|
||||
+#endif
|
||||
if (after_char_processing_hook)
|
||||
(*after_char_processing_hook) ();
|
||||
}
|
@ -1,85 +0,0 @@
|
||||
gdb: improved EOF handling when using readline 7
|
||||
|
||||
In this commit:
|
||||
|
||||
commit a6b413d24ccc5d76179bab866834e11fd6fec294
|
||||
Date: Fri Mar 11 14:44:03 2022 +0000
|
||||
|
||||
gdb: work around prompt corruption caused by bracketed-paste-mode
|
||||
|
||||
a change was made to GDB to work around bug PR gdb/28833. The
|
||||
consequence of this work around is that, when bracketed paste mode is
|
||||
enabled in readline, and GDB is quit by sending EOF, then the output
|
||||
will look like this:
|
||||
|
||||
(gdb)
|
||||
quit
|
||||
|
||||
The ideal output, which is what we get when bracketed paste mode is
|
||||
off, is this:
|
||||
|
||||
(gdb) quit
|
||||
|
||||
The reason we need to make this change is explained in the original
|
||||
commit referenced above. What isn't mentioned in the above commit, is
|
||||
that the change that motivated this work around was only added in
|
||||
readline 8, older versions of readline don't require the change.
|
||||
|
||||
In later commits in this series I will add a fix to GDB's in-tree copy
|
||||
of readline (this fix is back-ported from upstream readline), and then
|
||||
I will change GDB so that, when using the (patched) in-tree readline,
|
||||
we can have the ideal output in all cases.
|
||||
|
||||
However, GDB can be built against the system readline. When this is
|
||||
done, and the system readline is version 8, then we will still have to
|
||||
use the work around (two line) style output.
|
||||
|
||||
But, if GDB is built against the system readline, and the system
|
||||
readline is an older version 7 readline, then there's no reason why we
|
||||
can't have the ideal output, after all, readline 7 doesn't include the
|
||||
change that we need to work around.
|
||||
|
||||
This commit changes GDB so that, when using readline 7 we get the
|
||||
ideal output in all cases. This change is trivial (a simple check
|
||||
against the readline version number) so I think this should be fine to
|
||||
include.
|
||||
|
||||
For testing this commit, you need to configure GDB including the
|
||||
'--with-system-readline' flag, and build GDB on a system that uses
|
||||
readline 7, for example 'Ubuntu 18.04'. Then run the test
|
||||
'gdb.base/eof-exit.exp', you should expect everything to PASS.
|
||||
|
||||
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28833
|
||||
|
||||
---
|
||||
gdb/event-top.c | 3 ++-
|
||||
gdb/testsuite/gdb.base/eof-exit.exp | 2 +-
|
||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gdb/event-top.c b/gdb/event-top.c
|
||||
index c1a95a4b748..7ddb3e8aee6 100644
|
||||
--- a/gdb/event-top.c
|
||||
+++ b/gdb/event-top.c
|
||||
@@ -783,7 +783,8 @@ command_line_handler (gdb::unique_xmalloc_ptr<char> &&rl)
|
||||
we first print '\n' to move to the next line, and then print the
|
||||
quit. This isn't ideal, but avoids corrupting the prompt. */
|
||||
const char *value = rl_variable_value ("enable-bracketed-paste");
|
||||
- if (value != nullptr && strcmp (value, "on") == 0)
|
||||
+ if (value != nullptr && strcmp (value, "on") == 0
|
||||
+ && ((rl_readline_version >> 8) & 0xff) > 0x07)
|
||||
printf_unfiltered ("\n");
|
||||
printf_unfiltered ("quit\n");
|
||||
execute_command ("quit", 1);
|
||||
diff --git a/gdb/testsuite/gdb.base/eof-exit.exp b/gdb/testsuite/gdb.base/eof-exit.exp
|
||||
index c88aced9f35..e04c38bf8d7 100644
|
||||
--- a/gdb/testsuite/gdb.base/eof-exit.exp
|
||||
+++ b/gdb/testsuite/gdb.base/eof-exit.exp
|
||||
@@ -67,7 +67,7 @@ proc run_test {} {
|
||||
# line after the 'quit', this catches that case.
|
||||
fail $gdb_test_name
|
||||
}
|
||||
- -re "$::gdb_prompt quit\[^\n\]*\r\n\[^\n\]*$" {
|
||||
+ -re "$::gdb_prompt \[^\n\r\]*quit\[^\n\]*\r\n\[^\n\]*$" {
|
||||
pass $gdb_test_name
|
||||
}
|
||||
eof {
|
@ -213,7 +213,7 @@ diff --git a/gdb/nat/linux-btrace.h b/gdb/nat/linux-btrace.h
|
||||
diff --git a/gdbsupport/common.m4 b/gdbsupport/common.m4
|
||||
--- a/gdbsupport/common.m4
|
||||
+++ b/gdbsupport/common.m4
|
||||
@@ -156,7 +156,7 @@ AC_DEFUN([GDB_AC_COMMON], [
|
||||
@@ -166,7 +166,7 @@ AC_DEFUN([GDB_AC_COMMON], [
|
||||
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <linux/perf_event.h>
|
||||
#ifndef PERF_ATTR_SIZE_VER5
|
||||
|
@ -1,229 +0,0 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-physname-pr11734-test.patch
|
||||
|
||||
;; Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz).
|
||||
;;=fedoratest
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2010-12/msg00263.html
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.cp/pr11734-1.cc b/gdb/testsuite/gdb.cp/pr11734-1.cc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/pr11734-1.cc
|
||||
@@ -0,0 +1,29 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@gnu.org */
|
||||
+
|
||||
+#include "pr11734.h"
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+ pr11734 *p = new pr11734;
|
||||
+ p->foo ();
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.cp/pr11734-2.cc b/gdb/testsuite/gdb.cp/pr11734-2.cc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/pr11734-2.cc
|
||||
@@ -0,0 +1,26 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@gnu.org */
|
||||
+
|
||||
+#include "pr11734.h"
|
||||
+
|
||||
+void
|
||||
+pr11734::foo(void)
|
||||
+{
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.cp/pr11734-3.cc b/gdb/testsuite/gdb.cp/pr11734-3.cc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/pr11734-3.cc
|
||||
@@ -0,0 +1,26 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@gnu.org */
|
||||
+
|
||||
+#include "pr11734.h"
|
||||
+
|
||||
+void
|
||||
+pr11734::foo (int a)
|
||||
+{
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.cp/pr11734-4.cc b/gdb/testsuite/gdb.cp/pr11734-4.cc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/pr11734-4.cc
|
||||
@@ -0,0 +1,26 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@gnu.org */
|
||||
+
|
||||
+#include "pr11734.h"
|
||||
+
|
||||
+void
|
||||
+pr11734::foo (char *a)
|
||||
+{
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.cp/pr11734.exp b/gdb/testsuite/gdb.cp/pr11734.exp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/pr11734.exp
|
||||
@@ -0,0 +1,55 @@
|
||||
+# Copyright 2010 Free Software Foundation, Inc.
|
||||
+#
|
||||
+# Contributed by Red Hat, originally written by Keith Seitz.
|
||||
+#
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+# This file is part of the gdb testsuite.
|
||||
+
|
||||
+if { [skip_cplus_tests] } { continue }
|
||||
+
|
||||
+set testfile "pr11734"
|
||||
+set class $testfile
|
||||
+
|
||||
+set srcfiles {}
|
||||
+for {set i 1} {$i < 5} {incr i} {
|
||||
+ lappend srcfiles $testfile-$i.cc
|
||||
+}
|
||||
+
|
||||
+prepare_for_testing pr11734 $testfile $srcfiles {c++ debug}
|
||||
+
|
||||
+if {![runto_main]} {
|
||||
+ perror "couldn't run to breakpoint"
|
||||
+ continue
|
||||
+}
|
||||
+
|
||||
+# An array holding the overload types for the method pr11734::foo. The
|
||||
+# first element is the overloaded method parameter. The second element
|
||||
+# is the expected source file number, e.g. "pr11734-?.cc".
|
||||
+array set tests {
|
||||
+ "char*" 4
|
||||
+ "int" 3
|
||||
+ "" 2
|
||||
+}
|
||||
+
|
||||
+# Test each overload instance twice: once quoted, once unquoted
|
||||
+foreach ovld [array names tests] {
|
||||
+ set method "${class}::foo\($ovld\)"
|
||||
+ set result "Breakpoint (\[0-9\]).*file .*/$class-$tests($ovld).*"
|
||||
+ gdb_test "break $method" $result
|
||||
+ gdb_test "break '$method'" $result
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
||||
+return 0
|
||||
diff --git a/gdb/testsuite/gdb.cp/pr11734.h b/gdb/testsuite/gdb.cp/pr11734.h
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/pr11734.h
|
||||
@@ -0,0 +1,27 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@gnu.org */
|
||||
+
|
||||
+class pr11734
|
||||
+{
|
||||
+ public:
|
||||
+ void foo ();
|
||||
+ void foo (int);
|
||||
+ void foo (char *);
|
||||
+};
|
@ -1,103 +0,0 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-physname-pr12273-test.patch
|
||||
|
||||
;; Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz).
|
||||
;;=fedoratest
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2010-12/msg00264.html
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.cp/pr12273.cc b/gdb/testsuite/gdb.cp/pr12273.cc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/pr12273.cc
|
||||
@@ -0,0 +1,37 @@
|
||||
+/* This test case is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+template <typename T>
|
||||
+class GDB
|
||||
+{
|
||||
+ public:
|
||||
+ static int simple (void) { return 0; }
|
||||
+ static int harder (T a) { return 1; }
|
||||
+ template <typename X>
|
||||
+ static X even_harder (T a) { return static_cast<X> (a); }
|
||||
+ int operator == (GDB const& other)
|
||||
+ { return 1; }
|
||||
+};
|
||||
+
|
||||
+int main(int argc, char **argv)
|
||||
+{
|
||||
+ GDB<int> a, b;
|
||||
+ if (a == b)
|
||||
+ return GDB<char>::harder('a') + GDB<int>::harder(3)
|
||||
+ + GDB<char>::even_harder<int> ('a');
|
||||
+ return GDB<int>::simple ();
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.cp/pr12273.exp b/gdb/testsuite/gdb.cp/pr12273.exp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/pr12273.exp
|
||||
@@ -0,0 +1,46 @@
|
||||
+# Copyright 2010 Free Software Foundation, Inc.
|
||||
+#
|
||||
+# Contributed by Red Hat, originally written by Keith Seitz.
|
||||
+#
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+# This file is part of the gdb testsuite.
|
||||
+
|
||||
+if {[skip_cplus_tests]} { continue }
|
||||
+
|
||||
+set testfile "pr12273"
|
||||
+# Do NOT compile with debug flag.
|
||||
+prepare_for_testing pr12273 $testfile $testfile.cc {c++}
|
||||
+
|
||||
+gdb_test_no_output "set language c++"
|
||||
+
|
||||
+# A list of minimal symbol names to check.
|
||||
+# Note that GDB<char>::even_harder<int>(char) is quoted and includes
|
||||
+# the return type. This is necessary because this is the demangled name
|
||||
+# of the minimal symbol.
|
||||
+set min_syms [list \
|
||||
+ "GDB<int>::operator ==" \
|
||||
+ "GDB<int>::operator==(GDB<int> const&)" \
|
||||
+ "GDB<char>::harder(char)" \
|
||||
+ "GDB<int>::harder(int)" \
|
||||
+ {"int GDB<char>::even_harder<int>(char)"} \
|
||||
+ "GDB<int>::simple()"]
|
||||
+
|
||||
+foreach sym $min_syms {
|
||||
+ if {[gdb_breakpoint $sym]} {
|
||||
+ pass "setting breakpoint at $sym"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
@ -1,303 +0,0 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-ppc-power7-test.patch
|
||||
|
||||
;; Test power7 ppc disassembly.
|
||||
;;=fedoratest
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-power7rh.exp b/gdb/testsuite/gdb.arch/powerpc-power7rh.exp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/powerpc-power7rh.exp
|
||||
@@ -0,0 +1,178 @@
|
||||
+# Copyright 2009 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 2 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program; if not, write to the Free Software
|
||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+
|
||||
+# Test PowerPC Power7 instructions disassembly.
|
||||
+
|
||||
+if {![istarget "powerpc*-*-*"]} then {
|
||||
+ verbose "Skipping PowerPC Power7 instructions disassembly."
|
||||
+ return
|
||||
+}
|
||||
+
|
||||
+set testfile "powerpc-power7rh"
|
||||
+set srcfile ${testfile}.s
|
||||
+set objfile [standard_output_file ${testfile}.o]
|
||||
+
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
|
||||
+ untested "PowerPC Power7 instructions disassembly"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load ${objfile}
|
||||
+
|
||||
+
|
||||
+# Disassemble the function.
|
||||
+
|
||||
+set test "disass func"
|
||||
+gdb_test_multiple $test $test {
|
||||
+ -re "\r\nDump of assembler code for function func:(\r\n.*\r\n)End of assembler dump.\r\n$gdb_prompt $" {
|
||||
+ set func $expect_out(1,string)
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+proc instr_to_patt {offset instr} {
|
||||
+ # 0x0000000000000018 <func+24>: stxvd2x vs43,r4,r5
|
||||
+ return ".*\r\n\[ \t\]*[string map {0x 0x0*} $offset] <(func)?\\+?\[0-9\]*>:\[ \t\]*[string map [list { } "\[ \t\]+" . {\.}] $instr]\[ \t\]*\r\n.*"
|
||||
+}
|
||||
+
|
||||
+# KFAIL strings would not exist if -Many would print the same as -Mpower7.
|
||||
+# That means the power7 form should be the preferred one.
|
||||
+# http://sourceware.org/ml/gdb-patches/2009-03/threads.html#00020
|
||||
+
|
||||
+proc func_check {offset instr {kfail ""}} {
|
||||
+ global func
|
||||
+
|
||||
+ set test "Found $offset: $instr"
|
||||
+ if [regexp -nocase -line [instr_to_patt $offset $instr] $func] {
|
||||
+ pass $test
|
||||
+ } elseif {$kfail != "" && [regexp -nocase -line [instr_to_patt $offset $kfail] $func]} {
|
||||
+ kfail gdb/NNNN $test
|
||||
+ } else {
|
||||
+ fail $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+func_check 0x0 "lxvd2x vs3,r4,r5"
|
||||
+# [PATCH] Remove support for POWER7 VSX load/store with update instructions
|
||||
+# http://sourceware.org/ml/binutils/2009-09/msg00680.html
|
||||
+# http://sourceware.org/ml/binutils-cvs/2009-09/msg00331.html
|
||||
+func_check 0x4 "lxvb16x vs3,r4,r5"
|
||||
+func_check 0x8 "lxvd2x vs43,r4,r5"
|
||||
+func_check 0xc "lxvb16x vs43,r4,r5"
|
||||
+func_check 0x10 "stxvd2x vs3,r4,r5"
|
||||
+func_check 0x14 "stxvb16x vs3,r4,r5"
|
||||
+func_check 0x18 "stxvd2x vs43,r4,r5"
|
||||
+func_check 0x1c "stxvb16x vs43,r4,r5"
|
||||
+func_check 0x20 "xxmrghd vs3,vs4,vs5"
|
||||
+func_check 0x24 "xxmrghd vs43,vs44,vs45"
|
||||
+func_check 0x28 "xxmrgld vs3,vs4,vs5"
|
||||
+func_check 0x2c "xxmrgld vs43,vs44,vs45"
|
||||
+func_check 0x30 "xxmrghd vs3,vs4,vs5"
|
||||
+func_check 0x34 "xxmrghd vs43,vs44,vs45"
|
||||
+func_check 0x38 "xxmrgld vs3,vs4,vs5"
|
||||
+func_check 0x3c "xxmrgld vs43,vs44,vs45"
|
||||
+func_check 0x40 "xxpermdi vs3,vs4,vs5,1"
|
||||
+func_check 0x44 "xxpermdi vs43,vs44,vs45,1"
|
||||
+func_check 0x48 "xxpermdi vs3,vs4,vs5,2"
|
||||
+func_check 0x4c "xxpermdi vs43,vs44,vs45,2"
|
||||
+func_check 0x50 "xvmovdp vs3,vs4"
|
||||
+func_check 0x54 "xvmovdp vs43,vs44"
|
||||
+func_check 0x58 "xvmovdp vs3,vs4"
|
||||
+func_check 0x5c "xvmovdp vs43,vs44"
|
||||
+func_check 0x60 "xvcpsgndp vs3,vs4,vs5"
|
||||
+func_check 0x64 "xvcpsgndp vs43,vs44,vs45"
|
||||
+func_check 0x68 "wait"
|
||||
+func_check 0x6c "wait"
|
||||
+func_check 0x70 "waitrsv"
|
||||
+func_check 0x74 "waitrsv"
|
||||
+func_check 0x78 "waitimpl"
|
||||
+func_check 0x7c "waitimpl"
|
||||
+func_check 0x80 "doze"
|
||||
+func_check 0x84 "nap"
|
||||
+func_check 0x88 "sleep"
|
||||
+func_check 0x8c "rvwinkle"
|
||||
+func_check 0x90 "prtyw r3,r4"
|
||||
+func_check 0x94 "prtyd r13,r14"
|
||||
+func_check 0x98 "mfcfar r10" "mfspr r10,28"
|
||||
+func_check 0x9c "mtcfar r11" "mtspr 28,r11"
|
||||
+func_check 0xa0 "cmpb r3,r4,r5"
|
||||
+func_check 0xa4 "lwzcix r10,r11,r12"
|
||||
+func_check 0xa8 "dadd f16,f17,f18"
|
||||
+func_check 0xac "daddq f20,f22,f24"
|
||||
+func_check 0xb0 "dss 3"
|
||||
+func_check 0xb4 "dssall"
|
||||
+func_check 0xb8 "dst r5,r4,1"
|
||||
+func_check 0xbc "dstt r8,r7,0"
|
||||
+func_check 0xc0 "dstst r5,r6,3"
|
||||
+func_check 0xc4 "dststt r4,r5,2"
|
||||
+func_check 0xc8 "divwe r10,r11,r12"
|
||||
+func_check 0xcc "divwe. r11,r12,r13"
|
||||
+func_check 0xd0 "divweo r12,r13,r14"
|
||||
+func_check 0xd4 "divweo. r13,r14,r15"
|
||||
+func_check 0xd8 "divweu r10,r11,r12"
|
||||
+func_check 0xdc "divweu. r11,r12,r13"
|
||||
+func_check 0xe0 "divweuo r12,r13,r14"
|
||||
+func_check 0xe4 "divweuo. r13,r14,r15"
|
||||
+func_check 0xe8 "bpermd r7,r17,r27"
|
||||
+func_check 0xec "popcntw r10,r20"
|
||||
+func_check 0xf0 "popcntd r10,r20"
|
||||
+func_check 0xf4 "ldbrx r20,r21,r22"
|
||||
+func_check 0xf8 "stdbrx r20,r21,r22"
|
||||
+func_check 0xfc "lfiwzx f10,0,r10"
|
||||
+func_check 0x100 "lfiwzx f10,r9,r10"
|
||||
+func_check 0x104 "fcfids f4,f5"
|
||||
+func_check 0x108 "fcfids. f4,f5"
|
||||
+func_check 0x10c "fcfidus f4,f5"
|
||||
+func_check 0x110 "fcfidus. f4,f5"
|
||||
+func_check 0x114 "fctiwu f4,f5"
|
||||
+func_check 0x118 "fctiwu. f4,f5"
|
||||
+func_check 0x11c "fctiwuz f4,f5"
|
||||
+func_check 0x120 "fctiwuz. f4,f5"
|
||||
+func_check 0x124 "fctidu f4,f5"
|
||||
+func_check 0x128 "fctidu. f4,f5"
|
||||
+func_check 0x12c "fctiduz f4,f5"
|
||||
+func_check 0x130 "fctiduz. f4,f5"
|
||||
+func_check 0x134 "fcfidu f4,f5"
|
||||
+func_check 0x138 "fcfidu. f4,f5"
|
||||
+func_check 0x13c "ftdiv cr0,f10,f11"
|
||||
+func_check 0x140 "ftdiv cr7,f10,f11"
|
||||
+func_check 0x144 "ftsqrt cr0,f10"
|
||||
+func_check 0x148 "ftsqrt cr7,f10"
|
||||
+func_check 0x14c "dcbtt r8,r9" "dcbt 16,r8,r9"
|
||||
+func_check 0x150 "dcbtstt r8,r9" "dcbtst 16,r8,r9"
|
||||
+func_check 0x154 "dcffix f10,f12"
|
||||
+func_check 0x158 "dcffix. f20,f22"
|
||||
+func_check 0x15c "lbarx r10,r11,r12"
|
||||
+func_check 0x160 "lbarx r10,r11,r12"
|
||||
+func_check 0x164 "lbarx r10,r11,r12,1"
|
||||
+func_check 0x168 "lharx r20,r21,r22"
|
||||
+func_check 0x16c "lharx r20,r21,r22"
|
||||
+func_check 0x170 "lharx r20,r21,r22,1"
|
||||
+func_check 0x174 "stbcx. r10,r11,r12"
|
||||
+func_check 0x178 "sthcx. r10,r11,r12"
|
||||
+func_check 0x17c "fre f14,f15"
|
||||
+func_check 0x180 "fre. f14,f15"
|
||||
+func_check 0x184 "fres f14,f15"
|
||||
+func_check 0x188 "fres. f14,f15"
|
||||
+func_check 0x18c "frsqrte f14,f15"
|
||||
+func_check 0x190 "frsqrte. f14,f15"
|
||||
+func_check 0x194 "frsqrtes f14,f15"
|
||||
+func_check 0x198 "frsqrtes. f14,f15"
|
||||
+func_check 0x19c "isel r2,r3,r4,28"
|
||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-power7rh.s b/gdb/testsuite/gdb.arch/powerpc-power7rh.s
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/powerpc-power7rh.s
|
||||
@@ -0,0 +1,107 @@
|
||||
+ .text
|
||||
+ .globl func
|
||||
+func:
|
||||
+ .long 0x7c642e98 /* 0: lxvd2x vs3,r4,r5 */
|
||||
+ .long 0x7c642ed8 /* 4: lxvd2ux vs3,r4,r5 */
|
||||
+ .long 0x7d642e99 /* 8: lxvd2x vs43,r4,r5 */
|
||||
+ .long 0x7d642ed9 /* c: lxvd2ux vs43,r4,r5 */
|
||||
+ .long 0x7c642f98 /* 10: stxvd2x vs3,r4,r5 */
|
||||
+ .long 0x7c642fd8 /* 14: stxvd2ux vs3,r4,r5 */
|
||||
+ .long 0x7d642f99 /* 18: stxvd2x vs43,r4,r5 */
|
||||
+ .long 0x7d642fd9 /* 1c: stxvd2ux vs43,r4,r5 */
|
||||
+ .long 0xf0642850 /* 20: xxmrghd vs3,vs4,vs5 */
|
||||
+ .long 0xf16c6857 /* 24: xxmrghd vs43,vs44,vs45 */
|
||||
+ .long 0xf0642b50 /* 28: xxmrgld vs3,vs4,vs5 */
|
||||
+ .long 0xf16c6b57 /* 2c: xxmrgld vs43,vs44,vs45 */
|
||||
+ .long 0xf0642850 /* 30: xxmrghd vs3,vs4,vs5 */
|
||||
+ .long 0xf16c6857 /* 34: xxmrghd vs43,vs44,vs45 */
|
||||
+ .long 0xf0642b50 /* 38: xxmrgld vs3,vs4,vs5 */
|
||||
+ .long 0xf16c6b57 /* 3c: xxmrgld vs43,vs44,vs45 */
|
||||
+ .long 0xf0642950 /* 40: xxpermdi vs3,vs4,vs5,1 */
|
||||
+ .long 0xf16c6957 /* 44: xxpermdi vs43,vs44,vs45,1 */
|
||||
+ .long 0xf0642a50 /* 48: xxpermdi vs3,vs4,vs5,2 */
|
||||
+ .long 0xf16c6a57 /* 4c: xxpermdi vs43,vs44,vs45,2 */
|
||||
+ .long 0xf0642780 /* 50: xvmovdp vs3,vs4 */
|
||||
+ .long 0xf16c6787 /* 54: xvmovdp vs43,vs44 */
|
||||
+ .long 0xf0642780 /* 58: xvmovdp vs3,vs4 */
|
||||
+ .long 0xf16c6787 /* 5c: xvmovdp vs43,vs44 */
|
||||
+ .long 0xf0642f80 /* 60: xvcpsgndp vs3,vs4,vs5 */
|
||||
+ .long 0xf16c6f87 /* 64: xvcpsgndp vs43,vs44,vs45 */
|
||||
+ .long 0x7c00007c /* 68: wait */
|
||||
+ .long 0x7c00007c /* 6c: wait */
|
||||
+ .long 0x7c20007c /* 70: waitrsv */
|
||||
+ .long 0x7c20007c /* 74: waitrsv */
|
||||
+ .long 0x7c40007c /* 78: waitimpl */
|
||||
+ .long 0x7c40007c /* 7c: waitimpl */
|
||||
+ .long 0x4c000324 /* 80: doze */
|
||||
+ .long 0x4c000364 /* 84: nap */
|
||||
+ .long 0x4c0003a4 /* 88: sleep */
|
||||
+ .long 0x4c0003e4 /* 8c: rvwinkle */
|
||||
+ .long 0x7c830134 /* 90: prtyw r3,r4 */
|
||||
+ .long 0x7dcd0174 /* 94: prtyd r13,r14 */
|
||||
+ .long 0x7d5c02a6 /* 98: mfcfar r10 */
|
||||
+ .long 0x7d7c03a6 /* 9c: mtcfar r11 */
|
||||
+ .long 0x7c832bf8 /* a0: cmpb r3,r4,r5 */
|
||||
+ .long 0x7d4b662a /* a4: lwzcix r10,r11,r12 */
|
||||
+ .long 0xee119004 /* a8: dadd f16,f17,f18 */
|
||||
+ .long 0xfe96c004 /* ac: daddq f20,f22,f24 */
|
||||
+ .long 0x7c60066c /* b0: dss 3 */
|
||||
+ .long 0x7e00066c /* b4: dssall */
|
||||
+ .long 0x7c2522ac /* b8: dst r5,r4,1 */
|
||||
+ .long 0x7e083aac /* bc: dstt r8,r7,0 */
|
||||
+ .long 0x7c6532ec /* c0: dstst r5,r6,3 */
|
||||
+ .long 0x7e442aec /* c4: dststt r4,r5,2 */
|
||||
+ .long 0x7d4b6356 /* c8: divwe r10,r11,r12 */
|
||||
+ .long 0x7d6c6b57 /* cc: divwe. r11,r12,r13 */
|
||||
+ .long 0x7d8d7756 /* d0: divweo r12,r13,r14 */
|
||||
+ .long 0x7dae7f57 /* d4: divweo. r13,r14,r15 */
|
||||
+ .long 0x7d4b6316 /* d8: divweu r10,r11,r12 */
|
||||
+ .long 0x7d6c6b17 /* dc: divweu. r11,r12,r13 */
|
||||
+ .long 0x7d8d7716 /* e0: divweuo r12,r13,r14 */
|
||||
+ .long 0x7dae7f17 /* e4: divweuo. r13,r14,r15 */
|
||||
+ .long 0x7e27d9f8 /* e8: bpermd r7,r17,r27 */
|
||||
+ .long 0x7e8a02f4 /* ec: popcntw r10,r20 */
|
||||
+ .long 0x7e8a03f4 /* f0: popcntd r10,r20 */
|
||||
+ .long 0x7e95b428 /* f4: ldbrx r20,r21,r22 */
|
||||
+ .long 0x7e95b528 /* f8: stdbrx r20,r21,r22 */
|
||||
+ .long 0x7d4056ee /* fc: lfiwzx f10,0,r10 */
|
||||
+ .long 0x7d4956ee /* 100: lfiwzx f10,r9,r10 */
|
||||
+ .long 0xec802e9c /* 104: fcfids f4,f5 */
|
||||
+ .long 0xec802e9d /* 108: fcfids. f4,f5 */
|
||||
+ .long 0xec802f9c /* 10c: fcfidus f4,f5 */
|
||||
+ .long 0xec802f9d /* 110: fcfidus. f4,f5 */
|
||||
+ .long 0xfc80291c /* 114: fctiwu f4,f5 */
|
||||
+ .long 0xfc80291d /* 118: fctiwu. f4,f5 */
|
||||
+ .long 0xfc80291e /* 11c: fctiwuz f4,f5 */
|
||||
+ .long 0xfc80291f /* 120: fctiwuz. f4,f5 */
|
||||
+ .long 0xfc802f5c /* 124: fctidu f4,f5 */
|
||||
+ .long 0xfc802f5d /* 128: fctidu. f4,f5 */
|
||||
+ .long 0xfc802f5e /* 12c: fctiduz f4,f5 */
|
||||
+ .long 0xfc802f5f /* 130: fctiduz. f4,f5 */
|
||||
+ .long 0xfc802f9c /* 134: fcfidu f4,f5 */
|
||||
+ .long 0xfc802f9d /* 138: fcfidu. f4,f5 */
|
||||
+ .long 0xfc0a5900 /* 13c: ftdiv cr0,f10,f11 */
|
||||
+ .long 0xff8a5900 /* 140: ftdiv cr7,f10,f11 */
|
||||
+ .long 0xfc005140 /* 144: ftsqrt cr0,f10 */
|
||||
+ .long 0xff805140 /* 148: ftsqrt cr7,f10 */
|
||||
+ .long 0x7e084a2c /* 14c: dcbtt r8,r9 */
|
||||
+ .long 0x7e0849ec /* 150: dcbtstt r8,r9 */
|
||||
+ .long 0xed406644 /* 154: dcffix f10,f12 */
|
||||
+ .long 0xee80b645 /* 158: dcffix. f20,f22 */
|
||||
+ .long 0x7d4b6068 /* 15c: lbarx r10,r11,r12 */
|
||||
+ .long 0x7d4b6068 /* 160: lbarx r10,r11,r12 */
|
||||
+ .long 0x7d4b6069 /* 164: lbarx r10,r11,r12,1 */
|
||||
+ .long 0x7e95b0e8 /* 168: lharx r20,r21,r22 */
|
||||
+ .long 0x7e95b0e8 /* 16c: lharx r20,r21,r22 */
|
||||
+ .long 0x7e95b0e9 /* 170: lharx r20,r21,r22,1 */
|
||||
+ .long 0x7d4b656d /* 174: stbcx. r10,r11,r12 */
|
||||
+ .long 0x7d4b65ad /* 178: sthcx. r10,r11,r12 */
|
||||
+ .long 0xfdc07830 /* 17c: fre f14,f15 */
|
||||
+ .long 0xfdc07831 /* 180: fre. f14,f15 */
|
||||
+ .long 0xedc07830 /* 184: fres f14,f15 */
|
||||
+ .long 0xedc07831 /* 188: fres. f14,f15 */
|
||||
+ .long 0xfdc07834 /* 18c: frsqrte f14,f15 */
|
||||
+ .long 0xfdc07835 /* 190: frsqrte. f14,f15 */
|
||||
+ .long 0xedc07834 /* 194: frsqrtes f14,f15 */
|
||||
+ .long 0xedc07835 /* 198: frsqrtes. f14,f15 */
|
||||
+ .long 0x7c43271e /* 19c: isel r2,r3,r4,28 */
|
@ -1,71 +0,0 @@
|
||||
[gdb/record] Handle statx system call
|
||||
|
||||
When running test-case gdb.reverse/fstatat-reverse.exp with target board
|
||||
unix/-m32 on openSUSE Tumbleweed, I run into:
|
||||
...
|
||||
(gdb) PASS: gdb.reverse/fstatat-reverse.exp: set breakpoint at marker2
|
||||
continue^M
|
||||
Continuing.^M
|
||||
Process record and replay target doesn't support syscall number 383^M
|
||||
Process record: failed to record execution log.^M
|
||||
^M
|
||||
Program stopped.^M
|
||||
0xf7fc5555 in __kernel_vsyscall ()^M
|
||||
(gdb) FAIL: gdb.reverse/fstatat-reverse.exp: continue to breakpoint: marker2
|
||||
...
|
||||
|
||||
The problems is that while with native we're trying to record these syscalls
|
||||
(showing strace output):
|
||||
...
|
||||
openat(AT_FDCWD, "/", O_RDONLY|O_PATH) = 3
|
||||
newfstatat(3, ".", {st_mode=S_IFDIR|0755, st_size=146, ...}, 0) = 0
|
||||
...
|
||||
with unix/-m32 we have instead:
|
||||
...
|
||||
openat(AT_FDCWD, "/", O_RDONLY|O_PATH) = 3
|
||||
statx(3, ".", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, \
|
||||
{stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=STATX_ATTR_MOUNT_ROOT, \
|
||||
stx_mode=S_IFDIR|0755, stx_size=146, ...}) = 0
|
||||
...
|
||||
and statx is not supported.
|
||||
|
||||
Fix this by adding support for recording syscall statx.
|
||||
|
||||
Tested on x86_64-linux.
|
||||
|
||||
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28461
|
||||
|
||||
---
|
||||
gdb/linux-record.c | 6 ++++++
|
||||
gdb/linux-record.h | 1 +
|
||||
2 files changed, 7 insertions(+)
|
||||
|
||||
diff --git a/gdb/linux-record.c b/gdb/linux-record.c
|
||||
index 0a84bad6983..0af1ef2a9e0 100644
|
||||
--- a/gdb/linux-record.c
|
||||
+++ b/gdb/linux-record.c
|
||||
@@ -1046,6 +1046,12 @@ Do you want to stop the program?"),
|
||||
return -1;
|
||||
break;
|
||||
|
||||
+ case gdb_sys_statx:
|
||||
+ regcache_raw_read_unsigned (regcache, tdep->arg5, &tmpulongest);
|
||||
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, 256))
|
||||
+ return -1;
|
||||
+ break;
|
||||
+
|
||||
case gdb_sys_uname:
|
||||
if (record_mem_at_reg (regcache, tdep->arg1,
|
||||
tdep->size_old_utsname))
|
||||
diff --git a/gdb/linux-record.h b/gdb/linux-record.h
|
||||
index 07f0c5a2604..219c67f888d 100644
|
||||
--- a/gdb/linux-record.h
|
||||
+++ b/gdb/linux-record.h
|
||||
@@ -510,6 +510,7 @@ enum gdb_syscall {
|
||||
gdb_sys_dup3 = 330,
|
||||
gdb_sys_pipe2 = 331,
|
||||
gdb_sys_inotify_init1 = 332,
|
||||
+ gdb_sys_statx = 383,
|
||||
gdb_sys_socket = 500,
|
||||
gdb_sys_connect = 501,
|
||||
gdb_sys_accept = 502,
|
@ -1,371 +0,0 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-rhbz1156192-recursive-dlopen-test.patch
|
||||
|
||||
;; Testcase for '[SAP] Recursive dlopen causes SAP HANA installer to
|
||||
;; crash.' (RH BZ 1156192).
|
||||
;;=fedoratest
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libbar.c b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libbar.c
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libbar.c
|
||||
@@ -0,0 +1,30 @@
|
||||
+/* Testcase for recursive dlopen calls.
|
||||
+
|
||||
+ Copyright (C) 2014 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This file is part of GDB.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+/* This test was copied from glibc's testcase called
|
||||
+ <dlfcn/tst-rec-dlopen.c> and related files. */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
+void
|
||||
+bar (void)
|
||||
+{
|
||||
+ printf ("Called bar.\n");
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libfoo.c b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libfoo.c
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libfoo.c
|
||||
@@ -0,0 +1,30 @@
|
||||
+/* Testcase for recursive dlopen calls.
|
||||
+
|
||||
+ Copyright (C) 2014 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This file is part of GDB.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+/* This test was copied from glibc's testcase called
|
||||
+ <dlfcn/tst-rec-dlopen.c> and related files. */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
+void
|
||||
+foo (void)
|
||||
+{
|
||||
+ printf ("Called foo.\n");
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.c b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.c
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.c
|
||||
@@ -0,0 +1,125 @@
|
||||
+/* Testcase for recursive dlopen calls.
|
||||
+
|
||||
+ Copyright (C) 2014 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This file is part of GDB.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+/* This test was copied from glibc's testcase called
|
||||
+ <dlfcn/tst-rec-dlopen.c> and related files. */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <malloc.h>
|
||||
+#include <dlfcn.h>
|
||||
+
|
||||
+#define DSO "gdb-rhbz1156192-recursive-dlopen-libfoo.so"
|
||||
+#define FUNC "foo"
|
||||
+
|
||||
+#define DSO1 "gdb-rhbz1156192-recursive-dlopen-libbar.so"
|
||||
+#define FUNC1 "bar"
|
||||
+
|
||||
+/* Prototype for my hook. */
|
||||
+void *custom_malloc_hook (size_t, const void *);
|
||||
+
|
||||
+/* Pointer to old malloc hooks. */
|
||||
+void *(*old_malloc_hook) (size_t, const void *);
|
||||
+
|
||||
+/* Call function func_name in DSO dso_name via dlopen. */
|
||||
+void
|
||||
+call_func (const char *dso_name, const char *func_name)
|
||||
+{
|
||||
+ int ret;
|
||||
+ void *dso;
|
||||
+ void (*func) (void);
|
||||
+ char *err;
|
||||
+
|
||||
+ /* Open the DSO. */
|
||||
+ dso = dlopen (dso_name, RTLD_NOW|RTLD_GLOBAL);
|
||||
+ if (dso == NULL)
|
||||
+ {
|
||||
+ err = dlerror ();
|
||||
+ fprintf (stderr, "%s\n", err);
|
||||
+ exit (1);
|
||||
+ }
|
||||
+ /* Clear any errors. */
|
||||
+ dlerror ();
|
||||
+
|
||||
+ /* Lookup func. */
|
||||
+ *(void **) (&func) = dlsym (dso, func_name);
|
||||
+ if (func == NULL)
|
||||
+ {
|
||||
+ err = dlerror ();
|
||||
+ if (err != NULL)
|
||||
+ {
|
||||
+ fprintf (stderr, "%s\n", err);
|
||||
+ exit (1);
|
||||
+ }
|
||||
+ }
|
||||
+ /* Call func twice. */
|
||||
+ (*func) ();
|
||||
+
|
||||
+ /* Close the library and look for errors too. */
|
||||
+ ret = dlclose (dso);
|
||||
+ if (ret != 0)
|
||||
+ {
|
||||
+ err = dlerror ();
|
||||
+ fprintf (stderr, "%s\n", err);
|
||||
+ exit (1);
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
+
|
||||
+/* Empty hook that does nothing. */
|
||||
+void *
|
||||
+custom_malloc_hook (size_t size, const void *caller)
|
||||
+{
|
||||
+ void *result;
|
||||
+ /* Restore old hooks. */
|
||||
+ __malloc_hook = old_malloc_hook;
|
||||
+ /* First call a function in another library via dlopen. */
|
||||
+ call_func (DSO1, FUNC1);
|
||||
+ /* Called recursively. */
|
||||
+ result = malloc (size);
|
||||
+ /* Restore new hooks. */
|
||||
+ old_malloc_hook = __malloc_hook;
|
||||
+ __malloc_hook = custom_malloc_hook;
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+
|
||||
+ /* Save old hook. */
|
||||
+ old_malloc_hook = __malloc_hook;
|
||||
+ /* Install new hook. */
|
||||
+ __malloc_hook = custom_malloc_hook;
|
||||
+
|
||||
+ /* Attempt to dlopen a shared library. This dlopen will
|
||||
+ trigger an access to the ld.so.cache, and that in turn
|
||||
+ will require a malloc to duplicate data in the cache.
|
||||
+ The malloc will call our malloc hook which calls dlopen
|
||||
+ recursively, and upon return of this dlopen the non-ref
|
||||
+ counted ld.so.cache mapping will be unmapped. We will
|
||||
+ return to the original dlopen and crash trying to access
|
||||
+ dlopened data. */
|
||||
+ call_func (DSO, FUNC);
|
||||
+
|
||||
+ /* Restore old hook. */
|
||||
+ __malloc_hook = old_malloc_hook;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.exp b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.exp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.exp
|
||||
@@ -0,0 +1,157 @@
|
||||
+# Copyright 2014 Free Software Foundation, Inc.
|
||||
+#
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+if {[skip_shlib_tests]} {
|
||||
+ untested "skipping shlib tests"
|
||||
+ return 0
|
||||
+} elseif {[use_gdb_stub]} {
|
||||
+ untested "skipping tests because of stub"
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+# Library foo
|
||||
+set libname1 "gdb-rhbz1156192-recursive-dlopen-libfoo"
|
||||
+set srcfile_lib1 ${srcdir}/${subdir}/${libname1}.c
|
||||
+set binfile_lib1 [standard_output_file ${libname1}.so]
|
||||
+# Library bar
|
||||
+set libname2 "gdb-rhbz1156192-recursive-dlopen-libbar"
|
||||
+set srcfile_lib2 ${srcdir}/${subdir}/${libname2}.c
|
||||
+set binfile_lib2 [standard_output_file ${libname2}.so]
|
||||
+
|
||||
+set testfile "gdb-rhbz1156192-recursive-dlopen"
|
||||
+set srcfile ${testfile}.c
|
||||
+set executable ${testfile}
|
||||
+set binfile [standard_output_file ${executable}]
|
||||
+
|
||||
+if { [gdb_compile_shlib ${srcfile_lib1} ${binfile_lib1} \
|
||||
+ { debug "additional_flags=-fPIC" }] != "" } {
|
||||
+ untested "Could not compile ${binfile_lib1}"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if { [gdb_compile_shlib ${srcfile_lib2} ${binfile_lib2} \
|
||||
+ { debug "additional_flags=-fPIC" }] != "" } {
|
||||
+ untested "Could not compile ${binfile_lib2}"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if { [prepare_for_testing ${testfile}.exp ${executable} ${srcfile} \
|
||||
+ [ list debug shlib_load "additional_flags=-Wno-deprecated-declarations" ]] } {
|
||||
+ untested "Could not compile ${executable}"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+set supported 0
|
||||
+gdb_test_multiple "run" "initial trial run" {
|
||||
+ -re -wrap "exited normally.*" {
|
||||
+ set supported 1
|
||||
+ pass $gdb_test_name
|
||||
+ }
|
||||
+ -re -wrap "exited with code.*" {
|
||||
+ untested "failed at $gdb_test_name"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+if { $supported == 0 } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+proc do_test { has_libfoo has_libbar } {
|
||||
+ global hex binfile_lib2 binfile_lib1 gdb_prompt
|
||||
+ set libbar_match "[string_to_regexp $binfile_lib2]"
|
||||
+ set libfoo_match "[string_to_regexp $binfile_lib1]"
|
||||
+
|
||||
+ gdb_test_multiple "info shared" "info shared" {
|
||||
+ -re ".*$libfoo_match\r\n.*$libbar_match\(\r\n.*Shared library is missing\)?.*\r\n${gdb_prompt} $" {
|
||||
+ if { $has_libfoo && $has_libbar } {
|
||||
+ pass "matched libfoo and libbar"
|
||||
+ } else {
|
||||
+ fail "matched libfoo and libbar (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
|
||||
+ }
|
||||
+ }
|
||||
+ -re ".*$libfoo_match\(\r\n.*Shared library is missing\)?.*\r\n${gdb_prompt} $" {
|
||||
+ if { $has_libfoo && !$has_libbar } {
|
||||
+ pass "matched libfoo"
|
||||
+ } else {
|
||||
+ fail "matched libfoo (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
|
||||
+ }
|
||||
+ }
|
||||
+ -re ".*$libbar_match\(\r\n.*Shared library is missing\)?.*\r\n${gdb_prompt} $" {
|
||||
+ if { $has_libbar && !$has_libfoo } {
|
||||
+ pass "matched libbar"
|
||||
+ } else {
|
||||
+ fail "matched libbar (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
|
||||
+ }
|
||||
+ }
|
||||
+ "\r\n${gdb_prompt} $" {
|
||||
+ if { !$has_libfoo && !$has_libbar } {
|
||||
+ pass "did not match libfoo nor libbar"
|
||||
+ } else {
|
||||
+ fail "did not match libfoo nor libbar (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+proc test_stop_on_solib_events { } {
|
||||
+ set pass 0
|
||||
+ # This variable holds the information about whether libfoo and
|
||||
+ # libbar (respectively) are expected in the "info shared" output.
|
||||
+ set solib_event_order { { 0 0 } { 0 0 } { 0 0 } { 0 1 } \
|
||||
+ { 0 1 } { 0 0 } { 0 0 } { 0 1 } \
|
||||
+ { 0 1 } { 0 0 } { 0 0 } { 0 1 } \
|
||||
+ { 0 1 } { 0 0 } { 0 0 1 } { 1 1 } \
|
||||
+ { 1 1 } { 1 0 } { 1 0 } { 1 1 } \
|
||||
+ { 1 1 } { 1 0 1 } { 1 0 } { 1 0 } }
|
||||
+
|
||||
+ with_test_prefix "stop-on-solib-events" {
|
||||
+ gdb_test_no_output "set stop-on-solib-events 1" "setting stop-on-solib-events"
|
||||
+
|
||||
+ gdb_run_cmd
|
||||
+ gdb_test "" "Wait for first prompt"
|
||||
+ foreach l $solib_event_order {
|
||||
+ incr pass
|
||||
+ with_test_prefix "pass #$pass" {
|
||||
+ set should_be_corrupted [expr 0+0[lindex $l 2]]
|
||||
+ do_test [lindex $l 0] [lindex $l 1]
|
||||
+ set test "continue"
|
||||
+ global gdb_prompt
|
||||
+ gdb_test_multiple $test $test {
|
||||
+ -re "\r\nwarning: Corrupted shared library list:.*\r\nStopped due to shared library event.*\r\n$gdb_prompt $" {
|
||||
+ set corrupted 1
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "\r\nStopped due to shared library event.*\r\n$gdb_prompt $" {
|
||||
+ set corrupted 0
|
||||
+ pass $test
|
||||
+ }
|
||||
+ }
|
||||
+ set test "corrupted=$corrupted but should_be_corrupted=$should_be_corrupted"
|
||||
+ if {$corrupted == $should_be_corrupted} {
|
||||
+ pass $test
|
||||
+ } else {
|
||||
+ fail $test
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ # In the last pass we do not expect to see libfoo or libbar.
|
||||
+ incr pass
|
||||
+ with_test_prefix "pass #$pass" {
|
||||
+ do_test 0 0
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+test_stop_on_solib_events
|
@ -1,176 +0,0 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-rhbz1325795-framefilters-test.patch
|
||||
|
||||
;; New test for Python "Cannot locate object file for block" (for RH BZ 1325795).
|
||||
;;=fedoratest
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.python/py-framefilter-thread.c b/gdb/testsuite/gdb.python/py-framefilter-thread.c
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.python/py-framefilter-thread.c
|
||||
@@ -0,0 +1,39 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2016 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#include <pthread.h>
|
||||
+#include <assert.h>
|
||||
+
|
||||
+static void *
|
||||
+start (void *arg)
|
||||
+{
|
||||
+ return arg; /* Backtrace end breakpoint */
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ pthread_t thread1;
|
||||
+ int i;
|
||||
+
|
||||
+ i = pthread_create (&thread1, NULL, start, NULL);
|
||||
+ assert (i == 0);
|
||||
+ i = pthread_join (thread1, NULL);
|
||||
+ assert (i == 0);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.python/py-framefilter-thread.exp b/gdb/testsuite/gdb.python/py-framefilter-thread.exp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.python/py-framefilter-thread.exp
|
||||
@@ -0,0 +1,54 @@
|
||||
+# Copyright (C) 2016 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+load_lib gdb-python.exp
|
||||
+
|
||||
+standard_testfile
|
||||
+
|
||||
+if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug pthreads}]} {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# Skip all tests if Python scripting is not enabled.
|
||||
+if { [skip_python_tests] } { continue }
|
||||
+
|
||||
+if ![runto_main] then {
|
||||
+ return
|
||||
+}
|
||||
+gdb_test_no_output "set python print-stack full" \
|
||||
+ "Set python print-stack to full"
|
||||
+
|
||||
+# Load global frame-filters
|
||||
+set remote_python_file [remote_download host ${srcdir}/${subdir}/${testfile}.py]
|
||||
+gdb_test_no_output "python exec (open ('${remote_python_file}').read ())" \
|
||||
+ "Load python file"
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "Backtrace end breakpoint"]
|
||||
+gdb_continue_to_breakpoint "Backtrace end breakpoint"
|
||||
+
|
||||
+# #2 0x00007ffff75f228d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113^M
|
||||
+gdb_test "bt no-filters" " in (\\.?_*clone|thread_start) \[^\r\n\]*" "bt no-filters"
|
||||
+
|
||||
+# #2 0x00007ffff75f228d in 941595343737041 () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113^M
|
||||
+# vs.
|
||||
+# #2 0x00007ffff75f228d in 941595343737041Traceback (most recent call last):
|
||||
+# File "/home/jkratoch/redhat/rhel/gdb/rhel-7.3/gdb-7.6.1/gdb/testsuite/../data-directory/python/gdb/FrameDecorator.py", line 145, in frame_args
|
||||
+# return self._base.frame_args()
|
||||
+# File "/home/jkratoch/redhat/rhel/gdb/rhel-7.3/gdb-7.6.1/gdb/testsuite/../data-directory/python/gdb/FrameDecorator.py", line 152, in frame_args
|
||||
+# return args.fetch_frame_args()
|
||||
+# File "/home/jkratoch/redhat/rhel/gdb/rhel-7.3/gdb-7.6.1/gdb/testsuite/../data-directory/python/gdb/FrameDecorator.py", line 276, in fetch_frame_args
|
||||
+# block = self.frame.block()
|
||||
+# RuntimeError: Cannot locate object file for block.
|
||||
+gdb_test "bt" " in \[0-9\]+ \[^\r\n\]*" "bt with filters"
|
||||
diff --git a/gdb/testsuite/gdb.python/py-framefilter-thread.py b/gdb/testsuite/gdb.python/py-framefilter-thread.py
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.python/py-framefilter-thread.py
|
||||
@@ -0,0 +1,60 @@
|
||||
+# Copyright (C) 2016 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+# This file is part of the GDB testsuite. It tests Python-based
|
||||
+# frame-filters.
|
||||
+
|
||||
+# This test is specifically crafted for RH BZ 1197665.
|
||||
+
|
||||
+import gdb
|
||||
+import itertools
|
||||
+from gdb.FrameDecorator import FrameDecorator
|
||||
+import copy
|
||||
+
|
||||
+class Reverse_Function (FrameDecorator):
|
||||
+
|
||||
+ def __init__(self, fobj):
|
||||
+ super(Reverse_Function, self).__init__(fobj)
|
||||
+ self.fobj = fobj
|
||||
+
|
||||
+ def function (self):
|
||||
+ # This function call should not fail.
|
||||
+ gdb.target_charset ()
|
||||
+
|
||||
+ fname = str (self.fobj.function())
|
||||
+ if (fname == None or fname == ""):
|
||||
+ return None
|
||||
+ else:
|
||||
+ fname = fname[::-1]
|
||||
+ return fname
|
||||
+
|
||||
+class FrameFilter ():
|
||||
+
|
||||
+ def __init__ (self):
|
||||
+ self.name = "Reverse"
|
||||
+ self.priority = 100
|
||||
+ self.enabled = True
|
||||
+ gdb.frame_filters [self.name] = self
|
||||
+
|
||||
+ def filter (self, frame_iter):
|
||||
+ # Python 3.x moved the itertools.imap functionality to map(),
|
||||
+ # so check if it is available.
|
||||
+ if hasattr(itertools, "imap"):
|
||||
+ frame_iter = itertools.imap (Reverse_Function, frame_iter)
|
||||
+ else:
|
||||
+ frame_iter = map (Reverse_Function, frame_iter)
|
||||
+ return frame_iter
|
||||
+
|
||||
+FrameFilter()
|
@ -1,454 +0,0 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-rhbz1398387-tab-crash-test.patch
|
||||
|
||||
;; New testcase for: Fix <tab>-completion crash (Gary Benson, RH BZ 1398387).
|
||||
;;=fedoratest
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/tab-crash.bz2.uu b/gdb/testsuite/gdb.base/tab-crash.bz2.uu
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/tab-crash.bz2.uu
|
||||
@@ -0,0 +1,393 @@
|
||||
+begin 644 /tmp/libgcc_s-6.3.1-20161221.so.1-objcopyR.debug.bz2
|
||||
+M0EIH.3%!6293622@"44`>Q=_____________________________________
|
||||
+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
|
||||
+M`,.^+BG;`ZF7BV09<[-_][:8^4KLHF.(1`0<SWGYJ3I.3K!0![LX-.34%X
|
||||
+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
|
||||
+M@A`\#X%A8B2?ZU1)$9%)(Q%@"@LDG-D`8'(&,"(8(YS�!3:QMRG/,TU?%R
|
||||
+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
|
||||
+`
|
||||
+end
|
||||
diff --git a/gdb/testsuite/gdb.base/tab-crash.exp b/gdb/testsuite/gdb.base/tab-crash.exp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/tab-crash.exp
|
||||
@@ -0,0 +1,43 @@
|
||||
+# This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+# Copyright 2017 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
|
||||
+ return
|
||||
+}
|
||||
+
|
||||
+standard_testfile
|
||||
+
|
||||
+# gcc-base-debuginfo-6.3.1-1.fc25.x86_64
|
||||
+# /usr/lib/debug/lib64/libgcc_s-6.3.1-20161221.so.1.debug
|
||||
+# objcopy -R .debug_loc -R .debug_ranges -R .debug_info -R .debug_abbrev -R .debug_aranges -R .debug_str -R .comment ...
|
||||
+
|
||||
+set debugfilebz2uu ${srcdir}/${subdir}/${testfile}.bz2.uu
|
||||
+set debugfile [standard_output_file ${testfile}]
|
||||
+
|
||||
+if {[catch "system \"uudecode -o - ${debugfilebz2uu} | bzip2 -dc >${debugfile}\""] != 0} {
|
||||
+ untested "failed uudecode or bzip2"
|
||||
+ return -1
|
||||
+}
|
||||
+file stat ${debugfile} debugfilestat
|
||||
+if {$debugfilestat(size) != 71936} {
|
||||
+ untested "uudecode or bzip2 produce invalid result"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+clean_restart ${debugfile}
|
||||
+
|
||||
+gdb_test "complete p si" "complete p si\r\np size_of_encoded_value"
|
@ -1,49 +0,0 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-runtest-pie-override.patch
|
||||
|
||||
;; Hack for proper PIE run of the testsuite.
|
||||
;;=fedoratest
|
||||
|
||||
make check//unix/-fPIE/-pie RUNTESTFLAGS=solib-display.exp
|
||||
|
||||
gcc -fpic -c -fPIE -pie -o x.o x.c
|
||||
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/Scrt1.o: In function `_start':
|
||||
(.text+0x20): undefined reference to `main'
|
||||
|
||||
=> Change the order for overrides.
|
||||
|
||||
One has to also use -fPIC rather than -fPIE, -fPIC is stronger.
|
||||
|
||||
The correct way would be:
|
||||
make check//unix RUNTESTFLAGS='CC_FOR_TARGET=gcc\ -fPIC\ -pie CXX_FOR_TARGET=g++\ -fPIC\ -pie solib-display.exp'
|
||||
|
||||
But there is a problem with testsuite.unix non-unique subdir name and also
|
||||
a problem with make -j parallelization of the testsuite.
|
||||
|
||||
diff --git a/gdb/testsuite/lib/future.exp b/gdb/testsuite/lib/future.exp
|
||||
--- a/gdb/testsuite/lib/future.exp
|
||||
+++ b/gdb/testsuite/lib/future.exp
|
||||
@@ -197,6 +197,10 @@ proc gdb_default_target_compile_1 {source destfile type options} {
|
||||
set ldflags ""
|
||||
set dest [target_info name]
|
||||
|
||||
+ if {[board_info $dest exists multilib_flags]} {
|
||||
+ append add_flags " [board_info $dest multilib_flags]"
|
||||
+ }
|
||||
+
|
||||
if {[info exists CFLAGS_FOR_TARGET]} {
|
||||
append add_flags " $CFLAGS_FOR_TARGET"
|
||||
}
|
||||
@@ -531,10 +535,6 @@ proc gdb_default_target_compile_1 {source destfile type options} {
|
||||
}
|
||||
}
|
||||
|
||||
- if {[board_info $dest exists multilib_flags]} {
|
||||
- append add_flags " [board_info $dest multilib_flags]"
|
||||
- }
|
||||
-
|
||||
verbose "doing compile"
|
||||
|
||||
set sources ""
|
@ -1,200 +0,0 @@
|
||||
[gdb/symtab] Fix handling of DW_TAG_unspecified_type
|
||||
|
||||
Currently, the test-case contained in this patch fails:
|
||||
...
|
||||
(gdb) p (int) foo ()^M
|
||||
Invalid cast.^M
|
||||
(gdb) FAIL: gdb.dwarf2/dw2-unspecified-type.exp: p (int) foo ()
|
||||
...
|
||||
because DW_TAG_unspecified_type is translated as void.
|
||||
|
||||
There's some code in read_unspecified_type that marks the type as stub, but
|
||||
that's only active for ada:
|
||||
...
|
||||
if (cu->lang () == language_ada)
|
||||
type->set_is_stub (true);
|
||||
...
|
||||
|
||||
Fix this by:
|
||||
- marking the type as a stub for all languages, and
|
||||
- handling the stub return type case in call_function_by_hand_dummy.
|
||||
|
||||
Tested on x86_64-linux.
|
||||
|
||||
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29558
|
||||
|
||||
---
|
||||
gdb/dwarf2/read.c | 6 +-
|
||||
gdb/infcall.c | 2 +-
|
||||
.../gdb.dwarf2/dw2-unspecified-type-foo.c | 22 +++++++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.c | 25 ++++++++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp | 72 ++++++++++++++++++++++
|
||||
5 files changed, 123 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
|
||||
index 94b12773d3e..631a6df3635 100644
|
||||
--- a/gdb/dwarf2/read.c
|
||||
+++ b/gdb/dwarf2/read.c
|
||||
@@ -18744,9 +18744,9 @@ read_unspecified_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
/* In Ada, an unspecified type is typically used when the description
|
||||
of the type is deferred to a different unit. When encountering
|
||||
such a type, we treat it as a stub, and try to resolve it later on,
|
||||
- when needed. */
|
||||
- if (cu->per_cu->lang == language_ada)
|
||||
- type->set_is_stub (true);
|
||||
+ when needed.
|
||||
+ Mark this as a stub type for all languages though. */
|
||||
+ type->set_is_stub (true);
|
||||
|
||||
return set_die_type (die, type, cu);
|
||||
}
|
||||
diff --git a/gdb/infcall.c b/gdb/infcall.c
|
||||
index f8c812c8f61..57cfa8875a5 100644
|
||||
--- a/gdb/infcall.c
|
||||
+++ b/gdb/infcall.c
|
||||
@@ -817,7 +817,7 @@ call_function_by_hand_dummy (struct value *function,
|
||||
"target calling convention."),
|
||||
get_function_name (funaddr, name_buf, sizeof (name_buf)));
|
||||
|
||||
- if (values_type == NULL)
|
||||
+ if (values_type == NULL || values_type->is_stub ())
|
||||
values_type = default_return_type;
|
||||
if (values_type == NULL)
|
||||
{
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type-foo.c b/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type-foo.c
|
||||
new file mode 100644
|
||||
index 00000000000..b1e3a8b98e4
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type-foo.c
|
||||
@@ -0,0 +1,22 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2022 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+int
|
||||
+foo (void)
|
||||
+{
|
||||
+ asm ("foo_label: .globl foo_label");
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.c b/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.c
|
||||
new file mode 100644
|
||||
index 00000000000..e3218205560
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.c
|
||||
@@ -0,0 +1,25 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2022 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+extern int foo (void);
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ int res = foo ();
|
||||
+ return res;
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp
|
||||
new file mode 100644
|
||||
index 00000000000..20c31dc5740
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp
|
||||
@@ -0,0 +1,72 @@
|
||||
+# Copyright 2022 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+load_lib dwarf.exp
|
||||
+
|
||||
+# This test can only be run on targets which support DWARF-2 and use gas.
|
||||
+if {![dwarf2_support]} {
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+standard_testfile .c -foo.c dwz.S
|
||||
+
|
||||
+set foo_res \
|
||||
+ [function_range foo \
|
||||
+ [list ${srcdir}/${subdir}/$srcfile ${srcdir}/${subdir}/$srcfile2]]
|
||||
+lassign $foo_res \
|
||||
+ foo_start foo_len
|
||||
+set foo_end "$foo_start + $foo_len"
|
||||
+
|
||||
+# Create the DWARF.
|
||||
+set asm_file [standard_output_file $srcfile3]
|
||||
+Dwarf::assemble $asm_file {
|
||||
+ global foo_start foo_end
|
||||
+ declare_labels unspecified_type_label
|
||||
+
|
||||
+ cu {} {
|
||||
+ compile_unit {
|
||||
+ {language @DW_LANG_Mips_Assembler}
|
||||
+ } {
|
||||
+ unspecified_type_label: unspecified_type {}
|
||||
+
|
||||
+ DW_TAG_subprogram {
|
||||
+ {name foo}
|
||||
+ {low_pc $foo_start addr}
|
||||
+ {high_pc $foo_end addr}
|
||||
+ {type :$unspecified_type_label}
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+if [prepare_for_testing "failed to prepare" $testfile \
|
||||
+ "${asm_file} ${srcfile} ${srcfile2}" {}] {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if ![runto_main] {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# Print the function type. Return type should be stub type, which is printed
|
||||
+# as void.
|
||||
+gdb_test "ptype foo" "type = void \\(void\\)"
|
||||
+
|
||||
+# Call the function, casting the function to the correct function type.
|
||||
+gdb_test "p ((int (*) ()) foo) ()" " = 0"
|
||||
+
|
||||
+# Call the function, casting the function result to the correct type.
|
||||
+gdb_test "p (int) foo ()" " = 0"
|
140
gdb-tdep-aarch64-fix-frame-address-of-last-insn.patch
Normal file
140
gdb-tdep-aarch64-fix-frame-address-of-last-insn.patch
Normal file
@ -0,0 +1,140 @@
|
||||
From 433568090645c05d3b7fdbb1a4ae0887e96d9cc0 Mon Sep 17 00:00:00 2001
|
||||
From: Tom de Vries <tdevries@suse.de>
|
||||
Date: Mon, 23 Jan 2023 16:49:36 +0100
|
||||
Subject: [PATCH 1/2] [gdb/tdep, aarch64] Fix frame address of last insn
|
||||
|
||||
Consider the test-case test.c, compiled without debug info:
|
||||
...
|
||||
void
|
||||
foo (const char *s)
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
foo ("foo");
|
||||
return 0;
|
||||
}
|
||||
...
|
||||
|
||||
Disassembly of foo:
|
||||
...
|
||||
0000000000400564 <foo>:
|
||||
400564: d10043ff sub sp, sp, #0x10
|
||||
400568: f90007e0 str x0, [sp, #8]
|
||||
40056c: d503201f nop
|
||||
400570: 910043ff add sp, sp, #0x10
|
||||
400574: d65f03c0 ret
|
||||
...
|
||||
|
||||
Now, let's do "info frame" at each insn in foo, as well as printing $sp
|
||||
and $x29 (and strip the output of info frame to the first line, for brevity):
|
||||
...
|
||||
$ gdb -q a.out
|
||||
Reading symbols from a.out...
|
||||
(gdb) b *foo
|
||||
Breakpoint 1 at 0x400564
|
||||
(gdb) r
|
||||
Starting program: a.out
|
||||
|
||||
Breakpoint 1, 0x0000000000400564 in foo ()
|
||||
(gdb) display /x $sp
|
||||
1: /x $sp = 0xfffffffff3a0
|
||||
(gdb) display /x $x29
|
||||
2: /x $x29 = 0xfffffffff3a0
|
||||
(gdb) info frame
|
||||
Stack level 0, frame at 0xfffffffff3a0:
|
||||
(gdb) si
|
||||
0x0000000000400568 in foo ()
|
||||
1: /x $sp = 0xfffffffff390
|
||||
2: /x $x29 = 0xfffffffff3a0
|
||||
(gdb) info frame
|
||||
Stack level 0, frame at 0xfffffffff3a0:
|
||||
(gdb) si
|
||||
0x000000000040056c in foo ()
|
||||
1: /x $sp = 0xfffffffff390
|
||||
2: /x $x29 = 0xfffffffff3a0
|
||||
(gdb) info frame
|
||||
Stack level 0, frame at 0xfffffffff3a0:
|
||||
(gdb) si
|
||||
0x0000000000400570 in foo ()
|
||||
1: /x $sp = 0xfffffffff390
|
||||
2: /x $x29 = 0xfffffffff3a0
|
||||
(gdb) info frame
|
||||
Stack level 0, frame at 0xfffffffff3a0:
|
||||
(gdb) si
|
||||
0x0000000000400574 in foo ()
|
||||
1: /x $sp = 0xfffffffff3a0
|
||||
2: /x $x29 = 0xfffffffff3a0
|
||||
(gdb) info frame
|
||||
Stack level 0, frame at 0xfffffffff3b0:
|
||||
pc = 0x400574 in foo; saved pc = 0x40058c
|
||||
(gdb) si
|
||||
0x000000000040058c in main ()
|
||||
1: /x $sp = 0xfffffffff3a0
|
||||
2: /x $x29 = 0xfffffffff3a0
|
||||
...
|
||||
|
||||
The "frame at" bit lists 0xfffffffff3a0 except at the last insn, where it
|
||||
lists 0xfffffffff3b0.
|
||||
|
||||
The frame address is calculated here in aarch64_make_prologue_cache_1:
|
||||
...
|
||||
unwound_fp = get_frame_register_unsigned (this_frame, cache->framereg);
|
||||
if (unwound_fp == 0)
|
||||
return;
|
||||
|
||||
cache->prev_sp = unwound_fp + cache->framesize;
|
||||
...
|
||||
|
||||
For insns after the prologue, we have cache->framereg == sp and
|
||||
cache->framesize == 16, so unwound_fp + cache->framesize gives the wrong
|
||||
answer once sp has been restored to entry value by the before-last insn.
|
||||
|
||||
Fix this by detecting the situation that the sp has been restored.
|
||||
|
||||
This fixes PRs tdep/30010 and tdep/30011.
|
||||
|
||||
This also fixes the aarch64 FAILs in gdb.reverse/solib-precsave.exp and
|
||||
gdb.reverse/solib-reverse.exp I reported in PR gdb/PR29721.
|
||||
|
||||
Tested on aarch64-linux.
|
||||
PR tdep/30010
|
||||
PR tdep/30011
|
||||
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30010
|
||||
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30011
|
||||
---
|
||||
gdb/aarch64-tdep.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
|
||||
index 3cc0d3b234d..499b87ef480 100644
|
||||
--- a/gdb/aarch64-tdep.c
|
||||
+++ b/gdb/aarch64-tdep.c
|
||||
@@ -145,6 +145,8 @@ static const char *const aarch64_mte_register_names[] =
|
||||
"tag_ctl"
|
||||
};
|
||||
|
||||
+static int aarch64_stack_frame_destroyed_p (struct gdbarch *, CORE_ADDR);
|
||||
+
|
||||
/* AArch64 prologue cache structure. */
|
||||
struct aarch64_prologue_cache
|
||||
{
|
||||
@@ -996,7 +998,10 @@ aarch64_make_prologue_cache_1 (frame_info_ptr this_frame,
|
||||
if (unwound_fp == 0)
|
||||
return;
|
||||
|
||||
- cache->prev_sp = unwound_fp + cache->framesize;
|
||||
+ cache->prev_sp = unwound_fp;
|
||||
+ if (!aarch64_stack_frame_destroyed_p (get_frame_arch (this_frame),
|
||||
+ cache->prev_pc))
|
||||
+ cache->prev_sp += cache->framesize;
|
||||
|
||||
/* Calculate actual addresses of saved registers using offsets
|
||||
determined by aarch64_analyze_prologue. */
|
||||
|
||||
base-commit: 11c93dc64f6137214809583d9c5a775b18b4f027
|
||||
--
|
||||
2.35.3
|
||||
|
@ -1,149 +0,0 @@
|
||||
[gdb/tdep] Fix PowerPC IEEE 128-bit format arg passing
|
||||
|
||||
On a powerpc system with gcc 12 built to default to 128-bit IEEE long double,
|
||||
I run into:
|
||||
...
|
||||
(gdb) print find_max_long_double_real(4, ldc1, ldc2, ldc3, ldc4)^M
|
||||
$8 = 0 + 0i^M
|
||||
(gdb) FAIL: gdb.base/varargs.exp: print \
|
||||
find_max_long_double_real(4, ldc1, ldc2, ldc3, ldc4)
|
||||
...
|
||||
|
||||
This is due to incorrect handling of the argument in ppc64_sysv_abi_push_param.
|
||||
|
||||
Fix this and similar cases, and expand the test-case to test handling of
|
||||
homogeneous aggregates.
|
||||
|
||||
Tested on ppc64le-linux, power 10.
|
||||
|
||||
Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com>
|
||||
Tested-by: Carl Love <cel@us.ibm.com>
|
||||
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29543
|
||||
|
||||
---
|
||||
gdb/ppc-sysv-tdep.c | 25 +++++++++++++++++++------
|
||||
gdb/testsuite/gdb.base/varargs.c | 28 ++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.base/varargs.exp | 2 ++
|
||||
3 files changed, 49 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c
|
||||
index b7106542b5d..5a8761d64e7 100644
|
||||
--- a/gdb/ppc-sysv-tdep.c
|
||||
+++ b/gdb/ppc-sysv-tdep.c
|
||||
@@ -1444,7 +1444,7 @@ ppc64_sysv_abi_push_param (struct gdbarch *gdbarch,
|
||||
== floatformats_ia64_quad))
|
||||
{
|
||||
/* IEEE FLOAT128, args in vector registers. */
|
||||
- ppc64_sysv_abi_push_val (gdbarch, val, TYPE_LENGTH (type), 0, argpos);
|
||||
+ ppc64_sysv_abi_push_val (gdbarch, val, TYPE_LENGTH (type), 16, argpos);
|
||||
ppc64_sysv_abi_push_vreg (gdbarch, val, argpos);
|
||||
}
|
||||
else if (type->code () == TYPE_CODE_FLT
|
||||
@@ -1514,7 +1514,10 @@ ppc64_sysv_abi_push_param (struct gdbarch *gdbarch,
|
||||
}
|
||||
else
|
||||
{
|
||||
- ppc64_sysv_abi_push_val (gdbarch, val, TYPE_LENGTH (type), 0, argpos);
|
||||
+ /* Align == 0 is correct for ppc64_sysv_abi_push_freg,
|
||||
+ Align == 16 is correct for ppc64_sysv_abi_push_vreg.
|
||||
+ Default to 0. */
|
||||
+ int align = 0;
|
||||
|
||||
/* The ABI (version 1.9) specifies that structs containing a
|
||||
single floating-point value, at any level of nesting of
|
||||
@@ -1532,7 +1535,10 @@ ppc64_sysv_abi_push_param (struct gdbarch *gdbarch,
|
||||
if (TYPE_LENGTH (type) == 16
|
||||
&& (gdbarch_long_double_format (gdbarch)
|
||||
== floatformats_ia64_quad))
|
||||
- ppc64_sysv_abi_push_vreg (gdbarch, val, argpos);
|
||||
+ {
|
||||
+ ppc64_sysv_abi_push_vreg (gdbarch, val, argpos);
|
||||
+ align = 16;
|
||||
+ }
|
||||
else
|
||||
ppc64_sysv_abi_push_freg (gdbarch, type, val, argpos);
|
||||
}
|
||||
@@ -1556,8 +1562,10 @@ ppc64_sysv_abi_push_param (struct gdbarch *gdbarch,
|
||||
&& (gdbarch_long_double_format (gdbarch)
|
||||
== floatformats_ia64_quad))
|
||||
/* IEEE FLOAT128, args in vector registers. */
|
||||
- ppc64_sysv_abi_push_vreg (gdbarch, elval, argpos);
|
||||
-
|
||||
+ {
|
||||
+ ppc64_sysv_abi_push_vreg (gdbarch, elval, argpos);
|
||||
+ align = 16;
|
||||
+ }
|
||||
else if (eltype->code () == TYPE_CODE_FLT
|
||||
|| eltype->code () == TYPE_CODE_DECFLOAT)
|
||||
/* IBM long double and all other floats and decfloats, args
|
||||
@@ -1567,9 +1575,14 @@ ppc64_sysv_abi_push_param (struct gdbarch *gdbarch,
|
||||
&& eltype->is_vector ()
|
||||
&& tdep->vector_abi == POWERPC_VEC_ALTIVEC
|
||||
&& TYPE_LENGTH (eltype) == 16)
|
||||
- ppc64_sysv_abi_push_vreg (gdbarch, elval, argpos);
|
||||
+ {
|
||||
+ ppc64_sysv_abi_push_vreg (gdbarch, elval, argpos);
|
||||
+ align = 16;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
+
|
||||
+ ppc64_sysv_abi_push_val (gdbarch, val, TYPE_LENGTH (type), align, argpos);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/varargs.c b/gdb/testsuite/gdb.base/varargs.c
|
||||
index cacb29d89e7..fcadcee6fb3 100644
|
||||
--- a/gdb/testsuite/gdb.base/varargs.c
|
||||
+++ b/gdb/testsuite/gdb.base/varargs.c
|
||||
@@ -45,6 +45,16 @@ long double _Complex ldc2 = 2.0L + 2.0Li;
|
||||
long double _Complex ldc3 = 3.0L + 3.0Li;
|
||||
long double _Complex ldc4 = 4.0L + 4.0Li;
|
||||
|
||||
+struct sldc
|
||||
+{
|
||||
+ long double _Complex ldc;
|
||||
+};
|
||||
+
|
||||
+struct sldc sldc1 = { 1.0L + 1.0Li };
|
||||
+struct sldc sldc2 = { 2.0L + 2.0Li };
|
||||
+struct sldc sldc3 = { 3.0L + 3.0Li };
|
||||
+struct sldc sldc4 = { 4.0L + 4.0Li };
|
||||
+
|
||||
#endif
|
||||
|
||||
int
|
||||
@@ -201,4 +211,22 @@ find_max_long_double_real (int num_vals, ...)
|
||||
}
|
||||
|
||||
|
||||
+long double _Complex
|
||||
+find_max_struct_long_double_real (int num_vals, ...)
|
||||
+{
|
||||
+ long double _Complex max = 0.0L + 0.0iL;
|
||||
+ struct sldc x;
|
||||
+ va_list argp;
|
||||
+ int i;
|
||||
+
|
||||
+ va_start(argp, num_vals);
|
||||
+ for (i = 0; i < num_vals; i++)
|
||||
+ {
|
||||
+ x = va_arg (argp, struct sldc);
|
||||
+ if (creall (max) < creal (x.ldc)) max = x.ldc;
|
||||
+ }
|
||||
+
|
||||
+ return max;
|
||||
+}
|
||||
+
|
||||
#endif /* TEST_COMPLEX */
|
||||
diff --git a/gdb/testsuite/gdb.base/varargs.exp b/gdb/testsuite/gdb.base/varargs.exp
|
||||
index e778af031cf..f3d413e4de6 100644
|
||||
--- a/gdb/testsuite/gdb.base/varargs.exp
|
||||
+++ b/gdb/testsuite/gdb.base/varargs.exp
|
||||
@@ -107,4 +107,6 @@ if [support_complex_tests] {
|
||||
set test "print find_max_long_double_real(4, ldc1, ldc2, ldc3, ldc4)"
|
||||
gdb_test $test ".*= 4 \\+ 4i"
|
||||
|
||||
+ set test "print find_max_struct_long_double_real(4, sldc1, sldc2, sldc3, sldc4)"
|
||||
+ gdb_test $test ".*= 4 \\+ 4i"
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
[gdb/tdep] Handle pipe2 syscall for amd64
|
||||
|
||||
When running test-case gdb.reverse/pipe-reverse.exp on openSUSE Tumbleweed,
|
||||
I run into:
|
||||
...
|
||||
(gdb) continue^M
|
||||
Continuing.^M
|
||||
Process record and replay target doesn't support syscall number 293^M
|
||||
Process record: failed to record execution log.^M
|
||||
^M
|
||||
Program stopped.^M
|
||||
0x00007ffff7daabdb in pipe () from /lib64/libc.so.6^M
|
||||
(gdb) FAIL: gdb.reverse/pipe-reverse.exp: continue to breakpoint: marker2
|
||||
...
|
||||
|
||||
The current glibc on Tumbleweed is 2.35, which contains commit
|
||||
"linux: Implement pipe in terms of __NR_pipe2", and consequently syscall pipe2
|
||||
is used in stead of syscall pipe.
|
||||
|
||||
There is already support added for syscall pipe2 for aarch64 (which only has
|
||||
syscall pipe2, not syscall pipe), so enable the same for amd64, by:
|
||||
- adding amd64_sys_pipe2 in enum amd64_syscall
|
||||
- translating amd64_sys_pipe2 to gdb_sys_pipe2 in amd64_canonicalize_syscall
|
||||
|
||||
Tested on x86_64-linux, specifically on:
|
||||
- openSUSE Tumbleweed (with glibc 2.35), and
|
||||
- openSUSE Leap 15.3 (with glibc 2.31).
|
||||
|
||||
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29056
|
||||
|
||||
---
|
||||
gdb/amd64-linux-tdep.c | 3 +++
|
||||
gdb/amd64-linux-tdep.h | 1 +
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
|
||||
index 0e5194fbeee..9a0759d639c 100644
|
||||
--- a/gdb/amd64-linux-tdep.c
|
||||
+++ b/gdb/amd64-linux-tdep.c
|
||||
@@ -460,6 +460,9 @@ amd64_canonicalize_syscall (enum amd64_syscall syscall_number)
|
||||
case amd64_x32_sys_pipe:
|
||||
return gdb_sys_pipe;
|
||||
|
||||
+ case amd64_sys_pipe2:
|
||||
+ return gdb_sys_pipe2;
|
||||
+
|
||||
case amd64_sys_select:
|
||||
case amd64_x32_sys_select:
|
||||
return gdb_sys_select;
|
||||
diff --git a/gdb/amd64-linux-tdep.h b/gdb/amd64-linux-tdep.h
|
||||
index 4a41b3b8245..184b0c86f07 100644
|
||||
--- a/gdb/amd64-linux-tdep.h
|
||||
+++ b/gdb/amd64-linux-tdep.h
|
||||
@@ -320,6 +320,7 @@ enum amd64_syscall {
|
||||
amd64_sys_sync_file_range = 277,
|
||||
amd64_sys_vmsplice = 278,
|
||||
amd64_sys_move_pages = 279,
|
||||
+ amd64_sys_pipe2 = 293
|
||||
};
|
||||
|
||||
/* Enum that defines the syscall identifiers for x32 linux.
|
@ -1,44 +0,0 @@
|
||||
[gdb/tdep] Support catch syscall pipe2 for i386
|
||||
|
||||
With test-case gdb.base/catch-syscall.exp and target board unix/-m32, we run
|
||||
into:
|
||||
...
|
||||
(gdb) catch syscall pipe2^M
|
||||
Unknown syscall name 'pipe2'.^M
|
||||
(gdb) FAIL: gdb.base/catch-syscall.exp: determine pipe syscall: catch syscall pipe2
|
||||
...
|
||||
|
||||
Fix this by:
|
||||
- adding a pipe2 entry in gdb/syscalls/i386-linux.xml.in, and
|
||||
- regenerating gdb/syscalls/i386-linux.xml using
|
||||
"xsltproc --output i386-linux.xml apply-defaults.xsl i386-linux.xml.in".
|
||||
|
||||
Tested on x86_64-linux with native and unix/-m32.
|
||||
|
||||
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29056
|
||||
|
||||
---
|
||||
gdb/syscalls/i386-linux.xml | 1 +
|
||||
gdb/syscalls/i386-linux.xml.in | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/gdb/syscalls/i386-linux.xml b/gdb/syscalls/i386-linux.xml
|
||||
index a783dd10af3..4a7a2345186 100644
|
||||
--- a/gdb/syscalls/i386-linux.xml
|
||||
+++ b/gdb/syscalls/i386-linux.xml
|
||||
@@ -334,4 +334,5 @@
|
||||
<syscall name="eventfd" number="323" groups="descriptor"/>
|
||||
<syscall name="fallocate" number="324" groups="descriptor"/>
|
||||
<syscall name="timerfd_settime" number="325" groups="descriptor"/>
|
||||
+ <syscall name="pipe2" number="331" groups="descriptor"/>
|
||||
</syscalls_info>
|
||||
diff --git a/gdb/syscalls/i386-linux.xml.in b/gdb/syscalls/i386-linux.xml.in
|
||||
index e778ab54043..13c4d1d99d4 100644
|
||||
--- a/gdb/syscalls/i386-linux.xml.in
|
||||
+++ b/gdb/syscalls/i386-linux.xml.in
|
||||
@@ -337,4 +337,5 @@
|
||||
<syscall name="eventfd" number="323"/>
|
||||
<syscall name="fallocate" number="324"/>
|
||||
<syscall name="timerfd_settime" number="325"/>
|
||||
+ <syscall name="pipe2" number="331"/>
|
||||
</syscalls_info>
|
@ -1,701 +0,0 @@
|
||||
[gdb/tdep] Update syscalls/{ppc64,ppc}-linux.xml
|
||||
|
||||
Regenerate syscalls/{ppc64,ppc}-linux.xml on a system with 5.14 kernel.
|
||||
|
||||
---
|
||||
gdb/syscalls/ppc-linux.xml | 139 +++++++++++++++++++++++++++++-
|
||||
gdb/syscalls/ppc-linux.xml.in | 140 +++++++++++++++++++++++++++++-
|
||||
gdb/syscalls/ppc64-linux.xml | 140 ++++++++++++++++++++++++++++--
|
||||
gdb/syscalls/ppc64-linux.xml.in | 141 +++++++++++++++++++++++++++++--
|
||||
gdb/testsuite/gdb.base/catch-syscall.exp | 6 +-
|
||||
5 files changed, 541 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/gdb/syscalls/ppc-linux.xml b/gdb/syscalls/ppc-linux.xml
|
||||
index 328b889839a..34ba8bd4e49 100644
|
||||
--- a/gdb/syscalls/ppc-linux.xml
|
||||
+++ b/gdb/syscalls/ppc-linux.xml
|
||||
@@ -6,8 +6,8 @@
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved. -->
|
||||
<!-- This file was generated using the following file:
|
||||
-
|
||||
- /usr/src/linux/arch/powerpc/include/asm/unistd.h
|
||||
+
|
||||
+ <sys/syscall.h>
|
||||
|
||||
The file mentioned above belongs to the Linux Kernel. -->
|
||||
<syscalls_info>
|
||||
@@ -267,6 +267,7 @@
|
||||
<syscall name="fadvise64_64" number="254" groups="descriptor"/>
|
||||
<syscall name="rtas" number="255"/>
|
||||
<syscall name="sys_debug_setcontext" number="256"/>
|
||||
+ <syscall name="migrate_pages" number="258" groups="memory"/>
|
||||
<syscall name="mbind" number="259" groups="memory"/>
|
||||
<syscall name="get_mempolicy" number="260" groups="memory"/>
|
||||
<syscall name="set_mempolicy" number="261" groups="memory"/>
|
||||
@@ -291,6 +292,9 @@
|
||||
<syscall name="pselect6" number="280" groups="descriptor"/>
|
||||
<syscall name="ppoll" number="281" groups="descriptor"/>
|
||||
<syscall name="unshare" number="282" groups="process"/>
|
||||
+ <syscall name="splice" number="283" groups="descriptor"/>
|
||||
+ <syscall name="tee" number="284" groups="descriptor"/>
|
||||
+ <syscall name="vmsplice" number="285" groups="descriptor"/>
|
||||
<syscall name="openat" number="286" groups="descriptor,file"/>
|
||||
<syscall name="mkdirat" number="287" groups="descriptor,file"/>
|
||||
<syscall name="mknodat" number="288" groups="descriptor,file"/>
|
||||
@@ -304,4 +308,135 @@
|
||||
<syscall name="readlinkat" number="296" groups="descriptor,file"/>
|
||||
<syscall name="fchmodat" number="297" groups="descriptor,file"/>
|
||||
<syscall name="faccessat" number="298" groups="descriptor,file"/>
|
||||
+ <syscall name="get_robust_list" number="299"/>
|
||||
+ <syscall name="set_robust_list" number="300"/>
|
||||
+ <syscall name="move_pages" number="301" groups="memory"/>
|
||||
+ <syscall name="getcpu" number="302"/>
|
||||
+ <syscall name="epoll_pwait" number="303" groups="descriptor"/>
|
||||
+ <syscall name="utimensat" number="304" groups="descriptor,file"/>
|
||||
+ <syscall name="signalfd" number="305" groups="descriptor,signal"/>
|
||||
+ <syscall name="timerfd_create" number="306" groups="descriptor"/>
|
||||
+ <syscall name="eventfd" number="307" groups="descriptor"/>
|
||||
+ <syscall name="sync_file_range2" number="308"/>
|
||||
+ <syscall name="fallocate" number="309" groups="descriptor"/>
|
||||
+ <syscall name="subpage_prot" number="310"/>
|
||||
+ <syscall name="timerfd_settime" number="311" groups="descriptor"/>
|
||||
+ <syscall name="timerfd_gettime" number="312" groups="descriptor"/>
|
||||
+ <syscall name="signalfd4" number="313" groups="descriptor,signal"/>
|
||||
+ <syscall name="eventfd2" number="314" groups="descriptor"/>
|
||||
+ <syscall name="epoll_create1" number="315" groups="descriptor"/>
|
||||
+ <syscall name="dup3" number="316" groups="descriptor"/>
|
||||
+ <syscall name="pipe2" number="317" groups="descriptor"/>
|
||||
+ <syscall name="inotify_init1" number="318" groups="descriptor"/>
|
||||
+ <syscall name="perf_event_open" number="319" groups="descriptor"/>
|
||||
+ <syscall name="preadv" number="320" groups="descriptor"/>
|
||||
+ <syscall name="pwritev" number="321" groups="descriptor"/>
|
||||
+ <syscall name="rt_tgsigqueueinfo" number="322" groups="process,signal"/>
|
||||
+ <syscall name="fanotify_init" number="323" groups="descriptor"/>
|
||||
+ <syscall name="fanotify_mark" number="324" groups="descriptor,file"/>
|
||||
+ <syscall name="prlimit64" number="325"/>
|
||||
+ <syscall name="socket" number="326" groups="network"/>
|
||||
+ <syscall name="bind" number="327" groups="network"/>
|
||||
+ <syscall name="connect" number="328" groups="network"/>
|
||||
+ <syscall name="listen" number="329" groups="network"/>
|
||||
+ <syscall name="accept" number="330" groups="network"/>
|
||||
+ <syscall name="getsockname" number="331" groups="network"/>
|
||||
+ <syscall name="getpeername" number="332" groups="network"/>
|
||||
+ <syscall name="socketpair" number="333" groups="network"/>
|
||||
+ <syscall name="send" number="334" groups="network"/>
|
||||
+ <syscall name="sendto" number="335" groups="network"/>
|
||||
+ <syscall name="recv" number="336" groups="network"/>
|
||||
+ <syscall name="recvfrom" number="337" groups="network"/>
|
||||
+ <syscall name="shutdown" number="338" groups="network"/>
|
||||
+ <syscall name="setsockopt" number="339" groups="network"/>
|
||||
+ <syscall name="getsockopt" number="340" groups="network"/>
|
||||
+ <syscall name="sendmsg" number="341" groups="network"/>
|
||||
+ <syscall name="recvmsg" number="342" groups="network"/>
|
||||
+ <syscall name="recvmmsg" number="343" groups="network"/>
|
||||
+ <syscall name="accept4" number="344" groups="network"/>
|
||||
+ <syscall name="name_to_handle_at" number="345" groups="descriptor,file"/>
|
||||
+ <syscall name="open_by_handle_at" number="346" groups="descriptor"/>
|
||||
+ <syscall name="clock_adjtime" number="347"/>
|
||||
+ <syscall name="syncfs" number="348" groups="descriptor"/>
|
||||
+ <syscall name="sendmmsg" number="349" groups="network"/>
|
||||
+ <syscall name="setns" number="350" groups="descriptor"/>
|
||||
+ <syscall name="process_vm_readv" number="351"/>
|
||||
+ <syscall name="process_vm_writev" number="352"/>
|
||||
+ <syscall name="finit_module" number="353" groups="descriptor"/>
|
||||
+ <syscall name="kcmp" number="354"/>
|
||||
+ <syscall name="sched_setattr" number="355"/>
|
||||
+ <syscall name="sched_getattr" number="356"/>
|
||||
+ <syscall name="renameat2" number="357"/>
|
||||
+ <syscall name="seccomp" number="358"/>
|
||||
+ <syscall name="getrandom" number="359"/>
|
||||
+ <syscall name="memfd_create" number="360"/>
|
||||
+ <syscall name="bpf" number="361"/>
|
||||
+ <syscall name="execveat" number="362"/>
|
||||
+ <syscall name="switch_endian" number="363"/>
|
||||
+ <syscall name="userfaultfd" number="364"/>
|
||||
+ <syscall name="membarrier" number="365"/>
|
||||
+ <syscall name="mlock2" number="378"/>
|
||||
+ <syscall name="copy_file_range" number="379"/>
|
||||
+ <syscall name="preadv2" number="380"/>
|
||||
+ <syscall name="pwritev2" number="381"/>
|
||||
+ <syscall name="kexec_file_load" number="382"/>
|
||||
+ <syscall name="statx" number="383"/>
|
||||
+ <syscall name="pkey_alloc" number="384"/>
|
||||
+ <syscall name="pkey_free" number="385"/>
|
||||
+ <syscall name="pkey_mprotect" number="386"/>
|
||||
+ <syscall name="rseq" number="387"/>
|
||||
+ <syscall name="io_pgetevents" number="388"/>
|
||||
+ <syscall name="semget" number="393" groups="ipc"/>
|
||||
+ <syscall name="semctl" number="394" groups="ipc"/>
|
||||
+ <syscall name="shmget" number="395" groups="ipc"/>
|
||||
+ <syscall name="shmctl" number="396" groups="ipc"/>
|
||||
+ <syscall name="shmat" number="397" groups="ipc,memory"/>
|
||||
+ <syscall name="shmdt" number="398" groups="ipc,memory"/>
|
||||
+ <syscall name="msgget" number="399" groups="ipc"/>
|
||||
+ <syscall name="msgsnd" number="400" groups="ipc"/>
|
||||
+ <syscall name="msgrcv" number="401" groups="ipc"/>
|
||||
+ <syscall name="msgctl" number="402" groups="ipc"/>
|
||||
+ <syscall name="clock_gettime64" number="403"/>
|
||||
+ <syscall name="clock_settime64" number="404"/>
|
||||
+ <syscall name="clock_adjtime64" number="405"/>
|
||||
+ <syscall name="clock_getres_time64" number="406"/>
|
||||
+ <syscall name="clock_nanosleep_time64" number="407"/>
|
||||
+ <syscall name="timer_gettime64" number="408"/>
|
||||
+ <syscall name="timer_settime64" number="409"/>
|
||||
+ <syscall name="timerfd_gettime64" number="410"/>
|
||||
+ <syscall name="timerfd_settime64" number="411"/>
|
||||
+ <syscall name="utimensat_time64" number="412"/>
|
||||
+ <syscall name="pselect6_time64" number="413"/>
|
||||
+ <syscall name="ppoll_time64" number="414"/>
|
||||
+ <syscall name="io_pgetevents_time64" number="416"/>
|
||||
+ <syscall name="recvmmsg_time64" number="417"/>
|
||||
+ <syscall name="mq_timedsend_time64" number="418"/>
|
||||
+ <syscall name="mq_timedreceive_time64" number="419"/>
|
||||
+ <syscall name="semtimedop_time64" number="420"/>
|
||||
+ <syscall name="rt_sigtimedwait_time64" number="421"/>
|
||||
+ <syscall name="futex_time64" number="422"/>
|
||||
+ <syscall name="sched_rr_get_interval_time64" number="423"/>
|
||||
+ <syscall name="pidfd_send_signal" number="424"/>
|
||||
+ <syscall name="io_uring_setup" number="425"/>
|
||||
+ <syscall name="io_uring_enter" number="426"/>
|
||||
+ <syscall name="io_uring_register" number="427"/>
|
||||
+ <syscall name="open_tree" number="428"/>
|
||||
+ <syscall name="move_mount" number="429"/>
|
||||
+ <syscall name="fsopen" number="430"/>
|
||||
+ <syscall name="fsconfig" number="431"/>
|
||||
+ <syscall name="fsmount" number="432"/>
|
||||
+ <syscall name="fspick" number="433"/>
|
||||
+ <syscall name="pidfd_open" number="434"/>
|
||||
+ <syscall name="clone3" number="435"/>
|
||||
+ <syscall name="close_range" number="436"/>
|
||||
+ <syscall name="openat2" number="437"/>
|
||||
+ <syscall name="pidfd_getfd" number="438"/>
|
||||
+ <syscall name="faccessat2" number="439"/>
|
||||
+ <syscall name="process_madvise" number="440"/>
|
||||
+ <syscall name="epoll_pwait2" number="441"/>
|
||||
+ <syscall name="mount_setattr" number="442"/>
|
||||
+ <syscall name="quotactl_fd" number="443"/>
|
||||
+ <syscall name="landlock_create_ruleset" number="444"/>
|
||||
+ <syscall name="landlock_add_rule" number="445"/>
|
||||
+ <syscall name="landlock_restrict_self" number="446"/>
|
||||
</syscalls_info>
|
||||
diff --git a/gdb/syscalls/ppc-linux.xml.in b/gdb/syscalls/ppc-linux.xml.in
|
||||
index 0c1003e311b..61c7c585453 100644
|
||||
--- a/gdb/syscalls/ppc-linux.xml.in
|
||||
+++ b/gdb/syscalls/ppc-linux.xml.in
|
||||
@@ -8,11 +8,12 @@
|
||||
<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
|
||||
|
||||
<!-- This file was generated using the following file:
|
||||
-
|
||||
- /usr/src/linux/arch/powerpc/include/asm/unistd.h
|
||||
+
|
||||
+ <sys/syscall.h>
|
||||
|
||||
The file mentioned above belongs to the Linux Kernel. -->
|
||||
|
||||
+
|
||||
<syscalls_info>
|
||||
<syscall name="restart_syscall" number="0"/>
|
||||
<syscall name="exit" number="1"/>
|
||||
@@ -270,6 +271,7 @@
|
||||
<syscall name="fadvise64_64" number="254"/>
|
||||
<syscall name="rtas" number="255"/>
|
||||
<syscall name="sys_debug_setcontext" number="256"/>
|
||||
+ <syscall name="migrate_pages" number="258"/>
|
||||
<syscall name="mbind" number="259"/>
|
||||
<syscall name="get_mempolicy" number="260"/>
|
||||
<syscall name="set_mempolicy" number="261"/>
|
||||
@@ -294,6 +296,9 @@
|
||||
<syscall name="pselect6" number="280"/>
|
||||
<syscall name="ppoll" number="281"/>
|
||||
<syscall name="unshare" number="282"/>
|
||||
+ <syscall name="splice" number="283"/>
|
||||
+ <syscall name="tee" number="284"/>
|
||||
+ <syscall name="vmsplice" number="285"/>
|
||||
<syscall name="openat" number="286"/>
|
||||
<syscall name="mkdirat" number="287"/>
|
||||
<syscall name="mknodat" number="288"/>
|
||||
@@ -307,4 +312,135 @@
|
||||
<syscall name="readlinkat" number="296"/>
|
||||
<syscall name="fchmodat" number="297"/>
|
||||
<syscall name="faccessat" number="298"/>
|
||||
+ <syscall name="get_robust_list" number="299"/>
|
||||
+ <syscall name="set_robust_list" number="300"/>
|
||||
+ <syscall name="move_pages" number="301"/>
|
||||
+ <syscall name="getcpu" number="302"/>
|
||||
+ <syscall name="epoll_pwait" number="303"/>
|
||||
+ <syscall name="utimensat" number="304"/>
|
||||
+ <syscall name="signalfd" number="305"/>
|
||||
+ <syscall name="timerfd_create" number="306"/>
|
||||
+ <syscall name="eventfd" number="307"/>
|
||||
+ <syscall name="sync_file_range2" number="308"/>
|
||||
+ <syscall name="fallocate" number="309"/>
|
||||
+ <syscall name="subpage_prot" number="310"/>
|
||||
+ <syscall name="timerfd_settime" number="311"/>
|
||||
+ <syscall name="timerfd_gettime" number="312"/>
|
||||
+ <syscall name="signalfd4" number="313"/>
|
||||
+ <syscall name="eventfd2" number="314"/>
|
||||
+ <syscall name="epoll_create1" number="315"/>
|
||||
+ <syscall name="dup3" number="316"/>
|
||||
+ <syscall name="pipe2" number="317"/>
|
||||
+ <syscall name="inotify_init1" number="318"/>
|
||||
+ <syscall name="perf_event_open" number="319"/>
|
||||
+ <syscall name="preadv" number="320"/>
|
||||
+ <syscall name="pwritev" number="321"/>
|
||||
+ <syscall name="rt_tgsigqueueinfo" number="322"/>
|
||||
+ <syscall name="fanotify_init" number="323"/>
|
||||
+ <syscall name="fanotify_mark" number="324"/>
|
||||
+ <syscall name="prlimit64" number="325"/>
|
||||
+ <syscall name="socket" number="326"/>
|
||||
+ <syscall name="bind" number="327"/>
|
||||
+ <syscall name="connect" number="328"/>
|
||||
+ <syscall name="listen" number="329"/>
|
||||
+ <syscall name="accept" number="330"/>
|
||||
+ <syscall name="getsockname" number="331"/>
|
||||
+ <syscall name="getpeername" number="332"/>
|
||||
+ <syscall name="socketpair" number="333"/>
|
||||
+ <syscall name="send" number="334"/>
|
||||
+ <syscall name="sendto" number="335"/>
|
||||
+ <syscall name="recv" number="336"/>
|
||||
+ <syscall name="recvfrom" number="337"/>
|
||||
+ <syscall name="shutdown" number="338"/>
|
||||
+ <syscall name="setsockopt" number="339"/>
|
||||
+ <syscall name="getsockopt" number="340"/>
|
||||
+ <syscall name="sendmsg" number="341"/>
|
||||
+ <syscall name="recvmsg" number="342"/>
|
||||
+ <syscall name="recvmmsg" number="343"/>
|
||||
+ <syscall name="accept4" number="344"/>
|
||||
+ <syscall name="name_to_handle_at" number="345"/>
|
||||
+ <syscall name="open_by_handle_at" number="346"/>
|
||||
+ <syscall name="clock_adjtime" number="347"/>
|
||||
+ <syscall name="syncfs" number="348"/>
|
||||
+ <syscall name="sendmmsg" number="349"/>
|
||||
+ <syscall name="setns" number="350"/>
|
||||
+ <syscall name="process_vm_readv" number="351"/>
|
||||
+ <syscall name="process_vm_writev" number="352"/>
|
||||
+ <syscall name="finit_module" number="353"/>
|
||||
+ <syscall name="kcmp" number="354"/>
|
||||
+ <syscall name="sched_setattr" number="355"/>
|
||||
+ <syscall name="sched_getattr" number="356"/>
|
||||
+ <syscall name="renameat2" number="357"/>
|
||||
+ <syscall name="seccomp" number="358"/>
|
||||
+ <syscall name="getrandom" number="359"/>
|
||||
+ <syscall name="memfd_create" number="360"/>
|
||||
+ <syscall name="bpf" number="361"/>
|
||||
+ <syscall name="execveat" number="362"/>
|
||||
+ <syscall name="switch_endian" number="363"/>
|
||||
+ <syscall name="userfaultfd" number="364"/>
|
||||
+ <syscall name="membarrier" number="365"/>
|
||||
+ <syscall name="mlock2" number="378"/>
|
||||
+ <syscall name="copy_file_range" number="379"/>
|
||||
+ <syscall name="preadv2" number="380"/>
|
||||
+ <syscall name="pwritev2" number="381"/>
|
||||
+ <syscall name="kexec_file_load" number="382"/>
|
||||
+ <syscall name="statx" number="383"/>
|
||||
+ <syscall name="pkey_alloc" number="384"/>
|
||||
+ <syscall name="pkey_free" number="385"/>
|
||||
+ <syscall name="pkey_mprotect" number="386"/>
|
||||
+ <syscall name="rseq" number="387"/>
|
||||
+ <syscall name="io_pgetevents" number="388"/>
|
||||
+ <syscall name="semget" number="393"/>
|
||||
+ <syscall name="semctl" number="394"/>
|
||||
+ <syscall name="shmget" number="395"/>
|
||||
+ <syscall name="shmctl" number="396"/>
|
||||
+ <syscall name="shmat" number="397"/>
|
||||
+ <syscall name="shmdt" number="398"/>
|
||||
+ <syscall name="msgget" number="399"/>
|
||||
+ <syscall name="msgsnd" number="400"/>
|
||||
+ <syscall name="msgrcv" number="401"/>
|
||||
+ <syscall name="msgctl" number="402"/>
|
||||
+ <syscall name="clock_gettime64" number="403"/>
|
||||
+ <syscall name="clock_settime64" number="404"/>
|
||||
+ <syscall name="clock_adjtime64" number="405"/>
|
||||
+ <syscall name="clock_getres_time64" number="406"/>
|
||||
+ <syscall name="clock_nanosleep_time64" number="407"/>
|
||||
+ <syscall name="timer_gettime64" number="408"/>
|
||||
+ <syscall name="timer_settime64" number="409"/>
|
||||
+ <syscall name="timerfd_gettime64" number="410"/>
|
||||
+ <syscall name="timerfd_settime64" number="411"/>
|
||||
+ <syscall name="utimensat_time64" number="412"/>
|
||||
+ <syscall name="pselect6_time64" number="413"/>
|
||||
+ <syscall name="ppoll_time64" number="414"/>
|
||||
+ <syscall name="io_pgetevents_time64" number="416"/>
|
||||
+ <syscall name="recvmmsg_time64" number="417"/>
|
||||
+ <syscall name="mq_timedsend_time64" number="418"/>
|
||||
+ <syscall name="mq_timedreceive_time64" number="419"/>
|
||||
+ <syscall name="semtimedop_time64" number="420"/>
|
||||
+ <syscall name="rt_sigtimedwait_time64" number="421"/>
|
||||
+ <syscall name="futex_time64" number="422"/>
|
||||
+ <syscall name="sched_rr_get_interval_time64" number="423"/>
|
||||
+ <syscall name="pidfd_send_signal" number="424"/>
|
||||
+ <syscall name="io_uring_setup" number="425"/>
|
||||
+ <syscall name="io_uring_enter" number="426"/>
|
||||
+ <syscall name="io_uring_register" number="427"/>
|
||||
+ <syscall name="open_tree" number="428"/>
|
||||
+ <syscall name="move_mount" number="429"/>
|
||||
+ <syscall name="fsopen" number="430"/>
|
||||
+ <syscall name="fsconfig" number="431"/>
|
||||
+ <syscall name="fsmount" number="432"/>
|
||||
+ <syscall name="fspick" number="433"/>
|
||||
+ <syscall name="pidfd_open" number="434"/>
|
||||
+ <syscall name="clone3" number="435"/>
|
||||
+ <syscall name="close_range" number="436"/>
|
||||
+ <syscall name="openat2" number="437"/>
|
||||
+ <syscall name="pidfd_getfd" number="438"/>
|
||||
+ <syscall name="faccessat2" number="439"/>
|
||||
+ <syscall name="process_madvise" number="440"/>
|
||||
+ <syscall name="epoll_pwait2" number="441"/>
|
||||
+ <syscall name="mount_setattr" number="442"/>
|
||||
+ <syscall name="quotactl_fd" number="443"/>
|
||||
+ <syscall name="landlock_create_ruleset" number="444"/>
|
||||
+ <syscall name="landlock_add_rule" number="445"/>
|
||||
+ <syscall name="landlock_restrict_self" number="446"/>
|
||||
</syscalls_info>
|
||||
diff --git a/gdb/syscalls/ppc64-linux.xml b/gdb/syscalls/ppc64-linux.xml
|
||||
index 2e46cac0684..838f73bc25e 100644
|
||||
--- a/gdb/syscalls/ppc64-linux.xml
|
||||
+++ b/gdb/syscalls/ppc64-linux.xml
|
||||
@@ -6,8 +6,8 @@
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved. -->
|
||||
<!-- This file was generated using the following file:
|
||||
-
|
||||
- /usr/src/linux/arch/powerpc/include/asm/unistd.h
|
||||
+
|
||||
+ <sys/syscall.h>
|
||||
|
||||
The file mentioned above belongs to the Linux Kernel. -->
|
||||
<syscalls_info>
|
||||
@@ -258,6 +258,7 @@
|
||||
<syscall name="fstatfs64" number="253" groups="descriptor"/>
|
||||
<syscall name="rtas" number="255"/>
|
||||
<syscall name="sys_debug_setcontext" number="256"/>
|
||||
+ <syscall name="migrate_pages" number="258" groups="memory"/>
|
||||
<syscall name="mbind" number="259" groups="memory"/>
|
||||
<syscall name="get_mempolicy" number="260" groups="memory"/>
|
||||
<syscall name="set_mempolicy" number="261" groups="memory"/>
|
||||
@@ -282,11 +283,132 @@
|
||||
<syscall name="pselect6" number="280" groups="descriptor"/>
|
||||
<syscall name="ppoll" number="281" groups="descriptor"/>
|
||||
<syscall name="unshare" number="282" groups="process"/>
|
||||
- <syscall name="unlinkat" number="286" groups="descriptor,file"/>
|
||||
- <syscall name="renameat" number="287" groups="descriptor,file"/>
|
||||
- <syscall name="linkat" number="288" groups="descriptor,file"/>
|
||||
- <syscall name="symlinkat" number="289" groups="descriptor,file"/>
|
||||
- <syscall name="readlinkat" number="290" groups="descriptor,file"/>
|
||||
- <syscall name="fchmodat" number="291" groups="descriptor,file"/>
|
||||
- <syscall name="faccessat" number="292" groups="descriptor,file"/>
|
||||
+ <syscall name="splice" number="283" groups="descriptor"/>
|
||||
+ <syscall name="tee" number="284" groups="descriptor"/>
|
||||
+ <syscall name="vmsplice" number="285" groups="descriptor"/>
|
||||
+ <syscall name="openat" number="286" groups="descriptor,file"/>
|
||||
+ <syscall name="mkdirat" number="287" groups="descriptor,file"/>
|
||||
+ <syscall name="mknodat" number="288" groups="descriptor,file"/>
|
||||
+ <syscall name="fchownat" number="289" groups="descriptor,file"/>
|
||||
+ <syscall name="futimesat" number="290" groups="descriptor,file"/>
|
||||
+ <syscall name="newfstatat" number="291" groups="descriptor,file"/>
|
||||
+ <syscall name="unlinkat" number="292" groups="descriptor,file"/>
|
||||
+ <syscall name="renameat" number="293" groups="descriptor,file"/>
|
||||
+ <syscall name="linkat" number="294" groups="descriptor,file"/>
|
||||
+ <syscall name="symlinkat" number="295" groups="descriptor,file"/>
|
||||
+ <syscall name="readlinkat" number="296" groups="descriptor,file"/>
|
||||
+ <syscall name="fchmodat" number="297" groups="descriptor,file"/>
|
||||
+ <syscall name="faccessat" number="298" groups="descriptor,file"/>
|
||||
+ <syscall name="get_robust_list" number="299"/>
|
||||
+ <syscall name="set_robust_list" number="300"/>
|
||||
+ <syscall name="move_pages" number="301" groups="memory"/>
|
||||
+ <syscall name="getcpu" number="302"/>
|
||||
+ <syscall name="epoll_pwait" number="303" groups="descriptor"/>
|
||||
+ <syscall name="utimensat" number="304" groups="descriptor,file"/>
|
||||
+ <syscall name="signalfd" number="305" groups="descriptor,signal"/>
|
||||
+ <syscall name="timerfd_create" number="306" groups="descriptor"/>
|
||||
+ <syscall name="eventfd" number="307" groups="descriptor"/>
|
||||
+ <syscall name="sync_file_range2" number="308"/>
|
||||
+ <syscall name="fallocate" number="309" groups="descriptor"/>
|
||||
+ <syscall name="subpage_prot" number="310"/>
|
||||
+ <syscall name="timerfd_settime" number="311" groups="descriptor"/>
|
||||
+ <syscall name="timerfd_gettime" number="312" groups="descriptor"/>
|
||||
+ <syscall name="signalfd4" number="313" groups="descriptor,signal"/>
|
||||
+ <syscall name="eventfd2" number="314" groups="descriptor"/>
|
||||
+ <syscall name="epoll_create1" number="315" groups="descriptor"/>
|
||||
+ <syscall name="dup3" number="316" groups="descriptor"/>
|
||||
+ <syscall name="pipe2" number="317" groups="descriptor"/>
|
||||
+ <syscall name="inotify_init1" number="318" groups="descriptor"/>
|
||||
+ <syscall name="perf_event_open" number="319" groups="descriptor"/>
|
||||
+ <syscall name="preadv" number="320" groups="descriptor"/>
|
||||
+ <syscall name="pwritev" number="321" groups="descriptor"/>
|
||||
+ <syscall name="rt_tgsigqueueinfo" number="322" groups="process,signal"/>
|
||||
+ <syscall name="fanotify_init" number="323" groups="descriptor"/>
|
||||
+ <syscall name="fanotify_mark" number="324" groups="descriptor,file"/>
|
||||
+ <syscall name="prlimit64" number="325"/>
|
||||
+ <syscall name="socket" number="326" groups="network"/>
|
||||
+ <syscall name="bind" number="327" groups="network"/>
|
||||
+ <syscall name="connect" number="328" groups="network"/>
|
||||
+ <syscall name="listen" number="329" groups="network"/>
|
||||
+ <syscall name="accept" number="330" groups="network"/>
|
||||
+ <syscall name="getsockname" number="331" groups="network"/>
|
||||
+ <syscall name="getpeername" number="332" groups="network"/>
|
||||
+ <syscall name="socketpair" number="333" groups="network"/>
|
||||
+ <syscall name="send" number="334" groups="network"/>
|
||||
+ <syscall name="sendto" number="335" groups="network"/>
|
||||
+ <syscall name="recv" number="336" groups="network"/>
|
||||
+ <syscall name="recvfrom" number="337" groups="network"/>
|
||||
+ <syscall name="shutdown" number="338" groups="network"/>
|
||||
+ <syscall name="setsockopt" number="339" groups="network"/>
|
||||
+ <syscall name="getsockopt" number="340" groups="network"/>
|
||||
+ <syscall name="sendmsg" number="341" groups="network"/>
|
||||
+ <syscall name="recvmsg" number="342" groups="network"/>
|
||||
+ <syscall name="recvmmsg" number="343" groups="network"/>
|
||||
+ <syscall name="accept4" number="344" groups="network"/>
|
||||
+ <syscall name="name_to_handle_at" number="345" groups="descriptor,file"/>
|
||||
+ <syscall name="open_by_handle_at" number="346" groups="descriptor"/>
|
||||
+ <syscall name="clock_adjtime" number="347"/>
|
||||
+ <syscall name="syncfs" number="348" groups="descriptor"/>
|
||||
+ <syscall name="sendmmsg" number="349" groups="network"/>
|
||||
+ <syscall name="setns" number="350" groups="descriptor"/>
|
||||
+ <syscall name="process_vm_readv" number="351"/>
|
||||
+ <syscall name="process_vm_writev" number="352"/>
|
||||
+ <syscall name="finit_module" number="353" groups="descriptor"/>
|
||||
+ <syscall name="kcmp" number="354"/>
|
||||
+ <syscall name="sched_setattr" number="355"/>
|
||||
+ <syscall name="sched_getattr" number="356"/>
|
||||
+ <syscall name="renameat2" number="357"/>
|
||||
+ <syscall name="seccomp" number="358"/>
|
||||
+ <syscall name="getrandom" number="359"/>
|
||||
+ <syscall name="memfd_create" number="360"/>
|
||||
+ <syscall name="bpf" number="361"/>
|
||||
+ <syscall name="execveat" number="362"/>
|
||||
+ <syscall name="switch_endian" number="363"/>
|
||||
+ <syscall name="userfaultfd" number="364"/>
|
||||
+ <syscall name="membarrier" number="365"/>
|
||||
+ <syscall name="mlock2" number="378"/>
|
||||
+ <syscall name="copy_file_range" number="379"/>
|
||||
+ <syscall name="preadv2" number="380"/>
|
||||
+ <syscall name="pwritev2" number="381"/>
|
||||
+ <syscall name="kexec_file_load" number="382"/>
|
||||
+ <syscall name="statx" number="383"/>
|
||||
+ <syscall name="pkey_alloc" number="384"/>
|
||||
+ <syscall name="pkey_free" number="385"/>
|
||||
+ <syscall name="pkey_mprotect" number="386"/>
|
||||
+ <syscall name="rseq" number="387"/>
|
||||
+ <syscall name="io_pgetevents" number="388"/>
|
||||
+ <syscall name="semtimedop" number="392" groups="ipc"/>
|
||||
+ <syscall name="semget" number="393" groups="ipc"/>
|
||||
+ <syscall name="semctl" number="394" groups="ipc"/>
|
||||
+ <syscall name="shmget" number="395" groups="ipc"/>
|
||||
+ <syscall name="shmctl" number="396" groups="ipc"/>
|
||||
+ <syscall name="shmat" number="397" groups="ipc,memory"/>
|
||||
+ <syscall name="shmdt" number="398" groups="ipc,memory"/>
|
||||
+ <syscall name="msgget" number="399" groups="ipc"/>
|
||||
+ <syscall name="msgsnd" number="400" groups="ipc"/>
|
||||
+ <syscall name="msgrcv" number="401" groups="ipc"/>
|
||||
+ <syscall name="msgctl" number="402" groups="ipc"/>
|
||||
+ <syscall name="pidfd_send_signal" number="424"/>
|
||||
+ <syscall name="io_uring_setup" number="425"/>
|
||||
+ <syscall name="io_uring_enter" number="426"/>
|
||||
+ <syscall name="io_uring_register" number="427"/>
|
||||
+ <syscall name="open_tree" number="428"/>
|
||||
+ <syscall name="move_mount" number="429"/>
|
||||
+ <syscall name="fsopen" number="430"/>
|
||||
+ <syscall name="fsconfig" number="431"/>
|
||||
+ <syscall name="fsmount" number="432"/>
|
||||
+ <syscall name="fspick" number="433"/>
|
||||
+ <syscall name="pidfd_open" number="434"/>
|
||||
+ <syscall name="clone3" number="435"/>
|
||||
+ <syscall name="close_range" number="436"/>
|
||||
+ <syscall name="openat2" number="437"/>
|
||||
+ <syscall name="pidfd_getfd" number="438"/>
|
||||
+ <syscall name="faccessat2" number="439"/>
|
||||
+ <syscall name="process_madvise" number="440"/>
|
||||
+ <syscall name="epoll_pwait2" number="441"/>
|
||||
+ <syscall name="mount_setattr" number="442"/>
|
||||
+ <syscall name="quotactl_fd" number="443"/>
|
||||
+ <syscall name="landlock_create_ruleset" number="444"/>
|
||||
+ <syscall name="landlock_add_rule" number="445"/>
|
||||
+ <syscall name="landlock_restrict_self" number="446"/>
|
||||
</syscalls_info>
|
||||
diff --git a/gdb/syscalls/ppc64-linux.xml.in b/gdb/syscalls/ppc64-linux.xml.in
|
||||
index 2a96a8d34b8..4ed80e0a41b 100644
|
||||
--- a/gdb/syscalls/ppc64-linux.xml.in
|
||||
+++ b/gdb/syscalls/ppc64-linux.xml.in
|
||||
@@ -8,11 +8,12 @@
|
||||
<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
|
||||
|
||||
<!-- This file was generated using the following file:
|
||||
-
|
||||
- /usr/src/linux/arch/powerpc/include/asm/unistd.h
|
||||
+
|
||||
+ <sys/syscall.h>
|
||||
|
||||
The file mentioned above belongs to the Linux Kernel. -->
|
||||
|
||||
+
|
||||
<syscalls_info>
|
||||
<syscall name="restart_syscall" number="0"/>
|
||||
<syscall name="exit" number="1"/>
|
||||
@@ -261,6 +262,7 @@
|
||||
<syscall name="fstatfs64" number="253"/>
|
||||
<syscall name="rtas" number="255"/>
|
||||
<syscall name="sys_debug_setcontext" number="256"/>
|
||||
+ <syscall name="migrate_pages" number="258"/>
|
||||
<syscall name="mbind" number="259"/>
|
||||
<syscall name="get_mempolicy" number="260"/>
|
||||
<syscall name="set_mempolicy" number="261"/>
|
||||
@@ -285,11 +287,132 @@
|
||||
<syscall name="pselect6" number="280"/>
|
||||
<syscall name="ppoll" number="281"/>
|
||||
<syscall name="unshare" number="282"/>
|
||||
- <syscall name="unlinkat" number="286"/>
|
||||
- <syscall name="renameat" number="287"/>
|
||||
- <syscall name="linkat" number="288"/>
|
||||
- <syscall name="symlinkat" number="289"/>
|
||||
- <syscall name="readlinkat" number="290"/>
|
||||
- <syscall name="fchmodat" number="291"/>
|
||||
- <syscall name="faccessat" number="292"/>
|
||||
+ <syscall name="splice" number="283"/>
|
||||
+ <syscall name="tee" number="284"/>
|
||||
+ <syscall name="vmsplice" number="285"/>
|
||||
+ <syscall name="openat" number="286"/>
|
||||
+ <syscall name="mkdirat" number="287"/>
|
||||
+ <syscall name="mknodat" number="288"/>
|
||||
+ <syscall name="fchownat" number="289"/>
|
||||
+ <syscall name="futimesat" number="290"/>
|
||||
+ <syscall name="newfstatat" number="291"/>
|
||||
+ <syscall name="unlinkat" number="292"/>
|
||||
+ <syscall name="renameat" number="293"/>
|
||||
+ <syscall name="linkat" number="294"/>
|
||||
+ <syscall name="symlinkat" number="295"/>
|
||||
+ <syscall name="readlinkat" number="296"/>
|
||||
+ <syscall name="fchmodat" number="297"/>
|
||||
+ <syscall name="faccessat" number="298"/>
|
||||
+ <syscall name="get_robust_list" number="299"/>
|
||||
+ <syscall name="set_robust_list" number="300"/>
|
||||
+ <syscall name="move_pages" number="301"/>
|
||||
+ <syscall name="getcpu" number="302"/>
|
||||
+ <syscall name="epoll_pwait" number="303"/>
|
||||
+ <syscall name="utimensat" number="304"/>
|
||||
+ <syscall name="signalfd" number="305"/>
|
||||
+ <syscall name="timerfd_create" number="306"/>
|
||||
+ <syscall name="eventfd" number="307"/>
|
||||
+ <syscall name="sync_file_range2" number="308"/>
|
||||
+ <syscall name="fallocate" number="309"/>
|
||||
+ <syscall name="subpage_prot" number="310"/>
|
||||
+ <syscall name="timerfd_settime" number="311"/>
|
||||
+ <syscall name="timerfd_gettime" number="312"/>
|
||||
+ <syscall name="signalfd4" number="313"/>
|
||||
+ <syscall name="eventfd2" number="314"/>
|
||||
+ <syscall name="epoll_create1" number="315"/>
|
||||
+ <syscall name="dup3" number="316"/>
|
||||
+ <syscall name="pipe2" number="317"/>
|
||||
+ <syscall name="inotify_init1" number="318"/>
|
||||
+ <syscall name="perf_event_open" number="319"/>
|
||||
+ <syscall name="preadv" number="320"/>
|
||||
+ <syscall name="pwritev" number="321"/>
|
||||
+ <syscall name="rt_tgsigqueueinfo" number="322"/>
|
||||
+ <syscall name="fanotify_init" number="323"/>
|
||||
+ <syscall name="fanotify_mark" number="324"/>
|
||||
+ <syscall name="prlimit64" number="325"/>
|
||||
+ <syscall name="socket" number="326"/>
|
||||
+ <syscall name="bind" number="327"/>
|
||||
+ <syscall name="connect" number="328"/>
|
||||
+ <syscall name="listen" number="329"/>
|
||||
+ <syscall name="accept" number="330"/>
|
||||
+ <syscall name="getsockname" number="331"/>
|
||||
+ <syscall name="getpeername" number="332"/>
|
||||
+ <syscall name="socketpair" number="333"/>
|
||||
+ <syscall name="send" number="334"/>
|
||||
+ <syscall name="sendto" number="335"/>
|
||||
+ <syscall name="recv" number="336"/>
|
||||
+ <syscall name="recvfrom" number="337"/>
|
||||
+ <syscall name="shutdown" number="338"/>
|
||||
+ <syscall name="setsockopt" number="339"/>
|
||||
+ <syscall name="getsockopt" number="340"/>
|
||||
+ <syscall name="sendmsg" number="341"/>
|
||||
+ <syscall name="recvmsg" number="342"/>
|
||||
+ <syscall name="recvmmsg" number="343"/>
|
||||
+ <syscall name="accept4" number="344"/>
|
||||
+ <syscall name="name_to_handle_at" number="345"/>
|
||||
+ <syscall name="open_by_handle_at" number="346"/>
|
||||
+ <syscall name="clock_adjtime" number="347"/>
|
||||
+ <syscall name="syncfs" number="348"/>
|
||||
+ <syscall name="sendmmsg" number="349"/>
|
||||
+ <syscall name="setns" number="350"/>
|
||||
+ <syscall name="process_vm_readv" number="351"/>
|
||||
+ <syscall name="process_vm_writev" number="352"/>
|
||||
+ <syscall name="finit_module" number="353"/>
|
||||
+ <syscall name="kcmp" number="354"/>
|
||||
+ <syscall name="sched_setattr" number="355"/>
|
||||
+ <syscall name="sched_getattr" number="356"/>
|
||||
+ <syscall name="renameat2" number="357"/>
|
||||
+ <syscall name="seccomp" number="358"/>
|
||||
+ <syscall name="getrandom" number="359"/>
|
||||
+ <syscall name="memfd_create" number="360"/>
|
||||
+ <syscall name="bpf" number="361"/>
|
||||
+ <syscall name="execveat" number="362"/>
|
||||
+ <syscall name="switch_endian" number="363"/>
|
||||
+ <syscall name="userfaultfd" number="364"/>
|
||||
+ <syscall name="membarrier" number="365"/>
|
||||
+ <syscall name="mlock2" number="378"/>
|
||||
+ <syscall name="copy_file_range" number="379"/>
|
||||
+ <syscall name="preadv2" number="380"/>
|
||||
+ <syscall name="pwritev2" number="381"/>
|
||||
+ <syscall name="kexec_file_load" number="382"/>
|
||||
+ <syscall name="statx" number="383"/>
|
||||
+ <syscall name="pkey_alloc" number="384"/>
|
||||
+ <syscall name="pkey_free" number="385"/>
|
||||
+ <syscall name="pkey_mprotect" number="386"/>
|
||||
+ <syscall name="rseq" number="387"/>
|
||||
+ <syscall name="io_pgetevents" number="388"/>
|
||||
+ <syscall name="semtimedop" number="392"/>
|
||||
+ <syscall name="semget" number="393"/>
|
||||
+ <syscall name="semctl" number="394"/>
|
||||
+ <syscall name="shmget" number="395"/>
|
||||
+ <syscall name="shmctl" number="396"/>
|
||||
+ <syscall name="shmat" number="397"/>
|
||||
+ <syscall name="shmdt" number="398"/>
|
||||
+ <syscall name="msgget" number="399"/>
|
||||
+ <syscall name="msgsnd" number="400"/>
|
||||
+ <syscall name="msgrcv" number="401"/>
|
||||
+ <syscall name="msgctl" number="402"/>
|
||||
+ <syscall name="pidfd_send_signal" number="424"/>
|
||||
+ <syscall name="io_uring_setup" number="425"/>
|
||||
+ <syscall name="io_uring_enter" number="426"/>
|
||||
+ <syscall name="io_uring_register" number="427"/>
|
||||
+ <syscall name="open_tree" number="428"/>
|
||||
+ <syscall name="move_mount" number="429"/>
|
||||
+ <syscall name="fsopen" number="430"/>
|
||||
+ <syscall name="fsconfig" number="431"/>
|
||||
+ <syscall name="fsmount" number="432"/>
|
||||
+ <syscall name="fspick" number="433"/>
|
||||
+ <syscall name="pidfd_open" number="434"/>
|
||||
+ <syscall name="clone3" number="435"/>
|
||||
+ <syscall name="close_range" number="436"/>
|
||||
+ <syscall name="openat2" number="437"/>
|
||||
+ <syscall name="pidfd_getfd" number="438"/>
|
||||
+ <syscall name="faccessat2" number="439"/>
|
||||
+ <syscall name="process_madvise" number="440"/>
|
||||
+ <syscall name="epoll_pwait2" number="441"/>
|
||||
+ <syscall name="mount_setattr" number="442"/>
|
||||
+ <syscall name="quotactl_fd" number="443"/>
|
||||
+ <syscall name="landlock_create_ruleset" number="444"/>
|
||||
+ <syscall name="landlock_add_rule" number="445"/>
|
||||
+ <syscall name="landlock_restrict_self" number="446"/>
|
||||
</syscalls_info>
|
||||
diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp b/gdb/testsuite/gdb.base/catch-syscall.exp
|
||||
index 939cf4876b6..3e6ed94be96 100644
|
||||
--- a/gdb/testsuite/gdb.base/catch-syscall.exp
|
||||
+++ b/gdb/testsuite/gdb.base/catch-syscall.exp
|
||||
@@ -621,9 +621,9 @@ proc test_catch_syscall_multi_arch {} {
|
||||
|
||||
set arch1 "powerpc:common"
|
||||
set arch2 "powerpc:common64"
|
||||
- set syscall1_name "openat"
|
||||
- set syscall2_name "unlinkat"
|
||||
- set syscall_number 286
|
||||
+ set syscall1_name "fstatat64"
|
||||
+ set syscall2_name "newfstatat"
|
||||
+ set syscall_number 291
|
||||
test_catch_syscall_multi_arch_1 $arch1 $arch2 $syscall1_name \
|
||||
$syscall2_name $syscall_number
|
||||
|
@ -1,223 +0,0 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-test-expr-cumulative-archer.patch
|
||||
|
||||
;; [archer-keiths-expr-cumulative+upstream] Import C++ testcases.
|
||||
;;=fedoratest
|
||||
|
||||
archer archer-keiths-expr-cumulative
|
||||
b5a7497340b24199f0c7ba7fdf0d54d4df44d6bc
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.cp/namespace-nested-imports.cc b/gdb/testsuite/gdb.cp/namespace-nested-imports.cc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/namespace-nested-imports.cc
|
||||
@@ -0,0 +1,36 @@
|
||||
+namespace A
|
||||
+{
|
||||
+ namespace B
|
||||
+ {
|
||||
+ int ab = 11;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+namespace C
|
||||
+{
|
||||
+ namespace D
|
||||
+ {
|
||||
+ using namespace A::B;
|
||||
+
|
||||
+ int
|
||||
+ second()
|
||||
+ {
|
||||
+ ab;
|
||||
+ return 0;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ int
|
||||
+ first()
|
||||
+ {
|
||||
+ //ab;
|
||||
+ return D::second();
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main()
|
||||
+{
|
||||
+ //ab;
|
||||
+ return C::first();
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.cp/namespace-nested-imports.exp b/gdb/testsuite/gdb.cp/namespace-nested-imports.exp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/namespace-nested-imports.exp
|
||||
@@ -0,0 +1,50 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+set testfile namespace-nested-imports
|
||||
+set srcfile ${testfile}.cc
|
||||
+set binfile [standard_output_file ${testfile}]
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
|
||||
+ untested "Couldn't compile test program"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# Get things started.
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load ${binfile}
|
||||
+
|
||||
+############################################
|
||||
+if ![runto_main] then {
|
||||
+ perror "couldn't run to breakpoint main"
|
||||
+ continue
|
||||
+}
|
||||
+
|
||||
+gdb_test "print ab" "No symbol .* in current context."
|
||||
+
|
||||
+############################################
|
||||
+gdb_breakpoint C::first
|
||||
+gdb_continue_to_breakpoint "C::first"
|
||||
+
|
||||
+gdb_test "print ab" "No symbol .* in current context."
|
||||
+gdb_test "print C::D::ab" "= 11"
|
||||
+
|
||||
+############################################
|
||||
+gdb_breakpoint C::D::second
|
||||
+gdb_continue_to_breakpoint "C::D::second"
|
||||
+
|
||||
+gdb_test "print ab" "= 11"
|
||||
diff --git a/gdb/testsuite/gdb.cp/namespace-no-imports.cc b/gdb/testsuite/gdb.cp/namespace-no-imports.cc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/namespace-no-imports.cc
|
||||
@@ -0,0 +1,37 @@
|
||||
+
|
||||
+namespace A
|
||||
+{
|
||||
+ int _a = 11;
|
||||
+
|
||||
+ namespace B{
|
||||
+
|
||||
+ int ab = 22;
|
||||
+
|
||||
+ namespace C{
|
||||
+
|
||||
+ int abc = 33;
|
||||
+
|
||||
+ int second(){
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ int first(){
|
||||
+ _a;
|
||||
+ ab;
|
||||
+ C::abc;
|
||||
+ return C::second();
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
+int
|
||||
+main()
|
||||
+{
|
||||
+ A::_a;
|
||||
+ A::B::ab;
|
||||
+ A::B::C::abc;
|
||||
+ return A::B::first();
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.cp/namespace-no-imports.exp b/gdb/testsuite/gdb.cp/namespace-no-imports.exp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/namespace-no-imports.exp
|
||||
@@ -0,0 +1,69 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+set testfile namespace-no-imports
|
||||
+set srcfile ${testfile}.cc
|
||||
+set binfile [standard_output_file ${testfile}]
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
|
||||
+ untested "Couldn't compile test program"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# Get things started.
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load ${binfile}
|
||||
+
|
||||
+############################################
|
||||
+if ![runto_main] then {
|
||||
+ perror "couldn't run to breakpoint main"
|
||||
+ continue
|
||||
+}
|
||||
+
|
||||
+gdb_test "print A::_a" "= 11"
|
||||
+gdb_test "print A::B::ab" "= 22"
|
||||
+gdb_test "print A::B::C::abc" "= 33"
|
||||
+
|
||||
+gdb_test "print _a" "No symbol .* in current context."
|
||||
+gdb_test "print ab" "No symbol .* in current context."
|
||||
+gdb_test "print abc" "No symbol .* in current context."
|
||||
+
|
||||
+############################################
|
||||
+gdb_breakpoint A::B::first
|
||||
+gdb_continue_to_breakpoint "A::B::first"
|
||||
+
|
||||
+gdb_test "print A::_a" "= 11"
|
||||
+gdb_test "print A::B::ab" "= 22"
|
||||
+gdb_test "print A::B::C::abc" "= 33"
|
||||
+
|
||||
+gdb_test "print _a" "= 11"
|
||||
+gdb_test "print ab" "= 22"
|
||||
+gdb_test "print C::abc" "= 33"
|
||||
+
|
||||
+gdb_test "print abc" "No symbol .* in current context."
|
||||
+
|
||||
+############################################
|
||||
+gdb_breakpoint A::B::C::second
|
||||
+gdb_continue_to_breakpoint "A::B::C::second"
|
||||
+
|
||||
+gdb_test "print A::_a" "= 11"
|
||||
+gdb_test "print A::B::ab" "= 22"
|
||||
+gdb_test "print A::B::C::abc" "= 33"
|
||||
+
|
||||
+gdb_test "print _a" "= 11"
|
||||
+gdb_test "print ab" "= 22"
|
||||
+gdb_test "print abc" "= 33"
|
@ -1,4 +1,8 @@
|
||||
[gdb/testsuite] Compile ada hello world for skip_ada_tests
|
||||
From e9faa078c28b14386609a12d307471cb142547d6 Mon Sep 17 00:00:00 2001
|
||||
From: Tom de Vries <tdevries@suse.de>
|
||||
Date: Fri, 21 Apr 2023 09:12:35 +0200
|
||||
Subject: [PATCH 2/5] [gdb/testsuite] Compile ada hello world for
|
||||
skip_ada_tests
|
||||
|
||||
For openSUSE Leap 15.0 with gcc-PIE installed (which makes gcc create PIE
|
||||
executables by default) we get:
|
||||
@ -32,17 +36,16 @@ gdb/testsuite/ChangeLog:
|
||||
(gdb_can_compile_ada): New gdb_caching_proc.
|
||||
* lib/gdb.exp: Add load_lib ada.exp.
|
||||
(skip_ada_tests): Return 1 if !gdb_can_compile_ada.
|
||||
|
||||
---
|
||||
gdb/testsuite/lib/ada.exp | 31 +++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/lib/gdb.exp | 6 ++++++
|
||||
2 files changed, 37 insertions(+)
|
||||
|
||||
diff --git a/gdb/testsuite/lib/ada.exp b/gdb/testsuite/lib/ada.exp
|
||||
index 0ffc5957c8..8370ce5b9b 100644
|
||||
index f5bf2dcbb71..48dcd00bbe3 100644
|
||||
--- a/gdb/testsuite/lib/ada.exp
|
||||
+++ b/gdb/testsuite/lib/ada.exp
|
||||
@@ -87,12 +87,43 @@ proc gdb_compile_ada_1 {source dest type options} {
|
||||
@@ -85,12 +85,43 @@ proc gdb_compile_ada_1 {source dest type options} {
|
||||
# compile was successful.
|
||||
|
||||
proc gdb_compile_ada {source dest type options} {
|
||||
@ -87,18 +90,18 @@ index 0ffc5957c8..8370ce5b9b 100644
|
||||
# used a different naming convention from many of the other gdb tests,
|
||||
# and this difference was preserved during the conversion to
|
||||
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
|
||||
index 653f145c1c..a0f2961a75 100644
|
||||
index 31856fa3721..85c0bfb897f 100644
|
||||
--- a/gdb/testsuite/lib/gdb.exp
|
||||
+++ b/gdb/testsuite/lib/gdb.exp
|
||||
@@ -84,6 +84,7 @@ load_lib cache.exp
|
||||
@@ -137,6 +137,7 @@ load_lib cache.exp
|
||||
load_lib gdb-utils.exp
|
||||
load_lib memory.exp
|
||||
load_lib check-test-names.exp
|
||||
+load_lib ada.exp
|
||||
|
||||
# The path to the GDB binary to test.
|
||||
global GDB
|
||||
|
||||
@@ -2093,6 +2094,11 @@ proc skip_fortran_tests {} {
|
||||
@@ -2450,6 +2451,11 @@ proc skip_fortran_tests {} {
|
||||
# Return a 1 if I don't even want to try to test ada.
|
||||
|
||||
proc skip_ada_tests {} {
|
||||
@ -110,3 +113,6 @@ index 653f145c1c..a0f2961a75 100644
|
||||
return 0
|
||||
}
|
||||
|
||||
--
|
||||
2.35.3
|
||||
|
||||
|
80
gdb-testsuite-add-basic-lmap-for-tcl-8.6.patch
Normal file
80
gdb-testsuite-add-basic-lmap-for-tcl-8.6.patch
Normal file
@ -0,0 +1,80 @@
|
||||
From f54470964a1781c0e5a92b5ff2f1979a79b4a4b1 Mon Sep 17 00:00:00 2001
|
||||
From: Tom de Vries <tdevries@suse.de>
|
||||
Date: Mon, 24 Apr 2023 14:48:06 +0200
|
||||
Subject: [PATCH 1/9] [gdb/testsuite] Add basic lmap for tcl < 8.6
|
||||
|
||||
With test-case gdb.dwarf2/dw2-abs-hi-pc.exp and tcl 8.5, I run into:
|
||||
...
|
||||
ERROR: tcl error sourcing gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp.
|
||||
ERROR: invalid command name "lmap"
|
||||
while executing
|
||||
"::gdb_tcl_unknown lmap i {dw2-abs-hi-pc.c dw2-abs-hi-pc-hello.c \
|
||||
dw2-abs-hi-pc-world.c} { expr { "$srcdir/$subdir/$i" } }"
|
||||
...
|
||||
|
||||
Fix this by adding basic lmap support for tcl version < 8.6.
|
||||
|
||||
Tested on x86_64-linux.
|
||||
---
|
||||
gdb/testsuite/gdb.testsuite/lmap.exp | 20 ++++++++++++++++++++
|
||||
gdb/testsuite/lib/gdb.exp | 15 +++++++++++++++
|
||||
2 files changed, 35 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.testsuite/lmap.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.testsuite/lmap.exp b/gdb/testsuite/gdb.testsuite/lmap.exp
|
||||
new file mode 100644
|
||||
index 00000000000..501e18bdd92
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.testsuite/lmap.exp
|
||||
@@ -0,0 +1,20 @@
|
||||
+# Copyright 2023 Free Software Foundation, Inc.
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+set one 1
|
||||
+set l1 { $one 2 }
|
||||
+set res1 [lmap item $l1 {expr $item + 1}]
|
||||
+gdb_assert { [lindex $res1 0] == 2 }
|
||||
+gdb_assert { [lindex $res1 1] == 3 }
|
||||
+gdb_assert { $item == 2 }
|
||||
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
|
||||
index b6e30204371..0b8a15f61cb 100644
|
||||
--- a/gdb/testsuite/lib/gdb.exp
|
||||
+++ b/gdb/testsuite/lib/gdb.exp
|
||||
@@ -1524,6 +1524,21 @@ if { [tcl_version_at_least 8 5] == 0 } {
|
||||
}
|
||||
}
|
||||
|
||||
+if { [tcl_version_at_least 8 6] == 0 } {
|
||||
+ # lmap was added in tcl 8.6. Only add if missing.
|
||||
+
|
||||
+ # Note that we only implement the simple variant for now.
|
||||
+ proc lmap { varname list body } {
|
||||
+ set res {}
|
||||
+ foreach val $list {
|
||||
+ uplevel 1 "set $varname $val"
|
||||
+ lappend res [uplevel 1 $body]
|
||||
+ }
|
||||
+
|
||||
+ return $res
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
# gdb_test_no_output [-prompt PROMPT_REGEXP] [-nopass] COMMAND [MESSAGE]
|
||||
# Send a command to GDB and verify that this command generated no output.
|
||||
#
|
||||
|
||||
base-commit: fdf0253385db9239c44ea5a4ec879eeeae12fca1
|
||||
--
|
||||
2.35.3
|
||||
|
148
gdb-testsuite-add-have_host_locale.patch
Normal file
148
gdb-testsuite-add-have_host_locale.patch
Normal file
@ -0,0 +1,148 @@
|
||||
From f26e9f1ce8e47bca399116a99ffdbf0aff9f2080 Mon Sep 17 00:00:00 2001
|
||||
From: Tom de Vries <tdevries@suse.de>
|
||||
Date: Mon, 12 Jun 2023 18:00:10 +0200
|
||||
Subject: [PATCH 3/9] [gdb/testsuite] Add have_host_locale
|
||||
|
||||
With test-case gdb.tui/pr30056.exp, I run into:
|
||||
...
|
||||
sh: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)^M
|
||||
...
|
||||
and then subsequently into:
|
||||
...
|
||||
WARNING: timeout in accept_gdb_output
|
||||
FAIL: gdb.tui/pr30056.exp: Control-C
|
||||
...
|
||||
|
||||
This is on a CentOS 7 distro for powerpc64le.
|
||||
|
||||
Either it has no C.UTF-8 support, or it's not installed:
|
||||
...
|
||||
$ locale -a | grep ^C
|
||||
C
|
||||
$
|
||||
...
|
||||
|
||||
Fix this by:
|
||||
- adding a new proc have_host_locale, and
|
||||
- using it in all test-cases using setenv LC_ALL.
|
||||
|
||||
Tested on powerpc64le-linux and x86_64-linux.
|
||||
---
|
||||
gdb/testsuite/gdb.ada/non-ascii-latin-1.exp | 1 +
|
||||
gdb/testsuite/gdb.ada/non-ascii-latin-3.exp | 1 +
|
||||
gdb/testsuite/gdb.ada/non-ascii-utf-8.exp | 1 +
|
||||
gdb/testsuite/gdb.base/utf8-identifiers.exp | 2 ++
|
||||
gdb/testsuite/gdb.rust/unicode.exp | 1 +
|
||||
gdb/testsuite/lib/gdb.exp | 36 +++++++++++++++++++++
|
||||
6 files changed, 42 insertions(+)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.ada/non-ascii-latin-1.exp b/gdb/testsuite/gdb.ada/non-ascii-latin-1.exp
|
||||
index ad4ccde625b..472e049737b 100644
|
||||
--- a/gdb/testsuite/gdb.ada/non-ascii-latin-1.exp
|
||||
+++ b/gdb/testsuite/gdb.ada/non-ascii-latin-1.exp
|
||||
@@ -18,6 +18,7 @@
|
||||
load_lib "ada.exp"
|
||||
|
||||
if { [skip_ada_tests] } { return -1 }
|
||||
+if { ![have_host_locale C.UTF-8] } { return -1 }
|
||||
|
||||
# Enable basic use of UTF-8. LC_ALL gets reset for each testfile. We
|
||||
# want this despite the program itself using Latin-1, as this test is
|
||||
diff --git a/gdb/testsuite/gdb.ada/non-ascii-latin-3.exp b/gdb/testsuite/gdb.ada/non-ascii-latin-3.exp
|
||||
index f2bdd99d243..6f826427ad3 100644
|
||||
--- a/gdb/testsuite/gdb.ada/non-ascii-latin-3.exp
|
||||
+++ b/gdb/testsuite/gdb.ada/non-ascii-latin-3.exp
|
||||
@@ -18,6 +18,7 @@
|
||||
load_lib "ada.exp"
|
||||
|
||||
if { [skip_ada_tests] } { return -1 }
|
||||
+if { ![have_host_locale C.UTF-8] } { return -1 }
|
||||
|
||||
# Enable basic use of UTF-8. LC_ALL gets reset for each testfile. We
|
||||
# want this despite the program itself using Latin-1, as this test is
|
||||
diff --git a/gdb/testsuite/gdb.ada/non-ascii-utf-8.exp b/gdb/testsuite/gdb.ada/non-ascii-utf-8.exp
|
||||
index d3c1ac4d0cf..7dcfb71bbb3 100644
|
||||
--- a/gdb/testsuite/gdb.ada/non-ascii-utf-8.exp
|
||||
+++ b/gdb/testsuite/gdb.ada/non-ascii-utf-8.exp
|
||||
@@ -18,6 +18,7 @@
|
||||
load_lib "ada.exp"
|
||||
|
||||
if { [skip_ada_tests] } { return -1 }
|
||||
+if { ![have_host_locale C.UTF-8] } { return -1 }
|
||||
|
||||
# Enable basic use of UTF-8. LC_ALL gets reset for each testfile.
|
||||
setenv LC_ALL C.UTF-8
|
||||
diff --git a/gdb/testsuite/gdb.base/utf8-identifiers.exp b/gdb/testsuite/gdb.base/utf8-identifiers.exp
|
||||
index a6ef80fb0bd..7babe237dfb 100644
|
||||
--- a/gdb/testsuite/gdb.base/utf8-identifiers.exp
|
||||
+++ b/gdb/testsuite/gdb.base/utf8-identifiers.exp
|
||||
@@ -21,6 +21,8 @@
|
||||
|
||||
load_lib completion-support.exp
|
||||
|
||||
+if { ![have_host_locale C.UTF-8] } { return -1 }
|
||||
+
|
||||
standard_testfile
|
||||
|
||||
# Enable basic use of UTF-8. LC_ALL gets reset for each testfile.
|
||||
diff --git a/gdb/testsuite/gdb.rust/unicode.exp b/gdb/testsuite/gdb.rust/unicode.exp
|
||||
index 63ed8d1250c..185eae008f6 100644
|
||||
--- a/gdb/testsuite/gdb.rust/unicode.exp
|
||||
+++ b/gdb/testsuite/gdb.rust/unicode.exp
|
||||
@@ -19,6 +19,7 @@ load_lib rust-support.exp
|
||||
if {[skip_rust_tests]} {
|
||||
return
|
||||
}
|
||||
+if { ![have_host_locale C.UTF-8] } { return }
|
||||
|
||||
# Non-ASCII identifiers were allowed starting in 1.53.
|
||||
set v [split [rust_compiler_version] .]
|
||||
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
|
||||
index 0b8a15f61cb..cd043ce3436 100644
|
||||
--- a/gdb/testsuite/lib/gdb.exp
|
||||
+++ b/gdb/testsuite/lib/gdb.exp
|
||||
@@ -9452,5 +9452,41 @@ proc have_syscall { name } {
|
||||
return [gdb_can_simple_compile have_syscall_$name $src object]
|
||||
}
|
||||
|
||||
+# Return a list of supported host locales.
|
||||
+
|
||||
+gdb_caching_proc host_locales {
|
||||
+ set result [remote_exec host "locale -a"]
|
||||
+ set status [lindex $result 0]
|
||||
+ set output [lindex $result 1]
|
||||
+
|
||||
+ if { $status != 0 } {
|
||||
+ return {}
|
||||
+ }
|
||||
+
|
||||
+ # Split into list.
|
||||
+ set output [string trim $output]
|
||||
+ set l [split $output \n]
|
||||
+
|
||||
+ # Trim items.
|
||||
+ set l [lmap v $l { string trim $v }]
|
||||
+
|
||||
+ # Normalize items to lower-case.
|
||||
+ set l [lmap v $l { string tolower $v }]
|
||||
+
|
||||
+ return $l
|
||||
+}
|
||||
+
|
||||
+# Return 1 if host locale LOCALE is supported.
|
||||
+
|
||||
+proc have_host_locale { locale } {
|
||||
+ # Normalize to lower-case.
|
||||
+ set locale [string tolower $locale]
|
||||
+ # Normalize to without dash.
|
||||
+ set locale [string map { "-" "" } $locale]
|
||||
+
|
||||
+ set idx [lsearch [host_locales] $locale]
|
||||
+ return [expr $idx != -1]
|
||||
+}
|
||||
+
|
||||
# Always load compatibility stuff.
|
||||
load_lib future.exp
|
||||
--
|
||||
2.35.3
|
||||
|
@ -1,57 +0,0 @@
|
||||
[gdb/testsuite] Add KFAIL in gdb.threads/fork-plus-threads.exp
|
||||
|
||||
When running test-case gdb.threads/fork-and-threads.exp on a VM with openSUSE
|
||||
Tumbleweed, with the VM bound to 1 cpu with 75% execution cap, I get:
|
||||
...
|
||||
(gdb) info inferiors^M
|
||||
Num Description Connection Executable ^M
|
||||
* 1 <null> fork-plus-threads ^M
|
||||
11 <null> fork-plus-threads ^M
|
||||
(gdb) FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: \
|
||||
only inferior 1 left
|
||||
...
|
||||
|
||||
The test checks that all removable inferiors are indeed removed from the
|
||||
inferior list after exit, and evidently this didn't happen for inferior 11
|
||||
(which is added by fork rather than a user command, and therefore removable).
|
||||
|
||||
I've investigated why that is that case, and it's because its refcount didn't
|
||||
drop to 0.
|
||||
|
||||
This seems like a bug to me, so add a KFAIL for this.
|
||||
|
||||
Tested on x86_64-linux.
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.threads/fork-plus-threads.exp | 18 +++++++++++++++---
|
||||
1 file changed, 15 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.threads/fork-plus-threads.exp b/gdb/testsuite/gdb.threads/fork-plus-threads.exp
|
||||
index c8e179938c6..5b2b0909a65 100644
|
||||
--- a/gdb/testsuite/gdb.threads/fork-plus-threads.exp
|
||||
+++ b/gdb/testsuite/gdb.threads/fork-plus-threads.exp
|
||||
@@ -119,9 +119,21 @@ proc do_test { detach-on-fork } {
|
||||
gdb_test "info threads" "No threads\." \
|
||||
"no threads left"
|
||||
|
||||
- gdb_test "info inferiors" \
|
||||
- "Num\[ \t\]+Description\[ \t\]+Connection\[ \t\]+Executable\[ \t\]+\r\n\\* 1 \[^\r\n\]+" \
|
||||
- "only inferior 1 left"
|
||||
+ set re \
|
||||
+ [multi_line \
|
||||
+ "Num\[ \t\]+Description\[ \t\]+Connection\[ \t\]+Executable\[ \t\]+" \
|
||||
+ "\\* 1 \[^\r\n\]+"]
|
||||
+ gdb_test_multiple "info inferiors" "only inferior 1 left" {
|
||||
+ -re -wrap $re {
|
||||
+ pass $gdb_test_name
|
||||
+ }
|
||||
+ -re -wrap $re.* {
|
||||
+ if { ${detach-on-fork} == "off" } {
|
||||
+ setup_kfail "threads/26272" *-*-*
|
||||
+ }
|
||||
+ fail $gdb_test_name
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
foreach_with_prefix detach-on-fork {"on" "off"} {
|
@ -1,49 +0,0 @@
|
||||
gdb: testsuite: add new gdb_attach to check "attach" command
|
||||
|
||||
This commit adds new gdb_attach to centralize the failure checking of
|
||||
"attach" command. Return 0 if attach failed, otherwise return 1.
|
||||
|
||||
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
|
||||
Change-Id: I553cf386cef60c67d38e331904b4aa01e132104a
|
||||
|
||||
---
|
||||
gdb/testsuite/lib/gdb.exp | 26 ++++++++++++++++++++++++++
|
||||
1 file changed, 26 insertions(+)
|
||||
|
||||
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
|
||||
index 25c1572a53a..5104835a2a9 100644
|
||||
--- a/gdb/testsuite/lib/gdb.exp
|
||||
+++ b/gdb/testsuite/lib/gdb.exp
|
||||
@@ -5146,6 +5146,32 @@ proc can_spawn_for_attach { } {
|
||||
return 1
|
||||
}
|
||||
|
||||
+# Centralize the failure checking of "attach" command.
|
||||
+# Return 0 if attach failed, otherwise return 1.
|
||||
+
|
||||
+proc gdb_attach { testpid args } {
|
||||
+ parse_args {
|
||||
+ {pattern ""}
|
||||
+ }
|
||||
+
|
||||
+ if { [llength $args] != 0 } {
|
||||
+ error "Unexpected arguments: $args"
|
||||
+ }
|
||||
+
|
||||
+ gdb_test_multiple "attach $testpid" "attach" {
|
||||
+ -re -wrap "Attaching to.*ptrace: Operation not permitted\\." {
|
||||
+ unsupported "$gdb_test_name (Operation not permitted)"
|
||||
+ return 0
|
||||
+ }
|
||||
+ -re -wrap "$pattern" {
|
||||
+ pass $gdb_test_name
|
||||
+ return 1
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
# Kill a progress previously started with spawn_wait_for_attach, and
|
||||
# reap its wait status. PROC_SPAWN_ID is the spawn id associated with
|
||||
# the process.
|
@ -1,7 +1,7 @@
|
||||
From 1b89c346a99d89a06d9694ca4d47d040d4eebd5a Mon Sep 17 00:00:00 2001
|
||||
From 090d15fb9c7f7a48210783bddcf1d620bce6bf2a Mon Sep 17 00:00:00 2001
|
||||
From: Tom de Vries <tdevries@suse.de>
|
||||
Date: Tue, 3 Jan 2023 16:41:05 +0100
|
||||
Subject: [PATCH 02/11] [gdb/testsuite] Add xfail in gdb.arch/i386-pkru.exp
|
||||
Date: Fri, 21 Apr 2023 17:57:05 +0200
|
||||
Subject: [PATCH 3/5] [gdb/testsuite] Add xfail in gdb.arch/i386-pkru.exp
|
||||
|
||||
On a x86_64-linux machine with pkru register, I run into:
|
||||
...
|
||||
@ -30,7 +30,7 @@ Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29790
|
||||
2 files changed, 89 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.arch/i386-pkru.exp b/gdb/testsuite/gdb.arch/i386-pkru.exp
|
||||
index 7724a579631..5fe93db9b4b 100644
|
||||
index f5d74380a61..5d2b1a24a15 100644
|
||||
--- a/gdb/testsuite/gdb.arch/i386-pkru.exp
|
||||
+++ b/gdb/testsuite/gdb.arch/i386-pkru.exp
|
||||
@@ -58,6 +58,26 @@ if { !$supports_pkru } {
|
||||
@ -94,12 +94,12 @@ index 7724a579631..5fe93db9b4b 100644
|
||||
-gdb_test "print /x rd_value" "= 0x44444444" "variable after reading pkru"
|
||||
+gdb_test "print /x rd_value" "= $xval" "variable after reading pkru"
|
||||
diff --git a/gdb/testsuite/lib/gdb-utils.exp b/gdb/testsuite/lib/gdb-utils.exp
|
||||
index ffdfb75557c..294d0998632 100644
|
||||
index 78724f8b622..2757050fdfd 100644
|
||||
--- a/gdb/testsuite/lib/gdb-utils.exp
|
||||
+++ b/gdb/testsuite/lib/gdb-utils.exp
|
||||
@@ -72,3 +72,51 @@ proc style {str style} {
|
||||
@@ -100,3 +100,51 @@ proc gdb_get_bp_addr { num } {
|
||||
}
|
||||
return "\033\\\[${style}m${str}\033\\\[m"
|
||||
return ""
|
||||
}
|
||||
+
|
||||
+# Compare the version numbers in L1 to those in L2 using OP, and return
|
||||
|
@ -1,69 +0,0 @@
|
||||
gdb/testsuite: address test failures in gdb.mi/mi-multi-commands.exp
|
||||
|
||||
The gdb.mi/mi-multi-commands.exp test was added in commit:
|
||||
|
||||
commit d08cbc5d3203118da5583296e49273cf82378042
|
||||
Date: Wed Dec 22 12:57:44 2021 +0000
|
||||
|
||||
gdb: unbuffer all input streams when not using readline
|
||||
|
||||
And then tweaked in commit:
|
||||
|
||||
commit 144459531dd68a1287905079aaa131b777a8cc82
|
||||
Date: Mon Feb 7 20:35:58 2022 +0000
|
||||
|
||||
gdb/testsuite: relax pattern in new gdb.mi/mi-multi-commands.exp test
|
||||
|
||||
The second of these commits was intended to address periodic test
|
||||
failures that I was seeing, and this change did fix some problems,
|
||||
but, unfortunately, introduced other issues.
|
||||
|
||||
The problem is that the test relies on sending two commands to GDB in
|
||||
a single write. As the characters that make these two commands arrive
|
||||
they are echoed to GDB's console. However, there is a race between
|
||||
how quickly the characters are echoed and how quickly GDB decides to
|
||||
act on the incoming commands.
|
||||
|
||||
Usually, both commands are echoed in full before GDB acts on the first
|
||||
command, but sometimes this is not the case, and GDB can execute the
|
||||
first command before both commands are fully echoed to the console.
|
||||
In this case, the output of the first command will be mixed in with
|
||||
the echoing of the second command.
|
||||
|
||||
This mixing of the command echoing and the first command output is
|
||||
what was causing failures in the original version of the test.
|
||||
|
||||
The second commit relaxed the expected output pattern a little, but
|
||||
was still susceptible to failures, so this commit further relaxes the
|
||||
pattern.
|
||||
|
||||
Now, we look for the first command output with no regard to what is
|
||||
before, or after the command. Then we look for the first mi prompt to
|
||||
indicate that the first command has completed.
|
||||
|
||||
I believe that this change should make the test more stable than it
|
||||
was before.
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.mi/mi-multi-commands.exp | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.mi/mi-multi-commands.exp b/gdb/testsuite/gdb.mi/mi-multi-commands.exp
|
||||
index 12b1b482f9a..d00e0aaea8b 100644
|
||||
--- a/gdb/testsuite/gdb.mi/mi-multi-commands.exp
|
||||
+++ b/gdb/testsuite/gdb.mi/mi-multi-commands.exp
|
||||
@@ -100,9 +100,12 @@ proc run_test { args } {
|
||||
set seen_second_message false
|
||||
|
||||
gdb_test_multiple "" "look for first command output, command length $i" -prompt "$mi_gdb_prompt" {
|
||||
- -re "\\^done,value=\"\\\\\"FIRST COMMAND\\\\\"\"\r\n" {
|
||||
- pass $gdb_test_name
|
||||
+ -re "\\^done,value=\"\\\\\"FIRST COMMAND\\\\\"\"" {
|
||||
set seen_first_message true
|
||||
+ exp_continue
|
||||
+ }
|
||||
+ -re "\r\n$mi_gdb_prompt" {
|
||||
+ gdb_assert $seen_first_message $gdb_test_name
|
||||
}
|
||||
}
|
||||
|
@ -1,74 +0,0 @@
|
||||
[gdb/testsuite] Detect change instead of init in gdb.mi/mi-var-block.exp
|
||||
|
||||
On openSUSE Tumbleweed with target board unix/-m32, I run into:
|
||||
...
|
||||
PASS: gdb.mi/mi-var-block.exp: step at do_block_test 2
|
||||
Expecting: ^(-var-update \*[^M
|
||||
]+)?(\^done,changelist=\[{name="foo",in_scope="true",type_changed="false",has_more="0"},
|
||||
{name="cb",in_scope="true",type_changed="false",has_more="0"}\][^M
|
||||
]+[(]gdb[)] ^M
|
||||
[ ]*)
|
||||
-var-update *^M
|
||||
^done,changelist=[{name="foo",in_scope="true",type_changed="false",has_more="0"}]^M
|
||||
(gdb) ^M
|
||||
FAIL: gdb.mi/mi-var-block.exp: update all vars: cb foo changed (unexpected output)
|
||||
...
|
||||
|
||||
The problem is that the test-case attempts to detect a change in the cb
|
||||
variable caused by this initialization:
|
||||
...
|
||||
void
|
||||
do_block_tests ()
|
||||
{
|
||||
int cb = 12;
|
||||
...
|
||||
but that only works if the stack location happens to be unequal to 12 before
|
||||
the initialization.
|
||||
|
||||
Fix this by first initializing to 0, and then changing the value to 12:
|
||||
...
|
||||
- int cb = 12;
|
||||
+ int cb = 0;
|
||||
+ cb = 12;
|
||||
...
|
||||
and detecting that change.
|
||||
|
||||
Tested on x86_64-linux.
|
||||
|
||||
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29195
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.mi/mi-var-block.exp | 5 +++++
|
||||
gdb/testsuite/gdb.mi/var-cmd.c | 3 ++-
|
||||
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.mi/mi-var-block.exp b/gdb/testsuite/gdb.mi/mi-var-block.exp
|
||||
index cb94936fa86..b0707eb3530 100644
|
||||
--- a/gdb/testsuite/gdb.mi/mi-var-block.exp
|
||||
+++ b/gdb/testsuite/gdb.mi/mi-var-block.exp
|
||||
@@ -40,6 +40,11 @@ mi_gdb_load ${binfile}
|
||||
|
||||
mi_runto do_block_tests
|
||||
|
||||
+# step to "cb = 12;"
|
||||
+mi_step_to "do_block_tests" "" "var-cmd.c" \
|
||||
+ [gdb_get_line_number "cb = 12;"] \
|
||||
+ "step at do_block_test 0"
|
||||
+
|
||||
# Test: c_variable-3.2
|
||||
# Desc: create cb and foo
|
||||
mi_create_varobj "cb" "cb" "create local variable cb"
|
||||
diff --git a/gdb/testsuite/gdb.mi/var-cmd.c b/gdb/testsuite/gdb.mi/var-cmd.c
|
||||
index fddb0d39a5e..f3312788a80 100644
|
||||
--- a/gdb/testsuite/gdb.mi/var-cmd.c
|
||||
+++ b/gdb/testsuite/gdb.mi/var-cmd.c
|
||||
@@ -207,7 +207,8 @@ subroutine1 (int i, long *l)
|
||||
void
|
||||
do_block_tests ()
|
||||
{
|
||||
- int cb = 12;
|
||||
+ int cb = 0;
|
||||
+ cb = 12;
|
||||
|
||||
{
|
||||
int foo;
|
39
gdb-testsuite-don-t-use-string-cat-in-gdb.dwarf2-dw2.patch
Normal file
39
gdb-testsuite-don-t-use-string-cat-in-gdb.dwarf2-dw2.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From f3a7b8d3d63005e9e0b680688d0cde0e5d4e1de9 Mon Sep 17 00:00:00 2001
|
||||
From: Tom de Vries <tdevries@suse.de>
|
||||
Date: Mon, 24 Apr 2023 14:48:06 +0200
|
||||
Subject: [PATCH 7/9] [gdb/testsuite] Don't use string cat in
|
||||
gdb.dwarf2/dw2-abs-hi-pc.exp
|
||||
|
||||
Test-case gdb.dwarf2/dw2-abs-hi-pc.exp uses string cat:
|
||||
...
|
||||
set sources [lmap i $sources { string cat "${srcdir}/${subdir}/" $i }]
|
||||
...
|
||||
but that's only supported starting tcl 8.6.
|
||||
|
||||
Fix this by using "expr" instead:
|
||||
...
|
||||
set sources [lmap i $sources { expr { "$srcdir/$subdir/$i" } }]
|
||||
...
|
||||
|
||||
Tested on x86_64-linux.
|
||||
---
|
||||
gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp b/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp
|
||||
index 397cb38ceef..6e4b570c86d 100644
|
||||
--- a/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp
|
||||
@@ -26,7 +26,8 @@ set sources \
|
||||
${testfile}.c \
|
||||
${testfile}-hello.c \
|
||||
${testfile}-world.c]
|
||||
-set sources [lmap i $sources { string cat "${srcdir}/${subdir}/" $i }]
|
||||
+set sources [lmap i $sources { expr { "$srcdir/$subdir/$i" } }]
|
||||
+
|
||||
lassign [function_range hello $sources] \
|
||||
hello_start hello_len
|
||||
lassign [function_range world $sources] \
|
||||
--
|
||||
2.35.3
|
||||
|
@ -1,430 +0,0 @@
|
||||
[gdb/testsuite] Enable some test-cases for x86_64 -m32
|
||||
|
||||
When trying to run test-case gdb.reverse/i387-env-reverse.exp for x86_64-linux
|
||||
with target board unix/-m32, it's skipped.
|
||||
|
||||
Fix this by using is_x86_like_target instead of istarget "i?86-*linux*".
|
||||
|
||||
This exposes a number of duplicates, fix those by making the test names unique.
|
||||
|
||||
Likewise in a couple of other test-cases.
|
||||
|
||||
Tested on x86_64-linux with target boards unix/-m32.
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.reverse/i386-precsave.exp | 2 +-
|
||||
gdb/testsuite/gdb.reverse/i386-reverse.exp | 2 +-
|
||||
gdb/testsuite/gdb.reverse/i387-env-reverse.exp | 121 +++++++------
|
||||
gdb/testsuite/gdb.reverse/i387-stack-reverse.exp | 214 +++++++++++------------
|
||||
4 files changed, 166 insertions(+), 173 deletions(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.reverse/i386-precsave.exp b/gdb/testsuite/gdb.reverse/i386-precsave.exp
|
||||
index e3fc940f5d0..54580474430 100644
|
||||
--- a/gdb/testsuite/gdb.reverse/i386-precsave.exp
|
||||
+++ b/gdb/testsuite/gdb.reverse/i386-precsave.exp
|
||||
@@ -25,7 +25,7 @@ if ![supports_process_record] {
|
||||
}
|
||||
|
||||
|
||||
-if ![istarget "i?86-*linux*"] then {
|
||||
+if ![is_x86_like_target] then {
|
||||
verbose "Skipping i386 reverse tests."
|
||||
return
|
||||
}
|
||||
diff --git a/gdb/testsuite/gdb.reverse/i386-reverse.exp b/gdb/testsuite/gdb.reverse/i386-reverse.exp
|
||||
index 68e964e863c..15c18dad205 100644
|
||||
--- a/gdb/testsuite/gdb.reverse/i386-reverse.exp
|
||||
+++ b/gdb/testsuite/gdb.reverse/i386-reverse.exp
|
||||
@@ -24,7 +24,7 @@ if ![supports_reverse] {
|
||||
}
|
||||
|
||||
|
||||
-if ![istarget "i?86-*linux*"] then {
|
||||
+if ![is_x86_like_target] then {
|
||||
verbose "Skipping i386 reverse tests."
|
||||
return
|
||||
}
|
||||
diff --git a/gdb/testsuite/gdb.reverse/i387-env-reverse.exp b/gdb/testsuite/gdb.reverse/i387-env-reverse.exp
|
||||
index 43c493dcca9..a0a79c22ed0 100644
|
||||
--- a/gdb/testsuite/gdb.reverse/i387-env-reverse.exp
|
||||
+++ b/gdb/testsuite/gdb.reverse/i387-env-reverse.exp
|
||||
@@ -16,7 +16,7 @@
|
||||
# This file is part of the gdb testsuite.
|
||||
|
||||
|
||||
-if ![istarget "i?86-*linux*"] then {
|
||||
+if ![is_x86_like_target] then {
|
||||
verbose "Skipping i387 reverse float tests."
|
||||
return
|
||||
}
|
||||
@@ -52,82 +52,79 @@ gdb_test "until $location" ".*$srcfile:$location.*" \
|
||||
"rewind to beginning of main"
|
||||
gdb_test_no_output "set exec-dir forward" "set forward direction"
|
||||
|
||||
-# Test FPU env particularly ftag and fstatus reigters.
|
||||
+with_test_prefix "forward" {
|
||||
+ # Test FPU env particularly ftag and fstatus reigters.
|
||||
|
||||
-set location [gdb_get_line_number "TEST ENV"]
|
||||
-gdb_test "until $location" ".*$srcfile:$location.*asm.*nop.*" \
|
||||
- "begin testing fpu env"
|
||||
+ set location [gdb_get_line_number "TEST ENV"]
|
||||
+ gdb_test "until $location" ".*$srcfile:$location.*asm.*nop.*" \
|
||||
+ "begin testing fpu env"
|
||||
|
||||
-gdb_test "n" "asm.*fsave.*" "save FPU env in memory"
|
||||
-gdb_test "n" "asm.*frstor.*" "restore FPU env"
|
||||
-gdb_test "n" "asm.*fstsw.*" "store status word in EAX"
|
||||
-gdb_test "n" "asm.*fld1.*" "push st0"
|
||||
+ gdb_test "n" "asm.*fsave.*" "save FPU env in memory"
|
||||
+ gdb_test "n" "asm.*frstor.*" "restore FPU env"
|
||||
+ gdb_test "n" "asm.*fstsw.*" "store status word in EAX"
|
||||
+ gdb_test "n" "asm.*fld1.*" "push st0"
|
||||
|
||||
-gdb_test "info register eax" "eax *0x8040000.*\[ \t\]+.*" "verify eax == 0x8040000"
|
||||
-gdb_test "info register fstat" "fstat *0.*\[ \t\]+.*" "verify fstat == 0"
|
||||
-gdb_test "info register ftag" "ftag *0xffff.*\[ \t\]+.*" "verify ftag == 0xffff"
|
||||
+ gdb_test "info register eax" "eax *0x8040000.*\[ \t\]+.*" "verify eax == 0x8040000"
|
||||
+ gdb_test "info register fstat" "fstat *0.*\[ \t\]+.*" "verify fstat == 0"
|
||||
+ gdb_test "info register ftag" "ftag *0xffff.*\[ \t\]+.*" "verify ftag == 0xffff"
|
||||
|
||||
-gdb_test "stepi" "asm.*fldl2t.*" "push st0"
|
||||
-gdb_test "info register fstat" "fstat *0x3800.*\[ \t\]+.*" "verify fstat == 0x3800"
|
||||
-gdb_test "info register ftag" "ftag *0x3fff.*\[ \t\]+.*" "verify ftag == 0x3fff"
|
||||
+ gdb_test "stepi" "asm.*fldl2t.*" "step to fldl2t"
|
||||
+ gdb_test "info register fstat" "fstat *0x3800.*\[ \t\]+.*" "verify fstat == 0x3800"
|
||||
+ gdb_test "info register ftag" "ftag *0x3fff.*\[ \t\]+.*" "verify ftag == 0x3fff"
|
||||
|
||||
-gdb_test "stepi" "asm.*fldl2e.*" "push st0"
|
||||
-gdb_test "info register fstat" "fstat *0x3000.*\[ \t\]+.*" "verify fstat == 0x3000"
|
||||
-gdb_test "info register ftag" "ftag *0xfff.*\[ \t\]+.*" "verify ftag == 0xfff"
|
||||
+ gdb_test "stepi" "asm.*fldl2e.*" "step to fldl2e"
|
||||
+ gdb_test "info register fstat" "fstat *0x3000.*\[ \t\]+.*" "verify fstat == 0x3000"
|
||||
+ gdb_test "info register ftag" "ftag *0xfff.*\[ \t\]+.*" "verify ftag == 0xfff"
|
||||
|
||||
-gdb_test "stepi" "asm.*fldpi.*" "push st0"
|
||||
-gdb_test "info register fstat" "fstat *0x2800.*\[ \t\]+.*" "verify fstat == 0x2800"
|
||||
-gdb_test "info register ftag" "ftag *0x3ff.*\[ \t\]+.*" "verify ftag == 0x3ff"
|
||||
+ gdb_test "stepi" "asm.*fldpi.*" "step to fldpi"
|
||||
+ gdb_test "info register fstat" "fstat *0x2800.*\[ \t\]+.*" "verify fstat == 0x2800"
|
||||
+ gdb_test "info register ftag" "ftag *0x3ff.*\[ \t\]+.*" "verify ftag == 0x3ff"
|
||||
|
||||
-gdb_test "stepi" "asm.*fldlg2.*" "push st0"
|
||||
-gdb_test "info register fstat" "fstat *0x2000.*\[ \t\]+.*" "verify fstat == 0x2000"
|
||||
-gdb_test "info register ftag" "ftag *0xff.*\[ \t\]+.*" "verify ftag == 0xff"
|
||||
+ gdb_test "stepi" "asm.*fldlg2.*" "step to fldlg2"
|
||||
+ gdb_test "info register fstat" "fstat *0x2000.*\[ \t\]+.*" "verify fstat == 0x2000"
|
||||
+ gdb_test "info register ftag" "ftag *0xff.*\[ \t\]+.*" "verify ftag == 0xff"
|
||||
|
||||
-gdb_test "stepi" "asm.*fldln2.*" "push st0"
|
||||
-gdb_test "info register fstat" "fstat *0x1800.*\[ \t\]+.*" "verify fstat == 0x1800"
|
||||
-gdb_test "info register ftag" "ftag *0x3f.*\[ \t\]+.*" "verify ftag == 0x3f"
|
||||
+ gdb_test "stepi" "asm.*fldln2.*" "step to fldln2"
|
||||
+ gdb_test "info register fstat" "fstat *0x1800.*\[ \t\]+.*" "verify fstat == 0x1800"
|
||||
+ gdb_test "info register ftag" "ftag *0x3f.*\[ \t\]+.*" "verify ftag == 0x3f"
|
||||
|
||||
-gdb_test "stepi" "asm.*fldz.*" "push st0"
|
||||
-gdb_test "info register fstat" "fstat *0x1000.*\[ \t\]+.*" "verify fstat == 0x1000"
|
||||
-gdb_test "info register ftag" "ftag *0xf.*\[ \t\]+.*" "verify ftag == 0xf"
|
||||
+ gdb_test "stepi" "asm.*fldz.*" "step to fldz"
|
||||
+ gdb_test "info register fstat" "fstat *0x1000.*\[ \t\]+.*" "verify fstat == 0x1000"
|
||||
+ gdb_test "info register ftag" "ftag *0xf.*\[ \t\]+.*" "verify ftag == 0xf"
|
||||
|
||||
-gdb_test "stepi" "asm.*nop.*" "push st0"
|
||||
-gdb_test "info register fstat" "fstat *0x800.*\[ \t\]+.*" "verify fstat == 0x800"
|
||||
-gdb_test "info register ftag" "ftag *0x7.*\[ \t\]+.*" "verify ftag == 0x7"
|
||||
-
|
||||
-
|
||||
-# move backward and ehck we get the same registers back.
|
||||
-
|
||||
-gdb_test "reverse-stepi" "asm.*fldz.*" "push st0"
|
||||
-gdb_test "info register fstat" "fstat *0x1000.*\[ \t\]+.*" "verify fstat == 0x1000"
|
||||
-gdb_test "info register ftag" "ftag *0xf.*\[ \t\]+.*" "verify ftag == 0xf"
|
||||
-
|
||||
-gdb_test "reverse-stepi" "asm.*fldln2.*" "push st0"
|
||||
-gdb_test "info register fstat" "fstat *0x1800.*\[ \t\]+.*" "verify fstat == 0x1800"
|
||||
-gdb_test "info register ftag" "ftag *0x3f.*\[ \t\]+.*" "verify ftag == 0x3f"
|
||||
-
|
||||
-gdb_test "reverse-stepi" "asm.*fldlg2.*" "push st0"
|
||||
-gdb_test "info register fstat" "fstat *0x2000.*\[ \t\]+.*" "verify fstat == 0x2000"
|
||||
-gdb_test "info register ftag" "ftag *0xff.*\[ \t\]+.*" "verify ftag == 0xff"
|
||||
-
|
||||
-gdb_test "reverse-stepi" "asm.*fldpi.*" "push st0"
|
||||
-gdb_test "info register fstat" "fstat *0x2800.*\[ \t\]+.*" "verify fstat == 0x2800"
|
||||
-gdb_test "info register ftag" "ftag *0x3ff.*\[ \t\]+.*" "verify ftag == 0x3ff"
|
||||
-
|
||||
-gdb_test "reverse-stepi" "asm.*fldl2e.*" "push st0"
|
||||
-gdb_test "info register fstat" "fstat *0x3000.*\[ \t\]+.*" "verify fstat == 0x3000"
|
||||
-gdb_test "info register ftag" "ftag *0xfff.*\[ \t\]+.*" "verify ftag == 0xfff"
|
||||
+ gdb_test "stepi" "asm.*nop.*" "step to nop"
|
||||
+ gdb_test "info register fstat" "fstat *0x800.*\[ \t\]+.*" "verify fstat == 0x800"
|
||||
+ gdb_test "info register ftag" "ftag *0x7.*\[ \t\]+.*" "verify ftag == 0x7"
|
||||
+}
|
||||
|
||||
-gdb_test "reverse-stepi" "asm.*fldl2t.*" "push st0"
|
||||
-gdb_test "info register fstat" "fstat *0x3800.*\[ \t\]+.*" "verify fstat == 0x3800"
|
||||
-gdb_test "info register ftag" "ftag *0x3fff.*\[ \t\]+.*" "verify ftag == 0x3fff"
|
||||
+# Move backward and check we get the same registers back.
|
||||
|
||||
-gdb_test "reverse-stepi" "asm.*fld1.*" "push st0"
|
||||
-gdb_test "info register fstat" "fstat *0.*\[ \t\]+.*" "verify fstat == 0"
|
||||
-gdb_test "info register ftag" "ftag *0xffff.*\[ \t\]+.*" "verify ftag == 0xffff"
|
||||
+with_test_prefix "backward" {
|
||||
+ gdb_test "reverse-stepi" "asm.*fldz.*" "step to fldz"
|
||||
+ gdb_test "info register fstat" "fstat *0x1000.*\[ \t\]+.*" "verify fstat == 0x1000"
|
||||
+ gdb_test "info register ftag" "ftag *0xf.*\[ \t\]+.*" "verify ftag == 0xf"
|
||||
|
||||
+ gdb_test "reverse-stepi" "asm.*fldln2.*" "step to fldln2"
|
||||
+ gdb_test "info register fstat" "fstat *0x1800.*\[ \t\]+.*" "verify fstat == 0x1800"
|
||||
+ gdb_test "info register ftag" "ftag *0x3f.*\[ \t\]+.*" "verify ftag == 0x3f"
|
||||
|
||||
+ gdb_test "reverse-stepi" "asm.*fldlg2.*" "step to fldlg2"
|
||||
+ gdb_test "info register fstat" "fstat *0x2000.*\[ \t\]+.*" "verify fstat == 0x2000"
|
||||
+ gdb_test "info register ftag" "ftag *0xff.*\[ \t\]+.*" "verify ftag == 0xff"
|
||||
|
||||
+ gdb_test "reverse-stepi" "asm.*fldpi.*" "step to fldpi"
|
||||
+ gdb_test "info register fstat" "fstat *0x2800.*\[ \t\]+.*" "verify fstat == 0x2800"
|
||||
+ gdb_test "info register ftag" "ftag *0x3ff.*\[ \t\]+.*" "verify ftag == 0x3ff"
|
||||
|
||||
+ gdb_test "reverse-stepi" "asm.*fldl2e.*" "step tp fldl2d"
|
||||
+ gdb_test "info register fstat" "fstat *0x3000.*\[ \t\]+.*" "verify fstat == 0x3000"
|
||||
+ gdb_test "info register ftag" "ftag *0xfff.*\[ \t\]+.*" "verify ftag == 0xfff"
|
||||
|
||||
+ gdb_test "reverse-stepi" "asm.*fldl2t.*" "step to fldl2t"
|
||||
+ gdb_test "info register fstat" "fstat *0x3800.*\[ \t\]+.*" "verify fstat == 0x3800"
|
||||
+ gdb_test "info register ftag" "ftag *0x3fff.*\[ \t\]+.*" "verify ftag == 0x3fff"
|
||||
|
||||
+ gdb_test "reverse-stepi" "asm.*fld1.*" "step to fld1"
|
||||
+ gdb_test "info register fstat" "fstat *0.*\[ \t\]+.*" "verify fstat == 0"
|
||||
+ gdb_test "info register ftag" "ftag *0xffff.*\[ \t\]+.*" "verify ftag == 0xffff"
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.reverse/i387-stack-reverse.exp b/gdb/testsuite/gdb.reverse/i387-stack-reverse.exp
|
||||
index 9f8ff74da2b..cadd4f76035 100644
|
||||
--- a/gdb/testsuite/gdb.reverse/i387-stack-reverse.exp
|
||||
+++ b/gdb/testsuite/gdb.reverse/i387-stack-reverse.exp
|
||||
@@ -16,7 +16,7 @@
|
||||
# This file is part of the gdb testsuite.
|
||||
|
||||
|
||||
-if ![istarget "i?86-*linux*"] then {
|
||||
+if ![is_x86_like_target] then {
|
||||
verbose "Skipping i387 reverse float tests."
|
||||
return
|
||||
}
|
||||
@@ -48,112 +48,108 @@ gdb_test "until $location" ".*$srcfile:$location.*" \
|
||||
"rewind to beginning of main"
|
||||
gdb_test_no_output "set exec-dir forward" "set forward direction"
|
||||
|
||||
-# Test FPU stack. FPU stack includes st0, st1, st2, st3, st4,
|
||||
-# st5, st6, st7. We push 8 values to FPU stack in record mode
|
||||
-# and see whether all are getting recorded.
|
||||
-
|
||||
-set location [gdb_get_line_number "test st0 register"]
|
||||
-gdb_test "until $location" ".*$srcfile:$location.*asm.*fld1.*" \
|
||||
- "begin test st0"
|
||||
-gdb_test "stepi" "asm.*fldl2t.*" "push st0 == 1"
|
||||
-gdb_test "info register st0" "st0 *1\[ \t\]+.*" "verify st0 == 1"
|
||||
-
|
||||
-
|
||||
-gdb_test "stepi" "asm.*fldl2e.*" "push st0 == 3.3219280948*"
|
||||
-gdb_test "info register st0" "st0 *3.32192.*\[ \t\]+.*" "verify st0 == 3.321928094*"
|
||||
-gdb_test "info register st1" "st1 *1\[ \t\]+.*" "verify st1 == 1"
|
||||
-
|
||||
-gdb_test "stepi" "asm.*fldpi.*" "push st0 == 1.4426950406*"
|
||||
-gdb_test "info register st0" "st0 *1.44269.*\[ \t\]+.*" "verify st0 == 1.442695040*"
|
||||
-gdb_test "info register st1" "st1 *3.32192.*\[ \t\]+.*" "verify st1 == 3.3219280948*"
|
||||
-gdb_test "info register st2" "st2 *1\[ \t\]+.*" "verify st2 == 1"
|
||||
-
|
||||
-gdb_test "stepi" "asm.*fldlg2.*" "push st0 == 3.14159265*"
|
||||
-gdb_test "info register st0" "st0 *3.14159.*\[ \t\]+.*" "verify st0 == 3.14159265*"
|
||||
-gdb_test "info register st1" "st1 *1.44269.*\[ \t\]+.*" "verify st1 == 1.4426950*"
|
||||
-gdb_test "info register st2" "st2 *3.32192.*\[ \t\]+.*" "verify st2 == 3.3219280*"
|
||||
-gdb_test "info register st3" "st3 *1\[ \t\]+.*" "verify st3 == 1"
|
||||
-
|
||||
-gdb_test "stepi" "asm.*fldln2.*" "push st0 == 0.301029*"
|
||||
-gdb_test "info register st0" "st0 *0.30102.*\[ \t\]+.*" "verify st0 == 0.301029*"
|
||||
-gdb_test "info register st1" "st1 *3.14159.*\[ \t\]+.*" "verify st1 == 3.14159265*"
|
||||
-gdb_test "info register st2" "st2 *1.44269.*\[ \t\]+.*" "verify st2 == 1.44269506*"
|
||||
-gdb_test "info register st3" "st3 *3.32192.*\[ \t\]+.*" "verify st3 == 3.3219280948*"
|
||||
-gdb_test "info register st4" "st4 *1\[ \t\]+.*" "verify st4 == 1"
|
||||
-
|
||||
-gdb_test "stepi" "asm.*fldz.*" "push st0 == 0.69314*"
|
||||
-gdb_test "info register st0" "st0 *0.69314.*\[ \t\]+.*" "verify st0 == 0.69314*"
|
||||
-gdb_test "info register st1" "st1 *0.30102.*\[ \t\]+.*" "verify st1 == 0.301029*"
|
||||
-gdb_test "info register st2" "st2 *3.14159.*\[ \t\]+.*" "verify st2 == 3.14159265*"
|
||||
-gdb_test "info register st3" "st3 *1.44269.*\[ \t\]+.*" "verify st3 == 1.442695040*"
|
||||
-gdb_test "info register st4" "st4 *3.32192.*\[ \t\]+.*" "verify st4 == 3.3219280948*"
|
||||
-gdb_test "info register st5" "st5 *1\[ \t\]+.*" "verify st5 == 1"
|
||||
-
|
||||
-gdb_test "stepi" "asm.*fld1.*" "push st0 == 0"
|
||||
-gdb_test "info register st0" "st0 *0\[ \t\]+.*" "verify st0 == 0"
|
||||
-gdb_test "info register st1" "st1 *0.69314.*\[ \t\]+.*" "verify st1 == 0.69314*"
|
||||
-gdb_test "info register st2" "st2 *0.30102.*\[ \t\]+.*" "verify st2 == 0.301029*"
|
||||
-gdb_test "info register st3" "st3 *3.14159.*\[ \t\]+.*" "verify st3 == 3.14159265*"
|
||||
-gdb_test "info register st4" "st4 *1.44269.*\[ \t\]+.*" "verify st4 == 1.442695040*"
|
||||
-gdb_test "info register st5" "st5 *3.32192.*\[ \t\]+.*" "verify st5 == 3.32192809*"
|
||||
-gdb_test "info register st6" "st6 *1\[ \t\]+.*" "verify st6 == 1"
|
||||
-
|
||||
-gdb_test "stepi" "asm.*nop.*" "push st0 == 0"
|
||||
-gdb_test "info register st0" "st0 *1\[ \t\]+.*" "verify st0 == 1"
|
||||
-gdb_test "info register st1" "st1 *0\[ \t\]+.*" "verify st1 == 0"
|
||||
-gdb_test "info register st2" "st2 *0.69314.*\[ \t\]+.*" "verify st2 == 0.69314*"
|
||||
-gdb_test "info register st3" "st3 *0.30102.*\[ \t\]+.*" "verify st3 == 0.301029*"
|
||||
-gdb_test "info register st4" "st4 *3.14159.*\[ \t\]+.*" "verify st4 == 3.14159265*"
|
||||
-gdb_test "info register st5" "st5 *1.44269.*\[ \t\]+.*" "verify st5 == 1.44269504*"
|
||||
-gdb_test "info register st6" "st6 *3.32192.*\[ \t\]+.*" "verify st6 == 3.3219280948*"
|
||||
-gdb_test "info register st7" "st7 *1.*" "verify st7 == 1"
|
||||
-
|
||||
-# Now step backward, and check that st0 value reverts to zero.
|
||||
-
|
||||
-gdb_test "reverse-stepi" "asm.*fld1.*" "undo registers, st0-st7"
|
||||
-gdb_test "info register st0" "st0 *0\[ \t\]+.*" "verify st0 == 0"
|
||||
-gdb_test "info register st1" "st1 *0.69314.*\[ \t\]+.*" "verify st1 == 0.69314*"
|
||||
-gdb_test "info register st2" "st2 *0.30102.*\[ \t\]+.*" "verify st2 == 0.301029*"
|
||||
-gdb_test "info register st3" "st3 *3.14159.*\[ \t\]+.*" "verify st3 == 3.14159265*"
|
||||
-gdb_test "info register st4" "st4 *1.44269.*\[ \t\]+.*" "verify st4 == 1.442695040*"
|
||||
-gdb_test "info register st5" "st5 *3.32192.*\[ \t\]+.*" "verify st5 == 3.3219280948*"
|
||||
-gdb_test "info register st6" "st6 *1\[ \t\]+.*" "verify st6 == 1"
|
||||
-
|
||||
-gdb_test "reverse-stepi" "asm.*fldz.*" "push st0 == 0.69314*"
|
||||
-gdb_test "info register st0" "st0 *0.69314.*\[ \t\]+.*" "verify st0 == 0.69314*"
|
||||
-gdb_test "info register st1" "st1 *0.30102.*\[ \t\]+.*" "verify st1 == 0.301029*"
|
||||
-gdb_test "info register st2" "st2 *3.14159.*\[ \t\]+.*" "verify st2 == 3.14159265*"
|
||||
-gdb_test "info register st3" "st3 *1.44269.*\[ \t\]+.*" "verify st3 == 1.442695040*"
|
||||
-gdb_test "info register st4" "st4 *3.32192.*\[ \t\]+.*" "verify st4 == 3.3219280948*"
|
||||
-gdb_test "info register st5" "st5 *1\[ \t\]+.*" "verify st5 == 1"
|
||||
-
|
||||
-gdb_test "reverse-stepi" "asm.*fldln2.*" "push st0 == 0.301029*"
|
||||
-gdb_test "info register st0" "st0 *0.30102.*\[ \t\]+.*" "verify st0 == 0.301029*"
|
||||
-gdb_test "info register st1" "st1 *3.14159.*\[ \t\]+.*" "verify st1 == 3.14159265*"
|
||||
-gdb_test "info register st2" "st2 *1.44269.*\[ \t\]+.*" "verify st2 == 1.442695040*"
|
||||
-gdb_test "info register st3" "st3 *3.32192.*\[ \t\]+.*" "verify st3 == 3.3219280948*"
|
||||
-gdb_test "info register st4" "st4 *1\[ \t\]+.*" "verify st4 == 1"
|
||||
-
|
||||
-gdb_test "reverse-stepi" "asm.*fldlg2.*" "push st0 == 3.14159265*"
|
||||
-gdb_test "info register st0" "st0 *3.14159.*\[ \t\]+.*" "verify st0 == 3.14159265*"
|
||||
-gdb_test "info register st1" "st1 *1.44269.*\[ \t\]+.*" "verify st1 == 1.442695040*"
|
||||
-gdb_test "info register st2" "st2 *3.32192.*\[ \t\]+.*" "verify st2 == 3.3219280948*"
|
||||
-gdb_test "info register st3" "st3 *1\[ \t\]+.*" "verify st3 == 1"
|
||||
-
|
||||
-gdb_test "reverse-stepi" "asm.*fldpi.*" "push st0 == 1.44269504088*"
|
||||
-gdb_test "info register st0" "st0 *1.44269.*\[ \t\]+.*" "verify st0 == 1.442695040*"
|
||||
-gdb_test "info register st1" "st1 *3.32192.*\[ \t\]+.*" "verify st1 == 3.3219280948*"
|
||||
-gdb_test "info register st2" "st2 *1\[ \t\]+.*" "verify st2 == 1"
|
||||
-
|
||||
-
|
||||
-gdb_test "reverse-stepi" "asm.*fldl2e.*" "push st0 == 3.3219280948*"
|
||||
-gdb_test "info register st0" "st0 *3.32192.*\[ \t\]+.*" "verify st0 == 3.3219280948*"
|
||||
-gdb_test "info register st1" "st1 *1\[ \t\]+.*" "verify st1 == 1"
|
||||
-
|
||||
-gdb_test "reverse-stepi" "asm.*fldl2t.*" "push st0 == 1"
|
||||
-gdb_test "info register st0" "st0 *1\[ \t\]+.*" "verify st0 == 1"
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
+with_test_prefix "forward" {
|
||||
+ # Test FPU stack. FPU stack includes st0, st1, st2, st3, st4,
|
||||
+ # st5, st6, st7. We push 8 values to FPU stack in record mode
|
||||
+ # and see whether all are getting recorded.
|
||||
+
|
||||
+ set location [gdb_get_line_number "test st0 register"]
|
||||
+ gdb_test "until $location" ".*$srcfile:$location.*asm.*fld1.*" \
|
||||
+ "begin test st0"
|
||||
+ gdb_test "stepi" "asm.*fldl2t.*" "push st0 == 1"
|
||||
+ gdb_test "info register st0" "st0 *1\[ \t\]+.*" "verify st0 == 1"
|
||||
+
|
||||
+ gdb_test "stepi" "asm.*fldl2e.*" "push st0 == 3.3219280948*"
|
||||
+ gdb_test "info register st0" "st0 *3.32192.*\[ \t\]+.*" "verify st0 == 3.321928094*"
|
||||
+ gdb_test "info register st1" "st1 *1\[ \t\]+.*" "verify st1 == 1"
|
||||
+
|
||||
+ gdb_test "stepi" "asm.*fldpi.*" "push st0 == 1.4426950406*"
|
||||
+ gdb_test "info register st0" "st0 *1.44269.*\[ \t\]+.*" "verify st0 == 1.442695040*"
|
||||
+ gdb_test "info register st1" "st1 *3.32192.*\[ \t\]+.*" "verify st1 == 3.3219280948*"
|
||||
+ gdb_test "info register st2" "st2 *1\[ \t\]+.*" "verify st2 == 1"
|
||||
+
|
||||
+ gdb_test "stepi" "asm.*fldlg2.*" "push st0 == 3.14159265*"
|
||||
+ gdb_test "info register st0" "st0 *3.14159.*\[ \t\]+.*" "verify st0 == 3.14159265*"
|
||||
+ gdb_test "info register st1" "st1 *1.44269.*\[ \t\]+.*" "verify st1 == 1.4426950*"
|
||||
+ gdb_test "info register st2" "st2 *3.32192.*\[ \t\]+.*" "verify st2 == 3.3219280*"
|
||||
+ gdb_test "info register st3" "st3 *1\[ \t\]+.*" "verify st3 == 1"
|
||||
+
|
||||
+ gdb_test "stepi" "asm.*fldln2.*" "push st0 == 0.301029*"
|
||||
+ gdb_test "info register st0" "st0 *0.30102.*\[ \t\]+.*" "verify st0 == 0.301029*"
|
||||
+ gdb_test "info register st1" "st1 *3.14159.*\[ \t\]+.*" "verify st1 == 3.14159265*"
|
||||
+ gdb_test "info register st2" "st2 *1.44269.*\[ \t\]+.*" "verify st2 == 1.44269506*"
|
||||
+ gdb_test "info register st3" "st3 *3.32192.*\[ \t\]+.*" "verify st3 == 3.3219280948*"
|
||||
+ gdb_test "info register st4" "st4 *1\[ \t\]+.*" "verify st4 == 1"
|
||||
+
|
||||
+ gdb_test "stepi" "asm.*fldz.*" "push st0 == 0.69314*"
|
||||
+ gdb_test "info register st0" "st0 *0.69314.*\[ \t\]+.*" "verify st0 == 0.69314*"
|
||||
+ gdb_test "info register st1" "st1 *0.30102.*\[ \t\]+.*" "verify st1 == 0.301029*"
|
||||
+ gdb_test "info register st2" "st2 *3.14159.*\[ \t\]+.*" "verify st2 == 3.14159265*"
|
||||
+ gdb_test "info register st3" "st3 *1.44269.*\[ \t\]+.*" "verify st3 == 1.442695040*"
|
||||
+ gdb_test "info register st4" "st4 *3.32192.*\[ \t\]+.*" "verify st4 == 3.3219280948*"
|
||||
+ gdb_test "info register st5" "st5 *1\[ \t\]+.*" "verify st5 == 1"
|
||||
+
|
||||
+ gdb_test "stepi" "asm.*fld1.*" "push st0 == 0"
|
||||
+ gdb_test "info register st0" "st0 *0\[ \t\]+.*" "verify st0 == 0"
|
||||
+ gdb_test "info register st1" "st1 *0.69314.*\[ \t\]+.*" "verify st1 == 0.69314*"
|
||||
+ gdb_test "info register st2" "st2 *0.30102.*\[ \t\]+.*" "verify st2 == 0.301029*"
|
||||
+ gdb_test "info register st3" "st3 *3.14159.*\[ \t\]+.*" "verify st3 == 3.14159265*"
|
||||
+ gdb_test "info register st4" "st4 *1.44269.*\[ \t\]+.*" "verify st4 == 1.442695040*"
|
||||
+ gdb_test "info register st5" "st5 *3.32192.*\[ \t\]+.*" "verify st5 == 3.32192809*"
|
||||
+ gdb_test "info register st6" "st6 *1\[ \t\]+.*" "verify st6 == 1"
|
||||
+
|
||||
+ gdb_test "stepi" "asm.*nop.*" "push st0 == 1, again"
|
||||
+ gdb_test "info register st0" "st0 *1\[ \t\]+.*" "verify st0 == 1, again"
|
||||
+ gdb_test "info register st1" "st1 *0\[ \t\]+.*" "verify st1 == 0"
|
||||
+ gdb_test "info register st2" "st2 *0.69314.*\[ \t\]+.*" "verify st2 == 0.69314*"
|
||||
+ gdb_test "info register st3" "st3 *0.30102.*\[ \t\]+.*" "verify st3 == 0.301029*"
|
||||
+ gdb_test "info register st4" "st4 *3.14159.*\[ \t\]+.*" "verify st4 == 3.14159265*"
|
||||
+ gdb_test "info register st5" "st5 *1.44269.*\[ \t\]+.*" "verify st5 == 1.44269504*"
|
||||
+ gdb_test "info register st6" "st6 *3.32192.*\[ \t\]+.*" "verify st6 == 3.3219280948*"
|
||||
+ gdb_test "info register st7" "st7 *1.*" "verify st7 == 1"
|
||||
+}
|
||||
|
||||
+with_test_prefix "backward" {
|
||||
+ # Now step backward, and check that st0 value reverts to zero.
|
||||
+ gdb_test "reverse-stepi" "asm.*fld1.*" "undo registers, st0-st7"
|
||||
+ gdb_test "info register st0" "st0 *0\[ \t\]+.*" "verify st0 == 0"
|
||||
+ gdb_test "info register st1" "st1 *0.69314.*\[ \t\]+.*" "verify st1 == 0.69314*"
|
||||
+ gdb_test "info register st2" "st2 *0.30102.*\[ \t\]+.*" "verify st2 == 0.301029*"
|
||||
+ gdb_test "info register st3" "st3 *3.14159.*\[ \t\]+.*" "verify st3 == 3.14159265*"
|
||||
+ gdb_test "info register st4" "st4 *1.44269.*\[ \t\]+.*" "verify st4 == 1.442695040*"
|
||||
+ gdb_test "info register st5" "st5 *3.32192.*\[ \t\]+.*" "verify st5 == 3.3219280948*"
|
||||
+ gdb_test "info register st6" "st6 *1\[ \t\]+.*" "verify st6 == 1"
|
||||
+
|
||||
+ gdb_test "reverse-stepi" "asm.*fldz.*" "push st0 == 0.69314*"
|
||||
+ gdb_test "info register st0" "st0 *0.69314.*\[ \t\]+.*" "verify st0 == 0.69314*"
|
||||
+ gdb_test "info register st1" "st1 *0.30102.*\[ \t\]+.*" "verify st1 == 0.301029*"
|
||||
+ gdb_test "info register st2" "st2 *3.14159.*\[ \t\]+.*" "verify st2 == 3.14159265*"
|
||||
+ gdb_test "info register st3" "st3 *1.44269.*\[ \t\]+.*" "verify st3 == 1.442695040*"
|
||||
+ gdb_test "info register st4" "st4 *3.32192.*\[ \t\]+.*" "verify st4 == 3.3219280948*"
|
||||
+ gdb_test "info register st5" "st5 *1\[ \t\]+.*" "verify st5 == 1"
|
||||
+
|
||||
+ gdb_test "reverse-stepi" "asm.*fldln2.*" "push st0 == 0.301029*"
|
||||
+ gdb_test "info register st0" "st0 *0.30102.*\[ \t\]+.*" "verify st0 == 0.301029*"
|
||||
+ gdb_test "info register st1" "st1 *3.14159.*\[ \t\]+.*" "verify st1 == 3.14159265*"
|
||||
+ gdb_test "info register st2" "st2 *1.44269.*\[ \t\]+.*" "verify st2 == 1.442695040*"
|
||||
+ gdb_test "info register st3" "st3 *3.32192.*\[ \t\]+.*" "verify st3 == 3.3219280948*"
|
||||
+ gdb_test "info register st4" "st4 *1\[ \t\]+.*" "verify st4 == 1"
|
||||
+
|
||||
+ gdb_test "reverse-stepi" "asm.*fldlg2.*" "push st0 == 3.14159265*"
|
||||
+ gdb_test "info register st0" "st0 *3.14159.*\[ \t\]+.*" "verify st0 == 3.14159265*"
|
||||
+ gdb_test "info register st1" "st1 *1.44269.*\[ \t\]+.*" "verify st1 == 1.442695040*"
|
||||
+ gdb_test "info register st2" "st2 *3.32192.*\[ \t\]+.*" "verify st2 == 3.3219280948*"
|
||||
+ gdb_test "info register st3" "st3 *1\[ \t\]+.*" "verify st3 == 1"
|
||||
+
|
||||
+ gdb_test "reverse-stepi" "asm.*fldpi.*" "push st0 == 1.44269504088*"
|
||||
+ gdb_test "info register st0" "st0 *1.44269.*\[ \t\]+.*" "verify st0 == 1.442695040*"
|
||||
+ gdb_test "info register st1" "st1 *3.32192.*\[ \t\]+.*" "verify st1 == 3.3219280948*"
|
||||
+ gdb_test "info register st2" "st2 *1\[ \t\]+.*" "verify st2 == 1"
|
||||
+
|
||||
+ gdb_test "reverse-stepi" "asm.*fldl2e.*" "push st0 == 3.3219280948*"
|
||||
+ gdb_test "info register st0" "st0 *3.32192.*\[ \t\]+.*" "verify st0 == 3.3219280948*"
|
||||
+ gdb_test "info register st1" "st1 *1\[ \t\]+.*" "verify st1 == 1"
|
||||
+
|
||||
+ gdb_test "reverse-stepi" "asm.*fldl2t.*" "push st0 == 1"
|
||||
+ gdb_test "info register st0" "st0 *1\[ \t\]+.*" "verify st0 == 1"
|
||||
+}
|
@ -1,7 +1,7 @@
|
||||
From bbf4e4ba2a9bd73384268b0160d54e36edc92a12 Mon Sep 17 00:00:00 2001
|
||||
From 8797e6c1eb8c863617cd484d469dff23d059a15f Mon Sep 17 00:00:00 2001
|
||||
From: Tom de Vries <tdevries@suse.de>
|
||||
Date: Tue, 14 Feb 2023 11:53:54 +0100
|
||||
Subject: [PATCH 03/11] [gdb/testsuite] Factor out proc linux_kernel_version
|
||||
Date: Fri, 21 Apr 2023 17:58:49 +0200
|
||||
Subject: [PATCH 4/5] [gdb/testsuite] Factor out proc linux_kernel_version
|
||||
|
||||
Factor out new proc linux_kernel_version from test-case
|
||||
gdb.arch/i386-pkru.exp.
|
||||
@ -13,7 +13,7 @@ Tested on x86_64-linux.
|
||||
2 files changed, 29 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.arch/i386-pkru.exp b/gdb/testsuite/gdb.arch/i386-pkru.exp
|
||||
index 5fe93db9b4b..9bc9f9735e5 100644
|
||||
index 5d2b1a24a15..b2e5385c52b 100644
|
||||
--- a/gdb/testsuite/gdb.arch/i386-pkru.exp
|
||||
+++ b/gdb/testsuite/gdb.arch/i386-pkru.exp
|
||||
@@ -62,20 +62,12 @@ if { !$supports_pkru } {
|
||||
@ -44,11 +44,11 @@ index 5fe93db9b4b..9bc9f9735e5 100644
|
||||
|
||||
# Test pkru register at startup
|
||||
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
|
||||
index 5104835a2a9..069a61038e6 100644
|
||||
index 85c0bfb897f..2be69479d70 100644
|
||||
--- a/gdb/testsuite/lib/gdb.exp
|
||||
+++ b/gdb/testsuite/lib/gdb.exp
|
||||
@@ -8551,5 +8551,28 @@ gdb_caching_proc has_hw_wp_support {
|
||||
return $has_hw_wp_support
|
||||
@@ -9334,5 +9334,28 @@ proc decompress_bz2 { bz2 } {
|
||||
return $copy
|
||||
}
|
||||
|
||||
+# Detect linux kernel version and return as list of 3 numbers: major, minor,
|
||||
|
50
gdb-testsuite-fix-breakpoint-regexp-in-gdb.ada-out_o.patch
Normal file
50
gdb-testsuite-fix-breakpoint-regexp-in-gdb.ada-out_o.patch
Normal file
@ -0,0 +1,50 @@
|
||||
From 85025e0631ed4b0e8c3aa85d7561a715f142bdc6 Mon Sep 17 00:00:00 2001
|
||||
From: Tom de Vries <tdevries@suse.de>
|
||||
Date: Mon, 12 Jun 2023 11:14:24 +0200
|
||||
Subject: [PATCH] [gdb/testsuite] Fix breakpoint regexp in
|
||||
gdb.ada/out_of_line_in_inlined.exp
|
||||
|
||||
With a gdb 13.2 based package on openSUSE Tumbleweed i586, I ran into:
|
||||
...
|
||||
(gdb) run ^M
|
||||
Starting program: out_of_line_in_inlined/foo_o224_021-all ^M
|
||||
[Thread debugging using libthread_db enabled]^M
|
||||
Using host libthread_db library "/lib/libthread_db.so.1".^M
|
||||
^M
|
||||
Breakpoint 1.1, foo_o224_021.child1.child2 (s=...) at foo_o224_021.adb:26^M
|
||||
26 for C of S loop^M
|
||||
(gdb) FAIL: gdb.ada/out_of_line_in_inlined.exp: scenario=all: \
|
||||
run to foo_o224_021.child1.child2
|
||||
...
|
||||
|
||||
I can reproduce the same issue with gdb trunk on x86_64, by using optimize=-O3
|
||||
instead of optimize=-O2.
|
||||
|
||||
Fix this by using $bkptno_num_re.
|
||||
|
||||
Tested on x86_64-linux.
|
||||
|
||||
PR testsuite/30539
|
||||
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30539
|
||||
---
|
||||
gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp b/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
|
||||
index 03092a15188..08245777d84 100644
|
||||
--- a/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
|
||||
+++ b/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
|
||||
@@ -34,7 +34,7 @@ foreach_with_prefix scenario {all minimal} {
|
||||
|
||||
gdb_run_cmd
|
||||
gdb_test "" \
|
||||
- "Breakpoint $decimal, ($hex in )?foo_o224_021\\.child1\\.child2 \\(s=\\.\\.\\.\\).*" \
|
||||
+ "Breakpoint ($decimal|$bkptno_num_re), ($hex in )?foo_o224_021\\.child1\\.child2 \\(s=\\.\\.\\.\\).*" \
|
||||
"run to foo_o224_021.child1.child2"
|
||||
|
||||
set opt_addr_in "($hex in)?"
|
||||
|
||||
base-commit: 11a41bc318ba0307248eadf29bf7d4a1af31d3a8
|
||||
--
|
||||
2.35.3
|
||||
|
120
gdb-testsuite-fix-buffer-overflow-in-gdb.base-signed.patch
Normal file
120
gdb-testsuite-fix-buffer-overflow-in-gdb.base-signed.patch
Normal file
@ -0,0 +1,120 @@
|
||||
From 6c09d2d14f44ac92d2509973ff6da376c248510f Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Burgess <aburgess@redhat.com>
|
||||
Date: Tue, 20 Dec 2022 12:51:50 +0000
|
||||
Subject: [PATCH 1/6] gdb/testsuite: fix buffer overflow in
|
||||
gdb.base/signed-builtin-types.exp
|
||||
|
||||
In commit:
|
||||
|
||||
commit 9f50fe0835850645bd8ea9bb1efe1fe6c48dfb12
|
||||
Date: Wed Dec 7 15:55:25 2022 +0000
|
||||
|
||||
gdb/testsuite: new test for recent dwarf reader issue
|
||||
|
||||
A new test (gdb.base/signed-builtin-types.exp) was added that made use
|
||||
of 'info sources' to figure out if the debug information for a
|
||||
particular object file had been fully expanded or not. Unfortunately
|
||||
some lines of the 'info sources' output can be very long, this was
|
||||
observed on some systems where the debug information for the
|
||||
dynamic-linker was installed, in this case, the list of source files
|
||||
associated with the dynamic linker was so long it would cause expect's
|
||||
internal buffer to overflow.
|
||||
|
||||
This commit switches from using 'info sources' to 'maint print
|
||||
objfile', the output from the latter command is more compact, but
|
||||
also, can be restricted to a single named object file.
|
||||
|
||||
With this change in place I am no longer seeing buffer overflow errors
|
||||
from expect when running gdb.base/signed-builtin-types.exp.
|
||||
---
|
||||
.../gdb.base/signed-builtin-types.exp | 51 +++----------------
|
||||
1 file changed, 8 insertions(+), 43 deletions(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/signed-builtin-types.exp b/gdb/testsuite/gdb.base/signed-builtin-types.exp
|
||||
index c7eee139c74..c4afc621cee 100644
|
||||
--- a/gdb/testsuite/gdb.base/signed-builtin-types.exp
|
||||
+++ b/gdb/testsuite/gdb.base/signed-builtin-types.exp
|
||||
@@ -21,7 +21,8 @@ standard_testfile .c -lib.c
|
||||
|
||||
# Compile the shared library.
|
||||
set srcdso [file join $srcdir $subdir $srcfile2]
|
||||
-set objdso [standard_output_file lib${gdb_test_file_name}.so]
|
||||
+set libname "lib${gdb_test_file_name}.so"
|
||||
+set objdso [standard_output_file $libname]
|
||||
if {[gdb_compile_shlib $srcdso $objdso {debug}] != ""} {
|
||||
untested "failed to compile dso"
|
||||
return -1
|
||||
@@ -46,46 +47,10 @@ if {[readnow]} {
|
||||
# library has been fully expanded or not. Return true if the debug
|
||||
# information has NOT been fully expanded (which is what we want for this
|
||||
# test).
|
||||
-proc shared_library_debug_not_fully_expanded {} {
|
||||
- set library_expanded ""
|
||||
- gdb_test_multiple "info sources" "" {
|
||||
- -re "^info sources\r\n" {
|
||||
- exp_continue
|
||||
- }
|
||||
- -re "^(\[^\r\n\]+):\r\n\\(Full debug information has not yet been read for this file\\.\\)\r\n\r\n" {
|
||||
- set libname $expect_out(1,string)
|
||||
- if {$libname == $::objdso} {
|
||||
- set library_expanded "no"
|
||||
- }
|
||||
- exp_continue
|
||||
- }
|
||||
- -re "^(\[^\r\n\]+):\r\n\\(Objfile has no debug information\\.\\)\r\n\r\n" {
|
||||
- set libname $expect_out(1,string)
|
||||
- if {$libname == $::objdso} {
|
||||
- # For some reason the shared library has no debug
|
||||
- # information, this is not expected.
|
||||
- set library_expanded "missing debug"
|
||||
- }
|
||||
- exp_continue
|
||||
- }
|
||||
- -re "^(\[^\r\n\]+):\r\n\r\n" {
|
||||
- set libname $expect_out(1,string)
|
||||
- if {$libname == $::objdso} {
|
||||
- set library_expanded "yes"
|
||||
- }
|
||||
- exp_continue
|
||||
- }
|
||||
- -re "^$::gdb_prompt $" {
|
||||
- gdb_assert {[string equal $library_expanded "yes"] \
|
||||
- || [string equal $library_expanded "no"]} \
|
||||
- $gdb_test_name
|
||||
- }
|
||||
- -re "^(\[^\r\n:\]*)\r\n" {
|
||||
- exp_continue
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return [expr $library_expanded == "no"]
|
||||
+proc assert_shared_library_debug_not_fully_expanded {} {
|
||||
+ gdb_test_lines "maint print objfiles $::libname" "" \
|
||||
+ "Object file \[^\r\n\]*$::libname" \
|
||||
+ -re-not "Symtabs:"
|
||||
}
|
||||
|
||||
foreach_with_prefix type_name {"short" "int" "long" "char"} {
|
||||
@@ -93,7 +58,7 @@ foreach_with_prefix type_name {"short" "int" "long" "char"} {
|
||||
with_test_prefix "before sizeof expression" {
|
||||
# Check that the debug information for the shared library has
|
||||
# not yet been read in.
|
||||
- gdb_assert { [shared_library_debug_not_fully_expanded] }
|
||||
+ assert_shared_library_debug_not_fully_expanded
|
||||
}
|
||||
|
||||
# Evaluate a sizeof expression for a builtin type. At one point GDB
|
||||
@@ -106,7 +71,7 @@ foreach_with_prefix type_name {"short" "int" "long" "char"} {
|
||||
with_test_prefix "after sizeof expression" {
|
||||
# Check that the debug information for the shared library has not
|
||||
# yet been read in.
|
||||
- gdb_assert { [shared_library_debug_not_fully_expanded] }
|
||||
+ assert_shared_library_debug_not_fully_expanded
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
base-commit: d5d2daa1efc67fdaaefe9648bb1275608779455d
|
||||
--
|
||||
2.35.3
|
||||
|
@ -1,144 +0,0 @@
|
||||
[gdb/testsuite] Fix FAIL in gdb.threads/fork-and-threads.exp
|
||||
|
||||
As reported in PR26272, when running test-case
|
||||
gdb.threads/fork-and-threads.exp on a VM with openSUSE Tumbleweed, with the VM
|
||||
bound to 1 cpu with 75% execution cap, I get:
|
||||
...
|
||||
[Inferior 1 (process 21928) exited normally]PASS: \
|
||||
gdb.threads/fork-plus-threads.exp: detach-on-fork=off: inferior 1 exited
|
||||
PASS: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: \
|
||||
no failure to remove breakpoints
|
||||
PASS: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: \
|
||||
no spurious thread stop
|
||||
^M
|
||||
info threads^M
|
||||
Id Target Id Frame ^M
|
||||
11.11 Thread 0x7ffff3470700 (LWP 22041) (running)^M
|
||||
^M
|
||||
No selected thread. See `help thread'.^M
|
||||
(gdb) FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: \
|
||||
no threads left
|
||||
[Inferior 11 (process 21990) exited normally]^M
|
||||
info inferiors^M
|
||||
Num Description Connection Executable ^M
|
||||
* 1 <null> fork-plus-threads ^M
|
||||
11 <null> fork-plus-threads ^M
|
||||
(gdb) FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: \
|
||||
only inferior 1 left (the program exited)
|
||||
...
|
||||
|
||||
The initial process (inferior 1) creates 10 child processes, and then waits on
|
||||
the child processes. Consequently, the initial process is also the last
|
||||
process to exit.
|
||||
|
||||
However, in the log above we see:
|
||||
...
|
||||
[Inferior 1 (process 21928) exited normally]
|
||||
...
|
||||
[Inferior 11 (process 21990) exited normally]
|
||||
...
|
||||
This seems counter-intuitive: if inferior 1 is the last to exit, shouldn't we
|
||||
see it last?
|
||||
|
||||
However, looking at the debug infrun log:
|
||||
...
|
||||
[infrun] fetch_inferior_event: enter
|
||||
[infrun] scoped_disable_commit_resumed: reason=handling event
|
||||
[infrun] do_target_wait: Found 2 inferiors, starting at #0
|
||||
[infrun] random_pending_event_thread: None found.
|
||||
[infrun] print_target_wait_results: target_wait (-1.0.0 [process -1], status) =
|
||||
[infrun] print_target_wait_results: 17202.17202.0 [Thread 0x7ffff7c79740 (LWP 17202)],
|
||||
[infrun] print_target_wait_results: status->kind = exited, status = 0
|
||||
[infrun] handle_inferior_event: status->kind = exited, status = 0
|
||||
[Inferior 1 (process 17202) exited normally]
|
||||
[infrun] stop_waiting: stop_waiting
|
||||
[infrun] reset: reason=handling event
|
||||
[infrun] maybe_set_commit_resumed_all_targets: enabling commit-resumed for target native
|
||||
[infrun] maybe_call_commit_resumed_all_targets: calling commit_resumed for target native
|
||||
[infrun] fetch_inferior_event: exit
|
||||
[infrun] fetch_inferior_event: enter
|
||||
[infrun] scoped_disable_commit_resumed: reason=handling event
|
||||
[infrun] random_pending_event_thread: None found.
|
||||
[infrun] print_target_wait_results: target_wait (-1.0.0 [process -1], status) =
|
||||
[infrun] print_target_wait_results: 17215.17215.0 [Thread 0x7ffff7c79740 (LWP 17215)],
|
||||
[infrun] print_target_wait_results: status->kind = exited, status = 0
|
||||
[infrun] handle_inferior_event: status->kind = exited, status = 0
|
||||
[Inferior 11 (process 17215) exited normally]
|
||||
...
|
||||
this seems plausible.
|
||||
|
||||
Doing a waitpid with a pid of -1 will wait for any child process, and if
|
||||
both inferior 1 and 11 have exited, and not yet been reaped, waitpid may
|
||||
return any of the two.
|
||||
|
||||
Fix the first FAIL by waiting for all inferiors to exit, rather than waiting
|
||||
for inferior 1 to exit, assuming it's the last.
|
||||
|
||||
Tested on x86_64-linux.
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.threads/fork-plus-threads.exp | 31 ++++++++++++++-----------
|
||||
1 file changed, 17 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.threads/fork-plus-threads.exp b/gdb/testsuite/gdb.threads/fork-plus-threads.exp
|
||||
index 7fe3c603bcd..8540fbf3082 100644
|
||||
--- a/gdb/testsuite/gdb.threads/fork-plus-threads.exp
|
||||
+++ b/gdb/testsuite/gdb.threads/fork-plus-threads.exp
|
||||
@@ -33,6 +33,7 @@ proc do_test { detach-on-fork } {
|
||||
global GDBFLAGS
|
||||
global srcfile testfile
|
||||
global gdb_prompt
|
||||
+ global decimal
|
||||
|
||||
set saved_gdbflags $GDBFLAGS
|
||||
set GDBFLAGS [concat $GDBFLAGS " -ex \"set non-stop on\""]
|
||||
@@ -51,6 +52,12 @@ proc do_test { detach-on-fork } {
|
||||
}
|
||||
|
||||
gdb_test_no_output "set detach-on-fork ${detach-on-fork}"
|
||||
+ if { ${detach-on-fork} == "on" } {
|
||||
+ set expected_exits 1
|
||||
+ } else {
|
||||
+ set expected_exits 11
|
||||
+ }
|
||||
+
|
||||
set test "continue &"
|
||||
gdb_test_multiple $test $test {
|
||||
-re "$gdb_prompt " {
|
||||
@@ -77,26 +84,22 @@ proc do_test { detach-on-fork } {
|
||||
set saw_cannot_remove_breakpoints 0
|
||||
set saw_thread_stopped 0
|
||||
|
||||
- set test "inferior 1 exited"
|
||||
- gdb_test_multiple "" $test {
|
||||
- -re "Cannot remove breakpoints" {
|
||||
+ set nr_exits 0
|
||||
+ gdb_test_multiple "" "last inferior exited" -lbl {
|
||||
+ -re "^\r\nCannot remove breakpoints \[^\r\n\]+\\.(?=\r\n)" {
|
||||
set saw_cannot_remove_breakpoints 1
|
||||
exp_continue
|
||||
}
|
||||
- -re "Thread \[^\r\n\]+ stopped\\." {
|
||||
+ -re "^\r\n\\\[Thread \[^\r\n\]+ stopped\\.(?=\r\n)" {
|
||||
set saw_thread_stopped 1
|
||||
exp_continue
|
||||
}
|
||||
- -re "(Thread|LWP) \[^\r\n\]+ exited" {
|
||||
- # Avoid timeout with check-read1
|
||||
- exp_continue
|
||||
- }
|
||||
- -re "New (Thread|LWP) \[^\r\n\]+" {
|
||||
- # Avoid timeout with check-read1
|
||||
- exp_continue
|
||||
- }
|
||||
- -re "Inferior 1 \(\[^\r\n\]+\) exited normally" {
|
||||
- pass $test
|
||||
+ -re "^\r\n\\\[Inferior $decimal \(\[^\r\n\]+\) exited normally\\\](?=\r\n)" {
|
||||
+ incr nr_exits
|
||||
+ if { $nr_exits < $expected_exits } {
|
||||
+ exp_continue
|
||||
+ }
|
||||
+ pass $gdb_test_name
|
||||
}
|
||||
}
|
||||
|
@ -1,77 +0,0 @@
|
||||
[gdb/testsuite] Fix gdb.ada/literals.exp with aarch64
|
||||
|
||||
On aarch64-linux, I run into:
|
||||
...
|
||||
(gdb) print 16#ffffffffffffffff#^M
|
||||
$7 = 18446744073709551615^M
|
||||
(gdb) FAIL: gdb.ada/literals.exp: print 16#ffffffffffffffff#
|
||||
...
|
||||
while on x86_64-linux instead, I get:
|
||||
...
|
||||
(gdb) print 16#ffffffffffffffff#^M
|
||||
$7 = -1^M
|
||||
(gdb) PASS: gdb.ada/literals.exp: print 16#ffffffffffffffff#
|
||||
...
|
||||
|
||||
We can easily reproduce this on x86_64-linux using:
|
||||
...
|
||||
$ gdb -q -batch -ex "set lang ada" -ex "set arch i386" \
|
||||
-ex "print 16#ffffffffffffffff#"
|
||||
$1 = -1
|
||||
$ gdb -q -batch -ex "set lang ada" -ex "set arch aarch64" \
|
||||
-ex "print 16#ffffffffffffffff#"
|
||||
$1 = 18446744073709551615
|
||||
...
|
||||
|
||||
With i386, we have:
|
||||
...
|
||||
(gdb) p int_bits
|
||||
$3 = 32
|
||||
(gdb) p long_bits
|
||||
$4 = 32
|
||||
(gdb) p long_long_bits
|
||||
$5 = 64
|
||||
...
|
||||
and so in processInt we hit the fits-in-unsigned-long-long case where we use
|
||||
as type long long:
|
||||
...
|
||||
/* Note: Interprets ULLONG_MAX as -1. */
|
||||
yylval.typed_val.type = type_long_long (par_state);
|
||||
...
|
||||
|
||||
With aarch64, we have instead:
|
||||
...
|
||||
(gdb) p int_bits
|
||||
$1 = 32
|
||||
(gdb) p long_bits
|
||||
$2 = 64
|
||||
(gdb) p long_long_bits
|
||||
$3 = 64
|
||||
...
|
||||
and so in processInt we hit the fits-in-unsigned-long case where we use
|
||||
as type unsigned long:
|
||||
...
|
||||
yylval.typed_val.type
|
||||
= builtin_type (par_state->gdbarch ())->builtin_unsigned_long;
|
||||
...
|
||||
|
||||
Fix this by updating the test-case to accept 18446744073709551615 as well.
|
||||
|
||||
Tested on x86_64-linux and aarch64-linux.
|
||||
|
||||
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29416
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.ada/literals.exp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.ada/literals.exp b/gdb/testsuite/gdb.ada/literals.exp
|
||||
index a6ac89b540f..744a6bc573c 100644
|
||||
--- a/gdb/testsuite/gdb.ada/literals.exp
|
||||
+++ b/gdb/testsuite/gdb.ada/literals.exp
|
||||
@@ -36,4 +36,4 @@ gdb_test "print 16#f#e1" " = 240"
|
||||
gdb_test "print 16#1#e10" " = 1099511627776"
|
||||
|
||||
gdb_test "print/x 16#7fffffffffffffff#" " = 0x7fffffffffffffff"
|
||||
-gdb_test "print 16#ffffffffffffffff#" " = -1"
|
||||
+gdb_test "print 16#ffffffffffffffff#" " = (-1|18446744073709551615)"
|
@ -1,93 +0,0 @@
|
||||
gdb/testsuite: fix gdb.base/break-idempotent.exp on ppc
|
||||
|
||||
When running the gdb.base/break-idempotent.exp test on ppc, I was
|
||||
seeing some test failures (or rather errors), that looked like this:
|
||||
|
||||
(gdb) watch local
|
||||
Hardware watchpoint 2: local
|
||||
|
||||
has_hw_wp_support: Hardware watchpoint detected
|
||||
ERROR: no fileid for gcc2-power8
|
||||
ERROR: Couldn't send delete breakpoints to GDB.
|
||||
ERROR OCCURED: can't read "gdb_spawn_id": no such variable
|
||||
while executing
|
||||
"expect {
|
||||
-i 1000 -timeout 100
|
||||
-re ".*A problem internal to GDB has been detected" {
|
||||
fail "$message (GDB internal error)"
|
||||
gdb_internal_erro..."
|
||||
("uplevel" body line 1)
|
||||
invoked from within
|
||||
|
||||
What happens is that in break-idempotent.exp we basically do this:
|
||||
|
||||
if {[prepare_for_testing "failed to prepare" $binfile $srcfile $opts]} {
|
||||
continue
|
||||
}
|
||||
|
||||
# ....
|
||||
|
||||
if {![skip_hw_watchpoint_tests]} {
|
||||
test_break $always_inserted "watch"
|
||||
}
|
||||
|
||||
The problem with this is that skip_hw_watchpoint_tests, includes this:
|
||||
|
||||
if { [istarget "i?86-*-*"]
|
||||
|| [istarget "x86_64-*-*"]
|
||||
|| [istarget "ia64-*-*"]
|
||||
|| [istarget "arm*-*-*"]
|
||||
|| [istarget "aarch64*-*-*"]
|
||||
|| ([istarget "powerpc*-*-linux*"] && [has_hw_wp_support])
|
||||
|| [istarget "s390*-*-*"] } {
|
||||
return 0
|
||||
}
|
||||
|
||||
For powerpc only we call has_hw_wp_support. This is a caching proc
|
||||
that runs a test within GDB to detect if we have hardware watchpoint
|
||||
support or not.
|
||||
|
||||
Unfortunately, to run this test we restart GDB, and when the test has
|
||||
completed, we exit GDB. This means that in break-idempotent.exp, when
|
||||
we call skip_hw_watchpoint_tests for the first time on powerpc, GDB
|
||||
will unexpectedly be exited. When we later call delete_breakpoints we
|
||||
see the errors I reported above.
|
||||
|
||||
The fix is to call skip_hw_watchpoint_tests early, before we start GDB
|
||||
as part of the break-idempotent.exp script, and store the result in a
|
||||
variable, we can then check this variable in the script as needed.
|
||||
|
||||
After this change break-idempotent.exp runs fine on powerpc.
|
||||
|
||||
Co-authored-by: Andrew Burgess <aburgess@redhat.com>
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.base/break-idempotent.exp | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/break-idempotent.exp b/gdb/testsuite/gdb.base/break-idempotent.exp
|
||||
index 29002f103a8..837ac000b57 100644
|
||||
--- a/gdb/testsuite/gdb.base/break-idempotent.exp
|
||||
+++ b/gdb/testsuite/gdb.base/break-idempotent.exp
|
||||
@@ -36,6 +36,12 @@
|
||||
|
||||
standard_testfile
|
||||
|
||||
+# The skip_hw_watchpoint_tests starts GDB on a small test program to
|
||||
+# check if HW watchpoints are supported. We do not want to restart
|
||||
+# GDB after this test script has itself started GDB, so call
|
||||
+# skip_hw_watchpoint_tests first and cache the result.
|
||||
+set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests]
|
||||
+
|
||||
# Force a breakpoint re-set in GDB. Currently this is done by
|
||||
# reloading symbols with the "file" command.
|
||||
|
||||
@@ -174,7 +180,7 @@ foreach_with_prefix pie { "nopie" "pie" } {
|
||||
test_break $always_inserted "hbreak"
|
||||
}
|
||||
|
||||
- if {![skip_hw_watchpoint_tests]} {
|
||||
+ if {!$skip_hw_watchpoint_tests_p} {
|
||||
test_break $always_inserted "watch"
|
||||
}
|
||||
|
@ -1,88 +0,0 @@
|
||||
[gdb/testsuite] Fix gdb.base/catch-syscall.exp with --with-expat=no
|
||||
|
||||
When doing a gdb build with --with-expat=no, I run into:
|
||||
...
|
||||
(gdb) PASS: gdb.base/catch-syscall.exp: determine pipe syscall: \
|
||||
continue to breakpoint: before pipe call
|
||||
catch syscall pipe^M
|
||||
Unknown syscall name 'pipe'.^M
|
||||
(gdb) PASS: gdb.base/catch-syscall.exp: determine pipe syscall: \
|
||||
catch syscall pipe
|
||||
catch syscall pipe2^M
|
||||
Unknown syscall name 'pipe2'.^M
|
||||
(gdb) PASS: gdb.base/catch-syscall.exp: determine pipe syscall: \
|
||||
catch syscall pipe2
|
||||
continue^M
|
||||
Continuing.^M
|
||||
[Detaching after vfork from child process 18538]^M
|
||||
[Inferior 1 (process 18537) exited normally]^M
|
||||
(gdb) FAIL: gdb.base/catch-syscall.exp: determine pipe syscall: continue
|
||||
...
|
||||
|
||||
This is a regression since recent commit 5463a15c18b ("[gdb/testsuite] Handle
|
||||
pipe2 syscall in gdb.base/catch-syscall.exp").
|
||||
|
||||
Fix this by using pipe/pipe2 syscall numbers instead.
|
||||
|
||||
Tested on x86_64-linux.
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.base/catch-syscall.exp | 16 ++++++++++------
|
||||
1 file changed, 10 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp b/gdb/testsuite/gdb.base/catch-syscall.exp
|
||||
index 1260a64270f..d8b6898b3e0 100644
|
||||
--- a/gdb/testsuite/gdb.base/catch-syscall.exp
|
||||
+++ b/gdb/testsuite/gdb.base/catch-syscall.exp
|
||||
@@ -705,10 +705,12 @@ proc setup_all_syscalls {} {
|
||||
# SYS_pipe doesn't exist on aarch64 kernel.
|
||||
set test "check SYS_pipe"
|
||||
set have_SYS_pipe 0
|
||||
+ set SYS_pipe -1
|
||||
gdb_test_multiple "p pipe_syscall" $test {
|
||||
- -re -wrap " = $decimal" {
|
||||
+ -re -wrap " = ($decimal)" {
|
||||
pass $test
|
||||
set have_SYS_pipe 1
|
||||
+ set SYS_pipe $expect_out(1,string)
|
||||
}
|
||||
-re -wrap "No symbol .*" {
|
||||
pass $test
|
||||
@@ -717,10 +719,12 @@ proc setup_all_syscalls {} {
|
||||
|
||||
set test "check SYS_pipe2"
|
||||
set have_SYS_pipe2 0
|
||||
+ set SYS_pipe2 -1
|
||||
gdb_test_multiple "p pipe2_syscall" $test {
|
||||
- -re -wrap " = $decimal" {
|
||||
+ -re -wrap " = ($decimal)" {
|
||||
pass $test
|
||||
set have_SYS_pipe2 1
|
||||
+ set SYS_pipe2 $expect_out(1,string)
|
||||
}
|
||||
-re -wrap "No symbol .*" {
|
||||
pass $test
|
||||
@@ -736,19 +740,19 @@ proc setup_all_syscalls {} {
|
||||
gdb_test "break $line"
|
||||
gdb_continue_to_breakpoint "before pipe call"
|
||||
if { $have_SYS_pipe } {
|
||||
- gdb_test "catch syscall pipe"
|
||||
+ gdb_test "catch syscall $SYS_pipe"
|
||||
}
|
||||
if { $have_SYS_pipe2 } {
|
||||
- gdb_test "catch syscall pipe2"
|
||||
+ gdb_test "catch syscall $SYS_pipe2"
|
||||
}
|
||||
set ok 0
|
||||
gdb_test_multiple "continue" "" {
|
||||
- -re -wrap "Catchpoint $decimal \\(call to syscall pipe\\).*" {
|
||||
+ -re -wrap "Catchpoint $decimal \\(call to syscall (pipe|$SYS_pipe)\\).*" {
|
||||
lappend all_syscalls pipe
|
||||
pass $gdb_test_name
|
||||
set ok 1
|
||||
}
|
||||
- -re -wrap "Catchpoint $decimal \\(call to syscall pipe2\\).*" {
|
||||
+ -re -wrap "Catchpoint $decimal \\(call to syscall (pipe2|$SYS_pipe)\\).*" {
|
||||
lappend all_syscalls pipe2
|
||||
pass $gdb_test_name
|
||||
set ok 1
|
@ -1,65 +0,0 @@
|
||||
[gdb/testsuite] Fix gdb.base/catch-syscall.exp without --enable-targets
|
||||
|
||||
When doing a gdb build without --enable-targets, I run into:
|
||||
...
|
||||
(gdb) UNSUPPORTED: gdb.base/catch-syscall.exp: multiple targets: \
|
||||
s390:31-bit vs s390:64-bit: set architecture s390:64-bit
|
||||
delete breakpoints^M
|
||||
(gdb) info breakpoints^M
|
||||
No breakpoints or watchpoints.^M
|
||||
(gdb) break -qualified main^M
|
||||
No symbol table is loaded. Use the "file" command.^M
|
||||
Make breakpoint pending on future shared library load? (y or [n]) n^M
|
||||
(gdb) FAIL: gdb.base/catch-syscall.exp: gdb_breakpoint: set breakpoint at main
|
||||
...
|
||||
|
||||
The problem is that due to recent commit e21d8399303 ("[gdb/testsuite] Remove
|
||||
target limits in gdb.base/catch-syscall.exp") "clean_restart $binfile" no
|
||||
longer is called at the end of test_catch_syscall_multi_arch.
|
||||
|
||||
Fix this by moving "clean_restart $binfile" back to
|
||||
test_catch_syscall_multi_arch.
|
||||
|
||||
Tested on x86_64-linux.
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.base/catch-syscall.exp | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp b/gdb/testsuite/gdb.base/catch-syscall.exp
|
||||
index fed0e7b774c..1260a64270f 100644
|
||||
--- a/gdb/testsuite/gdb.base/catch-syscall.exp
|
||||
+++ b/gdb/testsuite/gdb.base/catch-syscall.exp
|
||||
@@ -568,7 +568,7 @@ proc test_catch_syscall_with_wrong_args_noxml {} {
|
||||
proc test_catch_syscall_multi_arch_1 {
|
||||
arch1 arch2 syscall1_name syscall2_name syscall_number
|
||||
} {
|
||||
- global decimal binfile
|
||||
+ global decimal
|
||||
|
||||
with_test_prefix "multiple targets: $arch1 vs $arch2" {
|
||||
# We are not interested in loading any binary here, and in
|
||||
@@ -605,12 +605,12 @@ proc test_catch_syscall_multi_arch_1 {
|
||||
gdb_test "catch syscall $syscall_number" \
|
||||
"Catchpoint $decimal \\(syscall .${syscall2_name}. \\\[${syscall_number}\\\]\\)" \
|
||||
"insert catch syscall on syscall $syscall_number -- $syscall2_name on $arch2"
|
||||
-
|
||||
- clean_restart $binfile
|
||||
}
|
||||
}
|
||||
|
||||
proc test_catch_syscall_multi_arch {} {
|
||||
+ global binfile
|
||||
+
|
||||
set arch1 "i386"
|
||||
set arch2 "i386:x86-64"
|
||||
set syscall1_name "exit"
|
||||
@@ -650,6 +650,8 @@ proc test_catch_syscall_multi_arch {} {
|
||||
set syscall_number 142
|
||||
test_catch_syscall_multi_arch_1 $arch1 $arch2 $syscall1_name \
|
||||
$syscall2_name $syscall_number
|
||||
+
|
||||
+ clean_restart $binfile
|
||||
}
|
||||
|
||||
proc do_syscall_tests_without_xml {} {
|
@ -1,46 +0,0 @@
|
||||
From 52ce02f7e38ed00f9e42fe4f272787652540c863 Mon Sep 17 00:00:00 2001
|
||||
From: Tom de Vries <tdevries@suse.de>
|
||||
Date: Wed, 12 Oct 2022 16:50:16 +0200
|
||||
Subject: [PATCH 08/11] [gdb/testsuite] Fix
|
||||
gdb.base/infoline-reloc-main-from-zero.exp with recent ld
|
||||
|
||||
On openSUSE Tumbleweed (with ld 2.39) and test-case
|
||||
gdb.base/infoline-reloc-main-from-zero.exp, I get:
|
||||
...
|
||||
gdb compile failed, ld: warning: infoline-reloc-main-from-zero has a LOAD \
|
||||
segment with RWX permissions
|
||||
UNTESTED: gdb.base/infoline-reloc-main-from-zero.exp: \
|
||||
infoline-reloc-main-from-zero.exp
|
||||
...
|
||||
|
||||
Fix this by compiling with -Wl,--no-warn-rwx-segments.
|
||||
|
||||
Tested on x86_64-linux.
|
||||
---
|
||||
.../gdb.base/infoline-reloc-main-from-zero.exp | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp b/gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp
|
||||
index ef5fe8c24bc..a29668c9712 100644
|
||||
--- a/gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp
|
||||
+++ b/gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp
|
||||
@@ -29,7 +29,15 @@ if [get_compiler_info] {
|
||||
|
||||
# Build executable with stripped startup code and text section starting at zero
|
||||
|
||||
-set opts {debug "additional_flags=-nostdlib -emain -Wl,-Ttext=0x00 -Wl,-N"}
|
||||
+set opts {}
|
||||
+lappend opts debug
|
||||
+lappend opts "additional_flags=-nostdlib -emain -Wl,-Ttext=0x00 -Wl,-N"
|
||||
+
|
||||
+set ld_flags additional_flags=-Wl,--no-warn-rwx-segments
|
||||
+if { [gdb_can_simple_compile ld-flags {int main () { return 0; }} executable \
|
||||
+ $ld_flags] } {
|
||||
+ lappend opts $ld_flags
|
||||
+}
|
||||
|
||||
if {[build_executable $testfile.exp $testfile $srcfile $opts] == -1} {
|
||||
untested "failed to compile"
|
||||
--
|
||||
2.35.3
|
||||
|
@ -1,80 +0,0 @@
|
||||
From a95556346e4336d2d6eeba74430212e833c065fb Mon Sep 17 00:00:00 2001
|
||||
From: Tom de Vries <tdevries@suse.de>
|
||||
Date: Wed, 12 Oct 2022 16:50:16 +0200
|
||||
Subject: [PATCH 10/11] [gdb/testsuite] Fix gdb.base/nested-subp{2,3}.exp with
|
||||
recent ld
|
||||
|
||||
On openSUSE Tumbleweed (with ld 2.39) I get for test-case
|
||||
gdb.base/nested-subp2.exp:
|
||||
...
|
||||
gdb compile failed, ld: warning: tmp.o: requires executable stack \
|
||||
(because the .note.GNU-stack section is executable)
|
||||
...
|
||||
|
||||
Fix this by compiling with -Wl,--no-warn-execstack.
|
||||
|
||||
Likewise in gdb.base/nested-subp3.exp
|
||||
|
||||
Tested on x86_64-linux.
|
||||
---
|
||||
gdb/testsuite/gdb.base/nested-subp2.exp | 15 ++++++++++++---
|
||||
gdb/testsuite/gdb.base/nested-subp3.exp | 15 ++++++++++++---
|
||||
2 files changed, 24 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/nested-subp2.exp b/gdb/testsuite/gdb.base/nested-subp2.exp
|
||||
index 876b797e49d..8cb57bd1ee7 100644
|
||||
--- a/gdb/testsuite/gdb.base/nested-subp2.exp
|
||||
+++ b/gdb/testsuite/gdb.base/nested-subp2.exp
|
||||
@@ -29,10 +29,19 @@ if ![support_nested_function_tests] {
|
||||
return -1
|
||||
}
|
||||
|
||||
+set flags {}
|
||||
+lappend flags debug
|
||||
+lappend flags additional_flags=-std=gnu99
|
||||
+
|
||||
+set ld_flags additional_flags=-Wl,--no-warn-execstack
|
||||
+if { [gdb_can_simple_compile ld-flags {int main () { return 0; }} executable \
|
||||
+ $ld_flags] } {
|
||||
+ lappend flags $ld_flags
|
||||
+}
|
||||
+
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${testcase}.c" \
|
||||
- [standard_output_file "${testcase}"] \
|
||||
- executable \
|
||||
- [list debug "additional_flags=-std=gnu99"]] != "" } {
|
||||
+ [standard_output_file "${testcase}"] \
|
||||
+ executable $flags] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/nested-subp3.exp b/gdb/testsuite/gdb.base/nested-subp3.exp
|
||||
index dd236f07c8f..31da8d47f84 100644
|
||||
--- a/gdb/testsuite/gdb.base/nested-subp3.exp
|
||||
+++ b/gdb/testsuite/gdb.base/nested-subp3.exp
|
||||
@@ -29,10 +29,19 @@ if ![support_nested_function_tests] {
|
||||
return -1
|
||||
}
|
||||
|
||||
+set flags {}
|
||||
+lappend flags debug
|
||||
+lappend flags additional_flags=-std=gnu99
|
||||
+
|
||||
+set ld_flags additional_flags=-Wl,--no-warn-execstack
|
||||
+if { [gdb_can_simple_compile ld-flags {int main () { return 0; }} executable \
|
||||
+ $ld_flags] } {
|
||||
+ lappend flags $ld_flags
|
||||
+}
|
||||
+
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${testcase}.c" \
|
||||
- [standard_output_file "${testcase}"] \
|
||||
- executable \
|
||||
- [list debug "additional_flags=-std=gnu99"]] != "" } {
|
||||
+ [standard_output_file "${testcase}"] \
|
||||
+ executable $flags] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
--
|
||||
2.35.3
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 7ba9d8dda33a985a97c9ab922b84b894ffb2e288 Mon Sep 17 00:00:00 2001
|
||||
From: Tom de Vries <tdevries@suse.de>
|
||||
Date: Thu, 16 Feb 2023 13:56:07 +0100
|
||||
Subject: [PATCH 11/11] [gdb/testsuite] Fix gdb.dwarf2/dw2-dir-file-name.exp
|
||||
with recent ld
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp
|
||||
index 4d3f767f597..1fc34ef387b 100644
|
||||
--- a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp
|
||||
@@ -317,6 +317,8 @@ puts -nonewline $f "\
|
||||
.byte 0x0 /* Terminator */
|
||||
"
|
||||
|
||||
+puts -nonewline $f "\t.section\t.note.GNU-stack,\"\",@progbits"
|
||||
+
|
||||
close $f
|
||||
|
||||
set opts {}
|
||||
--
|
||||
2.35.3
|
||||
|
@ -1,82 +0,0 @@
|
||||
[gdb/testsuite] Fix gdb.dwarf2/dw2-out-of-range-end-of-seq.exp on aarch64
|
||||
|
||||
On aarch64-linux, with test-case gdb.dwarf2/dw2-out-of-range-end-of-seq.exp I
|
||||
run into:
|
||||
...
|
||||
(gdb) run ^M
|
||||
Starting program: dw2-out-of-range-end-of-seq ^M
|
||||
^M
|
||||
Program received signal SIGILL, Illegal instruction.^M
|
||||
main () at src/gdb/testsuite/gdb.dwarf2/main.c:1^M
|
||||
1 /* This testcase is part of GDB, the GNU debugger.^M
|
||||
(gdb) FAIL: gdb.dwarf2/dw2-out-of-range-end-of-seq.exp: runto: run to main
|
||||
...
|
||||
|
||||
There are two problems here:
|
||||
- the test-case contains a hardcoded "DW_LNS_advance_pc 1" which causes the
|
||||
breakpoint pointing in the middle of an insn
|
||||
- the FAIL triggers on aarch64-linux, but not on x86_64-linux, because the
|
||||
test-case uses 'main_label' as the address of the first and only valid entry
|
||||
in the line table, and:
|
||||
- on aarch64-linux, there's no prologue, so main_label and main coincide,
|
||||
while
|
||||
- on x86_64-linux, there's a prologue, so main_label is different from main.
|
||||
|
||||
Fix these problems by:
|
||||
- eliminating the use of "DW_LNS_advance_pc 1", and using
|
||||
"DW_LNE_set_address $main_end" instead, and
|
||||
- eliminating the use of main_label, using "DW_LNE_set_address $main_start"
|
||||
instead.
|
||||
|
||||
Tested on both x86_64-linux and aarch64-linux.
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp | 14 +++++++++++---
|
||||
1 file changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
|
||||
index f60f622067e..749755fc771 100644
|
||||
--- a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
|
||||
@@ -35,10 +35,16 @@ if !$gcc_compiled {
|
||||
|
||||
standard_testfile main.c -dw.S
|
||||
|
||||
+set func_info_vars [get_func_info main]
|
||||
+
|
||||
set asm_file [standard_output_file $srcfile2]
|
||||
Dwarf::assemble $asm_file {
|
||||
declare_labels Llines
|
||||
global srcdir subdir srcfile
|
||||
+ global func_info_vars
|
||||
+ foreach var $func_info_vars {
|
||||
+ global $var
|
||||
+ }
|
||||
|
||||
cu {} {
|
||||
compile_unit {
|
||||
@@ -48,7 +54,9 @@ Dwarf::assemble $asm_file {
|
||||
} {
|
||||
subprogram {
|
||||
{external 1 flag}
|
||||
- {MACRO_AT_func {main}}
|
||||
+ {name main}
|
||||
+ {low_pc $main_start}
|
||||
+ {high_pc $main_end addr}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -58,11 +66,11 @@ Dwarf::assemble $asm_file {
|
||||
file_name "$srcfile" 1
|
||||
|
||||
program {
|
||||
- {DW_LNE_set_address main_label}
|
||||
+ {DW_LNE_set_address $main_start}
|
||||
{line 1}
|
||||
{DW_LNS_copy}
|
||||
|
||||
- {DW_LNS_advance_pc 1}
|
||||
+ {DW_LNE_set_address $main_end}
|
||||
{DW_LNE_end_sequence}
|
||||
|
||||
{DW_LNE_set_address 0}
|
@ -1,28 +0,0 @@
|
||||
[gdb/testsuite] Fix gdb.dwarf2/dw2-unspecified-type-foo.c with -m32
|
||||
|
||||
When running test-case gdb.dwarf2/dw2-unspecified-type-foo.c with target board
|
||||
unix/-m32, I run into:
|
||||
...
|
||||
(gdb) PASS: gdb.dwarf2/dw2-unspecified-type.exp: ptype foo
|
||||
p ((int (*) ()) foo) ()^M
|
||||
$1 = -135698472^M
|
||||
...
|
||||
|
||||
Add the missing "return 0" in foo, which fixes this.
|
||||
|
||||
Tested on x86_64-linux.
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.dwarf2/dw2-unspecified-type-foo.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type-foo.c b/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type-foo.c
|
||||
index b1e3a8b98e4..c92e18b898f 100644
|
||||
--- a/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type-foo.c
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type-foo.c
|
||||
@@ -19,4 +19,5 @@ int
|
||||
foo (void)
|
||||
{
|
||||
asm ("foo_label: .globl foo_label");
|
||||
+ return 0;
|
||||
}
|
146
gdb-testsuite-fix-gdb.gdb-python-helper.exp-with-o2-.patch
Normal file
146
gdb-testsuite-fix-gdb.gdb-python-helper.exp-with-o2-.patch
Normal file
@ -0,0 +1,146 @@
|
||||
From f90de5ff0840a3807e01a250fd3379a009821a04 Mon Sep 17 00:00:00 2001
|
||||
From: Tom de Vries <tdevries@suse.de>
|
||||
Date: Mon, 24 Apr 2023 22:08:53 +0200
|
||||
Subject: [PATCH 4/4] [gdb/testsuite] Fix gdb.gdb/python-helper.exp with -O2
|
||||
-flto
|
||||
|
||||
On openSUSE Leap 15.4, with gcc 7.5.0, when building gdb with
|
||||
-O2 -g -flto=auto, I run into:
|
||||
...
|
||||
FAIL: gdb.gdb/python-helper.exp: hit breakpoint in outer gdb
|
||||
FAIL: gdb.gdb/python-helper.exp: print integer from DWARF info
|
||||
FAIL: gdb.gdb/python-helper.exp: print *type->main_type
|
||||
...
|
||||
|
||||
Fix the first two FAILs by using $bkptno_numopt_re.
|
||||
|
||||
The last FAIL is due to:
|
||||
...
|
||||
(outer-gdb) print *type->main_type^M
|
||||
A syntax error in expression, near `->main_type'.^M
|
||||
(outer-gdb) FAIL: gdb.gdb/python-helper.exp: print *type->main_type
|
||||
...
|
||||
because:
|
||||
...
|
||||
(outer-gdb) print type^M
|
||||
Attempt to use a type name as an expression^M
|
||||
...
|
||||
|
||||
Fix this by making the test unresolved if "print type" or
|
||||
"print type->main_type" doesn't succeed.
|
||||
|
||||
On openSUSE Tumbleweed, with gcc 13.0.1, when building gdb with
|
||||
-O2 -g -flto=auto, I run into timeouts due to the breakpoint in c_print_type
|
||||
not hitting. Fix this by detecting the situation and bailing out.
|
||||
|
||||
Tested on x86_64-linux.
|
||||
---
|
||||
gdb/testsuite/gdb.gdb/python-helper.exp | 77 +++++++++++++++++++------
|
||||
1 file changed, 58 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.gdb/python-helper.exp b/gdb/testsuite/gdb.gdb/python-helper.exp
|
||||
index 8afbc0f219b..0520d5800fb 100644
|
||||
--- a/gdb/testsuite/gdb.gdb/python-helper.exp
|
||||
+++ b/gdb/testsuite/gdb.gdb/python-helper.exp
|
||||
@@ -127,7 +127,9 @@ proc test_python_helper {} {
|
||||
# GDB, this should result in the outer GDB stopping at one of the
|
||||
# breakpoints we created..
|
||||
send_inferior "print 1\n"
|
||||
- gdb_test -prompt $outer_prompt_re "" "Breakpoint $decimal, value_print.*" "hit breakpoint in outer gdb"
|
||||
+ gdb_test -prompt $outer_prompt_re "" \
|
||||
+ "Breakpoint $bkptno_numopt_re, value_print.*" \
|
||||
+ "hit breakpoint in outer gdb"
|
||||
|
||||
# Now inspect the type of parameter VAL, this should trigger the
|
||||
# pretty printers.
|
||||
@@ -165,8 +167,10 @@ proc test_python_helper {} {
|
||||
# information, this will include the TYPE_SPECIFIC_INT
|
||||
# information.
|
||||
send_inferior "print global_c.m_val\n"
|
||||
- gdb_test -prompt $outer_prompt_re "" "Breakpoint $decimal, value_print.*" "print integer from DWARF info"
|
||||
-
|
||||
+ gdb_test -prompt $outer_prompt_re "" \
|
||||
+ "Breakpoint $bkptno_numopt_re, value_print.*" \
|
||||
+ "print integer from DWARF info"
|
||||
+
|
||||
set answer [multi_line \
|
||||
"$decimal = " \
|
||||
"{name = $hex \"int\"," \
|
||||
@@ -190,23 +194,58 @@ proc test_python_helper {} {
|
||||
# Send a command to the inner GDB, this should result in the outer
|
||||
# GDB stopping at the value_print breakpoint again.
|
||||
send_inferior "ptype global_c\n"
|
||||
- gdb_test -prompt $outer_prompt_re "" "Breakpoint $bkptno_numopt_re, c_print_type.*" "hit breakpoint in outer gdb again"
|
||||
+ set test "hit breakpoint in outer gdb again"
|
||||
+ set in_outer_gdb 0
|
||||
+ gdb_test_multiple "" $test -prompt $outer_prompt_re {
|
||||
+ -re "Breakpoint $bkptno_numopt_re, c_print_type.*\r\n$outer_prompt_re" {
|
||||
+ pass $gdb_test_name
|
||||
+ set in_outer_gdb 1
|
||||
+ }
|
||||
+ -re "\r\n$gdb_prompt $" {
|
||||
+ unsupported $gdb_test_name
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- set answer [multi_line \
|
||||
- "$decimal = " \
|
||||
- "{name = $hex \"CC\"," \
|
||||
- " code = TYPE_CODE_STRUCT," \
|
||||
- " flags = \[^\r\n\]+," \
|
||||
- " owner = $hex \\(objfile\\)," \
|
||||
- " target_type = 0x0," \
|
||||
- " flds_bnds\\.fields\\\[0\\\]:" \
|
||||
- " {m_name = $hex \"m_val\"," \
|
||||
- " m_type = $hex," \
|
||||
- " m_loc_kind = FIELD_LOC_KIND_BITPOS," \
|
||||
- " bitsize = 0," \
|
||||
- " bitpos = 0}," \
|
||||
- " cplus_stuff = $hex}"]
|
||||
- gdb_test -prompt $outer_prompt_re "print *type->main_type" $answer
|
||||
+ if { ! $in_outer_gdb } {
|
||||
+ return 0
|
||||
+ }
|
||||
+
|
||||
+ set cmd "print *type->main_type"
|
||||
+ set cmd_supported 1
|
||||
+ foreach sub_expr { type type->main_type } {
|
||||
+ set ok 0
|
||||
+ gdb_test_multiple "print $sub_expr" "" -prompt $outer_prompt_re {
|
||||
+ -re " = \\(\[^\r\n\]+ \\*\\) $hex\r\n$outer_prompt_re" {
|
||||
+ set ok 1
|
||||
+ }
|
||||
+ -re "\r\n$outer_prompt_re" {
|
||||
+ }
|
||||
+ }
|
||||
+ if { ! $ok } {
|
||||
+ set cmd_supported 0
|
||||
+ break
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if { $cmd_supported } {
|
||||
+ set answer [multi_line \
|
||||
+ "$decimal = " \
|
||||
+ "{name = $hex \"CC\"," \
|
||||
+ " code = TYPE_CODE_STRUCT," \
|
||||
+ " flags = \[^\r\n\]+," \
|
||||
+ " owner = $hex \\(objfile\\)," \
|
||||
+ " target_type = 0x0," \
|
||||
+ " flds_bnds\\.fields\\\[0\\\]:" \
|
||||
+ " {m_name = $hex \"m_val\"," \
|
||||
+ " m_type = $hex," \
|
||||
+ " m_loc_kind = FIELD_LOC_KIND_BITPOS," \
|
||||
+ " bitsize = 0," \
|
||||
+ " bitpos = 0}," \
|
||||
+ " cplus_stuff = $hex}"]
|
||||
+ gdb_test -prompt $outer_prompt_re $cmd $answer
|
||||
+ } else {
|
||||
+ unsupported $cmd
|
||||
+ }
|
||||
|
||||
return 0
|
||||
}
|
||||
--
|
||||
2.35.3
|
||||
|
@ -1,39 +0,0 @@
|
||||
[gdb/testsuite] Fix gdb.mi/mi-sym-info.exp on openSUSE Tumbleweed
|
||||
|
||||
On openSUSE Tumbleweed, I run into:
|
||||
...
|
||||
FAIL: gdb.mi/mi-sym-info.exp: List all functions from debug information only
|
||||
...
|
||||
|
||||
The problem is in matching this string:
|
||||
...
|
||||
{name="_start",type="void (void)",description="void _start(void);"}
|
||||
...
|
||||
using regexp fun_re, which requires a line field:
|
||||
...
|
||||
set fun_re \
|
||||
"\{line=\"$decimal\",name=${qstr},type=${qstr},description=${qstr}\}"
|
||||
...
|
||||
|
||||
Fix this by making the line field optional in fun_re.
|
||||
|
||||
Tested on x86_64-linux.
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.mi/mi-sym-info.exp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.mi/mi-sym-info.exp b/gdb/testsuite/gdb.mi/mi-sym-info.exp
|
||||
index 7b936061759..2f723ece882 100644
|
||||
--- a/gdb/testsuite/gdb.mi/mi-sym-info.exp
|
||||
+++ b/gdb/testsuite/gdb.mi/mi-sym-info.exp
|
||||
@@ -38,7 +38,8 @@ mi_clean_restart $binfile
|
||||
mi_runto_main
|
||||
|
||||
set qstr "\"\[^\"\]+\""
|
||||
-set fun_re "\{line=\"$decimal\",name=${qstr},type=${qstr},description=${qstr}\}"
|
||||
+set fun_re \
|
||||
+ "\{(?:line=\"$decimal\",)?name=${qstr},type=${qstr},description=${qstr}\}"
|
||||
set type_re "\{(?:line=\"$decimal\",)*name=${qstr}\}"
|
||||
set sym_list "\\\[${fun_re}(?:,$fun_re)*\\\]"
|
||||
set type_sym_list "\\\[${type_re}(?:,$type_re)*\\\]"
|
@ -1,52 +0,0 @@
|
||||
[gdb/testsuite] Fix gdb.opt/clobbered-registers-O2.exp with gcc-12
|
||||
|
||||
When running test-case gdb.opt/clobbered-registers-O2.exp with gcc-12, I run
|
||||
into:
|
||||
...
|
||||
(gdb) PASS: gdb.opt/clobbered-registers-O2.exp: backtracing
|
||||
print operand0^M
|
||||
$1 = (unsigned int *) 0x7fffffffd070^M
|
||||
(gdb) print *operand0^M
|
||||
$2 = 4195541^M
|
||||
(gdb) FAIL: gdb.opt/clobbered-registers-O2.exp: print operand0
|
||||
...
|
||||
|
||||
The problem is that starting gcc-12, the assignments to x and y in main are
|
||||
optimized away:
|
||||
...
|
||||
int main(void)
|
||||
{
|
||||
unsigned x, y;
|
||||
|
||||
x = 13;
|
||||
y = 14;
|
||||
return (int)gen_movsd (&x, &y);
|
||||
...
|
||||
|
||||
Fix this by making x and y volatile.
|
||||
|
||||
Note that the test-case intends to check the handling of debug info for
|
||||
optimized code in function gen_movsd, so inhibiting optimization in main
|
||||
doesn't interfere with that.
|
||||
|
||||
Tested on x86_64-linux.
|
||||
|
||||
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29161
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.opt/clobbered-registers-O2.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.opt/clobbered-registers-O2.c b/gdb/testsuite/gdb.opt/clobbered-registers-O2.c
|
||||
index 7776024eb90..83cf2267d1e 100644
|
||||
--- a/gdb/testsuite/gdb.opt/clobbered-registers-O2.c
|
||||
+++ b/gdb/testsuite/gdb.opt/clobbered-registers-O2.c
|
||||
@@ -33,7 +33,7 @@ gen_movsd (unsigned * operand0, unsigned * operand1)
|
||||
|
||||
int main(void)
|
||||
{
|
||||
- unsigned x, y;
|
||||
+ volatile unsigned x, y;
|
||||
|
||||
x = 13;
|
||||
y = 14;
|
73
gdb-testsuite-fix-gdb.python-py-breakpoint.exp-timeo.patch
Normal file
73
gdb-testsuite-fix-gdb.python-py-breakpoint.exp-timeo.patch
Normal file
@ -0,0 +1,73 @@
|
||||
From 911a6999884d94959551aa8e02858b6b8429f275 Mon Sep 17 00:00:00 2001
|
||||
From: Tom de Vries <tdevries@suse.de>
|
||||
Date: Tue, 28 Feb 2023 15:50:23 +0100
|
||||
Subject: [PATCH 4/9] [gdb/testsuite] Fix gdb.python/py-breakpoint.exp timeouts
|
||||
|
||||
On powerpc64le-linux, I run into two timeouts:
|
||||
...
|
||||
FAIL: gdb.python/py-breakpoint.exp: test_watchpoints: \
|
||||
Test watchpoint write (timeout)
|
||||
FAIL: gdb.python/py-breakpoint.exp: test_bkpt_internal: \
|
||||
Test watchpoint write (timeout)
|
||||
...
|
||||
|
||||
In this case, hw watchpoints are not supported, and using sw watchpoints
|
||||
is slow.
|
||||
|
||||
Most of the time is spent in handling a try-catch, which triggers a malloc. I
|
||||
think this bit is more relevant for the "catch throw" part of the test-case,
|
||||
so fix the timeouts by setting the watchpoints after the try-catch.
|
||||
|
||||
Tested on x86_64-linux and powerpc64le-linux.
|
||||
---
|
||||
gdb/testsuite/gdb.python/py-breakpoint.c | 2 ++
|
||||
gdb/testsuite/gdb.python/py-breakpoint.exp | 6 ++++--
|
||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.python/py-breakpoint.c b/gdb/testsuite/gdb.python/py-breakpoint.c
|
||||
index 0f791da9c27..1fb341660e9 100644
|
||||
--- a/gdb/testsuite/gdb.python/py-breakpoint.c
|
||||
+++ b/gdb/testsuite/gdb.python/py-breakpoint.c
|
||||
@@ -60,6 +60,8 @@ int main (int argc, char *argv[])
|
||||
/* Nothing. */
|
||||
}
|
||||
|
||||
+ i = -1; /* Past throw-catch. */
|
||||
+
|
||||
for (i = 0; i < 10; i++)
|
||||
{
|
||||
result += multiply (foo); /* Break at multiply. */
|
||||
diff --git a/gdb/testsuite/gdb.python/py-breakpoint.exp b/gdb/testsuite/gdb.python/py-breakpoint.exp
|
||||
index 397e4b31309..9ba6b837a41 100644
|
||||
--- a/gdb/testsuite/gdb.python/py-breakpoint.exp
|
||||
+++ b/gdb/testsuite/gdb.python/py-breakpoint.exp
|
||||
@@ -37,6 +37,8 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} ${options}]
|
||||
# Skip all tests if Python scripting is not enabled.
|
||||
if { [skip_python_tests] } { continue }
|
||||
|
||||
+set past_throw_catch_line [gdb_get_line_number "Past throw-catch."]
|
||||
+
|
||||
proc_with_prefix test_bkpt_basic { } {
|
||||
global srcfile testfile hex decimal
|
||||
|
||||
@@ -293,7 +295,7 @@ proc_with_prefix test_watchpoints { } {
|
||||
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
|
||||
}
|
||||
|
||||
- if {![runto_main]} {
|
||||
+ if {![runto $srcfile:$::past_throw_catch_line]} {
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -316,7 +318,7 @@ proc_with_prefix test_bkpt_internal { } {
|
||||
if {$skip_hw_watchpoint_tests_p} {
|
||||
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
|
||||
}
|
||||
- if {![runto_main]} {
|
||||
+ if {![runto $srcfile:$::past_throw_catch_line]} {
|
||||
return 0
|
||||
}
|
||||
delete_breakpoints
|
||||
--
|
||||
2.35.3
|
||||
|
@ -1,34 +0,0 @@
|
||||
[gdb/testsuite] Fix gdb.reverse/i387-env-reverse.exp for -pie
|
||||
|
||||
When running test-case gdb.reverse/i387-env-reverse.exp for x86_64-linux with
|
||||
target board unix/-m32/-fPIE/-pie, we run into:
|
||||
...
|
||||
(gdb) PASS: gdb.reverse/i387-env-reverse.exp: push st0
|
||||
info register eax^M
|
||||
eax 0x56550000 1448411136^M
|
||||
(gdb) FAIL: gdb.reverse/i387-env-reverse.exp: verify eax == 0x8040000
|
||||
...
|
||||
|
||||
The problem is that the tested instruction (fstsw) only sets $ax, not $eax.
|
||||
|
||||
Fix this by verifying $ax instead of $eax.
|
||||
|
||||
Tested on x86_64-linux with target boards unix/-m32 and unix/-m32/-fPIE/-pie.
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.reverse/i387-env-reverse.exp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.reverse/i387-env-reverse.exp b/gdb/testsuite/gdb.reverse/i387-env-reverse.exp
|
||||
index a0a79c22ed0..53fee0986df 100644
|
||||
--- a/gdb/testsuite/gdb.reverse/i387-env-reverse.exp
|
||||
+++ b/gdb/testsuite/gdb.reverse/i387-env-reverse.exp
|
||||
@@ -64,7 +64,7 @@ with_test_prefix "forward" {
|
||||
gdb_test "n" "asm.*fstsw.*" "store status word in EAX"
|
||||
gdb_test "n" "asm.*fld1.*" "push st0"
|
||||
|
||||
- gdb_test "info register eax" "eax *0x8040000.*\[ \t\]+.*" "verify eax == 0x8040000"
|
||||
+ gdb_test "info register ax" "ax *0x0.*\[ \t\]+.*" "verify eax == 0x0"
|
||||
gdb_test "info register fstat" "fstat *0.*\[ \t\]+.*" "verify fstat == 0"
|
||||
gdb_test "info register ftag" "ftag *0xffff.*\[ \t\]+.*" "verify ftag == 0xffff"
|
||||
|
@ -1,37 +0,0 @@
|
||||
[gdb/testsuite] Fix gdb.reverse/test_ioctl_TCSETSW.exp with libc debuginfo
|
||||
|
||||
When running test-case gdb.reverse/test_ioctl_TCSETSW.exp with glibc debuginfo
|
||||
installed, I run into:
|
||||
...
|
||||
(gdb) PASS: gdb.reverse/test_ioctl_TCSETSW.exp: at TCSETSW call
|
||||
step^M
|
||||
__tcsetattr (fd=0, optional_actions=1, termios_p=0x7fffffffcf50) at \
|
||||
../sysdeps/unix/sysv/linux/tcsetattr.c:45^M
|
||||
45 {^M
|
||||
(gdb) FAIL: gdb.reverse/test_ioctl_TCSETSW.exp: handle TCSETSW
|
||||
...
|
||||
|
||||
The problem is that the step is expected to step over the call to tcsetattr,
|
||||
but due to glibc debuginfo being installed, we step into the call.
|
||||
|
||||
Fix this by using next instead of step.
|
||||
|
||||
Tested on x86_64-linux.
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.reverse/test_ioctl_TCSETSW.exp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.reverse/test_ioctl_TCSETSW.exp b/gdb/testsuite/gdb.reverse/test_ioctl_TCSETSW.exp
|
||||
index 86a62ebe5e5..4a81a618efc 100644
|
||||
--- a/gdb/testsuite/gdb.reverse/test_ioctl_TCSETSW.exp
|
||||
+++ b/gdb/testsuite/gdb.reverse/test_ioctl_TCSETSW.exp
|
||||
@@ -35,7 +35,7 @@ gdb_test "break $stop" ".*Breakpoint .*" "stop at TCSETSW"
|
||||
gdb_test "continue" ".*Breakpoint .*" "at TCSETSW call"
|
||||
|
||||
set test "handle TCSETSW"
|
||||
-gdb_test_multiple "step" $test {
|
||||
+gdb_test_multiple "next" $test {
|
||||
-re "Process record and replay target doesn't support ioctl request 0x.*$gdb_prompt $" {
|
||||
fail $test
|
||||
}
|
42
gdb-testsuite-fix-gdb.rust-watch.exp-on-ppc64le.patch
Normal file
42
gdb-testsuite-fix-gdb.rust-watch.exp-on-ppc64le.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From 0eade9c77cd7582fd6fe23cee3ed569a9115a6ba Mon Sep 17 00:00:00 2001
|
||||
From: Tom de Vries <tdevries@suse.de>
|
||||
Date: Tue, 28 Feb 2023 13:32:23 +0100
|
||||
Subject: [PATCH 2/9] [gdb/testsuite] Fix gdb.rust/watch.exp on ppc64le
|
||||
|
||||
On x86_64-linux, I have:
|
||||
...
|
||||
(gdb) watch -location y^M
|
||||
Hardware watchpoint 2: -location y^M
|
||||
(gdb) PASS: gdb.rust/watch.exp: watch -location y
|
||||
...
|
||||
but on powerpc64le-linux, I run into:
|
||||
...
|
||||
(gdb) watch -location y^M
|
||||
Watchpoint 2: -location y^M
|
||||
(gdb) FAIL: gdb.rust/watch.exp: watch -location y
|
||||
...
|
||||
due to the regexp matching "Hardware watchpoint" but not "Watchpoint":
|
||||
...
|
||||
gdb_test "watch -location y" ".*watchpoint .* -location .*"
|
||||
...
|
||||
|
||||
Fix this by making the regexp less restrictive.
|
||||
|
||||
Tested on x86_64-linux and powerpc64le-linux.
|
||||
---
|
||||
gdb/testsuite/gdb.rust/watch.exp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.rust/watch.exp b/gdb/testsuite/gdb.rust/watch.exp
|
||||
index b709c00e394..5c4636ef7a8 100644
|
||||
--- a/gdb/testsuite/gdb.rust/watch.exp
|
||||
+++ b/gdb/testsuite/gdb.rust/watch.exp
|
||||
@@ -32,4 +32,4 @@ if {![runto ${srcfile}:$line]} {
|
||||
}
|
||||
|
||||
# Just setting a watchpoint was enough to trigger the bug.
|
||||
-gdb_test "watch -location y" ".*watchpoint .* -location .*"
|
||||
+gdb_test "watch -location y" ".*\[wW\]atchpoint .* -location .*"
|
||||
--
|
||||
2.35.3
|
||||
|
@ -1,44 +0,0 @@
|
||||
[gdb/testsuite] Fix gdb.threads/killed-outside.exp on aarch64
|
||||
|
||||
On aarch64 (and likewise on arm), I run into:
|
||||
...
|
||||
(gdb) PASS: gdb.threads/killed-outside.exp: get pid of inferior
|
||||
Executing on target: kill -9 11516 (timeout = 300)
|
||||
builtin_spawn -ignore SIGHUP kill -9 11516^M
|
||||
continue^M
|
||||
Continuing.^M
|
||||
Unable to fetch general registers: No such process.^M
|
||||
(gdb) [Thread 0xfffff7d511e0 (LWP 11518) exited]^M
|
||||
^M
|
||||
Program terminated with signal SIGKILL, Killed.^M
|
||||
The program no longer exists.^M
|
||||
FAIL: gdb.threads/killed-outside.exp: prompt after first continue (timeout)
|
||||
...
|
||||
due to a mismatch between the actual "No such process" line and the expected
|
||||
one:
|
||||
...
|
||||
set no_such_process_msg "Couldn't get registers: No such process\."
|
||||
...
|
||||
|
||||
Fix this by updating the regexp.
|
||||
|
||||
Tested on aarch64-linux, and x86_64-linux.
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.threads/killed-outside.exp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.threads/killed-outside.exp b/gdb/testsuite/gdb.threads/killed-outside.exp
|
||||
index 3d4543e088c..7fa6b26c685 100644
|
||||
--- a/gdb/testsuite/gdb.threads/killed-outside.exp
|
||||
+++ b/gdb/testsuite/gdb.threads/killed-outside.exp
|
||||
@@ -37,7 +37,8 @@ remote_exec target "kill -9 ${testpid}"
|
||||
# Give it some time to die.
|
||||
sleep 2
|
||||
|
||||
-set no_such_process_msg "Couldn't get registers: No such process\."
|
||||
+set regs_msg "(Couldn't get registers|Unable to fetch general registers.)"
|
||||
+set no_such_process_msg "$regs_msg: No such process\."
|
||||
set killed_msg "Program terminated with signal SIGKILL, Killed\."
|
||||
set no_longer_exists_msg "The program no longer exists\."
|
||||
set not_being_run_msg "The program is not being run\."
|
@ -1,41 +0,0 @@
|
||||
[gdb/testsuite] Fix have_mpx test
|
||||
|
||||
When testing on openSUSE Leap 15.4 I ran into this FAIL:
|
||||
...
|
||||
FAIL: gdb.arch/i386-mpx-map.exp: NULL address of the pointer
|
||||
...
|
||||
and likewise for all the other mpx tests.
|
||||
|
||||
The problem is that have_mpx is supposed to return 0, but it doesn't because
|
||||
it tries to match this output:
|
||||
...
|
||||
builtin_spawn -ignore SIGHUP temp/20294/have_mpx-2-20294.x^M
|
||||
No MPX support^M
|
||||
No MPX support^M
|
||||
...
|
||||
using:
|
||||
...
|
||||
&& ![string equal $output "No MPX support\r\n"]]
|
||||
...
|
||||
|
||||
Fix this by matching using a regexp instead.
|
||||
|
||||
Tested on x86_64-linux.
|
||||
|
||||
---
|
||||
gdb/testsuite/lib/gdb.exp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
|
||||
index 3bfd59109bc..25c1572a53a 100644
|
||||
--- a/gdb/testsuite/lib/gdb.exp
|
||||
+++ b/gdb/testsuite/lib/gdb.exp
|
||||
@@ -8364,7 +8364,7 @@ gdb_caching_proc have_mpx {
|
||||
set status [lindex $result 0]
|
||||
set output [lindex $result 1]
|
||||
set status [expr ($status == 0) \
|
||||
- && ![string equal $output "No MPX support\r\n"]]
|
||||
+ && ![regexp "^No MPX support\r\n" $output]]
|
||||
|
||||
remote_file build delete $obj
|
||||
|
@ -1,39 +0,0 @@
|
||||
gdb/testsuite: fix occasional failure in gdb.mi/mi-multi-commands.exp
|
||||
|
||||
In bug PR gdb/29036, another failure was reported for the test
|
||||
gdb.mi/mi-multi-commands.exp. This test sends two commands to GDB as
|
||||
a single write, and then checks that both commands are executed.
|
||||
|
||||
The problem that was encountered here is that the output of the first
|
||||
command, which looks like this:
|
||||
|
||||
^done,value="\"FIRST COMMAND\""
|
||||
|
||||
Is actually produced in parts, first the '^done' is printed, then the
|
||||
',value="\"FIRST COMMAND\"" is printed.
|
||||
|
||||
What was happening is that some characters from the second command
|
||||
were being echoed after the '^done' had been printed, but before the
|
||||
value part had been printed. To avoid this issue I've relaxed the
|
||||
pattern that checks for the first command a little. With this fix in
|
||||
place the occasional failure in this test is no longer showing up.
|
||||
|
||||
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29036
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.mi/mi-multi-commands.exp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.mi/mi-multi-commands.exp b/gdb/testsuite/gdb.mi/mi-multi-commands.exp
|
||||
index d00e0aaea8b..58187b15815 100644
|
||||
--- a/gdb/testsuite/gdb.mi/mi-multi-commands.exp
|
||||
+++ b/gdb/testsuite/gdb.mi/mi-multi-commands.exp
|
||||
@@ -100,7 +100,7 @@ proc run_test { args } {
|
||||
set seen_second_message false
|
||||
|
||||
gdb_test_multiple "" "look for first command output, command length $i" -prompt "$mi_gdb_prompt" {
|
||||
- -re "\\^done,value=\"\\\\\"FIRST COMMAND\\\\\"\"" {
|
||||
+ -re "\\^done.*,value=\"\\\\\"FIRST COMMAND\\\\\"\"" {
|
||||
set seen_first_message true
|
||||
exp_continue
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
gdb/testsuite: fix test failure when building against readline v7
|
||||
|
||||
The test added in the commit:
|
||||
|
||||
commit a6b413d24ccc5d76179bab866834e11fd6fec294
|
||||
Date: Fri Mar 11 14:44:03 2022 +0000
|
||||
|
||||
gdb: work around prompt corruption caused by bracketed-paste-mode
|
||||
|
||||
Was not written with readline 7 in mind, only readline 8+. Between
|
||||
readline 7 and 8 the escape sequence used to disable bracketed paste
|
||||
mode changed, an additional '\r' character was added to the end. In
|
||||
fact, it was the addition of this '\r' character that triggered the
|
||||
issue for which the above commit is part of the solution.
|
||||
|
||||
Anyway, the test tries to spot the case where the output from GDB is
|
||||
not perfect, but does have the above work around applied. However,
|
||||
the pattern in the test assumes that the problematic '\r' will be
|
||||
present, and this is only true for readline 8+. With readline 7 the
|
||||
test was failing.
|
||||
|
||||
In this commit I generalise the pattern a little so that the test will
|
||||
still KFAIL with readline 7.
|
||||
|
||||
It's a little unfortunate that the test is KFAILing with readline 7,
|
||||
as without the problematic '\r' there's actually no reason that GDB
|
||||
couldn't "do the right thing" in this case, in which case, the test
|
||||
would PASS, but that would require changes within GDB itself.
|
||||
|
||||
My preference then is that initially we patch the test to get it
|
||||
KFAILing, then in a separate commit I can modify GDB so that it can
|
||||
PASS with readline 7.
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.base/eof-exit.exp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/eof-exit.exp b/gdb/testsuite/gdb.base/eof-exit.exp
|
||||
index 53a3b56dce8..c88aced9f35 100644
|
||||
--- a/gdb/testsuite/gdb.base/eof-exit.exp
|
||||
+++ b/gdb/testsuite/gdb.base/eof-exit.exp
|
||||
@@ -56,7 +56,7 @@ proc run_test {} {
|
||||
-re "$::gdb_prompt \[^\n\]*\r\[^\n\]*quit" {
|
||||
fail "$gdb_test_name (misplaced \\r)"
|
||||
}
|
||||
- -re "$::gdb_prompt \[^\n\]*\r\[^\n\]*\r\nquit\r\n" {
|
||||
+ -re "$::gdb_prompt (?:\[^\n\]*\r)?\[^\n\]*\r\nquit\r\n" {
|
||||
# For versions of readline that don't include the
|
||||
# RL_STATE_EOF patch, then the 'quit' is printed on the
|
||||
# subsequent line.
|
@ -1,45 +0,0 @@
|
||||
Index: gdb-12.1/gdb/testsuite/gdb.mi/user-selected-context-sync.exp
|
||||
===================================================================
|
||||
--- gdb-12.1.orig/gdb/testsuite/gdb.mi/user-selected-context-sync.exp
|
||||
+++ gdb-12.1/gdb/testsuite/gdb.mi/user-selected-context-sync.exp
|
||||
@@ -393,7 +393,7 @@ proc_with_prefix test_setup { mode } {
|
||||
}
|
||||
|
||||
if { [mi_gdb_start "separate-mi-tty"] != 0 } {
|
||||
- return
|
||||
+ return -1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -402,7 +402,7 @@ proc_with_prefix test_setup { mode } {
|
||||
mi_gdb_load $binfile
|
||||
|
||||
if { [mi_runto_main] < 0 } {
|
||||
- return
|
||||
+ return -1
|
||||
}
|
||||
|
||||
# When using mi_expect_stop, we don't expect a prompt after the *stopped
|
||||
@@ -443,6 +443,8 @@ proc_with_prefix test_setup { mode } {
|
||||
# Prepare the second inferior for the test.
|
||||
test_continue_to_start $mode 2
|
||||
}
|
||||
+
|
||||
+ return 0
|
||||
}
|
||||
|
||||
# Reset the selection to frame #0 of thread THREAD.
|
||||
@@ -1300,7 +1302,12 @@ proc_with_prefix test_cli_in_mi_frame {
|
||||
}
|
||||
|
||||
foreach_with_prefix mode { "all-stop" "non-stop" } {
|
||||
- test_setup $mode
|
||||
+ set test "setup done"
|
||||
+ if { [test_setup $mode] == -1 } {
|
||||
+ fail $test
|
||||
+ continue
|
||||
+ }
|
||||
+ pass $test
|
||||
|
||||
# Test selecting inferior, thread and frame from CLI
|
||||
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user