This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] [gdb/testsuite] Fix return type of psymtab-parameter


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ed6c0bfb2643861636581ac8775144efa1728c7c

commit ed6c0bfb2643861636581ac8775144efa1728c7c
Author: Thomas Preud'homme <thomas.preudhomme@arm.com>
Date:   Wed Nov 29 13:40:59 2017 +0000

    [gdb/testsuite] Fix return type of psymtab-parameter
    
    As pointed out by Pedro Alves, psymtab-parameter testcase rely on the
    return type being long. This patch revert the changes made in
    f106e10e5e80265e1c43532bba4cb997a7dfa022 and change psymtab-parameter.cc
    to return 0 long instead.
    
    2017-11-29  Thomas Preud'homme  <thomas.preudhomme@arm.com>
    
    gdb/testsuite/
    	* gdb.cp/psymtab-parameter.cc (func): Change return type back to long.
    	Return 0 as a long.
    	* gdb.cp/psymtab-parameter.exp: Change func's return type back to long.

Diff:
---
 gdb/testsuite/ChangeLog                    | 6 ++++++
 gdb/testsuite/gdb.cp/psymtab-parameter.cc  | 3 ++-
 gdb/testsuite/gdb.cp/psymtab-parameter.exp | 2 +-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 23d3cc2..87b917e 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,11 @@
 2017-11-29  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
+	* gdb.cp/psymtab-parameter.cc (func): Change return type back to long.
+	Return 0 as a long.
+	* gdb.cp/psymtab-parameter.exp: Change func's return type back to long.
+
+2017-11-29  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
 	* gdb.cp/breakpoint.cc (bar): Set return type to void.
 	* gdb.cp/psymtab-parameter.cc (func): Likewise.
 	* gdb.cp/psymtab-parameter.exp: Update comment regarding prototype of
diff --git a/gdb/testsuite/gdb.cp/psymtab-parameter.cc b/gdb/testsuite/gdb.cp/psymtab-parameter.cc
index 9f63fef..63038f0 100644
--- a/gdb/testsuite/gdb.cp/psymtab-parameter.cc
+++ b/gdb/testsuite/gdb.cp/psymtab-parameter.cc
@@ -16,9 +16,10 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 template <typename T>
-void
+long
 func ()
 {
+  return 0L;
 }
 
 void
diff --git a/gdb/testsuite/gdb.cp/psymtab-parameter.exp b/gdb/testsuite/gdb.cp/psymtab-parameter.exp
index 5c4b6ac..3d78de9 100644
--- a/gdb/testsuite/gdb.cp/psymtab-parameter.exp
+++ b/gdb/testsuite/gdb.cp/psymtab-parameter.exp
@@ -31,6 +31,6 @@ gdb_test_no_output "set language c++"
 # XFAIL than FAIL here.  For example -readnow breaks it.
 gdb_test_no_output "maintenance info symtabs"
 
-# GDB has shown only the `void func<short>()' ELF symbol before, not the DWARF
+# GDB has shown only the `long func<short>()' ELF symbol before, not the DWARF
 # symbol
 gdb_test "complete p 'func<short>(" "p 'func<short>\\(\\)"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]