Accepting request 635348 from devel:gcc

- Rebase to 8.2 release (as in fedora 29 @ c720d998):
  * 'symbol-file' and 'add-symbol-file' accept -o to add relative
    offset to all sections
  * pager accepts 'c' response to disable it for rest of command
  * accept _Alignof and alignof in C resp. C++ expressions
  * new target riscv*-*-elf
  * python API extensions: gdb.Type.align, gdb.execute deals
    with multi-line gdb commands, gdb.convenience_variable and
    gdb.set_convenience_variable to access convenience variables,
  * aarch64: properly support hardware watchpoints on unaligned
    addresses (needs kernel >= 4.10)
- Add gdb-fix-s390-build.diff for a Wformat error on s390.
- Support access to new POWER8 registers [fate#325178, fate#326120]
  Add patches gdb-rhbz1187581-power8-regs-1of7.patch,
  gdb-rhbz1187581-power8-regs-2of7.patch,
  gdb-rhbz1187581-power8-regs-3of7.patch,
  gdb-rhbz1187581-power8-regs-4of7.patch,
  gdb-rhbz1187581-power8-regs-5of7.patch,
  gdb-rhbz1187581-power8-regs-6of7.patch,
  gdb-rhbz1187581-power8-regs-7of7.patch .
- Support ipv6 for gdbserver connections:
  Add patches gdb-rhbz881849-ipv6-1of3.patch,
  gdb-rhbz881849-ipv6-2of3.patch,
  gdb-rhbz881849-ipv6-3of3.patch .
- Update to intel processor trace library 2.0 (from 1.6.1):
  Add v2.0.tar.gz, remove v1.6.1.tar.gz
  Remove obsolete v1.6.1-implicit-fallthrough.patch .
- Remove obsolete patches:
  gdb-fix-python37-breakage.patch,
  gdb-pahole-python2.patch .

OBS-URL: https://build.opensuse.org/request/show/635348
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdb?expand=0&rev=122
This commit is contained in:
Yuchen Lin 2018-09-16 16:29:41 +00:00 committed by Git OBS Bridge
commit 1bcee84480
150 changed files with 5519 additions and 4384 deletions

View File

@ -3,20 +3,11 @@ 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 @@
@ -47,7 +38,6 @@ index 0000000000..cf3c7207a5
+}
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 @@
@ -123,6 +113,3 @@ index 0000000000..e8a538097e
+# work.
+
+remote_exec build "kill -9 ${testpid}"
--
2.14.3

View File

@ -3,25 +3,11 @@ 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 @@
@ -105,7 +91,6 @@ index 0000000000..1e4301af89
+*/
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 @@
@ -209,7 +194,6 @@ index 0000000000..1af5c19a16
+*/
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 @@
@ -244,7 +228,6 @@ index 0000000000..6b5bb08d0f
+}
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 @@
@ -321,7 +304,6 @@ index 0000000000..5f50c4ef43
+ }
+}
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 @@
@ -336,6 +318,3 @@ index 5251dfa9c3..f3933e2295 100644
verbose "Skipping PowerPC prologue tests."
return
}
--
2.14.3

View File

@ -3,24 +3,15 @@ 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
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 @@
@ -72,7 +63,6 @@ index 0000000000..522b24671d
+}
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 @@
@ -117,6 +107,3 @@ index 0000000000..77c8a7dc85
+ pass "Program exited"
+ }
+}
--
2.14.3

View File

@ -3,18 +3,11 @@ 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 @@
@ -58,6 +51,3 @@ index 0000000000..d5a653f684
+ pass $test
+ }
+}
--
2.14.3

View File

@ -3,8 +3,6 @@ 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
@ -14,21 +12,11 @@ FileName: gdb-6.3-gstack-20050411.patch
* 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
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
@@ -1735,7 +1735,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force
install: all
@$(MAKE) $(FLAGS_TO_PASS) install-only
@ -85,7 +73,6 @@ index 17b71c6e7c..e77d6a5c03 100644
$(COMPILE) -DTEST_CPNAMES cp-name-parser.c
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 @@
@ -134,7 +121,6 @@ index 0000000000..f7f07248f7
+ -e '/^Thread/p'
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 @@
@ -183,7 +169,6 @@ index 0000000000..dc10813f04
+}
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 @@
@ -253,6 +238,3 @@ index 0000000000..1186ec57bc
+gdb_exit
+
+remote_exec host "kill -9 $pid"
--
2.14.3

View File

@ -3,8 +3,6 @@ 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
@ -18,18 +16,9 @@ FileName: gdb-6.3-inferior-notification-20050721.patch
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
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 @@
@ -55,7 +44,6 @@ index 0000000000..0041b4732d
+}
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 @@
@ -306,7 +294,6 @@ index 0000000000..67ded02ccf
+return 0
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 @@
@ -334,6 +321,3 @@ index 0000000000..a78037ed38
+ }
+ return (0);
+}
--
2.14.3

View File

@ -3,8 +3,6 @@ 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
@ -14,20 +12,9 @@ FileName: gdb-6.3-inheritancetest-20050726.patch
* 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
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 @@
@ -65,7 +52,6 @@ index 0000000000..4161d523f5
+
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 @@
@ -118,7 +104,6 @@ index 0000000000..d03815bcff
+gdb_test "p d" " = \\(D \\*\\) *0x0" "Verify inherited member d accessible"
diff --git a/gdb/testsuite/gdb.cp/b146835.h b/gdb/testsuite/gdb.cp/b146835.h
new file mode 100644
index 0000000000..48df7a2935
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/b146835.h
@@ -0,0 +1,36 @@
@ -160,7 +145,6 @@ index 0000000000..48df7a2935
+};
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 @@
@ -175,6 +159,3 @@ index 0000000000..1853c1fa38
+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

View File

@ -3,20 +3,11 @@ 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 @@
@ -150,7 +141,6 @@ index 0000000000..bb9709a75c
+}
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 @@
@ -255,6 +245,3 @@ index 0000000000..b1fec682aa
+ fail $test
+ }
+}
--
2.14.3

View File

@ -3,8 +3,6 @@ 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.
@ -13,15 +11,11 @@ FileName: gdb-6.3-ppc64displaysymbol-20041124.patch
* printcmd.c (build_address_symbolic): Find a section for the
address.
---
gdb/printcmd.c | 8 ++++++++
1 file changed, 8 insertions(+)
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,
@@ -587,6 +587,14 @@ build_address_symbolic (struct gdbarch *gdbarch,
addr = overlay_mapped_address (addr, section);
}
}
@ -36,6 +30,3 @@ index 6256f35baa..c52e39f7fc 100644
/* First try to find the address in the symbol table, then
in the minsyms. Take the closest one. */
--
2.14.3

View File

@ -3,8 +3,6 @@ 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.
@ -15,12 +13,8 @@ FileName: gdb-6.3-ppc64syscall-20040622.patch
"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(-)
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";
@ -31,7 +25,7 @@ index e5a265dbcb..23d0db3b8f 100644
int offset; /* total size of frame --- the distance
by which we decrement sp to allocate
the frame */
@@ -1577,7 +1578,6 @@ static CORE_ADDR
@@ -1426,7 +1427,6 @@ static CORE_ADDR
skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
struct rs6000_framedata *fdata)
{
@ -39,7 +33,7 @@ index e5a265dbcb..23d0db3b8f 100644
CORE_ADDR last_prologue_pc = pc;
CORE_ADDR li_found_pc = 0;
gdb_byte buf[4];
@@ -1595,12 +1595,14 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
@@ -1445,12 +1445,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;
@ -54,7 +48,7 @@ index e5a265dbcb..23d0db3b8f 100644
fdata->saved_gpr = -1;
fdata->saved_fpr = -1;
fdata->saved_vr = -1;
@@ -1634,6 +1636,55 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
@@ -1484,6 +1486,55 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
break;
op = extract_unsigned_integer (buf, 4, byte_order);
@ -110,7 +104,7 @@ index e5a265dbcb..23d0db3b8f 100644
if ((op & 0xfc1fffff) == 0x7c0802a6)
{ /* mflr Rx */
/* Since shared library / PIC code, which needs to get its
@@ -1825,9 +1876,9 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
@@ -1673,9 +1724,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. */
@ -122,6 +116,3 @@ index e5a265dbcb..23d0db3b8f 100644
struct symtab_and_line this_sal = find_pc_line (pc, 0);
if ((prologue_sal.line == 0)
--
2.14.3

View File

@ -3,8 +3,6 @@ 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
@ -22,23 +20,16 @@ FileName: gdb-6.3-readnever-20050907.patch
* gdb.texinfo (File Options): Document --readnever.
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 $*
@@ -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 \
- "$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

View File

@ -1,10 +1,7 @@
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
Subject: gdb-6.3-rh-testversion-20041202.patch
;; Match the Fedora's version info.
;;=fedora
@ -13,12 +10,8 @@ FileName: gdb-6.3-rh-testversion-20041202.patch
* 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(+)
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 { } {
@ -31,6 +24,3 @@ index 20f34983ef..4108e088a9 100644
}
# start the "xgdb" process
--
2.14.3

View File

@ -3,20 +3,11 @@ 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 @@
@ -121,7 +112,6 @@ index 0000000000..9ac8793e50
+}
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 @@
@ -255,6 +245,3 @@ index 0000000000..341f6c99ad
+}
+
+gdb_continue_to_breakpoint "First line ~C"
--
2.14.3

View File

@ -3,8 +3,6 @@ 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
@ -13,18 +11,9 @@ FileName: gdb-6.3-test-movedir-20050125.patch
* 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
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 @@
@ -40,7 +29,6 @@ index 0000000000..89b65b4b6a
+
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 @@
@ -103,7 +91,6 @@ index 0000000000..f189ea77b9
+return 0
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 @@
@ -114,6 +101,3 @@ index 0000000000..4a99725a00
+ printf ("%s\n", ostring);;
+}
+
--
2.14.3

View File

@ -3,32 +3,11 @@ 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 @@
@ -54,7 +33,6 @@ index 0000000000..0041b4732d
+}
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 @@
@ -476,7 +454,6 @@ index 0000000000..648c92608c
+return 0
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 @@
@ -506,7 +483,6 @@ index 0000000000..a78037ed38
+}
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 @@
@ -658,7 +634,6 @@ index 0000000000..bf398fcca9
+}
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 @@
@ -1618,7 +1593,6 @@ index 0000000000..97b87397c2
+}
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 @@
@ -1668,7 +1642,6 @@ index 0000000000..2ed8b2a4a0
+#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 @@
@ -1907,7 +1880,6 @@ index 0000000000..ca4b01be3e
+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 @@
@ -2053,6 +2025,3 @@ index 0000000000..a7fbd94141
+ return 0;
+}
+
--
2.14.3

View File

@ -3,8 +3,6 @@ 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
@ -15,15 +13,11 @@ FileName: gdb-6.3-test-self-20050110.patch
* 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(-)
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} {
@@ -151,18 +151,18 @@ proc do_self_tests {function body} {
}
# Remove any old copy lying around.
@ -46,6 +40,3 @@ index 89e2e3f4ef..ea027a6f7d 100644
if {$result < 0} then {
warning "Couldn't test self"
--
2.14.3

View File

@ -3,8 +3,6 @@ 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
@ -51,16 +49,9 @@ FileName: gdb-6.3-threaded-watchpoints2-20050225.patch
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
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 @@
@ -132,7 +123,6 @@ index 0000000000..1402640ccf
+
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 @@
@ -262,6 +252,3 @@ index 0000000000..e9cdd59771
+} else {
+ fail $message
+}
--
2.14.3

View File

@ -3,24 +3,11 @@ 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 @@
@ -327,7 +314,6 @@ index 0000000000..80c599d0fb
+}
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 @@
@ -370,7 +356,6 @@ index 0000000000..af6b919f58
+return 0
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 @@
@ -700,7 +685,6 @@ index 0000000000..7f7e6520d6
+exit $FAILURES
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 @@
@ -952,6 +936,3 @@ index 0000000000..eb602036c2
+rm -rf $WORKDIR
+
+exit $FAILURES
--
2.14.3

View File

@ -3,8 +3,6 @@ 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
@ -25,18 +23,9 @@ 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
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 @@
@ -68,7 +57,6 @@ index 0000000000..28e54fb932
+}
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 @@
@ -118,10 +106,9 @@ index 0000000000..9aaf8e9772
+gdb_test "list integer" "int integer;\r"
+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"
+gdb_test "info variables integer" "\r\nFile \[^\r\n\]*/gdb.dwarf2/dw2-included.h:\r\n${decimal}:.*int integer;\r"
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 @@
@ -145,6 +132,3 @@ index 0000000000..f31348ab4f
+ USA. */
+
+int integer;
--
2.14.3

View File

@ -3,8 +3,6 @@ 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.
@ -42,23 +40,11 @@ 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
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)
@@ -1190,6 +1190,10 @@ print_command_1 (const char *exp, int voidprint)
if (exp && *exp)
{
@ -71,7 +57,6 @@ index c52e39f7fc..ad80b1bebf 100644
}
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 @@
@ -105,7 +90,6 @@ index 0000000000..7bd10d0978
+}
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 @@
@ -171,7 +155,6 @@ index 0000000000..1f13cc1323
+# Just how to find the current libc filename?
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 @@
@ -205,7 +188,6 @@ index 0000000000..7bd10d0978
+}
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 @@
@ -280,6 +262,3 @@ index 0000000000..0f6e66870b
+
+# TODO: Test the error on resolving ERRNO with only libc loaded.
+# Just how to find the current libc filename?
--
2.14.3

View File

@ -3,19 +3,13 @@ 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,
@@ -3584,6 +3584,12 @@ default_symfile_relocate (struct objfile *objfile, asection *sectp,
DWO file. */
bfd *abfd = sectp->owner;
@ -28,6 +22,3 @@ index f7f75b05d3..7cda615e74 100644
/* We're only interested in sections with relocation
information. */
if ((sectp->flags & SEC_RELOC) == 0)
--
2.14.3

View File

@ -3,8 +3,6 @@ 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
@ -32,19 +30,8 @@ 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
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,
@ -128,7 +115,7 @@ index 2bd3d31b75..2623bae42d 100644
static void
amd64_linux_write_pc (struct regcache *regcache, CORE_ADDR pc)
{
@@ -1807,6 +1881,8 @@ amd64_linux_init_abi_common(struct gdbarch_info info, struct gdbarch *gdbarch)
@@ -1808,6 +1882,8 @@ amd64_linux_init_abi_common(struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->xsave_xcr0_offset = I386_LINUX_XSAVE_XCR0_OFFSET;
@ -138,7 +125,6 @@ index 2bd3d31b75..2623bae42d 100644
set_gdbarch_write_pc (gdbarch, amd64_linux_write_pc);
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,
@ -181,10 +167,9 @@ index 7b2851f0a6..7c70792b3f 100644
(*this_id) = frame_id_build (cache->base + 16, get_frame_pc (this_frame));
}
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)
@@ -8406,6 +8406,9 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep->xsave_xcr0_offset = -1;
@ -193,9 +178,8 @@ index 9ce329eb20..d1b461b538 100644
+
tdep->record_regmap = i386_record_regmap;
set_gdbarch_long_long_align_bit (gdbarch, 32);
set_gdbarch_type_align (gdbarch, i386_type_align);
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
@ -210,7 +194,6 @@ index a71c103a88..5ee336b8cb 100644
/* Floating-point registers. */
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 @@
@ -255,7 +238,6 @@ index 0000000000..2ac93f8664
+}
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 @@
@ -320,6 +302,3 @@ index 0000000000..02728e05b9
+ pass "0x0 entry not found"
+ }
+}
--
2.14.3

View File

@ -3,22 +3,13 @@ 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
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 @@
@ -52,7 +43,6 @@ index 0000000000..a012da1031
+}
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 @@
@ -110,6 +100,3 @@ index 0000000000..a183e36263
+ fail "stepped into trampoline"
+ }
+}
--
2.14.3

View File

