e7db4ec014
* ptype/o prints offsets and sizes of members (like pahole) * tab-completion improved: quoting function names is not generally necessary anymore, completion offers for breakpoint don't include data symbol * enable/disable breakpoints now accept ranges: 'disable 1.3-5' * new commands: - set/show cwd: working directory of debuggee - set/show compile-gcc: program to use for 'compile' command - starti: start program and stop at first instruction - TUI single-key commands: 'i' for stepi and 'o' for nexti * --readnever option disables any reading of debug info (for dumping) * s390: guarded storage register access for z14 * gcore option -a dumps all memory mapping * C++ breakpoints: 'b foo' will now set a breakpoint on all functions and methods named 'foo' no matter the scope. Use -qualified if you don't want that * python scripting: new events gdb.new_inferior, gdb.inferior_deleted and gdb.new_thread; new command rbreak (breakpoint accepting regexps) * gdbserver can be passed environment parameters to remote debuggee - Added patches from Fedora: gdb-ppc64-stwux-tautological-compare.patch gdb-rhbz1540559-gdbaddindex-glibcdebug-regression.patch gdb-vla-intel-fix-print-char-array.patch - Removed unused gdb-libstdc++-v3-python-7.1.1-20170526.tar.bz2 - Removed obsolete upstream patches: gdb-s390x-1b63490.patch gdb-s390x-289e23a.patch gdb-s390x-8fe09d7.patch gdb-s390x-96235dc.patch OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=177
181 lines
4.5 KiB
Diff
181 lines
4.5 KiB
Diff
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
|
From: Jeff Johnston <jjohnstn@redhat.com>
|
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
|
Subject: gdb-6.3-inheritancetest-20050726.patch
|
|
|
|
FileName: gdb-6.3-inheritancetest-20050726.patch
|
|
|
|
;; Verify printing of inherited members test
|
|
;;=fedoratest
|
|
|
|
2005-07-26 Jeff Johnston <jjohnstn@redhat.com>
|
|
|
|
* gdb.cp/b146835.exp: New testcase.
|
|
* gdb.cp/b146835.cc: Ditto.
|
|
* gdb.cp/b146835b.cc: Ditto.
|
|
* gdb.cp/b146835.h: Ditto.
|
|
---
|
|
gdb/testsuite/gdb.cp/b146835.cc | 32 +++++++++++++++++++++++++++
|
|
gdb/testsuite/gdb.cp/b146835.exp | 47 ++++++++++++++++++++++++++++++++++++++++
|
|
gdb/testsuite/gdb.cp/b146835.h | 36 ++++++++++++++++++++++++++++++
|
|
gdb/testsuite/gdb.cp/b146835b.cc | 11 ++++++++++
|
|
4 files changed, 126 insertions(+)
|
|
create mode 100644 gdb/testsuite/gdb.cp/b146835.cc
|
|
create mode 100644 gdb/testsuite/gdb.cp/b146835.exp
|
|
create mode 100644 gdb/testsuite/gdb.cp/b146835.h
|
|
create mode 100644 gdb/testsuite/gdb.cp/b146835b.cc
|
|
|
|
diff --git a/gdb/testsuite/gdb.cp/b146835.cc b/gdb/testsuite/gdb.cp/b146835.cc
|
|
new file mode 100644
|
|
index 0000000000..4161d523f5
|
|
--- /dev/null
|
|
+++ b/gdb/testsuite/gdb.cp/b146835.cc
|
|
@@ -0,0 +1,32 @@
|
|
+#include "b146835.h"
|
|
+#include <iostream>
|
|
+
|
|
+class F : public C {
|
|
+
|
|
+protected:
|
|
+
|
|
+ virtual void funcA (unsigned long a, B *b);
|
|
+ virtual void funcB (E *e);
|
|
+ virtual void funcC (unsigned long x, bool y);
|
|
+
|
|
+ char *s1, *s2;
|
|
+ bool b1;
|
|
+ int k;
|
|
+
|
|
+public:
|
|
+ void foo() {
|
|
+ std::cout << "foo" << std::endl;
|
|
+ }
|
|
+};
|
|
+
|
|
+
|
|
+void F::funcA (unsigned long a, B *b) {}
|
|
+void F::funcB (E *e) {}
|
|
+void F::funcC (unsigned long x, bool y) {}
|
|
+
|
|
+int main()
|
|
+{
|
|
+ F f;
|
|
+ f.foo();
|
|
+}
|
|
+
|
|
diff --git a/gdb/testsuite/gdb.cp/b146835.exp b/gdb/testsuite/gdb.cp/b146835.exp
|
|
new file mode 100644
|
|
index 0000000000..d03815bcff
|
|
--- /dev/null
|
|
+++ b/gdb/testsuite/gdb.cp/b146835.exp
|
|
@@ -0,0 +1,47 @@
|
|
+# This testcase is part of GDB, the GNU debugger.
|
|
+
|
|
+# Copyright 2005 Free Software Foundation, Inc.
|
|
+
|
|
+# This program is free software; you can redistribute it and/or modify
|
|
+# it under the terms of the GNU General Public License as published by
|
|
+# the Free Software Foundation; either version 2 of the License, or
|
|
+# (at your option) any later version.
|
|
+#
|
|
+# This program is distributed in the hope that it will be useful,
|
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
+# GNU General Public License for more details.
|
|
+#
|
|
+# You should have received a copy of the GNU General Public License
|
|
+# along with this program; if not, write to the Free Software
|
|
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
+
|
|
+# Check that GDB can properly print an inherited member variable
|
|
+# (Bugzilla 146835)
|
|
+
|
|
+set testfile "b146835"
|
|
+set srcfile ${testfile}.cc
|
|
+set srcfile2 ${testfile}b.cc
|
|
+set binfile [standard_output_file ${testfile}]
|
|
+if {[gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile2}" "${binfile}" executable {debug c++}] != "" } {
|
|
+ return -1
|
|
+}
|
|
+
|
|
+gdb_exit
|
|
+gdb_start
|
|
+gdb_reinitialize_dir $srcdir/$subdir
|
|
+gdb_load ${binfile}
|
|
+
|
|
+#
|
|
+# Run to `main' where we begin our tests.
|
|
+#
|
|
+
|
|
+if ![runto_main] then {
|
|
+ gdb_suppress_tests
|
|
+}
|
|
+
|
|
+gdb_test "break 'F::foo()'" ""
|
|
+gdb_continue_to_breakpoint "First line foo"
|
|
+
|
|
+# Verify that we can access the inherited member d
|
|
+gdb_test "p d" " = \\(D \\*\\) *0x0" "Verify inherited member d accessible"
|
|
diff --git a/gdb/testsuite/gdb.cp/b146835.h b/gdb/testsuite/gdb.cp/b146835.h
|
|
new file mode 100644
|
|
index 0000000000..48df7a2935
|
|
--- /dev/null
|
|
+++ b/gdb/testsuite/gdb.cp/b146835.h
|
|
@@ -0,0 +1,36 @@
|
|
+
|
|
+class A {
|
|
+
|
|
+protected:
|
|
+
|
|
+ virtual void funcA (unsigned long a, class B *b) = 0;
|
|
+ virtual void funcB (class E *e) = 0;
|
|
+ virtual void funcC (unsigned long x, bool y) = 0;
|
|
+
|
|
+ void funcD (class E *e, class D* d);
|
|
+ virtual void funcE (E *e, D *d);
|
|
+ virtual void funcF (unsigned long x, D *d);
|
|
+};
|
|
+
|
|
+
|
|
+class C : public A {
|
|
+
|
|
+protected:
|
|
+
|
|
+ int x;
|
|
+ class K *k;
|
|
+ class H *h;
|
|
+
|
|
+ D *d;
|
|
+
|
|
+ class W *w;
|
|
+ class N *n;
|
|
+ class L *l;
|
|
+ unsigned long *r;
|
|
+
|
|
+public:
|
|
+
|
|
+ C();
|
|
+ int z (char *s);
|
|
+ virtual ~C();
|
|
+};
|
|
diff --git a/gdb/testsuite/gdb.cp/b146835b.cc b/gdb/testsuite/gdb.cp/b146835b.cc
|
|
new file mode 100644
|
|
index 0000000000..1853c1fa38
|
|
--- /dev/null
|
|
+++ b/gdb/testsuite/gdb.cp/b146835b.cc
|
|
@@ -0,0 +1,11 @@
|
|
+#include "b146835.h"
|
|
+
|
|
+C::C() { d = 0; x = 3; }
|
|
+
|
|
+int C::z (char *s) { return 0; }
|
|
+
|
|
+C::~C() {}
|
|
+
|
|
+void A::funcD (class E *e, class D *d) {}
|
|
+void A::funcE (E *e, D *d) {}
|
|
+void A::funcF (unsigned long x, D *d) {}
|
|
--
|
|
2.14.3
|
|
|