- Rebase to 8.1 release:
* ptype/o prints offsets and sizes of members (like pahole) * tab-completion improved: quoting function names is not generally necessary anymore, completion offers for breakpoint don't include data symbol * enable/disable breakpoints now accept ranges: 'disable 1.3-5' * new commands: - set/show cwd: working directory of debuggee - set/show compile-gcc: program to use for 'compile' command - starti: start program and stop at first instruction - TUI single-key commands: 'i' for stepi and 'o' for nexti * --readnever option disables any reading of debug info (for dumping) * s390: guarded storage register access for z14 * gcore option -a dumps all memory mapping * C++ breakpoints: 'b foo' will now set a breakpoint on all functions and methods named 'foo' no matter the scope. Use -qualified if you don't want that * python scripting: new events gdb.new_inferior, gdb.inferior_deleted and gdb.new_thread; new command rbreak (breakpoint accepting regexps) * gdbserver can be passed environment parameters to remote debuggee - Added patches from Fedora: gdb-ppc64-stwux-tautological-compare.patch gdb-rhbz1540559-gdbaddindex-glibcdebug-regression.patch gdb-vla-intel-fix-print-char-array.patch - Removed unused gdb-libstdc++-v3-python-7.1.1-20170526.tar.bz2 - Removed obsolete upstream patches: gdb-s390x-1b63490.patch gdb-s390x-289e23a.patch gdb-s390x-8fe09d7.patch gdb-s390x-96235dc.patch OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=177
This commit is contained in:
parent
feefab9860
commit
e7db4ec014
@ -1,7 +1,24 @@
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-see-vdso.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-see-vdso.c 2016-02-15 23:25:36.749601045 +0100
|
||||
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-attach-see-vdso-test.patch
|
||||
|
||||
FileName: gdb-6.3-attach-see-vdso-test.patch
|
||||
|
||||
;; Test kernel VDSO decoding while attaching to an i386 process.
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.base/attach-see-vdso.c | 25 +++++++++++
|
||||
gdb/testsuite/gdb.base/attach-see-vdso.exp | 72 ++++++++++++++++++++++++++++++
|
||||
2 files changed, 97 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/attach-see-vdso.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/attach-see-vdso.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/attach-see-vdso.c b/gdb/testsuite/gdb.base/attach-see-vdso.c
|
||||
new file mode 100644
|
||||
index 0000000000..cf3c7207a5
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/attach-see-vdso.c
|
||||
@@ -0,0 +1,25 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -28,10 +45,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-see-vdso.c
|
||||
+ pause ();
|
||||
+ return 1;
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-see-vdso.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-see-vdso.exp 2016-02-15 23:25:44.889658840 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/attach-see-vdso.exp b/gdb/testsuite/gdb.base/attach-see-vdso.exp
|
||||
new file mode 100644
|
||||
index 0000000000..e8a538097e
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/attach-see-vdso.exp
|
||||
@@ -0,0 +1,72 @@
|
||||
+# Copyright 2007
|
||||
+
|
||||
@ -105,3 +123,6 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-see-vdso.exp
|
||||
+# work.
|
||||
+
|
||||
+remote_exec build "kill -9 ${testpid}"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,6 +1,29 @@
|
||||
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S
|
||||
--- gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S 2007-08-02 13:23:10.000000000 -0400
|
||||
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
|
||||
|
||||
FileName: gdb-6.3-bz140532-ppc-unwinding-test.patch
|
||||
|
||||
;; Update PPC unwinding patches to their upstream variants (BZ 140532).
|
||||
;;=fedoratest
|
||||
---
|
||||
.../gdb.arch/powerpc-bcl-prologue-asm32.S | 78 +++++++++++++++++
|
||||
.../gdb.arch/powerpc-bcl-prologue-asm64.S | 98 ++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c | 29 +++++++
|
||||
gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp | 72 ++++++++++++++++
|
||||
gdb/testsuite/gdb.arch/powerpc-prologue.exp | 5 +-
|
||||
5 files changed, 280 insertions(+), 2 deletions(-)
|
||||
create mode 100644 gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S
|
||||
create mode 100644 gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S
|
||||
create mode 100644 gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c
|
||||
create mode 100644 gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
|
||||
|
||||
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
|
||||
index 0000000000..1e4301af89
|
||||
--- /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.
|
||||
+
|
||||
@ -80,9 +103,11 @@ diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm3
|
||||
+}
|
||||
+
|
||||
+*/
|
||||
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S
|
||||
--- gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S 2007-08-02 14:28:56.000000000 -0400
|
||||
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
|
||||
index 0000000000..1af5c19a16
|
||||
--- /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.
|
||||
+
|
||||
@ -182,9 +207,11 @@ diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm6
|
||||
+}
|
||||
+
|
||||
+*/
|
||||
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c
|
||||
--- gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c 2007-08-02 13:25:10.000000000 -0400
|
||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c
|
||||
new file mode 100644
|
||||
index 0000000000..6b5bb08d0f
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c
|
||||
@@ -0,0 +1,29 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -215,9 +242,11 @@ diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c gd
|
||||
+ func1 ();
|
||||
+ return 0;
|
||||
+}
|
||||
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
|
||||
--- gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp 2007-08-02 14:21:29.000000000 -0400
|
||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
|
||||
new file mode 100644
|
||||
index 0000000000..5f50c4ef43
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
|
||||
@@ -0,0 +1,72 @@
|
||||
+# Copyright 2006, 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -291,12 +320,11 @@ diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
|
||||
Fixup the testcase for ppc64 biarch GDB.
|
||||
|
||||
--- ./gdb/testsuite/gdb.arch/powerpc-prologue.exp 2008-01-13 13:32:19.000000000 +0100
|
||||
+++ ./gdb/testsuite/gdb.arch/powerpc-prologue.exp 2008-01-02 00:04:10.000000000 +0100
|
||||
@@ -17,8 +17,9 @@
|
||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-prologue.exp
|
||||
index 5251dfa9c3..f3933e2295 100644
|
||||
--- 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
|
||||
@ -308,3 +336,6 @@ Fixup the testcase for ppc64 biarch GDB.
|
||||
verbose "Skipping PowerPC prologue tests."
|
||||
return
|
||||
}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,12 +1,28 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-bz202689-exec-from-pthread-test.patch
|
||||
|
||||
FileName: gdb-6.3-bz202689-exec-from-pthread-test.patch
|
||||
|
||||
;; Testcase for exec() from threaded program (BZ 202689).
|
||||
;;=fedoratest
|
||||
|
||||
2007-01-17 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.threads/threaded-exec.exp, gdb.threads/threaded-exec.c: New files.
|
||||
---
|
||||
gdb/testsuite/gdb.threads/threaded-exec.c | 46 +++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.threads/threaded-exec.exp | 41 +++++++++++++++++++++++++
|
||||
2 files changed, 87 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.threads/threaded-exec.c
|
||||
create mode 100644 gdb/testsuite/gdb.threads/threaded-exec.exp
|
||||
|
||||
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.c 2016-02-16 09:54:06.936904418 +0100
|
||||
diff --git a/gdb/testsuite/gdb.threads/threaded-exec.c b/gdb/testsuite/gdb.threads/threaded-exec.c
|
||||
new file mode 100644
|
||||
index 0000000000..522b24671d
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/threaded-exec.c
|
||||
@@ -0,0 +1,46 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -54,10 +70,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.c
|
||||
+ execl ("/bin/true", "/bin/true", NULL);
|
||||
+ abort ();
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.exp 2016-02-16 09:54:19.965992585 +0100
|
||||
diff --git a/gdb/testsuite/gdb.threads/threaded-exec.exp b/gdb/testsuite/gdb.threads/threaded-exec.exp
|
||||
new file mode 100644
|
||||
index 0000000000..77c8a7dc85
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/threaded-exec.exp
|
||||
@@ -0,0 +1,41 @@
|
||||
+# threaded-exec.exp -- Check reset of the tracked threads on exec*(2)
|
||||
+# Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
@ -100,3 +117,6 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.exp
|
||||
+ pass "Program exited"
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,7 +1,22 @@
|
||||
Index: gdb-7.12.50.20170226/gdb/testsuite/gdb.base/focus-cmd-prev.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170226/gdb/testsuite/gdb.base/focus-cmd-prev.exp 2017-03-02 09:39:14.508461085 +0100
|
||||
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
|
||||
|
||||
FileName: gdb-6.3-focus-cmd-prev-test.patch
|
||||
|
||||
;; Test a crash on `focus cmd', `focus prev' commands.
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.base/focus-cmd-prev.exp | 40 +++++++++++++++++++++++++++++++
|
||||
1 file changed, 40 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/focus-cmd-prev.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/focus-cmd-prev.exp b/gdb/testsuite/gdb.base/focus-cmd-prev.exp
|
||||
new file mode 100644
|
||||
index 0000000000..d5a653f684
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/focus-cmd-prev.exp
|
||||
@@ -0,0 +1,40 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -43,3 +58,6 @@ Index: gdb-7.12.50.20170226/gdb/testsuite/gdb.base/focus-cmd-prev.exp
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,14 +1,34 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Cagney <cagney@gnu.org>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-gstack-20050411.patch
|
||||
|
||||
FileName: gdb-6.3-gstack-20050411.patch
|
||||
|
||||
;; Add a wrapper script to GDB that implements pstack using the
|
||||
;; --readnever option.
|
||||
;;=push
|
||||
|
||||
2004-11-23 Andrew Cagney <cagney@redhat.com>
|
||||
|
||||
* Makefile.in (uninstall-gstack, install-gstack): New rules, add
|
||||
to install and uninstall.
|
||||
* gstack.sh, gstack.1: New files.
|
||||
---
|
||||
gdb/Makefile.in | 34 ++++++++++++++++++--
|
||||
gdb/gstack.sh | 43 +++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.base/gstack.c | 43 +++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.base/gstack.exp | 66 +++++++++++++++++++++++++++++++++++++++
|
||||
4 files changed, 184 insertions(+), 2 deletions(-)
|
||||
create mode 100644 gdb/gstack.sh
|
||||
create mode 100644 gdb/testsuite/gdb.base/gstack.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/gstack.exp
|
||||
|
||||
Index: gdb-7.7/gdb/Makefile.in
|
||||
===================================================================
|
||||
--- gdb-7.7.orig/gdb/Makefile.in 2014-02-06 20:29:09.401214339 +0100
|
||||
+++ gdb-7.7/gdb/Makefile.in 2014-02-06 20:29:09.501214360 +0100
|
||||
@@ -1067,7 +1067,7 @@ info install-info clean-info dvi pdf ins
|
||||
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
|
||||
index 17b71c6e7c..e77d6a5c03 100644
|
||||
--- a/gdb/Makefile.in
|
||||
+++ b/gdb/Makefile.in
|
||||
@@ -1744,7 +1744,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force
|
||||
install: all
|
||||
@$(MAKE) $(FLAGS_TO_PASS) install-only
|
||||
|
||||
@ -17,7 +37,7 @@ Index: gdb-7.7/gdb/Makefile.in
|
||||
transformed_name=`t='$(program_transform_name)'; \
|
||||
echo gdb | sed -e "$$t"` ; \
|
||||
if test "x$$transformed_name" = x; then \
|
||||
@@ -1104,7 +1104,25 @@ install-strip:
|
||||
@@ -1784,7 +1784,25 @@ install-guile:
|
||||
install-python:
|
||||
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
|
||||
|
||||
@ -44,7 +64,7 @@ Index: gdb-7.7/gdb/Makefile.in
|
||||
transformed_name=`t='$(program_transform_name)'; \
|
||||
echo gdb | sed -e $$t` ; \
|
||||
if test "x$$transformed_name" = x; then \
|
||||
@@ -1127,6 +1145,18 @@ uninstall: force $(CONFIG_UNINSTALL)
|
||||
@@ -1807,6 +1825,18 @@ uninstall: force $(CONFIG_UNINSTALL)
|
||||
fi
|
||||
@$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
|
||||
|
||||
@ -63,10 +83,11 @@ Index: gdb-7.7/gdb/Makefile.in
|
||||
# The C++ name parser can be built standalone for testing.
|
||||
test-cp-name-parser.o: cp-name-parser.c
|
||||
$(COMPILE) -DTEST_CPNAMES cp-name-parser.c
|
||||
Index: gdb-7.7/gdb/gstack.sh
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7/gdb/gstack.sh 2014-02-06 20:29:09.501214360 +0100
|
||||
diff --git a/gdb/gstack.sh b/gdb/gstack.sh
|
||||
new file mode 100644
|
||||
index 0000000000..f7f07248f7
|
||||
--- /dev/null
|
||||
+++ b/gdb/gstack.sh
|
||||
@@ -0,0 +1,43 @@
|
||||
+#!/bin/sh
|
||||
+
|
||||
@ -111,10 +132,60 @@ Index: gdb-7.7/gdb/gstack.sh
|
||||
+ -e 's/^\((gdb) \)*//' \
|
||||
+ -e '/^#/p' \
|
||||
+ -e '/^Thread/p'
|
||||
Index: gdb-7.7/gdb/testsuite/gdb.base/gstack.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7/gdb/testsuite/gdb.base/gstack.exp 2014-02-06 20:43:17.774747352 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/gstack.c b/gdb/testsuite/gdb.base/gstack.c
|
||||
new file mode 100644
|
||||
index 0000000000..dc10813f04
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gstack.c
|
||||
@@ -0,0 +1,43 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2005, 2007, 2008, 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 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 <stdio.h>
|
||||
+#include <unistd.h>
|
||||
+#include <string.h>
|
||||
+
|
||||
+void
|
||||
+func (void)
|
||||
+{
|
||||
+ const char msg[] = "looping\n";
|
||||
+
|
||||
+ /* Use the most simple notification not to get caught by attach on exiting
|
||||
+ the function. */
|
||||
+ write (1, msg, strlen (msg));
|
||||
+
|
||||
+ for (;;);
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ alarm (60);
|
||||
+ nice (100);
|
||||
+
|
||||
+ func ();
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/gstack.exp b/gdb/testsuite/gdb.base/gstack.exp
|
||||
new file mode 100644
|
||||
index 0000000000..1186ec57bc
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gstack.exp
|
||||
@@ -0,0 +1,66 @@
|
||||
+# Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -182,51 +253,6 @@ Index: gdb-7.7/gdb/testsuite/gdb.base/gstack.exp
|
||||
+gdb_exit
|
||||
+
|
||||
+remote_exec host "kill -9 $pid"
|
||||
Index: gdb-7.7/gdb/testsuite/gdb.base/gstack.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7/gdb/testsuite/gdb.base/gstack.c 2014-02-06 20:29:09.502214360 +0100
|
||||
@@ -0,0 +1,43 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2005, 2007, 2008, 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 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 <stdio.h>
|
||||
+#include <unistd.h>
|
||||
+#include <string.h>
|
||||
+
|
||||
+void
|
||||
+func (void)
|
||||
+{
|
||||
+ const char msg[] = "looping\n";
|
||||
+
|
||||
+ /* Use the most simple notification not to get caught by attach on exiting
|
||||
+ the function. */
|
||||
+ write (1, msg, strlen (msg));
|
||||
+
|
||||
+ for (;;);
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ alarm (60);
|
||||
+ nice (100);
|
||||
+
|
||||
+ func ();
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
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-inferior-notification-20050721.patch
|
||||
|
||||
FileName: gdb-6.3-inferior-notification-20050721.patch
|
||||
|
||||
;; Notify observers that the inferior has been created
|
||||
;;=fedoratest
|
||||
|
||||
2005-07-21 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* gdb.base/attach-32.exp: New test for attaching in 32-bit
|
||||
@ -8,11 +18,20 @@
|
||||
2007-12-26 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.base/attach-32.exp: Fix forgotten $GDBFLAGS as set.
|
||||
---
|
||||
gdb/testsuite/gdb.base/attach-32.c | 20 +++
|
||||
gdb/testsuite/gdb.base/attach-32.exp | 245 +++++++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.base/attach-32b.c | 24 ++++
|
||||
3 files changed, 289 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/attach-32.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/attach-32.exp
|
||||
create mode 100644 gdb/testsuite/gdb.base/attach-32b.c
|
||||
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-32.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-32.c 2016-02-15 23:23:02.923499512 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/attach-32.c b/gdb/testsuite/gdb.base/attach-32.c
|
||||
new file mode 100644
|
||||
index 0000000000..0041b4732d
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/attach-32.c
|
||||
@@ -0,0 +1,20 @@
|
||||
+/* This program is intended to be started outside of gdb, and then
|
||||
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
||||
@ -34,10 +53,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-32.c
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-32.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-32.exp 2016-02-15 23:25:11.385420957 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/attach-32.exp b/gdb/testsuite/gdb.base/attach-32.exp
|
||||
new file mode 100644
|
||||
index 0000000000..67ded02ccf
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/attach-32.exp
|
||||
@@ -0,0 +1,245 @@
|
||||
+# Copyright 2005 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -284,10 +304,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-32.exp
|
||||
+do_call_attach_tests
|
||||
+
|
||||
+return 0
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-32b.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-32b.c 2016-02-15 23:23:02.924499519 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/attach-32b.c b/gdb/testsuite/gdb.base/attach-32b.c
|
||||
new file mode 100644
|
||||
index 0000000000..a78037ed38
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/attach-32b.c
|
||||
@@ -0,0 +1,24 @@
|
||||
+/* This program is intended to be started outside of gdb, and then
|
||||
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
||||
@ -313,3 +334,6 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-32b.c
|
||||
+ }
|
||||
+ return (0);
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,30 +1,35 @@
|
||||
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
|
||||
|
||||
FileName: 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.
|
||||
---
|
||||
gdb/testsuite/gdb.cp/b146835.cc | 32 +++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.cp/b146835.exp | 47 ++++++++++++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.cp/b146835.h | 36 ++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.cp/b146835b.cc | 11 ++++++++++
|
||||
4 files changed, 126 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.cp/b146835.cc
|
||||
create mode 100644 gdb/testsuite/gdb.cp/b146835.exp
|
||||
create mode 100644 gdb/testsuite/gdb.cp/b146835.h
|
||||
create mode 100644 gdb/testsuite/gdb.cp/b146835b.cc
|
||||
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835b.cc
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835b.cc 2016-02-16 09:49:08.743886620 +0100
|
||||
@@ -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) {}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835.cc
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835.cc 2016-02-16 09:49:08.744886627 +0100
|
||||
diff --git a/gdb/testsuite/gdb.cp/b146835.cc b/gdb/testsuite/gdb.cp/b146835.cc
|
||||
new file mode 100644
|
||||
index 0000000000..4161d523f5
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/b146835.cc
|
||||
@@ -0,0 +1,32 @@
|
||||
+#include "b146835.h"
|
||||
+#include <iostream>
|
||||
@ -58,10 +63,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835.cc
|
||||
+ f.foo();
|
||||
+}
|
||||
+
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835.exp 2016-02-16 09:51:48.601968339 +0100
|
||||
diff --git a/gdb/testsuite/gdb.cp/b146835.exp b/gdb/testsuite/gdb.cp/b146835.exp
|
||||
new file mode 100644
|
||||
index 0000000000..d03815bcff
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/b146835.exp
|
||||
@@ -0,0 +1,47 @@
|
||||
+# This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -110,10 +116,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835.exp
|
||||
+
|
||||
+# Verify that we can access the inherited member d
|
||||
+gdb_test "p d" " = \\(D \\*\\) *0x0" "Verify inherited member d accessible"
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835.h 2016-02-16 09:49:08.744886627 +0100
|
||||
diff --git a/gdb/testsuite/gdb.cp/b146835.h b/gdb/testsuite/gdb.cp/b146835.h
|
||||
new file mode 100644
|
||||
index 0000000000..48df7a2935
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/b146835.h
|
||||
@@ -0,0 +1,36 @@
|
||||
+
|
||||
+class A {
|
||||
@ -151,3 +158,23 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835.h
|
||||
+ 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
|
||||
index 0000000000..1853c1fa38
|
||||
--- /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) {}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,113 +1,24 @@
|
||||
Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/gcore-shmid0.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/gcore-shmid0.exp 2013-08-02 22:24:04.747745133 +0200
|
||||
@@ -0,0 +1,101 @@
|
||||
+# Copyright 2007, 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 GDB's handling of gcore for mapping with a name but zero inode.
|
||||
+
|
||||
+if { [prepare_for_testing gcore-shmid0.exp gcore-shmid0] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# Does this gdb support gcore?
|
||||
+set test "help gcore"
|
||||
+gdb_test_multiple $test $test {
|
||||
+ -re "Undefined command: .gcore.*$gdb_prompt $" {
|
||||
+ # gcore command not supported -- nothing to test here.
|
||||
+ unsupported "gdb does not support gcore on this target"
|
||||
+ return -1;
|
||||
+ }
|
||||
+ -re "Save a core file .*$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+if { ! [ runto_main ] } then {
|
||||
+ untested gcore-shmid0.exp
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_breakpoint "initialized"
|
||||
+gdb_breakpoint "unresolved"
|
||||
+
|
||||
+set oldtimeout $timeout
|
||||
+set timeout [expr $oldtimeout + 120]
|
||||
+
|
||||
+set test "Continue to initialized."
|
||||
+gdb_test_multiple "continue" $test {
|
||||
+ -re "Breakpoint .*, initialized .* at .*\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "Breakpoint .*, unresolved .* at .*\r\n$gdb_prompt $" {
|
||||
+ set timeout $oldtimeout
|
||||
+ unsupported $test
|
||||
+ return -1
|
||||
+ }
|
||||
+}
|
||||
+set timeout $oldtimeout
|
||||
+
|
||||
+set escapedfilename [string_to_regexp [standard_output_file gcore-shmid0.test]]
|
||||
+
|
||||
+set test "save a corefile"
|
||||
+gdb_test_multiple "gcore [standard_output_file gcore-shmid0.test]" $test {
|
||||
+ -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
|
||||
+ unsupported $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# Be sure to remove the handle first.
|
||||
+# But it would get removed even on a kill by GDB as the handle is already
|
||||
+# deleted, just it is still attached.
|
||||
+gdb_continue_to_end "finish"
|
||||
+
|
||||
+set test "core-file command"
|
||||
+gdb_test_multiple "core-file [standard_output_file gcore-shmid0.test]" $test {
|
||||
+ -re ".* program is being debugged already.*y or n. $" {
|
||||
+ # gdb_load may connect us to a gdbserver.
|
||||
+ send_gdb "y\n"
|
||||
+ exp_continue;
|
||||
+ }
|
||||
+ -re "Core was generated by .*\r\n\#0 .*\\\(\\\).*\r\n$gdb_prompt $" {
|
||||
+ # The filename does not fit there anyway so do not check it.
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re ".*registers from core file: File in wrong format.* $" {
|
||||
+ fail "core-file command (could not read registers from core file)"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+set test "backtrace"
|
||||
+gdb_test_multiple "bt" $test {
|
||||
+ -re "#0 *initialized \\\(\\\) at .*#1 .* main \\\(.*$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "#0 *initialized \\\(\\\) at .*Cannot access memory at address .*$gdb_prompt $" {
|
||||
+ fail $test
|
||||
+ }
|
||||
+}
|
||||
Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/gcore-shmid0.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/gcore-shmid0.c 2013-08-02 22:22:17.573599496 +0200
|
||||
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-mapping-zero-inode-test.patch
|
||||
|
||||
FileName: gdb-6.3-mapping-zero-inode-test.patch
|
||||
|
||||
;; Test GCORE for shmid 0 shared memory mappings.
|
||||
;;=fedoratest: But it is broken anyway, sometimes the case being tested is not reproducible.
|
||||
---
|
||||
gdb/testsuite/gdb.base/gcore-shmid0.c | 128 ++++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.base/gcore-shmid0.exp | 101 +++++++++++++++++++++++++
|
||||
2 files changed, 229 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/gcore-shmid0.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/gcore-shmid0.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/gcore-shmid0.c b/gdb/testsuite/gdb.base/gcore-shmid0.c
|
||||
new file mode 100644
|
||||
index 0000000000..bb9709a75c
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gcore-shmid0.c
|
||||
@@ -0,0 +1,128 @@
|
||||
+/* Copyright 2007, 2009 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -237,3 +148,113 @@ Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/gcore-shmid0.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/gcore-shmid0.exp b/gdb/testsuite/gdb.base/gcore-shmid0.exp
|
||||
new file mode 100644
|
||||
index 0000000000..b1fec682aa
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gcore-shmid0.exp
|
||||
@@ -0,0 +1,101 @@
|
||||
+# Copyright 2007, 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 GDB's handling of gcore for mapping with a name but zero inode.
|
||||
+
|
||||
+if { [prepare_for_testing gcore-shmid0.exp gcore-shmid0] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# Does this gdb support gcore?
|
||||
+set test "help gcore"
|
||||
+gdb_test_multiple $test $test {
|
||||
+ -re "Undefined command: .gcore.*$gdb_prompt $" {
|
||||
+ # gcore command not supported -- nothing to test here.
|
||||
+ unsupported "gdb does not support gcore on this target"
|
||||
+ return -1;
|
||||
+ }
|
||||
+ -re "Save a core file .*$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+if { ! [ runto_main ] } then {
|
||||
+ untested gcore-shmid0.exp
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_breakpoint "initialized"
|
||||
+gdb_breakpoint "unresolved"
|
||||
+
|
||||
+set oldtimeout $timeout
|
||||
+set timeout [expr $oldtimeout + 120]
|
||||
+
|
||||
+set test "Continue to initialized."
|
||||
+gdb_test_multiple "continue" $test {
|
||||
+ -re "Breakpoint .*, initialized .* at .*\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "Breakpoint .*, unresolved .* at .*\r\n$gdb_prompt $" {
|
||||
+ set timeout $oldtimeout
|
||||
+ unsupported $test
|
||||
+ return -1
|
||||
+ }
|
||||
+}
|
||||
+set timeout $oldtimeout
|
||||
+
|
||||
+set escapedfilename [string_to_regexp [standard_output_file gcore-shmid0.test]]
|
||||
+
|
||||
+set test "save a corefile"
|
||||
+gdb_test_multiple "gcore [standard_output_file gcore-shmid0.test]" $test {
|
||||
+ -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
|
||||
+ unsupported $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# Be sure to remove the handle first.
|
||||
+# But it would get removed even on a kill by GDB as the handle is already
|
||||
+# deleted, just it is still attached.
|
||||
+gdb_continue_to_end "finish"
|
||||
+
|
||||
+set test "core-file command"
|
||||
+gdb_test_multiple "core-file [standard_output_file gcore-shmid0.test]" $test {
|
||||
+ -re ".* program is being debugged already.*y or n. $" {
|
||||
+ # gdb_load may connect us to a gdbserver.
|
||||
+ send_gdb "y\n"
|
||||
+ exp_continue;
|
||||
+ }
|
||||
+ -re "Core was generated by .*\r\n\#0 .*\\\(\\\).*\r\n$gdb_prompt $" {
|
||||
+ # The filename does not fit there anyway so do not check it.
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re ".*registers from core file: File in wrong format.* $" {
|
||||
+ fail "core-file command (could not read registers from core file)"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+set test "backtrace"
|
||||
+gdb_test_multiple "bt" $test {
|
||||
+ -re "#0 *initialized \\\(\\\) at .*#1 .* main \\\(.*$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "#0 *initialized \\\(\\\) at .*Cannot access memory at address .*$gdb_prompt $" {
|
||||
+ fail $test
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,13 +1,27 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Cagney <cagney@gnu.org>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-ppc64displaysymbol-20041124.patch
|
||||
|
||||
FileName: gdb-6.3-ppc64displaysymbol-20041124.patch
|
||||
|
||||
;; Include the pc's section when doing a symbol lookup so that the
|
||||
;; correct symbol is found.
|
||||
;;=push: Write new testcase.
|
||||
|
||||
2004-11-24 Andrew Cagney <cagney@gnu.org>
|
||||
|
||||
* printcmd.c (build_address_symbolic): Find a section for the
|
||||
address.
|
||||
---
|
||||
gdb/printcmd.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
Index: gdb-6.8.50.20081128/gdb/printcmd.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/printcmd.c 2008-12-04 01:36:05.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/printcmd.c 2008-12-04 01:37:18.000000000 +0100
|
||||
@@ -616,6 +616,14 @@ build_address_symbolic (CORE_ADDR addr,
|
||||
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
|
||||
index 6256f35baa..c52e39f7fc 100644
|
||||
--- a/gdb/printcmd.c
|
||||
+++ b/gdb/printcmd.c
|
||||
@@ -602,6 +602,14 @@ build_address_symbolic (struct gdbarch *gdbarch,
|
||||
addr = overlay_mapped_address (addr, section);
|
||||
}
|
||||
}
|
||||
@ -22,3 +36,6 @@ Index: gdb-6.8.50.20081128/gdb/printcmd.c
|
||||
|
||||
/* First try to find the address in the symbol table, then
|
||||
in the minsyms. Take the closest one. */
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Cagney <cagney@gnu.org>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-ppc64syscall-20040622.patch
|
||||
|
||||
FileName: gdb-6.3-ppc64syscall-20040622.patch
|
||||
|
||||
;; Better parse 64-bit PPC system call prologues.
|
||||
;;=push: Write new testcase.
|
||||
|
||||
2004-06-22 Andrew Cagney <cagney@gnu.org>
|
||||
|
||||
* rs6000-tdep.c (struct rs6000_framedata): Add field "func_start".
|
||||
@ -5,12 +15,15 @@
|
||||
"func_start". Add local variable "num_skip_linux_syscall_insn",
|
||||
use to skip over first half of a GNU/Linux syscall and update
|
||||
"func_start".
|
||||
---
|
||||
gdb/rs6000-tdep.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++---
|
||||
1 file changed, 54 insertions(+), 3 deletions(-)
|
||||
|
||||
Index: gdb-7.2.50.20110117/gdb/rs6000-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/rs6000-tdep.c 2011-01-11 20:23:02.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/rs6000-tdep.c 2011-01-17 15:48:19.000000000 +0100
|
||||
@@ -126,6 +126,7 @@ static const char *powerpc_vector_abi_st
|
||||
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
|
||||
index e5a265dbcb..23d0db3b8f 100644
|
||||
--- a/gdb/rs6000-tdep.c
|
||||
+++ b/gdb/rs6000-tdep.c
|
||||
@@ -134,6 +134,7 @@ static const char *powerpc_vector_abi_string = "auto";
|
||||
|
||||
struct rs6000_framedata
|
||||
{
|
||||
@ -18,7 +31,7 @@ Index: gdb-7.2.50.20110117/gdb/rs6000-tdep.c
|
||||
int offset; /* total size of frame --- the distance
|
||||
by which we decrement sp to allocate
|
||||
the frame */
|
||||
@@ -1496,7 +1497,6 @@ static CORE_ADDR
|
||||
@@ -1577,7 +1578,6 @@ static CORE_ADDR
|
||||
skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
|
||||
struct rs6000_framedata *fdata)
|
||||
{
|
||||
@ -26,7 +39,7 @@ Index: gdb-7.2.50.20110117/gdb/rs6000-tdep.c
|
||||
CORE_ADDR last_prologue_pc = pc;
|
||||
CORE_ADDR li_found_pc = 0;
|
||||
gdb_byte buf[4];
|
||||
@@ -1514,12 +1514,14 @@ skip_prologue (struct gdbarch *gdbarch,
|
||||
@@ -1595,12 +1595,14 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
|
||||
int minimal_toc_loaded = 0;
|
||||
int prev_insn_was_prologue_insn = 1;
|
||||
int num_skip_non_prologue_insns = 0;
|
||||
@ -41,7 +54,7 @@ Index: gdb-7.2.50.20110117/gdb/rs6000-tdep.c
|
||||
fdata->saved_gpr = -1;
|
||||
fdata->saved_fpr = -1;
|
||||
fdata->saved_vr = -1;
|
||||
@@ -1553,6 +1555,55 @@ skip_prologue (struct gdbarch *gdbarch,
|
||||
@@ -1634,6 +1636,55 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
|
||||
break;
|
||||
op = extract_unsigned_integer (buf, 4, byte_order);
|
||||
|
||||
@ -97,7 +110,7 @@ Index: gdb-7.2.50.20110117/gdb/rs6000-tdep.c
|
||||
if ((op & 0xfc1fffff) == 0x7c0802a6)
|
||||
{ /* mflr Rx */
|
||||
/* Since shared library / PIC code, which needs to get its
|
||||
@@ -1734,9 +1785,9 @@ skip_prologue (struct gdbarch *gdbarch,
|
||||
@@ -1825,9 +1876,9 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
|
||||
we have no line table information or the line info tells
|
||||
us that the subroutine call is not part of the line
|
||||
associated with the prologue. */
|
||||
@ -109,3 +122,6 @@ Index: gdb-7.2.50.20110117/gdb/rs6000-tdep.c
|
||||
struct symtab_and_line this_sal = find_pc_line (pc, 0);
|
||||
|
||||
if ((prologue_sal.line == 0)
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Cagney <cagney@gnu.org>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-readnever-20050907.patch
|
||||
|
||||
FileName: gdb-6.3-readnever-20050907.patch
|
||||
|
||||
;; Add readnever option
|
||||
;;=push
|
||||
|
||||
2004-11-18 Andrew Cagney <cagney@gnu.org>
|
||||
|
||||
* dwarf2read.c: Include "top.c".
|
||||
@ -11,86 +21,24 @@
|
||||
|
||||
* gdb.texinfo (File Options): Document --readnever.
|
||||
|
||||
Index: gdb-7.99.90.20170420/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/doc/gdb.texinfo 2017-04-20 22:29:39.179740076 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/doc/gdb.texinfo 2017-04-20 22:29:40.924751096 +0200
|
||||
@@ -1037,6 +1037,12 @@
|
||||
the default, which is to read it incrementally as it is needed.
|
||||
This makes startup slower, but makes future operations faster.
|
||||
|
||||
+@item --readnever
|
||||
+@cindex @code{--readnever}
|
||||
+Do not read each symbol file's symbolic debug information. This makes
|
||||
+startup faster but at the expense of not being able to perform
|
||||
+symbolic debugging.
|
||||
+
|
||||
@end table
|
||||
|
||||
@node Mode Options
|
||||
Index: gdb-7.99.90.20170420/gdb/main.c
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/main.c 2017-04-20 22:29:39.182740095 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/main.c 2017-04-20 22:29:40.925751103 +0200
|
||||
@@ -615,6 +615,7 @@
|
||||
{"tui", no_argument, 0, OPT_TUI},
|
||||
{"dbx", no_argument, &dbx_commands, 1},
|
||||
{"readnow", no_argument, &readnow_symbol_files, 1},
|
||||
+ {"readnever", no_argument, &readnever_symbol_files, 1},
|
||||
{"r", no_argument, &readnow_symbol_files, 1},
|
||||
{"quiet", no_argument, &quiet, 1},
|
||||
{"q", no_argument, &quiet, 1},
|
||||
@@ -1254,6 +1255,7 @@
|
||||
--se=FILE Use FILE as symbol file and executable file.\n\
|
||||
--symbols=SYMFILE Read symbols from SYMFILE.\n\
|
||||
--readnow Fully read symbol files on first access.\n\
|
||||
+ --readnever Do not read symbol files.\n\
|
||||
--write Set writing into executable and core files.\n\n\
|
||||
"), stream);
|
||||
fputs_unfiltered (_("\
|
||||
Index: gdb-7.99.90.20170420/gdb/symfile.c
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/symfile.c 2017-04-20 22:29:39.183740101 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/symfile.c 2017-04-20 22:29:40.926751109 +0200
|
||||
@@ -79,6 +79,7 @@
|
||||
|
||||
/* Global variables owned by this file. */
|
||||
int readnow_symbol_files; /* Read full symbols immediately. */
|
||||
+int readnever_symbol_files; /* Never read full symbols. */
|
||||
|
||||
/* Functions this file defines. */
|
||||
|
||||
Index: gdb-7.99.90.20170420/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/dwarf2read.c 2017-04-20 22:29:39.190740145 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/dwarf2read.c 2017-04-20 22:29:57.973858766 +0200
|
||||
@@ -73,6 +73,7 @@
|
||||
#include "common/function-view.h"
|
||||
#include "common/gdb_optional.h"
|
||||
#include "common/underlying.h"
|
||||
+#include "top.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
@@ -2208,7 +2209,8 @@
|
||||
(void *) names);
|
||||
dwarf2_per_objfile->objfile = objfile;
|
||||
}
|
||||
- return (!dwarf2_per_objfile->info.is_virtual
|
||||
+ return !readnever_symbol_files &&
|
||||
+ (!dwarf2_per_objfile->info.is_virtual
|
||||
&& dwarf2_per_objfile->info.s.section != NULL
|
||||
&& !dwarf2_per_objfile->abbrev.is_virtual
|
||||
&& dwarf2_per_objfile->abbrev.s.section != NULL);
|
||||
Index: gdb-7.99.90.20170420/gdb/top.h
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/top.h 2017-04-20 22:29:39.191740152 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/top.h 2017-04-20 22:29:40.932751147 +0200
|
||||
@@ -269,6 +269,7 @@
|
||||
|
||||
/* From random places. */
|
||||
extern int readnow_symbol_files;
|
||||
+extern int readnever_symbol_files;
|
||||
|
||||
/* Perform _initialize initialization. */
|
||||
extern void gdb_init (char *);
|
||||
Pushed upstream: https://sourceware.org/ml/gdb-cvs/2017-12/msg00007.html
|
||||
---
|
||||
gdb/gcore.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/gcore.in b/gdb/gcore.in
|
||||
index b7f57cd341..c7e0dec574 100644
|
||||
--- a/gdb/gcore.in
|
||||
+++ b/gdb/gcore.in
|
||||
@@ -97,7 +97,7 @@ for pid in $*
|
||||
do
|
||||
# `</dev/null' to avoid touching interactive terminal if it is
|
||||
# available but not accessible as GDB would get stopped on SIGTTIN.
|
||||
- $binary_path/@GDB_TRANSFORM_NAME@ </dev/null --nx --batch \
|
||||
+ $binary_path/@GDB_TRANSFORM_NAME@ </dev/null --nx --batch --readnever \
|
||||
-ex "set pagination off" -ex "set height 0" -ex "set width 0" \
|
||||
"${dump_all_cmds[@]}" \
|
||||
-ex "attach $pid" -ex "gcore $name.$pid" -ex detach -ex quit
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,22 +0,0 @@
|
||||
2003-07-11 Elena Zannoni <ezannoni@redhat.com>
|
||||
|
||||
* lib/gdb.exp (setup_kfail, kfail): Redefine procedures.
|
||||
|
||||
--- ./gdb/testsuite/lib/gdb.exp.1 2004-11-24 15:59:46.131394720 -0500
|
||||
+++ ./gdb/testsuite/lib/gdb.exp 2004-11-24 16:01:06.304206600 -0500
|
||||
@@ -63,6 +63,15 @@
|
||||
|
||||
### Only procedures should come after this point.
|
||||
|
||||
+if {![llength [info procs kfail]]} {
|
||||
+ proc setup_kfail { args } {
|
||||
+ #setup_xfail args
|
||||
+ }
|
||||
+ proc kfail { bugid message } {
|
||||
+ fail $message
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
#
|
||||
# gdb_version -- extract and print the version number of GDB
|
||||
#
|
@ -1,13 +1,27 @@
|
||||
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.gdb/selftest.exp: Add matching on specific Red Hat only version
|
||||
string
|
||||
|
||||
FileName: gdb-6.3-rh-testversion-20041202.patch
|
||||
|
||||
;; Match the Fedora's version info.
|
||||
;;=fedora
|
||||
|
||||
2003-02-24 Elena Zannoni <ezannoni@redhat.com>
|
||||
|
||||
* gdb.gdb/selftest.exp: Add matching on specific Red Hat only version
|
||||
string.
|
||||
---
|
||||
gdb/testsuite/gdb.gdb/selftest.exp | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.gdb/selftest.exp
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.gdb/selftest.exp 2017-02-07 19:47:06.472874620 +0100
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.gdb/selftest.exp 2017-02-07 19:48:12.593380575 +0100
|
||||
@@ -53,6 +53,9 @@
|
||||
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
|
||||
index 20f34983ef..4108e088a9 100644
|
||||
--- a/gdb/testsuite/gdb.gdb/selftest.exp
|
||||
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
|
||||
@@ -53,6 +53,9 @@ proc test_with_self { } {
|
||||
-re ".\[0-9\]+ = +.+ +0x.*\[0-9.\]+.*$gdb_prompt $" {
|
||||
pass "printed version with cast"
|
||||
}
|
||||
@ -17,3 +31,6 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.gdb/selftest.exp
|
||||
}
|
||||
|
||||
# start the "xgdb" process
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,7 +1,24 @@
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/constructortest.cc
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/constructortest.cc 2016-02-16 09:49:08.681886201 +0100
|
||||
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
|
||||
|
||||
FileName: gdb-6.3-test-dtorfix-20050121.patch
|
||||
|
||||
;; Test support of multiple destructors just like multiple constructors
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.cp/constructortest.cc | 99 +++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.cp/constructortest.exp | 130 +++++++++++++++++++++++++++++++
|
||||
2 files changed, 229 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.cp/constructortest.cc
|
||||
create mode 100644 gdb/testsuite/gdb.cp/constructortest.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.cp/constructortest.cc b/gdb/testsuite/gdb.cp/constructortest.cc
|
||||
new file mode 100644
|
||||
index 0000000000..9ac8793e50
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/constructortest.cc
|
||||
@@ -0,0 +1,99 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -102,10 +119,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/constructortest.cc
|
||||
+{
|
||||
+ y = 2; /* First line D */
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/constructortest.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/constructortest.exp 2016-02-16 09:52:12.609130779 +0100
|
||||
diff --git a/gdb/testsuite/gdb.cp/constructortest.exp b/gdb/testsuite/gdb.cp/constructortest.exp
|
||||
new file mode 100644
|
||||
index 0000000000..341f6c99ad
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/constructortest.exp
|
||||
@@ -0,0 +1,130 @@
|
||||
+# This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -237,3 +255,6 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/constructortest.exp
|
||||
+}
|
||||
+
|
||||
+gdb_continue_to_breakpoint "First line ~C"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,13 +1,32 @@
|
||||
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
|
||||
|
||||
FileName: 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.
|
||||
---
|
||||
gdb/testsuite/gdb.base/move-dir.c | 10 +++++++
|
||||
gdb/testsuite/gdb.base/move-dir.exp | 57 +++++++++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.base/move-dir.h | 7 +++++
|
||||
3 files changed, 74 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/move-dir.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/move-dir.exp
|
||||
create mode 100644 gdb/testsuite/gdb.base/move-dir.h
|
||||
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/move-dir.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/move-dir.c 2016-02-15 23:23:02.892499288 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/move-dir.c b/gdb/testsuite/gdb.base/move-dir.c
|
||||
new file mode 100644
|
||||
index 0000000000..89b65b4b6a
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/move-dir.c
|
||||
@@ -0,0 +1,10 @@
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
@ -19,10 +38,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/move-dir.c
|
||||
+ other();
|
||||
+}
|
||||
+
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/move-dir.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/move-dir.exp 2016-02-15 23:29:58.768461406 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/move-dir.exp b/gdb/testsuite/gdb.base/move-dir.exp
|
||||
new file mode 100644
|
||||
index 0000000000..f189ea77b9
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/move-dir.exp
|
||||
@@ -0,0 +1,57 @@
|
||||
+# Copyright 2005
|
||||
+# Free Software Foundation, Inc.
|
||||
@ -81,10 +101,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/move-dir.exp
|
||||
+
|
||||
+set timeout $oldtimeout
|
||||
+return 0
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/move-dir.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/move-dir.h 2016-02-15 23:23:02.892499288 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/move-dir.h b/gdb/testsuite/gdb.base/move-dir.h
|
||||
new file mode 100644
|
||||
index 0000000000..4a99725a00
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/move-dir.h
|
||||
@@ -0,0 +1,7 @@
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
@ -93,3 +114,6 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/move-dir.h
|
||||
+ printf ("%s\n", ostring);;
|
||||
+}
|
||||
+
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,7 +1,36 @@
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/attach.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/attach.c 2016-02-15 23:23:02.843498936 +0100
|
||||
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-pie-20050107.patch
|
||||
|
||||
FileName: gdb-6.3-test-pie-20050107.patch
|
||||
|
||||
;; VSYSCALL and PIE
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.pie/attach.c | 20 +
|
||||
gdb/testsuite/gdb.pie/attach.exp | 416 ++++++++++++++++
|
||||
gdb/testsuite/gdb.pie/attach2.c | 24 +
|
||||
gdb/testsuite/gdb.pie/break.c | 146 ++++++
|
||||
gdb/testsuite/gdb.pie/break.exp | 954 +++++++++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.pie/break1.c | 44 ++
|
||||
gdb/testsuite/gdb.pie/corefile.exp | 233 +++++++++
|
||||
gdb/testsuite/gdb.pie/coremaker.c | 142 ++++++
|
||||
8 files changed, 1979 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.pie/attach.c
|
||||
create mode 100644 gdb/testsuite/gdb.pie/attach.exp
|
||||
create mode 100644 gdb/testsuite/gdb.pie/attach2.c
|
||||
create mode 100644 gdb/testsuite/gdb.pie/break.c
|
||||
create mode 100644 gdb/testsuite/gdb.pie/break.exp
|
||||
create mode 100644 gdb/testsuite/gdb.pie/break1.c
|
||||
create mode 100644 gdb/testsuite/gdb.pie/corefile.exp
|
||||
create mode 100644 gdb/testsuite/gdb.pie/coremaker.c
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.pie/attach.c b/gdb/testsuite/gdb.pie/attach.c
|
||||
new file mode 100644
|
||||
index 0000000000..0041b4732d
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.pie/attach.c
|
||||
@@ -0,0 +1,20 @@
|
||||
+/* This program is intended to be started outside of gdb, and then
|
||||
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
||||
@ -23,386 +52,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/attach.c
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/attach2.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/attach2.c 2016-02-15 23:23:02.843498936 +0100
|
||||
@@ -0,0 +1,24 @@
|
||||
+/* This program is intended to be started outside of gdb, and then
|
||||
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
||||
+ is exited when & if the variable 'should_exit' is non-zero. (It
|
||||
+ is initialized to zero in this program, so the loop will never
|
||||
+ exit unless/until gdb sets the variable to non-zero.)
|
||||
+ */
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+int should_exit = 0;
|
||||
+
|
||||
+int main ()
|
||||
+{
|
||||
+ int local_i = 0;
|
||||
+
|
||||
+ sleep( 10 ); /* System call causes register fetch to fail */
|
||||
+ /* This is a known HPUX "feature" */
|
||||
+ while (! should_exit)
|
||||
+ {
|
||||
+ local_i++;
|
||||
+ }
|
||||
+ return (0);
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/break.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/break.c 2016-02-15 23:23:02.844498943 +0100
|
||||
@@ -0,0 +1,146 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 1992, 1993, 1994, 1995, 1999, 2002, 2003 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.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@prep.ai.mit.edu */
|
||||
+
|
||||
+#ifdef vxworks
|
||||
+
|
||||
+# include <stdio.h>
|
||||
+
|
||||
+/* VxWorks does not supply atoi. */
|
||||
+static int
|
||||
+atoi (z)
|
||||
+ char *z;
|
||||
+{
|
||||
+ int i = 0;
|
||||
+
|
||||
+ while (*z >= '0' && *z <= '9')
|
||||
+ i = i * 10 + (*z++ - '0');
|
||||
+ return i;
|
||||
+}
|
||||
+
|
||||
+/* I don't know of any way to pass an array to VxWorks. This function
|
||||
+ can be called directly from gdb. */
|
||||
+
|
||||
+vxmain (arg)
|
||||
+char *arg;
|
||||
+{
|
||||
+ char *argv[2];
|
||||
+
|
||||
+ argv[0] = "";
|
||||
+ argv[1] = arg;
|
||||
+ main (2, argv, (char **) 0);
|
||||
+}
|
||||
+
|
||||
+#else /* ! vxworks */
|
||||
+# include <stdio.h>
|
||||
+# include <stdlib.h>
|
||||
+#endif /* ! vxworks */
|
||||
+
|
||||
+#ifdef PROTOTYPES
|
||||
+extern int marker1 (void);
|
||||
+extern int marker2 (int a);
|
||||
+extern void marker3 (char *a, char *b);
|
||||
+extern void marker4 (long d);
|
||||
+#else
|
||||
+extern int marker1 ();
|
||||
+extern int marker2 ();
|
||||
+extern void marker3 ();
|
||||
+extern void marker4 ();
|
||||
+#endif
|
||||
+
|
||||
+/*
|
||||
+ * This simple classical example of recursion is useful for
|
||||
+ * testing stack backtraces and such.
|
||||
+ */
|
||||
+
|
||||
+#ifdef PROTOTYPES
|
||||
+int factorial(int);
|
||||
+
|
||||
+int
|
||||
+main (int argc, char **argv, char **envp)
|
||||
+#else
|
||||
+int
|
||||
+main (argc, argv, envp)
|
||||
+int argc;
|
||||
+char *argv[], **envp;
|
||||
+#endif
|
||||
+{
|
||||
+#ifdef usestubs
|
||||
+ set_debug_traps(); /* set breakpoint 5 here */
|
||||
+ breakpoint();
|
||||
+#endif
|
||||
+ if (argc == 12345) { /* an unlikely value < 2^16, in case uninited */ /* set breakpoint 6 here */
|
||||
+ fprintf (stderr, "usage: factorial <number>\n");
|
||||
+ return 1;
|
||||
+ }
|
||||
+ printf ("%d\n", factorial (atoi ("6"))); /* set breakpoint 1 here */
|
||||
+ /* set breakpoint 12 here */
|
||||
+ marker1 (); /* set breakpoint 11 here */
|
||||
+ marker2 (43); /* set breakpoint 20 here */
|
||||
+ marker3 ("stack", "trace"); /* set breakpoint 21 here */
|
||||
+ marker4 (177601976L);
|
||||
+ argc = (argc == 12345); /* This is silly, but we can step off of it */ /* set breakpoint 2 here */
|
||||
+ return argc; /* set breakpoint 10 here */
|
||||
+}
|
||||
+
|
||||
+#ifdef PROTOTYPES
|
||||
+int factorial (int value)
|
||||
+#else
|
||||
+int factorial (value)
|
||||
+int value;
|
||||
+#endif
|
||||
+{
|
||||
+ if (value > 1) { /* set breakpoint 7 here */
|
||||
+ value *= factorial (value - 1);
|
||||
+ }
|
||||
+ return (value); /* set breakpoint 19 here */
|
||||
+}
|
||||
+
|
||||
+#ifdef PROTOTYPES
|
||||
+int multi_line_if_conditional (int a, int b, int c)
|
||||
+#else
|
||||
+int multi_line_if_conditional (a, b, c)
|
||||
+ int a, b, c;
|
||||
+#endif
|
||||
+{
|
||||
+ if (a /* set breakpoint 3 here */
|
||||
+ && b
|
||||
+ && c)
|
||||
+ return 0;
|
||||
+ else
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+#ifdef PROTOTYPES
|
||||
+int multi_line_while_conditional (int a, int b, int c)
|
||||
+#else
|
||||
+int multi_line_while_conditional (a, b, c)
|
||||
+ int a, b, c;
|
||||
+#endif
|
||||
+{
|
||||
+ while (a /* set breakpoint 4 here */
|
||||
+ && b
|
||||
+ && c)
|
||||
+ {
|
||||
+ a--, b--, c--;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/break1.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/break1.c 2016-02-15 23:23:02.844498943 +0100
|
||||
@@ -0,0 +1,44 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 1992, 1993, 1994, 1995, 1999, 2002, 2003 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.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@prep.ai.mit.edu */
|
||||
+
|
||||
+/* The code for this file was extracted from the gdb testsuite
|
||||
+ testcase "break.c". */
|
||||
+
|
||||
+/* The following functions do nothing useful. They are included
|
||||
+ simply as places to try setting breakpoints at. They are
|
||||
+ explicitly "one-line functions" to verify that this case works
|
||||
+ (some versions of gcc have or have had problems with this).
|
||||
+
|
||||
+ These functions are in a separate source file to prevent an
|
||||
+ optimizing compiler from inlining them and optimizing them away. */
|
||||
+
|
||||
+#ifdef PROTOTYPES
|
||||
+int marker1 (void) { return (0); } /* set breakpoint 15 here */
|
||||
+int marker2 (int a) { return (1); } /* set breakpoint 8 here */
|
||||
+void marker3 (char *a, char *b) {} /* set breakpoint 17 here */
|
||||
+void marker4 (long d) {} /* set breakpoint 14 here */
|
||||
+#else
|
||||
+int marker1 () { return (0); } /* set breakpoint 16 here */
|
||||
+int marker2 (a) int a; { return (1); } /* set breakpoint 9 here */
|
||||
+void marker3 (a, b) char *a, *b; {} /* set breakpoint 18 here */
|
||||
+void marker4 (d) long d; {} /* set breakpoint 13 here */
|
||||
+#endif
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/coremaker.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/coremaker.c 2016-02-15 23:23:02.844498943 +0100
|
||||
@@ -0,0 +1,142 @@
|
||||
+/* Copyright 1992, 1993, 1994, 1995, 1996, 1999
|
||||
+ 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 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. */
|
||||
+
|
||||
+/* Simple little program that just generates a core dump from inside some
|
||||
+ nested function calls. */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <fcntl.h>
|
||||
+#include <sys/mman.h>
|
||||
+#include <signal.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+#ifndef __STDC__
|
||||
+#define const /**/
|
||||
+#endif
|
||||
+
|
||||
+#define MAPSIZE (8 * 1024)
|
||||
+
|
||||
+/* Don't make these automatic vars or we will have to walk back up the
|
||||
+ stack to access them. */
|
||||
+
|
||||
+char *buf1;
|
||||
+char *buf2;
|
||||
+
|
||||
+int coremaker_data = 1; /* In Data section */
|
||||
+int coremaker_bss; /* In BSS section */
|
||||
+
|
||||
+const int coremaker_ro = 201; /* In Read-Only Data section */
|
||||
+
|
||||
+/* Note that if the mapping fails for any reason, we set buf2
|
||||
+ to -1 and the testsuite notices this and reports it as
|
||||
+ a failure due to a mapping error. This way we don't have
|
||||
+ to test for specific errors when running the core maker. */
|
||||
+
|
||||
+void
|
||||
+mmapdata ()
|
||||
+{
|
||||
+ int j, fd;
|
||||
+
|
||||
+ /* Allocate and initialize a buffer that will be used to write
|
||||
+ the file that is later mapped in. */
|
||||
+
|
||||
+ buf1 = (char *) malloc (MAPSIZE);
|
||||
+ for (j = 0; j < MAPSIZE; ++j)
|
||||
+ {
|
||||
+ buf1[j] = j;
|
||||
+ }
|
||||
+
|
||||
+ /* Write the file to map in */
|
||||
+
|
||||
+ fd = open ("coremmap.data", O_CREAT | O_RDWR, 0666);
|
||||
+ if (fd == -1)
|
||||
+ {
|
||||
+ perror ("coremmap.data open failed");
|
||||
+ buf2 = (char *) -1;
|
||||
+ return;
|
||||
+ }
|
||||
+ write (fd, buf1, MAPSIZE);
|
||||
+
|
||||
+ /* Now map the file into our address space as buf2 */
|
||||
+
|
||||
+ buf2 = (char *) mmap (0, MAPSIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
|
||||
+ if (buf2 == (char *) -1)
|
||||
+ {
|
||||
+ perror ("mmap failed");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ /* Verify that the original data and the mapped data are identical.
|
||||
+ If not, we'd rather fail now than when trying to access the mapped
|
||||
+ data from the core file. */
|
||||
+
|
||||
+ for (j = 0; j < MAPSIZE; ++j)
|
||||
+ {
|
||||
+ if (buf1[j] != buf2[j])
|
||||
+ {
|
||||
+ fprintf (stderr, "mapped data is incorrect");
|
||||
+ buf2 = (char *) -1;
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+func2 ()
|
||||
+{
|
||||
+ int coremaker_local[5];
|
||||
+ int i;
|
||||
+
|
||||
+#ifdef SA_FULLDUMP
|
||||
+ /* Force a corefile that includes the data section for AIX. */
|
||||
+ {
|
||||
+ struct sigaction sa;
|
||||
+
|
||||
+ sigaction (SIGABRT, (struct sigaction *)0, &sa);
|
||||
+ sa.sa_flags |= SA_FULLDUMP;
|
||||
+ sigaction (SIGABRT, &sa, (struct sigaction *)0);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+ /* Make sure that coremaker_local doesn't get optimized away. */
|
||||
+ for (i = 0; i < 5; i++)
|
||||
+ coremaker_local[i] = i;
|
||||
+ coremaker_bss = 0;
|
||||
+ for (i = 0; i < 5; i++)
|
||||
+ coremaker_bss += coremaker_local[i];
|
||||
+ coremaker_data = coremaker_ro + 1;
|
||||
+ abort ();
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+func1 ()
|
||||
+{
|
||||
+ func2 ();
|
||||
+}
|
||||
+
|
||||
+int main ()
|
||||
+{
|
||||
+ mmapdata ();
|
||||
+ func1 ();
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/attach.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/attach.exp 2016-02-15 23:37:15.190560048 +0100
|
||||
diff --git a/gdb/testsuite/gdb.pie/attach.exp b/gdb/testsuite/gdb.pie/attach.exp
|
||||
new file mode 100644
|
||||
index 0000000000..648c92608c
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.pie/attach.exp
|
||||
@@ -0,0 +1,416 @@
|
||||
+# Copyright 1997, 1999, 2002 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -820,10 +474,193 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/attach.exp
|
||||
+do_call_attach_tests
|
||||
+
|
||||
+return 0
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/break.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/break.exp 2016-02-15 23:37:15.191560055 +0100
|
||||
diff --git a/gdb/testsuite/gdb.pie/attach2.c b/gdb/testsuite/gdb.pie/attach2.c
|
||||
new file mode 100644
|
||||
index 0000000000..a78037ed38
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.pie/attach2.c
|
||||
@@ -0,0 +1,24 @@
|
||||
+/* This program is intended to be started outside of gdb, and then
|
||||
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
||||
+ is exited when & if the variable 'should_exit' is non-zero. (It
|
||||
+ is initialized to zero in this program, so the loop will never
|
||||
+ exit unless/until gdb sets the variable to non-zero.)
|
||||
+ */
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+int should_exit = 0;
|
||||
+
|
||||
+int main ()
|
||||
+{
|
||||
+ int local_i = 0;
|
||||
+
|
||||
+ sleep( 10 ); /* System call causes register fetch to fail */
|
||||
+ /* This is a known HPUX "feature" */
|
||||
+ while (! should_exit)
|
||||
+ {
|
||||
+ local_i++;
|
||||
+ }
|
||||
+ return (0);
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.pie/break.c b/gdb/testsuite/gdb.pie/break.c
|
||||
new file mode 100644
|
||||
index 0000000000..bf398fcca9
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.pie/break.c
|
||||
@@ -0,0 +1,146 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 1992, 1993, 1994, 1995, 1999, 2002, 2003 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.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@prep.ai.mit.edu */
|
||||
+
|
||||
+#ifdef vxworks
|
||||
+
|
||||
+# include <stdio.h>
|
||||
+
|
||||
+/* VxWorks does not supply atoi. */
|
||||
+static int
|
||||
+atoi (z)
|
||||
+ char *z;
|
||||
+{
|
||||
+ int i = 0;
|
||||
+
|
||||
+ while (*z >= '0' && *z <= '9')
|
||||
+ i = i * 10 + (*z++ - '0');
|
||||
+ return i;
|
||||
+}
|
||||
+
|
||||
+/* I don't know of any way to pass an array to VxWorks. This function
|
||||
+ can be called directly from gdb. */
|
||||
+
|
||||
+vxmain (arg)
|
||||
+char *arg;
|
||||
+{
|
||||
+ char *argv[2];
|
||||
+
|
||||
+ argv[0] = "";
|
||||
+ argv[1] = arg;
|
||||
+ main (2, argv, (char **) 0);
|
||||
+}
|
||||
+
|
||||
+#else /* ! vxworks */
|
||||
+# include <stdio.h>
|
||||
+# include <stdlib.h>
|
||||
+#endif /* ! vxworks */
|
||||
+
|
||||
+#ifdef PROTOTYPES
|
||||
+extern int marker1 (void);
|
||||
+extern int marker2 (int a);
|
||||
+extern void marker3 (char *a, char *b);
|
||||
+extern void marker4 (long d);
|
||||
+#else
|
||||
+extern int marker1 ();
|
||||
+extern int marker2 ();
|
||||
+extern void marker3 ();
|
||||
+extern void marker4 ();
|
||||
+#endif
|
||||
+
|
||||
+/*
|
||||
+ * This simple classical example of recursion is useful for
|
||||
+ * testing stack backtraces and such.
|
||||
+ */
|
||||
+
|
||||
+#ifdef PROTOTYPES
|
||||
+int factorial(int);
|
||||
+
|
||||
+int
|
||||
+main (int argc, char **argv, char **envp)
|
||||
+#else
|
||||
+int
|
||||
+main (argc, argv, envp)
|
||||
+int argc;
|
||||
+char *argv[], **envp;
|
||||
+#endif
|
||||
+{
|
||||
+#ifdef usestubs
|
||||
+ set_debug_traps(); /* set breakpoint 5 here */
|
||||
+ breakpoint();
|
||||
+#endif
|
||||
+ if (argc == 12345) { /* an unlikely value < 2^16, in case uninited */ /* set breakpoint 6 here */
|
||||
+ fprintf (stderr, "usage: factorial <number>\n");
|
||||
+ return 1;
|
||||
+ }
|
||||
+ printf ("%d\n", factorial (atoi ("6"))); /* set breakpoint 1 here */
|
||||
+ /* set breakpoint 12 here */
|
||||
+ marker1 (); /* set breakpoint 11 here */
|
||||
+ marker2 (43); /* set breakpoint 20 here */
|
||||
+ marker3 ("stack", "trace"); /* set breakpoint 21 here */
|
||||
+ marker4 (177601976L);
|
||||
+ argc = (argc == 12345); /* This is silly, but we can step off of it */ /* set breakpoint 2 here */
|
||||
+ return argc; /* set breakpoint 10 here */
|
||||
+}
|
||||
+
|
||||
+#ifdef PROTOTYPES
|
||||
+int factorial (int value)
|
||||
+#else
|
||||
+int factorial (value)
|
||||
+int value;
|
||||
+#endif
|
||||
+{
|
||||
+ if (value > 1) { /* set breakpoint 7 here */
|
||||
+ value *= factorial (value - 1);
|
||||
+ }
|
||||
+ return (value); /* set breakpoint 19 here */
|
||||
+}
|
||||
+
|
||||
+#ifdef PROTOTYPES
|
||||
+int multi_line_if_conditional (int a, int b, int c)
|
||||
+#else
|
||||
+int multi_line_if_conditional (a, b, c)
|
||||
+ int a, b, c;
|
||||
+#endif
|
||||
+{
|
||||
+ if (a /* set breakpoint 3 here */
|
||||
+ && b
|
||||
+ && c)
|
||||
+ return 0;
|
||||
+ else
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+#ifdef PROTOTYPES
|
||||
+int multi_line_while_conditional (int a, int b, int c)
|
||||
+#else
|
||||
+int multi_line_while_conditional (a, b, c)
|
||||
+ int a, b, c;
|
||||
+#endif
|
||||
+{
|
||||
+ while (a /* set breakpoint 4 here */
|
||||
+ && b
|
||||
+ && c)
|
||||
+ {
|
||||
+ a--, b--, c--;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.pie/break.exp b/gdb/testsuite/gdb.pie/break.exp
|
||||
new file mode 100644
|
||||
index 0000000000..97b87397c2
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.pie/break.exp
|
||||
@@ -0,0 +1,954 @@
|
||||
+# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
+# 2000, 2002, 2003, 2004
|
||||
@ -1779,10 +1616,61 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/break.exp
|
||||
+ send_gdb "set args main\n"
|
||||
+ gdb_expect -re ".*$gdb_prompt $" {}
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/corefile.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/corefile.exp 2016-02-15 23:37:15.191560055 +0100
|
||||
diff --git a/gdb/testsuite/gdb.pie/break1.c b/gdb/testsuite/gdb.pie/break1.c
|
||||
new file mode 100644
|
||||
index 0000000000..2ed8b2a4a0
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.pie/break1.c
|
||||
@@ -0,0 +1,44 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 1992, 1993, 1994, 1995, 1999, 2002, 2003 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.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@prep.ai.mit.edu */
|
||||
+
|
||||
+/* The code for this file was extracted from the gdb testsuite
|
||||
+ testcase "break.c". */
|
||||
+
|
||||
+/* The following functions do nothing useful. They are included
|
||||
+ simply as places to try setting breakpoints at. They are
|
||||
+ explicitly "one-line functions" to verify that this case works
|
||||
+ (some versions of gcc have or have had problems with this).
|
||||
+
|
||||
+ These functions are in a separate source file to prevent an
|
||||
+ optimizing compiler from inlining them and optimizing them away. */
|
||||
+
|
||||
+#ifdef PROTOTYPES
|
||||
+int marker1 (void) { return (0); } /* set breakpoint 15 here */
|
||||
+int marker2 (int a) { return (1); } /* set breakpoint 8 here */
|
||||
+void marker3 (char *a, char *b) {} /* set breakpoint 17 here */
|
||||
+void marker4 (long d) {} /* set breakpoint 14 here */
|
||||
+#else
|
||||
+int marker1 () { return (0); } /* set breakpoint 16 here */
|
||||
+int marker2 (a) int a; { return (1); } /* set breakpoint 9 here */
|
||||
+void marker3 (a, b) char *a, *b; {} /* set breakpoint 18 here */
|
||||
+void marker4 (d) long d; {} /* set breakpoint 13 here */
|
||||
+#endif
|
||||
diff --git a/gdb/testsuite/gdb.pie/corefile.exp b/gdb/testsuite/gdb.pie/corefile.exp
|
||||
new file mode 100644
|
||||
index 0000000000..ca4b01be3e
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.pie/corefile.exp
|
||||
@@ -0,0 +1,233 @@
|
||||
+# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
|
||||
+# Free Software Foundation, Inc.
|
||||
@ -2017,3 +1905,154 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/corefile.exp
|
||||
+gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(.*\\).*" "up in corefile.exp (reinit)"
|
||||
+
|
||||
+gdb_test "core" "No core file now."
|
||||
diff --git a/gdb/testsuite/gdb.pie/coremaker.c b/gdb/testsuite/gdb.pie/coremaker.c
|
||||
new file mode 100644
|
||||
index 0000000000..a7fbd94141
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.pie/coremaker.c
|
||||
@@ -0,0 +1,142 @@
|
||||
+/* Copyright 1992, 1993, 1994, 1995, 1996, 1999
|
||||
+ 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 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. */
|
||||
+
|
||||
+/* Simple little program that just generates a core dump from inside some
|
||||
+ nested function calls. */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <fcntl.h>
|
||||
+#include <sys/mman.h>
|
||||
+#include <signal.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+#ifndef __STDC__
|
||||
+#define const /**/
|
||||
+#endif
|
||||
+
|
||||
+#define MAPSIZE (8 * 1024)
|
||||
+
|
||||
+/* Don't make these automatic vars or we will have to walk back up the
|
||||
+ stack to access them. */
|
||||
+
|
||||
+char *buf1;
|
||||
+char *buf2;
|
||||
+
|
||||
+int coremaker_data = 1; /* In Data section */
|
||||
+int coremaker_bss; /* In BSS section */
|
||||
+
|
||||
+const int coremaker_ro = 201; /* In Read-Only Data section */
|
||||
+
|
||||
+/* Note that if the mapping fails for any reason, we set buf2
|
||||
+ to -1 and the testsuite notices this and reports it as
|
||||
+ a failure due to a mapping error. This way we don't have
|
||||
+ to test for specific errors when running the core maker. */
|
||||
+
|
||||
+void
|
||||
+mmapdata ()
|
||||
+{
|
||||
+ int j, fd;
|
||||
+
|
||||
+ /* Allocate and initialize a buffer that will be used to write
|
||||
+ the file that is later mapped in. */
|
||||
+
|
||||
+ buf1 = (char *) malloc (MAPSIZE);
|
||||
+ for (j = 0; j < MAPSIZE; ++j)
|
||||
+ {
|
||||
+ buf1[j] = j;
|
||||
+ }
|
||||
+
|
||||
+ /* Write the file to map in */
|
||||
+
|
||||
+ fd = open ("coremmap.data", O_CREAT | O_RDWR, 0666);
|
||||
+ if (fd == -1)
|
||||
+ {
|
||||
+ perror ("coremmap.data open failed");
|
||||
+ buf2 = (char *) -1;
|
||||
+ return;
|
||||
+ }
|
||||
+ write (fd, buf1, MAPSIZE);
|
||||
+
|
||||
+ /* Now map the file into our address space as buf2 */
|
||||
+
|
||||
+ buf2 = (char *) mmap (0, MAPSIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
|
||||
+ if (buf2 == (char *) -1)
|
||||
+ {
|
||||
+ perror ("mmap failed");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ /* Verify that the original data and the mapped data are identical.
|
||||
+ If not, we'd rather fail now than when trying to access the mapped
|
||||
+ data from the core file. */
|
||||
+
|
||||
+ for (j = 0; j < MAPSIZE; ++j)
|
||||
+ {
|
||||
+ if (buf1[j] != buf2[j])
|
||||
+ {
|
||||
+ fprintf (stderr, "mapped data is incorrect");
|
||||
+ buf2 = (char *) -1;
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+func2 ()
|
||||
+{
|
||||
+ int coremaker_local[5];
|
||||
+ int i;
|
||||
+
|
||||
+#ifdef SA_FULLDUMP
|
||||
+ /* Force a corefile that includes the data section for AIX. */
|
||||
+ {
|
||||
+ struct sigaction sa;
|
||||
+
|
||||
+ sigaction (SIGABRT, (struct sigaction *)0, &sa);
|
||||
+ sa.sa_flags |= SA_FULLDUMP;
|
||||
+ sigaction (SIGABRT, &sa, (struct sigaction *)0);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+ /* Make sure that coremaker_local doesn't get optimized away. */
|
||||
+ for (i = 0; i < 5; i++)
|
||||
+ coremaker_local[i] = i;
|
||||
+ coremaker_bss = 0;
|
||||
+ for (i = 0; i < 5; i++)
|
||||
+ coremaker_bss += coremaker_local[i];
|
||||
+ coremaker_data = coremaker_ro + 1;
|
||||
+ abort ();
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+func1 ()
|
||||
+{
|
||||
+ func2 ();
|
||||
+}
|
||||
+
|
||||
+int main ()
|
||||
+{
|
||||
+ mmapdata ();
|
||||
+ func1 ();
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
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-self-20050110.patch
|
||||
|
||||
FileName: gdb-6.3-test-self-20050110.patch
|
||||
|
||||
;; Get selftest working with sep-debug-info
|
||||
;;=fedoratest
|
||||
|
||||
2004-02-23 Elena Zannoni <ezannoni@redhat.com>
|
||||
|
||||
* gdb.gdb/selftest.exp: Make sure that the debug directory is
|
||||
@ -5,12 +15,15 @@
|
||||
* gdb.gdb/complaints.exp: Ditto.
|
||||
* gdb.gdb/xfullpath.exp: Ditto.
|
||||
* gdb.gdb/observer.exp: Ditto.
|
||||
---
|
||||
gdb/testsuite/lib/selftest-support.exp | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
Index: gdb-7.6.90.20140127/gdb/testsuite/lib/selftest-support.exp
|
||||
===================================================================
|
||||
--- gdb-7.6.90.20140127.orig/gdb/testsuite/lib/selftest-support.exp 2014-01-27 22:42:04.022535966 +0100
|
||||
+++ gdb-7.6.90.20140127/gdb/testsuite/lib/selftest-support.exp 2014-01-27 22:42:42.630565675 +0100
|
||||
@@ -136,18 +136,18 @@ proc do_self_tests {function body} {
|
||||
diff --git a/gdb/testsuite/lib/selftest-support.exp b/gdb/testsuite/lib/selftest-support.exp
|
||||
index 89e2e3f4ef..ea027a6f7d 100644
|
||||
--- a/gdb/testsuite/lib/selftest-support.exp
|
||||
+++ b/gdb/testsuite/lib/selftest-support.exp
|
||||
@@ -156,18 +156,18 @@ proc do_self_tests {function body} {
|
||||
}
|
||||
|
||||
# Remove any old copy lying around.
|
||||
@ -33,3 +46,6 @@ Index: gdb-7.6.90.20140127/gdb/testsuite/lib/selftest-support.exp
|
||||
|
||||
if {$result < 0} then {
|
||||
warning "Couldn't test self"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
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
|
||||
|
||||
FileName: 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
|
||||
@ -41,11 +51,18 @@
|
||||
testcase of the same name. ]
|
||||
|
||||
FIXME: The testcase does not expects multiple watchpoints hits per one stop.
|
||||
---
|
||||
gdb/testsuite/gdb.threads/watchthreads-threaded.c | 66 +++++++++++
|
||||
.../gdb.threads/watchthreads-threaded.exp | 126 +++++++++++++++++++++
|
||||
2 files changed, 192 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.threads/watchthreads-threaded.c
|
||||
create mode 100644 gdb/testsuite/gdb.threads/watchthreads-threaded.exp
|
||||
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/watchthreads-threaded.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/watchthreads-threaded.c 2016-02-15 23:37:39.766734541 +0100
|
||||
diff --git a/gdb/testsuite/gdb.threads/watchthreads-threaded.c b/gdb/testsuite/gdb.threads/watchthreads-threaded.c
|
||||
new file mode 100644
|
||||
index 0000000000..1402640ccf
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/watchthreads-threaded.c
|
||||
@@ -0,0 +1,66 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -113,10 +130,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/watchthreads-threaded.c
|
||||
+ pthread_exit(NULL);
|
||||
+}
|
||||
+
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/watchthreads-threaded.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/watchthreads-threaded.exp 2016-02-15 23:40:32.484960858 +0100
|
||||
diff --git a/gdb/testsuite/gdb.threads/watchthreads-threaded.exp b/gdb/testsuite/gdb.threads/watchthreads-threaded.exp
|
||||
new file mode 100644
|
||||
index 0000000000..e9cdd59771
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/watchthreads-threaded.exp
|
||||
@@ -0,0 +1,126 @@
|
||||
+# This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -244,3 +262,6 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/watchthreads-threaded.exp
|
||||
+} else {
|
||||
+ fail $message
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,7 +1,28 @@
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.c 2016-02-15 23:37:39.884735379 +0100
|
||||
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.5-BEA-testsuite.patch
|
||||
|
||||
FileName: gdb-6.5-BEA-testsuite.patch
|
||||
|
||||
;; Improved testsuite results by the testsuite provided by the courtesy of BEA.
|
||||
;;=fedoratest: For upstream it should be rewritten as a dejagnu test, the test of no "??" was useful.
|
||||
---
|
||||
gdb/testsuite/gdb.threads/threadcrash.c | 301 ++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.threads/threadcrash.exp | 37 +++
|
||||
gdb/testsuite/gdb.threads/threadcrash.sh | 324 ++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.threads/threadcrash.sh-orig | 248 ++++++++++++++++++++
|
||||
4 files changed, 910 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.threads/threadcrash.c
|
||||
create mode 100644 gdb/testsuite/gdb.threads/threadcrash.exp
|
||||
create mode 100644 gdb/testsuite/gdb.threads/threadcrash.sh
|
||||
create mode 100644 gdb/testsuite/gdb.threads/threadcrash.sh-orig
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.threads/threadcrash.c b/gdb/testsuite/gdb.threads/threadcrash.c
|
||||
new file mode 100644
|
||||
index 0000000000..80c599d0fb
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/threadcrash.c
|
||||
@@ -0,0 +1,301 @@
|
||||
+/*
|
||||
+ * The point of this program is to crash in a multi-threaded app.
|
||||
@ -304,10 +325,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.exp 2016-02-15 23:38:58.486293458 +0100
|
||||
diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp
|
||||
new file mode 100644
|
||||
index 0000000000..af6b919f58
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/threadcrash.exp
|
||||
@@ -0,0 +1,37 @@
|
||||
+# threadcrash.exp - The point of this program is to crash in a multi-threaded app.
|
||||
+
|
||||
@ -346,10 +368,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.exp
|
||||
+}
|
||||
+
|
||||
+return 0
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.sh
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.sh 2016-02-15 23:37:39.885735386 +0100
|
||||
diff --git a/gdb/testsuite/gdb.threads/threadcrash.sh b/gdb/testsuite/gdb.threads/threadcrash.sh
|
||||
new file mode 100644
|
||||
index 0000000000..7f7e6520d6
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/threadcrash.sh
|
||||
@@ -0,0 +1,324 @@
|
||||
+#! /bin/bash
|
||||
+
|
||||
@ -675,10 +698,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.sh
|
||||
+rm -rf $WORKDIR
|
||||
+
|
||||
+exit $FAILURES
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.sh-orig
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.sh-orig 2016-02-15 23:37:39.885735386 +0100
|
||||
diff --git a/gdb/testsuite/gdb.threads/threadcrash.sh-orig b/gdb/testsuite/gdb.threads/threadcrash.sh-orig
|
||||
new file mode 100644
|
||||
index 0000000000..eb602036c2
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/threadcrash.sh-orig
|
||||
@@ -0,0 +1,248 @@
|
||||
+#! /bin/bash
|
||||
+
|
||||
@ -928,3 +952,6 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.sh-orig
|
||||
+rm -rf $WORKDIR
|
||||
+
|
||||
+exit $FAILURES
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.5-bz109921-DW_AT_decl_file-test.patch
|
||||
|
||||
FileName: gdb-6.5-bz109921-DW_AT_decl_file-test.patch
|
||||
|
||||
;; Find symbols properly at their original (included) file (BZ 109921).
|
||||
;;=fedoratest
|
||||
|
||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
|
||||
|
||||
It is duplicite to its upstream variant:
|
||||
@ -15,11 +25,20 @@ http://sourceware.org/ml/gdb-patches/2007-01/msg00434.html
|
||||
|
||||
* gdb.dwarf2/dw2-included.exp, gdb.dwarf2/dw2-included.c,
|
||||
gdb.dwarf2/dw2-included.h: New files.
|
||||
---
|
||||
gdb/testsuite/gdb.dwarf2/dw2-included.c | 26 +++++++++++++++++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-included.exp | 47 +++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-included.h | 20 +++++++++++++
|
||||
3 files changed, 93 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-included.c
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-included.exp
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-included.h
|
||||
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.c 2016-02-16 09:52:29.861247534 +0100
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-included.c b/gdb/testsuite/gdb.dwarf2/dw2-included.c
|
||||
new file mode 100644
|
||||
index 0000000000..28e54fb932
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-included.c
|
||||
@@ -0,0 +1,26 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -47,10 +66,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.c
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.exp 2016-02-16 09:52:36.481292330 +0100
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-included.exp b/gdb/testsuite/gdb.dwarf2/dw2-included.exp
|
||||
new file mode 100644
|
||||
index 0000000000..9aaf8e9772
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-included.exp
|
||||
@@ -0,0 +1,47 @@
|
||||
+# Copyright 2006 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -99,10 +119,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.exp
|
||||
+gdb_test "ptype integer" "type = int\r"
|
||||
+# Path varies depending on the build location.
|
||||
+gdb_test "info variables integer" "\r\nFile \[^\r\n\]*/gdb.dwarf2/dw2-included.h:\r\nint integer;\r"
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.h 2016-02-16 09:52:29.862247541 +0100
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-included.h b/gdb/testsuite/gdb.dwarf2/dw2-included.h
|
||||
new file mode 100644
|
||||
index 0000000000..f31348ab4f
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-included.h
|
||||
@@ -0,0 +1,20 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -124,3 +145,6 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.h
|
||||
+ USA. */
|
||||
+
|
||||
+int integer;
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
|
||||
|
||||
FileName: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
|
||||
|
||||
;; Support TLS symbols (+`errno' suggestion if no pthread is found) (BZ 185337).
|
||||
;;=push+jan: It should be replaced by Infinity project.
|
||||
|
||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=185337
|
||||
|
||||
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
@ -24,7 +34,6 @@ call invalidates `struct frame *' in the callers - RH BZ 690908.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1166549
|
||||
|
||||
|
||||
2007-11-03 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* ./gdb/dwarf2read.c (read_partial_die, dwarf2_linkage_name): Prefer
|
||||
@ -33,12 +42,23 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1166549
|
||||
glibc-debuginfo-2.7-2.x86_64: /usr/lib/debug/lib64/libc.so.6.debug:
|
||||
<81a2> DW_AT_name : (indirect string, offset: 0x280e): __errno_location
|
||||
<81a8> DW_AT_MIPS_linkage_name: (indirect string, offset: 0x2808): *__GI___errno_location
|
||||
---
|
||||
gdb/printcmd.c | 4 ++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-errno.c | 28 +++++++++++++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-errno.exp | 60 ++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-errno2.c | 28 +++++++++++++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-errno2.exp | 71 +++++++++++++++++++++++++++++++++
|
||||
5 files changed, 191 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-errno2.c
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-errno2.exp
|
||||
|
||||
Index: gdb-7.12.50.20170207/gdb/printcmd.c
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170207.orig/gdb/printcmd.c 2017-02-07 21:06:20.196593884 +0100
|
||||
+++ gdb-7.12.50.20170207/gdb/printcmd.c 2017-02-07 21:07:10.230973906 +0100
|
||||
@@ -1258,6 +1258,10 @@
|
||||
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
|
||||
index c52e39f7fc..ad80b1bebf 100644
|
||||
--- a/gdb/printcmd.c
|
||||
+++ b/gdb/printcmd.c
|
||||
@@ -1210,6 +1210,10 @@ print_command_1 (const char *exp, int voidprint)
|
||||
|
||||
if (exp && *exp)
|
||||
{
|
||||
@ -49,10 +69,11 @@ Index: gdb-7.12.50.20170207/gdb/printcmd.c
|
||||
expression_up expr = parse_expression (exp);
|
||||
val = evaluate_expression (expr.get ());
|
||||
}
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno.c 2017-02-07 21:06:20.196593884 +0100
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno.c b/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
||||
new file mode 100644
|
||||
index 0000000000..7bd10d0978
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -82,10 +103,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
||||
+
|
||||
+ return 0; /* breakpoint */
|
||||
+}
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno.exp 2017-02-07 21:06:20.196593884 +0100
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno.exp b/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
||||
new file mode 100644
|
||||
index 0000000000..1f13cc1323
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
||||
@@ -0,0 +1,60 @@
|
||||
+# Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -147,10 +169,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
||||
+
|
||||
+# TODO: Test the error on resolving ERRNO with only libc loaded.
|
||||
+# Just how to find the current libc filename?
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno2.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno2.c 2017-02-07 21:06:20.196593884 +0100
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno2.c b/gdb/testsuite/gdb.dwarf2/dw2-errno2.c
|
||||
new file mode 100644
|
||||
index 0000000000..7bd10d0978
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno2.c
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -180,10 +203,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno2.c
|
||||
+
|
||||
+ return 0; /* breakpoint */
|
||||
+}
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp 2017-02-07 21:06:20.197593892 +0100
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp b/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp
|
||||
new file mode 100644
|
||||
index 0000000000..0f6e66870b
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp
|
||||
@@ -0,0 +1,71 @@
|
||||
+# Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -225,7 +249,7 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp
|
||||
+ if $do_xfail {
|
||||
+ setup_xfail "*-*-*"
|
||||
+ }
|
||||
+ gdb_test "print errno" ".* = 42" "print errno for core"
|
||||
+ gdb_test "print (int) errno" ".* = 42" "print errno for core"
|
||||
+}}
|
||||
+
|
||||
+set variant g2thrN
|
||||
@ -256,3 +280,6 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp
|
||||
+
|
||||
+# TODO: Test the error on resolving ERRNO with only libc loaded.
|
||||
+# Just how to find the current libc filename?
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,8 +1,21 @@
|
||||
Index: gdb-7.4.50.20120602/gdb/symfile.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/symfile.c 2012-06-02 18:25:20.000000000 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/symfile.c 2012-06-02 18:26:36.145232057 +0200
|
||||
@@ -3630,6 +3630,12 @@ default_symfile_relocate (struct objfile
|
||||
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.5-bz203661-emit-relocs.patch
|
||||
|
||||
FileName: gdb-6.5-bz203661-emit-relocs.patch
|
||||
|
||||
;; Fix debuginfo addresses resolving for --emit-relocs Linux kernels (BZ 203661).
|
||||
;;=push+jan: There was some mail thread about it, this patch may be a hack.
|
||||
---
|
||||
gdb/symfile.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/gdb/symfile.c b/gdb/symfile.c
|
||||
index f7f75b05d3..7cda615e74 100644
|
||||
--- a/gdb/symfile.c
|
||||
+++ b/gdb/symfile.c
|
||||
@@ -3629,6 +3629,12 @@ default_symfile_relocate (struct objfile *objfile, asection *sectp,
|
||||
DWO file. */
|
||||
bfd *abfd = sectp->owner;
|
||||
|
||||
@ -15,3 +28,6 @@ Index: gdb-7.4.50.20120602/gdb/symfile.c
|
||||
/* We're only interested in sections with relocation
|
||||
information. */
|
||||
if ((sectp->flags & SEC_RELOC) == 0)
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.5-bz216711-clone-is-outermost.patch
|
||||
|
||||
FileName: gdb-6.5-bz216711-clone-is-outermost.patch
|
||||
|
||||
;; Fix bogus 0x0 unwind of the thread's topmost function clone(3) (BZ 216711).
|
||||
;;=fedora
|
||||
|
||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=216711
|
||||
|
||||
FIXME: This workaround should be dropped and
|
||||
@ -22,12 +32,22 @@ instead.
|
||||
2007-10-16 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Port to GDB-6.7.
|
||||
---
|
||||
gdb/amd64-linux-tdep.c | 76 +++++++++++++++++++++++++++++
|
||||
gdb/amd64-tdep.c | 11 +++++
|
||||
gdb/i386-tdep.c | 3 ++
|
||||
gdb/i386-tdep.h | 3 ++
|
||||
gdb/testsuite/gdb.threads/bt-clone-stop.c | 39 +++++++++++++++
|
||||
gdb/testsuite/gdb.threads/bt-clone-stop.exp | 61 +++++++++++++++++++++++
|
||||
6 files changed, 193 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.threads/bt-clone-stop.c
|
||||
create mode 100644 gdb/testsuite/gdb.threads/bt-clone-stop.exp
|
||||
|
||||
Index: gdb-7.10.90.20160211/gdb/amd64-linux-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/amd64-linux-tdep.c 2016-02-15 23:37:06.936501443 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/amd64-linux-tdep.c 2016-02-15 23:37:39.928735691 +0100
|
||||
@@ -292,6 +292,80 @@
|
||||
diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
|
||||
index 2bd3d31b75..2623bae42d 100644
|
||||
--- a/gdb/amd64-linux-tdep.c
|
||||
+++ b/gdb/amd64-linux-tdep.c
|
||||
@@ -291,6 +291,80 @@ amd64_linux_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
|
||||
|
||||
/* Set the program counter for process PTID to PC. */
|
||||
|
||||
@ -108,7 +128,7 @@ Index: gdb-7.10.90.20160211/gdb/amd64-linux-tdep.c
|
||||
static void
|
||||
amd64_linux_write_pc (struct regcache *regcache, CORE_ADDR pc)
|
||||
{
|
||||
@@ -1800,6 +1874,8 @@
|
||||
@@ -1807,6 +1881,8 @@ amd64_linux_init_abi_common(struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
|
||||
tdep->xsave_xcr0_offset = I386_LINUX_XSAVE_XCR0_OFFSET;
|
||||
|
||||
@ -117,11 +137,11 @@ Index: gdb-7.10.90.20160211/gdb/amd64-linux-tdep.c
|
||||
/* Add the %orig_rax register used for syscall restarting. */
|
||||
set_gdbarch_write_pc (gdbarch, amd64_linux_write_pc);
|
||||
|
||||
Index: gdb-7.10.90.20160211/gdb/amd64-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/amd64-tdep.c 2016-02-15 23:37:06.936501443 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/amd64-tdep.c 2016-02-15 23:37:39.929735698 +0100
|
||||
@@ -2494,6 +2494,7 @@
|
||||
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
|
||||
index 7b2851f0a6..7c70792b3f 100644
|
||||
--- a/gdb/amd64-tdep.c
|
||||
+++ b/gdb/amd64-tdep.c
|
||||
@@ -2595,6 +2595,7 @@ amd64_frame_unwind_stop_reason (struct frame_info *this_frame,
|
||||
{
|
||||
struct amd64_frame_cache *cache =
|
||||
amd64_frame_cache (this_frame, this_cache);
|
||||
@ -129,7 +149,7 @@ Index: gdb-7.10.90.20160211/gdb/amd64-tdep.c
|
||||
|
||||
if (!cache->base_p)
|
||||
return UNWIND_UNAVAILABLE;
|
||||
@@ -2502,6 +2503,10 @@
|
||||
@@ -2603,6 +2604,10 @@ amd64_frame_unwind_stop_reason (struct frame_info *this_frame,
|
||||
if (cache->base == 0)
|
||||
return UNWIND_OUTERMOST;
|
||||
|
||||
@ -140,7 +160,7 @@ Index: gdb-7.10.90.20160211/gdb/amd64-tdep.c
|
||||
return UNWIND_NO_REASON;
|
||||
}
|
||||
|
||||
@@ -2636,6 +2641,7 @@
|
||||
@@ -2737,6 +2742,7 @@ amd64_sigtramp_frame_this_id (struct frame_info *this_frame,
|
||||
{
|
||||
struct amd64_frame_cache *cache =
|
||||
amd64_sigtramp_frame_cache (this_frame, this_cache);
|
||||
@ -148,7 +168,7 @@ Index: gdb-7.10.90.20160211/gdb/amd64-tdep.c
|
||||
|
||||
if (!cache->base_p)
|
||||
(*this_id) = frame_id_build_unavailable_stack (get_frame_pc (this_frame));
|
||||
@@ -2644,6 +2650,11 @@
|
||||
@@ -2745,6 +2751,11 @@ amd64_sigtramp_frame_this_id (struct frame_info *this_frame,
|
||||
/* This marks the outermost frame. */
|
||||
return;
|
||||
}
|
||||
@ -160,11 +180,11 @@ Index: gdb-7.10.90.20160211/gdb/amd64-tdep.c
|
||||
else
|
||||
(*this_id) = frame_id_build (cache->base + 16, get_frame_pc (this_frame));
|
||||
}
|
||||
Index: gdb-7.10.90.20160211/gdb/i386-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/i386-tdep.c 2016-02-15 23:37:06.936501443 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/i386-tdep.c 2016-02-15 23:37:39.931735713 +0100
|
||||
@@ -8305,6 +8305,9 @@
|
||||
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
|
||||
index 9ce329eb20..d1b461b538 100644
|
||||
--- a/gdb/i386-tdep.c
|
||||
+++ b/gdb/i386-tdep.c
|
||||
@@ -8401,6 +8401,9 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
|
||||
tdep->xsave_xcr0_offset = -1;
|
||||
|
||||
@ -174,11 +194,11 @@ Index: gdb-7.10.90.20160211/gdb/i386-tdep.c
|
||||
tdep->record_regmap = i386_record_regmap;
|
||||
|
||||
set_gdbarch_long_long_align_bit (gdbarch, 32);
|
||||
Index: gdb-7.10.90.20160211/gdb/i386-tdep.h
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/i386-tdep.h 2016-02-15 23:37:06.936501443 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/i386-tdep.h 2016-02-15 23:37:39.932735720 +0100
|
||||
@@ -240,6 +240,9 @@
|
||||
diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h
|
||||
index a71c103a88..5ee336b8cb 100644
|
||||
--- a/gdb/i386-tdep.h
|
||||
+++ b/gdb/i386-tdep.h
|
||||
@@ -251,6 +251,9 @@ struct gdbarch_tdep
|
||||
|
||||
/* Regsets. */
|
||||
const struct regset *fpregset;
|
||||
@ -188,10 +208,11 @@ Index: gdb-7.10.90.20160211/gdb/i386-tdep.h
|
||||
};
|
||||
|
||||
/* Floating-point registers. */
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/bt-clone-stop.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/bt-clone-stop.c 2016-02-15 23:37:39.932735720 +0100
|
||||
diff --git a/gdb/testsuite/gdb.threads/bt-clone-stop.c b/gdb/testsuite/gdb.threads/bt-clone-stop.c
|
||||
new file mode 100644
|
||||
index 0000000000..2ac93f8664
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/bt-clone-stop.c
|
||||
@@ -0,0 +1,39 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -232,10 +253,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/bt-clone-stop.c
|
||||
+ for (;;)
|
||||
+ pause();
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/bt-clone-stop.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/bt-clone-stop.exp 2016-02-15 23:37:56.197851204 +0100
|
||||
diff --git a/gdb/testsuite/gdb.threads/bt-clone-stop.exp b/gdb/testsuite/gdb.threads/bt-clone-stop.exp
|
||||
new file mode 100644
|
||||
index 0000000000..02728e05b9
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/bt-clone-stop.exp
|
||||
@@ -0,0 +1,61 @@
|
||||
+# Copyright 2006 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -298,3 +320,6 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/bt-clone-stop.exp
|
||||
+ pass "0x0 entry not found"
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,10 +1,60 @@
|
||||
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.5-bz218379-ppc-solib-trampoline-test.patch
|
||||
|
||||
FileName: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
|
||||
|
||||
;; Test sideeffects of skipping ppc .so libs trampolines (BZ 218379).
|
||||
;;=fedoratest
|
||||
|
||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
|
||||
---
|
||||
gdb/testsuite/gdb.base/step-over-trampoline.c | 28 +++++++++++++
|
||||
gdb/testsuite/gdb.base/step-over-trampoline.exp | 54 +++++++++++++++++++++++++
|
||||
2 files changed, 82 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/step-over-trampoline.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/step-over-trampoline.exp
|
||||
|
||||
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/step-over-trampoline.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/step-over-trampoline.exp 2016-02-15 23:31:47.312232078 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/step-over-trampoline.c b/gdb/testsuite/gdb.base/step-over-trampoline.c
|
||||
new file mode 100644
|
||||
index 0000000000..a012da1031
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/step-over-trampoline.c
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2006 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.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@prep.ai.mit.edu */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+int main (void)
|
||||
+{
|
||||
+ puts ("hello world");
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/step-over-trampoline.exp b/gdb/testsuite/gdb.base/step-over-trampoline.exp
|
||||
new file mode 100644
|
||||
index 0000000000..a183e36263
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/step-over-trampoline.exp
|
||||
@@ -0,0 +1,54 @@
|
||||
+# Copyright 2006 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -60,36 +110,6 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/step-over-trampoline.exp
|
||||
+ fail "stepped into trampoline"
|
||||
+ }
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/step-over-trampoline.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/step-over-trampoline.c 2016-02-15 23:30:54.698858518 +0100
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2006 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.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@prep.ai.mit.edu */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+int main (void)
|
||||
+{
|
||||
+ puts ("hello world");
|
||||
+ return 0;
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,11 +1,23 @@
|
||||
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.5-bz218379-solib-trampoline-lookup-lock-fix.patch
|
||||
|
||||
FileName: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
|
||||
|
||||
;; Fix lockup on trampoline vs. its function lookup; unreproducible (BZ 218379).
|
||||
;;=fedora
|
||||
|
||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
|
||||
---
|
||||
gdb/symtab.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
|
||||
Index: gdb-7.7.90.20140613/gdb/symtab.c
|
||||
===================================================================
|
||||
--- gdb-7.7.90.20140613.orig/gdb/symtab.c 2014-06-13 21:52:06.219338401 +0200
|
||||
+++ gdb-7.7.90.20140613/gdb/symtab.c 2014-06-13 21:55:02.753531885 +0200
|
||||
@@ -2394,6 +2394,13 @@ find_pc_sect_line (CORE_ADDR pc, struct
|
||||
diff --git a/gdb/symtab.c b/gdb/symtab.c
|
||||
index 81f4fc9ec5..a7e8431cfe 100644
|
||||
--- a/gdb/symtab.c
|
||||
+++ b/gdb/symtab.c
|
||||
@@ -3166,6 +3166,13 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
|
||||
SYMBOL_LINKAGE_NAME (msymbol)); */
|
||||
;
|
||||
/* fall through */
|
||||
@ -19,3 +31,6 @@ Index: gdb-7.7.90.20140613/gdb/symtab.c
|
||||
else
|
||||
return find_pc_line (BMSYMBOL_VALUE_ADDRESS (mfunsym), 0);
|
||||
}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,6 +1,22 @@
|
||||
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.base/tracefork-zombie.exp gdb-6.3/gdb/testsuite/gdb.base/tracefork-zombie.exp
|
||||
--- gdb-6.3-unpatched/gdb/testsuite/gdb.base/tracefork-zombie.exp 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ gdb-6.3/gdb/testsuite/gdb.base/tracefork-zombie.exp 2007-07-31 13:04:12.000000000 -0400
|
||||
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.5-bz243845-stale-testing-zombie-test.patch
|
||||
|
||||
FileName: gdb-6.5-bz243845-stale-testing-zombie-test.patch
|
||||
|
||||
;; Test leftover zombie process (BZ 243845).
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.base/tracefork-zombie.exp | 75 +++++++++++++++++++++++++++++
|
||||
1 file changed, 75 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/tracefork-zombie.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/tracefork-zombie.exp b/gdb/testsuite/gdb.base/tracefork-zombie.exp
|
||||
new file mode 100644
|
||||
index 0000000000..5807040840
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/tracefork-zombie.exp
|
||||
@@ -0,0 +1,75 @@
|
||||
+# Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -77,3 +93,6 @@ diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.base/tracefork-zombie.exp gdb-
|
||||
+} else {
|
||||
+ fail $test
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,7 +1,24 @@
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcore-excessive-memory.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcore-excessive-memory.c 2016-02-15 23:28:15.943731340 +0100
|
||||
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.5-gcore-buffer-limit-test.patch
|
||||
|
||||
FileName: gdb-6.5-gcore-buffer-limit-test.patch
|
||||
|
||||
;; Test gcore memory and time requirements for large inferiors.
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.base/gcore-excessive-memory.c | 37 +++++++++
|
||||
gdb/testsuite/gdb.base/gcore-excessive-memory.exp | 94 +++++++++++++++++++++++
|
||||
2 files changed, 131 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/gcore-excessive-memory.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/gcore-excessive-memory.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/gcore-excessive-memory.c b/gdb/testsuite/gdb.base/gcore-excessive-memory.c
|
||||
new file mode 100644
|
||||
index 0000000000..56b4d3a63a
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gcore-excessive-memory.c
|
||||
@@ -0,0 +1,37 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -40,10 +57,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcore-excessive-memory.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcore-excessive-memory.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcore-excessive-memory.exp 2016-02-15 23:28:22.720779458 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/gcore-excessive-memory.exp b/gdb/testsuite/gdb.base/gcore-excessive-memory.exp
|
||||
new file mode 100644
|
||||
index 0000000000..4e71b5534e
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gcore-excessive-memory.exp
|
||||
@@ -0,0 +1,94 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -139,3 +157,6 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcore-excessive-memory.exp
|
||||
+
|
||||
+# Cleanup.
|
||||
+exec kill -9 $pid_of_bin
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,7 +1,24 @@
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/unwind-leak.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/unwind-leak.c 2016-02-15 23:32:11.307402446 +0100
|
||||
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.5-ia64-libunwind-leak-test.patch
|
||||
|
||||
FileName: gdb-6.5-ia64-libunwind-leak-test.patch
|
||||
|
||||
;; Test ia64 memory leaks of the code using libunwind.
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.base/unwind-leak.c | 29 ++++++++++++
|
||||
gdb/testsuite/gdb.base/unwind-leak.exp | 83 ++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 112 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/unwind-leak.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/unwind-leak.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/unwind-leak.c b/gdb/testsuite/gdb.base/unwind-leak.c
|
||||
new file mode 100644
|
||||
index 0000000000..58e34fb264
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/unwind-leak.c
|
||||
@@ -0,0 +1,29 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -32,10 +49,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/unwind-leak.c
|
||||
+ alarm (0);
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/unwind-leak.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/unwind-leak.exp 2016-02-15 23:32:18.559453937 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/unwind-leak.exp b/gdb/testsuite/gdb.base/unwind-leak.exp
|
||||
new file mode 100644
|
||||
index 0000000000..098962a57c
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/unwind-leak.exp
|
||||
@@ -0,0 +1,83 @@
|
||||
+# Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -120,3 +138,6 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/unwind-leak.exp
|
||||
+ fail $test
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,9 +1,22 @@
|
||||
Index: ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp
|
||||
===================================================================
|
||||
RCS file: ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp
|
||||
diff -N ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp
|
||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
||||
+++ ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp 15 Nov 2006 21:43:24 -0000
|
||||
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.5-last-address-space-byte-test.patch
|
||||
|
||||
FileName: gdb-6.5-last-address-space-byte-test.patch
|
||||
|
||||
;; Testcase for deadlocking on last address space byte; for corrupted backtraces.
|
||||
;;=fedoratest
|
||||
---
|
||||
.../gdb.base/largecore-last-address-lock.exp | 49 ++++++++++++++++++++++
|
||||
1 file changed, 49 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/largecore-last-address-lock.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/largecore-last-address-lock.exp b/gdb/testsuite/gdb.base/largecore-last-address-lock.exp
|
||||
new file mode 100644
|
||||
index 0000000000..8a597e9b15
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/largecore-last-address-lock.exp
|
||||
@@ -0,0 +1,49 @@
|
||||
+# Copyright 2006 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -54,3 +67,6 @@ diff -N ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp
|
||||
+ "Read the last address space byte"
|
||||
+
|
||||
+set timeout ${timeoutold}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,10 +1,63 @@
|
||||
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.5-missed-trap-on-step-test.patch
|
||||
|
||||
FileName: gdb-6.5-missed-trap-on-step-test.patch
|
||||
|
||||
;; Test hiding unexpected breakpoints on intentional step commands.
|
||||
;;=fedoratest
|
||||
|
||||
Fix has been committed to:
|
||||
gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch
|
||||
---
|
||||
gdb/testsuite/gdb.base/watchpoint-during-step.c | 30 ++++++++++++++++
|
||||
gdb/testsuite/gdb.base/watchpoint-during-step.exp | 44 +++++++++++++++++++++++
|
||||
2 files changed, 74 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/watchpoint-during-step.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/watchpoint-during-step.exp
|
||||
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-during-step.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-during-step.exp 2016-02-15 23:34:10.455248408 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/watchpoint-during-step.c b/gdb/testsuite/gdb.base/watchpoint-during-step.c
|
||||
new file mode 100644
|
||||
index 0000000000..107eae45a0
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/watchpoint-during-step.c
|
||||
@@ -0,0 +1,30 @@
|
||||
+/* 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.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@prep.ai.mit.edu */
|
||||
+
|
||||
+static int var;
|
||||
+
|
||||
+int main()
|
||||
+{
|
||||
+ var = 1;
|
||||
+ var = 2;
|
||||
+ var = 3;
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/watchpoint-during-step.exp b/gdb/testsuite/gdb.base/watchpoint-during-step.exp
|
||||
new file mode 100644
|
||||
index 0000000000..12ba99f1a9
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/watchpoint-during-step.exp
|
||||
@@ -0,0 +1,44 @@
|
||||
+# Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -50,38 +103,6 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-during-step.exp
|
||||
+# we step from as in this case it is a valid upstream KFAIL gdb/38
|
||||
+
|
||||
+gdb_test "step" ".*Old value = 2.*New value = 3.*" "Catch the watchpoint"
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-during-step.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-during-step.c 2016-02-15 23:32:51.846690279 +0100
|
||||
@@ -0,0 +1,30 @@
|
||||
+/* 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.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@prep.ai.mit.edu */
|
||||
+
|
||||
+static int var;
|
||||
+
|
||||
+int main()
|
||||
+{
|
||||
+ var = 1;
|
||||
+ var = 2;
|
||||
+ var = 3;
|
||||
+ return 0;
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,10 +1,24 @@
|
||||
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.5-readline-long-line-crash-test.patch
|
||||
|
||||
FileName: gdb-6.5-readline-long-line-crash-test.patch
|
||||
|
||||
;; Fix readline segfault on excessively long hand-typed lines.
|
||||
;;=fedoratest
|
||||
|
||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=214196
|
||||
---
|
||||
gdb/testsuite/gdb.base/readline-overflow.exp | 126 +++++++++++++++++++++++++++
|
||||
1 file changed, 126 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/readline-overflow.exp
|
||||
|
||||
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/readline-overflow.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/readline-overflow.exp 2016-02-15 23:30:29.191677414 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/readline-overflow.exp b/gdb/testsuite/gdb.base/readline-overflow.exp
|
||||
new file mode 100644
|
||||
index 0000000000..5e46816d21
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/readline-overflow.exp
|
||||
@@ -0,0 +1,126 @@
|
||||
+# Copyright 2006 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -132,3 +146,6 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/readline-overflow.exp
|
||||
+}
|
||||
+set timeout $oldtimeout1
|
||||
+
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,7 +1,26 @@
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib-lib.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib-lib.c 2016-02-15 23:27:19.654331680 +0100
|
||||
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.5-section-num-fixup-test.patch
|
||||
|
||||
FileName: gdb-6.5-section-num-fixup-test.patch
|
||||
|
||||
;; Test a crash on libraries missing the .text section.
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.base/datalib-lib.c | 22 +++++++++++++++
|
||||
gdb/testsuite/gdb.base/datalib-main.c | 26 ++++++++++++++++++
|
||||
gdb/testsuite/gdb.base/datalib.exp | 51 +++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 99 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/datalib-lib.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/datalib-main.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/datalib.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/datalib-lib.c b/gdb/testsuite/gdb.base/datalib-lib.c
|
||||
new file mode 100644
|
||||
index 0000000000..dd39e23746
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/datalib-lib.c
|
||||
@@ -0,0 +1,22 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -25,10 +44,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib-lib.c
|
||||
+ bug-gdb@prep.ai.mit.edu */
|
||||
+
|
||||
+int var;
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib-main.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib-main.c 2016-02-15 23:27:19.654331680 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/datalib-main.c b/gdb/testsuite/gdb.base/datalib-main.c
|
||||
new file mode 100644
|
||||
index 0000000000..4e0b80d2d6
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/datalib-main.c
|
||||
@@ -0,0 +1,26 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -56,10 +76,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib-main.c
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib.exp 2016-02-15 23:27:25.968376510 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/datalib.exp b/gdb/testsuite/gdb.base/datalib.exp
|
||||
new file mode 100644
|
||||
index 0000000000..385716d901
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/datalib.exp
|
||||
@@ -0,0 +1,51 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -112,3 +133,6 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib.exp
|
||||
+gdb_test "start" \
|
||||
+ "main \\(\\) at .*${srcfilemain}.*" \
|
||||
+ "start"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,15 +1,23 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.5-sharedlibrary-path.patch
|
||||
|
||||
FileName: gdb-6.5-sharedlibrary-path.patch
|
||||
|
||||
;; Fix TLS symbols resolving for shared libraries with a relative pathname.
|
||||
;; The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'.
|
||||
;;=fedoratest: One should recheck if it is really fixed upstream.
|
||||
|
||||
If you provided some relative path to the shared library, such as with
|
||||
export LD_LIBRARY_PATH=.
|
||||
then gdb would fail to match the shared library name during the TLS lookup.
|
||||
|
||||
|
||||
Dropped the workaround/fix for gdb-6.8.50.20081128 - is it still needed?
|
||||
|
||||
|
||||
The testsuite needs `gdb-6.3-bz146810-solib_absolute_prefix_is_empty.patch'.
|
||||
The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'.
|
||||
|
||||
|
||||
2006-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* solib-svr4.c (svr4_fetch_objfile_link_map): Match even absolute
|
||||
@ -22,11 +30,20 @@ The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'.
|
||||
2008-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Port to gdb-6.7.50.20080227.
|
||||
---
|
||||
gdb/testsuite/gdb.threads/tls-sepdebug-main.c | 25 +++++++
|
||||
gdb/testsuite/gdb.threads/tls-sepdebug-shared.c | 22 +++++++
|
||||
gdb/testsuite/gdb.threads/tls-sepdebug.exp | 87 +++++++++++++++++++++++++
|
||||
3 files changed, 134 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.threads/tls-sepdebug-main.c
|
||||
create mode 100644 gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
|
||||
create mode 100644 gdb/testsuite/gdb.threads/tls-sepdebug.exp
|
||||
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-sepdebug-main.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-sepdebug-main.c 2016-02-16 10:16:12.629875073 +0100
|
||||
diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug-main.c b/gdb/testsuite/gdb.threads/tls-sepdebug-main.c
|
||||
new file mode 100644
|
||||
index 0000000000..ea5d0174d6
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug-main.c
|
||||
@@ -0,0 +1,25 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -53,10 +70,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-sepdebug-main.c
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c 2016-02-16 10:16:12.630875080 +0100
|
||||
diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c b/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
|
||||
new file mode 100644
|
||||
index 0000000000..61b49251ba
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
|
||||
@@ -0,0 +1,22 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -80,10 +98,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
|
||||
+ bug-gdb@prep.ai.mit.edu */
|
||||
+
|
||||
+__thread int var = 42;
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-sepdebug.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2016-02-16 10:16:31.241001010 +0100
|
||||
diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug.exp b/gdb/testsuite/gdb.threads/tls-sepdebug.exp
|
||||
new file mode 100644
|
||||
index 0000000000..00773f78f2
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug.exp
|
||||
@@ -0,0 +1,87 @@
|
||||
+# Copyright 2006 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -172,3 +191,6 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-sepdebug.exp
|
||||
+ "\\\$1 = \[0-9\].*" \
|
||||
+ "print TLS variable from a shared library with $name-directory separate debug info file"
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,5 +1,13 @@
|
||||
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: print a more useful error message for "gdb core"
|
||||
|
||||
FileName: gdb-6.6-buildid-locate-core-as-arg.patch
|
||||
|
||||
;;=push+jan
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2010-01/msg00558.html
|
||||
Subject: Re: [patch] print a more useful error message for "gdb core"
|
||||
|
||||
[ Fixed up since the mail. ]
|
||||
|
||||
@ -31,16 +39,13 @@ autodetections. The second command line argument
|
||||
(captured_main->pid_or_core_arg) is also autodetected (for PID or CORE) but
|
||||
neither "attach" accepts a core file nor "core-file" accepts a PID.
|
||||
|
||||
|
||||
The patch makes sense only with the build-id patchset so this is not submit
|
||||
for FSF GDB inclusion yet. I am fine with your patch (+/- Hui Zhu's pending
|
||||
bfd_check_format_matches) as the patch below is its natural extension.
|
||||
|
||||
|
||||
Sorry for the delay,
|
||||
Jan
|
||||
|
||||
|
||||
2010-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* exceptions.h (enum errors <IS_CORE_ERROR>): New.
|
||||
@ -57,11 +62,30 @@ Http://sourceware.org/ml/gdb-patches/2010-01/msg00517.html
|
||||
|
||||
* exec.c (exec_file_attach): Print a more useful error message if the
|
||||
user did "gdb core".
|
||||
---
|
||||
gdb/common/common-exceptions.h | 3 +++
|
||||
gdb/exec.c | 22 +++++++++++++++---
|
||||
gdb/main.c | 53 +++++++++++++++++++++++++++++++++++++++---
|
||||
3 files changed, 72 insertions(+), 6 deletions(-)
|
||||
|
||||
Index: gdb-7.12.50.20170226/gdb/exec.c
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170226.orig/gdb/exec.c 2017-02-27 22:18:00.945026211 +0100
|
||||
+++ gdb-7.12.50.20170226/gdb/exec.c 2017-02-27 22:18:08.111076350 +0100
|
||||
diff --git a/gdb/common/common-exceptions.h b/gdb/common/common-exceptions.h
|
||||
index 15c85e28ab..9fe2375bce 100644
|
||||
--- a/gdb/common/common-exceptions.h
|
||||
+++ b/gdb/common/common-exceptions.h
|
||||
@@ -104,6 +104,9 @@ enum errors {
|
||||
"_ERROR" is appended to the name. */
|
||||
MAX_COMPLETIONS_REACHED_ERROR,
|
||||
|
||||
+ /* Attempt to load a core file as executable. */
|
||||
+ IS_CORE_ERROR,
|
||||
+
|
||||
/* Add more errors here. */
|
||||
NR_ERRORS
|
||||
};
|
||||
diff --git a/gdb/exec.c b/gdb/exec.c
|
||||
index c8c32ecc27..b329e2b834 100644
|
||||
--- a/gdb/exec.c
|
||||
+++ b/gdb/exec.c
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "progspace.h"
|
||||
#include "gdb_bfd.h"
|
||||
@ -70,7 +94,7 @@ Index: gdb-7.12.50.20170226/gdb/exec.c
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "readline/readline.h"
|
||||
@@ -359,12 +360,27 @@
|
||||
@@ -346,12 +347,27 @@ exec_file_attach (const char *filename, int from_tty)
|
||||
|
||||
if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching))
|
||||
{
|
||||
@ -101,11 +125,11 @@ Index: gdb-7.12.50.20170226/gdb/exec.c
|
||||
}
|
||||
|
||||
if (build_section_table (exec_bfd, §ions, §ions_end))
|
||||
Index: gdb-7.12.50.20170226/gdb/main.c
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170226.orig/gdb/main.c 2017-02-27 22:18:00.945026211 +0100
|
||||
+++ gdb-7.12.50.20170226/gdb/main.c 2017-02-27 22:18:08.112076357 +0100
|
||||
@@ -459,6 +459,37 @@
|
||||
diff --git a/gdb/main.c b/gdb/main.c
|
||||
index 3c98787edb..17d35f4a8a 100644
|
||||
--- a/gdb/main.c
|
||||
+++ b/gdb/main.c
|
||||
@@ -446,6 +446,37 @@ struct cmdarg
|
||||
char *string;
|
||||
};
|
||||
|
||||
@ -141,9 +165,9 @@ Index: gdb-7.12.50.20170226/gdb/main.c
|
||||
+}
|
||||
+
|
||||
static void
|
||||
captured_main_1 (struct captured_main_args *context, int &python_script)
|
||||
captured_main_1 (struct captured_main_args *context)
|
||||
{
|
||||
@@ -910,6 +941,8 @@
|
||||
@@ -882,6 +913,8 @@ captured_main_1 (struct captured_main_args *context)
|
||||
{
|
||||
symarg = argv[optind];
|
||||
execarg = argv[optind];
|
||||
@ -152,7 +176,7 @@ Index: gdb-7.12.50.20170226/gdb/main.c
|
||||
optind++;
|
||||
}
|
||||
|
||||
@@ -1060,11 +1093,25 @@
|
||||
@@ -1032,11 +1065,25 @@ captured_main_1 (struct captured_main_args *context)
|
||||
&& symarg != NULL
|
||||
&& strcmp (execarg, symarg) == 0)
|
||||
{
|
||||
@ -171,27 +195,16 @@ Index: gdb-7.12.50.20170226/gdb/main.c
|
||||
/* The exec file and the symbol-file are the same. If we can't
|
||||
open it, better only print one error message.
|
||||
- catch_command_errors returns non-zero on success! */
|
||||
- if (catch_command_errors_const (exec_file_attach, execarg,
|
||||
- !batch_flag))
|
||||
- if (catch_command_errors (exec_file_attach, execarg,
|
||||
- !batch_flag))
|
||||
+ catch_command_errors returns non-zero on success!
|
||||
+ Do not load EXECARG as a symbol file if it has been already processed
|
||||
+ as a core file. */
|
||||
+ if (catch_command_errors_const (func, execarg, !batch_flag)
|
||||
+ if (catch_command_errors (func, execarg, !batch_flag)
|
||||
+ && core_bfd == NULL)
|
||||
catch_command_errors_const (symbol_file_add_main_adapter, symarg,
|
||||
!batch_flag);
|
||||
catch_command_errors (symbol_file_add_main_adapter, symarg,
|
||||
!batch_flag);
|
||||
}
|
||||
Index: gdb-7.12.50.20170226/gdb/common/common-exceptions.h
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170226.orig/gdb/common/common-exceptions.h 2017-02-27 22:18:00.946026218 +0100
|
||||
+++ gdb-7.12.50.20170226/gdb/common/common-exceptions.h 2017-02-27 22:18:08.112076357 +0100
|
||||
@@ -106,6 +106,9 @@
|
||||
"_ERROR" is appended to the name. */
|
||||
MAX_COMPLETIONS_REACHED_ERROR,
|
||||
|
||||
+ /* Attempt to load a core file as executable. */
|
||||
+ IS_CORE_ERROR,
|
||||
+
|
||||
/* Add more errors here. */
|
||||
NR_ERRORS
|
||||
};
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,3 +1,15 @@
|
||||
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-misleading-warning-missing-debuginfo-rhbz981154.patch
|
||||
|
||||
FileName: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
|
||||
|
||||
;; Fix 'gdb gives highly misleading error when debuginfo pkg is present,
|
||||
;; but not corresponding binary pkg' (RH BZ 981154).
|
||||
;;=push+jan
|
||||
|
||||
Comments by Sergio Durigan Junior <sergiodj@redhat.com>:
|
||||
|
||||
This is the fix for RH BZ #981154
|
||||
@ -14,11 +26,33 @@ Comments by Sergio Durigan Junior <sergiodj@redhat.com>:
|
||||
and had a little thinko there. The variable 'filename' needs to be set to
|
||||
NULL after it is free'd, otherwise the code below thinks that it is still
|
||||
valid and doesn't print the necessary warning ("Try: yum install ...").
|
||||
---
|
||||
gdb/build-id.c | 5 +-
|
||||
.../rhbz981154-misleading-yum-install-warning.exp | 97 ++++++++++++++++++++++
|
||||
2 files changed, 101 insertions(+), 1 deletion(-)
|
||||
create mode 100644 gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp
|
||||
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp 2017-02-26 19:14:58.492609659 +0100
|
||||
diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
index 409a5b8c54..e2c1e81266 100644
|
||||
--- a/gdb/build-id.c
|
||||
+++ b/gdb/build-id.c
|
||||
@@ -592,7 +592,10 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id,
|
||||
do_cleanups (inner);
|
||||
|
||||
if (abfd == NULL)
|
||||
- continue;
|
||||
+ {
|
||||
+ filename = NULL;
|
||||
+ continue;
|
||||
+ }
|
||||
|
||||
if (build_id_verify (abfd.get(), build_id_len, build_id))
|
||||
break;
|
||||
diff --git a/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp b/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp
|
||||
new file mode 100644
|
||||
index 0000000000..bb70c5cf44
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp
|
||||
@@ -0,0 +1,97 @@
|
||||
+# Copyright (C) 2014 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -117,19 +151,6 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-ins
|
||||
+
|
||||
+# Leaving the link there will cause breakage in the next run.
|
||||
+remote_exec build "rm -f [standard_output_file ${build_id_without_debug}]"
|
||||
Index: gdb-7.12.50.20170207/gdb/build-id.c
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170207.orig/gdb/build-id.c 2017-02-26 19:14:51.943562799 +0100
|
||||
+++ gdb-7.12.50.20170207/gdb/build-id.c 2017-02-26 19:14:58.492609659 +0100
|
||||
@@ -589,7 +589,10 @@
|
||||
do_cleanups (inner);
|
||||
|
||||
if (abfd == NULL)
|
||||
- continue;
|
||||
+ {
|
||||
+ filename = NULL;
|
||||
+ continue;
|
||||
+ }
|
||||
|
||||
if (build_id_verify (abfd.get(), build_id_len, build_id))
|
||||
break;
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,20 +1,22 @@
|
||||
Index: gdb-7.6.90.20140127/gdb/proc-service.list
|
||||
===================================================================
|
||||
--- gdb-7.6.90.20140127.orig/gdb/proc-service.list 2014-02-06 17:32:42.810640320 +0100
|
||||
+++ gdb-7.6.90.20140127/gdb/proc-service.list 2014-02-06 17:33:35.406696964 +0100
|
||||
@@ -37,4 +37,7 @@
|
||||
ps_pstop;
|
||||
ps_ptread;
|
||||
ps_ptwrite;
|
||||
+
|
||||
+ /* gdb-6.6-buildid-locate-rpm.patch */
|
||||
+ rpmsqEnable;
|
||||
};
|
||||
Index: gdb-7.6.90.20140127/gdb/build-id.c
|
||||
===================================================================
|
||||
--- gdb-7.6.90.20140127.orig/gdb/build-id.c 2014-02-06 17:30:14.230480264 +0100
|
||||
+++ gdb-7.6.90.20140127/gdb/build-id.c 2014-02-06 17:34:28.846754283 +0100
|
||||
@@ -677,6 +677,19 @@ build_id_to_filename (const struct elf_b
|
||||
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-librpm-workaround.patch
|
||||
|
||||
FileName: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
|
||||
|
||||
;; Workaround librpm BZ 643031 due to its unexpected exit() calls (BZ 642879).
|
||||
;;=push+jan
|
||||
---
|
||||
gdb/build-id.c | 13 +++++++++++++
|
||||
gdb/proc-service.list | 3 +++
|
||||
2 files changed, 16 insertions(+)
|
||||
|
||||
diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
index d60cf622dc..409a5b8c54 100644
|
||||
--- a/gdb/build-id.c
|
||||
+++ b/gdb/build-id.c
|
||||
@@ -678,6 +678,19 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return)
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
@ -34,3 +36,18 @@ Index: gdb-7.6.90.20140127/gdb/build-id.c
|
||||
/* This MISSING_RPM_HASH tracker is used to collect all the missing rpm files
|
||||
and avoid their duplicities during a single inferior run. */
|
||||
|
||||
diff --git a/gdb/proc-service.list b/gdb/proc-service.list
|
||||
index 53f7ed8b1e..323f5e83c2 100644
|
||||
--- a/gdb/proc-service.list
|
||||
+++ b/gdb/proc-service.list
|
||||
@@ -37,4 +37,7 @@
|
||||
ps_pstop;
|
||||
ps_ptread;
|
||||
ps_ptwrite;
|
||||
+
|
||||
+ /* gdb-6.6-buildid-locate-rpm.patch */
|
||||
+ rpmsqEnable;
|
||||
};
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,10 +1,25 @@
|
||||
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
|
||||
|
||||
FileName: 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
|
||||
---
|
||||
gdb/build-id.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
gdb/dwarf2read.c | 14 ++++++++++++++
|
||||
2 files changed, 68 insertions(+)
|
||||
|
||||
diff -dup -rup gdb-7.10.50.20160106-orig/gdb/build-id.c gdb-7.10.50.20160106/gdb/build-id.c
|
||||
--- gdb-7.10.50.20160106-orig/gdb/build-id.c 2016-01-09 14:40:39.420385241 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/build-id.c 2016-01-09 14:41:05.944549393 +0100
|
||||
@@ -713,7 +713,11 @@ static int missing_rpm_list_entries;
|
||||
diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
index e2c1e81266..1b75530f91 100644
|
||||
--- a/gdb/build-id.c
|
||||
+++ b/gdb/build-id.c
|
||||
@@ -715,7 +715,11 @@ static int missing_rpm_list_entries;
|
||||
/* Returns the count of newly added rpms. */
|
||||
|
||||
static int
|
||||
@ -16,7 +31,7 @@ diff -dup -rup gdb-7.10.50.20160106-orig/gdb/build-id.c gdb-7.10.50.20160106/gdb
|
||||
{
|
||||
static int rpm_init_done = 0;
|
||||
rpmts ts;
|
||||
@@ -817,7 +821,11 @@ missing_rpm_enlist (const char *filename
|
||||
@@ -822,7 +826,11 @@ missing_rpm_enlist (const char *filename)
|
||||
mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0);
|
||||
if (mi != NULL)
|
||||
{
|
||||
@ -28,7 +43,7 @@ diff -dup -rup gdb-7.10.50.20160106-orig/gdb/build-id.c gdb-7.10.50.20160106/gdb
|
||||
{
|
||||
Header h;
|
||||
char *debuginfo, **slot, *s, *s2;
|
||||
@@ -935,6 +943,37 @@ missing_rpm_enlist (const char *filename
|
||||
@@ -940,6 +948,37 @@ missing_rpm_enlist (const char *filename)
|
||||
xfree (debuginfo);
|
||||
count++;
|
||||
}
|
||||
@ -66,7 +81,7 @@ diff -dup -rup gdb-7.10.50.20160106-orig/gdb/build-id.c gdb-7.10.50.20160106/gdb
|
||||
|
||||
rpmdbFreeIterator_p (mi);
|
||||
}
|
||||
@@ -945,6 +984,21 @@ missing_rpm_enlist (const char *filename
|
||||
@@ -950,6 +989,21 @@ missing_rpm_enlist (const char *filename)
|
||||
}
|
||||
|
||||
static int
|
||||
@ -88,10 +103,11 @@ diff -dup -rup gdb-7.10.50.20160106-orig/gdb/build-id.c gdb-7.10.50.20160106/gdb
|
||||
missing_rpm_list_compar (const char *const *ap, const char *const *bp)
|
||||
{
|
||||
return strcoll (*ap, *bp);
|
||||
diff -dup -rup gdb-7.10.50.20160106-orig/gdb/dwarf2read.c gdb-7.10.50.20160106/gdb/dwarf2read.c
|
||||
--- gdb-7.10.50.20160106-orig/gdb/dwarf2read.c 2016-01-09 14:40:39.416385216 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/dwarf2read.c 2016-01-09 14:41:05.942549381 +0100
|
||||
@@ -3111,6 +3111,16 @@ read_index_from_section (struct objfile
|
||||
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
index 2c972d5e74..64329af71e 100644
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -3725,6 +3725,16 @@ read_index_from_section (struct objfile *objfile,
|
||||
"set use-deprecated-index-sections on". */
|
||||
if (version < 6 && !deprecated_ok)
|
||||
{
|
||||
@ -108,7 +124,7 @@ diff -dup -rup gdb-7.10.50.20160106-orig/gdb/dwarf2read.c gdb-7.10.50.20160106/g
|
||||
static int warning_printed = 0;
|
||||
if (!warning_printed)
|
||||
{
|
||||
@@ -3122,6 +3132,10 @@ to use the section anyway."),
|
||||
@@ -3736,6 +3746,10 @@ to use the section anyway."),
|
||||
warning_printed = 1;
|
||||
}
|
||||
return 0;
|
||||
@ -119,3 +135,6 @@ diff -dup -rup gdb-7.10.50.20160106-orig/gdb/dwarf2read.c gdb-7.10.50.20160106/g
|
||||
}
|
||||
/* Version 7 indices generated by gold refer to the CU for a symbol instead
|
||||
of the TU (for symbols coming from TUs),
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,11 +1,32 @@
|
||||
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-solib-missing-ids.patch
|
||||
|
||||
FileName: gdb-6.6-buildid-locate-solib-missing-ids.patch
|
||||
|
||||
;; Fix loading of core files without build-ids but with build-ids in executables.
|
||||
;; Load strictly build-id-checked core files only if no executable is specified
|
||||
;; (Jan Kratochvil, RH BZ 1339862).
|
||||
;;=push+jan
|
||||
|
||||
gdb returns an incorrect back trace when applying a debuginfo
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1339862
|
||||
---
|
||||
gdb/solib-svr4.c | 35 ++++---
|
||||
.../gcore-buildid-exec-but-not-solib-lib.c | 21 +++++
|
||||
.../gcore-buildid-exec-but-not-solib-main.c | 25 +++++
|
||||
.../gdb.base/gcore-buildid-exec-but-not-solib.exp | 105 +++++++++++++++++++++
|
||||
4 files changed, 167 insertions(+), 19 deletions(-)
|
||||
create mode 100644 gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-lib.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-main.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib.exp
|
||||
|
||||
Index: gdb-7.9.90.20150709/gdb/solib-svr4.c
|
||||
===================================================================
|
||||
--- gdb-7.9.90.20150709.orig/gdb/solib-svr4.c 2015-07-09 18:18:54.526417766 +0200
|
||||
+++ gdb-7.9.90.20150709/gdb/solib-svr4.c 2015-07-09 18:19:33.074746586 +0200
|
||||
@@ -1381,14 +1381,27 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD
|
||||
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
|
||||
index a3399ad8f7..d7eeb6350d 100644
|
||||
--- a/gdb/solib-svr4.c
|
||||
+++ b/gdb/solib-svr4.c
|
||||
@@ -1387,14 +1387,27 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||
}
|
||||
|
||||
{
|
||||
@ -31,11 +52,11 @@ Index: gdb-7.9.90.20150709/gdb/solib-svr4.c
|
||||
+ to the only existing file loaded that time - the executable. */
|
||||
+ if (symfile_objfile != NULL
|
||||
+ && (symfile_objfile->flags & OBJF_BUILD_ID_CORE_LOADED) != 0)
|
||||
+ build_id = build_id_addr_get (newobj->lm_info->l_ld);
|
||||
+ build_id = build_id_addr_get (li->l_ld);
|
||||
if (build_id != NULL)
|
||||
{
|
||||
char *name, *build_id_filename;
|
||||
@@ -1403,23 +1416,7 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD
|
||||
@@ -1409,23 +1422,7 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||
xfree (name);
|
||||
}
|
||||
else
|
||||
@ -60,8 +81,69 @@ Index: gdb-7.9.90.20150709/gdb/solib-svr4.c
|
||||
|
||||
xfree (build_id_filename);
|
||||
xfree (build_id);
|
||||
--- /dev/null 2016-07-02 20:29:01.679404943 +0200
|
||||
+++ gdb-7.11.50.20160721/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib.exp 2016-07-31 23:04:49.062753722 +0200
|
||||
diff --git a/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-lib.c b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-lib.c
|
||||
new file mode 100644
|
||||
index 0000000000..d74b690c73
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-lib.c
|
||||
@@ -0,0 +1,21 @@
|
||||
+/* Copyright 2010 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/>. */
|
||||
+
|
||||
+void
|
||||
+lib (void)
|
||||
+{
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-main.c b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-main.c
|
||||
new file mode 100644
|
||||
index 0000000000..46b9dfe161
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-main.c
|
||||
@@ -0,0 +1,25 @@
|
||||
+/* Copyright 2010 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/>. */
|
||||
+
|
||||
+extern void lib (void);
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ lib ();
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib.exp b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib.exp
|
||||
new file mode 100644
|
||||
index 0000000000..0c46489f31
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib.exp
|
||||
@@ -0,0 +1,105 @@
|
||||
+# Copyright 2016 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -168,55 +250,6 @@ Index: gdb-7.9.90.20150709/gdb/solib-svr4.c
|
||||
+
|
||||
+gdb_test "bt"
|
||||
+gdb_test "info shared"
|
||||
--- /dev/null 2016-07-02 20:29:01.679404943 +0200
|
||||
+++ gdb-7.11.50.20160721/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-main.c 2016-07-28 21:06:40.977786922 +0200
|
||||
@@ -0,0 +1,25 @@
|
||||
+/* Copyright 2010 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/>. */
|
||||
+
|
||||
+extern void lib (void);
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ lib ();
|
||||
+ return 0;
|
||||
+}
|
||||
--- /dev/null 2016-07-02 20:29:01.679404943 +0200
|
||||
+++ gdb-7.11.50.20160721/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-lib.c 2016-07-28 21:06:40.977786922 +0200
|
||||
@@ -0,0 +1,21 @@
|
||||
+/* Copyright 2010 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/>. */
|
||||
+
|
||||
+void
|
||||
+lib (void)
|
||||
+{
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,352 +1,34 @@
|
||||
Index: gdb-7.99.90.20170420/gdb/corelow.c
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/corelow.c 2017-04-20 23:00:35.415584426 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/corelow.c 2017-04-20 23:00:43.358629183 +0200
|
||||
@@ -45,6 +45,10 @@
|
||||
#include "gdb_bfd.h"
|
||||
#include "completer.h"
|
||||
#include "filestuff.h"
|
||||
+#include "auxv.h"
|
||||
+#include "elf/common.h"
|
||||
+#include "gdbcmd.h"
|
||||
+#include "build-id.h"
|
||||
|
||||
#ifndef O_LARGEFILE
|
||||
#define O_LARGEFILE 0
|
||||
@@ -266,6 +270,54 @@
|
||||
inferior_ptid = ptid; /* Yes, make it current. */
|
||||
}
|
||||
|
||||
+static int build_id_core_loads = 1;
|
||||
+
|
||||
+static void
|
||||
+build_id_locate_exec (int from_tty)
|
||||
+{
|
||||
+ CORE_ADDR at_entry;
|
||||
+ struct bfd_build_id *build_id;
|
||||
+ char *execfilename, *debug_filename;
|
||||
+ char *build_id_filename;
|
||||
+ struct cleanup *back_to;
|
||||
+
|
||||
+ if (exec_bfd != NULL || symfile_objfile != NULL)
|
||||
+ return;
|
||||
+
|
||||
+ if (target_auxv_search (¤t_target, AT_ENTRY, &at_entry) <= 0)
|
||||
+ return;
|
||||
+
|
||||
+ build_id = build_id_addr_get (at_entry);
|
||||
+ if (build_id == NULL)
|
||||
+ return;
|
||||
+ back_to = make_cleanup (xfree, build_id);
|
||||
+
|
||||
+ /* SYMFILE_OBJFILE should refer to the main executable (not only to its
|
||||
+ separate debug info file). gcc44+ keeps .eh_frame only in the main
|
||||
+ executable without its duplicate .debug_frame in the separate debug info
|
||||
+ file - such .eh_frame would not be found if SYMFILE_OBJFILE would refer
|
||||
+ directly to the separate debug info file. */
|
||||
+
|
||||
+ execfilename = build_id_to_filename (build_id, &build_id_filename);
|
||||
+ make_cleanup (xfree, build_id_filename);
|
||||
+
|
||||
+ if (execfilename != NULL)
|
||||
+ {
|
||||
+ make_cleanup (xfree, execfilename);
|
||||
+ exec_file_attach (execfilename, from_tty);
|
||||
+ symbol_file_add_main (execfilename,
|
||||
+ symfile_add_flag (!from_tty ? 0 : SYMFILE_VERBOSE));
|
||||
+ if (symfile_objfile != NULL)
|
||||
+ symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
|
||||
+ }
|
||||
+ else
|
||||
+ debug_print_missing (_("the main executable file"), build_id_filename);
|
||||
+
|
||||
+ do_cleanups (back_to);
|
||||
+
|
||||
+ /* No automatic SOLIB_ADD as the libraries would get read twice. */
|
||||
+}
|
||||
+
|
||||
/* This routine opens and sets up the core file bfd. */
|
||||
|
||||
static void
|
||||
@@ -402,6 +454,14 @@
|
||||
switch_to_thread (thread->ptid);
|
||||
}
|
||||
|
||||
+ /* Find the build_id identifiers. If it gets executed after
|
||||
+ POST_CREATE_INFERIOR we would clash with asking to discard the already
|
||||
+ loaded VDSO symbols. If it gets executed before bfd_map_over_sections
|
||||
+ INFERIOR_PTID is still not set and libthread_db initialization crashes on
|
||||
+ PID == 0 in ps_pglobal_lookup. */
|
||||
+ if (build_id_core_loads != 0)
|
||||
+ build_id_locate_exec (from_tty);
|
||||
+
|
||||
post_create_inferior (&core_ops, from_tty);
|
||||
|
||||
/* Now go through the target stack looking for threads since there
|
||||
@@ -1079,4 +1139,11 @@
|
||||
init_core_ops ();
|
||||
|
||||
add_target_with_completer (&core_ops, filename_completer);
|
||||
+
|
||||
+ add_setshow_boolean_cmd ("build-id-core-loads", class_files,
|
||||
+ &build_id_core_loads, _("\
|
||||
+Set whether CORE-FILE loads the build-id associated files automatically."), _("\
|
||||
+Show whether CORE-FILE loads the build-id associated files automatically."),
|
||||
+ NULL, NULL, NULL,
|
||||
+ &setlist, &showlist);
|
||||
}
|
||||
Index: gdb-7.99.90.20170420/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/doc/gdb.texinfo 2017-04-20 23:00:35.415584426 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/doc/gdb.texinfo 2017-04-20 23:00:43.366629228 +0200
|
||||
@@ -18987,6 +18987,27 @@
|
||||
|
||||
@end table
|
||||
|
||||
+You can also adjust the current verbosity of the @dfn{build id} locating.
|
||||
+
|
||||
+@table @code
|
||||
+
|
||||
+@kindex set build-id-verbose
|
||||
+@item set build-id-verbose 0
|
||||
+No additional messages are printed.
|
||||
+
|
||||
+@item set build-id-verbose 1
|
||||
+Missing separate debug filenames are printed.
|
||||
+
|
||||
+@item set build-id-verbose 2
|
||||
+Missing separate debug filenames are printed and also all the parsing of the
|
||||
+binaries to find their @dfn{build id} content is printed.
|
||||
+
|
||||
+@kindex show build-id-verbose
|
||||
+@item show build-id-verbose
|
||||
+Show the current verbosity value for the @dfn{build id} content locating.
|
||||
+
|
||||
+@end table
|
||||
+
|
||||
@cindex @code{.gnu_debuglink} sections
|
||||
@cindex debug link sections
|
||||
A debug link is a special section of the executable file named
|
||||
Index: gdb-7.99.90.20170420/gdb/solib-svr4.c
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/solib-svr4.c 2017-04-20 23:00:35.415584426 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/solib-svr4.c 2017-04-20 23:00:43.367629234 +0200
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "auxv.h"
|
||||
#include "gdb_bfd.h"
|
||||
#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);
|
||||
@@ -1420,9 +1421,52 @@
|
||||
continue;
|
||||
}
|
||||
|
||||
- strncpy (newobj->so_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
- newobj->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
- strcpy (newobj->so_original_name, newobj->so_name);
|
||||
+ {
|
||||
+ struct bfd_build_id *build_id;
|
||||
+
|
||||
+ strncpy (newobj->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
+ newobj->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
+ /* May get overwritten below. */
|
||||
+ strcpy (newobj->so_name, newobj->so_original_name);
|
||||
+
|
||||
+ build_id = build_id_addr_get (newobj->lm_info->l_ld);
|
||||
+ if (build_id != NULL)
|
||||
+ {
|
||||
+ char *name, *build_id_filename;
|
||||
+
|
||||
+ /* Missing the build-id matching separate debug info file
|
||||
+ would be handled while SO_NAME gets loaded. */
|
||||
+ name = build_id_to_filename (build_id, &build_id_filename);
|
||||
+ if (name != NULL)
|
||||
+ {
|
||||
+ strncpy (newobj->so_name, name, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
+ newobj->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
+ xfree (name);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ debug_print_missing (newobj->so_name, build_id_filename);
|
||||
+
|
||||
+ /* In the case the main executable was found according to
|
||||
+ its build-id (from a core file) prevent loading
|
||||
+ a different build of a library with accidentally the
|
||||
+ same SO_NAME.
|
||||
+
|
||||
+ It suppresses bogus backtraces (and prints "??" there
|
||||
+ instead) if the on-disk files no longer match the
|
||||
+ running program version. */
|
||||
+
|
||||
+ if (symfile_objfile != NULL
|
||||
+ && (symfile_objfile->flags
|
||||
+ & OBJF_BUILD_ID_CORE_LOADED) != 0)
|
||||
+ newobj->so_name[0] = 0;
|
||||
+ }
|
||||
+
|
||||
+ xfree (build_id_filename);
|
||||
+ xfree (build_id);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
xfree (buffer);
|
||||
|
||||
/* If this entry has no name, or its name matches the name
|
||||
Index: gdb-7.99.90.20170420/gdb/elfread.c
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/elfread.c 2017-04-20 23:00:35.415584426 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/elfread.c 2017-04-20 23:00:43.367629234 +0200
|
||||
@@ -1265,8 +1265,9 @@
|
||||
&& objfile->separate_debug_objfile == NULL
|
||||
&& objfile->separate_debug_objfile_backlink == NULL)
|
||||
{
|
||||
+ gdb::unique_xmalloc_ptr<char> build_id_filename;
|
||||
gdb::unique_xmalloc_ptr<char> debugfile
|
||||
- (find_separate_debug_file_by_buildid (objfile));
|
||||
+ (find_separate_debug_file_by_buildid (objfile, &build_id_filename));
|
||||
|
||||
if (debugfile == NULL)
|
||||
debugfile.reset (find_separate_debug_file_by_debuglink (objfile));
|
||||
@@ -1278,6 +1279,10 @@
|
||||
symbol_file_add_separate (abfd.get (), debugfile.get (),
|
||||
symfile_flags, objfile);
|
||||
}
|
||||
+ /* Check if any separate debug info has been extracted out. */
|
||||
+ else if (bfd_get_section_by_name (objfile->obfd, ".gnu_debuglink")
|
||||
+ != NULL)
|
||||
+ debug_print_missing (objfile_name (objfile), build_id_filename.get ());
|
||||
}
|
||||
}
|
||||
|
||||
Index: gdb-7.99.90.20170420/gdb/symfile.h
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/symfile.h 2017-04-20 23:00:35.415584426 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/symfile.h 2017-04-20 23:00:43.368629240 +0200
|
||||
@@ -567,6 +567,10 @@
|
||||
void map_symbol_filenames (symbol_filename_ftype *fun, void *data,
|
||||
int need_fullname);
|
||||
|
||||
+/* 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);
|
||||
+
|
||||
/* From dwarf2read.c */
|
||||
|
||||
/* Names for a dwarf2 debugging section. The field NORMAL is the normal
|
||||
Index: gdb-7.99.90.20170420/gdb/testsuite/lib/gdb.exp
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/testsuite/lib/gdb.exp 2017-04-20 23:00:35.415584426 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/testsuite/lib/gdb.exp 2017-04-20 23:00:43.369629245 +0200
|
||||
@@ -1646,6 +1646,16 @@
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
+ # Turn off the missing warnings as the testsuite does not expect it.
|
||||
+ send_gdb "set build-id-verbose 0\n"
|
||||
+ gdb_expect 10 {
|
||||
+ -re "$gdb_prompt $" {
|
||||
+ verbose "Disabled the missing debug infos warnings." 2
|
||||
+ }
|
||||
+ timeout {
|
||||
+ warning "Could not disable the missing debug infos warnings.."
|
||||
+ }
|
||||
+ }
|
||||
return 0
|
||||
}
|
||||
|
||||
Index: gdb-7.99.90.20170420/gdb/testsuite/lib/mi-support.exp
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/testsuite/lib/mi-support.exp 2017-04-20 23:00:35.415584426 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/testsuite/lib/mi-support.exp 2017-04-20 23:00:43.369629245 +0200
|
||||
@@ -309,6 +309,16 @@
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
+ # Turn off the missing warnings as the testsuite does not expect it.
|
||||
+ send_gdb "190-gdb-set build-id-verbose 0\n"
|
||||
+ gdb_expect 10 {
|
||||
+ -re ".*190-gdb-set build-id-verbose 0\r\n190\\\^done\r\n$mi_gdb_prompt$" {
|
||||
+ verbose "Disabled the missing debug infos warnings." 2
|
||||
+ }
|
||||
+ timeout {
|
||||
+ warning "Could not disable the missing debug infos warnings.."
|
||||
+ }
|
||||
+ }
|
||||
|
||||
if { $separate_inferior_pty } {
|
||||
mi_create_inferior_pty
|
||||
Index: gdb-7.99.90.20170420/gdb/testsuite/gdb.base/new-ui-pending-input.exp
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/testsuite/gdb.base/new-ui-pending-input.exp 2017-04-20 23:00:35.415584426 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/testsuite/gdb.base/new-ui-pending-input.exp 2017-04-20 23:00:43.369629245 +0200
|
||||
@@ -62,6 +62,7 @@
|
||||
set options ""
|
||||
append options " -iex \"set height 0\""
|
||||
append options " -iex \"set width 0\""
|
||||
+ append options " -iex \"set build-id-verbose 0\""
|
||||
append options " -iex \"new-ui console $extra_tty_name\""
|
||||
append options " -ex \"b $bpline\""
|
||||
append options " -ex \"run\""
|
||||
Index: gdb-7.99.90.20170420/gdb/objfiles.h
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/objfiles.h 2017-04-20 23:00:35.415584426 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/objfiles.h 2017-04-20 23:00:43.370629251 +0200
|
||||
@@ -444,6 +444,10 @@
|
||||
htab_t static_links;
|
||||
};
|
||||
|
||||
+/* This file was loaded according to the BUILD_ID_CORE_LOADS rules. */
|
||||
+
|
||||
+#define OBJF_BUILD_ID_CORE_LOADED static_cast<enum objfile_flag>(1 << 12)
|
||||
+
|
||||
/* Declarations for functions defined in objfiles.c */
|
||||
|
||||
extern struct objfile *allocate_objfile (bfd *, const char *name,
|
||||
Index: gdb-7.99.90.20170420/gdb/testsuite/gdb.base/corefile.exp
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/testsuite/gdb.base/corefile.exp 2017-04-20 23:00:35.415584426 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/testsuite/gdb.base/corefile.exp 2017-04-20 23:00:43.370629251 +0200
|
||||
@@ -293,3 +293,33 @@
|
||||
pass $test
|
||||
}
|
||||
}
|
||||
+
|
||||
+
|
||||
+# Test auto-loading of binary files through build-id from the core file.
|
||||
+set buildid [build_id_debug_filename_get $binfile]
|
||||
+set wholetest "binfile found by build-id"
|
||||
+if {$buildid == ""} {
|
||||
+ untested "$wholetest (binary has no build-id)"
|
||||
+} else {
|
||||
+ gdb_exit
|
||||
+ gdb_start
|
||||
+
|
||||
+ regsub {\.debug$} $buildid {} buildid
|
||||
+ set debugdir [standard_output_file ${testfile}-debugdir]
|
||||
+ file delete -force -- $debugdir
|
||||
+ file mkdir $debugdir/[file dirname $buildid]
|
||||
+ file copy $binfile $debugdir/$buildid
|
||||
+
|
||||
+ set test "show debug-file-directory"
|
||||
+ gdb_test_multiple $test $test {
|
||||
+ -re "The directory where separate debug symbols are searched for is \"(.*)\"\\.\r\n$gdb_prompt $" {
|
||||
+ set debugdir_orig $expect_out(1,string)
|
||||
+ pass $test
|
||||
+ }
|
||||
+ }
|
||||
+ gdb_test_no_output "set debug-file-directory $debugdir:$debugdir_orig" "set debug-file-directory"
|
||||
+ gdb_test "show build-id-core-loads" {Whether CORE-FILE loads the build-id associated files automatically is on\.}
|
||||
+ gdb_test "core-file $corefile" "\r\nProgram terminated with .*" "core-file without executable"
|
||||
+ gdb_test "info files" "Local exec file:\r\n\[ \t\]*`[string_to_regexp $debugdir/$buildid]', file type .*"
|
||||
+ pass $wholetest
|
||||
+}
|
||||
Index: gdb-7.99.90.20170420/gdb/build-id.c
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/build-id.c 2017-04-20 23:00:35.415584426 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/build-id.c 2017-04-20 23:03:00.060399474 +0200
|
||||
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.patch
|
||||
|
||||
FileName: gdb-6.6-buildid-locate.patch
|
||||
|
||||
;; New locating of the matching binaries from the pure core file (build-id).
|
||||
;;=push+jan
|
||||
---
|
||||
gdb/build-id.c | 753 +++++++++++++++++++++++-
|
||||
gdb/build-id.h | 15 +-
|
||||
gdb/coffread.c | 2 +-
|
||||
gdb/corelow.c | 67 +++
|
||||
gdb/doc/gdb.texinfo | 21 +
|
||||
gdb/dwarf2read.c | 2 +-
|
||||
gdb/elfread.c | 7 +-
|
||||
gdb/objfiles.h | 4 +
|
||||
gdb/python/py-objfile.c | 4 +-
|
||||
gdb/solib-svr4.c | 50 +-
|
||||
gdb/symfile.h | 4 +
|
||||
gdb/testsuite/gdb.base/corefile.exp | 30 +
|
||||
gdb/testsuite/gdb.base/new-ui-pending-input.exp | 1 +
|
||||
gdb/testsuite/lib/gdb.exp | 10 +
|
||||
gdb/testsuite/lib/mi-support.exp | 10 +
|
||||
15 files changed, 940 insertions(+), 40 deletions(-)
|
||||
|
||||
diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
index 945da4f3cf..5740628386 100644
|
||||
--- a/gdb/build-id.c
|
||||
+++ b/gdb/build-id.c
|
||||
@@ -26,11 +26,67 @@
|
||||
#include "objfiles.h"
|
||||
#include "filenames.h"
|
||||
@ -416,7 +98,7 @@ Index: gdb-7.99.90.20170420/gdb/build-id.c
|
||||
{
|
||||
if (!bfd_check_format (abfd, bfd_object))
|
||||
return NULL;
|
||||
@@ -42,6 +98,348 @@
|
||||
@@ -42,6 +98,348 @@ build_id_bfd_get (bfd *abfd)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -765,7 +447,7 @@ Index: gdb-7.99.90.20170420/gdb/build-id.c
|
||||
/* See build-id.h. */
|
||||
|
||||
int
|
||||
@@ -50,7 +448,7 @@
|
||||
@@ -50,7 +448,7 @@ build_id_verify (bfd *abfd, size_t check_len, const bfd_byte *check)
|
||||
const struct bfd_build_id *found;
|
||||
int retval = 0;
|
||||
|
||||
@ -774,7 +456,7 @@ Index: gdb-7.99.90.20170420/gdb/build-id.c
|
||||
|
||||
if (found == NULL)
|
||||
warning (_("File \"%s\" has no build-id, file skipped"),
|
||||
@@ -65,23 +463,54 @@
|
||||
@@ -65,23 +463,54 @@ build_id_verify (bfd *abfd, size_t check_len, const bfd_byte *check)
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -836,7 +518,7 @@ Index: gdb-7.99.90.20170420/gdb/build-id.c
|
||||
|
||||
/* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will
|
||||
cause "/.build-id/..." lookups. */
|
||||
@@ -94,9 +523,12 @@
|
||||
@@ -94,9 +523,12 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id)
|
||||
size_t debugdir_len = strlen (debugdir);
|
||||
const gdb_byte *data = build_id;
|
||||
size_t size = build_id_len;
|
||||
@ -850,18 +532,22 @@ Index: gdb-7.99.90.20170420/gdb/build-id.c
|
||||
|
||||
memcpy (link, debugdir, debugdir_len);
|
||||
s = &link[debugdir_len];
|
||||
@@ -110,45 +542,290 @@
|
||||
@@ -110,52 +542,299 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id)
|
||||
*s++ = '/';
|
||||
while (size-- > 0)
|
||||
s += sprintf (s, "%02x", (unsigned) *data++);
|
||||
- strcpy (s, ".debug");
|
||||
+ for (seqno = 0;; seqno++)
|
||||
+ {
|
||||
+ char *s2;
|
||||
|
||||
if (separate_debug_file_debug)
|
||||
printf_unfiltered (_(" Trying %s\n"), link);
|
||||
|
||||
- /* lrealpath() is expensive even for the usually non-existent files. */
|
||||
- if (access (link, F_OK) == 0)
|
||||
- filename = lrealpath (link);
|
||||
+ for (seqno = 0;; seqno++)
|
||||
+ {
|
||||
+ char *s2;
|
||||
+
|
||||
+ if (seqno)
|
||||
+ {
|
||||
+ /* There can be multiple build-id symlinks pointing to real files
|
||||
@ -903,25 +589,17 @@ Index: gdb-7.99.90.20170420/gdb/build-id.c
|
||||
+
|
||||
+ if (abfd == NULL)
|
||||
+ continue;
|
||||
|
||||
- if (filename == NULL)
|
||||
- continue;
|
||||
+
|
||||
+ if (build_id_verify (abfd.get(), build_id_len, build_id))
|
||||
+ break;
|
||||
|
||||
- /* We expect to be silent on the non-existing files. */
|
||||
- inner = make_cleanup (xfree, filename);
|
||||
- abfd = gdb_bfd_open (filename, gnutarget, -1);
|
||||
- do_cleanups (inner);
|
||||
+
|
||||
+ abfd.release ();
|
||||
|
||||
- if (abfd == NULL)
|
||||
- continue;
|
||||
+
|
||||
+ filename = NULL;
|
||||
+ }
|
||||
|
||||
- if (build_id_verify (abfd.get(), build_id_len, build_id))
|
||||
- break;
|
||||
- if (filename == NULL)
|
||||
- continue;
|
||||
+ if (filename != NULL)
|
||||
+ {
|
||||
+ /* LINK_ALL is not used below in this non-NULL FILENAME case. */
|
||||
@ -929,22 +607,30 @@ Index: gdb-7.99.90.20170420/gdb/build-id.c
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
- abfd.release ();
|
||||
- /* We expect to be silent on the non-existing files. */
|
||||
- inner = make_cleanup (xfree, filename);
|
||||
- abfd = gdb_bfd_open (filename, gnutarget, -1);
|
||||
- do_cleanups (inner);
|
||||
+ /* If the symlink has target request to install the target.
|
||||
+ BASE-debuginfo.rpm contains the symlink but BASE.rpm may be missing.
|
||||
+ https://bugzilla.redhat.com/show_bug.cgi?id=981154 */
|
||||
+ link0_resolved = link_resolve (link0, 0);
|
||||
+ xfree (link0);
|
||||
+
|
||||
|
||||
- if (abfd == NULL)
|
||||
- continue;
|
||||
+ if (link_all == NULL)
|
||||
+ link_all = link0_resolved;
|
||||
+ else
|
||||
+ {
|
||||
+ size_t len_orig = strlen (link_all);
|
||||
+
|
||||
|
||||
- if (build_id_verify (abfd.get(), build_id_len, build_id))
|
||||
- break;
|
||||
+ link_all = (char *) xrealloc (link_all,
|
||||
+ len_orig + 1 + strlen (link0_resolved) + 1);
|
||||
+
|
||||
|
||||
- abfd.release ();
|
||||
+ /* Use whitespace instead of DIRNAME_SEPARATOR to be compatible with
|
||||
+ its possible use as an argument for installation command. */
|
||||
+ link_all[len_orig] = ' ';
|
||||
@ -1141,6 +827,10 @@ Index: gdb-7.99.90.20170420/gdb/build-id.c
|
||||
+ build_id = build_id_bfd_shdr_get (objfile->obfd);
|
||||
if (build_id != NULL)
|
||||
{
|
||||
if (separate_debug_file_debug)
|
||||
printf_unfiltered (_("\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,
|
||||
- build_id->data));
|
||||
@ -1156,10 +846,11 @@ Index: gdb-7.99.90.20170420/gdb/build-id.c
|
||||
+ build_id_filename_cstr = NULL;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* Prevent looping on a stripped .debug file. */
|
||||
if (abfd != NULL
|
||||
&& filename_cmp (bfd_get_filename (abfd.get ()),
|
||||
@@ -160,3 +837,21 @@
|
||||
@@ -167,3 +846,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@ -1181,10 +872,10 @@ Index: gdb-7.99.90.20170420/gdb/build-id.c
|
||||
+
|
||||
+ observer_attach_executable_changed (debug_print_executable_changed);
|
||||
+}
|
||||
Index: gdb-7.99.90.20170420/gdb/build-id.h
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/build-id.h 2017-04-20 23:00:35.415584426 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/build-id.h 2017-04-20 23:00:43.371629257 +0200
|
||||
diff --git a/gdb/build-id.h b/gdb/build-id.h
|
||||
index 0f13c7d4cf..2d105dba88 100644
|
||||
--- a/gdb/build-id.h
|
||||
+++ b/gdb/build-id.h
|
||||
@@ -22,9 +22,10 @@
|
||||
|
||||
#include "gdb_bfd.h"
|
||||
@ -1198,7 +889,7 @@ Index: gdb-7.99.90.20170420/gdb/build-id.h
|
||||
|
||||
/* Return true if ABFD has NT_GNU_BUILD_ID matching the CHECK value.
|
||||
Otherwise, issue a warning and return false. */
|
||||
@@ -38,13 +39,19 @@
|
||||
@@ -38,13 +39,19 @@ extern int build_id_verify (bfd *abfd,
|
||||
the caller. */
|
||||
|
||||
extern gdb_bfd_ref_ptr build_id_to_debug_bfd (size_t build_id_len,
|
||||
@ -1220,46 +911,11 @@ Index: gdb-7.99.90.20170420/gdb/build-id.h
|
||||
+ gdb::unique_xmalloc_ptr<char> *build_id_filename_return);
|
||||
|
||||
#endif /* BUILD_ID_H */
|
||||
Index: gdb-7.99.90.20170420/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/dwarf2read.c 2017-04-20 23:00:35.415584426 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/dwarf2read.c 2017-04-20 23:00:43.375629279 +0200
|
||||
@@ -2671,7 +2671,7 @@
|
||||
}
|
||||
|
||||
if (dwz_bfd == NULL)
|
||||
- dwz_bfd = build_id_to_debug_bfd (buildid_len, buildid);
|
||||
+ dwz_bfd = build_id_to_debug_bfd (buildid_len, buildid, NULL, 1);
|
||||
|
||||
if (dwz_bfd == NULL)
|
||||
error (_("could not find '.gnu_debugaltlink' file for %s"),
|
||||
Index: gdb-7.99.90.20170420/gdb/python/py-objfile.c
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/python/py-objfile.c 2017-04-20 23:00:35.415584426 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/python/py-objfile.c 2017-04-20 23:00:43.375629279 +0200
|
||||
@@ -137,7 +137,7 @@
|
||||
|
||||
TRY
|
||||
{
|
||||
- build_id = build_id_bfd_get (objfile->obfd);
|
||||
+ build_id = build_id_bfd_shdr_get (objfile->obfd);
|
||||
}
|
||||
CATCH (except, RETURN_MASK_ALL)
|
||||
{
|
||||
@@ -544,7 +544,7 @@
|
||||
/* 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))
|
||||
Index: gdb-7.99.90.20170420/gdb/coffread.c
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/coffread.c 2017-04-20 23:00:35.415584426 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/coffread.c 2017-04-20 23:00:43.376629285 +0200
|
||||
@@ -734,7 +734,7 @@
|
||||
diff --git a/gdb/coffread.c b/gdb/coffread.c
|
||||
index fbbbb68f71..9698ec2191 100644
|
||||
--- a/gdb/coffread.c
|
||||
+++ b/gdb/coffread.c
|
||||
@@ -735,7 +735,7 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
|
||||
{
|
||||
char *debugfile;
|
||||
|
||||
@ -1268,3 +924,386 @@ Index: gdb-7.99.90.20170420/gdb/coffread.c
|
||||
|
||||
if (debugfile == NULL)
|
||||
debugfile = find_separate_debug_file_by_debuglink (objfile);
|
||||
diff --git a/gdb/corelow.c b/gdb/corelow.c
|
||||
index 3a5256cb17..c5b642db81 100644
|
||||
--- a/gdb/corelow.c
|
||||
+++ b/gdb/corelow.c
|
||||
@@ -45,6 +45,10 @@
|
||||
#include "gdb_bfd.h"
|
||||
#include "completer.h"
|
||||
#include "filestuff.h"
|
||||
+#include "auxv.h"
|
||||
+#include "elf/common.h"
|
||||
+#include "gdbcmd.h"
|
||||
+#include "build-id.h"
|
||||
|
||||
#ifndef O_LARGEFILE
|
||||
#define O_LARGEFILE 0
|
||||
@@ -264,6 +268,54 @@ add_to_thread_list (bfd *abfd, asection *asect, void *reg_sect_arg)
|
||||
inferior_ptid = ptid; /* Yes, make it current. */
|
||||
}
|
||||
|
||||
+static int build_id_core_loads = 1;
|
||||
+
|
||||
+static void
|
||||
+build_id_locate_exec (int from_tty)
|
||||
+{
|
||||
+ CORE_ADDR at_entry;
|
||||
+ struct bfd_build_id *build_id;
|
||||
+ char *execfilename, *debug_filename;
|
||||
+ char *build_id_filename;
|
||||
+ struct cleanup *back_to;
|
||||
+
|
||||
+ if (exec_bfd != NULL || symfile_objfile != NULL)
|
||||
+ return;
|
||||
+
|
||||
+ if (target_auxv_search (¤t_target, AT_ENTRY, &at_entry) <= 0)
|
||||
+ return;
|
||||
+
|
||||
+ build_id = build_id_addr_get (at_entry);
|
||||
+ if (build_id == NULL)
|
||||
+ return;
|
||||
+ back_to = make_cleanup (xfree, build_id);
|
||||
+
|
||||
+ /* SYMFILE_OBJFILE should refer to the main executable (not only to its
|
||||
+ separate debug info file). gcc44+ keeps .eh_frame only in the main
|
||||
+ executable without its duplicate .debug_frame in the separate debug info
|
||||
+ file - such .eh_frame would not be found if SYMFILE_OBJFILE would refer
|
||||
+ directly to the separate debug info file. */
|
||||
+
|
||||
+ execfilename = build_id_to_filename (build_id, &build_id_filename);
|
||||
+ make_cleanup (xfree, build_id_filename);
|
||||
+
|
||||
+ if (execfilename != NULL)
|
||||
+ {
|
||||
+ make_cleanup (xfree, execfilename);
|
||||
+ exec_file_attach (execfilename, from_tty);
|
||||
+ symbol_file_add_main (execfilename,
|
||||
+ symfile_add_flag (!from_tty ? 0 : SYMFILE_VERBOSE));
|
||||
+ if (symfile_objfile != NULL)
|
||||
+ symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
|
||||
+ }
|
||||
+ else
|
||||
+ debug_print_missing (_("the main executable file"), build_id_filename);
|
||||
+
|
||||
+ do_cleanups (back_to);
|
||||
+
|
||||
+ /* No automatic SOLIB_ADD as the libraries would get read twice. */
|
||||
+}
|
||||
+
|
||||
/* This routine opens and sets up the core file bfd. */
|
||||
|
||||
static void
|
||||
@@ -391,6 +443,14 @@ core_open (const char *arg, int from_tty)
|
||||
switch_to_thread (thread->ptid);
|
||||
}
|
||||
|
||||
+ /* Find the build_id identifiers. If it gets executed after
|
||||
+ POST_CREATE_INFERIOR we would clash with asking to discard the already
|
||||
+ loaded VDSO symbols. If it gets executed before bfd_map_over_sections
|
||||
+ INFERIOR_PTID is still not set and libthread_db initialization crashes on
|
||||
+ PID == 0 in ps_pglobal_lookup. */
|
||||
+ if (build_id_core_loads != 0)
|
||||
+ build_id_locate_exec (from_tty);
|
||||
+
|
||||
post_create_inferior (&core_ops, from_tty);
|
||||
|
||||
/* Now go through the target stack looking for threads since there
|
||||
@@ -1040,4 +1100,11 @@ _initialize_corelow (void)
|
||||
init_core_ops ();
|
||||
|
||||
add_target_with_completer (&core_ops, filename_completer);
|
||||
+
|
||||
+ add_setshow_boolean_cmd ("build-id-core-loads", class_files,
|
||||
+ &build_id_core_loads, _("\
|
||||
+Set whether CORE-FILE loads the build-id associated files automatically."), _("\
|
||||
+Show whether CORE-FILE loads the build-id associated files automatically."),
|
||||
+ NULL, NULL, NULL,
|
||||
+ &setlist, &showlist);
|
||||
}
|
||||
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
|
||||
index 8bdafb0ba4..2f2cbd3dea 100644
|
||||
--- a/gdb/doc/gdb.texinfo
|
||||
+++ b/gdb/doc/gdb.texinfo
|
||||
@@ -19447,6 +19447,27 @@ information files.
|
||||
|
||||
@end table
|
||||
|
||||
+You can also adjust the current verbosity of the @dfn{build id} locating.
|
||||
+
|
||||
+@table @code
|
||||
+
|
||||
+@kindex set build-id-verbose
|
||||
+@item set build-id-verbose 0
|
||||
+No additional messages are printed.
|
||||
+
|
||||
+@item set build-id-verbose 1
|
||||
+Missing separate debug filenames are printed.
|
||||
+
|
||||
+@item set build-id-verbose 2
|
||||
+Missing separate debug filenames are printed and also all the parsing of the
|
||||
+binaries to find their @dfn{build id} content is printed.
|
||||
+
|
||||
+@kindex show build-id-verbose
|
||||
+@item show build-id-verbose
|
||||
+Show the current verbosity value for the @dfn{build id} content locating.
|
||||
+
|
||||
+@end table
|
||||
+
|
||||
@cindex @code{.gnu_debuglink} sections
|
||||
@cindex debug link sections
|
||||
A debug link is a special section of the executable file named
|
||||
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
index 98e7d842f0..c8db955f2f 100644
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -2907,7 +2907,7 @@ dwarf2_get_dwz_file (void)
|
||||
}
|
||||
|
||||
if (dwz_bfd == NULL)
|
||||
- dwz_bfd = build_id_to_debug_bfd (buildid_len, buildid);
|
||||
+ dwz_bfd = build_id_to_debug_bfd (buildid_len, buildid, NULL, 1);
|
||||
|
||||
if (dwz_bfd == NULL)
|
||||
error (_("could not find '.gnu_debugaltlink' file for %s"),
|
||||
diff --git a/gdb/elfread.c b/gdb/elfread.c
|
||||
index 103b2144c3..fb32e03af5 100644
|
||||
--- a/gdb/elfread.c
|
||||
+++ b/gdb/elfread.c
|
||||
@@ -1259,8 +1259,9 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
|
||||
&& objfile->separate_debug_objfile == NULL
|
||||
&& objfile->separate_debug_objfile_backlink == NULL)
|
||||
{
|
||||
+ gdb::unique_xmalloc_ptr<char> build_id_filename;
|
||||
gdb::unique_xmalloc_ptr<char> debugfile
|
||||
- (find_separate_debug_file_by_buildid (objfile));
|
||||
+ (find_separate_debug_file_by_buildid (objfile, &build_id_filename));
|
||||
|
||||
if (debugfile == NULL)
|
||||
debugfile.reset (find_separate_debug_file_by_debuglink (objfile));
|
||||
@@ -1272,6 +1273,10 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
|
||||
symbol_file_add_separate (abfd.get (), debugfile.get (),
|
||||
symfile_flags, objfile);
|
||||
}
|
||||
+ /* Check if any separate debug info has been extracted out. */
|
||||
+ else if (bfd_get_section_by_name (objfile->obfd, ".gnu_debuglink")
|
||||
+ != NULL)
|
||||
+ debug_print_missing (objfile_name (objfile), build_id_filename.get ());
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
|
||||
index 28e66eca36..5ab0e33fb6 100644
|
||||
--- a/gdb/objfiles.h
|
||||
+++ b/gdb/objfiles.h
|
||||
@@ -470,6 +470,10 @@ struct objfile
|
||||
htab_t static_links {};
|
||||
};
|
||||
|
||||
+/* This file was loaded according to the BUILD_ID_CORE_LOADS rules. */
|
||||
+
|
||||
+#define OBJF_BUILD_ID_CORE_LOADED static_cast<enum objfile_flag>(1 << 12)
|
||||
+
|
||||
/* Declarations for functions defined in objfiles.c */
|
||||
|
||||
extern struct gdbarch *get_objfile_arch (const struct objfile *);
|
||||
diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c
|
||||
index c2b40ff535..112cbf6560 100644
|
||||
--- a/gdb/python/py-objfile.c
|
||||
+++ b/gdb/python/py-objfile.c
|
||||
@@ -137,7 +137,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);
|
||||
}
|
||||
CATCH (except, RETURN_MASK_ALL)
|
||||
{
|
||||
@@ -544,7 +544,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))
|
||||
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
|
||||
index 4973cc2f25..a3399ad8f7 100644
|
||||
--- a/gdb/solib-svr4.c
|
||||
+++ b/gdb/solib-svr4.c
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "auxv.h"
|
||||
#include "gdb_bfd.h"
|
||||
#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);
|
||||
@@ -1385,9 +1386,52 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||
continue;
|
||||
}
|
||||
|
||||
- strncpy (newobj->so_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
- newobj->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
- strcpy (newobj->so_original_name, newobj->so_name);
|
||||
+ {
|
||||
+ struct bfd_build_id *build_id;
|
||||
+
|
||||
+ strncpy (newobj->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
+ newobj->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
+ /* May get overwritten below. */
|
||||
+ strcpy (newobj->so_name, newobj->so_original_name);
|
||||
+
|
||||
+ build_id = build_id_addr_get (newobj->lm_info->l_ld);
|
||||
+ if (build_id != NULL)
|
||||
+ {
|
||||
+ char *name, *build_id_filename;
|
||||
+
|
||||
+ /* Missing the build-id matching separate debug info file
|
||||
+ would be handled while SO_NAME gets loaded. */
|
||||
+ name = build_id_to_filename (build_id, &build_id_filename);
|
||||
+ if (name != NULL)
|
||||
+ {
|
||||
+ strncpy (newobj->so_name, name, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
+ newobj->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
+ xfree (name);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ debug_print_missing (newobj->so_name, build_id_filename);
|
||||
+
|
||||
+ /* In the case the main executable was found according to
|
||||
+ its build-id (from a core file) prevent loading
|
||||
+ a different build of a library with accidentally the
|
||||
+ same SO_NAME.
|
||||
+
|
||||
+ It suppresses bogus backtraces (and prints "??" there
|
||||
+ instead) if the on-disk files no longer match the
|
||||
+ running program version. */
|
||||
+
|
||||
+ if (symfile_objfile != NULL
|
||||
+ && (symfile_objfile->flags
|
||||
+ & OBJF_BUILD_ID_CORE_LOADED) != 0)
|
||||
+ newobj->so_name[0] = 0;
|
||||
+ }
|
||||
+
|
||||
+ xfree (build_id_filename);
|
||||
+ xfree (build_id);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
xfree (buffer);
|
||||
|
||||
/* If this entry has no name, or its name matches the name
|
||||
diff --git a/gdb/symfile.h b/gdb/symfile.h
|
||||
index 7c3fd8240a..0d51f46d78 100644
|
||||
--- a/gdb/symfile.h
|
||||
+++ b/gdb/symfile.h
|
||||
@@ -543,6 +543,10 @@ void expand_symtabs_matching
|
||||
void map_symbol_filenames (symbol_filename_ftype *fun, void *data,
|
||||
int need_fullname);
|
||||
|
||||
+/* 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);
|
||||
+
|
||||
/* From dwarf2read.c */
|
||||
|
||||
/* Names for a dwarf2 debugging section. The field NORMAL is the normal
|
||||
diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp
|
||||
index 63a7fa8e5b..8a4fab77df 100644
|
||||
--- a/gdb/testsuite/gdb.base/corefile.exp
|
||||
+++ b/gdb/testsuite/gdb.base/corefile.exp
|
||||
@@ -311,3 +311,33 @@ gdb_test_multiple "core-file $corefile" $test {
|
||||
pass $test
|
||||
}
|
||||
}
|
||||
+
|
||||
+
|
||||
+# Test auto-loading of binary files through build-id from the core file.
|
||||
+set buildid [build_id_debug_filename_get $binfile]
|
||||
+set wholetest "binfile found by build-id"
|
||||
+if {$buildid == ""} {
|
||||
+ untested "$wholetest (binary has no build-id)"
|
||||
+} else {
|
||||
+ gdb_exit
|
||||
+ gdb_start
|
||||
+
|
||||
+ regsub {\.debug$} $buildid {} buildid
|
||||
+ set debugdir [standard_output_file ${testfile}-debugdir]
|
||||
+ file delete -force -- $debugdir
|
||||
+ file mkdir $debugdir/[file dirname $buildid]
|
||||
+ file copy $binfile $debugdir/$buildid
|
||||
+
|
||||
+ set test "show debug-file-directory"
|
||||
+ gdb_test_multiple $test $test {
|
||||
+ -re "The directory where separate debug symbols are searched for is \"(.*)\"\\.\r\n$gdb_prompt $" {
|
||||
+ set debugdir_orig $expect_out(1,string)
|
||||
+ pass $test
|
||||
+ }
|
||||
+ }
|
||||
+ gdb_test_no_output "set debug-file-directory $debugdir:$debugdir_orig" "set debug-file-directory"
|
||||
+ gdb_test "show build-id-core-loads" {Whether CORE-FILE loads the build-id associated files automatically is on\.}
|
||||
+ gdb_test "core-file $corefile" "\r\nProgram terminated with .*" "core-file without executable"
|
||||
+ gdb_test "info files" "Local exec file:\r\n\[ \t\]*`[string_to_regexp $debugdir/$buildid]', file type .*"
|
||||
+ pass $wholetest
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/new-ui-pending-input.exp b/gdb/testsuite/gdb.base/new-ui-pending-input.exp
|
||||
index a6dc14e3c9..54a10df155 100644
|
||||
--- a/gdb/testsuite/gdb.base/new-ui-pending-input.exp
|
||||
+++ b/gdb/testsuite/gdb.base/new-ui-pending-input.exp
|
||||
@@ -62,6 +62,7 @@ proc test_command_line_new_ui_pending_input {} {
|
||||
set options ""
|
||||
append options " -iex \"set height 0\""
|
||||
append options " -iex \"set width 0\""
|
||||
+ append options " -iex \"set build-id-verbose 0\""
|
||||
append options " -iex \"new-ui console $extra_tty_name\""
|
||||
append options " -ex \"b $bpline\""
|
||||
append options " -ex \"run\""
|
||||
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
|
||||
index 7702d9c238..a165bf0938 100644
|
||||
--- a/gdb/testsuite/lib/gdb.exp
|
||||
+++ b/gdb/testsuite/lib/gdb.exp
|
||||
@@ -1694,6 +1694,16 @@ proc default_gdb_start { } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
+ # Turn off the missing warnings as the testsuite does not expect it.
|
||||
+ send_gdb "set build-id-verbose 0\n"
|
||||
+ gdb_expect 10 {
|
||||
+ -re "$gdb_prompt $" {
|
||||
+ verbose "Disabled the missing debug infos warnings." 2
|
||||
+ }
|
||||
+ timeout {
|
||||
+ warning "Could not disable the missing debug infos warnings.."
|
||||
+ }
|
||||
+ }
|
||||
return 0
|
||||
}
|
||||
|
||||
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
|
||||
index 2846da74e4..004c3e6c1c 100644
|
||||
--- a/gdb/testsuite/lib/mi-support.exp
|
||||
+++ b/gdb/testsuite/lib/mi-support.exp
|
||||
@@ -309,6 +309,16 @@ proc default_mi_gdb_start { args } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
+ # Turn off the missing warnings as the testsuite does not expect it.
|
||||
+ send_gdb "190-gdb-set build-id-verbose 0\n"
|
||||
+ gdb_expect 10 {
|
||||
+ -re ".*190-gdb-set build-id-verbose 0\r\n190\\\^done\r\n$mi_gdb_prompt$" {
|
||||
+ verbose "Disabled the missing debug infos warnings." 2
|
||||
+ }
|
||||
+ timeout {
|
||||
+ warning "Could not disable the missing debug infos warnings.."
|
||||
+ }
|
||||
+ }
|
||||
|
||||
if { $separate_inferior_pty } {
|
||||
mi_create_inferior_pty
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.6-bz229517-gcore-without-terminal.patch
|
||||
|
||||
FileName: gdb-6.6-bz229517-gcore-without-terminal.patch
|
||||
|
||||
;; Allow running `/usr/bin/gcore' with provided but inaccessible tty (BZ 229517).
|
||||
;;=fedoratest
|
||||
|
||||
2007-04-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb_gcore.sh: Redirect GDB from `</dev/null'.
|
||||
@ -5,12 +15,18 @@
|
||||
2007-04-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.base/gcorebg.exp, gdb.base/gcorebg.c: New files.
|
||||
---
|
||||
gdb/testsuite/gdb.base/gcorebg.c | 49 ++++++++++++++++
|
||||
gdb/testsuite/gdb.base/gcorebg.exp | 113 +++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 162 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/gcorebg.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/gcorebg.exp
|
||||
|
||||
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcorebg.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcorebg.c 2016-02-16 10:44:48.998527259 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/gcorebg.c b/gdb/testsuite/gdb.base/gcorebg.c
|
||||
new file mode 100644
|
||||
index 0000000000..427ebe9b4f
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gcorebg.c
|
||||
@@ -0,0 +1,49 @@
|
||||
+#include <stdio.h>
|
||||
+#include <sys/types.h>
|
||||
@ -61,10 +77,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcorebg.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcorebg.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcorebg.exp 2016-02-16 10:44:48.999527265 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/gcorebg.exp b/gdb/testsuite/gdb.base/gcorebg.exp
|
||||
new file mode 100644
|
||||
index 0000000000..a5471ba5df
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gcorebg.exp
|
||||
@@ -0,0 +1,113 @@
|
||||
+# Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -179,3 +196,6 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcorebg.exp
|
||||
+
|
||||
+set env(PATH) $oldpath
|
||||
+remote_file target delete "./gdb"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,14 +1,30 @@
|
||||
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
|
||||
|
||||
FileName: 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.
|
||||
---
|
||||
gdb/testsuite/gdb.arch/powerpc-power6.exp | 54 +++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.arch/powerpc-power6.s | 16 +++++++++
|
||||
2 files changed, 70 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.arch/powerpc-power6.exp
|
||||
create mode 100644 gdb/testsuite/gdb.arch/powerpc-power6.s
|
||||
|
||||
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.arch/powerpc-power6.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.arch/powerpc-power6.exp 2013-02-25 14:31:06.658827177 +0100
|
||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-power6.exp b/gdb/testsuite/gdb.arch/powerpc-power6.exp
|
||||
new file mode 100644
|
||||
index 0000000000..082a4b7802
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/powerpc-power6.exp
|
||||
@@ -0,0 +1,54 @@
|
||||
+# Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -64,10 +80,11 @@ Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.arch/powerpc-power6.exp
|
||||
+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"
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.arch/powerpc-power6.s
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.arch/powerpc-power6.s 2013-02-25 14:31:06.659827178 +0100
|
||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-power6.s b/gdb/testsuite/gdb.arch/powerpc-power6.s
|
||||
new file mode 100644
|
||||
index 0000000000..6694b237ab
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/powerpc-power6.s
|
||||
@@ -0,0 +1,16 @@
|
||||
+ .text
|
||||
+ .globl func
|
||||
@ -85,3 +102,6 @@ Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.arch/powerpc-power6.s
|
||||
+ .long 0xfc020444 /* ddivq f0,f2,f0 */
|
||||
+ .long 0xec820d04 /* dcmpu cr1,f2,f1 */
|
||||
+ .long 0xfc820504 /* dcmpuq cr1,f2,f0 */
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,12 +1,66 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.6-bz235197-fork-detach-info.patch
|
||||
|
||||
FileName: gdb-6.6-bz235197-fork-detach-info.patch
|
||||
|
||||
;; Notify user of a child forked process being detached (BZ 235197).
|
||||
;;=push+jan: This is more about discussion if/what should be printed.
|
||||
|
||||
2008-03-01 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Port to GDB-6.8pre.
|
||||
Remove the `[' character from the GDB-6.8 default message.
|
||||
---
|
||||
gdb/infrun.c | 2 +-
|
||||
gdb/testsuite/gdb.base/catch-syscall.exp | 4 +--
|
||||
gdb/testsuite/gdb.base/fork-detach.c | 57 ++++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.base/fork-detach.exp | 36 ++++++++++++++++++++
|
||||
4 files changed, 96 insertions(+), 3 deletions(-)
|
||||
create mode 100644 gdb/testsuite/gdb.base/fork-detach.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/fork-detach.exp
|
||||
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/fork-detach.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/fork-detach.c 2016-02-15 23:25:36.686600598 +0100
|
||||
diff --git a/gdb/infrun.c b/gdb/infrun.c
|
||||
index e1d11234e0..23439979b5 100644
|
||||
--- a/gdb/infrun.c
|
||||
+++ b/gdb/infrun.c
|
||||
@@ -461,7 +461,7 @@ holding the child stopped. Try \"set detach-on-fork\" or \
|
||||
remove_breakpoints_pid (ptid_get_pid (inferior_ptid));
|
||||
}
|
||||
|
||||
- if (info_verbose || debug_infrun)
|
||||
+ if (1 /* Fedora Bug 235197 */ || info_verbose || debug_infrun)
|
||||
{
|
||||
/* Ensure that we have a process ptid. */
|
||||
ptid_t process_ptid = pid_to_ptid (ptid_get_pid (child_ptid));
|
||||
diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp b/gdb/testsuite/gdb.base/catch-syscall.exp
|
||||
index 2a8bf27e5c..20fa041155 100644
|
||||
--- a/gdb/testsuite/gdb.base/catch-syscall.exp
|
||||
+++ b/gdb/testsuite/gdb.base/catch-syscall.exp
|
||||
@@ -179,7 +179,7 @@ proc check_for_program_end {} {
|
||||
# Deleting the catchpoints
|
||||
delete_breakpoints
|
||||
|
||||
- gdb_continue_to_end
|
||||
+ gdb_continue_to_end "" continue 1
|
||||
}
|
||||
|
||||
proc test_catch_syscall_without_args {} {
|
||||
@@ -250,7 +250,7 @@ proc test_catch_syscall_with_wrong_args {} {
|
||||
# If it doesn't, everything is right (since we don't have
|
||||
# a syscall named "mlock" in it). Otherwise, this is a failure.
|
||||
set thistest "catch syscall with unused syscall ($syscall_name)"
|
||||
- gdb_continue_to_end $thistest
|
||||
+ gdb_continue_to_end $thistest continue 1
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/fork-detach.c b/gdb/testsuite/gdb.base/fork-detach.c
|
||||
new file mode 100644
|
||||
index 0000000000..0ba8f465f3
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/fork-detach.c
|
||||
@@ -0,0 +1,57 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -65,10 +119,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/fork-detach.c
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/fork-detach.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/fork-detach.exp 2016-02-15 23:27:55.792588265 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/fork-detach.exp b/gdb/testsuite/gdb.base/fork-detach.exp
|
||||
new file mode 100644
|
||||
index 0000000000..1f1fcef6c4
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/fork-detach.exp
|
||||
@@ -0,0 +1,36 @@
|
||||
+# Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -106,38 +161,6 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/fork-detach.exp
|
||||
+gdb_test "" \
|
||||
+ "Detaching after fork from child process.*\\\[Inferior .* exited normally\\\]" \
|
||||
+ "Info message caught"
|
||||
Index: gdb-7.10.90.20160211/gdb/infrun.c
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/infrun.c 2016-02-15 23:25:01.432350289 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/infrun.c 2016-02-15 23:27:49.274541986 +0100
|
||||
@@ -478,7 +478,7 @@
|
||||
remove_breakpoints_pid (ptid_get_pid (inferior_ptid));
|
||||
}
|
||||
|
||||
- if (info_verbose || debug_infrun)
|
||||
+ if (1 /* Fedora Bug 235197 */ || info_verbose || debug_infrun)
|
||||
{
|
||||
/* Ensure that we have a process ptid. */
|
||||
ptid_t process_ptid = pid_to_ptid (ptid_get_pid (child_ptid));
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/catch-syscall.exp
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/testsuite/gdb.base/catch-syscall.exp 2016-02-15 23:25:01.432350289 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/catch-syscall.exp 2016-02-15 23:25:36.689600619 +0100
|
||||
@@ -165,7 +165,7 @@
|
||||
# Deleting the catchpoints
|
||||
delete_breakpoints
|
||||
|
||||
- gdb_continue_to_end
|
||||
+ gdb_continue_to_end "" continue 1
|
||||
}
|
||||
|
||||
proc test_catch_syscall_without_args {} {
|
||||
@@ -236,7 +236,7 @@
|
||||
# If it doesn't, everything is right (since we don't have
|
||||
# a syscall named "mlock" in it). Otherwise, this is a failure.
|
||||
set thistest "catch syscall with unused syscall ($syscall_name)"
|
||||
- gdb_continue_to_end $thistest
|
||||
+ gdb_continue_to_end $thistest continue 1
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,12 +1,29 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
|
||||
|
||||
FileName: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
|
||||
|
||||
;; Support for stepping over PPC atomic instruction sequences (BZ 237572).
|
||||
;;=fedoratest
|
||||
|
||||
2007-06-25 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.threads/atomic-seq-threaded.c,
|
||||
gdb.threads/atomic-seq-threaded.exp: New files.
|
||||
---
|
||||
gdb/testsuite/gdb.threads/atomic-seq-threaded.c | 171 ++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.threads/atomic-seq-threaded.exp | 84 +++++++++++
|
||||
2 files changed, 255 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.threads/atomic-seq-threaded.c
|
||||
create mode 100644 gdb/testsuite/gdb.threads/atomic-seq-threaded.exp
|
||||
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.c 2008-12-08 22:27:01.000000000 +0100
|
||||
diff --git a/gdb/testsuite/gdb.threads/atomic-seq-threaded.c b/gdb/testsuite/gdb.threads/atomic-seq-threaded.c
|
||||
new file mode 100644
|
||||
index 0000000000..04f998bfa6
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/atomic-seq-threaded.c
|
||||
@@ -0,0 +1,171 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -179,10 +196,11 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.c
|
||||
+
|
||||
+ return 0; /* _exit_ */
|
||||
+}
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp 2008-12-08 22:31:01.000000000 +0100
|
||||
diff --git a/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp b/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp
|
||||
new file mode 100644
|
||||
index 0000000000..eb49db506e
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp
|
||||
@@ -0,0 +1,84 @@
|
||||
+# atomic-seq-threaded.exp -- Test case for stepping over RISC atomic code seqs.
|
||||
+# This variant testcases the code for stepping another thread while skipping
|
||||
@ -268,3 +286,6 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp
|
||||
+gdb_test "c" \
|
||||
+ ".*Program exited normally\\..*" \
|
||||
+ "run till program exit"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,8 +1,25 @@
|
||||
Index: gdb-7.12.50.20170207/gdb/infrun.c
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170207.orig/gdb/infrun.c 2017-02-07 21:07:40.321202448 +0100
|
||||
+++ gdb-7.12.50.20170207/gdb/infrun.c 2017-02-07 21:07:42.680220365 +0100
|
||||
@@ -2218,7 +2218,7 @@
|
||||
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-scheduler_locking-step-is-default.patch
|
||||
|
||||
FileName: gdb-6.6-scheduler_locking-step-is-default.patch
|
||||
|
||||
;; Make upstream `set scheduler-locking step' as default.
|
||||
;;=push+jan: How much is scheduler-locking relevant after non-stop?
|
||||
---
|
||||
gdb/infrun.c | 2 +-
|
||||
gdb/testsuite/gdb.mi/mi-cli.exp | 2 +-
|
||||
gdb/testsuite/gdb.mi/mi-console.exp | 3 +++
|
||||
gdb/testsuite/gdb.mi/mi-logging.exp | 4 ++--
|
||||
gdb/testsuite/gdb.opt/inline-cmds.exp | 2 +-
|
||||
5 files changed, 8 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/gdb/infrun.c b/gdb/infrun.c
|
||||
index 23439979b5..1d0f731954 100644
|
||||
--- a/gdb/infrun.c
|
||||
+++ b/gdb/infrun.c
|
||||
@@ -2202,7 +2202,7 @@ static const char *const scheduler_enums[] = {
|
||||
schedlock_replay,
|
||||
NULL
|
||||
};
|
||||
@ -11,11 +28,11 @@ Index: gdb-7.12.50.20170207/gdb/infrun.c
|
||||
static void
|
||||
show_scheduler_mode (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi-cli.exp
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.mi/mi-cli.exp 2017-02-07 21:07:40.322202455 +0100
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi-cli.exp 2017-02-07 21:07:42.680220365 +0100
|
||||
@@ -199,7 +199,7 @@
|
||||
diff --git a/gdb/testsuite/gdb.mi/mi-cli.exp b/gdb/testsuite/gdb.mi/mi-cli.exp
|
||||
index 6ce6439eb7..4f405b5fc1 100644
|
||||
--- a/gdb/testsuite/gdb.mi/mi-cli.exp
|
||||
+++ b/gdb/testsuite/gdb.mi/mi-cli.exp
|
||||
@@ -199,7 +199,7 @@ mi_expect_stop "breakpoint-hit" "main" "" ".*basics.c" \
|
||||
# Test that the token is output even for CLI commands
|
||||
# Also test that *stopped includes frame information.
|
||||
mi_gdb_test "34 next" \
|
||||
@ -24,33 +41,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi-cli.exp
|
||||
"34 next: run"
|
||||
|
||||
# Test that the new current source line is output to the console
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi-logging.exp
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.mi/mi-logging.exp 2017-02-07 21:07:42.681220372 +0100
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi-logging.exp 2017-02-07 21:09:36.950088269 +0100
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
set mi_log_prompt "\[(\]gdb\[)\] \[\r\n\]+"
|
||||
|
||||
-if [regexp "\\^done\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
|
||||
+if [regexp "\\^done\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
|
||||
pass "log file contents"
|
||||
} else {
|
||||
fail "log file contents"
|
||||
@@ -76,7 +76,7 @@
|
||||
set logcontent [read $chan]
|
||||
close $chan
|
||||
|
||||
-if [regexp "1001\\^done\[\r\n\]+$mi_log_prompt.*1002\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt.*1003\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
|
||||
+if [regexp "1001\\^done\[\r\n\]+$mi_log_prompt.*1002\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt.*1003\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
|
||||
pass "redirect log file contents"
|
||||
} else {
|
||||
fail "redirect log file contents"
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi-console.exp
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.mi/mi-console.exp 2017-02-07 21:07:40.323202463 +0100
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi-console.exp 2017-02-07 21:07:42.681220372 +0100
|
||||
@@ -60,6 +60,9 @@
|
||||
diff --git a/gdb/testsuite/gdb.mi/mi-console.exp b/gdb/testsuite/gdb.mi/mi-console.exp
|
||||
index ec4b006018..05cf7fb889 100644
|
||||
--- a/gdb/testsuite/gdb.mi/mi-console.exp
|
||||
+++ b/gdb/testsuite/gdb.mi/mi-console.exp
|
||||
@@ -60,6 +60,9 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
|
||||
|
||||
mi_run_to_main
|
||||
|
||||
@ -60,11 +55,33 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi-console.exp
|
||||
# The output we get from the target depends on how it is hosted. If
|
||||
# we are semihosted (e.g., the sim or a remote target that supports
|
||||
# the File I/O remote protocol extension), we see the target I/O
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/inline-cmds.exp
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.opt/inline-cmds.exp 2017-02-07 21:07:40.323202463 +0100
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/inline-cmds.exp 2017-02-07 21:07:42.681220372 +0100
|
||||
@@ -331,7 +331,7 @@
|
||||
diff --git a/gdb/testsuite/gdb.mi/mi-logging.exp b/gdb/testsuite/gdb.mi/mi-logging.exp
|
||||
index b09cde2d37..e51d46edb5 100644
|
||||
--- a/gdb/testsuite/gdb.mi/mi-logging.exp
|
||||
+++ b/gdb/testsuite/gdb.mi/mi-logging.exp
|
||||
@@ -53,7 +53,7 @@ close $chan
|
||||
|
||||
set mi_log_prompt "\[(\]gdb\[)\] \[\r\n\]+"
|
||||
|
||||
-if [regexp "\\^done\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
|
||||
+if [regexp "\\^done\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
|
||||
pass "log file contents"
|
||||
} else {
|
||||
fail "log file contents"
|
||||
@@ -76,7 +76,7 @@ set chan [open $milogfile]
|
||||
set logcontent [read $chan]
|
||||
close $chan
|
||||
|
||||
-if [regexp "1001\\^done\[\r\n\]+$mi_log_prompt.*1002\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt.*1003\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
|
||||
+if [regexp "1001\\^done\[\r\n\]+$mi_log_prompt.*1002\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt.*1003\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
|
||||
pass "redirect log file contents"
|
||||
} else {
|
||||
fail "redirect log file contents"
|
||||
diff --git a/gdb/testsuite/gdb.opt/inline-cmds.exp b/gdb/testsuite/gdb.opt/inline-cmds.exp
|
||||
index 5227d63f5d..782f31c080 100644
|
||||
--- a/gdb/testsuite/gdb.opt/inline-cmds.exp
|
||||
+++ b/gdb/testsuite/gdb.opt/inline-cmds.exp
|
||||
@@ -331,7 +331,7 @@ proc mi_cli_step {cli_output_re message} {
|
||||
|
||||
send_gdb "interpreter-exec console \"step\"\n"
|
||||
gdb_expect {
|
||||
@ -73,3 +90,6 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/inline-cmds.exp
|
||||
pass $message
|
||||
}
|
||||
timeout {
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,8 +1,22 @@
|
||||
Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/annota1.exp
|
||||
===================================================================
|
||||
--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/gdb.base/annota1.exp 2013-08-02 16:23:26.559936258 +0200
|
||||
+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/annota1.exp 2013-08-02 16:23:56.590976418 +0200
|
||||
@@ -41,6 +41,8 @@ if { [gdb_compile "${srcdir}/${subdir}/
|
||||
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-testsuite-timeouts.patch
|
||||
|
||||
FileName: gdb-6.6-testsuite-timeouts.patch
|
||||
|
||||
;; Avoid too long timeouts on failing cases of "annota1.exp annota3.exp".
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.base/annota1.exp | 2 ++
|
||||
gdb/testsuite/gdb.base/annota3.exp | 2 ++
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp
|
||||
index 4b34aa84f2..40e08a4db2 100644
|
||||
--- a/gdb/testsuite/gdb.base/annota1.exp
|
||||
+++ b/gdb/testsuite/gdb.base/annota1.exp
|
||||
@@ -39,6 +39,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
|
||||
|
||||
clean_restart ${binfile}
|
||||
|
||||
@ -11,11 +25,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/annota1.exp
|
||||
# The commands we test here produce many lines of output; disable "press
|
||||
# <return> to continue" prompts.
|
||||
gdb_test_no_output "set height 0"
|
||||
Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/annota3.exp
|
||||
===================================================================
|
||||
--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/gdb.base/annota3.exp 2013-08-02 16:23:26.560936259 +0200
|
||||
+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/annota3.exp 2013-08-02 16:24:11.654996267 +0200
|
||||
@@ -40,6 +40,8 @@ if { [gdb_compile "${srcdir}/${subdir}/
|
||||
diff --git a/gdb/testsuite/gdb.base/annota3.exp b/gdb/testsuite/gdb.base/annota3.exp
|
||||
index a899be69ea..af472af8a5 100644
|
||||
--- a/gdb/testsuite/gdb.base/annota3.exp
|
||||
+++ b/gdb/testsuite/gdb.base/annota3.exp
|
||||
@@ -38,6 +38,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
|
||||
|
||||
clean_restart ${binfile}
|
||||
|
||||
@ -24,3 +38,6 @@ Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/annota3.exp
|
||||
# The commands we test here produce many lines of output; disable "press
|
||||
# <return> to continue" prompts.
|
||||
gdb_test_no_output "set height 0"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,18 +0,0 @@
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.threads/staticthreads.exp
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.threads/staticthreads.exp 2017-02-26 17:24:48.392316045 +0100
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.threads/staticthreads.exp 2017-02-26 17:25:38.649677595 +0100
|
||||
@@ -41,6 +41,13 @@
|
||||
# See if the static multi-threaded program runs.
|
||||
|
||||
runto_main
|
||||
+
|
||||
+# See if we get excessive LWP there (patched glibc with unpatched GDB):
|
||||
+# * 2 Thread 135661664 (LWP 3856) main () at threadloop.c:41
|
||||
+# 1 process 3856 main () at threadloop.c:41
|
||||
+
|
||||
+gdb_test "info threads" "^info threads\r\n\[ \t\]*Id\[ \t\]+Target Id\[ \t\]+Frame\[ \t\]*\r\n\[^\r\n\]* Thread \[^\r\n\]*" "info threads on start"
|
||||
+
|
||||
gdb_test "break sem_post"
|
||||
set test "continue to main's call of sem_post"
|
||||
gdb_test_multiple "continue" "$test" {
|
@ -1,3 +1,13 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.7-charsign-test.patch
|
||||
|
||||
FileName: gdb-6.7-charsign-test.patch
|
||||
|
||||
;; Fix displaying of numeric char arrays as strings (BZ 224128).
|
||||
;;=fedoratest: But it is failing anyway, one should check the behavior more.
|
||||
|
||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=224128
|
||||
|
||||
2007-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
@ -9,11 +19,18 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=224128
|
||||
|
||||
Port to GDB-6.7 - only the testcase left, patch has been reverted,
|
||||
char-vectors restricted.
|
||||
---
|
||||
gdb/testsuite/gdb.base/charsign.c | 37 ++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.base/charsign.exp | 63 +++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 100 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/charsign.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/charsign.exp
|
||||
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/charsign.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/charsign.c 2016-02-15 23:26:06.429811778 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/charsign.c b/gdb/testsuite/gdb.base/charsign.c
|
||||
new file mode 100644
|
||||
index 0000000000..41d175ff9d
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/charsign.c
|
||||
@@ -0,0 +1,37 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -52,10 +69,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/charsign.c
|
||||
+char_n n_typed[]="A";
|
||||
+char_s s_typed[]="A";
|
||||
+char_u u_typed[]="A";
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/charsign.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/charsign.exp 2016-02-15 23:26:12.409854237 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/charsign.exp b/gdb/testsuite/gdb.base/charsign.exp
|
||||
new file mode 100644
|
||||
index 0000000000..b5fa580490
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/charsign.exp
|
||||
@@ -0,0 +1,63 @@
|
||||
+# Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -120,3 +138,6 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/charsign.exp
|
||||
+do_test {}
|
||||
+do_test {-fsigned-char}
|
||||
+do_test {-funsigned-char}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.7-ppc-clobbered-registers-O2-test.patch
|
||||
|
||||
FileName: gdb-6.7-ppc-clobbered-registers-O2-test.patch
|
||||
|
||||
;; Test PPC hiding of call-volatile parameter register.
|
||||
;;=fedoratest
|
||||
|
||||
2007-11-04 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.arch/ppc-clobbered-registers-O2.exp: `powerpc64' changed to
|
||||
@ -12,9 +22,18 @@ http://sourceware.org/ml/gdb-patches/2007-09/msg00228.html
|
||||
* rs6000-tdep.c (ppc_dwarf2_frame_init_reg): New function.
|
||||
* (rs6000_gdbarch_init): Install ppc_dwarf2_frame_init_reg as
|
||||
default dwarf2_frame_set_init_reg function.
|
||||
---
|
||||
.../gdb.arch/ppc-clobbered-registers-O2.c | 21 +++++++++
|
||||
.../gdb.arch/ppc-clobbered-registers-O2.exp | 54 ++++++++++++++++++++++
|
||||
2 files changed, 75 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.c
|
||||
create mode 100644 gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.exp
|
||||
|
||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
||||
+++ ./gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.c 3 Nov 2007 22:22:28 -0000
|
||||
diff --git a/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.c b/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.c
|
||||
new file mode 100644
|
||||
index 0000000000..698ff8a0b5
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.c
|
||||
@@ -0,0 +1,21 @@
|
||||
+
|
||||
+unsigned * __attribute__((noinline))
|
||||
@ -37,8 +56,11 @@ http://sourceware.org/ml/gdb-patches/2007-09/msg00228.html
|
||||
+ y = 14;
|
||||
+ return (int)gen_movsd (&x, &y);
|
||||
+}
|
||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
||||
+++ ./gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.exp 3 Nov 2007 22:22:28 -0000
|
||||
diff --git a/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.exp b/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.exp
|
||||
new file mode 100644
|
||||
index 0000000000..c9ebd0e522
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.exp
|
||||
@@ -0,0 +1,54 @@
|
||||
+# Copyright 2006 Free Software Foundation, Inc.
|
||||
+#
|
||||
@ -94,3 +116,6 @@ http://sourceware.org/ml/gdb-patches/2007-09/msg00228.html
|
||||
+
|
||||
+gdb_test backtrace ".*operand0=<value optimized out>.*operand1=<value optimized out>.*" \
|
||||
+ "Check value of call clobbered registers"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.7-testsuite-stable-results.patch
|
||||
|
||||
FileName: gdb-6.7-testsuite-stable-results.patch
|
||||
|
||||
;; Testsuite fixes for more stable/comparable results.
|
||||
;;=fedoratest
|
||||
|
||||
gdb/testsuite/gdb.base/fileio.c:
|
||||
gdb/testsuite/gdb.base/fileio.exp:
|
||||
2007-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
@ -8,23 +18,24 @@ gdb/testsuite/gdb.base/fileio.exp:
|
||||
* gdb.base/fileio.exp: Change the startup and finish cleanup.
|
||||
Change the test file reference to be into the `fileio.dir' directory.
|
||||
|
||||
|
||||
sources/gdb/testsuite/gdb.base/dump.exp:
|
||||
Found on RHEL-5.s390x.
|
||||
|
||||
|
||||
gdb-6.8.50.20090209/gdb/testsuite/gdb.base/auxv.exp:
|
||||
random FAIL: gdb.base/auxv.exp: matching auxv data from live and gcore
|
||||
|
||||
|
||||
gdb-6.8.50.20090209/gdb/testsuite/gdb.base/annota1.exp:
|
||||
frames-invalid can happen asynchronously.
|
||||
---
|
||||
gdb/testsuite/gdb.base/fileio.c | 22 ++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.base/fileio.exp | 13 ++++++-------
|
||||
2 files changed, 28 insertions(+), 7 deletions(-)
|
||||
|
||||
Index: gdb-7.12/gdb/testsuite/gdb.base/fileio.c
|
||||
===================================================================
|
||||
--- gdb-7.12.orig/gdb/testsuite/gdb.base/fileio.c 2016-08-01 17:50:21.000000000 +0200
|
||||
+++ gdb-7.12/gdb/testsuite/gdb.base/fileio.c 2016-10-07 22:49:20.689346914 +0200
|
||||
@@ -556,6 +556,28 @@
|
||||
diff --git a/gdb/testsuite/gdb.base/fileio.c b/gdb/testsuite/gdb.base/fileio.c
|
||||
index 7f482a34d3..1caadbae84 100644
|
||||
--- a/gdb/testsuite/gdb.base/fileio.c
|
||||
+++ b/gdb/testsuite/gdb.base/fileio.c
|
||||
@@ -560,6 +560,28 @@ strerrno (int err)
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@ -53,11 +64,11 @@ Index: gdb-7.12/gdb/testsuite/gdb.base/fileio.c
|
||||
/* Don't change the order of the calls. They partly depend on each other */
|
||||
test_open ();
|
||||
test_write ();
|
||||
Index: gdb-7.12/gdb/testsuite/gdb.base/fileio.exp
|
||||
===================================================================
|
||||
--- gdb-7.12.orig/gdb/testsuite/gdb.base/fileio.exp 2016-08-01 17:50:21.000000000 +0200
|
||||
+++ gdb-7.12/gdb/testsuite/gdb.base/fileio.exp 2016-10-07 22:54:44.680071906 +0200
|
||||
@@ -24,9 +24,9 @@
|
||||
diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.exp
|
||||
index bc409c26aa..e1e5e2e5d0 100644
|
||||
--- a/gdb/testsuite/gdb.base/fileio.exp
|
||||
+++ b/gdb/testsuite/gdb.base/fileio.exp
|
||||
@@ -24,9 +24,9 @@ if [target_info exists gdb,nofileio] {
|
||||
standard_testfile
|
||||
|
||||
if {[is_remote host]} {
|
||||
@ -69,7 +80,7 @@ Index: gdb-7.12/gdb/testsuite/gdb.base/fileio.exp
|
||||
}
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
|
||||
@@ -47,7 +47,8 @@
|
||||
@@ -47,7 +47,8 @@ set dir2 [standard_output_file dir2.fileio.test]
|
||||
if {[file exists $dir2] && ![file writable $dir2]} {
|
||||
system "chmod +w $dir2"
|
||||
}
|
||||
@ -79,7 +90,7 @@ Index: gdb-7.12/gdb/testsuite/gdb.base/fileio.exp
|
||||
|
||||
set oldtimeout $timeout
|
||||
set timeout [expr "$timeout + 60"]
|
||||
@@ -89,7 +90,7 @@
|
||||
@@ -89,7 +90,7 @@ gdb_test continue \
|
||||
|
||||
gdb_test "continue" ".*" ""
|
||||
|
||||
@ -88,7 +99,7 @@ Index: gdb-7.12/gdb/testsuite/gdb.base/fileio.exp
|
||||
|
||||
gdb_test continue \
|
||||
"Continuing\\..*open 5:.*EACCES$stop_msg" \
|
||||
@@ -276,9 +277,7 @@
|
||||
@@ -276,9 +277,7 @@ gdb_test continue \
|
||||
gdb_exit
|
||||
|
||||
# Make dir2 writable again so rm -rf of a build tree Just Works.
|
||||
@ -99,3 +110,6 @@ Index: gdb-7.12/gdb/testsuite/gdb.base/fileio.exp
|
||||
|
||||
set timeout $oldtimeout
|
||||
return 0
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,8 +1,24 @@
|
||||
Index: gdb-7.99.90.20170420/gdb/infrun.c
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/infrun.c 2017-04-20 23:19:16.056434309 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/infrun.c 2017-04-20 23:19:22.932480367 +0200
|
||||
@@ -620,6 +620,13 @@
|
||||
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.8-attach-signalled-detach-stopped.patch
|
||||
|
||||
FileName: gdb-6.8-attach-signalled-detach-stopped.patch
|
||||
|
||||
;; [RHEL5,RHEL6] Fix attaching to stopped processes.
|
||||
;; [RHEL5] Workaround kernel for detaching SIGSTOPped processes (BZ 809382).
|
||||
;;=fedora
|
||||
---
|
||||
gdb/infrun.c | 7 ++++
|
||||
gdb/linux-nat.c | 45 +++++++++++++++++++++
|
||||
gdb/testsuite/gdb.threads/attach-stopped.exp | 60 +++++++++++++++++++++++++++-
|
||||
3 files changed, 111 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/infrun.c b/gdb/infrun.c
|
||||
index b468d02fd6..16561dd119 100644
|
||||
--- a/gdb/infrun.c
|
||||
+++ b/gdb/infrun.c
|
||||
@@ -606,6 +606,13 @@ holding the child stopped. Try \"set detach-on-fork\" or \
|
||||
target_pid_to_str (process_ptid));
|
||||
}
|
||||
|
||||
@ -16,11 +32,11 @@ Index: gdb-7.99.90.20170420/gdb/infrun.c
|
||||
target_detach (NULL, 0);
|
||||
}
|
||||
|
||||
Index: gdb-7.99.90.20170420/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/linux-nat.c 2017-04-20 23:19:16.058434322 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/linux-nat.c 2017-04-20 23:19:22.933480373 +0200
|
||||
@@ -194,6 +194,11 @@
|
||||
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
|
||||
index 1570a2bcb6..a101fbbe33 100644
|
||||
--- a/gdb/linux-nat.c
|
||||
+++ b/gdb/linux-nat.c
|
||||
@@ -194,6 +194,11 @@ enum tribool have_ptrace_getregset = TRIBOOL_UNKNOWN;
|
||||
static struct target_ops *linux_ops;
|
||||
static struct target_ops linux_ops_saved;
|
||||
|
||||
@ -32,7 +48,7 @@ Index: gdb-7.99.90.20170420/gdb/linux-nat.c
|
||||
/* The method to call, if any, when a new thread is attached. */
|
||||
static void (*linux_nat_new_thread) (struct lwp_info *);
|
||||
|
||||
@@ -1055,6 +1060,9 @@
|
||||
@@ -1065,6 +1070,9 @@ linux_nat_post_attach_wait (ptid_t ptid, int *signalled)
|
||||
if (debug_linux_nat)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"LNPAW: Attaching to a stopped process\n");
|
||||
@ -42,7 +58,7 @@ Index: gdb-7.99.90.20170420/gdb/linux-nat.c
|
||||
|
||||
/* The process is definitely stopped. It is in a job control
|
||||
stop, unless the kernel predates the TASK_STOPPED /
|
||||
@@ -1412,6 +1420,25 @@
|
||||
@@ -1420,6 +1428,25 @@ get_detach_signal (struct lwp_info *lp)
|
||||
return gdb_signal_to_host (signo);
|
||||
}
|
||||
|
||||
@ -68,7 +84,7 @@ Index: gdb-7.99.90.20170420/gdb/linux-nat.c
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1570,6 +1597,10 @@
|
||||
@@ -1578,6 +1605,10 @@ linux_nat_detach (struct target_ops *ops, const char *args, int from_tty)
|
||||
detach_one_lwp (main_lwp, &signo);
|
||||
|
||||
inf_ptrace_detach_success (ops);
|
||||
@ -79,7 +95,7 @@ Index: gdb-7.99.90.20170420/gdb/linux-nat.c
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1830,6 +1861,16 @@
|
||||
@@ -1838,6 +1869,16 @@ linux_nat_resume (struct target_ops *ops,
|
||||
return;
|
||||
}
|
||||
|
||||
@ -96,7 +112,7 @@ Index: gdb-7.99.90.20170420/gdb/linux-nat.c
|
||||
if (resume_many)
|
||||
iterate_over_lwps (ptid, linux_nat_resume_callback, lp);
|
||||
|
||||
@@ -3826,6 +3867,10 @@
|
||||
@@ -3830,6 +3871,10 @@ linux_nat_mourn_inferior (struct target_ops *ops)
|
||||
|
||||
/* Let the arch-specific native code know this process is gone. */
|
||||
linux_nat_forget_process (pid);
|
||||
@ -107,11 +123,11 @@ Index: gdb-7.99.90.20170420/gdb/linux-nat.c
|
||||
}
|
||||
|
||||
/* Convert a native/host siginfo object, into/from the siginfo in the
|
||||
Index: gdb-7.99.90.20170420/gdb/testsuite/gdb.threads/attach-stopped.exp
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2017-04-20 23:19:16.059434329 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/testsuite/gdb.threads/attach-stopped.exp 2017-04-20 23:19:22.933480373 +0200
|
||||
@@ -56,7 +56,65 @@
|
||||
diff --git a/gdb/testsuite/gdb.threads/attach-stopped.exp b/gdb/testsuite/gdb.threads/attach-stopped.exp
|
||||
index 6c8c8bf10e..c953a9c60d 100644
|
||||
--- a/gdb/testsuite/gdb.threads/attach-stopped.exp
|
||||
+++ b/gdb/testsuite/gdb.threads/attach-stopped.exp
|
||||
@@ -56,7 +56,65 @@ proc corefunc { threadtype } {
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
|
||||
@ -178,3 +194,6 @@ Index: gdb-7.99.90.20170420/gdb/testsuite/gdb.threads/attach-stopped.exp
|
||||
|
||||
set test "$threadtype: attach2 to stopped, after setting file"
|
||||
gdb_test_multiple "attach $testpid" "$test" {
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,8 +1,21 @@
|
||||
Index: gdb-7.12.50.20170207/gdb/valops.c
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170207.orig/gdb/valops.c 2017-02-26 17:26:43.839146565 +0100
|
||||
+++ gdb-7.12.50.20170207/gdb/valops.c 2017-02-26 17:28:40.840988272 +0100
|
||||
@@ -1112,6 +1112,8 @@
|
||||
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.8-bz436037-reg-no-longer-active.patch
|
||||
|
||||
FileName: gdb-6.8-bz436037-reg-no-longer-active.patch
|
||||
|
||||
;; Fix register assignments with no GDB stack frames (BZ 436037).
|
||||
;;=push+jan: This fix is incorrect.
|
||||
---
|
||||
gdb/valops.c | 12 ++++++++++--
|
||||
1 file changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gdb/valops.c b/gdb/valops.c
|
||||
index 9b25980090..7aacd17d70 100644
|
||||
--- a/gdb/valops.c
|
||||
+++ b/gdb/valops.c
|
||||
@@ -1103,6 +1103,8 @@ value_assign (struct value *toval, struct value *fromval)
|
||||
struct gdbarch *gdbarch;
|
||||
int value_reg;
|
||||
|
||||
@ -11,7 +24,7 @@ Index: gdb-7.12.50.20170207/gdb/valops.c
|
||||
/* Figure out which frame this is in currently.
|
||||
|
||||
We use VALUE_FRAME_ID for obtaining the value's frame id instead of
|
||||
@@ -1121,8 +1123,14 @@
|
||||
@@ -1112,8 +1114,14 @@ value_assign (struct value *toval, struct value *fromval)
|
||||
frame. */
|
||||
frame = frame_find_by_id (VALUE_FRAME_ID (toval));
|
||||
|
||||
@ -28,3 +41,6 @@ Index: gdb-7.12.50.20170207/gdb/valops.c
|
||||
if (!frame)
|
||||
error (_("Value being assigned to is no longer active."));
|
||||
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,9 +1,23 @@
|
||||
Test various forms of threads tracking across exec(2).
|
||||
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.8-bz442765-threaded-exec-test.patch
|
||||
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.c
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/testsuite/gdb.threads/threaded-exec.c 2016-02-16 09:54:45.157163049 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.c 2016-02-16 09:54:46.210170175 +0100
|
||||
FileName: gdb-6.8-bz442765-threaded-exec-test.patch
|
||||
|
||||
;; Test various forms of threads tracking across exec() (BZ 442765).
|
||||
;;=fedoratest
|
||||
|
||||
Test various forms of threads tracking across exec(2).
|
||||
---
|
||||
gdb/testsuite/gdb.threads/threaded-exec.c | 111 ++++++++++++++++++++++++++--
|
||||
gdb/testsuite/gdb.threads/threaded-exec.exp | 13 +++-
|
||||
2 files changed, 115 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.threads/threaded-exec.c b/gdb/testsuite/gdb.threads/threaded-exec.c
|
||||
index 522b24671d..7079317d3a 100644
|
||||
--- a/gdb/testsuite/gdb.threads/threaded-exec.c
|
||||
+++ b/gdb/testsuite/gdb.threads/threaded-exec.c
|
||||
@@ -18,21 +18,95 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
@ -103,7 +117,7 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.c
|
||||
pthread_t t1;
|
||||
int i;
|
||||
|
||||
@@ -40,7 +114,34 @@
|
||||
@@ -40,7 +114,34 @@ main (void)
|
||||
assert (i == 0);
|
||||
i = pthread_join (t1, NULL);
|
||||
assert (i == 0);
|
||||
@ -140,10 +154,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.c
|
||||
+ execl (cmd, cmd, exec_nothreads, exec_threads, phase_s, NULL);
|
||||
+ assert (0);
|
||||
}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.exp
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/testsuite/gdb.threads/threaded-exec.exp 2016-02-16 09:54:45.157163049 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.exp 2016-02-16 09:55:27.397448879 +0100
|
||||
diff --git a/gdb/testsuite/gdb.threads/threaded-exec.exp b/gdb/testsuite/gdb.threads/threaded-exec.exp
|
||||
index 77c8a7dc85..8c43162b36 100644
|
||||
--- a/gdb/testsuite/gdb.threads/threaded-exec.exp
|
||||
+++ b/gdb/testsuite/gdb.threads/threaded-exec.exp
|
||||
@@ -20,9 +20,14 @@
|
||||
|
||||
set testfile threaded-exec
|
||||
@ -161,7 +175,7 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
@@ -30,9 +35,9 @@
|
||||
@@ -30,9 +35,9 @@ gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
|
||||
@ -173,3 +187,6 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.exp
|
||||
|
||||
gdb_test_multiple {} "Program exited" {
|
||||
-re "\r\n\\\[Inferior .* exited normally\\\]\r\n$gdb_prompt $" {
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,147 +1,28 @@
|
||||
Fix resolving of variables at locations lists in prelinked libs (BZ 466901).
|
||||
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.8-bz466901-backtrace-full-prelinked.patch
|
||||
|
||||
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp 2009-09-09 20:10:35.000000000 +0200
|
||||
@@ -0,0 +1,102 @@
|
||||
+# 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.
|
||||
+
|
||||
+# Minimal DWARF-2 unit test
|
||||
+
|
||||
+# This test can only be run on i386/x86_64 targets which support DWARF-2.
|
||||
+# For now pick a sampling of likely targets.
|
||||
+if {(![istarget *-*-linux*]
|
||||
+ && ![istarget *-*-gnu*]
|
||||
+ && ![istarget *-*-elf*]
|
||||
+ && ![istarget *-*-openbsd*])
|
||||
+ || (![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"])} {
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+set testfile "dw2-loclist-prelinked"
|
||||
+set srcfuncfile ${testfile}-func.S
|
||||
+set binsharedfuncfile [standard_output_file ${testfile}.so]
|
||||
+set srcmainfile ${testfile}-main.c
|
||||
+set binfile [standard_output_file ${testfile}]
|
||||
+
|
||||
+remote_exec build "rm -f ${binfile}"
|
||||
+
|
||||
+# get the value of gcc_compiled
|
||||
+if [get_compiler_info ${binfile}] {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# This test can only be run on gcc as we use additional_flags=FIXME
|
||||
+if {$gcc_compiled == 0} {
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcfuncfile}" "${binsharedfuncfile}" {debug additional_flags=-m32}] != "" } {
|
||||
+ untested "Couldn't compile test library"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# The new separate debug info file will be stored in the .debug subdirectory.
|
||||
+
|
||||
+if [gdb_gnu_strip_debug ${binsharedfuncfile}] {
|
||||
+ # check that you have a recent version of strip and objcopy installed
|
||||
+ unsupported "cannot produce separate debug info files"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if {[catch "system \"/usr/sbin/prelink -qNR --no-exec-shield ${binsharedfuncfile}\""] != 0} {
|
||||
+ # Maybe we don't have prelink.
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcmainfile}" \
|
||||
+ "${binfile}" executable [list debug additional_flags=-m32 shlib=${binsharedfuncfile}]] != "" } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load ${binfile}
|
||||
+
|
||||
+gdb_run_cmd
|
||||
+
|
||||
+gdb_test "" "Program received signal SIGABRT, Aborted..*" "Enter abort()"
|
||||
+
|
||||
+# Incorrect:
|
||||
+# #0 0x00110430 in __kernel_vsyscall ()
|
||||
+# No symbol table info available.
|
||||
+# #1 0x003d44c0 in raise () from /lib/libc.so.6
|
||||
+# No symbol table info available.
|
||||
+# #2 0x003d5e88 in abort () from /lib/libc.so.6
|
||||
+# No symbol table info available.
|
||||
+# #3 0x44f10437 in func () at dw2-loclist-prelinked.c:8
|
||||
+# i = Could not find the frame base for "func".
|
||||
+
|
||||
+# Correct:
|
||||
+# #0 0x00110430 in __kernel_vsyscall ()
|
||||
+# No symbol table info available.
|
||||
+# #1 0x003d44c0 in raise () from /lib/libc.so.6
|
||||
+# No symbol table info available.
|
||||
+# #2 0x003d5e88 in abort () from /lib/libc.so.6
|
||||
+# No symbol table info available.
|
||||
+# #3 0x4ae36437 in func () at dw2-loclist-prelinked.c:8
|
||||
+# i = 3827288
|
||||
+# #4 0x0804851a in main () at ../../../gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c:24
|
||||
+# No locals.
|
||||
+
|
||||
+# `abort' can get expressed as `*__GI_abort'.
|
||||
+gdb_test "bt full" "in \[^ \]*abort \\(.*in func \\(.*\r\n\[\t \]+i = -?\[0-9\].*in main \\(.*" "Backtrace after abort()"
|
||||
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c 2009-09-09 20:10:35.000000000 +0200
|
||||
@@ -0,0 +1,26 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ 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/>. */
|
||||
+
|
||||
+/* dw2-loclist-prelinked-func.S */
|
||||
+extern void func (void);
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ func ();
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S 2009-09-09 20:10:35.000000000 +0200
|
||||
FileName: gdb-6.8-bz466901-backtrace-full-prelinked.patch
|
||||
|
||||
;; Fix resolving of variables at locations lists in prelinked libs (BZ 466901).
|
||||
;;=fedoratest
|
||||
|
||||
Fix resolving of variables at locations lists in prelinked libs (BZ 466901).
|
||||
---
|
||||
.../gdb.dwarf2/dw2-loclist-prelinked-func.S | 328 +++++++++++++++++++++
|
||||
.../gdb.dwarf2/dw2-loclist-prelinked-main.c | 26 ++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp | 102 +++++++
|
||||
3 files changed, 456 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S
|
||||
new file mode 100644
|
||||
index 0000000000..442c4d00a1
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S
|
||||
@@ -0,0 +1,328 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -471,3 +352,146 @@ Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S
|
||||
+ .string "short int"
|
||||
+ .ident "GCC: (GNU) 4.3.2 20081007 (Red Hat 4.3.2-6)"
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c
|
||||
new file mode 100644
|
||||
index 0000000000..57386999ce
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c
|
||||
@@ -0,0 +1,26 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ 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/>. */
|
||||
+
|
||||
+/* dw2-loclist-prelinked-func.S */
|
||||
+extern void func (void);
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ func ();
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp
|
||||
new file mode 100644
|
||||
index 0000000000..30d0473336
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp
|
||||
@@ -0,0 +1,102 @@
|
||||
+# 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.
|
||||
+
|
||||
+# Minimal DWARF-2 unit test
|
||||
+
|
||||
+# This test can only be run on i386/x86_64 targets which support DWARF-2.
|
||||
+# For now pick a sampling of likely targets.
|
||||
+if {(![istarget *-*-linux*]
|
||||
+ && ![istarget *-*-gnu*]
|
||||
+ && ![istarget *-*-elf*]
|
||||
+ && ![istarget *-*-openbsd*])
|
||||
+ || (![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"])} {
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+set testfile "dw2-loclist-prelinked"
|
||||
+set srcfuncfile ${testfile}-func.S
|
||||
+set binsharedfuncfile [standard_output_file ${testfile}.so]
|
||||
+set srcmainfile ${testfile}-main.c
|
||||
+set binfile [standard_output_file ${testfile}]
|
||||
+
|
||||
+remote_exec build "rm -f ${binfile}"
|
||||
+
|
||||
+# get the value of gcc_compiled
|
||||
+if [get_compiler_info ${binfile}] {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# This test can only be run on gcc as we use additional_flags=FIXME
|
||||
+if {$gcc_compiled == 0} {
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcfuncfile}" "${binsharedfuncfile}" {debug additional_flags=-m32}] != "" } {
|
||||
+ untested "Couldn't compile test library"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# The new separate debug info file will be stored in the .debug subdirectory.
|
||||
+
|
||||
+if [gdb_gnu_strip_debug ${binsharedfuncfile}] {
|
||||
+ # check that you have a recent version of strip and objcopy installed
|
||||
+ unsupported "cannot produce separate debug info files"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if {[catch "system \"/usr/sbin/prelink -qNR --no-exec-shield ${binsharedfuncfile}\""] != 0} {
|
||||
+ # Maybe we don't have prelink.
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcmainfile}" \
|
||||
+ "${binfile}" executable [list debug additional_flags=-m32 shlib=${binsharedfuncfile}]] != "" } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load ${binfile}
|
||||
+
|
||||
+gdb_run_cmd
|
||||
+
|
||||
+gdb_test "" "Program received signal SIGABRT, Aborted..*" "Enter abort()"
|
||||
+
|
||||
+# Incorrect:
|
||||
+# #0 0x00110430 in __kernel_vsyscall ()
|
||||
+# No symbol table info available.
|
||||
+# #1 0x003d44c0 in raise () from /lib/libc.so.6
|
||||
+# No symbol table info available.
|
||||
+# #2 0x003d5e88 in abort () from /lib/libc.so.6
|
||||
+# No symbol table info available.
|
||||
+# #3 0x44f10437 in func () at dw2-loclist-prelinked.c:8
|
||||
+# i = Could not find the frame base for "func".
|
||||
+
|
||||
+# Correct:
|
||||
+# #0 0x00110430 in __kernel_vsyscall ()
|
||||
+# No symbol table info available.
|
||||
+# #1 0x003d44c0 in raise () from /lib/libc.so.6
|
||||
+# No symbol table info available.
|
||||
+# #2 0x003d5e88 in abort () from /lib/libc.so.6
|
||||
+# No symbol table info available.
|
||||
+# #3 0x4ae36437 in func () at dw2-loclist-prelinked.c:8
|
||||
+# i = 3827288
|
||||
+# #4 0x0804851a in main () at ../../../gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c:24
|
||||
+# No locals.
|
||||
+
|
||||
+# `abort' can get expressed as `*__GI_abort'.
|
||||
+gdb_test "bt full" "in \[^ \]*abort \\(.*in func \\(.*\r\n\[\t \]+i = -?\[0-9\].*in main \\(.*" "Backtrace after abort()"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,15 +1,31 @@
|
||||
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.8-quit-never-aborts.patch
|
||||
|
||||
FileName: gdb-6.8-quit-never-aborts.patch
|
||||
|
||||
;; Make the GDB quit processing non-abortable to cleanup everything properly.
|
||||
;;=fedora: It was useful only after gdb-6.8-attach-signalled-detach-stopped.patch .
|
||||
|
||||
We may abort the process of detaching threads with multiple SIGINTs - which are
|
||||
being sent during a testcase terminating its child GDB.
|
||||
|
||||
Some of the threads may not be properly PTRACE_DETACHed which hurts if they
|
||||
should have been detached with SIGSTOP (as they are accidentally left running
|
||||
on the debugger termination).
|
||||
---
|
||||
gdb/defs.h | 4 ++++
|
||||
gdb/extension.c | 5 +++++
|
||||
gdb/top.c | 6 ++++++
|
||||
gdb/utils.c | 7 +++++++
|
||||
4 files changed, 22 insertions(+)
|
||||
|
||||
Index: gdb-7.12.50.20170207/gdb/defs.h
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170207.orig/gdb/defs.h 2017-02-26 21:11:35.654350580 +0100
|
||||
+++ gdb-7.12.50.20170207/gdb/defs.h 2017-02-26 21:11:52.932473129 +0100
|
||||
@@ -169,6 +169,10 @@
|
||||
diff --git a/gdb/defs.h b/gdb/defs.h
|
||||
index 0c156d56c3..9a7f4d52b0 100644
|
||||
--- a/gdb/defs.h
|
||||
+++ b/gdb/defs.h
|
||||
@@ -168,6 +168,10 @@ extern void default_quit_handler (void);
|
||||
/* Flag that function quit should call quit_force. */
|
||||
extern volatile int sync_quit_force_run;
|
||||
|
||||
@ -20,11 +36,11 @@ Index: gdb-7.12.50.20170207/gdb/defs.h
|
||||
extern void quit (void);
|
||||
|
||||
/* Helper for the QUIT macro. */
|
||||
Index: gdb-7.12.50.20170207/gdb/extension.c
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170207.orig/gdb/extension.c 2017-02-26 21:11:35.655350587 +0100
|
||||
+++ gdb-7.12.50.20170207/gdb/extension.c 2017-02-26 21:11:52.933473136 +0100
|
||||
@@ -830,6 +830,11 @@
|
||||
diff --git a/gdb/extension.c b/gdb/extension.c
|
||||
index a1ee3510a6..229d702270 100644
|
||||
--- a/gdb/extension.c
|
||||
+++ b/gdb/extension.c
|
||||
@@ -830,6 +830,11 @@ check_quit_flag (void)
|
||||
int i, result = 0;
|
||||
const struct extension_language_defn *extlang;
|
||||
|
||||
@ -36,11 +52,11 @@ Index: gdb-7.12.50.20170207/gdb/extension.c
|
||||
ALL_ENABLED_EXTENSION_LANGUAGES (i, extlang)
|
||||
{
|
||||
if (extlang->ops->check_quit_flag != NULL)
|
||||
Index: gdb-7.12.50.20170207/gdb/top.c
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170207.orig/gdb/top.c 2017-02-26 21:11:35.655350587 +0100
|
||||
+++ gdb-7.12.50.20170207/gdb/top.c 2017-02-26 21:11:52.933473136 +0100
|
||||
@@ -1619,7 +1619,13 @@
|
||||
diff --git a/gdb/top.c b/gdb/top.c
|
||||
index 4749cf561d..e2665c8e22 100644
|
||||
--- a/gdb/top.c
|
||||
+++ b/gdb/top.c
|
||||
@@ -1580,7 +1580,13 @@ quit_force (int *exit_arg, int from_tty)
|
||||
qt.args = NULL;
|
||||
qt.from_tty = from_tty;
|
||||
|
||||
@ -54,13 +70,13 @@ Index: gdb-7.12.50.20170207/gdb/top.c
|
||||
|
||||
/* Get out of tfind mode, and kill or detach all inferiors. */
|
||||
TRY
|
||||
Index: gdb-7.12.50.20170207/gdb/utils.c
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170207.orig/gdb/utils.c 2017-02-26 21:11:35.657350601 +0100
|
||||
+++ gdb-7.12.50.20170207/gdb/utils.c 2017-02-26 21:11:52.934473143 +0100
|
||||
@@ -106,6 +106,13 @@
|
||||
diff --git a/gdb/utils.c b/gdb/utils.c
|
||||
index 6f0abc98a2..58c0380d17 100644
|
||||
--- a/gdb/utils.c
|
||||
+++ b/gdb/utils.c
|
||||
@@ -107,6 +107,13 @@ static std::chrono::steady_clock::duration prompt_for_continue_wait_time;
|
||||
|
||||
int job_control;
|
||||
static int debug_timestamp = 0;
|
||||
|
||||
+#ifdef NEED_DETACH_SIGSTOP
|
||||
+/* Nonzero means we are already processing the quitting cleanups and we should
|
||||
@ -72,3 +88,6 @@ Index: gdb-7.12.50.20170207/gdb/utils.c
|
||||
/* Nonzero means that strings with character values >0x7F should be printed
|
||||
as octal escapes. Zero means just print the value (e.g. it's an
|
||||
international character, and the terminal or window can cope.) */
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,8 +1,21 @@
|
||||
Index: gdb-7.4.50.20111218/gdb/sparc-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20111218.orig/gdb/sparc-tdep.c 2011-09-28 19:59:42.000000000 +0200
|
||||
+++ gdb-7.4.50.20111218/gdb/sparc-tdep.c 2011-12-19 01:25:29.294046199 +0100
|
||||
@@ -1316,6 +1316,7 @@ sparc32_store_return_value (struct type
|
||||
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.8-sparc64-silence-memcpy-check.patch
|
||||
|
||||
FileName: gdb-6.8-sparc64-silence-memcpy-check.patch
|
||||
|
||||
;; Silence memcpy check which returns false positive (sparc64)
|
||||
;;=push: But it is just a GCC workaround, look up the existing GCC PR for it.
|
||||
---
|
||||
gdb/sparc-tdep.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
|
||||
index 12fd5b9e64..e304ba8dbc 100644
|
||||
--- a/gdb/sparc-tdep.c
|
||||
+++ b/gdb/sparc-tdep.c
|
||||
@@ -1444,6 +1444,7 @@ sparc32_store_return_value (struct type *type, struct regcache *regcache,
|
||||
if (sparc_floating_p (type) || sparc_complex_floating_p (type))
|
||||
{
|
||||
/* Floating return values. */
|
||||
@ -10,3 +23,6 @@ Index: gdb-7.4.50.20111218/gdb/sparc-tdep.c
|
||||
memcpy (buf, valbuf, len);
|
||||
regcache_cooked_write (regcache, SPARC_F0_REGNUM, buf);
|
||||
if (len > 4)
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,11 +1,65 @@
|
||||
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.8-watchpoint-conditionals-test.patch
|
||||
|
||||
FileName: gdb-6.8-watchpoint-conditionals-test.patch
|
||||
|
||||
;; Test the watchpoints conditionals works.
|
||||
;;=fedoratest
|
||||
|
||||
For:
|
||||
http://sourceware.org/ml/gdb-patches/2008-04/msg00379.html
|
||||
http://sourceware.org/ml/gdb-cvs/2008-04/msg00104.html
|
||||
---
|
||||
gdb/testsuite/gdb.base/watchpoint-cond.c | 31 +++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.base/watchpoint-cond.exp | 37 ++++++++++++++++++++++++++++++
|
||||
2 files changed, 68 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/watchpoint-cond.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/watchpoint-cond.exp
|
||||
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-cond.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-cond.exp 2016-02-15 23:33:49.519099759 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/watchpoint-cond.c b/gdb/testsuite/gdb.base/watchpoint-cond.c
|
||||
new file mode 100644
|
||||
index 0000000000..d4ec581946
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/watchpoint-cond.c
|
||||
@@ -0,0 +1,31 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ 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/>.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@prep.ai.mit.edu */
|
||||
+
|
||||
+int
|
||||
+main (int argc, char **argv)
|
||||
+{
|
||||
+ static int i = 0; /* `static' to start initialized. */
|
||||
+ int j = 2;
|
||||
+
|
||||
+ for (j = 0; j < 30; j++)
|
||||
+ i = 30 - j;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/watchpoint-cond.exp b/gdb/testsuite/gdb.base/watchpoint-cond.exp
|
||||
new file mode 100644
|
||||
index 0000000000..31d5b602aa
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/watchpoint-cond.exp
|
||||
@@ -0,0 +1,37 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -44,39 +98,6 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-cond.exp
|
||||
+
|
||||
+gdb_test "watch i if i < 20" "atchpoint \[0-9\]+: i"
|
||||
+gdb_test "cont" "atchpoint \[0-9\]+: i.*Old value = 20.*New value = 19.*"
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-cond.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-cond.c 2016-02-15 23:32:51.974691188 +0100
|
||||
@@ -0,0 +1,31 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ 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/>.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@prep.ai.mit.edu */
|
||||
+
|
||||
+int
|
||||
+main (int argc, char **argv)
|
||||
+{
|
||||
+ static int i = 0; /* `static' to start initialized. */
|
||||
+ int j = 2;
|
||||
+
|
||||
+ for (j = 0; j < 30; j++)
|
||||
+ i = 30 - j;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,7 +1,30 @@
|
||||
Index: gdb-7.9.90.20150709/gdb/gdb_bfd.c
|
||||
===================================================================
|
||||
--- gdb-7.9.90.20150709.orig/gdb/gdb_bfd.c 2015-07-09 18:23:59.344017882 +0200
|
||||
+++ gdb-7.9.90.20150709/gdb/gdb_bfd.c 2015-07-09 18:24:06.986083071 +0200
|
||||
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-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
|
||||
|
||||
FileName: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
|
||||
|
||||
;; Toolchain on sparc is slightly broken and debuginfo files are generated
|
||||
;; with non 64bit aligned tables/offsets.
|
||||
;; See for example readelf -S ../Xvnc.debug.
|
||||
;;
|
||||
;; As a consenquence calculation of sectp->filepos as used in
|
||||
;; dwarf2_read_section (gdb/dwarf2read.c:1525) will return a non aligned buffer
|
||||
;; that cannot be used directly as done with MMAP.
|
||||
;; Usage will result in a BusError.
|
||||
;;
|
||||
;; While we figure out what's wrong in the toolchain and do a full archive
|
||||
;; rebuild to fix it, we need to be able to use gdb :)
|
||||
;;=push
|
||||
---
|
||||
gdb/gdb_bfd.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/gdb/gdb_bfd.c b/gdb/gdb_bfd.c
|
||||
index 80ddd427af..3e4d3e4444 100644
|
||||
--- a/gdb/gdb_bfd.c
|
||||
+++ b/gdb/gdb_bfd.c
|
||||
@@ -24,12 +24,14 @@
|
||||
#include "hashtab.h"
|
||||
#include "filestuff.h"
|
||||
@ -17,7 +40,7 @@ Index: gdb-7.9.90.20150709/gdb/gdb_bfd.c
|
||||
#include "target.h"
|
||||
#include "gdb/fileio.h"
|
||||
#include "inferior.h"
|
||||
@@ -397,6 +399,7 @@ free_one_bfd_section (bfd *abfd, asectio
|
||||
@@ -484,6 +486,7 @@ free_one_bfd_section (bfd *abfd, asection *sectp, void *ignore)
|
||||
|
||||
if (sect != NULL && sect->data != NULL)
|
||||
{
|
||||
@ -25,15 +48,15 @@ Index: gdb-7.9.90.20150709/gdb/gdb_bfd.c
|
||||
#ifdef HAVE_MMAP
|
||||
if (sect->map_addr != NULL)
|
||||
{
|
||||
@@ -407,6 +410,7 @@ free_one_bfd_section (bfd *abfd, asectio
|
||||
@@ -493,6 +496,7 @@ free_one_bfd_section (bfd *abfd, asection *sectp, void *ignore)
|
||||
gdb_assert (res == 0);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
+#endif
|
||||
#endif
|
||||
xfree (sect->data);
|
||||
}
|
||||
}
|
||||
@@ -558,6 +562,7 @@ gdb_bfd_map_section (asection *sectp, bf
|
||||
@@ -659,6 +663,7 @@ gdb_bfd_map_section (asection *sectp, bfd_size_type *size)
|
||||
if (descriptor->data != NULL)
|
||||
goto done;
|
||||
|
||||
@ -41,7 +64,7 @@ Index: gdb-7.9.90.20150709/gdb/gdb_bfd.c
|
||||
#ifdef HAVE_MMAP
|
||||
if (!bfd_is_section_compressed (abfd, sectp))
|
||||
{
|
||||
@@ -592,6 +597,7 @@ gdb_bfd_map_section (asection *sectp, bf
|
||||
@@ -693,6 +698,7 @@ gdb_bfd_map_section (asection *sectp, bfd_size_type *size)
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_MMAP */
|
||||
@ -49,3 +72,6 @@ Index: gdb-7.9.90.20150709/gdb/gdb_bfd.c
|
||||
|
||||
/* Handle compressed sections, or ordinary uncompressed sections in
|
||||
the no-mmap case. */
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9da134b6d42100d7738174dfd646eb2e0f2e834ca28ee3ff6bd0772a63c9e6f5
|
||||
size 28051531
|
3
gdb-8.1.tar.bz2
Normal file
3
gdb-8.1.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9cdcfe72c9af064d3becce06047bbfd7446fa49812db01ef4d5caa97b4dfa082
|
||||
size 28966596
|
@ -1,69 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2017-01/msg00110.html
|
||||
Subject: [patch] contrib/gdb-add-index.sh: chmod u+w
|
||||
|
||||
|
||||
--AhhlLboLdkugWU4S
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Disposition: inline
|
||||
|
||||
Hi,
|
||||
|
||||
in Fedora 24 it still worked, in Fedora 25 it does not - *-debuginfo.rpm
|
||||
no longer have the .gdb_index accelerating section now.
|
||||
|
||||
It happens because:
|
||||
objcopy: unable to copy file 'foo.debug'; reason: Permission denied
|
||||
|
||||
*.debug files in Fedora were always 444 but the time gdb-add-index is run is
|
||||
still before the *.debug split and in Fedora 24 the files were -rwxr-xr-x
|
||||
that time while in Fedora 25 they are apparently no longer w.
|
||||
|
||||
OK for check-in?
|
||||
|
||||
|
||||
Jan
|
||||
|
||||
--AhhlLboLdkugWU4S
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Disposition: inline; filename=1
|
||||
|
||||
gdb/ChangeLog
|
||||
2017-01-06 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* contrib/gdb-add-index.sh: Use chmod u+w for $file.
|
||||
|
||||
diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh
|
||||
index 0cd4ce3..5a190a0 100755
|
||||
--- a/gdb/contrib/gdb-add-index.sh
|
||||
+++ b/gdb/contrib/gdb-add-index.sh
|
||||
@@ -38,10 +38,11 @@ fi
|
||||
dir="${file%/*}"
|
||||
test "$dir" = "$file" && dir="."
|
||||
index="${file}.gdb-index"
|
||||
+mode="${file}.mode"
|
||||
|
||||
-rm -f $index
|
||||
+rm -f $index $mode
|
||||
# Ensure intermediate index file is removed when we exit.
|
||||
-trap "rm -f $index" 0
|
||||
+trap "rm -f $index $mode" 0
|
||||
|
||||
$GDB --batch -nx -iex 'set auto-load no' \
|
||||
-ex "file $file" -ex "save gdb-index $dir" || {
|
||||
@@ -58,8 +59,13 @@ $GDB --batch -nx -iex 'set auto-load no' \
|
||||
status=0
|
||||
|
||||
if test -f "$index"; then
|
||||
+ touch "$mode"
|
||||
+ chmod --reference="$file" "$mode"
|
||||
+ # objcopy: unable to copy file 'foo.debug'; reason: Permission denied
|
||||
+ chmod u+w "$file"
|
||||
$OBJCOPY --add-section .gdb_index="$index" \
|
||||
--set-section-flags .gdb_index=readonly "$file" "$file"
|
||||
+ chmod --reference="$mode" "$file"
|
||||
status=$?
|
||||
else
|
||||
echo "$myname: No index was created for $file" 1>&2
|
||||
|
||||
--AhhlLboLdkugWU4S--
|
||||
|
@ -1,8 +1,27 @@
|
||||
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-archer-next-over-throw-cxx-exec.patch
|
||||
|
||||
FileName: gdb-archer-next-over-throw-cxx-exec.patch
|
||||
|
||||
;; Fix follow-exec for C++ programs (bugreported by Martin Stransky).
|
||||
;;=fedoratest
|
||||
|
||||
Archer-upstreamed:
|
||||
http://sourceware.org/ml/archer/2010-q2/msg00031.html
|
||||
---
|
||||
gdb/testsuite/gdb.cp/cxxexec.cc | 25 ++++++++++++++++++++
|
||||
gdb/testsuite/gdb.cp/cxxexec.exp | 51 ++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 76 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.cp/cxxexec.cc
|
||||
create mode 100644 gdb/testsuite/gdb.cp/cxxexec.exp
|
||||
|
||||
--- ./gdb/testsuite/gdb.cp/cxxexec.cc 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ ./gdb/testsuite/gdb.cp/cxxexec.cc 2010-05-29 01:18:56.000000000 +0200
|
||||
diff --git a/gdb/testsuite/gdb.cp/cxxexec.cc b/gdb/testsuite/gdb.cp/cxxexec.cc
|
||||
new file mode 100644
|
||||
index 0000000000..48fd63e9d3
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/cxxexec.cc
|
||||
@@ -0,0 +1,25 @@
|
||||
+/* This test script is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -29,8 +48,11 @@ http://sourceware.org/ml/archer/2010-q2/msg00031.html
|
||||
+ execlp ("true", "true", NULL);
|
||||
+ return 1;
|
||||
+}
|
||||
--- ./gdb/testsuite/gdb.cp/cxxexec.exp 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ ./gdb/testsuite/gdb.cp/cxxexec.exp 2010-05-29 01:29:25.000000000 +0200
|
||||
diff --git a/gdb/testsuite/gdb.cp/cxxexec.exp b/gdb/testsuite/gdb.cp/cxxexec.exp
|
||||
new file mode 100644
|
||||
index 0000000000..c85dd0129d
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/cxxexec.exp
|
||||
@@ -0,0 +1,51 @@
|
||||
+# Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -83,3 +105,6 @@ http://sourceware.org/ml/archer/2010-q2/msg00031.html
|
||||
+
|
||||
+# `info inferiors' can show <null> on older GDBs.
|
||||
+gdb_test "info threads" "info threads" "program finished"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,11 +1,26 @@
|
||||
Index: gdb-7.99.90.20170420/gdb/breakpoint.c
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/breakpoint.c 2017-04-20 23:04:39.627960523 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/breakpoint.c 2017-04-20 23:07:29.854919725 +0200
|
||||
@@ -16086,6 +16086,50 @@
|
||||
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-archer-pie-addons-keep-disabled.patch
|
||||
|
||||
FileName: gdb-archer-pie-addons-keep-disabled.patch
|
||||
|
||||
;;=push+jan: Breakpoints disabling matching should not be based on address.
|
||||
---
|
||||
gdb/breakpoint.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
gdb/breakpoint.h | 3 +++
|
||||
gdb/objfiles.c | 5 +++++
|
||||
3 files changed, 52 insertions(+)
|
||||
|
||||
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
|
||||
index 2b5eebbbee..814802a0a1 100644
|
||||
--- a/gdb/breakpoint.c
|
||||
+++ b/gdb/breakpoint.c
|
||||
@@ -15590,6 +15590,50 @@ initialize_breakpoint_ops (void)
|
||||
|
||||
static struct cmd_list_element *enablebreaklist = NULL;
|
||||
|
||||
void
|
||||
+void
|
||||
+breakpoints_relocate (struct objfile *objfile, struct section_offsets *delta)
|
||||
+{
|
||||
+ struct bp_location *bl, **blp_tmp;
|
||||
@ -49,27 +64,28 @@ Index: gdb-7.99.90.20170420/gdb/breakpoint.c
|
||||
+ bp_locations_compare);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
void
|
||||
_initialize_breakpoint (void)
|
||||
{
|
||||
struct cmd_list_element *c;
|
||||
Index: gdb-7.99.90.20170420/gdb/breakpoint.h
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/breakpoint.h 2017-04-20 23:04:39.627960523 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/breakpoint.h 2017-04-20 23:04:48.331009563 +0200
|
||||
@@ -1646,4 +1646,7 @@
|
||||
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
|
||||
index 8bb81d8d17..3fddbaa713 100644
|
||||
--- a/gdb/breakpoint.h
|
||||
+++ b/gdb/breakpoint.h
|
||||
@@ -1656,6 +1656,9 @@ extern const char *ep_parse_optional_if_clause (const char **arg);
|
||||
UIOUT iff debugging multiple threads. */
|
||||
extern void maybe_print_thread_hit_breakpoint (struct ui_out *uiout);
|
||||
|
||||
+extern void breakpoints_relocate (struct objfile *objfile,
|
||||
+ struct section_offsets *delta);
|
||||
+
|
||||
#endif /* !defined (BREAKPOINT_H) */
|
||||
Index: gdb-7.99.90.20170420/gdb/objfiles.c
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/objfiles.c 2017-04-20 23:04:39.627960523 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/objfiles.c 2017-04-20 23:04:48.332009569 +0200
|
||||
@@ -909,6 +909,11 @@
|
||||
/* Print the specified breakpoint. */
|
||||
extern void print_breakpoint (breakpoint *bp);
|
||||
|
||||
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
|
||||
index 7adaef119d..2f061b47f7 100644
|
||||
--- a/gdb/objfiles.c
|
||||
+++ b/gdb/objfiles.c
|
||||
@@ -879,6 +879,11 @@ objfile_relocate1 (struct objfile *objfile,
|
||||
obj_section_addr (s));
|
||||
}
|
||||
|
||||
@ -81,3 +97,6 @@ Index: gdb-7.99.90.20170420/gdb/objfiles.c
|
||||
/* Data changed. */
|
||||
return 1;
|
||||
}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,8 +1,21 @@
|
||||
Index: gdb-7.9.50.20150520/gdb/gdbtypes.h
|
||||
===================================================================
|
||||
--- gdb-7.9.50.20150520.orig/gdb/gdbtypes.h 2015-05-31 16:55:29.723475485 +0200
|
||||
+++ gdb-7.9.50.20150520/gdb/gdbtypes.h 2015-05-31 16:55:49.716601669 +0200
|
||||
@@ -462,6 +462,7 @@ enum field_loc_kind
|
||||
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-archer-pie-addons.patch
|
||||
|
||||
FileName: gdb-archer-pie-addons.patch
|
||||
|
||||
;;=push+jan: May get obsoleted by Tom's unrelocated objfiles patch.
|
||||
---
|
||||
gdb/gdbtypes.h | 5 +++++
|
||||
gdb/value.c | 3 ++-
|
||||
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
|
||||
index 179238ce82..5597038357 100644
|
||||
--- a/gdb/gdbtypes.h
|
||||
+++ b/gdb/gdbtypes.h
|
||||
@@ -453,6 +453,7 @@ enum field_loc_kind
|
||||
{
|
||||
FIELD_LOC_KIND_BITPOS, /**< bitpos */
|
||||
FIELD_LOC_KIND_ENUMVAL, /**< enumval */
|
||||
@ -10,7 +23,7 @@ Index: gdb-7.9.50.20150520/gdb/gdbtypes.h
|
||||
FIELD_LOC_KIND_PHYSADDR, /**< physaddr */
|
||||
FIELD_LOC_KIND_PHYSNAME, /**< physname */
|
||||
FIELD_LOC_KIND_DWARF_BLOCK /**< dwarf_block */
|
||||
@@ -513,6 +514,7 @@ union field_location
|
||||
@@ -504,6 +505,7 @@ union field_location
|
||||
field. Otherwise, physname is the mangled label of the
|
||||
static field. */
|
||||
|
||||
@ -18,7 +31,7 @@ Index: gdb-7.9.50.20150520/gdb/gdbtypes.h
|
||||
CORE_ADDR physaddr;
|
||||
const char *physname;
|
||||
|
||||
@@ -1386,6 +1388,7 @@ extern void set_type_vptr_basetype (stru
|
||||
@@ -1362,6 +1364,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *);
|
||||
#define FIELD_ENUMVAL_LVAL(thisfld) ((thisfld).loc.enumval)
|
||||
#define FIELD_ENUMVAL(thisfld) (FIELD_ENUMVAL_LVAL (thisfld) + 0)
|
||||
#define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname)
|
||||
@ -26,7 +39,7 @@ Index: gdb-7.9.50.20150520/gdb/gdbtypes.h
|
||||
#define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
|
||||
#define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block)
|
||||
#define SET_FIELD_BITPOS(thisfld, bitpos) \
|
||||
@@ -1397,6 +1400,7 @@ extern void set_type_vptr_basetype (stru
|
||||
@@ -1373,6 +1376,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *);
|
||||
#define SET_FIELD_PHYSNAME(thisfld, name) \
|
||||
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME, \
|
||||
FIELD_STATIC_PHYSNAME (thisfld) = (name))
|
||||
@ -34,7 +47,7 @@ Index: gdb-7.9.50.20150520/gdb/gdbtypes.h
|
||||
#define SET_FIELD_PHYSADDR(thisfld, addr) \
|
||||
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \
|
||||
FIELD_STATIC_PHYSADDR (thisfld) = (addr))
|
||||
@@ -1413,6 +1417,7 @@ extern void set_type_vptr_basetype (stru
|
||||
@@ -1389,6 +1393,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *);
|
||||
#define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n))
|
||||
#define TYPE_FIELD_ENUMVAL(thistype, n) FIELD_ENUMVAL (TYPE_FIELD (thistype, n))
|
||||
#define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME (TYPE_FIELD (thistype, n))
|
||||
@ -42,11 +55,11 @@ Index: gdb-7.9.50.20150520/gdb/gdbtypes.h
|
||||
#define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR (TYPE_FIELD (thistype, n))
|
||||
#define TYPE_FIELD_DWARF_BLOCK(thistype, n) FIELD_DWARF_BLOCK (TYPE_FIELD (thistype, n))
|
||||
#define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(TYPE_FIELD(thistype,n))
|
||||
Index: gdb-7.9.50.20150520/gdb/value.c
|
||||
===================================================================
|
||||
--- gdb-7.9.50.20150520.orig/gdb/value.c 2015-05-31 16:55:29.725475497 +0200
|
||||
+++ gdb-7.9.50.20150520/gdb/value.c 2015-05-31 16:55:30.821482415 +0200
|
||||
@@ -2951,7 +2951,8 @@ value_static_field (struct type *type, i
|
||||
diff --git a/gdb/value.c b/gdb/value.c
|
||||
index d4b4673f66..558d0bbd7a 100644
|
||||
--- a/gdb/value.c
|
||||
+++ b/gdb/value.c
|
||||
@@ -2966,7 +2966,8 @@ value_static_field (struct type *type, int fieldno)
|
||||
{
|
||||
case FIELD_LOC_KIND_PHYSADDR:
|
||||
retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno),
|
||||
@ -56,3 +69,6 @@ Index: gdb-7.9.50.20150520/gdb/value.c
|
||||
break;
|
||||
case FIELD_LOC_KIND_PHYSNAME:
|
||||
{
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,8 +1,106 @@
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.ada/packed_array.exp
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.ada/packed_array.exp 2017-02-26 19:15:28.552824751 +0100
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.ada/packed_array.exp 2017-02-26 19:15:36.597882316 +0100
|
||||
@@ -56,5 +56,11 @@
|
||||
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-archer-vla-tests.patch
|
||||
|
||||
FileName: gdb-archer-vla-tests.patch
|
||||
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.ada/packed_array.exp | 6 +
|
||||
gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S | 358 ++++++++++++++++
|
||||
gdb/testsuite/gdb.arch/x86_64-vla-pointer.c | 45 ++
|
||||
gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp | 65 +++
|
||||
gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S | 455 +++++++++++++++++++++
|
||||
gdb/testsuite/gdb.arch/x86_64-vla-typedef.c | 45 ++
|
||||
gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp | 64 +++
|
||||
gdb/testsuite/gdb.base/arrayidx.c | 7 +
|
||||
gdb/testsuite/gdb.base/arrayidx.exp | 10 +-
|
||||
.../gdb.base/internal-var-field-address.c | 20 +
|
||||
.../gdb.base/internal-var-field-address.exp | 26 ++
|
||||
gdb/testsuite/gdb.base/vla-frame.c | 31 ++
|
||||
gdb/testsuite/gdb.base/vla-frame.exp | 38 ++
|
||||
gdb/testsuite/gdb.base/vla-overflow.c | 30 ++
|
||||
gdb/testsuite/gdb.base/vla-overflow.exp | 109 +++++
|
||||
gdb/testsuite/gdb.base/vla.c | 55 +++
|
||||
gdb/testsuite/gdb.base/vla.exp | 62 +++
|
||||
gdb/testsuite/gdb.cp/gdb9593.cc | 180 ++++++++
|
||||
gdb/testsuite/gdb.cp/gdb9593.exp | 182 +++++++++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S | 246 +++++++++++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp | 66 +++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-stripped.c | 42 ++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-stripped.exp | 79 ++++
|
||||
.../gdb.dwarf2/dw2-struct-member-data-location.S | 83 ++++
|
||||
.../gdb.dwarf2/dw2-struct-member-data-location.exp | 37 ++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S | 121 ++++++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp | 39 ++
|
||||
gdb/testsuite/gdb.fortran/dwarf-stride.exp | 42 ++
|
||||
gdb/testsuite/gdb.fortran/dwarf-stride.f90 | 40 ++
|
||||
gdb/testsuite/gdb.fortran/dynamic.exp | 154 +++++++
|
||||
gdb/testsuite/gdb.fortran/dynamic.f90 | 98 +++++
|
||||
gdb/testsuite/gdb.fortran/string.exp | 59 +++
|
||||
gdb/testsuite/gdb.fortran/string.f90 | 37 ++
|
||||
gdb/testsuite/gdb.fortran/subrange.exp | 72 ++++
|
||||
gdb/testsuite/gdb.fortran/subrange.f90 | 28 ++
|
||||
gdb/testsuite/gdb.mi/mi2-var-stale-type.c | 26 ++
|
||||
gdb/testsuite/gdb.mi/mi2-var-stale-type.exp | 57 +++
|
||||
gdb/testsuite/gdb.opt/array-from-register-func.c | 22 +
|
||||
gdb/testsuite/gdb.opt/array-from-register.c | 28 ++
|
||||
gdb/testsuite/gdb.opt/array-from-register.exp | 33 ++
|
||||
gdb/testsuite/gdb.opt/fortran-string.exp | 39 ++
|
||||
gdb/testsuite/gdb.opt/fortran-string.f90 | 28 ++
|
||||
gdb/testsuite/gdb.pascal/arrays.exp | 104 +++++
|
||||
gdb/testsuite/gdb.pascal/arrays.pas | 82 ++++
|
||||
gdb/testsuite/lib/gdb.exp | 5 +
|
||||
gdb/testsuite/lib/pascal.exp | 17 +
|
||||
46 files changed, 3471 insertions(+), 1 deletion(-)
|
||||
create mode 100644 gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S
|
||||
create mode 100644 gdb/testsuite/gdb.arch/x86_64-vla-pointer.c
|
||||
create mode 100644 gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp
|
||||
create mode 100644 gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S
|
||||
create mode 100644 gdb/testsuite/gdb.arch/x86_64-vla-typedef.c
|
||||
create mode 100644 gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp
|
||||
create mode 100644 gdb/testsuite/gdb.base/internal-var-field-address.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/internal-var-field-address.exp
|
||||
create mode 100644 gdb/testsuite/gdb.base/vla-frame.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/vla-frame.exp
|
||||
create mode 100644 gdb/testsuite/gdb.base/vla-overflow.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/vla-overflow.exp
|
||||
create mode 100644 gdb/testsuite/gdb.base/vla.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/vla.exp
|
||||
create mode 100644 gdb/testsuite/gdb.cp/gdb9593.cc
|
||||
create mode 100644 gdb/testsuite/gdb.cp/gdb9593.exp
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-stripped.c
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-stripped.exp
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/dwarf-stride.exp
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/dwarf-stride.f90
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/dynamic.exp
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/dynamic.f90
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/string.exp
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/string.f90
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/subrange.exp
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/subrange.f90
|
||||
create mode 100644 gdb/testsuite/gdb.mi/mi2-var-stale-type.c
|
||||
create mode 100644 gdb/testsuite/gdb.mi/mi2-var-stale-type.exp
|
||||
create mode 100644 gdb/testsuite/gdb.opt/array-from-register-func.c
|
||||
create mode 100644 gdb/testsuite/gdb.opt/array-from-register.c
|
||||
create mode 100644 gdb/testsuite/gdb.opt/array-from-register.exp
|
||||
create mode 100644 gdb/testsuite/gdb.opt/fortran-string.exp
|
||||
create mode 100644 gdb/testsuite/gdb.opt/fortran-string.f90
|
||||
create mode 100644 gdb/testsuite/gdb.pascal/arrays.exp
|
||||
create mode 100644 gdb/testsuite/gdb.pascal/arrays.pas
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.ada/packed_array.exp b/gdb/testsuite/gdb.ada/packed_array.exp
|
||||
index 3e614b788a..0ae87786db 100644
|
||||
--- a/gdb/testsuite/gdb.ada/packed_array.exp
|
||||
+++ b/gdb/testsuite/gdb.ada/packed_array.exp
|
||||
@@ -56,5 +56,11 @@ gdb_test_multiple "$test" "$test" {
|
||||
# are. Observed with (FSF GNU Ada 4.5.3 20110124).
|
||||
xfail $test
|
||||
}
|
||||
@ -14,10 +112,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.ada/packed_array.exp
|
||||
+ }
|
||||
}
|
||||
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S 2017-02-26 19:15:36.598882323 +0100
|
||||
diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S b/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S
|
||||
new file mode 100644
|
||||
index 0000000000..3a983e6b22
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S
|
||||
@@ -0,0 +1,358 @@
|
||||
+ .file "x86_64-vla-pointer.c"
|
||||
+ .text
|
||||
@ -377,10 +476,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S
|
||||
+ .string "array"
|
||||
+ .ident "GCC: (GNU) 6.2.1 20160916 (Red Hat 6.2.1-2)"
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c 2017-02-26 19:15:36.598882323 +0100
|
||||
diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c b/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c
|
||||
new file mode 100644
|
||||
index 0000000000..98ee43bbf2
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c
|
||||
@@ -0,0 +1,45 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -427,10 +527,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c
|
||||
+}
|
||||
+
|
||||
+#endif
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp 2017-02-26 19:15:36.598882323 +0100
|
||||
diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp b/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp
|
||||
new file mode 100644
|
||||
index 0000000000..3e2e64a6ab
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp
|
||||
@@ -0,0 +1,65 @@
|
||||
+# Copyright 2009 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -497,10 +598,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp
|
||||
+gdb_test "whatis array" "type = array_t" "second: whatis array"
|
||||
+gdb_test "whatis array_t" "type = char \\\[variable length\\\]" "second: whatis array_t"
|
||||
+gdb_test "ptype array" "type = char \\\[78\\\]" "second: ptype array"
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S 2017-02-26 19:15:36.598882323 +0100
|
||||
diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S b/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S
|
||||
new file mode 100644
|
||||
index 0000000000..66f7a399bf
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S
|
||||
@@ -0,0 +1,455 @@
|
||||
+ .file "x86_64-vla-typedef.c"
|
||||
+ .section .debug_abbrev,"",@progbits
|
||||
@ -957,10 +1059,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S
|
||||
+ .string "GNU C 4.3.2 20081105 (Red Hat 4.3.2-7)"
|
||||
+ .ident "GCC: (GNU) 4.3.2 20081105 (Red Hat 4.3.2-7)"
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c 2017-02-26 19:15:36.599882330 +0100
|
||||
diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c b/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c
|
||||
new file mode 100644
|
||||
index 0000000000..40099e9d39
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c
|
||||
@@ -0,0 +1,45 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -1007,10 +1110,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c
|
||||
+}
|
||||
+
|
||||
+#endif
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp 2017-02-26 19:15:36.599882330 +0100
|
||||
diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp b/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp
|
||||
new file mode 100644
|
||||
index 0000000000..4ef6214629
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp
|
||||
@@ -0,0 +1,64 @@
|
||||
+# Copyright 2009 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1076,10 +1180,10 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp
|
||||
+gdb_test "whatis array" "type = array_t" "second: whatis array"
|
||||
+
|
||||
+gdb_test "ptype array" "type = char \\\[78\\\]" "second: ptype array"
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/arrayidx.c
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.base/arrayidx.c 2017-02-26 19:15:28.555824772 +0100
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/arrayidx.c 2017-02-26 19:15:36.599882330 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/arrayidx.c b/gdb/testsuite/gdb.base/arrayidx.c
|
||||
index 5a0d01d04f..9e4b16e902 100644
|
||||
--- a/gdb/testsuite/gdb.base/arrayidx.c
|
||||
+++ b/gdb/testsuite/gdb.base/arrayidx.c
|
||||
@@ -17,6 +17,13 @@
|
||||
|
||||
int array[] = {1, 2, 3, 4};
|
||||
@ -1094,11 +1198,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/arrayidx.c
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/arrayidx.exp
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.base/arrayidx.exp 2017-02-26 19:15:28.555824772 +0100
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/arrayidx.exp 2017-02-26 19:15:36.599882330 +0100
|
||||
@@ -49,4 +49,12 @@
|
||||
diff --git a/gdb/testsuite/gdb.base/arrayidx.exp b/gdb/testsuite/gdb.base/arrayidx.exp
|
||||
index 91eb3c6056..af29a51f23 100644
|
||||
--- a/gdb/testsuite/gdb.base/arrayidx.exp
|
||||
+++ b/gdb/testsuite/gdb.base/arrayidx.exp
|
||||
@@ -49,4 +49,12 @@ gdb_test "print array" \
|
||||
"\\{\\\[0\\\] = 1, \\\[1\\\] = 2, \\\[2\\\] = 3, \\\[3\\\] = 4\\}" \
|
||||
"print array with array-indexes on"
|
||||
|
||||
@ -1112,10 +1216,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/arrayidx.exp
|
||||
+ unsupported "$test (no GCC)"
|
||||
+ }
|
||||
+}
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/internal-var-field-address.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/internal-var-field-address.c 2017-02-26 19:15:36.599882330 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/internal-var-field-address.c b/gdb/testsuite/gdb.base/internal-var-field-address.c
|
||||
new file mode 100644
|
||||
index 0000000000..eeb7b8501c
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/internal-var-field-address.c
|
||||
@@ -0,0 +1,20 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -1137,10 +1242,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/internal-var-field-address.c
|
||||
+struct {
|
||||
+ int field;
|
||||
+} staticstruct = { 1 };
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/internal-var-field-address.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/internal-var-field-address.exp 2017-02-26 19:15:36.600882337 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/internal-var-field-address.exp b/gdb/testsuite/gdb.base/internal-var-field-address.exp
|
||||
new file mode 100644
|
||||
index 0000000000..33c9e94eee
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/internal-var-field-address.exp
|
||||
@@ -0,0 +1,26 @@
|
||||
+# Copyright 2009 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1168,10 +1274,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/internal-var-field-address.ex
|
||||
+
|
||||
+gdb_test {set $varstruct = staticstruct}
|
||||
+gdb_test {p $varstruct.field} " = 1"
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-frame.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-frame.c 2017-02-26 19:15:36.600882337 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/vla-frame.c b/gdb/testsuite/gdb.base/vla-frame.c
|
||||
new file mode 100644
|
||||
index 0000000000..5750f68b3d
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/vla-frame.c
|
||||
@@ -0,0 +1,31 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -1204,10 +1311,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-frame.c
|
||||
+ f (s);
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-frame.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-frame.exp 2017-02-26 19:15:36.600882337 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/vla-frame.exp b/gdb/testsuite/gdb.base/vla-frame.exp
|
||||
new file mode 100644
|
||||
index 0000000000..47736c7625
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/vla-frame.exp
|
||||
@@ -0,0 +1,38 @@
|
||||
+# Copyright 2011 Free Software Foundation, Inc.
|
||||
+#
|
||||
@ -1247,10 +1355,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-frame.exp
|
||||
+}
|
||||
+
|
||||
+gdb_test "bt full" "\r\n +s = \"X\\\\000\"\r\n.*"
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-overflow.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-overflow.c 2017-02-26 19:15:36.600882337 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/vla-overflow.c b/gdb/testsuite/gdb.base/vla-overflow.c
|
||||
new file mode 100644
|
||||
index 0000000000..c5d5ee0bb9
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/vla-overflow.c
|
||||
@@ -0,0 +1,30 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -1282,10 +1391,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-overflow.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-overflow.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-overflow.exp 2017-02-26 19:15:36.600882337 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/vla-overflow.exp b/gdb/testsuite/gdb.base/vla-overflow.exp
|
||||
new file mode 100644
|
||||
index 0000000000..43a5825979
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/vla-overflow.exp
|
||||
@@ -0,0 +1,109 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1396,10 +1506,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-overflow.exp
|
||||
+gdb_test "bt" "in \[^ \]*abort \\(.* in main \\(.*" "Backtrace after abort()"
|
||||
+
|
||||
+verbose -log "kb_found in bt after abort() = [expr [memory_v_pages_get] * $pagesize / 1024]"
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla.c 2017-02-26 19:15:36.600882337 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/vla.c b/gdb/testsuite/gdb.base/vla.c
|
||||
new file mode 100644
|
||||
index 0000000000..e1f3ed1780
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/vla.c
|
||||
@@ -0,0 +1,55 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -1456,10 +1567,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla.c
|
||||
+ foo (78);
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla.exp 2017-02-26 19:15:36.600882337 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/vla.exp b/gdb/testsuite/gdb.base/vla.exp
|
||||
new file mode 100644
|
||||
index 0000000000..71fe637272
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/vla.exp
|
||||
@@ -0,0 +1,62 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1523,10 +1635,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla.exp
|
||||
+gdb_test "p temp1" " = '1' <repeats 78 times>" "second: print temp1"
|
||||
+gdb_test "p temp2" " = '2' <repeats 78 times>" "second: print temp2"
|
||||
+gdb_test "p temp3" " = '3' <repeats 48 times>" "second: print temp3"
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.cp/gdb9593.cc
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.cp/gdb9593.cc 2017-02-26 19:15:36.601882344 +0100
|
||||
diff --git a/gdb/testsuite/gdb.cp/gdb9593.cc b/gdb/testsuite/gdb.cp/gdb9593.cc
|
||||
new file mode 100644
|
||||
index 0000000000..783c9622a8
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/gdb9593.cc
|
||||
@@ -0,0 +1,180 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -1708,10 +1821,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.cp/gdb9593.cc
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.cp/gdb9593.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.cp/gdb9593.exp 2017-02-26 19:15:36.601882344 +0100
|
||||
diff --git a/gdb/testsuite/gdb.cp/gdb9593.exp b/gdb/testsuite/gdb.cp/gdb9593.exp
|
||||
new file mode 100644
|
||||
index 0000000000..ef40424402
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/gdb9593.exp
|
||||
@@ -0,0 +1,182 @@
|
||||
+# Copyright 2008, 2009 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1895,10 +2009,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.cp/gdb9593.exp
|
||||
+gdb_test "advance $line" \
|
||||
+ ".*catch (...).*" \
|
||||
+ "advance-over-throw"
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S 2017-02-26 19:15:36.601882344 +0100
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S b/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S
|
||||
new file mode 100644
|
||||
index 0000000000..aac3baad8a
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S
|
||||
@@ -0,0 +1,246 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -2146,10 +2261,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S
|
||||
+ .string "char"
|
||||
+.Luint_str:
|
||||
+ .string "unsigned int"
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp 2017-02-26 19:15:36.602882352 +0100
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp b/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp
|
||||
new file mode 100644
|
||||
index 0000000000..39e69b470f
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp
|
||||
@@ -0,0 +1,66 @@
|
||||
+# Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -2217,10 +2333,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp
|
||||
+
|
||||
+# The register contains unpredictable value - the array size.
|
||||
+gdb_test "ptype reg_string" {type = char \[-?[0-9]+\]}
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-stripped.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-stripped.c 2017-02-26 19:15:36.602882352 +0100
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-stripped.c b/gdb/testsuite/gdb.dwarf2/dw2-stripped.c
|
||||
new file mode 100644
|
||||
index 0000000000..1f02d90eeb
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-stripped.c
|
||||
@@ -0,0 +1,42 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -2264,10 +2381,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-stripped.c
|
||||
+ func1 (1, 2);
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp 2017-02-26 19:15:36.602882352 +0100
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp b/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp
|
||||
new file mode 100644
|
||||
index 0000000000..9336e03157
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp
|
||||
@@ -0,0 +1,79 @@
|
||||
+# Copyright 2006 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -2348,10 +2466,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp
|
||||
+gdb_test "step" \
|
||||
+ "func.* \\(.*\\) at .*" \
|
||||
+ "step"
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S 2017-02-26 19:15:36.602882352 +0100
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S b/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S
|
||||
new file mode 100644
|
||||
index 0000000000..5fcdd84986
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S
|
||||
@@ -0,0 +1,83 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -2436,10 +2555,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-loca
|
||||
+
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp 2017-02-26 19:15:36.602882352 +0100
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp b/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp
|
||||
new file mode 100644
|
||||
index 0000000000..bc35209fe5
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp
|
||||
@@ -0,0 +1,37 @@
|
||||
+# Copyright 2009 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -2478,10 +2598,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-loca
|
||||
+clean_restart $binfile
|
||||
+
|
||||
+gdb_test "ptype struct some_struct" "type = struct some_struct {\[\r\n \t\]*void field;\[\r\n \t\]*}"
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S 2017-02-26 19:15:36.602882352 +0100
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S b/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S
|
||||
new file mode 100644
|
||||
index 0000000000..9dbbf3c3e1
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S
|
||||
@@ -0,0 +1,121 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -2604,10 +2725,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+
|
||||
+ .byte 0x0 /* Terminator */
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp 2017-02-26 19:15:36.603882359 +0100
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp
|
||||
new file mode 100644
|
||||
index 0000000000..cec673cd39
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp
|
||||
@@ -0,0 +1,39 @@
|
||||
+# Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -2648,10 +2770,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp
|
||||
+
|
||||
+gdb_test "ptype notype_string" {type = char \[129\]}
|
||||
+gdb_test "p notype_string" " = 'x' <repeats 129 times>"
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dwarf-stride.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2017-02-26 19:15:36.603882359 +0100
|
||||
diff --git a/gdb/testsuite/gdb.fortran/dwarf-stride.exp b/gdb/testsuite/gdb.fortran/dwarf-stride.exp
|
||||
new file mode 100644
|
||||
index 0000000000..d7b8bea8db
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/dwarf-stride.exp
|
||||
@@ -0,0 +1,42 @@
|
||||
+# Copyright 2009 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -2695,10 +2818,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dwarf-stride.exp
|
||||
+gdb_continue_to_breakpoint "break-here" ".*break-here.*"
|
||||
+gdb_test "p c40pt(1)" " = '0-hello.*"
|
||||
+gdb_test "p c40pt(2)" " = '1-hello.*"
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dwarf-stride.f90
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dwarf-stride.f90 2017-02-26 19:15:36.603882359 +0100
|
||||
diff --git a/gdb/testsuite/gdb.fortran/dwarf-stride.f90 b/gdb/testsuite/gdb.fortran/dwarf-stride.f90
|
||||
new file mode 100644
|
||||
index 0000000000..e492b3af42
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/dwarf-stride.f90
|
||||
@@ -0,0 +1,40 @@
|
||||
+! Copyright 2009 Free Software Foundation, Inc.
|
||||
+!
|
||||
@ -2740,10 +2864,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dwarf-stride.f90
|
||||
+ print *, c40pt ! break-here
|
||||
+
|
||||
+end program repro
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dynamic.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dynamic.exp 2017-02-26 19:15:36.603882359 +0100
|
||||
diff --git a/gdb/testsuite/gdb.fortran/dynamic.exp b/gdb/testsuite/gdb.fortran/dynamic.exp
|
||||
new file mode 100644
|
||||
index 0000000000..37d435f799
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/dynamic.exp
|
||||
@@ -0,0 +1,154 @@
|
||||
+# Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -2899,10 +3024,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dynamic.exp
|
||||
+gdb_test "p vart(3,8)" "\\$\[0-9\]* = 9"
|
||||
+# maps to foo::vary(1,3)
|
||||
+gdb_test "p vart(2,9)" "\\$\[0-9\]* = 10"
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dynamic.f90
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dynamic.f90 2017-02-26 19:15:36.603882359 +0100
|
||||
diff --git a/gdb/testsuite/gdb.fortran/dynamic.f90 b/gdb/testsuite/gdb.fortran/dynamic.f90
|
||||
new file mode 100644
|
||||
index 0000000000..0f43564378
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/dynamic.f90
|
||||
@@ -0,0 +1,98 @@
|
||||
+! Copyright 2007 Free Software Foundation, Inc.
|
||||
+!
|
||||
@ -3002,10 +3128,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dynamic.f90
|
||||
+ if (x (1, 1) .ne. 8 .or. x (2, 2) .ne. 9 .or. x (1, 2) .ne. 4) call abort
|
||||
+ if (x (3, 1) .ne. 10) call abort
|
||||
+end
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/string.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/string.exp 2017-02-26 19:15:36.604882366 +0100
|
||||
diff --git a/gdb/testsuite/gdb.fortran/string.exp b/gdb/testsuite/gdb.fortran/string.exp
|
||||
new file mode 100644
|
||||
index 0000000000..1b7c0dbf73
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/string.exp
|
||||
@@ -0,0 +1,59 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -3066,10 +3193,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/string.exp
|
||||
+gdb_continue_to_breakpoint "var-finish"
|
||||
+gdb_test "p e" "\\$\[0-9\]* = 'e '" "p e re-set"
|
||||
+gdb_test "p f" "\\$\[0-9\]* = \\(\\( 'f ', 'f ', 'f ', 'f ', 'f ', 'f ', 'f '\\) \\( 'f2 ', 'f ', 'f ', 'f ', 'f ', 'f ', 'f '\\) \\( 'f ', 'f ', 'f ', 'f ', 'f ', 'f ', 'f '\\) \\)" "p *f re-set"
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/string.f90
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/string.f90 2017-02-26 19:15:36.604882366 +0100
|
||||
diff --git a/gdb/testsuite/gdb.fortran/string.f90 b/gdb/testsuite/gdb.fortran/string.f90
|
||||
new file mode 100644
|
||||
index 0000000000..226dc5d0ff
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/string.f90
|
||||
@@ -0,0 +1,37 @@
|
||||
+! Copyright 2008 Free Software Foundation, Inc.
|
||||
+!
|
||||
@ -3108,10 +3236,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/string.f90
|
||||
+ h = 'h'
|
||||
+ call foo (g, h)
|
||||
+end
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/subrange.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/subrange.exp 2017-02-26 19:15:36.604882366 +0100
|
||||
diff --git a/gdb/testsuite/gdb.fortran/subrange.exp b/gdb/testsuite/gdb.fortran/subrange.exp
|
||||
new file mode 100644
|
||||
index 0000000000..c121ab9751
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/subrange.exp
|
||||
@@ -0,0 +1,72 @@
|
||||
+# Copyright 2011 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -3185,10 +3314,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/subrange.exp
|
||||
+gdb_unload
|
||||
+setup_kfail "*-*-*" "vlaregression/9999"
|
||||
+gdb_test {p $a (3, 2:2)} { = \(23\)}
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/subrange.f90
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/subrange.f90 2017-02-26 19:15:36.604882366 +0100
|
||||
diff --git a/gdb/testsuite/gdb.fortran/subrange.f90 b/gdb/testsuite/gdb.fortran/subrange.f90
|
||||
new file mode 100644
|
||||
index 0000000000..4747ea9746
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/subrange.f90
|
||||
@@ -0,0 +1,28 @@
|
||||
+! Copyright 2011 Free Software Foundation, Inc.
|
||||
+!
|
||||
@ -3218,10 +3348,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/subrange.f90
|
||||
+ ptr => a
|
||||
+ write (*,*) a ! break-static
|
||||
+end
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi2-var-stale-type.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi2-var-stale-type.c 2017-02-26 19:15:36.604882366 +0100
|
||||
diff --git a/gdb/testsuite/gdb.mi/mi2-var-stale-type.c b/gdb/testsuite/gdb.mi/mi2-var-stale-type.c
|
||||
new file mode 100644
|
||||
index 0000000000..ebced3c042
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.mi/mi2-var-stale-type.c
|
||||
@@ -0,0 +1,26 @@
|
||||
+/* Copyright 2011 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -3249,10 +3380,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi2-var-stale-type.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp 2017-02-26 19:15:36.604882366 +0100
|
||||
diff --git a/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp b/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp
|
||||
new file mode 100644
|
||||
index 0000000000..88326c0390
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp
|
||||
@@ -0,0 +1,57 @@
|
||||
+# Copyright 2011 Free Software Foundation, Inc.
|
||||
+#
|
||||
@ -3311,10 +3443,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp
|
||||
+mi_create_varobj "vla" "vla" "create local variable vla"
|
||||
+
|
||||
+mi_gdb_test "-var-update *" "\\^done,changelist=.*" "-var-update *"
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/array-from-register-func.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/array-from-register-func.c 2017-02-26 19:15:36.604882366 +0100
|
||||
diff --git a/gdb/testsuite/gdb.opt/array-from-register-func.c b/gdb/testsuite/gdb.opt/array-from-register-func.c
|
||||
new file mode 100644
|
||||
index 0000000000..729f457c82
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.opt/array-from-register-func.c
|
||||
@@ -0,0 +1,22 @@
|
||||
+/* This file is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -3338,10 +3471,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/array-from-register-func.c
|
||||
+{
|
||||
+ return arr[0];
|
||||
+}
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/array-from-register.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/array-from-register.c 2017-02-26 19:15:36.605882373 +0100
|
||||
diff --git a/gdb/testsuite/gdb.opt/array-from-register.c b/gdb/testsuite/gdb.opt/array-from-register.c
|
||||
new file mode 100644
|
||||
index 0000000000..3090e7e631
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.opt/array-from-register.c
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* This file is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -3371,10 +3505,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/array-from-register.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/array-from-register.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/array-from-register.exp 2017-02-26 19:15:36.605882373 +0100
|
||||
diff --git a/gdb/testsuite/gdb.opt/array-from-register.exp b/gdb/testsuite/gdb.opt/array-from-register.exp
|
||||
new file mode 100644
|
||||
index 0000000000..f2de718bc3
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.opt/array-from-register.exp
|
||||
@@ -0,0 +1,33 @@
|
||||
+# Copyright 2009 Free Software Foundation, Inc.
|
||||
+#
|
||||
@ -3409,10 +3544,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/array-from-register.exp
|
||||
+# Seen regression:
|
||||
+# Address requested for identifier "arr" which is in register $rdi
|
||||
+gdb_test "p arr\[0\]" "\\$\[0-9\]+ = 42"
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/fortran-string.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/fortran-string.exp 2017-02-26 19:15:36.605882373 +0100
|
||||
diff --git a/gdb/testsuite/gdb.opt/fortran-string.exp b/gdb/testsuite/gdb.opt/fortran-string.exp
|
||||
new file mode 100644
|
||||
index 0000000000..90a2bdf212
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.opt/fortran-string.exp
|
||||
@@ -0,0 +1,39 @@
|
||||
+# Copyright 2009 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -3453,10 +3589,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/fortran-string.exp
|
||||
+gdb_test "frame" ".*s='foo'.*"
|
||||
+gdb_test "ptype s" "type = character\\*3"
|
||||
+gdb_test "p s" "\\$\[0-9\]* = 'foo'"
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/fortran-string.f90
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/fortran-string.f90 2017-02-26 19:15:36.605882373 +0100
|
||||
diff --git a/gdb/testsuite/gdb.opt/fortran-string.f90 b/gdb/testsuite/gdb.opt/fortran-string.f90
|
||||
new file mode 100644
|
||||
index 0000000000..e48d520085
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.opt/fortran-string.f90
|
||||
@@ -0,0 +1,28 @@
|
||||
+! Copyright 2009 Free Software Foundation, Inc.
|
||||
+!
|
||||
@ -3486,10 +3623,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/fortran-string.f90
|
||||
+ program main
|
||||
+ call f ('foo')
|
||||
+ end
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.pascal/arrays.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.pascal/arrays.exp 2017-02-26 19:15:36.605882373 +0100
|
||||
diff --git a/gdb/testsuite/gdb.pascal/arrays.exp b/gdb/testsuite/gdb.pascal/arrays.exp
|
||||
new file mode 100644
|
||||
index 0000000000..22acdb86d8
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.pascal/arrays.exp
|
||||
@@ -0,0 +1,104 @@
|
||||
+# Copyright 2008, 2009 Free Software Foundation, Inc.
|
||||
+#
|
||||
@ -3595,10 +3733,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.pascal/arrays.exp
|
||||
+}
|
||||
+gdb_test "print DynArrChar" ".* = 'abcdefghijklm'" "Print dynamic array of char"
|
||||
+
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.pascal/arrays.pas
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.pascal/arrays.pas 2017-02-26 19:15:36.605882373 +0100
|
||||
diff --git a/gdb/testsuite/gdb.pascal/arrays.pas b/gdb/testsuite/gdb.pascal/arrays.pas
|
||||
new file mode 100644
|
||||
index 0000000000..295602d68c
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.pascal/arrays.pas
|
||||
@@ -0,0 +1,82 @@
|
||||
+{
|
||||
+ Copyright 2008, 2009 Free Software Foundation, Inc.
|
||||
@ -3682,11 +3821,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.pascal/arrays.pas
|
||||
+ s := 'test'#0'string';
|
||||
+ writeln(s); { set breakpoint 2 here }
|
||||
+end.
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/lib/gdb.exp
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170207.orig/gdb/testsuite/lib/gdb.exp 2017-02-26 19:15:28.564824836 +0100
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/lib/gdb.exp 2017-02-26 19:15:36.607882387 +0100
|
||||
@@ -178,6 +178,11 @@
|
||||
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
|
||||
index a165bf0938..a13aaf7869 100644
|
||||
--- a/gdb/testsuite/lib/gdb.exp
|
||||
+++ b/gdb/testsuite/lib/gdb.exp
|
||||
@@ -169,6 +169,11 @@ proc gdb_unload {} {
|
||||
send_gdb "y\n"
|
||||
exp_continue
|
||||
}
|
||||
@ -3698,11 +3837,11 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/lib/gdb.exp
|
||||
-re "Discard symbol table from .*y or n.*$" {
|
||||
send_gdb "y\n"
|
||||
exp_continue
|
||||
Index: gdb-7.12.50.20170207/gdb/testsuite/lib/pascal.exp
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170207.orig/gdb/testsuite/lib/pascal.exp 2017-02-26 19:15:28.565824844 +0100
|
||||
+++ gdb-7.12.50.20170207/gdb/testsuite/lib/pascal.exp 2017-02-26 19:15:36.607882387 +0100
|
||||
@@ -37,6 +37,9 @@
|
||||
diff --git a/gdb/testsuite/lib/pascal.exp b/gdb/testsuite/lib/pascal.exp
|
||||
index 03d1b1bc06..9f9e143dff 100644
|
||||
--- a/gdb/testsuite/lib/pascal.exp
|
||||
+++ b/gdb/testsuite/lib/pascal.exp
|
||||
@@ -37,6 +37,9 @@ proc pascal_init {} {
|
||||
global pascal_compiler_is_fpc
|
||||
global gpc_compiler
|
||||
global fpc_compiler
|
||||
@ -3712,7 +3851,7 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/lib/pascal.exp
|
||||
global env
|
||||
|
||||
if { $pascal_init_done == 1 } {
|
||||
@@ -64,6 +67,20 @@
|
||||
@@ -64,6 +67,20 @@ proc pascal_init {} {
|
||||
set pascal_compiler_is_fpc 1
|
||||
verbose -log "Free Pascal compiler found"
|
||||
}
|
||||
@ -3733,3 +3872,6 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/lib/pascal.exp
|
||||
}
|
||||
set pascal_init_done 1
|
||||
}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
148
gdb-archer.patch
148
gdb-archer.patch
@ -1,3 +1,13 @@
|
||||
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-archer.patch
|
||||
|
||||
FileName: gdb-archer.patch
|
||||
|
||||
;; Python patches of: http://sourceware.org/gdb/wiki/ProjectArcher
|
||||
;;=push
|
||||
|
||||
http://sourceware.org/gdb/wiki/ProjectArcher
|
||||
http://sourceware.org/gdb/wiki/ArcherBranchManagement
|
||||
|
||||
@ -5,21 +15,33 @@ GIT snapshot:
|
||||
commit 718a1618b2f691a7f407213bb50f100ac59f91c3
|
||||
|
||||
tromey/python
|
||||
---
|
||||
gdb/Makefile.in | 6 ++
|
||||
gdb/data-directory/Makefile.in | 4 +
|
||||
gdb/doc/gdb.texinfo | 10 +++
|
||||
gdb/doc/python.texi | 2 -
|
||||
gdb/gdb-gdb.gdb.in | 10 +++
|
||||
gdb/main.c | 93 ++++++++++++++++++-----
|
||||
gdb/python/lib/gdb/command/ignore_errors.py | 37 +++++++++
|
||||
gdb/python/lib/gdb/command/pahole.py | 81 ++++++++++++++++++++
|
||||
gdb/python/lib/gdb/function/in_scope.py | 47 ++++++++++++
|
||||
gdb/python/python-internal.h | 3 +
|
||||
gdb/python/python.c | 113 ++++++++++++++++++++++++++++
|
||||
gdb/python/python.h | 2 +
|
||||
gdb/testsuite/gdb.python/py-frame.exp | 2 +
|
||||
gdb/testsuite/gdb.python/py-value.exp | 10 +++
|
||||
gdb/varobj.c | 8 ++
|
||||
gdb/varobj.h | 2 +
|
||||
16 files changed, 411 insertions(+), 19 deletions(-)
|
||||
create mode 100644 gdb/python/lib/gdb/command/ignore_errors.py
|
||||
create mode 100644 gdb/python/lib/gdb/command/pahole.py
|
||||
create mode 100644 gdb/python/lib/gdb/function/in_scope.py
|
||||
|
||||
|
||||
diff --git a/README.archer b/README.archer
|
||||
new file mode 100644
|
||||
index 0000000..173b8ea
|
||||
--- /dev/null
|
||||
+++ b/README.archer
|
||||
@@ -0,0 +1,2 @@
|
||||
+This branch originally held the Python code for gdb. It still exists
|
||||
+because a small amount of code here has not yet been merged upstream.
|
||||
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
|
||||
index 291b1a0..150a8ef 100644
|
||||
index 3142ad6af1..28d8664236 100644
|
||||
--- a/gdb/Makefile.in
|
||||
+++ b/gdb/Makefile.in
|
||||
@@ -2350,6 +2350,12 @@ stamp-h: $(srcdir)/config.in config.status
|
||||
@@ -2110,6 +2110,12 @@ stamp-h: $(srcdir)/config.in config.status
|
||||
CONFIG_LINKS= \
|
||||
$(SHELL) config.status
|
||||
|
||||
@ -33,22 +55,19 @@ index 291b1a0..150a8ef 100644
|
||||
$(SHELL) config.status --recheck
|
||||
|
||||
diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in
|
||||
index 304d4b0..d2007a4 100644
|
||||
index 5c7c0b4c2e..2014607e9e 100644
|
||||
--- a/gdb/data-directory/Makefile.in
|
||||
+++ b/gdb/data-directory/Makefile.in
|
||||
@@ -77,7 +77,11 @@ PYTHON_FILE_LIST = \
|
||||
gdb/types.py \
|
||||
@@ -80,6 +80,8 @@ PYTHON_FILE_LIST = \
|
||||
gdb/unwinder.py \
|
||||
gdb/xmethod.py \
|
||||
+ gdb/types.py \
|
||||
gdb/command/__init__.py \
|
||||
+ gdb/command/ignore_errors.py \
|
||||
+ gdb/command/pahole.py \
|
||||
+ gdb/command/xmethods.py \
|
||||
gdb/command/explore.py \
|
||||
gdb/command/backtrace.py \
|
||||
gdb/command/frame_filters.py \
|
||||
gdb/command/pretty_printers.py \
|
||||
@@ -89,6 +93,8 @@ PYTHON_FILE_LIST = \
|
||||
@@ -92,6 +94,8 @@ PYTHON_FILE_LIST = \
|
||||
gdb/function/as_string.py \
|
||||
gdb/function/caller_is.py \
|
||||
gdb/function/strfns.py \
|
||||
@ -58,10 +77,10 @@ index 304d4b0..d2007a4 100644
|
||||
gdb/printer/bound_registers.py
|
||||
|
||||
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
|
||||
index 300d78e..699f2cb 100644
|
||||
index 7b99ae1551..dea17fd5a7 100644
|
||||
--- a/gdb/doc/gdb.texinfo
|
||||
+++ b/gdb/doc/gdb.texinfo
|
||||
@@ -1230,6 +1230,16 @@ for remote debugging.
|
||||
@@ -1245,6 +1245,16 @@ for remote debugging.
|
||||
Run using @var{device} for your program's standard input and output.
|
||||
@c FIXME: kingdon thinks there is more to -tty. Investigate.
|
||||
|
||||
@ -79,7 +98,7 @@ index 300d78e..699f2cb 100644
|
||||
@item -tui
|
||||
@cindex @code{--tui}
|
||||
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
|
||||
index ce5810e..4ceb108 100644
|
||||
index ccf011e35e..461e900f77 100644
|
||||
--- a/gdb/doc/python.texi
|
||||
+++ b/gdb/doc/python.texi
|
||||
@@ -88,8 +88,6 @@ containing @code{end}. For example:
|
||||
@ -92,7 +111,7 @@ index ce5810e..4ceb108 100644
|
||||
>end
|
||||
23
|
||||
diff --git a/gdb/gdb-gdb.gdb.in b/gdb/gdb-gdb.gdb.in
|
||||
index 05a38b2..9801fdf 100644
|
||||
index 05a38b2670..9801fdff67 100644
|
||||
--- a/gdb/gdb-gdb.gdb.in
|
||||
+++ b/gdb/gdb-gdb.gdb.in
|
||||
@@ -1,5 +1,15 @@
|
||||
@ -112,7 +131,7 @@ index 05a38b2..9801fdf 100644
|
||||
set variable $gdb_init_done = 1
|
||||
|
||||
diff --git a/gdb/main.c b/gdb/main.c
|
||||
index df4b111..6aca8b0 100644
|
||||
index b079e79c93..b150af4e70 100644
|
||||
--- a/gdb/main.c
|
||||
+++ b/gdb/main.c
|
||||
@@ -33,6 +33,7 @@
|
||||
@ -123,8 +142,8 @@ index df4b111..6aca8b0 100644
|
||||
#include "source.h"
|
||||
#include "cli/cli-cmds.h"
|
||||
#include "objfiles.h"
|
||||
@@ -459,7 +460,7 @@ struct cmdarg
|
||||
};
|
||||
@@ -478,7 +479,7 @@ exec_or_core_file_attach (const char *filename, int from_tty)
|
||||
}
|
||||
|
||||
static void
|
||||
-captured_main_1 (struct captured_main_args *context)
|
||||
@ -132,7 +151,7 @@ index df4b111..6aca8b0 100644
|
||||
{
|
||||
int argc = context->argc;
|
||||
char **argv = context->argv;
|
||||
@@ -676,10 +677,14 @@ captured_main_1 (struct captured_main_args *context)
|
||||
@@ -694,10 +695,14 @@ captured_main_1 (struct captured_main_args *context)
|
||||
{"args", no_argument, &set_args, 1},
|
||||
{"l", required_argument, 0, 'l'},
|
||||
{"return-child-result", no_argument, &return_child_result, 1},
|
||||
@ -148,7 +167,7 @@ index df4b111..6aca8b0 100644
|
||||
{
|
||||
int option_index;
|
||||
|
||||
@@ -697,6 +702,9 @@ captured_main_1 (struct captured_main_args *context)
|
||||
@@ -715,6 +720,9 @@ captured_main_1 (struct captured_main_args *context)
|
||||
case 0:
|
||||
/* Long option that just sets a flag. */
|
||||
break;
|
||||
@ -158,7 +177,7 @@ index df4b111..6aca8b0 100644
|
||||
case OPT_SE:
|
||||
symarg = optarg;
|
||||
execarg = optarg;
|
||||
@@ -855,7 +863,31 @@ captured_main_1 (struct captured_main_args *context)
|
||||
@@ -889,7 +897,31 @@ captured_main_1 (struct captured_main_args *context)
|
||||
|
||||
/* Now that gdb_init has created the initial inferior, we're in
|
||||
position to set args for that inferior. */
|
||||
@ -191,7 +210,7 @@ index df4b111..6aca8b0 100644
|
||||
{
|
||||
/* The remaining options are the command-line options for the
|
||||
inferior. The first one is the sym/exec file, and the rest
|
||||
@@ -1125,7 +1157,8 @@ captured_main_1 (struct captured_main_args *context)
|
||||
@@ -1179,7 +1211,8 @@ captured_main_1 (struct captured_main_args *context)
|
||||
|
||||
/* Read in the old history after all the command files have been
|
||||
read. */
|
||||
@ -201,7 +220,7 @@ index df4b111..6aca8b0 100644
|
||||
|
||||
if (batch_flag)
|
||||
{
|
||||
@@ -1138,16 +1171,29 @@ static void
|
||||
@@ -1192,24 +1225,37 @@ static void
|
||||
captured_main (void *data)
|
||||
{
|
||||
struct captured_main_args *context = (struct captured_main_args *) data;
|
||||
@ -217,7 +236,12 @@ index df4b111..6aca8b0 100644
|
||||
- while (1)
|
||||
+#if HAVE_PYTHON
|
||||
+ if (python_script)
|
||||
+ {
|
||||
{
|
||||
- TRY
|
||||
- {
|
||||
- captured_command_loop ();
|
||||
- }
|
||||
- CATCH (ex, RETURN_MASK_ALL)
|
||||
+ extern int pagination_enabled;
|
||||
+ pagination_enabled = 0;
|
||||
+ run_python_script (context->argc - optind, &context->argv[optind]);
|
||||
@ -225,20 +249,29 @@ index df4b111..6aca8b0 100644
|
||||
+ }
|
||||
+ else
|
||||
+#endif
|
||||
{
|
||||
- catch_errors (captured_command_loop, 0, "", RETURN_MASK_ALL);
|
||||
+ {
|
||||
+ /* NOTE: cagney/1999-11-07: There is probably no reason for not
|
||||
+ moving this loop and the code found in captured_command_loop()
|
||||
+ into the command_loop() proper. The main thing holding back that
|
||||
+ change - SET_TOP_LEVEL() - has been eliminated. */
|
||||
+ while (1)
|
||||
+ {
|
||||
+ catch_errors (captured_command_loop, 0, "", RETURN_MASK_ALL);
|
||||
+ }
|
||||
{
|
||||
- exception_print (gdb_stderr, ex);
|
||||
+ TRY
|
||||
+ {
|
||||
+ captured_command_loop ();
|
||||
+ }
|
||||
+ CATCH (ex, RETURN_MASK_ALL)
|
||||
+ {
|
||||
+ exception_print (gdb_stderr, ex);
|
||||
+ }
|
||||
+ END_CATCH
|
||||
}
|
||||
- END_CATCH
|
||||
}
|
||||
/* No exit -- exit is through quit_command. */
|
||||
}
|
||||
@@ -1190,6 +1236,12 @@ print_gdb_help (struct ui_file *stream)
|
||||
@@ -1252,6 +1298,12 @@ print_gdb_help (struct ui_file *stream)
|
||||
fputs_unfiltered (_("\
|
||||
This is the GNU debugger. Usage:\n\n\
|
||||
gdb [options] [executable-file [core-file or process-id]]\n\
|
||||
@ -251,7 +284,7 @@ index df4b111..6aca8b0 100644
|
||||
gdb [options] --args executable-file [inferior-arguments ...]\n\n\
|
||||
"), stream);
|
||||
fputs_unfiltered (_("\
|
||||
@@ -1234,6 +1286,13 @@ Output and user interface control:\n\n\
|
||||
@@ -1297,6 +1349,13 @@ Output and user interface control:\n\n\
|
||||
#endif
|
||||
fputs_unfiltered (_("\
|
||||
--dbx DBX compatibility mode.\n\
|
||||
@ -267,7 +300,7 @@ index df4b111..6aca8b0 100644
|
||||
"), stream);
|
||||
diff --git a/gdb/python/lib/gdb/command/ignore_errors.py b/gdb/python/lib/gdb/command/ignore_errors.py
|
||||
new file mode 100644
|
||||
index 0000000..6fa48ff
|
||||
index 0000000000..6fa48ff081
|
||||
--- /dev/null
|
||||
+++ b/gdb/python/lib/gdb/command/ignore_errors.py
|
||||
@@ -0,0 +1,37 @@
|
||||
@ -310,7 +343,7 @@ index 0000000..6fa48ff
|
||||
+IgnoreErrorsCommand ()
|
||||
diff --git a/gdb/python/lib/gdb/command/pahole.py b/gdb/python/lib/gdb/command/pahole.py
|
||||
new file mode 100644
|
||||
index 0000000..e08eaf5
|
||||
index 0000000000..e08eaf5ca8
|
||||
--- /dev/null
|
||||
+++ b/gdb/python/lib/gdb/command/pahole.py
|
||||
@@ -0,0 +1,81 @@
|
||||
@ -397,7 +430,7 @@ index 0000000..e08eaf5
|
||||
+Pahole()
|
||||
diff --git a/gdb/python/lib/gdb/function/in_scope.py b/gdb/python/lib/gdb/function/in_scope.py
|
||||
new file mode 100644
|
||||
index 0000000..8742680
|
||||
index 0000000000..8742680614
|
||||
--- /dev/null
|
||||
+++ b/gdb/python/lib/gdb/function/in_scope.py
|
||||
@@ -0,0 +1,47 @@
|
||||
@ -449,10 +482,10 @@ index 0000000..8742680
|
||||
+
|
||||
+InScope ()
|
||||
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
|
||||
index e84c8d2..69305b4 100644
|
||||
index 89bbc6987b..69dbb69c06 100644
|
||||
--- a/gdb/python/python-internal.h
|
||||
+++ b/gdb/python/python-internal.h
|
||||
@@ -672,6 +672,9 @@ class gdbpy_enter_varobj : public gdbpy_enter
|
||||
@@ -657,6 +657,9 @@ class gdbpy_enter_varobj : public gdbpy_enter
|
||||
|
||||
};
|
||||
|
||||
@ -463,7 +496,7 @@ index e84c8d2..69305b4 100644
|
||||
extern const struct language_defn *python_language;
|
||||
|
||||
diff --git a/gdb/python/python.c b/gdb/python/python.c
|
||||
index 7e0c507..a67fbc3 100644
|
||||
index 610dda828c..de5ffbd70b 100644
|
||||
--- a/gdb/python/python.c
|
||||
+++ b/gdb/python/python.c
|
||||
@@ -95,6 +95,8 @@ const struct extension_language_defn extension_language_python =
|
||||
@ -505,7 +538,7 @@ index 7e0c507..a67fbc3 100644
|
||||
/* Set the quit flag. */
|
||||
|
||||
static void
|
||||
@@ -1187,6 +1212,92 @@ gdbpy_print_stack (void)
|
||||
@@ -1356,6 +1381,92 @@ gdbpy_print_stack (void)
|
||||
|
||||
/* Return the current Progspace.
|
||||
There always is one. */
|
||||
@ -598,7 +631,7 @@ index 7e0c507..a67fbc3 100644
|
||||
|
||||
static PyObject *
|
||||
gdbpy_get_current_progspace (PyObject *unused1, PyObject *unused2)
|
||||
@@ -1881,6 +1992,8 @@ PyMethodDef python_GdbMethods[] =
|
||||
@@ -2034,6 +2145,8 @@ PyMethodDef python_GdbMethods[] =
|
||||
Evaluate command, a string, as a gdb CLI command. Optionally returns\n\
|
||||
a Python String containing the output of the command if to_string is\n\
|
||||
set to True." },
|
||||
@ -608,7 +641,7 @@ index 7e0c507..a67fbc3 100644
|
||||
"Return a gdb parameter's value" },
|
||||
|
||||
diff --git a/gdb/python/python.h b/gdb/python/python.h
|
||||
index e407faa..fc1c632 100644
|
||||
index de58fd81df..237a84a0b2 100644
|
||||
--- a/gdb/python/python.h
|
||||
+++ b/gdb/python/python.h
|
||||
@@ -25,4 +25,6 @@
|
||||
@ -619,7 +652,7 @@ index e407faa..fc1c632 100644
|
||||
+
|
||||
#endif /* GDB_PYTHON_H */
|
||||
diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp
|
||||
index f5d4a3c..3546f7b 100644
|
||||
index f186fa9578..0327284226 100644
|
||||
--- a/gdb/testsuite/gdb.python/py-frame.exp
|
||||
+++ b/gdb/testsuite/gdb.python/py-frame.exp
|
||||
@@ -95,6 +95,8 @@ gdb_test "python print ('result = %s' % f0.read_var ('a'))" " = 1" "test Frame.r
|
||||
@ -632,7 +665,7 @@ index f5d4a3c..3546f7b 100644
|
||||
gdb_test "python print ('result = %s' % (gdb.selected_frame ().read_register ('sp') == gdb.parse_and_eval ('\$sp')))" \
|
||||
" = True" \
|
||||
diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp
|
||||
index 1781887..8a2ddd6 100644
|
||||
index eb82a7776f..3069a5c6d7 100644
|
||||
--- a/gdb/testsuite/gdb.python/py-value.exp
|
||||
+++ b/gdb/testsuite/gdb.python/py-value.exp
|
||||
@@ -384,6 +384,15 @@ proc test_value_after_death {} {
|
||||
@ -660,10 +693,10 @@ index 1781887..8a2ddd6 100644
|
||||
# Test either C or C++ values.
|
||||
|
||||
diff --git a/gdb/varobj.c b/gdb/varobj.c
|
||||
index 5f21d84..18506f1 100644
|
||||
index 01dabef37c..c198731d0b 100644
|
||||
--- a/gdb/varobj.c
|
||||
+++ b/gdb/varobj.c
|
||||
@@ -226,6 +226,14 @@ is_root_p (const struct varobj *var)
|
||||
@@ -217,6 +217,14 @@ is_root_p (const struct varobj *var)
|
||||
}
|
||||
|
||||
#ifdef HAVE_PYTHON
|
||||
@ -679,15 +712,18 @@ index 5f21d84..18506f1 100644
|
||||
/* See python-internal.h. */
|
||||
gdbpy_enter_varobj::gdbpy_enter_varobj (const struct varobj *var)
|
||||
diff --git a/gdb/varobj.h b/gdb/varobj.h
|
||||
index e35c1b8..12339d1 100644
|
||||
index 6e80d1b89e..677547996f 100644
|
||||
--- a/gdb/varobj.h
|
||||
+++ b/gdb/varobj.h
|
||||
@@ -320,6 +320,8 @@ extern int varobj_has_more (const struct varobj *var, int to);
|
||||
@@ -327,6 +327,8 @@ extern bool varobj_has_more (const struct varobj *var, int to);
|
||||
|
||||
extern int varobj_is_dynamic_p (const struct varobj *var);
|
||||
extern bool varobj_is_dynamic_p (const struct varobj *var);
|
||||
|
||||
+extern struct cleanup *varobj_ensure_python_env (const struct varobj *var);
|
||||
+
|
||||
extern int varobj_default_value_is_changeable_p (const struct varobj *var);
|
||||
extern int varobj_value_is_changeable_p (const struct varobj *var);
|
||||
extern bool varobj_default_value_is_changeable_p (const struct varobj *var);
|
||||
extern bool varobj_value_is_changeable_p (const struct varobj *var);
|
||||
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,5 +1,14 @@
|
||||
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: attach-fail-reasons: SELinux deny_ptrace
|
||||
|
||||
FileName: gdb-attach-fail-reasons-5of5.patch
|
||||
|
||||
;; Print reasons for failed attach/spawn incl. SELinux deny_ptrace (BZ 786878).
|
||||
;;=push+jan
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2012-03/msg00171.html
|
||||
Subject: [patch 3/3] attach-fail-reasons: SELinux deny_ptrace
|
||||
|
||||
Hi,
|
||||
|
||||
@ -9,11 +18,9 @@ and here is the last bit for new SELinux 'deny_ptrace':
|
||||
As even PTRACE_TRACEME fails in such case it needs to install hook for even
|
||||
that event.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/
|
||||
2012-03-06 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
@ -36,185 +43,23 @@ gdb/gdbserver/
|
||||
* linux-low.c (linux_traceme): New function.
|
||||
(linux_create_inferior, linux_tracefork_child): Call it instead of
|
||||
direct ptrace.
|
||||
---
|
||||
gdb/config.in | 6 +++++
|
||||
gdb/configure | 58 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
gdb/configure.ac | 4 ++++
|
||||
gdb/gdbserver/config.in | 6 +++++
|
||||
gdb/gdbserver/configure | 58 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
gdb/gdbserver/configure.ac | 4 ++++
|
||||
gdb/gdbserver/linux-low.c | 16 ++++++++++++-
|
||||
gdb/linux-nat.c | 24 ++++++++++++++++++-
|
||||
gdb/nat/linux-ptrace.c | 22 ++++++++++++++++++
|
||||
gdb/nat/linux-ptrace.h | 1 +
|
||||
10 files changed, 197 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: gdb-7.12.50.20170226/gdb/nat/linux-ptrace.c
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170226.orig/gdb/nat/linux-ptrace.c 2017-02-26 21:27:14.780009449 +0100
|
||||
+++ gdb-7.12.50.20170226/gdb/nat/linux-ptrace.c 2017-02-26 21:27:18.838038193 +0100
|
||||
@@ -27,6 +27,10 @@
|
||||
#include <sys/procfs.h>
|
||||
#endif
|
||||
|
||||
+#ifdef HAVE_SELINUX_SELINUX_H
|
||||
+# include <selinux/selinux.h>
|
||||
+#endif /* HAVE_SELINUX_SELINUX_H */
|
||||
+
|
||||
/* Stores the ptrace options supported by the running kernel.
|
||||
A value of -1 means we did not check for features yet. A value
|
||||
of 0 means there are no supported features. */
|
||||
@@ -51,6 +55,8 @@
|
||||
buffer_xml_printf (buffer, _("process %d is a zombie "
|
||||
"- the process has already terminated"),
|
||||
(int) pid);
|
||||
+
|
||||
+ linux_ptrace_create_warnings (buffer);
|
||||
}
|
||||
|
||||
/* See linux-ptrace.h. */
|
||||
@@ -594,6 +600,22 @@
|
||||
linux_ptrace_test_ret_to_nx ();
|
||||
}
|
||||
|
||||
+/* Print all possible reasons we could fail to create a traced process. */
|
||||
+
|
||||
+void
|
||||
+linux_ptrace_create_warnings (struct buffer *buffer)
|
||||
+{
|
||||
+#ifdef HAVE_LIBSELINUX
|
||||
+ /* -1 is returned for errors, 0 if it has no effect, 1 if PTRACE_ATTACH is
|
||||
+ forbidden. */
|
||||
+ if (security_get_boolean_active ("deny_ptrace") == 1)
|
||||
+ buffer_xml_printf (buffer,
|
||||
+ _("the SELinux boolean 'deny_ptrace' is enabled, "
|
||||
+ "you can disable this process attach protection by: "
|
||||
+ "(gdb) shell sudo setsebool deny_ptrace=0"));
|
||||
+#endif /* HAVE_LIBSELINUX */
|
||||
+}
|
||||
+
|
||||
/* Extract extended ptrace event from wait status. */
|
||||
|
||||
int
|
||||
Index: gdb-7.12.50.20170226/gdb/nat/linux-ptrace.h
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170226.orig/gdb/nat/linux-ptrace.h 2017-02-26 21:27:14.780009449 +0100
|
||||
+++ gdb-7.12.50.20170226/gdb/nat/linux-ptrace.h 2017-02-26 21:27:18.838038193 +0100
|
||||
@@ -185,6 +185,7 @@
|
||||
extern char *linux_ptrace_attach_fail_reason_string (ptid_t ptid, int err);
|
||||
|
||||
extern void linux_ptrace_init_warnings (void);
|
||||
+extern void linux_ptrace_create_warnings (struct buffer *buffer);
|
||||
extern void linux_check_ptrace_features (void);
|
||||
extern void linux_enable_event_reporting (pid_t pid, int attached);
|
||||
extern void linux_disable_event_reporting (pid_t pid);
|
||||
Index: gdb-7.12.50.20170226/gdb/configure.ac
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170226.orig/gdb/configure.ac 2017-02-26 21:27:14.781009456 +0100
|
||||
+++ gdb-7.12.50.20170226/gdb/configure.ac 2017-02-26 21:27:18.839038200 +0100
|
||||
@@ -2092,6 +2092,10 @@
|
||||
esac
|
||||
AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.])
|
||||
|
||||
+dnl Check security_get_boolean_active availability.
|
||||
+AC_CHECK_HEADERS(selinux/selinux.h)
|
||||
+AC_CHECK_LIB(selinux, security_get_boolean_active)
|
||||
+
|
||||
dnl Handle optional features that can be enabled.
|
||||
|
||||
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
|
||||
Index: gdb-7.12.50.20170226/gdb/gdbserver/configure.ac
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170226.orig/gdb/gdbserver/configure.ac 2017-02-26 21:27:14.781009456 +0100
|
||||
+++ gdb-7.12.50.20170226/gdb/gdbserver/configure.ac 2017-02-26 21:27:18.839038200 +0100
|
||||
@@ -469,6 +469,10 @@
|
||||
fi
|
||||
fi
|
||||
|
||||
+dnl Check security_get_boolean_active availability.
|
||||
+AC_CHECK_HEADERS(selinux/selinux.h)
|
||||
+AC_CHECK_LIB(selinux, security_get_boolean_active)
|
||||
+
|
||||
AC_SUBST(GDBSERVER_DEPFILES)
|
||||
AC_SUBST(GDBSERVER_LIBS)
|
||||
AC_SUBST(srv_xmlbuiltin)
|
||||
Index: gdb-7.12.50.20170226/gdb/gdbserver/linux-low.c
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170226.orig/gdb/gdbserver/linux-low.c 2017-02-26 21:27:14.783009470 +0100
|
||||
+++ gdb-7.12.50.20170226/gdb/gdbserver/linux-low.c 2017-02-26 21:27:18.841038214 +0100
|
||||
@@ -946,6 +946,29 @@
|
||||
return lwp;
|
||||
}
|
||||
|
||||
+/* Execute PTRACE_TRACEME with error checking. */
|
||||
+
|
||||
+static void
|
||||
+linux_traceme (const char *program)
|
||||
+{
|
||||
+ int save_errno;
|
||||
+ struct buffer buffer;
|
||||
+
|
||||
+ errno = 0;
|
||||
+ if (ptrace (PTRACE_TRACEME, 0,
|
||||
+ (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0) == 0)
|
||||
+ return;
|
||||
+
|
||||
+ save_errno = errno;
|
||||
+ buffer_init (&buffer);
|
||||
+ linux_ptrace_create_warnings (&buffer);
|
||||
+ buffer_grow_str0 (&buffer, "");
|
||||
+ fprintf (stderr, _("%sCannot trace created process %s: %s.\n"),
|
||||
+ buffer_finish (&buffer), program, strerror (save_errno));
|
||||
+ fflush (stderr);
|
||||
+ _exit (0177);
|
||||
+}
|
||||
+
|
||||
/* Start an inferior process and returns its pid.
|
||||
ALLARGS is a vector of program-name and args. */
|
||||
|
||||
@@ -969,7 +992,7 @@
|
||||
if (pid == 0)
|
||||
{
|
||||
close_most_fds ();
|
||||
- ptrace (PTRACE_TRACEME, 0, (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0);
|
||||
+ linux_traceme (program);
|
||||
|
||||
setpgid (0, 0);
|
||||
|
||||
Index: gdb-7.12.50.20170226/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170226.orig/gdb/linux-nat.c 2017-02-26 21:27:14.785009484 +0100
|
||||
+++ gdb-7.12.50.20170226/gdb/linux-nat.c 2017-02-26 21:27:18.842038221 +0100
|
||||
@@ -1110,6 +1110,7 @@
|
||||
{
|
||||
struct cleanup *restore_personality
|
||||
= maybe_disable_address_space_randomization (disable_randomization);
|
||||
+ volatile struct gdb_exception ex;
|
||||
|
||||
/* The fork_child mechanism is synchronous and calls target_wait, so
|
||||
we have to mask the async mode. */
|
||||
@@ -1117,7 +1118,28 @@
|
||||
/* Make sure we report all signals during startup. */
|
||||
linux_nat_pass_signals (ops, 0, NULL);
|
||||
|
||||
- linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
|
||||
+ TRY
|
||||
+ {
|
||||
+ linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
|
||||
+ }
|
||||
+ CATCH (ex, RETURN_MASK_ERROR)
|
||||
+ {
|
||||
+ struct buffer buffer;
|
||||
+ char *message, *buffer_s;
|
||||
+
|
||||
+ message = xstrdup (ex.message);
|
||||
+ make_cleanup (xfree, message);
|
||||
+
|
||||
+ buffer_init (&buffer);
|
||||
+ linux_ptrace_create_warnings (&buffer);
|
||||
+
|
||||
+ buffer_grow_str0 (&buffer, "");
|
||||
+ buffer_s = buffer_finish (&buffer);
|
||||
+ make_cleanup (xfree, buffer_s);
|
||||
+
|
||||
+ throw_error (ex.error, "%s%s", buffer_s, message);
|
||||
+ }
|
||||
+ END_CATCH
|
||||
|
||||
do_cleanups (restore_personality);
|
||||
}
|
||||
Index: gdb-7.12.50.20170226/gdb/config.in
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170226.orig/gdb/config.in 2017-02-26 21:27:14.786009491 +0100
|
||||
+++ gdb-7.12.50.20170226/gdb/config.in 2017-02-26 21:27:18.842038221 +0100
|
||||
diff --git a/gdb/config.in b/gdb/config.in
|
||||
index edd7028f76..4de3e842d1 100644
|
||||
--- a/gdb/config.in
|
||||
+++ b/gdb/config.in
|
||||
@@ -270,6 +270,9 @@
|
||||
/* Define if librpm library is being used. */
|
||||
#undef HAVE_LIBRPM
|
||||
@ -225,7 +70,7 @@ Index: gdb-7.12.50.20170226/gdb/config.in
|
||||
/* Define to 1 if you have the <libunwind-ia64.h> header file. */
|
||||
#undef HAVE_LIBUNWIND_IA64_H
|
||||
|
||||
@@ -402,6 +405,9 @@
|
||||
@@ -393,6 +396,9 @@
|
||||
/* Define to 1 if you have the `scm_new_smob' function. */
|
||||
#undef HAVE_SCM_NEW_SMOB
|
||||
|
||||
@ -235,11 +80,11 @@ Index: gdb-7.12.50.20170226/gdb/config.in
|
||||
/* Define to 1 if you have the `setlocale' function. */
|
||||
#undef HAVE_SETLOCALE
|
||||
|
||||
Index: gdb-7.12.50.20170226/gdb/configure
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170226.orig/gdb/configure 2017-02-26 21:27:14.790009519 +0100
|
||||
+++ gdb-7.12.50.20170226/gdb/configure 2017-02-26 21:27:18.846038249 +0100
|
||||
@@ -15492,6 +15492,64 @@
|
||||
diff --git a/gdb/configure b/gdb/configure
|
||||
index 1cecdbc3b5..904cc453ad 100755
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -15681,6 +15681,64 @@ cat >>confdefs.h <<_ACEOF
|
||||
_ACEOF
|
||||
|
||||
|
||||
@ -304,11 +149,26 @@ Index: gdb-7.12.50.20170226/gdb/configure
|
||||
|
||||
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
|
||||
# except that the argument to --with-sysroot is optional.
|
||||
Index: gdb-7.12.50.20170226/gdb/gdbserver/config.in
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170226.orig/gdb/gdbserver/config.in 2017-02-26 21:27:14.791009527 +0100
|
||||
+++ gdb-7.12.50.20170226/gdb/gdbserver/config.in 2017-02-26 21:27:18.846038249 +0100
|
||||
@@ -123,6 +123,9 @@
|
||||
diff --git a/gdb/configure.ac b/gdb/configure.ac
|
||||
index e232c1adcb..1557760ed8 100644
|
||||
--- a/gdb/configure.ac
|
||||
+++ b/gdb/configure.ac
|
||||
@@ -2043,6 +2043,10 @@ case $host_os in
|
||||
esac
|
||||
AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.])
|
||||
|
||||
+dnl Check security_get_boolean_active availability.
|
||||
+AC_CHECK_HEADERS(selinux/selinux.h)
|
||||
+AC_CHECK_LIB(selinux, security_get_boolean_active)
|
||||
+
|
||||
dnl Handle optional features that can be enabled.
|
||||
|
||||
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
|
||||
diff --git a/gdb/gdbserver/config.in b/gdb/gdbserver/config.in
|
||||
index dda7c1f150..b2a34b92ce 100644
|
||||
--- a/gdb/gdbserver/config.in
|
||||
+++ b/gdb/gdbserver/config.in
|
||||
@@ -126,6 +126,9 @@
|
||||
/* Define to 1 if you have the `mcheck' library (-lmcheck). */
|
||||
#undef HAVE_LIBMCHECK
|
||||
|
||||
@ -318,7 +178,7 @@ Index: gdb-7.12.50.20170226/gdb/gdbserver/config.in
|
||||
/* Define if the target supports branch tracing. */
|
||||
#undef HAVE_LINUX_BTRACE
|
||||
|
||||
@@ -199,6 +202,9 @@
|
||||
@@ -202,6 +205,9 @@
|
||||
/* Define to 1 if you have the `pwrite' function. */
|
||||
#undef HAVE_PWRITE
|
||||
|
||||
@ -328,11 +188,11 @@ Index: gdb-7.12.50.20170226/gdb/gdbserver/config.in
|
||||
/* Define to 1 if you have the `setns' function. */
|
||||
#undef HAVE_SETNS
|
||||
|
||||
Index: gdb-7.12.50.20170226/gdb/gdbserver/configure
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170226.orig/gdb/gdbserver/configure 2017-02-26 21:27:14.793009541 +0100
|
||||
+++ gdb-7.12.50.20170226/gdb/gdbserver/configure 2017-02-26 21:27:18.848038263 +0100
|
||||
@@ -8429,6 +8429,64 @@
|
||||
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
|
||||
index 340ca7a19e..6d7c9b2326 100755
|
||||
--- a/gdb/gdbserver/configure
|
||||
+++ b/gdb/gdbserver/configure
|
||||
@@ -8455,6 +8455,64 @@ if $want_ipa ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -397,3 +257,142 @@ Index: gdb-7.12.50.20170226/gdb/gdbserver/configure
|
||||
|
||||
|
||||
|
||||
diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac
|
||||
index 6727959e61..7c0f508275 100644
|
||||
--- a/gdb/gdbserver/configure.ac
|
||||
+++ b/gdb/gdbserver/configure.ac
|
||||
@@ -488,6 +488,10 @@ if $want_ipa ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
+dnl Check security_get_boolean_active availability.
|
||||
+AC_CHECK_HEADERS(selinux/selinux.h)
|
||||
+AC_CHECK_LIB(selinux, security_get_boolean_active)
|
||||
+
|
||||
AC_SUBST(GDBSERVER_DEPFILES)
|
||||
AC_SUBST(GDBSERVER_LIBS)
|
||||
AC_SUBST(srv_xmlbuiltin)
|
||||
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
|
||||
index cfb2b56a08..0faac80625 100644
|
||||
--- a/gdb/gdbserver/linux-low.c
|
||||
+++ b/gdb/gdbserver/linux-low.c
|
||||
@@ -963,7 +963,21 @@ linux_ptrace_fun ()
|
||||
{
|
||||
if (ptrace (PTRACE_TRACEME, 0, (PTRACE_TYPE_ARG3) 0,
|
||||
(PTRACE_TYPE_ARG4) 0) < 0)
|
||||
- trace_start_error_with_name ("ptrace");
|
||||
+ {
|
||||
+ int save_errno = errno;
|
||||
+ struct buffer buffer;
|
||||
+
|
||||
+ buffer_init (&buffer);
|
||||
+ linux_ptrace_create_warnings (&buffer);
|
||||
+ buffer_grow_str0 (&buffer, "");
|
||||
+
|
||||
+ std::string msg
|
||||
+ = string_printf (_("%sCannot trace created process"),
|
||||
+ buffer_finish (&buffer));
|
||||
+
|
||||
+ errno = save_errno;
|
||||
+ trace_start_error_with_name (msg.c_str ());
|
||||
+ }
|
||||
|
||||
if (setpgid (0, 0) < 0)
|
||||
trace_start_error_with_name ("setpgid");
|
||||
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
|
||||
index c41ea391a0..1570a2bcb6 100644
|
||||
--- a/gdb/linux-nat.c
|
||||
+++ b/gdb/linux-nat.c
|
||||
@@ -1127,7 +1127,29 @@ linux_nat_create_inferior (struct target_ops *ops,
|
||||
/* Make sure we report all signals during startup. */
|
||||
linux_nat_pass_signals (ops, 0, NULL);
|
||||
|
||||
- linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
|
||||
+ volatile struct gdb_exception ex;
|
||||
+ TRY
|
||||
+ {
|
||||
+ linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
|
||||
+ }
|
||||
+ CATCH (ex, RETURN_MASK_ERROR)
|
||||
+ {
|
||||
+ struct buffer buffer;
|
||||
+ char *message, *buffer_s;
|
||||
+
|
||||
+ message = xstrdup (ex.message);
|
||||
+ make_cleanup (xfree, message);
|
||||
+
|
||||
+ buffer_init (&buffer);
|
||||
+ linux_ptrace_create_warnings (&buffer);
|
||||
+
|
||||
+ buffer_grow_str0 (&buffer, "");
|
||||
+ buffer_s = buffer_finish (&buffer);
|
||||
+ make_cleanup (xfree, buffer_s);
|
||||
+
|
||||
+ throw_error (ex.error, "%s%s", buffer_s, message);
|
||||
+ }
|
||||
+ END_CATCH
|
||||
}
|
||||
|
||||
/* Callback for linux_proc_attach_tgid_threads. Attach to PTID if not
|
||||
diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c
|
||||
index ac6ba72390..be51e2449b 100644
|
||||
--- a/gdb/nat/linux-ptrace.c
|
||||
+++ b/gdb/nat/linux-ptrace.c
|
||||
@@ -27,6 +27,10 @@
|
||||
#include <sys/procfs.h>
|
||||
#endif
|
||||
|
||||
+#ifdef HAVE_SELINUX_SELINUX_H
|
||||
+# include <selinux/selinux.h>
|
||||
+#endif /* HAVE_SELINUX_SELINUX_H */
|
||||
+
|
||||
/* Stores the ptrace options supported by the running kernel.
|
||||
A value of -1 means we did not check for features yet. A value
|
||||
of 0 means there are no supported features. */
|
||||
@@ -51,6 +55,8 @@ linux_ptrace_attach_fail_reason (pid_t pid, struct buffer *buffer)
|
||||
buffer_xml_printf (buffer, _("process %d is a zombie "
|
||||
"- the process has already terminated"),
|
||||
(int) pid);
|
||||
+
|
||||
+ linux_ptrace_create_warnings (buffer);
|
||||
}
|
||||
|
||||
/* See linux-ptrace.h. */
|
||||
@@ -594,6 +600,22 @@ linux_ptrace_init_warnings (void)
|
||||
linux_ptrace_test_ret_to_nx ();
|
||||
}
|
||||
|
||||
+/* Print all possible reasons we could fail to create a traced process. */
|
||||
+
|
||||
+void
|
||||
+linux_ptrace_create_warnings (struct buffer *buffer)
|
||||
+{
|
||||
+#ifdef HAVE_LIBSELINUX
|
||||
+ /* -1 is returned for errors, 0 if it has no effect, 1 if PTRACE_ATTACH is
|
||||
+ forbidden. */
|
||||
+ if (security_get_boolean_active ("deny_ptrace") == 1)
|
||||
+ buffer_xml_printf (buffer,
|
||||
+ _("the SELinux boolean 'deny_ptrace' is enabled, "
|
||||
+ "you can disable this process attach protection by: "
|
||||
+ "(gdb) shell sudo setsebool deny_ptrace=0"));
|
||||
+#endif /* HAVE_LIBSELINUX */
|
||||
+}
|
||||
+
|
||||
/* Extract extended ptrace event from wait status. */
|
||||
|
||||
int
|
||||
diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h
|
||||
index 1f960ed132..84912f909c 100644
|
||||
--- a/gdb/nat/linux-ptrace.h
|
||||
+++ b/gdb/nat/linux-ptrace.h
|
||||
@@ -190,6 +190,7 @@ extern void linux_ptrace_attach_fail_reason (pid_t pid, struct buffer *buffer);
|
||||
extern char *linux_ptrace_attach_fail_reason_string (ptid_t ptid, int err);
|
||||
|
||||
extern void linux_ptrace_init_warnings (void);
|
||||
+extern void linux_ptrace_create_warnings (struct buffer *buffer);
|
||||
extern void linux_check_ptrace_features (void);
|
||||
extern void linux_enable_event_reporting (pid_t pid, int attached);
|
||||
extern void linux_disable_event_reporting (pid_t pid);
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,13 +1,26 @@
|
||||
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-btrobust.patch
|
||||
|
||||
FileName: gdb-btrobust.patch
|
||||
|
||||
;; Continue backtrace even if a frame filter throws an exception (Phil Muldoon).
|
||||
;;=push
|
||||
|
||||
This should fix the error with glib. An error message will still be
|
||||
printed, but a default backtrace will occur in this case.
|
||||
|
||||
--
|
||||
---
|
||||
gdb/python/py-framefilter.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: gdb-7.12.50.20170226/gdb/python/py-framefilter.c
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170226.orig/gdb/python/py-framefilter.c 2017-02-26 21:33:23.150618708 +0100
|
||||
+++ gdb-7.12.50.20170226/gdb/python/py-framefilter.c 2017-02-26 21:33:29.993667179 +0100
|
||||
@@ -1388,6 +1388,7 @@
|
||||
diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c
|
||||
index e887849c36..a8e4f49eb5 100644
|
||||
--- a/gdb/python/py-framefilter.c
|
||||
+++ b/gdb/python/py-framefilter.c
|
||||
@@ -1388,6 +1388,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
|
||||
htab_eq_pointer,
|
||||
NULL));
|
||||
|
||||
@ -15,7 +28,7 @@ Index: gdb-7.12.50.20170226/gdb/python/py-framefilter.c
|
||||
while (true)
|
||||
{
|
||||
gdbpy_ref<> item (PyIter_Next (iterable.get ()));
|
||||
@@ -1397,7 +1398,7 @@
|
||||
@@ -1397,7 +1398,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
|
||||
if (PyErr_Occurred ())
|
||||
{
|
||||
gdbpy_print_stack ();
|
||||
@ -24,7 +37,7 @@ Index: gdb-7.12.50.20170226/gdb/python/py-framefilter.c
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1409,6 +1410,7 @@
|
||||
@@ -1409,6 +1410,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
|
||||
error and continue with other frames. */
|
||||
if (success == EXT_LANG_BT_ERROR)
|
||||
gdbpy_print_stack ();
|
||||
@ -32,3 +45,6 @@ Index: gdb-7.12.50.20170226/gdb/python/py-framefilter.c
|
||||
}
|
||||
|
||||
return success;
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,5 +1,14 @@
|
||||
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: Never kill PID on: gdb exec PID
|
||||
|
||||
FileName: gdb-bz1219747-attach-kills.patch
|
||||
|
||||
;; Never kill PID on: gdb exec PID (Jan Kratochvil, RH BZ 1219747).
|
||||
;;=push+jan
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2015-10/msg00301.html
|
||||
Subject: [PATCH 1/3] Never kill PID on: gdb exec PID
|
||||
|
||||
Hi,
|
||||
|
||||
@ -16,25 +25,13 @@ A program is being debugged already. Kill it? (y or n) _
|
||||
|
||||
The first attachment of "/tmp/sleep" commandline argument errors at:
|
||||
|
||||
#0 throw_error (error=GENERIC_ERROR, fmt=0x116d135 "%s.") at ./common/common-exceptions.c:371
|
||||
#1 in throw_perror_with_name (errcode=GENERIC_ERROR, string=0x7fffffffdb96 "/dfsfds") at utils.c:974
|
||||
#2 in perror_with_name (string=0x7fffffffdb96 "/dfsfds") at utils.c:982
|
||||
#3 in exec_file_attach (filename=0x7fffffffdb96 "/dfsfds", from_tty=1) at exec.c:268
|
||||
267 if (scratch_chan < 0)
|
||||
268 perror_with_name (filename);
|
||||
#4 in catch_command_errors_const (command=0x80f59f <exec_file_attach>, arg=0x7fffffffdb96 "/dfsfds", from_tty=1) at main.c:395
|
||||
#5 in captured_main (data=0x7fffffffd6f0) at main.c:1051
|
||||
1051 if (catch_command_errors_const (exec_file_attach, execarg,
|
||||
1052 !batch_flag))
|
||||
|
||||
Then GDB tries to attach to the process $p:
|
||||
|
||||
#0 inferior_appeared (inf=0x240e0b0, pid=29210) at inferior.c:305
|
||||
#1 in inf_ptrace_attach (ops=0x2339540, args=0x21dcdc0 "29210", from_tty=1) at inf-ptrace.c:206
|
||||
#2 in linux_nat_attach (ops=0x2339540, args=0x21dcdc0 "29210", from_tty=1) at linux-nat.c:1278
|
||||
#3 in attach_command (args=0x21dcdc0 "29210", from_tty=1) at infcmd.c:2748
|
||||
#4 in catch_command_errors (command=0x79d7e5 <attach_command>, arg=0x7fffffffdb9e "29210", from_tty=1) at main.c:368
|
||||
#5 in captured_main (data=0x7fffffffd6f0) at main.c:1082
|
||||
1082 if (catch_command_errors (attach_command, pid_or_core_arg,
|
||||
1083 !batch_flag) == 0)
|
||||
|
||||
@ -45,37 +42,14 @@ the lines
|
||||
still fail because consequently attach_command() fails to find the associated
|
||||
executable file:
|
||||
|
||||
#0 throw_error (error=GENERIC_ERROR, fmt=0x116d135 "%s.") at ./common/common-exceptions.c:371
|
||||
#1 in throw_perror_with_name (errcode=GENERIC_ERROR, string=0x2477860 "/tmp/sleep (deleted)") at utils.c:974
|
||||
#2 in perror_with_name (string=0x2477860 "/tmp/sleep (deleted)") at utils.c:982
|
||||
#3 in exec_file_attach (filename=0x2477860 "/tmp/sleep (deleted)", from_tty=1) at exec.c:268
|
||||
267 if (scratch_chan < 0)
|
||||
268 perror_with_name (filename);
|
||||
#4 in exec_file_locate_attach (pid=29210, from_tty=1) at exec.c:173
|
||||
#5 in attach_command_post_wait (args=0x24739b0 "29210", from_tty=1, async_exec=0) at infcmd.c:2628
|
||||
#6 in attach_command_continuation (args=0x2473590, err=0) at infcmd.c:2700
|
||||
#7 in do_my_continuations_1 (pmy_chain=0x7fffffffd190, err=0) at continuations.c:59
|
||||
#8 in do_my_continuations (list=0x240e130, err=0) at continuations.c:83
|
||||
#9 in do_all_inferior_continuations (err=0) at continuations.c:125
|
||||
#10 in inferior_event_handler (event_type=INF_EXEC_COMPLETE, client_data=0x0) at inf-loop.c:60
|
||||
#11 in fetch_inferior_event (client_data=0x0) at infrun.c:3929
|
||||
#12 in inferior_event_handler (event_type=INF_REG_EVENT, client_data=0x0) at inf-loop.c:44
|
||||
#13 in handle_target_event (error=0, client_data=0x0) at linux-nat.c:4681
|
||||
#14 in handle_file_event (file_ptr=0x21e4170, ready_mask=1) at event-loop.c:708
|
||||
#15 in gdb_wait_for_event (block=0) at event-loop.c:834
|
||||
#16 in gdb_do_one_event () at event-loop.c:298
|
||||
#17 in wait_sync_command_done () at top.c:373
|
||||
#18 in maybe_wait_sync_command_done (was_sync=0) at top.c:388
|
||||
#19 in catch_command_errors (command=0x79d7e5 <attach_command>, arg=0x7fffffffdb9e "29210", from_tty=1) at main.c:370
|
||||
#20 in captured_main (data=0x7fffffffd6f0) at main.c:1082
|
||||
1082 if (catch_command_errors (attach_command, pid_or_core_arg,
|
||||
1083 !batch_flag) == 0)
|
||||
|
||||
and therefore GDB executes the following:
|
||||
|
||||
(gdb) bt
|
||||
#5 in query (ctlstr=0x1141ae8 "A program is being debugged already. Kill it? ") at utils.c:1371
|
||||
#6 in target_preopen (from_tty=1) at target.c:2183
|
||||
2179 if (have_inferiors ())
|
||||
2180 {
|
||||
2181 if (!from_tty
|
||||
@ -85,20 +59,14 @@ and therefore GDB executes the following:
|
||||
2185 else
|
||||
2186 error (_("Program not killed."));
|
||||
2187 }
|
||||
#7 in core_open (arg=0x7fffffffdb9f "9694", from_tty=1) at corelow.c:283
|
||||
#8 in core_file_command (filename=0x7fffffffdb9f "9694", from_tty=1) at corefile.c:77
|
||||
#9 in catch_command_errors (command=0x86ca16 <core_file_command>, arg=0x7fffffffdb9f "9694", from_tty=1) at main.c:368
|
||||
#10 in captured_main (data=0x7fffffffd6f0) at main.c:1084
|
||||
1084 catch_command_errors (core_file_command, pid_or_core_arg,
|
||||
1085 !batch_flag);
|
||||
|
||||
No regressions on {x86_64,x86_64-m32,i686}-fedora24pre-linux-gnu.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/ChangeLog
|
||||
2015-10-16 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
@ -111,17 +79,18 @@ gdb/testsuite/ChangeLog
|
||||
* gdb.base/attach-kills.c: New.
|
||||
* gdb.base/attach-kills.exp: New.
|
||||
---
|
||||
gdb/testsuite/gdb.base/attach-kills.c | 25 ++++++++++++++++
|
||||
gdb/testsuite/gdb.base/attach-kills.exp | 49 +++++++++++++++++++++++++++++++
|
||||
2 files changed, 74 insertions(+)
|
||||
gdb/main.c | 5 +++-
|
||||
gdb/testsuite/gdb.base/attach-kills.c | 25 +++++++++++++++++
|
||||
gdb/testsuite/gdb.base/attach-kills.exp | 49 +++++++++++++++++++++++++++++++++
|
||||
3 files changed, 78 insertions(+), 1 deletion(-)
|
||||
create mode 100644 gdb/testsuite/gdb.base/attach-kills.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/attach-kills.exp
|
||||
|
||||
diff --git a/gdb/main.c b/gdb/main.c
|
||||
index 49c9b68..bc19699 100644
|
||||
index 17d35f4a8a..b079e79c93 100644
|
||||
--- a/gdb/main.c
|
||||
+++ b/gdb/main.c
|
||||
@@ -1080,7 +1080,10 @@ captured_main (void *data)
|
||||
@@ -1114,7 +1114,10 @@ captured_main_1 (struct captured_main_args *context)
|
||||
if (isdigit (pid_or_core_arg[0]))
|
||||
{
|
||||
if (catch_command_errors (attach_command, pid_or_core_arg,
|
||||
@ -135,7 +104,7 @@ index 49c9b68..bc19699 100644
|
||||
}
|
||||
diff --git a/gdb/testsuite/gdb.base/attach-kills.c b/gdb/testsuite/gdb.base/attach-kills.c
|
||||
new file mode 100644
|
||||
index 0000000..2398f00
|
||||
index 0000000000..2398f00442
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/attach-kills.c
|
||||
@@ -0,0 +1,25 @@
|
||||
@ -166,7 +135,7 @@ index 0000000..2398f00
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/attach-kills.exp b/gdb/testsuite/gdb.base/attach-kills.exp
|
||||
new file mode 100644
|
||||
index 0000000..9a93cb7
|
||||
index 0000000000..9a93cb7584
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/attach-kills.exp
|
||||
@@ -0,0 +1,49 @@
|
||||
@ -219,4 +188,6 @@ index 0000000..9a93cb7
|
||||
+}
|
||||
+
|
||||
+kill_wait_spawned_process $test_spawn_id
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
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-bz533176-fortran-omp-step.patch
|
||||
|
||||
FileName: gdb-bz533176-fortran-omp-step.patch
|
||||
|
||||
;; Fix stepping with OMP parallel Fortran sections (BZ 533176).
|
||||
;;=push+jan: It requires some better DWARF annotations.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=533176#c4
|
||||
|
||||
I find it a bug in DWARF and gdb behaves correctly according to it. From the
|
||||
@ -18,14 +28,19 @@ upstream) or "step" (default in F/RHEL) the simultaneous execution of the
|
||||
threads is inconvenient. Setting it to "on" will lockup the debugging as the
|
||||
threads need to get synchronized at some point. This is a more general
|
||||
debugging problem of GOMP outside of the scope of this Bug.
|
||||
---
|
||||
gdb/infrun.c | 11 +++++++++++
|
||||
gdb/testsuite/gdb.fortran/omp-step.exp | 31 +++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.fortran/omp-step.f90 | 32 ++++++++++++++++++++++++++++++++
|
||||
3 files changed, 74 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/omp-step.exp
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/omp-step.f90
|
||||
|
||||
|
||||
|
||||
Index: gdb-7.7.90.20140613/gdb/infrun.c
|
||||
===================================================================
|
||||
--- gdb-7.7.90.20140613.orig/gdb/infrun.c 2014-06-13 21:59:10.835805512 +0200
|
||||
+++ gdb-7.7.90.20140613/gdb/infrun.c 2014-06-13 21:59:31.064829121 +0200
|
||||
@@ -4820,6 +4820,16 @@ process_event_stop_test (struct executio
|
||||
diff --git a/gdb/infrun.c b/gdb/infrun.c
|
||||
index 1d0f731954..dcf022bd50 100644
|
||||
--- a/gdb/infrun.c
|
||||
+++ b/gdb/infrun.c
|
||||
@@ -6690,6 +6690,16 @@ process_event_stop_test (struct execution_control_state *ecs)
|
||||
|
||||
if (ecs->event_thread->control.step_over_calls == STEP_OVER_ALL)
|
||||
{
|
||||
@ -42,7 +57,7 @@ Index: gdb-7.7.90.20140613/gdb/infrun.c
|
||||
/* We're doing a "next".
|
||||
|
||||
Normal (forward) execution: set a breakpoint at the
|
||||
@@ -4855,6 +4865,7 @@ process_event_stop_test (struct executio
|
||||
@@ -6723,6 +6733,7 @@ process_event_stop_test (struct execution_control_state *ecs)
|
||||
|
||||
keep_going (ecs);
|
||||
return;
|
||||
@ -50,10 +65,11 @@ Index: gdb-7.7.90.20140613/gdb/infrun.c
|
||||
}
|
||||
|
||||
/* If we are in a function call trampoline (a stub between the
|
||||
Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/omp-step.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/omp-step.exp 2014-06-13 21:59:22.801819481 +0200
|
||||
diff --git a/gdb/testsuite/gdb.fortran/omp-step.exp b/gdb/testsuite/gdb.fortran/omp-step.exp
|
||||
new file mode 100644
|
||||
index 0000000000..66440a7507
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/omp-step.exp
|
||||
@@ -0,0 +1,31 @@
|
||||
+# Copyright 2009 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -86,10 +102,11 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/omp-step.exp
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "success"]
|
||||
+gdb_continue_to_breakpoint "success" ".*success.*"
|
||||
Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/omp-step.f90
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/omp-step.f90 2014-06-13 21:59:22.801819481 +0200
|
||||
diff --git a/gdb/testsuite/gdb.fortran/omp-step.f90 b/gdb/testsuite/gdb.fortran/omp-step.f90
|
||||
new file mode 100644
|
||||
index 0000000000..a0cfb37014
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/omp-step.f90
|
||||
@@ -0,0 +1,32 @@
|
||||
+! Copyright 2009 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -123,3 +140,6 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/omp-step.f90
|
||||
+ end do
|
||||
+ print *, "success"
|
||||
+ end
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,32 +1,52 @@
|
||||
Index: gdb-7.11.90.20160807/gdb/config/i386/linux64.mh
|
||||
===================================================================
|
||||
--- gdb-7.11.90.20160807.orig/gdb/config/i386/linux64.mh 2016-08-07 22:27:13.889285274 +0200
|
||||
+++ gdb-7.11.90.20160807/gdb/config/i386/linux64.mh 2016-08-07 22:29:20.451311124 +0200
|
||||
@@ -7,7 +7,7 @@
|
||||
linux-procfs.o linux-ptrace.o linux-btrace.o \
|
||||
linux-waitpid.o linux-personality.o x86-linux.o \
|
||||
x86-linux-dregs.o amd64-linux-siginfo.o linux-namespaces.o
|
||||
-NAT_FILE= config/nm-linux.h
|
||||
+NAT_FILE= nm-linux64.h
|
||||
NAT_CDEPS = $(srcdir)/proc-service.list
|
||||
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-bz541866-rwatch-before-run.patch
|
||||
|
||||
FileName: gdb-bz541866-rwatch-before-run.patch
|
||||
|
||||
;; Fix i386+x86_64 rwatch+awatch before run, regression against 6.8 (BZ 541866).
|
||||
;; Fix i386 rwatch+awatch before run (BZ 688788, on top of BZ 541866).
|
||||
;;=push+jan: It should be fixed properly instead.
|
||||
---
|
||||
gdb/breakpoint.c | 4 +--
|
||||
gdb/config/i386/nm-linux.h | 28 +++++++++++++++
|
||||
gdb/config/i386/nm-linux64.h | 28 +++++++++++++++
|
||||
gdb/configure.nat | 2 ++
|
||||
gdb/target.h | 2 ++
|
||||
.../gdb.base/watchpoint-hw-before-run.exp | 40 ++++++++++++++++++++++
|
||||
6 files changed, 102 insertions(+), 2 deletions(-)
|
||||
create mode 100644 gdb/config/i386/nm-linux.h
|
||||
create mode 100644 gdb/config/i386/nm-linux64.h
|
||||
create mode 100644 gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
|
||||
|
||||
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
|
||||
index 814802a0a1..5a99de75e1 100644
|
||||
--- a/gdb/breakpoint.c
|
||||
+++ b/gdb/breakpoint.c
|
||||
@@ -8864,7 +8864,7 @@ init_breakpoint_sal (struct breakpoint *b, struct gdbarch *gdbarch,
|
||||
int enabled, int internal, unsigned flags,
|
||||
int display_canonical)
|
||||
{
|
||||
- int i;
|
||||
+ int i ATTRIBUTE_UNUSED;
|
||||
|
||||
# The dynamically loaded libthread_db needs access to symbols in the
|
||||
Index: gdb-7.11.90.20160807/gdb/config/i386/linux.mh
|
||||
===================================================================
|
||||
--- gdb-7.11.90.20160807.orig/gdb/config/i386/linux.mh 2016-08-07 22:27:13.889285274 +0200
|
||||
+++ gdb-7.11.90.20160807/gdb/config/i386/linux.mh 2016-08-07 22:29:20.451311124 +0200
|
||||
@@ -1,6 +1,6 @@
|
||||
# Host: Intel 386 running GNU/Linux.
|
||||
if (type == bp_hardware_breakpoint)
|
||||
{
|
||||
@@ -14425,7 +14425,7 @@ enable_breakpoint_disp (struct breakpoint *bpt, enum bpdisp disposition,
|
||||
|
||||
-NAT_FILE= config/nm-linux.h
|
||||
+NAT_FILE= nm-linux.h
|
||||
NATDEPFILES= inf-ptrace.o fork-child.o \
|
||||
x86-nat.o x86-dregs.o i386-linux-nat.o x86-linux-nat.o \
|
||||
proc-service.o linux-thread-db.o \
|
||||
Index: gdb-7.11.90.20160807/gdb/config/i386/nm-linux.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.11.90.20160807/gdb/config/i386/nm-linux.h 2016-08-07 22:29:20.451311124 +0200
|
||||
if (bpt->type == bp_hardware_breakpoint)
|
||||
{
|
||||
- int i;
|
||||
+ int i ATTRIBUTE_UNUSED;
|
||||
i = hw_breakpoint_used_count ();
|
||||
target_resources_ok =
|
||||
target_can_use_hardware_watchpoint (bp_hardware_breakpoint,
|
||||
diff --git a/gdb/config/i386/nm-linux.h b/gdb/config/i386/nm-linux.h
|
||||
new file mode 100644
|
||||
index 0000000000..38e94baab1
|
||||
--- /dev/null
|
||||
+++ b/gdb/config/i386/nm-linux.h
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* Native support for GNU/Linux i386.
|
||||
+
|
||||
@ -56,10 +76,11 @@ Index: gdb-7.11.90.20160807/gdb/config/i386/nm-linux.h
|
||||
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
|
||||
+
|
||||
+#endif /* NM_LINUX64_H */
|
||||
Index: gdb-7.11.90.20160807/gdb/config/i386/nm-linux64.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.11.90.20160807/gdb/config/i386/nm-linux64.h 2016-08-07 22:29:20.451311124 +0200
|
||||
diff --git a/gdb/config/i386/nm-linux64.h b/gdb/config/i386/nm-linux64.h
|
||||
new file mode 100644
|
||||
index 0000000000..212daba477
|
||||
--- /dev/null
|
||||
+++ b/gdb/config/i386/nm-linux64.h
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* Native support for GNU/Linux amd64.
|
||||
+
|
||||
@ -89,11 +110,31 @@ Index: gdb-7.11.90.20160807/gdb/config/i386/nm-linux64.h
|
||||
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
|
||||
+
|
||||
+#endif /* NM_LINUX64_H */
|
||||
Index: gdb-7.11.90.20160807/gdb/target.h
|
||||
===================================================================
|
||||
--- gdb-7.11.90.20160807.orig/gdb/target.h 2016-08-07 22:27:13.889285274 +0200
|
||||
+++ gdb-7.11.90.20160807/gdb/target.h 2016-08-07 22:29:20.452311132 +0200
|
||||
@@ -1939,9 +1939,11 @@
|
||||
diff --git a/gdb/configure.nat b/gdb/configure.nat
|
||||
index 8e14892722..6dbb072054 100644
|
||||
--- a/gdb/configure.nat
|
||||
+++ b/gdb/configure.nat
|
||||
@@ -237,6 +237,7 @@ case ${gdb_host} in
|
||||
;;
|
||||
i386)
|
||||
# Host: Intel 386 running GNU/Linux.
|
||||
+ NAT_FILE="${srcdir}/config/${gdb_host_cpu}/nm-linux.h"
|
||||
NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \
|
||||
i386-linux-nat.o x86-linux-nat.o linux-btrace.o \
|
||||
x86-linux.o x86-linux-dregs.o"
|
||||
@@ -289,6 +290,7 @@ case ${gdb_host} in
|
||||
case ${gdb_host_cpu} in
|
||||
i386)
|
||||
# Host: GNU/Linux x86-64
|
||||
+ NAT_FILE="${srcdir}/config/${gdb_host_cpu}/nm-linux64.h"
|
||||
NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \
|
||||
amd64-nat.o amd64-linux-nat.o x86-linux-nat.o linux-btrace.o \
|
||||
x86-linux.o x86-linux-dregs.o amd64-linux-siginfo.o"
|
||||
diff --git a/gdb/target.h b/gdb/target.h
|
||||
index 4781fbc59c..e3a2882fe5 100644
|
||||
--- a/gdb/target.h
|
||||
+++ b/gdb/target.h
|
||||
@@ -1915,9 +1915,11 @@ extern struct thread_info *target_thread_handle_to_thread_info
|
||||
one. OTHERTYPE is the number of watchpoints of other types than
|
||||
this one used so far. */
|
||||
|
||||
@ -105,10 +146,11 @@ Index: gdb-7.11.90.20160807/gdb/target.h
|
||||
|
||||
/* Returns the number of debug registers needed to watch the given
|
||||
memory region, or zero if not supported. */
|
||||
Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2016-08-07 22:29:20.452311132 +0200
|
||||
diff --git a/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp b/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
|
||||
new file mode 100644
|
||||
index 0000000000..4ce9997e4a
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
|
||||
@@ -0,0 +1,40 @@
|
||||
+# Copyright 2009, 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -150,16 +192,6 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
|
||||
+gdb_test "" "main .* at .*" "start"
|
||||
+
|
||||
+gdb_test "continue" "Continuing.\r\n\r\nHardware read watchpoint \[0-9\]+: watchee\r\n\r\nValue = 0\r\n.*"
|
||||
Index: gdb-7.11.90.20160807/gdb/breakpoint.c
|
||||
===================================================================
|
||||
--- gdb-7.11.90.20160807.orig/gdb/breakpoint.c 2016-08-07 22:33:38.835405458 +0200
|
||||
+++ gdb-7.11.90.20160807/gdb/breakpoint.c 2016-08-07 22:34:45.023941950 +0200
|
||||
@@ -14953,7 +14953,7 @@
|
||||
|
||||
if (bpt->type == bp_hardware_breakpoint)
|
||||
{
|
||||
- int i;
|
||||
+ int i ATTRIBUTE_UNUSED;
|
||||
i = hw_breakpoint_used_count ();
|
||||
target_resources_ok =
|
||||
target_can_use_hardware_watchpoint (bp_hardware_breakpoint,
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,5 +1,14 @@
|
||||
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: nomem: internal_error -> error
|
||||
|
||||
FileName: gdb-bz568248-oom-is-error.patch
|
||||
|
||||
;; Out of memory is just an error, not fatal (uninitialized VLS vars, BZ 568248).
|
||||
;;=push+jan: Inferior objects should be read in parts, then this patch gets obsoleted.
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2010-06/msg00005.html
|
||||
Subject: [rfc patch] nomem: internal_error -> error
|
||||
|
||||
Hi,
|
||||
|
||||
@ -24,7 +33,6 @@ It is apparently because boundary for the variable `a' is not initialized
|
||||
there. Users notice it due to Eclipse-CDT trying to automatically display all
|
||||
the local variables on each step.
|
||||
|
||||
|
||||
Apparentl no regressions on {x86_64,x86_64-m32,i686}-fedora13-linux-gnu.
|
||||
But is anone aware of the reasons to use internal_error there?
|
||||
I find simple error as a perfectly reasonable there.
|
||||
@ -35,22 +43,23 @@ IIRC this idea has been discussed with Tom Tromey, not sure of its origin.
|
||||
I understand it may be offtopic for FSF GDB but from some GDB crashes I am not
|
||||
sure if it can happen only due to the VLA variables.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/
|
||||
2010-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* utils.c (nomem): Change internal_error to error.
|
||||
---
|
||||
gdb/utils.c | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
Index: gdb-7.3.50.20110722/gdb/utils.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/utils.c 2011-07-22 19:28:58.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/utils.c 2011-07-22 19:34:25.000000000 +0200
|
||||
@@ -1219,13 +1219,11 @@ malloc_failure (long size)
|
||||
diff --git a/gdb/utils.c b/gdb/utils.c
|
||||
index c531748fe4..0066bfcc4b 100644
|
||||
--- a/gdb/utils.c
|
||||
+++ b/gdb/utils.c
|
||||
@@ -774,13 +774,11 @@ malloc_failure (long size)
|
||||
{
|
||||
if (size > 0)
|
||||
{
|
||||
@ -66,3 +75,6 @@ Index: gdb-7.3.50.20110722/gdb/utils.c
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,7 +1,26 @@
|
||||
Index: gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S 2014-02-06 22:02:21.981449555 +0100
|
||||
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
|
||||
|
||||
FileName: gdb-bz601887-dwarf4-rh-test.patch
|
||||
|
||||
;; Backport DWARF-4 support (BZ 601887, Tom Tromey).
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S | 167 ++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c | 22 ++++
|
||||
gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp | 42 +++++++
|
||||
3 files changed, 231 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp
|
||||
|
||||
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
|
||||
index 0000000000..48b1bbf3e1
|
||||
--- /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.
|
||||
+
|
||||
@ -170,10 +189,11 @@ Index: gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S
|
||||
+ .string "main"
|
||||
+ .ident "GCC: (GNU) 4.4.4 20100503 (Red Hat 4.4.4-2)"
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
Index: gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c 2014-02-06 22:02:21.981449555 +0100
|
||||
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
|
||||
index 0000000000..46fcd120f4
|
||||
--- /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.
|
||||
+
|
||||
@ -197,10 +217,11 @@ Index: gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp 2014-02-06 22:12:10.788032417 +0100
|
||||
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
|
||||
index 0000000000..a728f9c5ed
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp
|
||||
@@ -0,0 +1,42 @@
|
||||
+# Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -244,3 +265,6 @@ Index: gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp
|
||||
+clean_restart $executable
|
||||
+
|
||||
+gdb_test "ptype main" {type = int \(void\)}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,7 +1,24 @@
|
||||
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-bz634108-solib_address.patch
|
||||
|
||||
FileName: gdb-bz634108-solib_address.patch
|
||||
|
||||
;; Verify GDB Python built-in function gdb.solib_address exists (BZ # 634108).
|
||||
;;=fedoratest
|
||||
|
||||
Fix gdb.solib_address (fix by Phil Muldoon).
|
||||
|
||||
s/solib_address/solib_name/ during upstreaming.
|
||||
---
|
||||
.../gdb.python/rh634108-solib_address.exp | 24 ++++++++++++++++++++++
|
||||
1 file changed, 24 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.python/rh634108-solib_address.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.python/rh634108-solib_address.exp b/gdb/testsuite/gdb.python/rh634108-solib_address.exp
|
||||
new file mode 100644
|
||||
index 0000000000..c0451cf09e
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.python/rh634108-solib_address.exp
|
||||
@@ -0,0 +1,24 @@
|
||||
@ -29,3 +46,6 @@ s/solib_address/solib_name/ during upstreaming.
|
||||
+if { [skip_python_tests] } { continue }
|
||||
+
|
||||
+gdb_test "python print gdb.solib_name(-1)" "None" "gdb.solib_name exists"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,6 +1,21 @@
|
||||
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-ccache-workaround.patch
|
||||
|
||||
FileName: gdb-ccache-workaround.patch
|
||||
|
||||
;; Workaround ccache making lineno non-zero for command-line definitions.
|
||||
;;=fedoratest: ccache is rarely used and it is even fixed now.
|
||||
---
|
||||
gdb/testsuite/gdb.base/macscp.exp | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/macscp.exp b/gdb/testsuite/gdb.base/macscp.exp
|
||||
index 27dc991ce9..a3b9458b44 100644
|
||||
--- a/gdb/testsuite/gdb.base/macscp.exp
|
||||
+++ b/gdb/testsuite/gdb.base/macscp.exp
|
||||
@@ -33,6 +33,14 @@ if [test_compiler_info gcc*] {
|
||||
@@ -25,6 +25,14 @@ if { [test_compiler_info "gcc-*"] || [test_compiler_info "clang-*"] } {
|
||||
lappend options additional_flags=-g3
|
||||
}
|
||||
|
||||
@ -15,3 +30,6 @@
|
||||
# Generate the intermediate object file. This is required by Darwin to
|
||||
# have access to the .debug_macinfo section.
|
||||
if {[gdb_compile "${srcdir}/${subdir}/macscp1.c" "${objfile}" \
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,6 +1,21 @@
|
||||
--- gdb-7.11/gdb/remote.c-orig 2016-04-06 17:46:52.428921496 +0200
|
||||
+++ gdb-7.11/gdb/remote.c 2016-04-06 18:28:26.781923516 +0200
|
||||
@@ -13002,7 +13002,17 @@ remote_pid_to_exec_file (struct target_o
|
||||
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-container-rh-pkg.patch
|
||||
|
||||
FileName: gdb-container-rh-pkg.patch
|
||||
|
||||
;; Add messages suggesting more recent RHEL gdbserver (RH BZ 1321114).
|
||||
;;=fedora
|
||||
---
|
||||
gdb/remote.c | 12 +++++++++++-
|
||||
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/remote.c b/gdb/remote.c
|
||||
index 86777f1e5e..fc003c0736 100644
|
||||
--- a/gdb/remote.c
|
||||
+++ b/gdb/remote.c
|
||||
@@ -13437,7 +13437,17 @@ remote_pid_to_exec_file (struct target_ops *self, int pid)
|
||||
char *annex = NULL;
|
||||
|
||||
if (packet_support (PACKET_qXfer_exec_file) != PACKET_ENABLE)
|
||||
@ -17,5 +32,8 @@
|
||||
+ return NULL;
|
||||
+ }
|
||||
|
||||
if (filename != NULL)
|
||||
xfree (filename);
|
||||
inf = find_inferior_pid (pid);
|
||||
if (inf == NULL)
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,3 +1,14 @@
|
||||
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-core-open-vdso-warning.patch
|
||||
|
||||
FileName: gdb-core-open-vdso-warning.patch
|
||||
|
||||
;; Fix GNU/Linux core open: Can't read pathname for load map: Input/output error.
|
||||
;; Fix regression of undisplayed missing shared libraries caused by a fix for.
|
||||
;;=fedoratest: It should be in glibc: libc-alpha: <20091004161706.GA27450@.*>
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2009-10/msg00142.html
|
||||
Subject: [patch] Fix GNU/Linux core open: Can't read pathname for load map: Input/output error.
|
||||
|
||||
@ -6,11 +17,14 @@ Subject: [patch] Fix GNU/Linux core open: Can't read pathname for load map: Inp
|
||||
commit 7d760051ffb8a23cdc51342d4e6243fbc462f73f
|
||||
Author: Ulrich Weigand <uweigand@de.ibm.com>
|
||||
Date: Wed Sep 25 11:52:50 2013 +0000
|
||||
---
|
||||
gdb/testsuite/gdb.base/solib-symbol.exp | 23 +++++++++++++++++++++--
|
||||
1 file changed, 21 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/solib-symbol.exp
|
||||
===================================================================
|
||||
--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/gdb.base/solib-symbol.exp 2013-08-02 16:27:28.833259471 +0200
|
||||
+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/solib-symbol.exp 2013-08-02 16:28:22.549330973 +0200
|
||||
diff --git a/gdb/testsuite/gdb.base/solib-symbol.exp b/gdb/testsuite/gdb.base/solib-symbol.exp
|
||||
index 20c1d47a03..893efe0b2d 100644
|
||||
--- a/gdb/testsuite/gdb.base/solib-symbol.exp
|
||||
+++ b/gdb/testsuite/gdb.base/solib-symbol.exp
|
||||
@@ -29,6 +29,7 @@ set testfile "solib-symbol-main"
|
||||
set srcfile ${srcdir}/${subdir}/${testfile}.c
|
||||
set binfile [standard_output_file ${testfile}]
|
||||
@ -48,3 +62,6 @@ Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/solib-symbol.exp
|
||||
+gdb_run_cmd
|
||||
+gdb_test "" "warning: Could not load shared library symbols for \[0-9\]+ libraries,.*\r\nBreakpoint \[0-9\]+, main .*" \
|
||||
+ "warning for missing libraries"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,10 +1,29 @@
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1020004
|
||||
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-dts-rhel6-python-compat.patch
|
||||
|
||||
Index: gdb-7.12.50.20170207/gdb/data-directory/Makefile.in
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170207.orig/gdb/data-directory/Makefile.in 2017-02-26 21:10:31.418894975 +0100
|
||||
+++ gdb-7.12.50.20170207/gdb/data-directory/Makefile.in 2017-02-26 21:11:07.083147930 +0100
|
||||
@@ -71,6 +71,8 @@
|
||||
FileName: gdb-dts-rhel6-python-compat.patch
|
||||
|
||||
;; [rhel6] DTS backward Python compatibility API (BZ 1020004, Phil Muldoon).
|
||||
;;=fedora
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1020004
|
||||
---
|
||||
gdb/data-directory/Makefile.in | 3 +
|
||||
gdb/python/lib/gdb/FrameWrapper.py | 122 ++++++++++++++++++++++++++++++++
|
||||
gdb/python/lib/gdb/backtrace.py | 42 +++++++++++
|
||||
gdb/python/lib/gdb/command/backtrace.py | 106 +++++++++++++++++++++++++++
|
||||
4 files changed, 273 insertions(+)
|
||||
create mode 100644 gdb/python/lib/gdb/FrameWrapper.py
|
||||
create mode 100644 gdb/python/lib/gdb/backtrace.py
|
||||
create mode 100644 gdb/python/lib/gdb/command/backtrace.py
|
||||
|
||||
diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in
|
||||
index 753e0b69a3..5c7c0b4c2e 100644
|
||||
--- a/gdb/data-directory/Makefile.in
|
||||
+++ b/gdb/data-directory/Makefile.in
|
||||
@@ -71,6 +71,8 @@ PYTHON_FILE_LIST = \
|
||||
gdb/__init__.py \
|
||||
gdb/FrameDecorator.py \
|
||||
gdb/FrameIterator.py \
|
||||
@ -13,18 +32,19 @@ Index: gdb-7.12.50.20170207/gdb/data-directory/Makefile.in
|
||||
gdb/frames.py \
|
||||
gdb/printing.py \
|
||||
gdb/prompt.py \
|
||||
@@ -83,6 +85,7 @@
|
||||
gdb/command/pahole.py \
|
||||
gdb/command/xmethods.py \
|
||||
@@ -79,6 +81,7 @@ PYTHON_FILE_LIST = \
|
||||
gdb/xmethod.py \
|
||||
gdb/command/__init__.py \
|
||||
gdb/command/explore.py \
|
||||
+ gdb/command/backtrace.py \
|
||||
gdb/command/frame_filters.py \
|
||||
gdb/command/pretty_printers.py \
|
||||
gdb/command/prompt.py \
|
||||
Index: gdb-7.12.50.20170207/gdb/python/lib/gdb/FrameWrapper.py
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/python/lib/gdb/FrameWrapper.py 2017-02-26 21:10:31.419894983 +0100
|
||||
diff --git a/gdb/python/lib/gdb/FrameWrapper.py b/gdb/python/lib/gdb/FrameWrapper.py
|
||||
new file mode 100644
|
||||
index 0000000000..34ba4a2a12
|
||||
--- /dev/null
|
||||
+++ b/gdb/python/lib/gdb/FrameWrapper.py
|
||||
@@ -0,0 +1,122 @@
|
||||
+# Wrapper API for frames.
|
||||
+
|
||||
@ -148,10 +168,11 @@ Index: gdb-7.12.50.20170207/gdb/python/lib/gdb/FrameWrapper.py
|
||||
+
|
||||
+ def __getattr__ (self, name):
|
||||
+ return getattr (self.frame, name)
|
||||
Index: gdb-7.12.50.20170207/gdb/python/lib/gdb/backtrace.py
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/python/lib/gdb/backtrace.py 2017-02-26 21:10:31.419894983 +0100
|
||||
diff --git a/gdb/python/lib/gdb/backtrace.py b/gdb/python/lib/gdb/backtrace.py
|
||||
new file mode 100644
|
||||
index 0000000000..06c893f239
|
||||
--- /dev/null
|
||||
+++ b/gdb/python/lib/gdb/backtrace.py
|
||||
@@ -0,0 +1,42 @@
|
||||
+# Filtering backtrace.
|
||||
+
|
||||
@ -195,10 +216,11 @@ Index: gdb-7.12.50.20170207/gdb/python/lib/gdb/backtrace.py
|
||||
+ return iter
|
||||
+ return old_frame_filter (iter)
|
||||
+
|
||||
Index: gdb-7.12.50.20170207/gdb/python/lib/gdb/command/backtrace.py
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12.50.20170207/gdb/python/lib/gdb/command/backtrace.py 2017-02-26 21:10:31.419894983 +0100
|
||||
diff --git a/gdb/python/lib/gdb/command/backtrace.py b/gdb/python/lib/gdb/command/backtrace.py
|
||||
new file mode 100644
|
||||
index 0000000000..eeea9093e8
|
||||
--- /dev/null
|
||||
+++ b/gdb/python/lib/gdb/command/backtrace.py
|
||||
@@ -0,0 +1,106 @@
|
||||
+# New backtrace command.
|
||||
+
|
||||
@ -306,3 +328,6 @@ Index: gdb-7.12.50.20170207/gdb/python/lib/gdb/command/backtrace.py
|
||||
+ pair[1].describe (sys.stdout, full)
|
||||
+
|
||||
+FilteringBacktrace()
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,10 +1,25 @@
|
||||
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-fedora-libncursesw.patch
|
||||
|
||||
FileName: gdb-fedora-libncursesw.patch
|
||||
|
||||
;; Force libncursesw over libncurses to match the includes (RH BZ 1270534).
|
||||
;;=push+jan
|
||||
|
||||
Fedora: Force libncursesw over libncurses to match the includes.
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1270534
|
||||
---
|
||||
gdb/configure | 6 ++++--
|
||||
gdb/configure.ac | 6 ++++--
|
||||
2 files changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff -dup -rup gdb-7.10.50.20151113-orig/gdb/configure gdb-7.10.50.20151113/gdb/configure
|
||||
--- gdb-7.10.50.20151113-orig/gdb/configure 2015-11-14 16:14:04.404118312 +0100
|
||||
+++ gdb-7.10.50.20151113/gdb/configure 2015-11-14 16:17:59.074566047 +0100
|
||||
@@ -8463,6 +8463,7 @@ if test x"$prefer_curses" = xyes; then
|
||||
diff --git a/gdb/configure b/gdb/configure
|
||||
index 6fb5b5b509..db849572b5 100755
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -9238,6 +9238,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.
|
||||
@ -12,16 +27,16 @@ diff -dup -rup gdb-7.10.50.20151113-orig/gdb/configure gdb-7.10.50.20151113/gdb/
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
|
||||
$as_echo_n "checking for library containing waddstr... " >&6; }
|
||||
if test "${ac_cv_search_waddstr+set}" = set; then :
|
||||
@@ -8487,7 +8488,7 @@ return waddstr ();
|
||||
@@ -9262,7 +9263,7 @@ return waddstr ();
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
-for ac_lib in '' ncurses cursesX curses; do
|
||||
-for ac_lib in '' ncursesw ncurses cursesX curses; do
|
||||
+for ac_lib in '' ncursesw; do
|
||||
if test -z "$ac_lib"; then
|
||||
ac_res="none required"
|
||||
else
|
||||
@@ -8561,6 +8562,7 @@ case $host_os in
|
||||
@@ -9336,6 +9337,7 @@ case $host_os in
|
||||
esac
|
||||
|
||||
# These are the libraries checked by Readline.
|
||||
@ -29,35 +44,39 @@ diff -dup -rup gdb-7.10.50.20151113-orig/gdb/configure gdb-7.10.50.20151113/gdb/
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
|
||||
$as_echo_n "checking for library containing tgetent... " >&6; }
|
||||
if test "${ac_cv_search_tgetent+set}" = set; then :
|
||||
@@ -8585,7 +8587,7 @@ return tgetent ();
|
||||
@@ -9360,7 +9362,7 @@ return tgetent ();
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
-for ac_lib in '' termcap tinfo curses ncurses; do
|
||||
-for ac_lib in '' termcap tinfo curses ncursesw ncurses; do
|
||||
+for ac_lib in '' termcap tinfo ncursesw; do
|
||||
if test -z "$ac_lib"; then
|
||||
ac_res="none required"
|
||||
else
|
||||
diff -dup -rup gdb-7.10.50.20151113-orig/gdb/configure.ac gdb-7.10.50.20151113/gdb/configure.ac
|
||||
--- gdb-7.10.50.20151113-orig/gdb/configure.ac 2015-11-14 16:14:04.404118312 +0100
|
||||
+++ gdb-7.10.50.20151113/gdb/configure.ac 2015-11-14 16:17:54.898540284 +0100
|
||||
@@ -771,7 +771,8 @@ if test x"$prefer_curses" = xyes; then
|
||||
diff --git a/gdb/configure.ac b/gdb/configure.ac
|
||||
index d891c7bccc..4412e25450 100644
|
||||
--- a/gdb/configure.ac
|
||||
+++ b/gdb/configure.ac
|
||||
@@ -755,7 +755,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.
|
||||
- AC_SEARCH_LIBS(waddstr, [ncurses cursesX curses])
|
||||
- AC_SEARCH_LIBS(waddstr, [ncursesw ncurses cursesX curses])
|
||||
+ # Fedora: Force libncursesw over libncurses to match the includes.
|
||||
+ AC_SEARCH_LIBS(waddstr, [ncursesw])
|
||||
|
||||
if test "$ac_cv_search_waddstr" != no; then
|
||||
curses_found=yes
|
||||
@@ -813,7 +814,8 @@ case $host_os in
|
||||
@@ -797,7 +798,8 @@ case $host_os in
|
||||
esac
|
||||
|
||||
# These are the libraries checked by Readline.
|
||||
-AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncurses])
|
||||
-AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncursesw ncurses])
|
||||
+# Fedora: Force libncursesw over libncurses to match the includes.
|
||||
+AC_SEARCH_LIBS(tgetent, [termcap tinfo ncursesw])
|
||||
|
||||
if test "$ac_cv_search_tgetent" = no; then
|
||||
CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
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-follow-child-stale-parent.patch
|
||||
|
||||
FileName: gdb-follow-child-stale-parent.patch
|
||||
|
||||
;; Fix regression by python on ia64 due to stale current frame.
|
||||
;;=push+jan
|
||||
|
||||
Problem occurs with python and its get_current_arch () as it selects
|
||||
selected_frame and current_frame while still inferior_ptid is valid for the
|
||||
original parent. But since this place it is already attached and later
|
||||
@ -12,10 +22,15 @@ unwinders try to access it, breaking:
|
||||
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the second fork
|
||||
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the second fork
|
||||
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: finish
|
||||
---
|
||||
gdb/infrun.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
--- ./gdb/infrun.c 2009-12-21 20:26:30.000000000 +0100
|
||||
+++ ./gdb/infrun.c 2009-12-21 20:26:11.000000000 +0100
|
||||
@@ -375,6 +375,9 @@ follow_fork (void)
|
||||
diff --git a/gdb/infrun.c b/gdb/infrun.c
|
||||
index dcf022bd50..b468d02fd6 100644
|
||||
--- a/gdb/infrun.c
|
||||
+++ b/gdb/infrun.c
|
||||
@@ -749,6 +749,9 @@ follow_fork (void)
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -25,3 +40,6 @@ unwinders try to access it, breaking:
|
||||
/* This pending follow fork event is now handled, one way
|
||||
or another. The previous selected thread may be gone
|
||||
from the lists by now, but if it is still around, need
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,15 +1,21 @@
|
||||
http://sourceware.org/ml/gdb-patches/2014-07/msg00709.html
|
||||
Subject: [patch] Display Fortran strings in backtraces
|
||||
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: Display Fortran strings in backtraces
|
||||
|
||||
FileName: 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
|
||||
#0 f (s=..., _s=3) at ./gdb.fortran/fortran-frame-string.f90:24
|
||||
->
|
||||
#0 f (s='foo', _s=3) at ./gdb.fortran/fortran-frame-string.f90:24
|
||||
|
||||
The patch is simple and I do not see why it should not be this way.
|
||||
|
||||
@ -21,14 +27,18 @@ 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
|
||||
|
||||
---
|
||||
gdb/testsuite/gdb.fortran/fortran-frame-string.exp | 36 ++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.fortran/fortran-frame-string.f90 | 28 +++++++++++++++++
|
||||
2 files changed, 64 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/fortran-frame-string.exp
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/fortran-frame-string.f90
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.fortran/fortran-frame-string.exp b/gdb/testsuite/gdb.fortran/fortran-frame-string.exp
|
||||
new file mode 100644
|
||||
index 0000000..4b78266
|
||||
index 0000000000..7114afd440
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/fortran-frame-string.exp
|
||||
@@ -0,0 +1,36 @@
|
||||
@ -70,7 +80,7 @@ index 0000000..4b78266
|
||||
+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
|
||||
index 0000000..3d1576f
|
||||
index 0000000000..3d1576fb1f
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/fortran-frame-string.f90
|
||||
@@ -0,0 +1,28 @@
|
||||
@ -102,3 +112,6 @@ index 0000000..3d1576f
|
||||
+ program main
|
||||
+ call f ('foo')
|
||||
+ end
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,5 +1,14 @@
|
||||
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: RFC: add DWARF index support
|
||||
|
||||
FileName: gdb-gdb-add-index-script.patch
|
||||
|
||||
;; Provide /usr/bin/gdb-add-index for rpm-build (Tom Tromey).
|
||||
;;=push: Re-check against the upstream version.
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2010-07/msg00184.html
|
||||
Subject: Re: [0/4] RFC: add DWARF index support
|
||||
|
||||
Jan Kratochvil: Fixed $d -> $dir.
|
||||
Jan Kratochvil: Remove /dev/null redirection.
|
||||
@ -30,21 +39,17 @@ From: Tom Tromey <tromey@redhat.com>
|
||||
Date: Fri, 9 Jul 2010 11:17:54 -0600
|
||||
Subject: [PATCH 4/4] add gdb-add-index
|
||||
Subject: [PATCH 4/4] add gdb-add-index
|
||||
|
||||
---
|
||||
gdb/ChangeLog | 5 +++++
|
||||
gdb/Makefile.in | 11 ++++++++++-
|
||||
gdb/doc/ChangeLog | 4 ++++
|
||||
gdb/doc/gdb.texinfo | 8 ++++++++
|
||||
gdb/gdb-add-index | 30 ++++++++++++++++++++++++++++++
|
||||
5 files changed, 57 insertions(+), 1 deletions(-)
|
||||
create mode 100755 gdb/gdb-add-index
|
||||
gdb/Makefile.in | 9 +++++++++
|
||||
gdb/doc/Makefile.in | 9 ++++++++-
|
||||
gdb/doc/gdb.texinfo | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 74 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: gdb-7.6.90.20140127/gdb/Makefile.in
|
||||
===================================================================
|
||||
--- gdb-7.6.90.20140127.orig/gdb/Makefile.in 2014-02-06 17:37:54.555975958 +0100
|
||||
+++ gdb-7.6.90.20140127/gdb/Makefile.in 2014-02-06 17:38:52.110038415 +0100
|
||||
@@ -1093,6 +1093,15 @@ install-only: install-gstack $(CONFIG_IN
|
||||
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
|
||||
index e77d6a5c03..3142ad6af1 100644
|
||||
--- a/gdb/Makefile.in
|
||||
+++ b/gdb/Makefile.in
|
||||
@@ -1770,6 +1770,15 @@ install-only: install-gstack $(CONFIG_INSTALL)
|
||||
$(INSTALL_SCRIPT) gcore \
|
||||
$(DESTDIR)$(bindir)/$$transformed_name; \
|
||||
fi
|
||||
@ -60,11 +65,38 @@ Index: gdb-7.6.90.20140127/gdb/Makefile.in
|
||||
@$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
|
||||
|
||||
install-strip:
|
||||
Index: gdb-7.6.90.20140127/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-7.6.90.20140127.orig/gdb/doc/gdb.texinfo 2014-02-06 17:37:50.822971940 +0100
|
||||
+++ gdb-7.6.90.20140127/gdb/doc/gdb.texinfo 2014-02-06 17:37:54.565975968 +0100
|
||||
@@ -17749,6 +17749,14 @@ There are currently some limitation on i
|
||||
diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
|
||||
index eafadee899..0323bc4ecb 100644
|
||||
--- a/gdb/doc/Makefile.in
|
||||
+++ b/gdb/doc/Makefile.in
|
||||
@@ -174,7 +174,7 @@ POD2MAN5 = pod2man --center="GNU Development Tools" \
|
||||
--release="gdb-`sed q version.subst`" --section=5
|
||||
|
||||
# List of man pages generated from gdb.texi
|
||||
-MAN1S = gdb.1 gdbserver.1 gcore.1
|
||||
+MAN1S = gdb.1 gdbserver.1 gcore.1 gdb-add-index.1
|
||||
MAN5S = gdbinit.5
|
||||
MANS = $(MAN1S) $(MAN5S)
|
||||
|
||||
@@ -633,6 +633,13 @@ gcore.1: $(GDB_DOC_FILES)
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f gcore.pod
|
||||
|
||||
+gdb-add-index.1: $(GDB_DOC_FILES)
|
||||
+ touch $@
|
||||
+ -$(TEXI2POD) $(MANCONF) -Dgdb-add-index < $(srcdir)/gdb.texinfo > gdb-add-index.pod
|
||||
+ -($(POD2MAN1) gdb-add-index.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
+ rm -f gdb-add-index.pod
|
||||
+
|
||||
gdbinit.5: $(GDB_DOC_FILES)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dgdbinit < $(srcdir)/gdb.texinfo > gdbinit.pod
|
||||
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
|
||||
index 2f2cbd3dea..7b99ae1551 100644
|
||||
--- a/gdb/doc/gdb.texinfo
|
||||
+++ b/gdb/doc/gdb.texinfo
|
||||
@@ -19796,6 +19796,14 @@ There are currently some limitation on indices. They only work when
|
||||
for DWARF debugging information, not stabs. And, they do not
|
||||
currently work for programs using Ada.
|
||||
|
||||
@ -79,7 +111,7 @@ Index: gdb-7.6.90.20140127/gdb/doc/gdb.texinfo
|
||||
@node Symbol Errors
|
||||
@section Errors Reading Symbol Files
|
||||
|
||||
@@ -43878,6 +43886,7 @@ switch (die->tag)
|
||||
@@ -42759,6 +42767,7 @@ switch (die->tag)
|
||||
* gdbserver man:: Remote Server for the GNU Debugger man page
|
||||
* gcore man:: Generate a core file of a running program
|
||||
* gdbinit man:: gdbinit scripts
|
||||
@ -87,22 +119,10 @@ Index: gdb-7.6.90.20140127/gdb/doc/gdb.texinfo
|
||||
@end menu
|
||||
|
||||
@node gdb man
|
||||
@@ -44530,6 +44539,54 @@ gdb(1), @code{info -f gdb -n Startup}
|
||||
The full documentation for @value{GDBN} is maintained as a Texinfo manual.
|
||||
If the @code{info} and @code{gdb} programs and @value{GDBN}'s Texinfo
|
||||
documentation are properly installed at your site, the command
|
||||
+
|
||||
+@smallexample
|
||||
+info gdb
|
||||
+@end smallexample
|
||||
+
|
||||
+should give you access to the complete manual.
|
||||
+
|
||||
+@cite{Using GDB: A Guide to the GNU Source-Level Debugger},
|
||||
+Richard M. Stallman and Roland H. Pesch, July 1991.
|
||||
+@end ifset
|
||||
+@c man end
|
||||
+
|
||||
@@ -43435,6 +43444,54 @@ Richard M. Stallman and Roland H. Pesch, July 1991.
|
||||
@end ifset
|
||||
@c man end
|
||||
|
||||
+@node gdb-add-index man
|
||||
+@heading gdb-add-index
|
||||
+
|
||||
@ -139,33 +159,21 @@ Index: gdb-7.6.90.20140127/gdb/doc/gdb.texinfo
|
||||
+The full documentation for @value{GDBN} is maintained as a Texinfo manual.
|
||||
+If the @code{info} and @code{gdb} programs and @value{GDBN}'s Texinfo
|
||||
+documentation are properly installed at your site, the command
|
||||
|
||||
@smallexample
|
||||
info gdb
|
||||
Index: gdb-7.6.90.20140127/gdb/doc/Makefile.in
|
||||
===================================================================
|
||||
--- gdb-7.6.90.20140127.orig/gdb/doc/Makefile.in 2014-02-06 17:37:50.824971942 +0100
|
||||
+++ gdb-7.6.90.20140127/gdb/doc/Makefile.in 2014-02-06 17:37:54.565975968 +0100
|
||||
@@ -165,7 +165,7 @@ POD2MAN5 = pod2man --center="GNU Develop
|
||||
--release="gdb-`sed q version.subst`" --section=5
|
||||
|
||||
# List of man pages generated from gdb.texi
|
||||
-MAN1S = gdb.1 gdbserver.1 gcore.1
|
||||
+MAN1S = gdb.1 gdbserver.1 gcore.1 gdb-add-index.1
|
||||
MAN5S = gdbinit.5
|
||||
MANS = $(MAN1S) $(MAN5S)
|
||||
|
||||
@@ -590,6 +590,13 @@ gcore.1: $(GDB_DOC_FILES)
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f gcore.pod
|
||||
|
||||
+gdb-add-index.1: $(GDB_DOC_FILES)
|
||||
+ touch $@
|
||||
+ -$(TEXI2POD) $(MANCONF) -Dgdb-add-index < $(srcdir)/gdb.texinfo > gdb-add-index.pod
|
||||
+ -($(POD2MAN1) gdb-add-index.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
+ rm -f gdb-add-index.pod
|
||||
+
|
||||
gdbinit.5: $(GDB_DOC_FILES)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dgdbinit < $(srcdir)/gdb.texinfo > gdbinit.pod
|
||||
+@smallexample
|
||||
+info gdb
|
||||
+@end smallexample
|
||||
+
|
||||
+should give you access to the complete manual.
|
||||
+
|
||||
+@cite{Using GDB: A Guide to the GNU Source-Level Debugger},
|
||||
+Richard M. Stallman and Roland H. Pesch, July 1991.
|
||||
+@end ifset
|
||||
+@c man end
|
||||
+
|
||||
@include gpl.texi
|
||||
|
||||
@node GNU Free Documentation License
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,8 +1,23 @@
|
||||
Index: gdb-7.7.90.20140613/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-7.7.90.20140613.orig/gdb/dwarf2read.c 2014-06-13 21:56:54.744653443 +0200
|
||||
+++ gdb-7.7.90.20140613/gdb/dwarf2read.c 2014-06-13 22:01:51.529990684 +0200
|
||||
@@ -17695,6 +17695,26 @@ new_symbol_full (struct die_info *die, s
|
||||
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-glibc-strstr-workaround.patch
|
||||
|
||||
FileName: gdb-glibc-strstr-workaround.patch
|
||||
|
||||
;; Workaround PR libc/14166 for inferior calls of strstr.
|
||||
;;=fedora: Compatibility with RHELs (unchecked which ones).
|
||||
---
|
||||
gdb/dwarf2read.c | 20 ++++
|
||||
.../gdb.base/gnu-ifunc-strstr-workaround.exp | 108 +++++++++++++++++++++
|
||||
2 files changed, 128 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp
|
||||
|
||||
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
index c8db955f2f..6ebe00f542 100644
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -21328,6 +21328,26 @@ new_symbol_full (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
|
||||
/* Cache this symbol's name and the name's demangled form (if any). */
|
||||
SYMBOL_SET_LANGUAGE (sym, cu->language, &objfile->objfile_obstack);
|
||||
linkagename = dwarf2_physname (name, die, cu);
|
||||
@ -29,10 +44,11 @@ Index: gdb-7.7.90.20140613/gdb/dwarf2read.c
|
||||
SYMBOL_SET_NAMES (sym, linkagename, strlen (linkagename), 0, objfile);
|
||||
|
||||
/* Fortran does not have mangling standard and the mangling does differ
|
||||
Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp 2014-06-13 21:59:41.174840871 +0200
|
||||
diff --git a/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp b/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp
|
||||
new file mode 100644
|
||||
index 0000000000..5469cd7354
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp
|
||||
@@ -0,0 +1,108 @@
|
||||
+# Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -142,3 +158,6 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.ex
|
||||
+
|
||||
+gdb_test {print strstr("abc","b")} { = 0x[0-9a-f]+ "bc"}
|
||||
+gdb_test {print strstr("def","e")} { = 0x[0-9a-f]+ "ef"}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,31 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-08/msg00331.html
|
||||
Subject: [RFC] Work around PR libc/13097 "linux-vdso.so.1" #2
|
||||
|
||||
Hi,
|
||||
|
||||
missed the x86_64-m32 case:
|
||||
|
||||
gdb/
|
||||
2011-08-16 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Work around PR libc/13097.
|
||||
* solib.c (update_solib_list): Ignore "linux-vdso.so.1".
|
||||
|
||||
Index: gdb-7.9.50.20150520/gdb/solib.c
|
||||
===================================================================
|
||||
--- gdb-7.9.50.20150520.orig/gdb/solib.c 2015-05-31 17:04:16.870802493 +0200
|
||||
+++ gdb-7.9.50.20150520/gdb/solib.c 2015-05-31 17:04:38.824941054 +0200
|
||||
@@ -893,8 +893,11 @@ update_solib_list (int from_tty, struct
|
||||
|
||||
TRY
|
||||
{
|
||||
- /* Fill in the rest of the `struct so_list' node. */
|
||||
- if (!solib_map_sections (i))
|
||||
+ /* Fill in the rest of the `struct so_list' node.
|
||||
+ Work around PR libc/13097. */
|
||||
+ if (!solib_map_sections (i)
|
||||
+ && strcmp (i->so_original_name, "linux-vdso.so.1") != 0
|
||||
+ && strcmp (i->so_original_name, "linux-gate.so.1") != 0)
|
||||
{
|
||||
not_found++;
|
||||
if (not_found_filename == NULL)
|
@ -1,6 +1,14 @@
|
||||
http://sourceware.org/ml/gdb-patches/2014-02/msg00731.html
|
||||
Subject: [patch] gdb_assert -> complaint for weird DWARF
|
||||
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_assert -> complaint for weird DWARF
|
||||
|
||||
FileName: gdb-gnat-dwarf-crash-3of3.patch
|
||||
|
||||
;; Fix crash of -readnow /usr/lib/debug/usr/bin/gnatbind.debug (BZ 1069211).
|
||||
;;=push+jan
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2014-02/msg00731.html
|
||||
|
||||
--6TrnltStXW4iwmi0
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
@ -21,7 +29,6 @@ Fedora GCC build, not in FSF GCC build, more info at:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1069382
|
||||
http://people.redhat.com/jkratoch/gcc-debuginfo-4.8.2-7.fc20.x86_64-gnatbind.debug
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
@ -33,16 +40,18 @@ gdb/
|
||||
2014-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* dwarf2read.c (process_die): Change gdb_assert to complaint.
|
||||
---
|
||||
gdb/dwarf2read.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
Index: gdb-7.99.90.20170420/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/dwarf2read.c 2017-04-20 23:15:26.578897210 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/dwarf2read.c 2017-04-20 23:15:57.805106371 +0200
|
||||
@@ -8426,7 +8426,13 @@
|
||||
struct cleanup *in_process;
|
||||
|
||||
/* We should only be processing those not already in process. */
|
||||
- gdb_assert (!die->in_process);
|
||||
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
index fbaa0af64f..2c972d5e74 100644
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -10612,6 +10612,14 @@ private:
|
||||
static void
|
||||
process_die (struct die_info *die, struct dwarf2_cu *cu)
|
||||
{
|
||||
+ if (die->in_process)
|
||||
+ {
|
||||
+ complaint (&symfile_complaints,
|
||||
@ -50,6 +59,10 @@ Index: gdb-7.99.90.20170420/gdb/dwarf2read.c
|
||||
+ to_underlying (die->sect_off));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
process_die_scope scope (die, cu);
|
||||
|
||||
die->in_process = 1;
|
||||
in_process = make_cleanup (reset_die_in_process,die);
|
||||
switch (die->tag)
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,8 +1,22 @@
|
||||
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-jit-reader-multilib.patch
|
||||
|
||||
FileName: gdb-jit-reader-multilib.patch
|
||||
|
||||
;; Fix jit-reader.h for multi-lib.
|
||||
;;=push+jan
|
||||
---
|
||||
gdb/configure | 8 +++++---
|
||||
gdb/configure.ac | 8 +++++---
|
||||
2 files changed, 10 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gdb/configure b/gdb/configure
|
||||
index 7ff74ba..00a5b5b 100755
|
||||
index 904cc453ad..6fb5b5b509 100755
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -7382,10 +7382,12 @@ _ACEOF
|
||||
@@ -9528,10 +9528,12 @@ _ACEOF
|
||||
|
||||
|
||||
|
||||
@ -19,10 +33,10 @@ index 7ff74ba..00a5b5b 100755
|
||||
TARGET_PTR="unsigned __int128"
|
||||
else
|
||||
diff --git a/gdb/configure.ac b/gdb/configure.ac
|
||||
index ec776d7..c02ace9 100644
|
||||
index 1557760ed8..d891c7bccc 100644
|
||||
--- a/gdb/configure.ac
|
||||
+++ b/gdb/configure.ac
|
||||
@@ -648,10 +648,12 @@ AC_CHECK_SIZEOF(unsigned long long)
|
||||
@@ -832,10 +832,12 @@ AC_CHECK_SIZEOF(unsigned long long)
|
||||
AC_CHECK_SIZEOF(unsigned long)
|
||||
AC_CHECK_SIZEOF(unsigned __int128)
|
||||
|
||||
@ -38,3 +52,6 @@ index ec776d7..c02ace9 100644
|
||||
elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
|
||||
TARGET_PTR="unsigned __int128"
|
||||
else
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,5 +1,18 @@
|
||||
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-libexec-add-index.patch
|
||||
|
||||
FileName: gdb-libexec-add-index.patch
|
||||
|
||||
;; Fix gdb-headless /usr/bin/ executables (BZ 1390251).
|
||||
;;=fedora
|
||||
---
|
||||
gdb/contrib/gdb-add-index.sh | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh
|
||||
index cca7153..73181ec 100755
|
||||
index 71146966ab..500b2f62d5 100755
|
||||
--- a/gdb/contrib/gdb-add-index.sh
|
||||
+++ b/gdb/contrib/gdb-add-index.sh
|
||||
@@ -21,6 +21,11 @@
|
||||
@ -14,3 +27,6 @@ index cca7153..73181ec 100755
|
||||
myname="${0##*/}"
|
||||
|
||||
if test $# != 1; then
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7275fc3bbd850ca7caae7a1137b4bb8ee01efb1d017cfa54025b6bccb615d8cf
|
||||
size 21054
|
@ -1,3 +1,13 @@
|
||||
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-lineno-makeup-test.patch
|
||||
|
||||
FileName: gdb-lineno-makeup-test.patch
|
||||
|
||||
;; Testcase for "Do not make up line information" fix by Daniel Jacobowitz.
|
||||
;;=fedoratest
|
||||
|
||||
New testcase for:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=466222
|
||||
(for the first / customer recommended fix)
|
||||
@ -5,11 +15,20 @@ and the upstream fix:
|
||||
http://sourceware.org/ml/gdb-patches/2006-11/msg00253.html
|
||||
[rfc] Do not make up line information
|
||||
http://sourceware.org/ml/gdb-cvs/2006-11/msg00127.html
|
||||
---
|
||||
gdb/testsuite/gdb.base/lineno-makeup-func.c | 21 ++++++++
|
||||
gdb/testsuite/gdb.base/lineno-makeup.c | 35 +++++++++++++
|
||||
gdb/testsuite/gdb.base/lineno-makeup.exp | 78 +++++++++++++++++++++++++++++
|
||||
3 files changed, 134 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/lineno-makeup-func.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/lineno-makeup.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/lineno-makeup.exp
|
||||
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/lineno-makeup-func.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/lineno-makeup-func.c 2016-02-15 23:29:16.595161971 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/lineno-makeup-func.c b/gdb/testsuite/gdb.base/lineno-makeup-func.c
|
||||
new file mode 100644
|
||||
index 0000000000..1a0220ea52
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/lineno-makeup-func.c
|
||||
@@ -0,0 +1,21 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -32,10 +51,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/lineno-makeup-func.c
|
||||
+func (void)
|
||||
+{
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/lineno-makeup.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/lineno-makeup.c 2016-02-15 23:29:23.873213646 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/lineno-makeup.c b/gdb/testsuite/gdb.base/lineno-makeup.c
|
||||
new file mode 100644
|
||||
index 0000000000..5d4be90999
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/lineno-makeup.c
|
||||
@@ -0,0 +1,35 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -72,10 +92,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/lineno-makeup.c
|
||||
+ func ();
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/lineno-makeup.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/lineno-makeup.exp 2016-02-15 23:29:23.873213646 +0100
|
||||
diff --git a/gdb/testsuite/gdb.base/lineno-makeup.exp b/gdb/testsuite/gdb.base/lineno-makeup.exp
|
||||
new file mode 100644
|
||||
index 0000000000..9e11d78bf9
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/lineno-makeup.exp
|
||||
@@ -0,0 +1,78 @@
|
||||
+# Copyright 2009 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -155,3 +176,6 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/lineno-makeup.exp
|
||||
+ fail $test
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,7 +1,73 @@
|
||||
Index: gdb-7.11.90.20160904/gdb/nat/linux-btrace.h
|
||||
===================================================================
|
||||
--- gdb-7.11.90.20160904.orig/gdb/nat/linux-btrace.h 2016-09-04 04:02:13.000000000 +0200
|
||||
+++ gdb-7.11.90.20160904/gdb/nat/linux-btrace.h 2016-09-04 20:11:47.375275492 +0200
|
||||
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-linux_perf-bundle.patch
|
||||
|
||||
FileName: gdb-linux_perf-bundle.patch
|
||||
|
||||
;; [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513).
|
||||
;;=fedora
|
||||
---
|
||||
gdb/configure | 2 +-
|
||||
gdb/configure.ac | 2 +-
|
||||
gdb/gdb.c | 8 +++
|
||||
gdb/nat/linux-btrace.h | 171 +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
4 files changed, 181 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gdb/configure b/gdb/configure
|
||||
index db849572b5..7720c00f4b 100755
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -11907,7 +11907,7 @@ else
|
||||
|
||||
#include <linux/perf_event.h>
|
||||
#ifndef PERF_ATTR_SIZE_VER5
|
||||
-# error
|
||||
+// error // PERF_ATTR_SIZE_VER5_BUNDLE is not available here - Fedora+RHEL
|
||||
#endif
|
||||
|
||||
_ACEOF
|
||||
diff --git a/gdb/configure.ac b/gdb/configure.ac
|
||||
index 4412e25450..e64b0e806f 100644
|
||||
--- a/gdb/configure.ac
|
||||
+++ b/gdb/configure.ac
|
||||
@@ -1466,7 +1466,7 @@ else
|
||||
AC_PREPROC_IFELSE(AC_LANG_SOURCE([[
|
||||
#include <linux/perf_event.h>
|
||||
#ifndef PERF_ATTR_SIZE_VER5
|
||||
-# error
|
||||
+// error // PERF_ATTR_SIZE_VER5_BUNDLE is not available here - Fedora+RHEL
|
||||
#endif
|
||||
]]), [perf_event=yes], [perf_event=no])
|
||||
if test "$perf_event" != yes; then
|
||||
diff --git a/gdb/gdb.c b/gdb/gdb.c
|
||||
index b97500e579..151545105c 100644
|
||||
--- a/gdb/gdb.c
|
||||
+++ b/gdb/gdb.c
|
||||
@@ -20,11 +20,19 @@
|
||||
#include "main.h"
|
||||
#include "interps.h"
|
||||
|
||||
+#ifdef PERF_ATTR_SIZE_VER5_BUNDLE
|
||||
+extern "C" void __libipt_init(void);
|
||||
+#endif
|
||||
+
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
struct captured_main_args args;
|
||||
|
||||
+#ifdef PERF_ATTR_SIZE_VER5_BUNDLE
|
||||
+ __libipt_init();
|
||||
+#endif
|
||||
+
|
||||
memset (&args, 0, sizeof args);
|
||||
args.argc = argc;
|
||||
args.argv = argv;
|
||||
diff --git a/gdb/nat/linux-btrace.h b/gdb/nat/linux-btrace.h
|
||||
index 31a8d9e67b..72faf23c5f 100644
|
||||
--- a/gdb/nat/linux-btrace.h
|
||||
+++ b/gdb/nat/linux-btrace.h
|
||||
@@ -28,6 +28,177 @@
|
||||
# include <linux/perf_event.h>
|
||||
#endif
|
||||
@ -180,53 +246,6 @@ Index: gdb-7.11.90.20160904/gdb/nat/linux-btrace.h
|
||||
struct target_ops;
|
||||
|
||||
#if HAVE_LINUX_PERF_EVENT_H
|
||||
Index: gdb-7.11.90.20160904/gdb/configure
|
||||
===================================================================
|
||||
--- gdb-7.11.90.20160904.orig/gdb/configure 2016-09-04 20:11:47.238274285 +0200
|
||||
+++ gdb-7.11.90.20160904/gdb/configure 2016-09-04 20:11:47.378275519 +0200
|
||||
@@ -10601,7 +10601,7 @@
|
||||
|
||||
#include <linux/perf_event.h>
|
||||
#ifndef PERF_ATTR_SIZE_VER5
|
||||
-# error
|
||||
+// error // PERF_ATTR_SIZE_VER5_BUNDLE is not available here - Fedora+RHEL
|
||||
#endif
|
||||
|
||||
_ACEOF
|
||||
Index: gdb-7.11.90.20160904/gdb/configure.ac
|
||||
===================================================================
|
||||
--- gdb-7.11.90.20160904.orig/gdb/configure.ac 2016-09-04 20:11:47.238274285 +0200
|
||||
+++ gdb-7.11.90.20160904/gdb/configure.ac 2016-09-04 20:11:47.379275528 +0200
|
||||
@@ -1461,7 +1461,7 @@
|
||||
AC_PREPROC_IFELSE(AC_LANG_SOURCE([[
|
||||
#include <linux/perf_event.h>
|
||||
#ifndef PERF_ATTR_SIZE_VER5
|
||||
-# error
|
||||
+// error // PERF_ATTR_SIZE_VER5_BUNDLE is not available here - Fedora+RHEL
|
||||
#endif
|
||||
]]), [perf_event=yes], [perf_event=no])
|
||||
if test "$perf_event" != yes; then
|
||||
Index: gdb-7.11.90.20160904/gdb/gdb.c
|
||||
===================================================================
|
||||
--- gdb-7.11.90.20160904.orig/gdb/gdb.c 2016-09-04 04:02:13.000000000 +0200
|
||||
+++ gdb-7.11.90.20160904/gdb/gdb.c 2016-09-04 20:12:28.018633552 +0200
|
||||
@@ -20,11 +20,19 @@
|
||||
#include "main.h"
|
||||
#include "interps.h"
|
||||
|
||||
+#ifdef PERF_ATTR_SIZE_VER5_BUNDLE
|
||||
+extern "C" void __libipt_init(void);
|
||||
+#endif
|
||||
+
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
struct captured_main_args args;
|
||||
|
||||
+#ifdef PERF_ATTR_SIZE_VER5_BUNDLE
|
||||
+ __libipt_init();
|
||||
+#endif
|
||||
+
|
||||
memset (&args, 0, sizeof args);
|
||||
args.argc = argc;
|
||||
args.argv = argv;
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,11 +1,26 @@
|
||||
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-moribund-utrace-workaround.patch
|
||||
|
||||
FileName: gdb-moribund-utrace-workaround.patch
|
||||
|
||||
;; Workaround non-stop moribund locations exploited by kernel utrace (BZ 590623).
|
||||
;;=push+jan: Currently it is still not fully safe.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=590623
|
||||
http://sources.redhat.com/bugzilla/show_bug.cgi?id=11593
|
||||
|
||||
Bug in FSF GDB exploited by the ptrace-on-utrace interaction.
|
||||
---
|
||||
gdb/breakpoint.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
|
||||
index 5a99de75e1..6a0c15b239 100644
|
||||
--- a/gdb/breakpoint.c
|
||||
+++ b/gdb/breakpoint.c
|
||||
@@ -9084,6 +9084,8 @@ update_global_location_list (int should_insert)
|
||||
@@ -12089,6 +12089,8 @@ update_global_location_list (enum ugll_insert_mode insert_mode)
|
||||
traps we can no longer explain. */
|
||||
|
||||
old_loc->events_till_retirement = 3 * (thread_count () + 1);
|
||||
@ -14,3 +29,6 @@ Bug in FSF GDB exploited by the ptrace-on-utrace interaction.
|
||||
old_loc->owner = NULL;
|
||||
|
||||
VEC_safe_push (bp_location_p, moribund_locations, old_loc);
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,5 +1,49 @@
|
||||
--- /dev/null 2016-01-16 21:50:55.732812229 +0100
|
||||
+++ gdb-7.6.1/gdb/testsuite/gdb.arch/amd64-clflushopt.exp 2016-01-16 22:49:19.950683918 +0100
|
||||
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-opcodes-clflushopt-test.patch
|
||||
|
||||
FileName: gdb-opcodes-clflushopt-test.patch
|
||||
|
||||
;; Test clflushopt instruction decode (for RH BZ 1262471).
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.arch/amd64-clflushopt.S | 19 +++++++++++++++++++
|
||||
gdb/testsuite/gdb.arch/amd64-clflushopt.exp | 25 +++++++++++++++++++++++++
|
||||
2 files changed, 44 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.arch/amd64-clflushopt.S
|
||||
create mode 100644 gdb/testsuite/gdb.arch/amd64-clflushopt.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.arch/amd64-clflushopt.S b/gdb/testsuite/gdb.arch/amd64-clflushopt.S
|
||||
new file mode 100644
|
||||
index 0000000000..dee4f006dc
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/amd64-clflushopt.S
|
||||
@@ -0,0 +1,19 @@
|
||||
+/* 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/>.
|
||||
+
|
||||
+ This file is part of the gdb testsuite. */
|
||||
+
|
||||
+_start: .globl _start
|
||||
+ clflushopt (%edi)
|
||||
diff --git a/gdb/testsuite/gdb.arch/amd64-clflushopt.exp b/gdb/testsuite/gdb.arch/amd64-clflushopt.exp
|
||||
new file mode 100644
|
||||
index 0000000000..22a9decee2
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/amd64-clflushopt.exp
|
||||
@@ -0,0 +1,25 @@
|
||||
+# Copyright 2016 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -26,25 +70,6 @@
|
||||
+}
|
||||
+
|
||||
+gdb_test "disas _start" "Dump of assembler code for function _start:\r\n *0x\[0-9a-f\]+ <\[+\]0>:\tclflushopt \\(%edi\\)\r\nEnd of assembler dump\\." "clflushopt"
|
||||
--- /dev/null 2016-01-16 21:50:55.732812229 +0100
|
||||
+++ gdb-7.6.1/gdb/testsuite/gdb.arch/amd64-clflushopt.S 2016-01-16 22:49:26.398725209 +0100
|
||||
@@ -0,0 +1,19 @@
|
||||
+/* 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/>.
|
||||
+
|
||||
+ This file is part of the gdb testsuite. */
|
||||
+
|
||||
+_start: .globl _start
|
||||
+ clflushopt (%edi)
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,9 +1,34 @@
|
||||
http://sourceware.org/ml/gdb-patches/2010-12/msg00263.html
|
||||
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
|
||||
|
||||
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734-1.cc
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734-1.cc 2011-02-03 22:28:01.000000000 +0100
|
||||
FileName: 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
|
||||
---
|
||||
gdb/testsuite/gdb.cp/pr11734-1.cc | 30 +++++++++++++++++++++
|
||||
gdb/testsuite/gdb.cp/pr11734-2.cc | 27 +++++++++++++++++++
|
||||
gdb/testsuite/gdb.cp/pr11734-3.cc | 27 +++++++++++++++++++
|
||||
gdb/testsuite/gdb.cp/pr11734-4.cc | 27 +++++++++++++++++++
|
||||
gdb/testsuite/gdb.cp/pr11734.exp | 55 +++++++++++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.cp/pr11734.h | 28 ++++++++++++++++++++
|
||||
6 files changed, 194 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.cp/pr11734-1.cc
|
||||
create mode 100644 gdb/testsuite/gdb.cp/pr11734-2.cc
|
||||
create mode 100644 gdb/testsuite/gdb.cp/pr11734-3.cc
|
||||
create mode 100644 gdb/testsuite/gdb.cp/pr11734-4.cc
|
||||
create mode 100644 gdb/testsuite/gdb.cp/pr11734.exp
|
||||
create mode 100644 gdb/testsuite/gdb.cp/pr11734.h
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.cp/pr11734-1.cc b/gdb/testsuite/gdb.cp/pr11734-1.cc
|
||||
new file mode 100644
|
||||
index 0000000000..f3480ce977
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/pr11734-1.cc
|
||||
@@ -0,0 +1,30 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -35,10 +60,11 @@ Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734-1.cc
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734-2.cc
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734-2.cc 2011-02-03 22:28:01.000000000 +0100
|
||||
diff --git a/gdb/testsuite/gdb.cp/pr11734-2.cc b/gdb/testsuite/gdb.cp/pr11734-2.cc
|
||||
new file mode 100644
|
||||
index 0000000000..dbebe8281a
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/pr11734-2.cc
|
||||
@@ -0,0 +1,27 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -67,10 +93,11 @@ Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734-2.cc
|
||||
+{
|
||||
+}
|
||||
+
|
||||
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734-3.cc
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734-3.cc 2011-02-03 22:28:01.000000000 +0100
|
||||
diff --git a/gdb/testsuite/gdb.cp/pr11734-3.cc b/gdb/testsuite/gdb.cp/pr11734-3.cc
|
||||
new file mode 100644
|
||||
index 0000000000..faaeffc9dd
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/pr11734-3.cc
|
||||
@@ -0,0 +1,27 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -99,10 +126,11 @@ Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734-3.cc
|
||||
+{
|
||||
+}
|
||||
+
|
||||
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734-4.cc
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734-4.cc 2011-02-03 22:28:01.000000000 +0100
|
||||
diff --git a/gdb/testsuite/gdb.cp/pr11734-4.cc b/gdb/testsuite/gdb.cp/pr11734-4.cc
|
||||
new file mode 100644
|
||||
index 0000000000..6edf8110f1
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/pr11734-4.cc
|
||||
@@ -0,0 +1,27 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -131,10 +159,11 @@ Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734-4.cc
|
||||
+{
|
||||
+}
|
||||
+
|
||||
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734.exp 2011-02-03 22:28:01.000000000 +0100
|
||||
diff --git a/gdb/testsuite/gdb.cp/pr11734.exp b/gdb/testsuite/gdb.cp/pr11734.exp
|
||||
new file mode 100644
|
||||
index 0000000000..e731d422f6
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/pr11734.exp
|
||||
@@ -0,0 +1,55 @@
|
||||
+# Copyright 2010 Free Software Foundation, Inc.
|
||||
+#
|
||||
@ -191,10 +220,11 @@ Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734.exp
|
||||
+
|
||||
+gdb_exit
|
||||
+return 0
|
||||
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734.h 2011-02-03 22:28:01.000000000 +0100
|
||||
diff --git a/gdb/testsuite/gdb.cp/pr11734.h b/gdb/testsuite/gdb.cp/pr11734.h
|
||||
new file mode 100644
|
||||
index 0000000000..7f6e72a685
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/pr11734.h
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -224,3 +254,6 @@ Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734.h
|
||||
+ void foo (char *);
|
||||
+};
|
||||
+
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,9 +1,26 @@
|
||||
http://sourceware.org/ml/gdb-patches/2010-12/msg00264.html
|
||||
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
|
||||
|
||||
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr12273.cc
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr12273.cc 2011-02-03 22:31:01.000000000 +0100
|
||||
FileName: 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
|
||||
---
|
||||
gdb/testsuite/gdb.cp/pr12273.cc | 37 ++++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.cp/pr12273.exp | 46 ++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 83 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.cp/pr12273.cc
|
||||
create mode 100644 gdb/testsuite/gdb.cp/pr12273.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.cp/pr12273.cc b/gdb/testsuite/gdb.cp/pr12273.cc
|
||||
new file mode 100644
|
||||
index 0000000000..79dd7bad74
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/pr12273.cc
|
||||
@@ -0,0 +1,37 @@
|
||||
+/* This test case is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -42,10 +59,11 @@ Index: gdb-7.2/gdb/testsuite/gdb.cp/pr12273.cc
|
||||
+ + GDB<char>::even_harder<int> ('a');
|
||||
+ return GDB<int>::simple ();
|
||||
+}
|
||||
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr12273.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr12273.exp 2011-02-03 22:31:01.000000000 +0100
|
||||
diff --git a/gdb/testsuite/gdb.cp/pr12273.exp b/gdb/testsuite/gdb.cp/pr12273.exp
|
||||
new file mode 100644
|
||||
index 0000000000..9d71482742
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/pr12273.exp
|
||||
@@ -0,0 +1,46 @@
|
||||
+# Copyright 2010 Free Software Foundation, Inc.
|
||||
+#
|
||||
@ -93,3 +111,6 @@ Index: gdb-7.2/gdb/testsuite/gdb.cp/pr12273.exp
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
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
|
||||
|
||||
FileName: gdb-ppc-power7-test.patch
|
||||
|
||||
;; Test power7 ppc disassembly.
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.arch/powerpc-power7rh.exp | 178 ++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.arch/powerpc-power7rh.s | 107 +++++++++++++++++
|
||||
2 files changed, 285 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.arch/powerpc-power7rh.exp
|
||||
create mode 100644 gdb/testsuite/gdb.arch/powerpc-power7rh.s
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-power7rh.exp b/gdb/testsuite/gdb.arch/powerpc-power7rh.exp
|
||||
new file mode 100644
|
||||
index 0000000000..0c2bbdaede
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/powerpc-power7rh.exp
|
||||
@@ -0,0 +1,178 @@
|
||||
@ -179,6 +198,9 @@
|
||||
+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
|
||||
index 0000000000..98b2e797e7
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/powerpc-power7rh.s
|
||||
@@ -0,0 +1,107 @@
|
||||
@ -289,3 +311,6 @@
|
||||
+ .long 0xedc07834 /* 194: frsqrtes f14,f15 */
|
||||
+ .long 0xedc07835 /* 198: frsqrtes. f14,f15 */
|
||||
+ .long 0x7c43271e /* 19c: isel r2,r3,r4,28 */
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
56
gdb-ppc64-stwux-tautological-compare.patch
Normal file
56
gdb-ppc64-stwux-tautological-compare.patch
Normal file
@ -0,0 +1,56 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Sun, 4 Feb 2018 21:42:18 +0100
|
||||
Subject: gdb-ppc64-stwux-tautological-compare.patch
|
||||
|
||||
FileName: gdb-ppc64-stwux-tautological-compare.patch
|
||||
|
||||
;; Fix ppc64 stwux encoding as found by gcc-8.0 -Werror=tautological-compare.
|
||||
|
||||
[patch] ppc64: Fix stwux encoding
|
||||
https://sourceware.org/ml/gdb-patches/2018-02/msg00058.html
|
||||
|
||||
with gcc-8.0.1-0.9.fc28.x86_64 I get:
|
||||
|
||||
../../gdb/rs6000-tdep.c: In function 'CORE_ADDR skip_prologue(gdbarch*, CORE_ADDR, CORE_ADDR, rs6000_framedata*)':
|
||||
../../gdb/rs6000-tdep.c:1911:34: error: bitwise comparison always evaluates to false [-Werror=tautological-compare]
|
||||
else if ((op & 0xfc1f016a) == 0x7c01016e)
|
||||
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
|
||||
|
||||
The code is there since:
|
||||
commit 98f08d3d9b69b344bb8b0cd2a4bda1cf4d966e20
|
||||
Author: Kevin Buettner <kevinb@redhat.com>
|
||||
Date: Thu May 29 19:47:14 2003 +0000
|
||||
From Jimi X <jimix@watson.ibm.com>:
|
||||
* rs6000-tdep.c (skip_prologue): Improve support for 64-bit code.
|
||||
So I do not think we can find the original author.
|
||||
|
||||
https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/com.ibm.aix.alangref/idalangref_stwux_stux_instrs.htm
|
||||
says
|
||||
bit 21 - 30 = 183
|
||||
Those are bits 1..10 in normal bit order: 183<<1 = 0x16e
|
||||
|
||||
gdb/ChangeLog
|
||||
2018-02-04 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* rs6000-tdep.c (skip_prologue): Fix stwux encoding.
|
||||
---
|
||||
gdb/rs6000-tdep.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
|
||||
index 23d0db3b8f..5275ff5b91 100644
|
||||
--- a/gdb/rs6000-tdep.c
|
||||
+++ b/gdb/rs6000-tdep.c
|
||||
@@ -1908,7 +1908,7 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
|
||||
offset = fdata->offset;
|
||||
continue;
|
||||
}
|
||||
- else if ((op & 0xfc1f016a) == 0x7c01016e)
|
||||
+ else if ((op & 0xfc1f016e) == 0x7c01016e)
|
||||
{ /* stwux rX,r1,rY */
|
||||
/* No way to figure out what r1 is going to be. */
|
||||
fdata->frameless = 0;
|
||||
--
|
||||
2.14.3
|
||||
|
@ -1,8 +1,29 @@
|
||||
Index: gdb-7.99.90.20170420/gdb/doc/python.texi
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/doc/python.texi 2017-04-20 23:16:30.895328018 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/doc/python.texi 2017-04-20 23:16:35.690360136 +0200
|
||||
@@ -230,6 +230,14 @@
|
||||
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-python-gil.patch
|
||||
|
||||
FileName: gdb-python-gil.patch
|
||||
|
||||
;; Fix Python GIL with gdb.execute("continue") (Phil Muldoon, BZ 1116957).
|
||||
;;=push
|
||||
---
|
||||
gdb/doc/python.texi | 8 ++++
|
||||
gdb/python/python-internal.h | 2 +
|
||||
gdb/python/python.c | 42 +++++++++++++++---
|
||||
gdb/testsuite/gdb.python/py-gil-mthread.c | 13 ++++++
|
||||
gdb/testsuite/gdb.python/py-gil-mthread.exp | 69 +++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.python/py-gil-mthread.py | 28 ++++++++++++
|
||||
6 files changed, 157 insertions(+), 5 deletions(-)
|
||||
create mode 100644 gdb/testsuite/gdb.python/py-gil-mthread.c
|
||||
create mode 100644 gdb/testsuite/gdb.python/py-gil-mthread.exp
|
||||
create mode 100644 gdb/testsuite/gdb.python/py-gil-mthread.py
|
||||
|
||||
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
|
||||
index ebd48fffe7..ccf011e35e 100644
|
||||
--- a/gdb/doc/python.texi
|
||||
+++ b/gdb/doc/python.texi
|
||||
@@ -232,6 +232,14 @@ returned as a string. The default is @code{False}, in which case the
|
||||
return value is @code{None}. If @var{to_string} is @code{True}, the
|
||||
@value{GDBN} virtual terminal will be temporarily set to unlimited width
|
||||
and height, and its pagination will be disabled; @pxref{Screen Size}.
|
||||
@ -17,11 +38,11 @@ Index: gdb-7.99.90.20170420/gdb/doc/python.texi
|
||||
@end defun
|
||||
|
||||
@findex gdb.breakpoints
|
||||
Index: gdb-7.99.90.20170420/gdb/python/python-internal.h
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/python/python-internal.h 2017-04-20 23:16:30.896328024 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/python/python-internal.h 2017-04-20 23:16:35.690360136 +0200
|
||||
@@ -142,6 +142,8 @@
|
||||
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
|
||||
index c110588f76..89bbc6987b 100644
|
||||
--- a/gdb/python/python-internal.h
|
||||
+++ b/gdb/python/python-internal.h
|
||||
@@ -148,6 +148,8 @@ typedef int Py_ssize_t;
|
||||
#define PyGILState_Release(ARG) ((void)(ARG))
|
||||
#define PyEval_InitThreads()
|
||||
#define PyThreadState_Swap(ARG) ((void)(ARG))
|
||||
@ -30,11 +51,11 @@ Index: gdb-7.99.90.20170420/gdb/python/python-internal.h
|
||||
#define PyEval_ReleaseLock()
|
||||
#endif
|
||||
|
||||
Index: gdb-7.99.90.20170420/gdb/python/python.c
|
||||
===================================================================
|
||||
--- gdb-7.99.90.20170420.orig/gdb/python/python.c 2017-04-20 23:16:30.897328031 +0200
|
||||
+++ gdb-7.99.90.20170420/gdb/python/python.c 2017-04-20 23:18:11.377001070 +0200
|
||||
@@ -594,12 +594,16 @@
|
||||
diff --git a/gdb/python/python.c b/gdb/python/python.c
|
||||
index 4844c86c54..610dda828c 100644
|
||||
--- a/gdb/python/python.c
|
||||
+++ b/gdb/python/python.c
|
||||
@@ -554,12 +554,16 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw)
|
||||
{
|
||||
const char *arg;
|
||||
PyObject *from_tty_obj = NULL, *to_string_obj = NULL;
|
||||
@ -55,7 +76,7 @@ Index: gdb-7.99.90.20170420/gdb/python/python.c
|
||||
return NULL;
|
||||
|
||||
from_tty = 0;
|
||||
@@ -620,6 +624,15 @@
|
||||
@@ -580,12 +584,28 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw)
|
||||
to_string = cmp;
|
||||
}
|
||||
|
||||
@ -71,8 +92,7 @@ Index: gdb-7.99.90.20170420/gdb/python/python.c
|
||||
std::string to_string_res;
|
||||
|
||||
TRY
|
||||
@@ -628,6 +641,13 @@
|
||||
std::string copy (arg);
|
||||
{
|
||||
struct interp *interp;
|
||||
|
||||
+ /* In the case of long running GDB commands, allow the user to
|
||||
@ -85,10 +105,10 @@ Index: gdb-7.99.90.20170420/gdb/python/python.c
|
||||
scoped_restore save_async = make_scoped_restore (¤t_ui->async, 0);
|
||||
|
||||
scoped_restore save_uiout = make_scoped_restore (¤t_uiout);
|
||||
@@ -642,10 +662,22 @@
|
||||
to_string_res = execute_command_to_string (©[0], from_tty);
|
||||
@@ -600,10 +620,22 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw)
|
||||
to_string_res = execute_command_to_string (arg, from_tty);
|
||||
else
|
||||
execute_command (©[0], from_tty);
|
||||
execute_command (arg, from_tty);
|
||||
+
|
||||
+ /* Reacquire the GIL if it was released earlier. */
|
||||
+ if (release_gil)
|
||||
@ -109,10 +129,11 @@ Index: gdb-7.99.90.20170420/gdb/python/python.c
|
||||
}
|
||||
END_CATCH
|
||||
|
||||
Index: gdb-7.99.90.20170420/gdb/testsuite/gdb.python/py-gil-mthread.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.99.90.20170420/gdb/testsuite/gdb.python/py-gil-mthread.c 2017-04-20 23:16:35.691360143 +0200
|
||||
diff --git a/gdb/testsuite/gdb.python/py-gil-mthread.c b/gdb/testsuite/gdb.python/py-gil-mthread.c
|
||||
new file mode 100644
|
||||
index 0000000000..1a12fc9c6d
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.python/py-gil-mthread.c
|
||||
@@ -0,0 +1,13 @@
|
||||
+#include <stdio.h>
|
||||
+#include <unistd.h>
|
||||
@ -127,10 +148,11 @@ Index: gdb-7.99.90.20170420/gdb/testsuite/gdb.python/py-gil-mthread.c
|
||||
+ printf ("Sleeping %d\n", i);
|
||||
+ }
|
||||
+}
|
||||
Index: gdb-7.99.90.20170420/gdb/testsuite/gdb.python/py-gil-mthread.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.99.90.20170420/gdb/testsuite/gdb.python/py-gil-mthread.exp 2017-04-20 23:16:35.691360143 +0200
|
||||
diff --git a/gdb/testsuite/gdb.python/py-gil-mthread.exp b/gdb/testsuite/gdb.python/py-gil-mthread.exp
|
||||
new file mode 100644
|
||||
index 0000000000..a89c16a45b
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.python/py-gil-mthread.exp
|
||||
@@ -0,0 +1,69 @@
|
||||
+# Copyright (C) 2014 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -201,10 +223,11 @@ Index: gdb-7.99.90.20170420/gdb/testsuite/gdb.python/py-gil-mthread.exp
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
Index: gdb-7.99.90.20170420/gdb/testsuite/gdb.python/py-gil-mthread.py
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.99.90.20170420/gdb/testsuite/gdb.python/py-gil-mthread.py 2017-04-20 23:16:35.692360149 +0200
|
||||
diff --git a/gdb/testsuite/gdb.python/py-gil-mthread.py b/gdb/testsuite/gdb.python/py-gil-mthread.py
|
||||
new file mode 100644
|
||||
index 0000000000..6a89964139
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.python/py-gil-mthread.py
|
||||
@@ -0,0 +1,28 @@
|
||||
+try:
|
||||
+ import thread
|
||||
@ -234,3 +257,6 @@ Index: gdb-7.99.90.20170420/gdb/testsuite/gdb.python/py-gil-mthread.py
|
||||
+
|
||||
+while 1:
|
||||
+ pass
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,8 +1,21 @@
|
||||
Index: gdb-7.11.50.20160630/gdb/event-top.c
|
||||
===================================================================
|
||||
--- gdb-7.11.50.20160630.orig/gdb/event-top.c 2016-07-03 16:32:36.108342159 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/event-top.c 2016-07-03 16:32:59.787523733 +0200
|
||||
@@ -1252,6 +1252,13 @@
|
||||
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-readline62-ask-more-rh.patch
|
||||
|
||||
FileName: gdb-readline62-ask-more-rh.patch
|
||||
|
||||
;; Work around readline-6.2 incompatibility not asking for --more-- (BZ 701131).
|
||||
;;=fedora
|
||||
---
|
||||
gdb/event-top.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/gdb/event-top.c b/gdb/event-top.c
|
||||
index 0d668f35e0..4aa26125f9 100644
|
||||
--- a/gdb/event-top.c
|
||||
+++ b/gdb/event-top.c
|
||||
@@ -1183,6 +1183,13 @@ gdb_setup_readline (int editing)
|
||||
{
|
||||
struct ui *ui = current_ui;
|
||||
|
||||
@ -16,3 +29,6 @@ Index: gdb-7.11.50.20160630/gdb/event-top.c
|
||||
/* This function is a noop for the sync case. The assumption is
|
||||
that the sync setup is ALL done in gdb_init, and we would only
|
||||
mess it up here. The sync stuff should really go away over
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,7 +1,24 @@
|
||||
Index: gdb-7.0.1/gdb/testsuite/gdb.base/set-solib-absolute-prefix.c
|
||||
===================================================================
|
||||
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-rhbz-818343-set-solib-absolute-prefix-testcase.patch
|
||||
|
||||
FileName: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
|
||||
|
||||
;; Testcase for `Setting solib-absolute-prefix breaks vDSO' (BZ 818343).
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.base/set-solib-absolute-prefix.c | 26 +++++++++++++++
|
||||
.../gdb.base/set-solib-absolute-prefix.exp | 39 ++++++++++++++++++++++
|
||||
2 files changed, 65 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/set-solib-absolute-prefix.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/set-solib-absolute-prefix.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/set-solib-absolute-prefix.c b/gdb/testsuite/gdb.base/set-solib-absolute-prefix.c
|
||||
new file mode 100644
|
||||
index 0000000000..2675a34f1a
|
||||
--- /dev/null
|
||||
+++ gdb-7.0.1/gdb/testsuite/gdb.base/set-solib-absolute-prefix.c
|
||||
+++ b/gdb/testsuite/gdb.base/set-solib-absolute-prefix.c
|
||||
@@ -0,0 +1,26 @@
|
||||
+/* Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -29,10 +46,11 @@ Index: gdb-7.0.1/gdb/testsuite/gdb.base/set-solib-absolute-prefix.c
|
||||
+ printf ("Hello, World.\n");
|
||||
+ abort ();
|
||||
+}
|
||||
Index: gdb-7.0.1/gdb/testsuite/gdb.base/set-solib-absolute-prefix.exp
|
||||
===================================================================
|
||||
diff --git a/gdb/testsuite/gdb.base/set-solib-absolute-prefix.exp b/gdb/testsuite/gdb.base/set-solib-absolute-prefix.exp
|
||||
new file mode 100644
|
||||
index 0000000000..bb4c8b962b
|
||||
--- /dev/null
|
||||
+++ gdb-7.0.1/gdb/testsuite/gdb.base/set-solib-absolute-prefix.exp
|
||||
+++ b/gdb/testsuite/gdb.base/set-solib-absolute-prefix.exp
|
||||
@@ -0,0 +1,39 @@
|
||||
+# Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -73,3 +91,6 @@ Index: gdb-7.0.1/gdb/testsuite/gdb.base/set-solib-absolute-prefix.exp
|
||||
+ ".*warning: Unable to find dynamic linker breakpoint function.*" \
|
||||
+ "set solib-absolute-prefix"
|
||||
+gdb_test "bt" "__kernel_vsyscall.*" "backtrace with __kernel_vsyscall"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
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-rhbz1007614-memleak-infpy_read_memory-test.patch
|
||||
|
||||
FileName: gdb-rhbz1007614-memleak-infpy_read_memory-test.patch
|
||||
|
||||
;; Fix 'memory leak in infpy_read_memory()' (RH BZ 1007614)
|
||||
;;=fedoratest
|
||||
|
||||
Original message by Tom Tromey:
|
||||
|
||||
<https://sourceware.org/ml/gdb-patches/2012-03/msg00955.html>
|
||||
@ -19,11 +29,20 @@ Date: Wed Mar 28 17:38:08 2012 +0000
|
||||
* python/py-inferior.c (infpy_read_memory): Remove cleanups and
|
||||
explicitly free 'buffer' on exit paths. Decref 'membuf_object'
|
||||
before returning.
|
||||
---
|
||||
.../py-gdb-rhbz1007614-memleak-infpy_read_memory.c | 27 +++++++++
|
||||
...y-gdb-rhbz1007614-memleak-infpy_read_memory.exp | 68 ++++++++++++++++++++++
|
||||
...py-gdb-rhbz1007614-memleak-infpy_read_memory.py | 30 ++++++++++
|
||||
3 files changed, 125 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.c
|
||||
create mode 100644 gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.exp
|
||||
create mode 100644 gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.py
|
||||
|
||||
Index: gdb-7.2/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.c
|
||||
===================================================================
|
||||
diff --git a/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.c b/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.c
|
||||
new file mode 100644
|
||||
index 0000000000..f2697efa9a
|
||||
--- /dev/null
|
||||
+++ gdb-7.2/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.c
|
||||
+++ b/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.c
|
||||
@@ -0,0 +1,27 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -52,10 +71,11 @@ Index: gdb-7.2/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_me
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.2/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.exp
|
||||
===================================================================
|
||||
diff --git a/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.exp b/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.exp
|
||||
new file mode 100644
|
||||
index 0000000000..2e6786d499
|
||||
--- /dev/null
|
||||
+++ gdb-7.2/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.exp
|
||||
+++ b/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.exp
|
||||
@@ -0,0 +1,68 @@
|
||||
+# Copyright 2014 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -125,10 +145,11 @@ Index: gdb-7.2/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_me
|
||||
+} else {
|
||||
+ pass "there is not a memory leak on GDB (RHBZ 1007614)"
|
||||
+}
|
||||
Index: gdb-7.2/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.py
|
||||
===================================================================
|
||||
diff --git a/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.py b/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.py
|
||||
new file mode 100644
|
||||
index 0000000000..e807728047
|
||||
--- /dev/null
|
||||
+++ gdb-7.2/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.py
|
||||
+++ b/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.py
|
||||
@@ -0,0 +1,30 @@
|
||||
+# Copyright (C) 2014 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -160,3 +181,6 @@ Index: gdb-7.2/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_me
|
||||
+ print "Hello, World!"
|
||||
+
|
||||
+HelloWorld ()
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
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