@ -3,21 +3,15 @@ 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(+)
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)
@@ -3165,6 +3165,13 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
SYMBOL_LINKAGE_NAME (msymbol)); */
;
/* fall through */
@ -31,6 +25,3 @@ index 81f4fc9ec5..a7e8431cfe 100644
else
return find_pc_line (BMSYMBOL_VALUE_ADDRESS (mfunsym), 0);
}
--
2.14.3

View File

@ -3,18 +3,11 @@ 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 @@
@ -93,6 +86,3 @@ index 0000000000..5807040840
+} else {
+ fail $test
+}
--
2.14.3

View File

@ -3,20 +3,11 @@ 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 @@
@ -59,7 +50,6 @@ index 0000000000..56b4d3a63a
+}
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 @@
@ -157,6 +147,3 @@ index 0000000000..4e71b5534e
+
+# Cleanup.
+exec kill -9 $pid_of_bin
--
2.14.3

View File

@ -3,20 +3,11 @@ 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 @@
@ -51,7 +42,6 @@ index 0000000000..58e34fb264
+}
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 @@
@ -138,6 +128,3 @@ index 0000000000..098962a57c
+ fail $test
+ }
+}
--
2.14.3

View File

@ -3,18 +3,11 @@ 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 @@
@ -67,6 +60,3 @@ index 0000000000..8a597e9b15
+ "Read the last address space byte"
+
+set timeout ${timeoutold}
--
2.14.3

View File

@ -3,23 +3,14 @@ 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
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 @@
@ -55,7 +46,6 @@ index 0000000000..107eae45a0
+}
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 @@
@ -103,6 +93,3 @@ index 0000000000..12ba99f1a9
+# 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"
--
2.14.3

View File

@ -3,20 +3,13 @@ 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
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 @@
@ -146,6 +139,3 @@ index 0000000000..5e46816d21
+}
+set timeout $oldtimeout1
+
--
2.14.3

View File

@ -3,22 +3,11 @@ 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 @@
@ -46,7 +35,6 @@ index 0000000000..dd39e23746
+int var;
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 @@
@ -78,7 +66,6 @@ index 0000000000..4e0b80d2d6
+}
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 @@
@ -133,6 +120,3 @@ index 0000000000..385716d901
+gdb_test "start" \
+ "main \\(\\) at .*${srcfilemain}.*" \
+ "start"
--
2.14.3

View File

@ -3,8 +3,6 @@ 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.
@ -30,18 +28,9 @@ 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
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 @@
@ -72,7 +61,6 @@ index 0000000000..ea5d0174d6
+}
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 @@
@ -100,7 +88,6 @@ index 0000000000..61b49251ba
+__thread int var = 42;
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 @@
@ -191,6 +178,3 @@ index 0000000000..00773f78f2
+ "\\\$1 = \[0-9\].*" \
+ "print TLS variable from a shared library with $name-directory separate debug info file"
+}
--
2.14.3

View File

@ -1,9 +1,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: print a more useful error message for "gdb core"
FileName: gdb-6.6-buildid-locate-core-as-arg.patch
Subject: gdb-6.6-buildid-locate-core-as-arg.patch
;;=push+jan
@ -62,14 +60,8 @@ 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(-)
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 {
@ -83,18 +75,17 @@ index 15c85e28ab..9fe2375bce 100644
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"
@@ -36,6 +36,7 @@
#include "gdb_bfd.h"
#include "gcore.h"
#include "source.h"
+#include "exceptions.h"
#include <fcntl.h>
#include "readline/readline.h"
@@ -346,12 +347,27 @@ exec_file_attach (const char *filename, int from_tty)
@@ -357,12 +358,27 @@ exec_file_attach (const char *filename, int from_tty)
if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching))
{
@ -126,10 +117,9 @@ index c8c32ecc27..b329e2b834 100644
if (build_section_table (exec_bfd, &sections, &sections_end))
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
@@ -447,6 +447,37 @@ struct cmdarg
char *string;
};
@ -167,7 +157,7 @@ index 3c98787edb..17d35f4a8a 100644
static void
captured_main_1 (struct captured_main_args *context)
{
@@ -882,6 +913,8 @@ captured_main_1 (struct captured_main_args *context)
@@ -883,6 +914,8 @@ captured_main_1 (struct captured_main_args *context)
{
symarg = argv[optind];
execarg = argv[optind];
@ -176,7 +166,7 @@ index 3c98787edb..17d35f4a8a 100644
optind++;
}
@@ -1032,11 +1065,25 @@ captured_main_1 (struct captured_main_args *context)
@@ -1033,11 +1066,25 @@ captured_main_1 (struct captured_main_args *context)
&& symarg != NULL
&& strcmp (execarg, symarg) == 0)
{
@ -205,6 +195,3 @@ index 3c98787edb..17d35f4a8a 100644
catch_command_errors (symbol_file_add_main_adapter, symarg,
!batch_flag);
}
--
2.14.3

View File

@ -4,8 +4,6 @@ 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
@ -26,17 +24,11 @@ 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
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,
@@ -581,7 +581,10 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id,
do_cleanups (inner);
if (abfd == NULL)
@ -50,7 +42,6 @@ index 409a5b8c54..e2c1e81266 100644
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 @@
@ -151,6 +142,3 @@ index 0000000000..bb70c5cf44
+
+# Leaving the link there will cause breakage in the next run.
+remote_exec build "rm -f [standard_output_file ${build_id_without_debug}]"
--
2.14.3

View File

@ -3,20 +3,13 @@ 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)
@@ -652,6 +652,19 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return)
#include <dlfcn.h>
#endif
@ -37,7 +30,6 @@ index d60cf622dc..409a5b8c54 100644
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 @@
@ -48,6 +40,3 @@ index 53f7ed8b1e..323f5e83c2 100644
+ /* gdb-6.6-buildid-locate-rpm.patch */
+ rpmsqEnable;
};
--
2.14.3

View File

@ -3,23 +3,16 @@ 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 --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;
@@ -689,7 +689,11 @@ static int missing_rpm_list_entries;
/* Returns the count of newly added rpms. */
static int
@ -31,7 +24,7 @@ index e2c1e81266..1b75530f91 100644
{
static int rpm_init_done = 0;
rpmts ts;
@@ -822,7 +826,11 @@ missing_rpm_enlist (const char *filename)
@@ -796,7 +800,11 @@ missing_rpm_enlist (const char *filename)
mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0);
if (mi != NULL)
{
@ -43,7 +36,7 @@ index e2c1e81266..1b75530f91 100644
{
Header h;
char *debuginfo, **slot, *s, *s2;
@@ -940,6 +948,37 @@ missing_rpm_enlist (const char *filename)
@@ -914,6 +922,37 @@ missing_rpm_enlist (const char *filename)
xfree (debuginfo);
count++;
}
@ -81,7 +74,7 @@ index e2c1e81266..1b75530f91 100644
rpmdbFreeIterator_p (mi);
}
@@ -950,6 +989,21 @@ missing_rpm_enlist (const char *filename)
@@ -924,6 +963,21 @@ missing_rpm_enlist (const char *filename)
}
static int
@ -104,10 +97,9 @@ index e2c1e81266..1b75530f91 100644
{
return strcoll (*ap, *bp);
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,
@@ -3469,6 +3469,16 @@ read_gdb_index_from_section (struct objfile *objfile,
"set use-deprecated-index-sections on". */
if (version < 6 && !deprecated_ok)
{
@ -124,7 +116,7 @@ index 2c972d5e74..64329af71e 100644
static int warning_printed = 0;
if (!warning_printed)
{
@@ -3736,6 +3746,10 @@ to use the section anyway."),
@@ -3480,6 +3490,10 @@ to use the section anyway."),
warning_printed = 1;
}
return 0;
@ -135,6 +127,3 @@ index 2c972d5e74..64329af71e 100644
}
/* 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

View File

@ -3,25 +3,12 @@ From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-6.6-buildid-locate-rpm.patch
FileName: gdb-6.6-buildid-locate-rpm.patch
;;=push+jan
---
gdb/aclocal.m4 | 215 +++++++++++++++++++++++
gdb/build-id.c | 407 +++++++++++++++++++++++++++++++++++++++++++-
gdb/config.in | 6 +
gdb/configure | 508 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
gdb/configure.ac | 193 +++++++++++++++++++++
gdb/corelow.c | 2 +-
gdb/event-top.c | 8 +-
gdb/symfile.h | 2 +
8 files changed, 1331 insertions(+), 10 deletions(-)
diff --git a/gdb/aclocal.m4 b/gdb/aclocal.m4
index e0d38ea267..da5ac313e3 100644
--- a/gdb/aclocal.m4
+++ b/gdb/aclocal.m4
@@ -12,6 +12,221 @@
@@ -11,7 +11,223 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@ -239,12 +226,13 @@ index e0d38ea267..da5ac313e3 100644
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])# PKG_CHECK_VAR
+
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
+
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
# Copyright (C) 2001-2017 Free Software Foundation, Inc.
diff --git a/gdb/build-id.c b/gdb/build-id.c
index 5740628386..d60cf622dc 100644
--- a/gdb/build-id.c
+++ b/gdb/build-id.c
@@ -35,6 +35,8 @@
@ -256,7 +244,7 @@ index 5740628386..d60cf622dc 100644
#define BUILD_ID_VERBOSE_NONE 0
#define BUILD_ID_VERBOSE_FILENAMES 1
@@ -666,8 +668,366 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return)
@@ -640,8 +642,366 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return)
return result;
}
@ -624,7 +612,7 @@ index 5740628386..d60cf622dc 100644
avoidance. */
struct missing_filepair
@@ -721,11 +1081,17 @@ missing_filepair_change (void)
@@ -695,11 +1055,17 @@ missing_filepair_change (void)
/* All their memory came just from missing_filepair_OBSTACK. */
missing_filepair_hash = NULL;
}
@ -642,7 +630,7 @@ index 5740628386..d60cf622dc 100644
missing_filepair_change ();
}
@@ -792,14 +1158,39 @@ debug_print_missing (const char *binary, const char *debug)
@@ -766,14 +1132,39 @@ debug_print_missing (const char *binary, const char *debug)
*slot = missing_filepair;
@ -690,7 +678,6 @@ index 5740628386..d60cf622dc 100644
/* See build-id.h. */
diff --git a/gdb/config.in b/gdb/config.in
index 1d11a97080..edd7028f76 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -33,6 +33,9 @@
@ -703,7 +690,7 @@ index 1d11a97080..edd7028f76 100644
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#undef ENABLE_NLS
@@ -264,6 +267,9 @@
@@ -270,6 +273,9 @@
/* Define if Python 2.7 is being used. */
#undef HAVE_LIBPYTHON2_7
@ -714,10 +701,9 @@ index 1d11a97080..edd7028f76 100644
#undef HAVE_LIBUNWIND_IA64_H
diff --git a/gdb/configure b/gdb/configure
index 092893d757..1cecdbc3b5 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -716,6 +716,11 @@ PKGVERSION
@@ -749,6 +749,11 @@ CODESIGN_CERT
HAVE_NATIVE_GCORE_TARGET
TARGET_OBS
subdirs
@ -729,7 +715,7 @@ index 092893d757..1cecdbc3b5 100755
GDB_DATADIR
DEBUGDIR
MAKEINFO_EXTRA_FLAGS
@@ -820,6 +825,7 @@ with_gdb_datadir
@@ -853,6 +858,7 @@ with_gdb_datadir
with_relocated_sources
with_auto_load_dir
with_auto_load_safe_path
@ -737,7 +723,7 @@ index 092893d757..1cecdbc3b5 100755
enable_targets
enable_64_bit_bfd
enable_gdbcli
@@ -878,6 +884,11 @@ CCC
@@ -912,6 +918,11 @@ CCC
CPP
MAKEINFO
MAKEINFOFLAGS
@ -749,7 +735,7 @@ index 092893d757..1cecdbc3b5 100755
YACC
YFLAGS
XMKMF'
@@ -1548,6 +1559,8 @@ Optional Packages:
@@ -1583,6 +1594,8 @@ Optional Packages:
[--with-auto-load-dir]
--without-auto-load-safe-path
do not restrict auto-loaded files locations
@ -758,7 +744,7 @@ index 092893d757..1cecdbc3b5 100755
--with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
--with-curses use the curses library instead of the termcap
library
@@ -1605,6 +1618,13 @@ Some influential environment variables:
@@ -1640,6 +1653,13 @@ Some influential environment variables:
MAKEINFO Parent configure detects if it is of sufficient version.
MAKEINFOFLAGS
Parameters for MAKEINFO.
@ -769,10 +755,10 @@ index 092893d757..1cecdbc3b5 100755
+ path overriding pkg-config's built-in search path
+ RPM_CFLAGS C compiler flags for RPM, overriding pkg-config
+ RPM_LIBS linker flags for RPM, overriding pkg-config
YACC The `Yet Another C Compiler' implementation to use. Defaults to
the first program found out of: `bison -y', `byacc', `yacc'.
YFLAGS The list of arguments that will be passed by default to $YACC.
@@ -6486,6 +6506,494 @@ _ACEOF
YACC The `Yet Another Compiler Compiler' implementation to use.
Defaults to the first program found out of: `bison -y', `byacc',
`yacc'.
@@ -6575,6 +6595,494 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
$as_echo "$with_auto_load_safe_path" >&6; }
@ -1268,10 +1254,9 @@ index 092893d757..1cecdbc3b5 100755
subdirs="$subdirs testsuite"
diff --git a/gdb/configure.ac b/gdb/configure.ac
index d4133ea71e..e232c1adcb 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -167,6 +167,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escape_dir,
@@ -166,6 +166,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escape_dir,
[Directories safe to hold auto-loaded files.])
AC_MSG_RESULT([$with_auto_load_safe_path])
@ -1472,10 +1457,9 @@ index d4133ea71e..e232c1adcb 100644
# Check whether to support alternative target configurations
diff --git a/gdb/corelow.c b/gdb/corelow.c
index c5b642db81..6e027c12e2 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -309,7 +309,7 @@ build_id_locate_exec (int from_tty)
@@ -366,7 +366,7 @@ build_id_locate_exec (int from_tty)
symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
}
else
@ -1485,7 +1469,6 @@ index c5b642db81..6e027c12e2 100644
do_cleanups (back_to);
diff --git a/gdb/event-top.c b/gdb/event-top.c
index 0c1528e5eb..0d668f35e0 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -40,6 +40,7 @@
@ -1518,10 +1501,9 @@ index 0c1528e5eb..0d668f35e0 100644
}
diff --git a/gdb/symfile.h b/gdb/symfile.h
index 0d51f46d78..82c76431e1 100644
--- a/gdb/symfile.h
+++ b/gdb/symfile.h
@@ -546,6 +546,8 @@ void map_symbol_filenames (symbol_filename_ftype *fun, void *data,
@@ -540,6 +540,8 @@ void map_symbol_filenames (symbol_filename_ftype *fun, void *data,
/* 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);
@ -1530,6 +1512,3 @@ index 0d51f46d78..82c76431e1 100644
/* From dwarf2read.c */
--
2.14.3

View File

@ -3,8 +3,6 @@ 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).
@ -12,33 +10,23 @@ FileName: gdb-6.6-buildid-locate-solib-missing-ids.patch
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
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,
@@ -1358,14 +1358,27 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm,
}
{
- struct bfd_build_id *build_id;
+ struct bfd_build_id *build_id = NULL;
strncpy (newobj->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
strncpy (newobj->so_original_name, buffer.get (), 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);
- build_id = build_id_addr_get (((lm_info_svr4 *) newobj->lm_info)->l_ld);
+ /* 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.
@ -56,7 +44,7 @@ index a3399ad8f7..d7eeb6350d 100644
if (build_id != NULL)
{
char *name, *build_id_filename;
@@ -1409,23 +1422,7 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm,
@@ -1380,23 +1393,7 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm,
xfree (name);
}
else
@ -83,7 +71,6 @@ index a3399ad8f7..d7eeb6350d 100644
xfree (build_id);
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 @@
@ -110,7 +97,6 @@ index 0000000000..d74b690c73
+}
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 @@
@ -141,7 +127,6 @@ index 0000000000..46b9dfe161
+}
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 @@
@ -250,6 +235,3 @@ index 0000000000..0c46489f31
+
+gdb_test "bt"
+gdb_test "info shared"
--
2.14.3

View File

@ -3,30 +3,10 @@ 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 @@
@ -36,7 +16,7 @@ index 945da4f3cf..5740628386 100644
+#include "libbfd.h"
+#include "gdbcore.h"
+#include "gdbcmd.h"
+#include "observer.h"
+#include "observable.h"
+#include "elf/external.h"
+#include "elf/internal.h"
+#include "elf/common.h"
@ -456,7 +436,7 @@ index 945da4f3cf..5740628386 100644
if (found == NULL)
warning (_("File \"%s\" has no build-id, file skipped"),
@@ -65,23 +463,54 @@ build_id_verify (bfd *abfd, size_t check_len, const bfd_byte *check)
@@ -65,11 +463,50 @@ build_id_verify (bfd *abfd, size_t check_len, const bfd_byte *check)
return retval;
}
@ -501,84 +481,80 @@ index 945da4f3cf..5740628386 100644
+build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id,
+ char **link_return, int add_debug_suffix)
{
- char *link, *debugdir;
+ char *link, *debugdir, *link_all = NULL;
VEC (char_ptr) *debugdir_vec;
struct cleanup *back_to;
int ix;
+ char *debugdir;
+ std::string link, link_all;
+ struct cleanup *back_to;
+ int ix;
gdb_bfd_ref_ptr abfd;
- int alloc_len;
/* DEBUG_FILE_DIRECTORY/.build-id/ab/cdef */
- alloc_len = (strlen (debug_file_directory)
- + (sizeof "/.build-id/" - 1) + 1
- + 2 * build_id_len + (sizeof ".debug" - 1) + 1);
- link = (char *) alloca (alloc_len);
+ link = (char *) xmalloc (strlen (debug_file_directory) + 2 * build_id_len + 50);
/* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will
cause "/.build-id/..." lookups. */
@@ -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);
@@ -82,63 +519,296 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id)
{
const gdb_byte *data = build_id;
size_t size = build_id_len;
- char *s;
char *filename = NULL;
struct cleanup *inner;
+ char *filename = NULL;
+ struct cleanup *inner;
+ unsigned seqno;
+ struct stat statbuf_trash;
+ /* Initialize it just to avoid a GCC false warning. */
+ char *s, *link0 = NULL, *link0_resolved;
+ std::string link0;
memcpy (link, debugdir, debugdir_len);
s = &link[debugdir_len];
@@ -110,52 +542,299 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id)
*s++ = '/';
- std::string link = debugdir.get ();
+ link = debugdir.get ();
link += "/.build-id/";
if (size > 0)
{
size--;
- string_appendf (link, "%02x/", (unsigned) *data++);
+ string_appendf (link, "%02x", (unsigned) *data++);
}
-
+ if (size > 0)
+ link += "/";
while (size-- > 0)
s += sprintf (s, "%02x", (unsigned) *data++);
- strcpy (s, ".debug");
string_appendf (link, "%02x", (unsigned) *data++);
- link += ".debug";
-
if (separate_debug_file_debug)
printf_unfiltered (_(" Trying %s\n"), link);
printf_unfiltered (_(" Trying %s\n"), link.c_str ());
- /* lrealpath() is expensive even for the usually non-existent files. */
- if (access (link, F_OK) == 0)
- filename = lrealpath (link);
- gdb::unique_xmalloc_ptr<char> filename;
- if (access (link.c_str (), F_OK) == 0)
- filename.reset (lrealpath (link.c_str ()));
-
- if (filename == NULL)
- continue;
+ for (seqno = 0;; seqno++)
+ {
+ char *s2;
+
+ if (seqno)
+ {
+ /* There can be multiple build-id symlinks pointing to real files
+ with the same build-id (such as hard links). Some of the real
+ files may not be installed. */
+
+ s2 = s + sprintf (s, ".%u", seqno);
+ string_appendf (link, ".%u", seqno);
+ }
+ else
+ s2 = s;
+
+ if (add_debug_suffix)
+ strcpy (s2, ".debug");
+ else
+ *s2 = 0;
+ link += ".debug";
+
+ if (!seqno)
+ {
+ /* If none of the real files is found report as missing file
+ always the non-.%u-suffixed file. */
+ link0 = xstrdup (link);
+ link0 = link;
+ }
+
+ /* `access' automatically dereferences LINK. */
+ if (lstat (link, &statbuf_trash) != 0)
+ if (lstat (link.c_str (), &statbuf_trash) != 0)
+ {
+ /* Stop increasing SEQNO. */
+ break;
+ }
+
+ filename = lrealpath (link);
+ filename = lrealpath (link.c_str ());
+ if (filename == NULL)
+ continue;
+
@ -598,65 +574,46 @@ index 945da4f3cf..5740628386 100644
+ filename = NULL;
+ }
- if (filename == NULL)
- continue;
- /* We expect to be silent on the non-existing files. */
- abfd = gdb_bfd_open (filename.get (), gnutarget, -1);
+ if (filename != NULL)
+ {
+ /* LINK_ALL is not used below in this non-NULL FILENAME case. */
+ xfree (link0);
+ 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);
- if (abfd == NULL)
- continue;
+ /* 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);
+ std::string link0_resolved (link_resolve (link0.c_str (), 0));
- 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 ();
+ if (link_all.empty ())
+ link_all = link0_resolved;
+ else
+ {
+ /* Use whitespace instead of DIRNAME_SEPARATOR to be compatible with
+ its possible use as an argument for installation command. */
+ link_all[len_orig] = ' ';
+
+ strcpy (&link_all[len_orig + 1], link0_resolved);
+ xfree (link0_resolved);
+ link_all += " " + link0_resolved;
+ }
+ }
+
- abfd.release ();
+ if (link_return != NULL)
+ {
+ if (abfd != NULL)
+ {
+ *link_return = link;
+ link = NULL;
+ *link_return = xstrdup (link.c_str ());
+ }
+ else
+ {
+ *link_return = link_all;
+ link_all = NULL;
+ *link_return = xstrdup (link_all.c_str ());
+ }
}
+ xfree (link);
+ xfree (link_all);
do_cleanups (back_to);
return abfd;
}
@ -813,7 +770,7 @@ index 945da4f3cf..5740628386 100644
+
/* See build-id.h. */
char *
std::string
-find_separate_debug_file_by_buildid (struct objfile *objfile)
+find_separate_debug_file_by_buildid (struct objfile *objfile,
+ gdb::unique_xmalloc_ptr<char> *build_id_filename_return)
@ -850,9 +807,9 @@ index 945da4f3cf..5740628386 100644
/* Prevent looping on a stripped .debug file. */
if (abfd != NULL
&& filename_cmp (bfd_get_filename (abfd.get ()),
@@ -167,3 +846,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
}
return NULL;
@@ -151,3 +821,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
return std::string ();
}
+
+extern void _initialize_build_id (void);
@ -870,10 +827,9 @@ index 945da4f3cf..5740628386 100644
+ show_build_id_verbose,
+ &setlist, &showlist);
+
+ observer_attach_executable_changed (debug_print_executable_changed);
+ gdb::observers::executable_changed.attach (debug_print_executable_changed);
+}
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 @@
@ -889,7 +845,7 @@ index 0f13c7d4cf..2d105dba88 100644
/* Return true if ABFD has NT_GNU_BUILD_ID matching the CHECK value.
Otherwise, issue a warning and return false. */
@@ -38,13 +39,19 @@ extern int build_id_verify (bfd *abfd,
@@ -38,13 +39,18 @@ extern int build_id_verify (bfd *abfd,
the caller. */
extern gdb_bfd_ref_ptr build_id_to_debug_bfd (size_t build_id_len,
@ -902,30 +858,29 @@ index 0f13c7d4cf..2d105dba88 100644
+ char **link_return);
/* Find the separate debug file for OBJFILE, by using the build-id
associated with OBJFILE's BFD. If successful, returns a malloc'd
file name for the separate debug file. The caller must free this.
Otherwise, returns NULL. */
associated with OBJFILE's BFD. If successful, returns the file name for the
separate debug file, otherwise, return an empty string. */
-extern char *find_separate_debug_file_by_buildid (struct objfile *objfile);
+extern char *find_separate_debug_file_by_buildid (struct objfile *objfile,
-extern std::string find_separate_debug_file_by_buildid
- (struct objfile *objfile);
+extern std::string find_separate_debug_file_by_buildid (struct objfile *objfile,
+ gdb::unique_xmalloc_ptr<char> *build_id_filename_return);
#endif /* BUILD_ID_H */
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)
@@ -733,7 +733,8 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
/* Try to add separate debug file if no symbols table found. */
if (!objfile_has_partial_symbols (objfile))
{
char *debugfile;
- std::string debugfile = find_separate_debug_file_by_buildid (objfile);
+ std::string debugfile = find_separate_debug_file_by_buildid (objfile,
+ NULL);
- debugfile = find_separate_debug_file_by_buildid (objfile);
+ debugfile = find_separate_debug_file_by_buildid (objfile, NULL);
if (debugfile == NULL)
if (debugfile.empty ())
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 @@
@ -939,7 +894,7 @@ index 3a5256cb17..c5b642db81 100644
#ifndef O_LARGEFILE
#define O_LARGEFILE 0
@@ -264,6 +268,54 @@ add_to_thread_list (bfd *abfd, asection *asect, void *reg_sect_arg)
@@ -321,6 +325,54 @@ add_to_thread_list (bfd *abfd, asection *asect, void *reg_sect_arg)
inferior_ptid = ptid; /* Yes, make it current. */
}
@ -957,7 +912,7 @@ index 3a5256cb17..c5b642db81 100644
+ if (exec_bfd != NULL || symfile_objfile != NULL)
+ return;
+
+ if (target_auxv_search (&current_target, AT_ENTRY, &at_entry) <= 0)
+ if (target_auxv_search (current_top_target (), AT_ENTRY, &at_entry) <= 0)
+ return;
+
+ build_id = build_id_addr_get (at_entry);
@ -991,11 +946,11 @@ index 3a5256cb17..c5b642db81 100644
+ /* No automatic SOLIB_ADD as the libraries would get read twice. */
+}
+
/* This routine opens and sets up the core file bfd. */
/* Issue a message saying we have no core to debug, if FROM_TTY. */
static void
@@ -391,6 +443,14 @@ core_open (const char *arg, int from_tty)
switch_to_thread (thread->ptid);
@@ -464,6 +516,14 @@ core_target_open (const char *arg, int from_tty)
switch_to_thread (thread);
}
+ /* Find the build_id identifiers. If it gets executed after
@ -1006,13 +961,13 @@ index 3a5256cb17..c5b642db81 100644
+ if (build_id_core_loads != 0)
+ build_id_locate_exec (from_tty);
+
post_create_inferior (&core_ops, from_tty);
post_create_inferior (target, 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);
@@ -1072,4 +1132,11 @@ void
_initialize_corelow (void)
{
add_target (core_target_info, core_target_open, filename_completer);
+
+ add_setshow_boolean_cmd ("build-id-core-loads", class_files,
+ &build_id_core_loads, _("\
@ -1022,10 +977,9 @@ index 3a5256cb17..c5b642db81 100644
+ &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.
@@ -19570,6 +19570,27 @@ information files.
@end table
@ -1054,10 +1008,9 @@ index 8bdafb0ba4..2f2cbd3dea 100644
@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)
@@ -2683,7 +2683,7 @@ dwarf2_get_dwz_file (struct dwarf2_per_objfile *dwarf2_per_objfile)
}
if (dwz_bfd == NULL)
@ -1067,22 +1020,21 @@ index 98e7d842f0..c8db955f2f 100644
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)
@@ -1290,7 +1290,9 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
&& objfile->separate_debug_objfile == NULL
&& objfile->separate_debug_objfile_backlink == NULL)
{
- std::string debugfile = find_separate_debug_file_by_buildid (objfile);
+ 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));
+ std::string debugfile
+ = 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 (),
if (debugfile.empty ())
debugfile = find_separate_debug_file_by_debuglink (objfile);
@@ -1302,6 +1304,10 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
symbol_file_add_separate (abfd.get (), debugfile.c_str (),
symfile_flags, objfile);
}
+ /* Check if any separate debug info has been extracted out. */
@ -1093,7 +1045,6 @@ index 103b2144c3..fb32e03af5 100644
}
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
@ -1108,7 +1059,6 @@ index 28e66eca36..5ab0e33fb6 100644
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)
@ -1130,7 +1080,6 @@ index c2b40ff535..112cbf6560 100644
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 @@
@ -1141,22 +1090,22 @@ index 4973cc2f25..a3399ad8f7 100644
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,
@@ -1356,9 +1357,51 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm,
continue;
}
- strncpy (newobj->so_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
- strncpy (newobj->so_name, buffer.get (), 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);
+ strncpy (newobj->so_original_name, buffer.get (), 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);
+ build_id = build_id_addr_get (((lm_info_svr4 *) newobj->lm_info)->l_ld);
+ if (build_id != NULL)
+ {
+ char *name, *build_id_filename;
@ -1193,15 +1142,13 @@ index 4973cc2f25..a3399ad8f7 100644
+ xfree (build_id);
+ }
+ }
+
xfree (buffer);
/* If this entry has no name, or its name matches the name
for the main executable, don't include it in the list. */
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
@@ -537,6 +537,10 @@ void expand_symtabs_matching
void map_symbol_filenames (symbol_filename_ftype *fun, void *data,
int need_fullname);
@ -1213,7 +1160,6 @@ index 7c3fd8240a..0d51f46d78 100644
/* 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 {
@ -1251,7 +1197,6 @@ index 63a7fa8e5b..8a4fab77df 100644
+ 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 {} {
@ -1263,10 +1208,9 @@ index a6dc14e3c9..54a10df155 100644
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 { } {
@@ -1695,6 +1695,16 @@ proc default_gdb_start { } {
warning "Couldn't set the width to 0."
}
}
@ -1284,7 +1228,6 @@ index 7702d9c238..a165bf0938 100644
}
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 } {
@ -1304,6 +1247,3 @@ index 2846da74e4..004c3e6c1c 100644
if { $separate_inferior_pty } {
mi_create_inferior_pty
--
2.14.3

View File

@ -3,8 +3,6 @@ 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
@ -15,16 +13,9 @@ FileName: gdb-6.6-bz229517-gcore-without-terminal.patch
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
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 @@
@ -79,7 +70,6 @@ index 0000000000..427ebe9b4f
+}
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 @@
@ -196,6 +186,3 @@ index 0000000000..a5471ba5df
+
+set env(PATH) $oldpath
+remote_file target delete "./gdb"
--
2.14.3

View File

@ -3,8 +3,6 @@ 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
@ -13,16 +11,9 @@ 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
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 @@
@ -82,7 +73,6 @@ index 0000000000..082a4b7802
+gdb_test "disass func" ":\tdcmpuq *cr1,f2,f0\r\n.*" "Power6 disassembly dcmpuq"
diff --git a/gdb/testsuite/gdb.arch/powerpc-power6.s b/gdb/testsuite/gdb.arch/powerpc-power6.s
new file mode 100644
index 0000000000..6694b237ab
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/powerpc-power6.s
@@ -0,0 +1,16 @@
@ -102,6 +92,3 @@ index 0000000000..6694b237ab
+ .long 0xfc020444 /* ddivq f0,f2,f0 */
+ .long 0xec820d04 /* dcmpu cr1,f2,f1 */
+ .long 0xfc820504 /* dcmpuq cr1,f2,f0 */
--
2.14.3

View File

@ -1,166 +0,0 @@
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
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.
+
+ 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 */
+
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+#include <assert.h>
+#include <stdlib.h>
+
+static void func (void)
+{
+}
+
+int main (void)
+{
+ pid_t child;
+
+ child = fork ();
+ switch (child)
+ {
+ case -1:
+ abort ();
+ case 0:
+ func ();
+ break;
+ default:
+ {
+/* We do not test the switching to the other fork by GDB `fork 1'. */
+#if 0
+ pid_t got;
+
+ got = waitpid (child, NULL, 0);
+ assert (got == child);
+#endif
+ break;
+ }
+ }
+ return 0;
+}
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.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+set testfile fork-detach
+set srcfile ${testfile}.c
+set binfile [standard_output_file ${testfile}]
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+
+# Get things started.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_run_cmd
+# `Starting program: .*' prefix is available since gdb-6.7.
+gdb_test "" \
+ "Detaching after fork from child process.*\\\[Inferior .* exited normally\\\]" \
+ "Info message caught"
--
2.14.3

View File

@ -3,8 +3,6 @@ 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
@ -12,16 +10,9 @@ FileName: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
* 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
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 @@
@ -198,7 +189,6 @@ index 0000000000..04f998bfa6
+}
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 @@
@ -286,6 +276,3 @@ index 0000000000..eb49db506e
+gdb_test "c" \
+ ".*Program exited normally\\..*" \
+ "run till program exit"
--
2.14.3

View File

@ -3,23 +3,13 @@ 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[] = {
@@ -2193,7 +2193,7 @@ static const char *const scheduler_enums[] = {
schedlock_replay,
NULL
};
@ -29,7 +19,6 @@ index 23439979b5..1d0f731954 100644
show_scheduler_mode (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
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" \
@ -42,7 +31,6 @@ index 6ce6439eb7..4f405b5fc1 100644
# Test that the new current source line is output to the console
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
@ -56,7 +44,6 @@ index ec4b006018..05cf7fb889 100644
# 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
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
@ -78,7 +65,6 @@ index b09cde2d37..e51d46edb5 100644
} 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} {
@ -90,6 +76,3 @@ index 5227d63f5d..782f31c080 100644
pass $message
}
timeout {
--
2.14.3

View File

@ -3,17 +3,10 @@ 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
@ -26,7 +19,6 @@ index 4b34aa84f2..40e08a4db2 100644
# <return> to continue" prompts.
gdb_test_no_output "set height 0"
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
@ -38,6 +30,3 @@ index a899be69ea..af472af8a5 100644
# 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

View File

@ -3,8 +3,6 @@ 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.
@ -19,16 +17,9 @@ 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
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 @@
@ -71,7 +62,6 @@ index 0000000000..41d175ff9d
+char_u u_typed[]="A";
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 @@
@ -138,6 +128,3 @@ index 0000000000..b5fa580490
+do_test {}
+do_test {-fsigned-char}
+do_test {-funsigned-char}
--
2.14.3

View File

@ -3,8 +3,6 @@ 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
@ -22,16 +20,9 @@ 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
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 @@
@ -58,7 +49,6 @@ index 0000000000..698ff8a0b5
+}
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 @@
@ -116,6 +106,3 @@ index 0000000000..c9ebd0e522
+
+gdb_test backtrace ".*operand0=<value optimized out>.*operand1=<value optimized out>.*" \
+ "Check value of call clobbered registers"
--
2.14.3

View File

@ -3,8 +3,6 @@ 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
@ -26,13 +24,8 @@ 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(-)
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)
@ -65,7 +58,6 @@ index 7f482a34d3..1caadbae84 100644
test_open ();
test_write ();
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] {
@ -110,6 +102,3 @@ index bc409c26aa..e1e5e2e5d0 100644
set timeout $oldtimeout
return 0
--
2.14.3

View File

@ -1,199 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-6.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));
}
+#ifdef NEED_DETACH_SIGSTOP
+ /* We should check PID_WAS_STOPPED and detach it stopped accordingly.
+ In this point of code it cannot be 1 as we would not get FORK
+ executed without CONTINUE first which resets PID_WAS_STOPPED.
+ We would have to first TARGET_STOP and WAITPID it as with running
+ inferior PTRACE_DETACH, SIGSTOP will ignore the signal. */
+#endif
target_detach (NULL, 0);
}
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;
+#ifdef NEED_DETACH_SIGSTOP
+/* PID of the inferior stopped by SIGSTOP before attaching (or zero). */
+static pid_t pid_was_stopped;
+
+#endif
/* The method to call, if any, when a new thread is attached. */
static void (*linux_nat_new_thread) (struct lwp_info *);
@@ -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");
+#ifdef NEED_DETACH_SIGSTOP
+ pid_was_stopped = ptid_get_pid (ptid);
+#endif
/* The process is definitely stopped. It is in a job control
stop, unless the kernel predates the TASK_STOPPED /
@@ -1420,6 +1428,25 @@ get_detach_signal (struct lwp_info *lp)
return gdb_signal_to_host (signo);
}
+#ifdef NEED_DETACH_SIGSTOP
+ /* Workaround RHEL-5 kernel which has unreliable PTRACE_DETACH, SIGSTOP (that
+ many TIDs are left unstopped). See RH Bug 496732. */
+ if (ptid_get_pid (lp->ptid) == pid_was_stopped)
+ {
+ int err;
+
+ errno = 0;
+ err = kill_lwp (ptid_get_lwp (lp->ptid), SIGSTOP);
+ if (debug_linux_nat)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "SC: lwp kill %d %s\n",
+ err,
+ errno ? safe_strerror (errno) : "ERRNO-OK");
+ }
+ }
+
+#endif
return 0;
}
@@ -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);
+
+#ifdef NEED_DETACH_SIGSTOP
+ pid_was_stopped = 0;
+#endif
}
}
@@ -1838,6 +1869,16 @@ linux_nat_resume (struct target_ops *ops,
return;
}
+#ifdef NEED_DETACH_SIGSTOP
+ /* At this point, we are going to resume the inferior and if we
+ have attached to a stopped process, we no longer should leave
+ it as stopped if the user detaches. PTID variable has PID set to LWP
+ while we need to check the real PID here. */
+
+ if (!step && lp && pid_was_stopped == ptid_get_pid (lp->ptid))
+ pid_was_stopped = 0;
+
+#endif
if (resume_many)
iterate_over_lwps (ptid, linux_nat_resume_callback, lp);
@@ -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);
+#ifdef NEED_DETACH_SIGSTOP
+
+ pid_was_stopped = 0;
+#endif
}
/* Convert a native/host siginfo object, into/from the siginfo in the
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}
- # Verify that we can attach to the stopped process.
+ # Verify that we can attach to the process by first giving its
+ # executable name via the file command, and using attach with the
+ # process ID.
+
+ set test "$threadtype: set file, before attach1 to stopped process"
+ gdb_test_multiple "file $binfile" "$test" {
+ -re "Load new symbol table from.*y or n. $" {
+ gdb_test "y" "Reading symbols from $escapedbinfile\.\.\.*done." \
+ "$test (re-read)"
+ }
+ -re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $" {
+ pass "$test"
+ }
+ }
+
+ set test "$threadtype: attach1 to stopped, after setting file"
+ gdb_test_multiple "attach $testpid" "$test" {
+ -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*$gdb_prompt $" {
+ pass "$test"
+ }
+ }
+
+ # ".*sleep.*clone.*" would fail on s390x as bt stops at START_THREAD there.
+ if {[string equal $threadtype threaded]} {
+ gdb_test "thread apply all bt" ".*sleep.*start_thread.*" "$threadtype: attach1 to stopped bt"
+ } else {
+ gdb_test "bt" ".*sleep.*main.*" "$threadtype: attach1 to stopped bt"
+ }
+
+ # Exit and detach the process.
+
+ gdb_exit
+
+ # Avoid some race:
+ sleep 2
+
+ if [catch {open /proc/${testpid}/status r} fileid] {
+ set line2 "NOTFOUND"
+ } else {
+ gets $fileid line1;
+ gets $fileid line2;
+ close $fileid;
+ }
+
+ set test "$threadtype: attach1, exit leaves process stopped"
+ if {[string match "*(stopped)*" $line2]} {
+ pass $test
+ } else {
+ fail $test
+ }
+
+ # At this point, the process should still be stopped
+
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+
+ # Verify that we can attach to the process just by giving the
+ # process ID.
set test "$threadtype: attach2 to stopped, after setting file"
gdb_test_multiple "attach $testpid" "$test" {
--
2.14.3

View File

@ -3,19 +3,13 @@ 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)
@@ -1104,6 +1104,8 @@ value_assign (struct value *toval, struct value *fromval)
struct gdbarch *gdbarch;
int value_reg;
@ -24,7 +18,7 @@ index 9b25980090..7aacd17d70 100644
/* Figure out which frame this is in currently.
We use VALUE_FRAME_ID for obtaining the value's frame id instead of
@@ -1112,8 +1114,14 @@ value_assign (struct value *toval, struct value *fromval)
@@ -1113,8 +1115,14 @@ value_assign (struct value *toval, struct value *fromval)
frame. */
frame = frame_find_by_id (VALUE_FRAME_ID (toval));
@ -41,6 +35,3 @@ index 9b25980090..7aacd17d70 100644
if (!frame)
error (_("Value being assigned to is no longer active."));
--
2.14.3

View File

@ -3,19 +3,12 @@ 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
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 @@
@ -155,7 +148,6 @@ index 522b24671d..7079317d3a 100644
+ assert (0);
}
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 @@
@ -187,6 +179,3 @@ index 77c8a7dc85..8c43162b36 100644
gdb_test_multiple {} "Program exited" {
-re "\r\n\\\[Inferior .* exited normally\\\]\r\n$gdb_prompt $" {
--
2.14.3

View File

@ -3,24 +3,13 @@ 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
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 @@
@ -354,7 +343,6 @@ index 0000000000..442c4d00a1
+ .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 @@
@ -386,7 +374,6 @@ index 0000000000..57386999ce
+}
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 @@
@ -492,6 +479,3 @@ index 0000000000..30d0473336
+
+# `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

View File

@ -3,8 +3,6 @@ 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 .
@ -14,15 +12,8 @@ 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(+)
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);
@ -37,10 +28,9 @@ index 0c156d56c3..9a7f4d52b0 100644
/* Helper for the QUIT macro. */
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)
@@ -820,6 +820,11 @@ check_quit_flag (void)
int i, result = 0;
const struct extension_language_defn *extlang;
@ -53,11 +43,10 @@ index a1ee3510a6..229d702270 100644
{
if (extlang->ops->check_quit_flag != NULL)
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;
@@ -1606,7 +1606,13 @@ quit_force (int *exit_arg, int from_tty)
qt.from_tty = from_tty;
+#ifndef NEED_DETACH_SIGSTOP
@ -71,10 +60,9 @@ index 4749cf561d..e2665c8e22 100644
/* Get out of tfind mode, and kill or detach all inferiors. */
TRY
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;
@@ -108,6 +108,13 @@ static std::chrono::steady_clock::duration prompt_for_continue_wait_time;
static int debug_timestamp = 0;
@ -88,6 +76,3 @@ index 6f0abc98a2..58c0380d17 100644
/* 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

View File

@ -3,26 +3,17 @@ 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,
@@ -1462,6 +1462,7 @@ sparc32_store_return_value (struct type *type, struct regcache *regcache,
if (sparc_floating_p (type) || sparc_complex_floating_p (type))
{
/* Floating return values. */
+ len = (len <= 8) ? len : 8;
memcpy (buf, valbuf, len);
regcache_cooked_write (regcache, SPARC_F0_REGNUM, buf);
regcache->cooked_write (SPARC_F0_REGNUM, buf);
if (len > 4)
--
2.14.3

View File

@ -3,24 +3,15 @@ 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
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 @@
@ -57,7 +48,6 @@ index 0000000000..d4ec581946
+}
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 @@
@ -98,6 +88,3 @@ index 0000000000..31d5b602aa
+
+gdb_test "watch i if i < 20" "atchpoint \[0-9\]+: i"
+gdb_test "cont" "atchpoint \[0-9\]+: i.*Old value = 20.*New value = 19.*"
--
2.14.3

View File

@ -3,8 +3,6 @@ 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.
@ -17,12 +15,8 @@ FileName: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
;; 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 @@
@ -72,6 +66,3 @@ index 80ddd427af..3e4d3e4444 100644
/* Handle compressed sections, or ordinary uncompressed sections in
the no-mmap case. */
--
2.14.3

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9cdcfe72c9af064d3becce06047bbfd7446fa49812db01ef4d5caa97b4dfa082
size 28966596

3
gdb-8.2.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dee9c5028f1fbe1415556e0f64a79d1f9a261516857af37ed6105f0b53999772
size 29034948

View File

@ -3,23 +3,14 @@ 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
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 @@
@ -50,7 +41,6 @@ index 0000000000..48fd63e9d3
+}
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 @@
@ -105,6 +95,3 @@ index 0000000000..c85dd0129d
+
+# `info inferiors' can show <null> on older GDBs.
+gdb_test "info threads" "info threads" "program finished"
--
2.14.3

View File

@ -3,20 +3,12 @@ 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)
@@ -15522,6 +15522,50 @@ initialize_breakpoint_ops (void)
static struct cmd_list_element *enablebreaklist = NULL;
@ -68,10 +60,9 @@ index 2b5eebbbee..814802a0a1 100644
_initialize_breakpoint (void)
{
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);
@@ -1679,6 +1679,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);
@ -82,10 +73,9 @@ index 8bb81d8d17..3fddbaa713 100644
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,
@@ -883,6 +883,11 @@ objfile_relocate1 (struct objfile *objfile,
obj_section_addr (s));
}
@ -97,6 +87,3 @@ index 7adaef119d..2f061b47f7 100644
/* Data changed. */
return 1;
}
--
2.14.3

View File

@ -3,19 +3,12 @@ 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
@@ -505,6 +505,7 @@ enum field_loc_kind
{
FIELD_LOC_KIND_BITPOS, /**< bitpos */
FIELD_LOC_KIND_ENUMVAL, /**< enumval */
@ -23,7 +16,7 @@ index 179238ce82..5597038357 100644
FIELD_LOC_KIND_PHYSADDR, /**< physaddr */
FIELD_LOC_KIND_PHYSNAME, /**< physname */
FIELD_LOC_KIND_DWARF_BLOCK /**< dwarf_block */
@@ -504,6 +505,7 @@ union field_location
@@ -556,6 +557,7 @@ union field_location
field. Otherwise, physname is the mangled label of the
static field. */
@ -31,7 +24,7 @@ index 179238ce82..5597038357 100644
CORE_ADDR physaddr;
const char *physname;
@@ -1362,6 +1364,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *);
@@ -1438,6 +1440,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)
@ -39,7 +32,7 @@ index 179238ce82..5597038357 100644
#define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
#define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block)
#define SET_FIELD_BITPOS(thisfld, bitpos) \
@@ -1373,6 +1376,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *);
@@ -1449,6 +1452,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))
@ -47,7 +40,7 @@ index 179238ce82..5597038357 100644
#define SET_FIELD_PHYSADDR(thisfld, addr) \
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \
FIELD_STATIC_PHYSADDR (thisfld) = (addr))
@@ -1389,6 +1393,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *);
@@ -1465,6 +1469,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))
@ -56,10 +49,9 @@ index 179238ce82..5597038357 100644
#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))
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)
@@ -2829,7 +2829,8 @@ value_static_field (struct type *type, int fieldno)
{
case FIELD_LOC_KIND_PHYSADDR:
retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno),
@ -69,6 +61,3 @@ index d4b4673f66..558d0bbd7a 100644
break;
case FIELD_LOC_KIND_PHYSNAME:
{
--
2.14.3

View File

@ -3,101 +3,9 @@ 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" {
@ -114,7 +22,6 @@ index 3e614b788a..0ae87786db 100644
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 @@
@ -478,7 +385,6 @@ index 0000000000..3a983e6b22
+ .section .note.GNU-stack,"",@progbits
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 @@
@ -529,7 +435,6 @@ index 0000000000..98ee43bbf2
+#endif
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 @@
@ -600,7 +505,6 @@ index 0000000000..3e2e64a6ab
+gdb_test "ptype array" "type = char \\\[78\\\]" "second: ptype array"
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 @@
@ -1061,7 +965,6 @@ index 0000000000..66f7a399bf
+ .section .note.GNU-stack,"",@progbits
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 @@
@ -1112,7 +1015,6 @@ index 0000000000..40099e9d39
+#endif
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 @@
@ -1181,7 +1083,6 @@ index 0000000000..4ef6214629
+
+gdb_test "ptype array" "type = char \\\[78\\\]" "second: ptype array"
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 @@
@ -1199,7 +1100,6 @@ index 5a0d01d04f..9e4b16e902 100644
main (void)
{
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" \
@ -1218,7 +1118,6 @@ index 91eb3c6056..af29a51f23 100644
+}
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 @@
@ -1244,7 +1143,6 @@ index 0000000000..eeb7b8501c
+} staticstruct = { 1 };
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 @@
@ -1276,7 +1174,6 @@ index 0000000000..33c9e94eee
+gdb_test {p $varstruct.field} " = 1"
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 @@
@ -1313,7 +1210,6 @@ index 0000000000..5750f68b3d
+}
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 @@
@ -1357,7 +1253,6 @@ index 0000000000..47736c7625
+gdb_test "bt full" "\r\n +s = \"X\\\\000\"\r\n.*"
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 @@
@ -1393,7 +1288,6 @@ index 0000000000..c5d5ee0bb9
+}
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 @@
@ -1508,7 +1402,6 @@ index 0000000000..43a5825979
+verbose -log "kb_found in bt after abort() = [expr [memory_v_pages_get] * $pagesize / 1024]"
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 @@
@ -1569,7 +1462,6 @@ index 0000000000..e1f3ed1780
+}
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 @@
@ -1637,7 +1529,6 @@ index 0000000000..71fe637272
+gdb_test "p temp3" " = '3' <repeats 48 times>" "second: print temp3"
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 @@
@ -1823,7 +1714,6 @@ index 0000000000..783c9622a8
+
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 @@
@ -2011,7 +1901,6 @@ index 0000000000..ef40424402
+ "advance-over-throw"
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 @@
@ -2263,7 +2152,6 @@ index 0000000000..aac3baad8a
+ .string "unsigned int"
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 @@
@ -2335,7 +2223,6 @@ index 0000000000..39e69b470f
+gdb_test "ptype reg_string" {type = char \[-?[0-9]+\]}
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 @@
@ -2383,7 +2270,6 @@ index 0000000000..1f02d90eeb
+}
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 @@
@ -2468,7 +2354,6 @@ index 0000000000..9336e03157
+ "step"
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 @@
@ -2557,7 +2442,6 @@ index 0000000000..5fcdd84986
+ .byte 0x0 /* Terminator */
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 @@
@ -2600,7 +2484,6 @@ index 0000000000..bc35209fe5
+gdb_test "ptype struct some_struct" "type = struct some_struct {\[\r\n \t\]*void field;\[\r\n \t\]*}"
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 @@
@ -2727,7 +2610,6 @@ index 0000000000..9dbbf3c3e1
+ .byte 0x0 /* Terminator */
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 @@
@ -2772,7 +2654,6 @@ index 0000000000..cec673cd39
+gdb_test "p notype_string" " = 'x' <repeats 129 times>"
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 @@
@ -2820,7 +2701,6 @@ index 0000000000..d7b8bea8db
+gdb_test "p c40pt(2)" " = '1-hello.*"
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 @@
@ -2866,7 +2746,6 @@ index 0000000000..e492b3af42
+end program repro
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 @@
@ -3026,7 +2905,6 @@ index 0000000000..37d435f799
+gdb_test "p vart(2,9)" "\\$\[0-9\]* = 10"
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 @@
@ -3130,7 +3008,6 @@ index 0000000000..0f43564378
+end
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 @@
@ -3195,7 +3072,6 @@ index 0000000000..1b7c0dbf73
+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"
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 @@
@ -3238,7 +3114,6 @@ index 0000000000..226dc5d0ff
+end
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 @@
@ -3316,7 +3191,6 @@ index 0000000000..c121ab9751
+gdb_test {p $a (3, 2:2)} { = \(23\)}
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 @@
@ -3350,7 +3224,6 @@ index 0000000000..4747ea9746
+end
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 @@
@ -3382,7 +3255,6 @@ index 0000000000..ebced3c042
+}
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 @@
@ -3445,7 +3317,6 @@ index 0000000000..88326c0390
+mi_gdb_test "-var-update *" "\\^done,changelist=.*" "-var-update *"
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 @@
@ -3473,7 +3344,6 @@ index 0000000000..729f457c82
+}
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 @@
@ -3507,7 +3377,6 @@ index 0000000000..3090e7e631
+}
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 @@
@ -3546,7 +3415,6 @@ index 0000000000..f2de718bc3
+gdb_test "p arr\[0\]" "\\$\[0-9\]+ = 42"
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 @@
@ -3591,7 +3459,6 @@ index 0000000000..90a2bdf212
+gdb_test "p s" "\\$\[0-9\]* = 'foo'"
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 @@
@ -3625,7 +3492,6 @@ index 0000000000..e48d520085
+ end
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 @@
@ -3735,7 +3601,6 @@ index 0000000000..22acdb86d8
+
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 @@
@ -3822,10 +3687,9 @@ index 0000000000..295602d68c
+ writeln(s); { set breakpoint 2 here }
+end.
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 {} {
@@ -170,6 +170,11 @@ proc gdb_unload {} {
send_gdb "y\n"
exp_continue
}
@ -3838,7 +3702,6 @@ index a165bf0938..a13aaf7869 100644
send_gdb "y\n"
exp_continue
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 {} {
@ -3872,6 +3735,3 @@ index 03d1b1bc06..9f9e143dff 100644
}
set pascal_init_done 1
}
--
2.14.3

View File

@ -3,8 +3,6 @@ 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
@ -15,33 +13,11 @@ 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/gdb/Makefile.in b/gdb/Makefile.in
index 3142ad6af1..28d8664236 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -2110,6 +2110,12 @@ stamp-h: $(srcdir)/config.in config.status
@@ -2112,6 +2112,12 @@ stamp-h: $(srcdir)/config.in config.status
CONFIG_LINKS= \
$(SHELL) config.status
@ -51,23 +27,21 @@ index 3142ad6af1..28d8664236 100644
+ CONFIG_HEADERS= \
+ $(SHELL) config.status
+
config.status: $(srcdir)/configure configure.tgt configure.host ../bfd/development.sh
config.status: $(srcdir)/configure configure.nat configure.tgt configure.host ../bfd/development.sh
$(SHELL) config.status --recheck
diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in
index 5c7c0b4c2e..2014607e9e 100644
--- a/gdb/data-directory/Makefile.in
+++ b/gdb/data-directory/Makefile.in
@@ -80,6 +80,8 @@ PYTHON_FILE_LIST = \
@@ -80,6 +80,7 @@ PYTHON_FILE_LIST = \
gdb/unwinder.py \
gdb/xmethod.py \
gdb/command/__init__.py \
+ gdb/command/ignore_errors.py \
+ gdb/command/pahole.py \
gdb/command/explore.py \
gdb/command/backtrace.py \
gdb/command/frame_filters.py \
@@ -92,6 +94,8 @@ PYTHON_FILE_LIST = \
@@ -92,6 +93,8 @@ PYTHON_FILE_LIST = \
gdb/function/as_string.py \
gdb/function/caller_is.py \
gdb/function/strfns.py \
@ -77,7 +51,6 @@ index 5c7c0b4c2e..2014607e9e 100644
gdb/printer/bound_registers.py
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 7b99ae1551..dea17fd5a7 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -1245,6 +1245,16 @@ for remote debugging.
@ -98,7 +71,6 @@ index 7b99ae1551..dea17fd5a7 100644
@item -tui
@cindex @code{--tui}
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index ccf011e35e..461e900f77 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -88,8 +88,6 @@ containing @code{end}. For example:
@ -111,7 +83,6 @@ index ccf011e35e..461e900f77 100644
>end
23
diff --git a/gdb/gdb-gdb.gdb.in b/gdb/gdb-gdb.gdb.in
index 05a38b2670..9801fdff67 100644
--- a/gdb/gdb-gdb.gdb.in
+++ b/gdb/gdb-gdb.gdb.in
@@ -1,5 +1,15 @@
@ -131,7 +102,6 @@ index 05a38b2670..9801fdff67 100644
set variable $gdb_init_done = 1
diff --git a/gdb/main.c b/gdb/main.c
index b079e79c93..b150af4e70 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -33,6 +33,7 @@
@ -142,7 +112,7 @@ index b079e79c93..b150af4e70 100644
#include "source.h"
#include "cli/cli-cmds.h"
#include "objfiles.h"
@@ -478,7 +479,7 @@ exec_or_core_file_attach (const char *filename, int from_tty)
@@ -479,7 +480,7 @@ exec_or_core_file_attach (const char *filename, int from_tty)
}
static void
@ -151,7 +121,7 @@ index b079e79c93..b150af4e70 100644
{
int argc = context->argc;
char **argv = context->argv;
@@ -694,10 +695,14 @@ captured_main_1 (struct captured_main_args *context)
@@ -695,10 +696,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},
@ -167,7 +137,7 @@ index b079e79c93..b150af4e70 100644
{
int option_index;
@@ -715,6 +720,9 @@ captured_main_1 (struct captured_main_args *context)
@@ -716,6 +721,9 @@ captured_main_1 (struct captured_main_args *context)
case 0:
/* Long option that just sets a flag. */
break;
@ -177,7 +147,7 @@ index b079e79c93..b150af4e70 100644
case OPT_SE:
symarg = optarg;
execarg = optarg;
@@ -889,7 +897,31 @@ captured_main_1 (struct captured_main_args *context)
@@ -890,7 +898,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. */
@ -210,7 +180,7 @@ index b079e79c93..b150af4e70 100644
{
/* The remaining options are the command-line options for the
inferior. The first one is the sym/exec file, and the rest
@@ -1179,7 +1211,8 @@ captured_main_1 (struct captured_main_args *context)
@@ -1180,7 +1212,8 @@ captured_main_1 (struct captured_main_args *context)
/* Read in the old history after all the command files have been
read. */
@ -220,7 +190,7 @@ index b079e79c93..b150af4e70 100644
if (batch_flag)
{
@@ -1192,24 +1225,37 @@ static void
@@ -1193,24 +1226,37 @@ static void
captured_main (void *data)
{
struct captured_main_args *context = (struct captured_main_args *) data;
@ -271,7 +241,7 @@ index b079e79c93..b150af4e70 100644
}
/* No exit -- exit is through quit_command. */
}
@@ -1252,6 +1298,12 @@ print_gdb_help (struct ui_file *stream)
@@ -1253,6 +1299,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\
@ -284,7 +254,7 @@ index b079e79c93..b150af4e70 100644
gdb [options] --args executable-file [inferior-arguments ...]\n\n\
"), stream);
fputs_unfiltered (_("\
@@ -1297,6 +1349,13 @@ Output and user interface control:\n\n\
@@ -1298,6 +1350,13 @@ Output and user interface control:\n\n\
#endif
fputs_unfiltered (_("\
--dbx DBX compatibility mode.\n\
@ -300,7 +270,6 @@ index b079e79c93..b150af4e70 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 0000000000..6fa48ff081
--- /dev/null
+++ b/gdb/python/lib/gdb/command/ignore_errors.py
@@ -0,0 +1,37 @@
@ -341,96 +310,8 @@ index 0000000000..6fa48ff081
+ pass
+
+IgnoreErrorsCommand ()
diff --git a/gdb/python/lib/gdb/command/pahole.py b/gdb/python/lib/gdb/command/pahole.py
new file mode 100644
index 0000000000..e08eaf5ca8
--- /dev/null
+++ b/gdb/python/lib/gdb/command/pahole.py
@@ -0,0 +1,81 @@
+# pahole command for gdb
+
+# Copyright (C) 2008, 2009, 2012 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/>.
+
+import gdb
+
+class Pahole (gdb.Command):
+ """Show the holes in a structure.
+This command takes a single argument, a type name.
+It prints the type and displays comments showing where holes are."""
+
+ def __init__ (self):
+ super (Pahole, self).__init__ ("pahole", gdb.COMMAND_NONE,
+ gdb.COMPLETE_SYMBOL)
+
+ def maybe_print_hole(self, bitpos, field_bitpos):
+ if bitpos != field_bitpos:
+ hole = field_bitpos - bitpos
+ print (' /* XXX %d bit hole, try to pack */' % hole)
+
+ def pahole (self, type, level, name):
+ if name is None:
+ name = ''
+ tag = type.tag
+ if tag is None:
+ tag = ''
+ print ('%sstruct %s {' % (' ' * (2 * level), tag))
+ bitpos = 0
+ for field in type.fields ():
+ # Skip static fields.
+ if not hasattr (field, ('bitpos')):
+ continue
+
+ ftype = field.type.strip_typedefs()
+
+ self.maybe_print_hole(bitpos, field.bitpos)
+ bitpos = field.bitpos
+ if field.bitsize > 0:
+ fieldsize = field.bitsize
+ else:
+ # TARGET_CHAR_BIT here...
+ fieldsize = 8 * ftype.sizeof
+
+ # TARGET_CHAR_BIT
+ print (' /* %3d %3d */' % (int (bitpos / 8), int (fieldsize / 8)), end = "")
+ bitpos = bitpos + fieldsize
+
+ if ftype.code == gdb.TYPE_CODE_STRUCT:
+ self.pahole (ftype, level + 1, field.name)
+ else:
+ print (' ' * (2 + 2 * level), end = "")
+ print ('%s %s' % (str (ftype), field.name))
+
+ if level == 0:
+ self.maybe_print_hole(bitpos, 8 * type.sizeof)
+
+ print (' ' * (14 + 2 * level), end = "")
+ print ('} %s' % name)
+
+ def invoke (self, arg, from_tty):
+ type = gdb.lookup_type (arg)
+ type = type.strip_typedefs ()
+ if type.code != gdb.TYPE_CODE_STRUCT:
+ raise (TypeError, '%s is not a struct type' % arg)
+ print (' ' * 14, end = "")
+ self.pahole (type, 0, '')
+
+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 0000000000..8742680614
--- /dev/null
+++ b/gdb/python/lib/gdb/function/in_scope.py
@@ -0,0 +1,47 @@
@ -482,10 +363,9 @@ index 0000000000..8742680614
+
+InScope ()
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
index 89bbc6987b..69dbb69c06 100644
--- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h
@@ -657,6 +657,9 @@ class gdbpy_enter_varobj : public gdbpy_enter
@@ -644,6 +644,9 @@ class gdbpy_enter_varobj : public gdbpy_enter
};
@ -496,7 +376,6 @@ index 89bbc6987b..69dbb69c06 100644
extern const struct language_defn *python_language;
diff --git a/gdb/python/python.c b/gdb/python/python.c
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 =
@ -508,7 +387,7 @@ index 610dda828c..de5ffbd70b 100644
#include "target.h"
#include "gdbthread.h"
#include "interps.h"
@@ -242,6 +244,29 @@ gdbpy_enter::~gdbpy_enter ()
@@ -237,6 +239,29 @@ gdbpy_enter::~gdbpy_enter ()
restore_active_ext_lang (m_previous_active);
}
@ -538,7 +417,7 @@ index 610dda828c..de5ffbd70b 100644
/* Set the quit flag. */
static void
@@ -1356,6 +1381,92 @@ gdbpy_print_stack (void)
@@ -1367,6 +1392,92 @@ gdbpy_print_stack (void)
/* Return the current Progspace.
There always is one. */
@ -631,7 +510,7 @@ index 610dda828c..de5ffbd70b 100644
static PyObject *
gdbpy_get_current_progspace (PyObject *unused1, PyObject *unused2)
@@ -2034,6 +2145,8 @@ PyMethodDef python_GdbMethods[] =
@@ -2057,6 +2168,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." },
@ -641,7 +520,6 @@ index 610dda828c..de5ffbd70b 100644
"Return a gdb parameter's value" },
diff --git a/gdb/python/python.h b/gdb/python/python.h
index de58fd81df..237a84a0b2 100644
--- a/gdb/python/python.h
+++ b/gdb/python/python.h
@@ -25,4 +25,6 @@
@ -652,7 +530,6 @@ index de58fd81df..237a84a0b2 100644
+
#endif /* GDB_PYTHON_H */
diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp
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
@ -665,7 +542,6 @@ index f186fa9578..0327284226 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 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 {} {
@ -693,10 +569,9 @@ index eb82a7776f..3069a5c6d7 100644
# Test either C or C++ values.
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 01dabef37c..c198731d0b 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -217,6 +217,14 @@ is_root_p (const struct varobj *var)
@@ -218,6 +218,14 @@ is_root_p (const struct varobj *var)
}
#ifdef HAVE_PYTHON
@ -712,10 +587,9 @@ index 01dabef37c..c198731d0b 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 6e80d1b89e..677547996f 100644
--- a/gdb/varobj.h
+++ b/gdb/varobj.h
@@ -327,6 +327,8 @@ extern bool varobj_has_more (const struct varobj *var, int to);
@@ -328,6 +328,8 @@ extern bool varobj_has_more (const struct varobj *var, int to);
extern bool varobj_is_dynamic_p (const struct varobj *var);
@ -724,6 +598,3 @@ index 6e80d1b89e..677547996f 100644
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

View File

@ -1,9 +1,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: attach-fail-reasons: SELinux deny_ptrace
FileName: gdb-attach-fail-reasons-5of5.patch
Subject: gdb-attach-fail-reasons-5of5.patch
;; Print reasons for failed attach/spawn incl. SELinux deny_ptrace (BZ 786878).
;;=push+jan
@ -43,24 +41,11 @@ 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(-)
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 @@
@@ -276,6 +276,9 @@
/* Define if librpm library is being used. */
#undef HAVE_LIBRPM
@ -70,7 +55,7 @@ index edd7028f76..4de3e842d1 100644
/* Define to 1 if you have the <libunwind-ia64.h> header file. */
#undef HAVE_LIBUNWIND_IA64_H
@@ -393,6 +396,9 @@
@@ -399,6 +402,9 @@
/* Define to 1 if you have the `scm_new_smob' function. */
#undef HAVE_SCM_NEW_SMOB
@ -81,10 +66,9 @@ index edd7028f76..4de3e842d1 100644
#undef HAVE_SETLOCALE
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
@@ -15854,6 +15854,64 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
@ -150,10 +134,9 @@ index 1cecdbc3b5..904cc453ad 100755
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
# except that the argument to --with-sysroot is optional.
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
@@ -2054,6 +2054,10 @@ case $host_os in
esac
AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.])
@ -165,7 +148,6 @@ index e232c1adcb..1557760ed8 100644
# 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 @@
@ -189,10 +171,9 @@ index dda7c1f150..b2a34b92ce 100644
#undef HAVE_SETNS
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
@@ -8535,6 +8535,64 @@ if $want_ipa ; then
fi
fi
@ -258,10 +239,9 @@ index 340ca7a19e..6d7c9b2326 100755
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
@@ -486,6 +486,10 @@ if $want_ipa ; then
fi
fi
@ -273,25 +253,19 @@ index 6727959e61..7c0f508275 100644
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 ()
@@ -967,7 +967,16 @@ 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 (linux_ptrace_create_warnings ());
+
+ std::string msg
+ = string_printf (_("%sCannot trace created process"),
+ buffer_finish (&buffer));
+ msg += _("Cannot trace created process");
+
+ errno = save_errno;
+ trace_start_error_with_name (msg.c_str ());
@ -300,45 +274,31 @@ index cfb2b56a08..0faac80625 100644
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,
@@ -1089,7 +1089,17 @@ linux_nat_target::create_inferior (const char *exec_file,
/* Make sure we report all signals during startup. */
linux_nat_pass_signals (ops, 0, NULL);
pass_signals (0, NULL);
- linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
+ volatile struct gdb_exception ex;
- inf_ptrace_target::create_inferior (exec_file, allargs, env, from_tty);
+ TRY
+ {
+ linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
+ inf_ptrace_target::create_inferior (exec_file, allargs, env, from_tty);
+ }
+ CATCH (ex, RETURN_MASK_ERROR)
+ {
+ struct buffer buffer;
+ char *message, *buffer_s;
+ std::string result = linux_ptrace_create_warnings ();
+
+ 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);
+ throw_error (ex.error, "%s%s", result.c_str (), ex.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 @@
@@ -25,6 +25,10 @@
#include <sys/procfs.h>
#endif
@ -349,50 +309,49 @@ index ac6ba72390..be51e2449b 100644
/* 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);
@@ -50,6 +54,8 @@ linux_ptrace_attach_fail_reason (pid_t pid)
"terminated"),
(int) pid);
+ result += linux_ptrace_create_warnings ();
+
+ linux_ptrace_create_warnings (buffer);
return result;
}
/* See linux-ptrace.h. */
@@ -594,6 +600,22 @@ linux_ptrace_init_warnings (void)
@@ -583,6 +589,25 @@ 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)
+std::string
+linux_ptrace_create_warnings ()
+{
+ std::string result;
+
+#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"));
+ string_appendf (result,
+ _("the SELinux boolean 'deny_ptrace' is enabled, "
+ "you can disable this process attach protection by: "
+ "(gdb) shell sudo setsebool deny_ptrace=0\n"));
+#endif /* HAVE_LIBSELINUX */
+ return result;
+}
+
/* 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);
@@ -184,6 +184,7 @@ extern std::string linux_ptrace_attach_fail_reason (pid_t pid);
extern std::string 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 std::string linux_ptrace_create_warnings ();
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

View File

@ -3,8 +3,6 @@ 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
@ -12,15 +10,11 @@ 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(-)
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,
@@ -1151,6 +1151,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
htab_eq_pointer,
NULL));
@ -28,23 +22,24 @@ index e887849c36..a8e4f49eb5 100644
while (true)
{
gdbpy_ref<> item (PyIter_Next (iterable.get ()));
@@ -1397,7 +1398,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
@@ -1159,8 +1160,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
{
if (PyErr_Occurred ())
{
gdbpy_print_stack ();
- throw_quit_or_print_exception ();
- return EXT_LANG_BT_ERROR;
+ gdbpy_print_stack ();
+ return count_printed > 0 ? EXT_LANG_BT_ERROR : EXT_LANG_BT_NO_FILTERS;
}
break;
}
@@ -1409,6 +1410,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
@@ -1193,7 +1194,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
/* Do not exit on error printing a single frame. Print the
error and continue with other frames. */
if (success == EXT_LANG_BT_ERROR)
gdbpy_print_stack ();
- throw_quit_or_print_exception ();
+ gdbpy_print_stack ();
+ count_printed++;
}
return success;
--
2.14.3

View File

@ -1,9 +1,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: Never kill PID on: gdb exec PID
FileName: gdb-bz1219747-attach-kills.patch
Subject: gdb-bz1219747-attach-kills.patch
;; Never kill PID on: gdb exec PID (Jan Kratochvil, RH BZ 1219747).
;;=push+jan
@ -78,19 +76,11 @@ gdb/testsuite/ChangeLog
* gdb.base/attach-kills.c: New.
* gdb.base/attach-kills.exp: New.
---
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 17d35f4a8a..b079e79c93 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -1114,7 +1114,10 @@ captured_main_1 (struct captured_main_args *context)
@@ -1115,7 +1115,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,
@ -104,7 +94,6 @@ index 17d35f4a8a..b079e79c93 100644
}
diff --git a/gdb/testsuite/gdb.base/attach-kills.c b/gdb/testsuite/gdb.base/attach-kills.c
new file mode 100644
index 0000000000..2398f00442
--- /dev/null
+++ b/gdb/testsuite/gdb.base/attach-kills.c
@@ -0,0 +1,25 @@
@ -135,7 +124,6 @@ index 0000000000..2398f00442
+}
diff --git a/gdb/testsuite/gdb.base/attach-kills.exp b/gdb/testsuite/gdb.base/attach-kills.exp
new file mode 100644
index 0000000000..9a93cb7584
--- /dev/null
+++ b/gdb/testsuite/gdb.base/attach-kills.exp
@@ -0,0 +1,49 @@
@ -188,6 +176,3 @@ index 0000000000..9a93cb7584
+}
+
+kill_wait_spawned_process $test_spawn_id
--
2.14.3

View File

@ -3,8 +3,6 @@ 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.
@ -28,19 +26,11 @@ 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
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)
@@ -6695,6 +6695,16 @@ process_event_stop_test (struct execution_control_state *ecs)
if (ecs->event_thread->control.step_over_calls == STEP_OVER_ALL)
{
@ -57,7 +47,7 @@ index 1d0f731954..dcf022bd50 100644
/* We're doing a "next".
Normal (forward) execution: set a breakpoint at the
@@ -6723,6 +6733,7 @@ process_event_stop_test (struct execution_control_state *ecs)
@@ -6728,6 +6738,7 @@ process_event_stop_test (struct execution_control_state *ecs)
keep_going (ecs);
return;
@ -67,7 +57,6 @@ index 1d0f731954..dcf022bd50 100644
/* If we are in a function call trampoline (a stub between the
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 @@
@ -104,7 +93,6 @@ index 0000000000..66440a7507
+gdb_continue_to_breakpoint "success" ".*success.*"
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 @@
@ -140,6 +128,3 @@ index 0000000000..a0cfb37014
+ end do
+ print *, "success"
+ end
--
2.14.3

View File

@ -3,28 +3,14 @@ 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,
@@ -8807,7 +8807,7 @@ init_breakpoint_sal (struct breakpoint *b, struct gdbarch *gdbarch,
int enabled, int internal, unsigned flags,
int display_canonical)
{
@ -33,7 +19,7 @@ index 814802a0a1..5a99de75e1 100644
if (type == bp_hardware_breakpoint)
{
@@ -14425,7 +14425,7 @@ enable_breakpoint_disp (struct breakpoint *bpt, enum bpdisp disposition,
@@ -14356,7 +14356,7 @@ enable_breakpoint_disp (struct breakpoint *bpt, enum bpdisp disposition,
if (bpt->type == bp_hardware_breakpoint)
{
@ -44,7 +30,6 @@ index 814802a0a1..5a99de75e1 100644
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 @@
@ -78,7 +63,6 @@ index 0000000000..38e94baab1
+#endif /* NM_LINUX64_H */
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 @@
@ -111,10 +95,9 @@ index 0000000000..212daba477
+
+#endif /* NM_LINUX64_H */
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
@@ -238,6 +238,7 @@ case ${gdb_host} in
;;
i386)
# Host: Intel 386 running GNU/Linux.
@ -122,7 +105,7 @@ index 8e14892722..6dbb072054 100644
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
@@ -290,6 +291,7 @@ case ${gdb_host} in
case ${gdb_host_cpu} in
i386)
# Host: GNU/Linux x86-64
@ -131,16 +114,15 @@ index 8e14892722..6dbb072054 100644
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
@@ -1953,9 +1953,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. */
+#ifndef target_can_use_hardware_watchpoint
#define target_can_use_hardware_watchpoint(TYPE,CNT,OTHERTYPE) \
(*current_target.to_can_use_hw_breakpoint) (&current_target, \
(current_top_target ()->can_use_hw_breakpoint) ( \
TYPE, CNT, OTHERTYPE)
+#endif
@ -148,7 +130,6 @@ index 4781fbc59c..e3a2882fe5 100644
memory region, or zero if not supported. */
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 @@
@ -192,6 +173,3 @@ index 0000000000..4ce9997e4a
+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.*"
--
2.14.3

View File

@ -1,9 +1,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: nomem: internal_error -> error
FileName: gdb-bz568248-oom-is-error.patch
Subject: 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.
@ -51,15 +49,11 @@ gdb/
Tom Tromey <tromey@redhat.com>
* utils.c (nomem): Change internal_error to error.
---
gdb/utils.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
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)
@@ -746,13 +746,11 @@ malloc_failure (long size)
{
if (size > 0)
{
@ -75,6 +69,3 @@ index c531748fe4..0066bfcc4b 100644
}
}
--
2.14.3

View File

@ -3,22 +3,11 @@ 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 @@
@ -191,7 +180,6 @@ index 0000000000..48b1bbf3e1
+ .section .note.GNU-stack,"",@progbits
diff --git a/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c
new file mode 100644
index 0000000000..46fcd120f4
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c
@@ -0,0 +1,22 @@
@ -219,7 +207,6 @@ index 0000000000..46fcd120f4
+}
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 @@
@ -265,6 +252,3 @@ index 0000000000..a728f9c5ed
+clean_restart $executable
+
+gdb_test "ptype main" {type = int \(void\)}
--
2.14.3

View File

@ -3,22 +3,15 @@ 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 @@
@ -46,6 +39,3 @@ index 0000000000..c0451cf09e
+if { [skip_python_tests] } { continue }
+
+gdb_test "python print gdb.solib_name(-1)" "None" "gdb.solib_name exists"
--
2.14.3

View File

@ -3,16 +3,10 @@ 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
@@ -25,6 +25,14 @@ if { [test_compiler_info "gcc-*"] || [test_compiler_info "clang-*"] } {
@ -30,6 +24,3 @@ index 27dc991ce9..a3b9458b44 100644
# 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

View File

@ -3,19 +3,13 @@ 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)
@@ -13909,7 +13909,17 @@ remote_target::pid_to_exec_file (int pid)
char *annex = NULL;
if (packet_support (PACKET_qXfer_exec_file) != PACKET_ENABLE)
@ -34,6 +28,3 @@ index 86777f1e5e..fc003c0736 100644
inf = find_inferior_pid (pid);
if (inf == NULL)
--
2.14.3

View File

@ -3,8 +3,6 @@ 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@.*>
@ -17,12 +15,8 @@ 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(-)
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"
@ -62,6 +56,3 @@ index 20c1d47a03..893efe0b2d 100644
+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

View File

@ -3,24 +3,12 @@ From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-dts-rhel6-python-compat.patch
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 = \
@ -42,7 +30,6 @@ index 753e0b69a3..5c7c0b4c2e 100644
gdb/command/prompt.py \
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 @@
@ -170,7 +157,6 @@ index 0000000000..34ba4a2a12
+ return getattr (self.frame, name)
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 @@
@ -218,7 +204,6 @@ index 0000000000..06c893f239
+
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 @@
@ -328,6 +313,3 @@ index 0000000000..eeea9093e8
+ pair[1].describe (sys.stdout, full)
+
+FilteringBacktrace()
--
2.14.3

View File

@ -3,31 +3,24 @@ 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 --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
@@ -9393,6 +9393,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.
+ # Fedora: Force libncursesw over libncurses to match the includes.
{ $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 :
@@ -9262,7 +9263,7 @@ return waddstr ();
if ${ac_cv_search_waddstr+:} false; then :
@@ -9417,7 +9418,7 @@ return waddstr ();
return 0;
}
_ACEOF
@ -36,15 +29,15 @@ index 6fb5b5b509..db849572b5 100755
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -9336,6 +9337,7 @@ case $host_os in
@@ -9491,6 +9492,7 @@ case $host_os in
esac
# These are the libraries checked by Readline.
+# Fedora: Force libncursesw over libncurses to match the includes.
{ $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 :
@@ -9360,7 +9362,7 @@ return tgetent ();
if ${ac_cv_search_tgetent+:} false; then :
@@ -9515,7 +9517,7 @@ return tgetent ();
return 0;
}
_ACEOF
@ -54,10 +47,9 @@ index 6fb5b5b509..db849572b5 100755
ac_res="none required"
else
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
@@ -766,7 +766,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.
@ -67,7 +59,7 @@ index d891c7bccc..4412e25450 100644
if test "$ac_cv_search_waddstr" != no; then
curses_found=yes
@@ -797,7 +798,8 @@ case $host_os in
@@ -808,7 +809,8 @@ case $host_os in
esac
# These are the libraries checked by Readline.
@ -77,6 +69,3 @@ index d891c7bccc..4412e25450 100644
if test "$ac_cv_search_tgetent" = no; then
CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
--
2.14.3

View File

@ -1,68 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Paul Koning <paul_koning@dell.com>
Date: Fri, 8 Jun 2018 13:26:36 -0400
Subject: gdb-fix-python37-breakage.patch
FileName: gdb-fix-python37-breakage.patch
;; Fix build breakage with Python 3.7
;; RHBZ #1577396
Fix build issue with Python 3.7
Originally reported in
https://bugzilla.redhat.com/show_bug.cgi?id=1577396 -- gdb build fails
with Python 3.7 due to references to a Python internal function whose
declaration changed in 3.7.
gdb/ChangeLog
2018-06-08 Paul Koning <paul_koning@dell.com>
PR gdb/23252
* python/python.c (do_start_initialization):
Avoid call to internal Python API.
(init__gdb_module): New function.
diff --git a/gdb/python/python.c b/gdb/python/python.c
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -1810,6 +1810,17 @@ finalize_python (void *ignore)
restore_active_ext_lang (previous_active);
}
+#ifdef IS_PY3K
+/* This is called via the PyImport_AppendInittab mechanism called
+ during initialization, to make the built-in _gdb module known to
+ Python. */
+PyMODINIT_FUNC
+init__gdb_module (void)
+{
+ return PyModule_Create (&python_GdbModuleDef);
+}
+#endif
+
static bool
do_start_initialization ()
{
@@ -1850,6 +1861,9 @@ do_start_initialization ()
remain alive for the duration of the program's execution, so
it is not freed after this call. */
Py_SetProgramName (progname_copy);
+
+ /* Define _gdb as a built-in module. */
+ PyImport_AppendInittab ("_gdb", init__gdb_module);
#else
Py_SetProgramName (progname.release ());
#endif
@@ -1859,9 +1873,7 @@ do_start_initialization ()
PyEval_InitThreads ();
#ifdef IS_PY3K
- gdb_module = PyModule_Create (&python_GdbModuleDef);
- /* Add _gdb module to the list of known built-in modules. */
- _PyImport_FixupBuiltin (gdb_module, "_gdb");
+ gdb_module = PyImport_ImportModule ("_gdb");
#else
gdb_module = Py_InitModule ("_gdb", python_GdbMethods);
#endif

76
gdb-fix-s390-build.diff Normal file
View File

@ -0,0 +1,76 @@
Index: gdb-8.2/gdb/dwarf2read.c
===================================================================
--- gdb-8.2.orig/gdb/dwarf2read.c 2018-09-11 15:25:32.000000000 +0200
+++ gdb-8.2/gdb/dwarf2read.c 2018-09-12 15:44:50.000000000 +0200
@@ -3236,7 +3236,7 @@ create_addrmap_from_aranges (struct dwar
const uint8_t offset_size = dwarf5_is_dwarf64 ? 8 : 4;
if (addr + entry_length > section->buffer + section->size)
{
- warning (_("Section .debug_aranges in %s entry at offset %zu "
+ warning (_("Section .debug_aranges in %s entry at offset %td "
"length %s exceeds section length %s, "
"ignoring .debug_aranges."),
objfile_name (objfile), entry_addr - section->buffer,
@@ -3250,7 +3250,7 @@ create_addrmap_from_aranges (struct dwar
addr += 2;
if (version != 2)
{
- warning (_("Section .debug_aranges in %s entry at offset %zu "
+ warning (_("Section .debug_aranges in %s entry at offset %tu "
"has unsupported version %d, ignoring .debug_aranges."),
objfile_name (objfile), entry_addr - section->buffer,
version);
@@ -3264,7 +3264,7 @@ create_addrmap_from_aranges (struct dwar
= debug_info_offset_to_per_cu.find (sect_offset (debug_info_offset));
if (per_cu_it == debug_info_offset_to_per_cu.cend ())
{
- warning (_("Section .debug_aranges in %s entry at offset %zu "
+ warning (_("Section .debug_aranges in %s entry at offset %tu "
"debug_info_offset %s does not exists, "
"ignoring .debug_aranges."),
objfile_name (objfile), entry_addr - section->buffer,
@@ -3276,7 +3276,7 @@ create_addrmap_from_aranges (struct dwar
const uint8_t address_size = *addr++;
if (address_size < 1 || address_size > 8)
{
- warning (_("Section .debug_aranges in %s entry at offset %zu "
+ warning (_("Section .debug_aranges in %s entry at offset %tu "
"address_size %u is invalid, ignoring .debug_aranges."),
objfile_name (objfile), entry_addr - section->buffer,
address_size);
@@ -3286,7 +3286,7 @@ create_addrmap_from_aranges (struct dwar
const uint8_t segment_selector_size = *addr++;
if (segment_selector_size != 0)
{
- warning (_("Section .debug_aranges in %s entry at offset %zu "
+ warning (_("Section .debug_aranges in %s entry at offset %tu "
"segment_selector_size %u is not supported, "
"ignoring .debug_aranges."),
objfile_name (objfile), entry_addr - section->buffer,
@@ -3302,7 +3302,7 @@ create_addrmap_from_aranges (struct dwar
padding > 0; padding--)
if (*addr++ != 0)
{
- warning (_("Section .debug_aranges in %s entry at offset %zu "
+ warning (_("Section .debug_aranges in %s entry at offset %tu "
"padding is not zero, ignoring .debug_aranges."),
objfile_name (objfile), entry_addr - section->buffer);
return;
@@ -3312,7 +3312,7 @@ create_addrmap_from_aranges (struct dwar
{
if (addr + 2 * address_size > entry_end)
{
- warning (_("Section .debug_aranges in %s entry at offset %zu "
+ warning (_("Section .debug_aranges in %s entry at offset %tu "
"address list is not properly terminated, "
"ignoring .debug_aranges."),
objfile_name (objfile), entry_addr - section->buffer);
@@ -5537,7 +5537,7 @@ read_debug_names_from_section (struct ob
if (addr != abbrev_table_start + abbrev_table_size)
{
warning (_("Section .debug_names in %s has abbreviation_table "
- "of size %zu vs. written as %u, ignoring .debug_names."),
+ "of size %tu vs. written as %u, ignoring .debug_names."),
filename, addr - abbrev_table_start, abbrev_table_size);
return false;
}

View File

@ -3,8 +3,6 @@ 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
@ -22,15 +20,11 @@ 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(+)
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)
@@ -752,6 +752,9 @@ follow_fork (void)
}
else
{
@ -40,6 +34,3 @@ index dcf022bd50..b468d02fd6 100644
/* 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

View File

@ -1,9 +1,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: Display Fortran strings in backtraces
FileName: gdb-fortran-frame-string.patch
Subject: gdb-fortran-frame-string.patch
;; Display Fortran strings in backtraces.
;;=fedoratest
@ -29,16 +27,9 @@ 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 0000000000..7114afd440
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/fortran-frame-string.exp
@@ -0,0 +1,36 @@
@ -80,7 +71,6 @@ index 0000000000..7114afd440
+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 0000000000..3d1576fb1f
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/fortran-frame-string.f90
@@ -0,0 +1,28 @@
@ -112,6 +102,3 @@ index 0000000000..3d1576fb1f
+ program main
+ call f ('foo')
+ end
--
2.14.3

View File

@ -1,179 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: 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
Jan Kratochvil: Fixed $d -> $dir.
Jan Kratochvil: Remove /dev/null redirection.
>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:
Tom> This patch series adds support for a DWARF index to gdb.
Roland suggested we wrap up the index-creation code into a helper
script.
I'm not sure if this is something people would want in gdb proper, but I
figured I would send it here just in case.
Tom
2010-07-09 Tom Tromey <tromey@redhat.com>
* Makefile.in (install-only): Install gdb-add-index.
* gdb-add-index: New file.
2010-07-09 Tom Tromey <tromey@redhat.com>
* gdb.texinfo (Index Files): Mention gdb-add-index.
>From 30714fe719e61baea03d0dc5793eb0d564faebb7 Mon Sep 17 00:00:00 2001
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/Makefile.in | 9 +++++++++
gdb/doc/Makefile.in | 9 ++++++++-
gdb/doc/gdb.texinfo | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 74 insertions(+), 1 deletion(-)
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
+ transformed_name=`t='$(program_transform_name)'; \
+ echo gdb-add-index | sed -e "$$t"` ; \
+ if test "x$$transformed_name" = x; then \
+ transformed_name=gdb-add-index ; \
+ else \
+ true ; \
+ fi ; \
+ $(INSTALL_PROGRAM) $(srcdir)/contrib/gdb-add-index.sh \
+ $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT)
@$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
install-strip:
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.
+@value{GDBN} comes with a program, @command{gdb-add-index}, which can
+be used to add the index to a symbol file. It takes the symbol file
+as its only argument:
+
+@smallexample
+$ gdb-add-index symfile
+@end smallexample
+
@node Symbol Errors
@section Errors Reading Symbol Files
@@ -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
+* gdb-add-index man:: Add index files to speed up GDB
@end menu
@node gdb man
@@ -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
+
+@c man title gdb-add-index Add index files to speed up GDB
+
+@c man begin SYNOPSIS gdb-add-index
+gdb-add-index @var{filename}
+@c man end
+
+@c man begin DESCRIPTION gdb-add-index
+When GDB finds a symbol file, it scans the symbols in the file in order
+to construct an internal symbol table. This lets most GDB operations
+work quickly--at the cost of a delay early on. For large programs,
+this delay can be quite lengthy, so GDB provides a way to build an
+index, which speeds up startup.
+
+To determine whether a file contains such an index, use the command
+@command{readelf -S filename}: the index is stored in a section named
+@code{.gdb_index}. Note that the index is never generated for files that do
+not contain DWARF debug information (sections named @code{.debug_*}).
+
+See more in
+@ifset man
+the @value{GDBN} manual in node @code{Index Files}
+-- shell command @code{info -f gdb -n 'Index Files'}.
+@end ifset
+@ifclear man
+@ref{Index Files}.
+@end ifclear
+@c man end
+
+@c man begin SEEALSO gdb-add-index
+@ifset man
+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
+
@include gpl.texi
@node GNU Free Documentation License
--
2.14.3

View File

@ -3,21 +3,13 @@ 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,
@@ -21286,6 +21286,26 @@ new_symbol (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);
@ -46,7 +38,6 @@ index c8db955f2f..6ebe00f542 100644
/* Fortran does not have mangling standard and the mangling does differ
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 @@
@ -158,6 +149,3 @@ index 0000000000..5469cd7354
+
+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

View File

@ -1,9 +1,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_assert -> complaint for weird DWARF
FileName: gdb-gnat-dwarf-crash-3of3.patch
Subject: gdb-gnat-dwarf-crash-3of3.patch
;; Fix crash of -readnow /usr/lib/debug/usr/bin/gnatbind.debug (BZ 1069211).
;;=push+jan
@ -40,29 +38,199 @@ 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(+)
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:
@@ -10499,6 +10499,13 @@ private:
static void
process_die (struct die_info *die, struct dwarf2_cu *cu)
{
+ if (die->in_process)
+ {
+ complaint (&symfile_complaints,
+ _("DIE at 0x%x attempted to be processed twice"),
+ to_underlying (die->sect_off));
+ complaint (_("DIE at 0x%s attempted to be processed twice"),
+ sect_offset_str (die->sect_off));
+ return;
+ }
+
process_die_scope scope (die, cu);
switch (die->tag)
--
2.14.3
diff --git a/gdb/infrun.c b/gdb/infrun.c
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -607,6 +607,13 @@ holding the child stopped. Try \"set detach-on-fork\" or \
target_pid_to_str (process_ptid));
}
+#ifdef NEED_DETACH_SIGSTOP
+ /* We should check PID_WAS_STOPPED and detach it stopped accordingly.
+ In this point of code it cannot be 1 as we would not get FORK
+ executed without CONTINUE first which resets PID_WAS_STOPPED.
+ We would have to first TARGET_STOP and WAITPID it as with running
+ inferior PTRACE_DETACH, SIGSTOP will ignore the signal. */
+#endif
target_detach (parent_inf, 0);
}
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -191,6 +191,12 @@ struct linux_nat_target *linux_target;
/* Does the current host support PTRACE_GETREGSET? */
enum tribool have_ptrace_getregset = TRIBOOL_UNKNOWN;
+#ifdef NEED_DETACH_SIGSTOP
+/* PID of the inferior stopped by SIGSTOP before attaching (or zero). */
+static pid_t pid_was_stopped;
+
+#endif
+
/* The saved to_close method, inherited from inf-ptrace.c.
Called by our to_close. */
static void (*super_close) (struct target_ops *);
@@ -1027,6 +1033,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");
+#ifdef NEED_DETACH_SIGSTOP
+ pid_was_stopped = ptid.pid ();
+#endif
/* The process is definitely stopped. It is in a job control
stop, unless the kernel predates the TASK_STOPPED /
@@ -1359,6 +1368,25 @@ get_detach_signal (struct lwp_info *lp)
return gdb_signal_to_host (signo);
}
+#ifdef NEED_DETACH_SIGSTOP
+ /* Workaround RHEL-5 kernel which has unreliable PTRACE_DETACH, SIGSTOP (that
+ many TIDs are left unstopped). See RH Bug 496732. */
+ if (lp->ptid.pid () == pid_was_stopped)
+ {
+ int err;
+
+ errno = 0;
+ err = kill_lwp (lp->ptid.lwp (), SIGSTOP);
+ if (debug_linux_nat)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "SC: lwp kill %d %s\n",
+ err,
+ errno ? safe_strerror (errno) : "ERRNO-OK");
+ }
+ }
+
+#endif
return 0;
}
@@ -1507,6 +1535,10 @@ linux_nat_target::detach (inferior *inf, int from_tty)
detach_one_lwp (main_lwp, &signo);
detach_success (inf);
+
+#ifdef NEED_DETACH_SIGSTOP
+ pid_was_stopped = 0;
+#endif
}
}
@@ -1765,6 +1797,16 @@ linux_nat_target::resume (ptid_t ptid, int step, enum gdb_signal signo)
return;
}
+#ifdef NEED_DETACH_SIGSTOP
+ /* At this point, we are going to resume the inferior and if we
+ have attached to a stopped process, we no longer should leave
+ it as stopped if the user detaches. PTID variable has PID set to LWP
+ while we need to check the real PID here. */
+
+ if (!step && lp && pid_was_stopped == lp->ptid.pid ())
+ pid_was_stopped = 0;
+
+#endif
if (resume_many)
iterate_over_lwps (ptid, linux_nat_resume_callback, lp);
@@ -3761,6 +3803,10 @@ linux_nat_target::mourn_inferior ()
/* Let the arch-specific native code know this process is gone. */
linux_target->low_forget_process (pid);
+#ifdef NEED_DETACH_SIGSTOP
+
+ pid_was_stopped = 0;
+#endif
}
/* Convert a native/host siginfo object, into/from the siginfo in the
diff --git a/gdb/testsuite/gdb.threads/attach-stopped.exp b/gdb/testsuite/gdb.threads/attach-stopped.exp
--- 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}
- # Verify that we can attach to the stopped process.
+ # Verify that we can attach to the process by first giving its
+ # executable name via the file command, and using attach with the
+ # process ID.
+
+ set test "$threadtype: set file, before attach1 to stopped process"
+ gdb_test_multiple "file $binfile" "$test" {
+ -re "Load new symbol table from.*y or n. $" {
+ gdb_test "y" "Reading symbols from $escapedbinfile\.\.\.*done." \
+ "$test (re-read)"
+ }
+ -re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $" {
+ pass "$test"
+ }
+ }
+
+ set test "$threadtype: attach1 to stopped, after setting file"
+ gdb_test_multiple "attach $testpid" "$test" {
+ -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*$gdb_prompt $" {
+ pass "$test"
+ }
+ }
+
+ # ".*sleep.*clone.*" would fail on s390x as bt stops at START_THREAD there.
+ if {[string equal $threadtype threaded]} {
+ gdb_test "thread apply all bt" ".*sleep.*start_thread.*" "$threadtype: attach1 to stopped bt"
+ } else {
+ gdb_test "bt" ".*sleep.*main.*" "$threadtype: attach1 to stopped bt"
+ }
+
+ # Exit and detach the process.
+
+ gdb_exit
+
+ # Avoid some race:
+ sleep 2
+
+ if [catch {open /proc/${testpid}/status r} fileid] {
+ set line2 "NOTFOUND"
+ } else {
+ gets $fileid line1;
+ gets $fileid line2;
+ close $fileid;
+ }
+
+ set test "$threadtype: attach1, exit leaves process stopped"
+ if {[string match "*(stopped)*" $line2]} {
+ pass $test
+ } else {
+ fail $test
+ }
+
+ # At this point, the process should still be stopped
+
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+
+ # Verify that we can attach to the process just by giving the
+ # process ID.
set test "$threadtype: attach2 to stopped, after setting file"
gdb_test_multiple "attach $testpid" "$test" {

View File

@ -3,20 +3,13 @@ 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 904cc453ad..6fb5b5b509 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -9528,10 +9528,12 @@ _ACEOF
@@ -9680,10 +9680,12 @@ _ACEOF
@ -33,10 +26,9 @@ index 904cc453ad..6fb5b5b509 100755
TARGET_PTR="unsigned __int128"
else
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 1557760ed8..d891c7bccc 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -832,10 +832,12 @@ AC_CHECK_SIZEOF(unsigned long long)
@@ -843,10 +843,12 @@ AC_CHECK_SIZEOF(unsigned long long)
AC_CHECK_SIZEOF(unsigned long)
AC_CHECK_SIZEOF(unsigned __int128)
@ -52,6 +44,3 @@ index 1557760ed8..d891c7bccc 100644
elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
TARGET_PTR="unsigned __int128"
else
--
2.14.3

View File

@ -3,16 +3,10 @@ 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 71146966ab..500b2f62d5 100755
--- a/gdb/contrib/gdb-add-index.sh
+++ b/gdb/contrib/gdb-add-index.sh
@@ -21,6 +21,11 @@
@ -26,7 +20,4 @@ index 71146966ab..500b2f62d5 100755
+
myname="${0##*/}"
if test $# != 1; then
--
2.14.3
dwarf5=""

View File

@ -3,8 +3,6 @@ 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
@ -15,18 +13,9 @@ 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
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 @@
@ -53,7 +42,6 @@ index 0000000000..1a0220ea52
+}
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 @@
@ -94,7 +82,6 @@ index 0000000000..5d4be90999
+}
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 @@
@ -176,6 +163,3 @@ index 0000000000..9e11d78bf9
+ fail $test
+ }
+}
--
2.14.3

View File

@ -3,22 +3,13 @@ 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
@@ -12059,7 +12059,7 @@ else
#include <linux/perf_event.h>
#ifndef PERF_ATTR_SIZE_VER5
@ -28,20 +19,18 @@ index db849572b5..7720c00f4b 100755
_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([[
@@ -1477,7 +1477,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])
]])], [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 @@
@ -65,7 +54,6 @@ index b97500e579..151545105c 100644
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 @@
@ -246,6 +234,3 @@ index 31a8d9e67b..72faf23c5f 100644
struct target_ops;
#if HAVE_LINUX_PERF_EVENT_H
--
2.14.3

View File

@ -3,8 +3,6 @@ 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.
@ -12,15 +10,11 @@ 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
@@ -12089,6 +12089,8 @@ update_global_location_list (enum ugll_insert_mode insert_mode)
@@ -12016,6 +12016,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);
@ -29,6 +23,3 @@ index 5a99de75e1..6a0c15b239 100644
old_loc->owner = NULL;
VEC_safe_push (bp_location_p, moribund_locations, old_loc);
--
2.14.3

View File

@ -3,20 +3,11 @@ 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 @@
@ -41,7 +32,6 @@ index 0000000000..dee4f006dc
+ 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 @@
@ -70,6 +60,3 @@ index 0000000000..22a9decee2
+}
+
+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"
--
2.14.3

View File

@ -1,36 +0,0 @@
diff --git a/gdb/python/lib/gdb/command/pahole.py b/gdb/python/lib/gdb/command/pahole.py
index e08eaf5..56c1737 100644
--- a/gdb/python/lib/gdb/command/pahole.py
+++ b/gdb/python/lib/gdb/command/pahole.py
@@ -55,19 +55,19 @@ It prints the type and displays comments showing where holes are."""
fieldsize = 8 * ftype.sizeof
# TARGET_CHAR_BIT
- print (' /* %3d %3d */' % (int (bitpos / 8), int (fieldsize / 8)), end = "")
+ print (' /* %3d %3d */' % (int (bitpos / 8), int (fieldsize / 8))),
bitpos = bitpos + fieldsize
if ftype.code == gdb.TYPE_CODE_STRUCT:
self.pahole (ftype, level + 1, field.name)
else:
- print (' ' * (2 + 2 * level), end = "")
+ print (' ' * (2 + 2 * level)),
print ('%s %s' % (str (ftype), field.name))
if level == 0:
self.maybe_print_hole(bitpos, 8 * type.sizeof)
- print (' ' * (14 + 2 * level), end = "")
+ print (' ' * (14 + 2 * level)),
print ('} %s' % name)
def invoke (self, arg, from_tty):
@@ -75,7 +75,7 @@ It prints the type and displays comments showing where holes are."""
type = type.strip_typedefs ()
if type.code != gdb.TYPE_CODE_STRUCT:
raise (TypeError, '%s is not a struct type' % arg)
- print (' ' * 14, end = "")
+ print (' ' * 14),
self.pahole (type, 0, '')
Pahole()

View File

@ -3,30 +3,13 @@ From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-physname-pr11734-test.patch
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 @@
@ -62,7 +45,6 @@ index 0000000000..f3480ce977
+
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 @@
@ -95,7 +77,6 @@ index 0000000000..dbebe8281a
+
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 @@
@ -128,7 +109,6 @@ index 0000000000..faaeffc9dd
+
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 @@
@ -161,7 +141,6 @@ index 0000000000..6edf8110f1
+
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 @@
@ -222,7 +201,6 @@ index 0000000000..e731d422f6
+return 0
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 @@
@ -254,6 +232,3 @@ index 0000000000..7f6e72a685
+ void foo (char *);
+};
+
--
2.14.3

View File

@ -3,22 +3,13 @@ From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-physname-pr12273-test.patch
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 @@
@ -61,7 +52,6 @@ index 0000000000..79dd7bad74
+}
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 @@
@ -111,6 +101,3 @@ index 0000000000..9d71482742
+}
+
+gdb_exit
--
2.14.3

View File

@ -3,20 +3,11 @@ 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 @@
@ -200,7 +191,6 @@ index 0000000000..0c2bbdaede
+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 @@
@ -311,6 +301,3 @@ index 0000000000..98b2e797e7
+ .long 0xedc07834 /* 194: frsqrtes f14,f15 */
+ .long 0xedc07835 /* 198: frsqrtes. f14,f15 */
+ .long 0x7c43271e /* 19c: isel r2,r3,r4,28 */
--
2.14.3

View File

@ -1,56 +0,0 @@
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

View File

@ -3,24 +3,10 @@ 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
@ -39,7 +25,6 @@ index ebd48fffe7..ccf011e35e 100644
@findex gdb.breakpoints
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;
@ -52,10 +37,9 @@ index c110588f76..89bbc6987b 100644
#endif
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)
@@ -556,12 +556,16 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw)
{
const char *arg;
PyObject *from_tty_obj = NULL, *to_string_obj = NULL;
@ -76,7 +60,7 @@ index 4844c86c54..610dda828c 100644
return NULL;
from_tty = 0;
@@ -580,12 +584,28 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw)
@@ -582,6 +586,15 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw)
to_string = cmp;
}
@ -92,8 +76,9 @@ index 4844c86c54..610dda828c 100644
std::string to_string_res;
TRY
{
struct interp *interp;
@@ -602,6 +615,13 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw)
counted_command_line lines = read_command_lines_1 (reader, 1, nullptr);
+ /* In the case of long running GDB commands, allow the user to
+ release the Python GIL acquired by Python. Restore the GIL
@ -105,10 +90,10 @@ index 4844c86c54..610dda828c 100644
scoped_restore save_async = make_scoped_restore (&current_ui->async, 0);
scoped_restore save_uiout = make_scoped_restore (&current_uiout);
@@ -600,10 +620,22 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw)
to_string_res = execute_command_to_string (arg, from_tty);
@@ -617,10 +637,22 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw)
from_tty);
else
execute_command (arg, from_tty);
execute_control_commands (lines.get (), from_tty);
+
+ /* Reacquire the GIL if it was released earlier. */
+ if (release_gil)
@ -131,7 +116,6 @@ index 4844c86c54..610dda828c 100644
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 @@
@ -150,7 +134,6 @@ index 0000000000..1a12fc9c6d
+}
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 @@
@ -225,7 +208,6 @@ index 0000000000..a89c16a45b
+}
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 @@
@ -257,6 +239,3 @@ index 0000000000..6a89964139
+
+while 1:
+ pass
--
2.14.3

View File

@ -3,16 +3,10 @@ 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)
@ -29,6 +23,3 @@ index 0d668f35e0..4aa26125f9 100644
/* 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

View File

@ -3,20 +3,11 @@ 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
+++ b/gdb/testsuite/gdb.base/set-solib-absolute-prefix.c
@@ -0,0 +1,26 @@
@ -48,7 +39,6 @@ index 0000000000..2675a34f1a
+}
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
+++ b/gdb/testsuite/gdb.base/set-solib-absolute-prefix.exp
@@ -0,0 +1,39 @@
@ -91,6 +81,3 @@ index 0000000000..bb4c8b962b
+ ".*warning: Unable to find dynamic linker breakpoint function.*" \
+ "set solib-absolute-prefix"
+gdb_test "bt" "__kernel_vsyscall.*" "backtrace with __kernel_vsyscall"
--
2.14.3

View File

@ -3,8 +3,6 @@ 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
@ -29,18 +27,9 @@ 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
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
+++ b/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.c
@@ -0,0 +1,27 @@
@ -73,7 +62,6 @@ index 0000000000..f2697efa9a
+}
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
+++ b/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.exp
@@ -0,0 +1,68 @@
@ -147,7 +135,6 @@ index 0000000000..2e6786d499
+}
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
+++ b/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.py
@@ -0,0 +1,30 @@
@ -181,6 +168,3 @@ index 0000000000..e807728047
+ print "Hello, World!"
+
+HelloWorld ()
--
2.14.3

View File

@ -3,8 +3,6 @@ From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch
FileName: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch
;; Fix '[ppc64] and [s390x] wrong prologue skip on -O2 -g code' (Jan
;; Kratochvil, RH BZ 1084404).
;;=fedoratest
@ -12,20 +10,9 @@ FileName: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch
These testcases have been created by compiling glibc-2.17-78 on
RHEL-7.1 s390x/ppc64 boxes, and then taking the "select.o" file
present at $builddir/misc/select.o.
---
gdb/testsuite/gdb.arch/ppc64-prologue-skip.exp | 34 ++++++++++++
gdb/testsuite/gdb.arch/ppc64-prologue-skip.o.uu | 70 +++++++++++++++++++++++++
gdb/testsuite/gdb.arch/s390x-prologue-skip.exp | 34 ++++++++++++
gdb/testsuite/gdb.arch/s390x-prologue-skip.o.uu | 64 ++++++++++++++++++++++
4 files changed, 202 insertions(+)
create mode 100644 gdb/testsuite/gdb.arch/ppc64-prologue-skip.exp
create mode 100644 gdb/testsuite/gdb.arch/ppc64-prologue-skip.o.uu
create mode 100644 gdb/testsuite/gdb.arch/s390x-prologue-skip.exp
create mode 100644 gdb/testsuite/gdb.arch/s390x-prologue-skip.o.uu
diff --git a/gdb/testsuite/gdb.arch/ppc64-prologue-skip.exp b/gdb/testsuite/gdb.arch/ppc64-prologue-skip.exp
new file mode 100644
index 0000000000..2f54c1f981
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/ppc64-prologue-skip.exp
@@ -0,0 +1,34 @@
@ -65,7 +52,6 @@ index 0000000000..2f54c1f981
+gdb_test "break ___newselect_nocancel" "Breakpoint $decimal at 0xc: file ../sysdeps/unix/syscall-template.S, line 81." "breakpoint on ___newselect_nocancel"
diff --git a/gdb/testsuite/gdb.arch/ppc64-prologue-skip.o.uu b/gdb/testsuite/gdb.arch/ppc64-prologue-skip.o.uu
new file mode 100644
index 0000000000..9196bbac47
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/ppc64-prologue-skip.o.uu
@@ -0,0 +1,70 @@
@ -141,7 +127,6 @@ index 0000000000..9196bbac47
+end
diff --git a/gdb/testsuite/gdb.arch/s390x-prologue-skip.exp b/gdb/testsuite/gdb.arch/s390x-prologue-skip.exp
new file mode 100644
index 0000000000..df3acf8c02
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/s390x-prologue-skip.exp
@@ -0,0 +1,34 @@
@ -181,7 +166,6 @@ index 0000000000..df3acf8c02
+gdb_test "break select" "Breakpoint $decimal at 0x48: file ../sysdeps/unix/syscall-template.S, line 81." "breakpoint on select"
diff --git a/gdb/testsuite/gdb.arch/s390x-prologue-skip.o.uu b/gdb/testsuite/gdb.arch/s390x-prologue-skip.o.uu
new file mode 100644
index 0000000000..6442e6048d
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/s390x-prologue-skip.o.uu
@@ -0,0 +1,64 @@
@ -249,6 +233,3 @@ index 0000000000..6442e6048d
+L````(`````$````%````````````````````/`````$````%`````````$@`
+`
+end
--
2.14.3

View File

@ -3,8 +3,6 @@ From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-rhbz1149205-catch-syscall-after-fork-test.patch
FileName: gdb-rhbz1149205-catch-syscall-after-fork-test.patch
;; Fix '`catch syscall' doesn't work for parent after `fork' is called'
;; (Philippe Waroquiers, RH BZ 1149205).
;;=fedoratest
@ -43,16 +41,9 @@ Author: Philippe Waroquiers <philippe@sourceware.org>
Date: Tue May 21 18:47:05 2013 +0000
Fix internal error caused by interaction between catch signal and fork
---
.../gdb.base/gdb-rhbz1149205-catch-syscall-fork.c | 11 ++++
.../gdb-rhbz1149205-catch-syscall-fork.exp | 58 ++++++++++++++++++++++
2 files changed, 69 insertions(+)
create mode 100644 gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.c
create mode 100644 gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.exp
diff --git a/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.c b/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.c
new file mode 100644
index 0000000000..947258e22f
--- /dev/null
+++ b/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.c
@@ -0,0 +1,11 @@
@ -69,7 +60,6 @@ index 0000000000..947258e22f
+}
diff --git a/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.exp b/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.exp
new file mode 100644
index 0000000000..96d31d7018
--- /dev/null
+++ b/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.exp
@@ -0,0 +1,58 @@
@ -131,6 +121,3 @@ index 0000000000..96d31d7018
+gdb_test "continue" \
+ "Continuing\.\r\n.*\r\nCatchpoint $decimal \\\(call to syscall .?chdir.?.*" \
+ "continue from catch syscall after fork"
--
2.14.3

Some files were not shown because too many files have changed in this diff Show More