Blame SOURCES/gdb-6.3-rh-testversion-20041202.patch

ed07ac
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
ed07ac
From: Elena Zannoni <ezannoni@redhat.com>
ed07ac
Date: Fri, 27 Oct 2017 21:07:50 +0200
ed07ac
Subject: gdb-6.3-rh-testversion-20041202.patch
ed07ac
ed07ac
;; Match the Fedora's version info.
ed07ac
;;=fedora
ed07ac
ed07ac
2003-02-24  Elena Zannoni  <ezannoni@redhat.com>
ed07ac
ed07ac
        * gdb.gdb/selftest.exp: Add matching on specific Red Hat only version
ed07ac
        string.
ed07ac
ed07ac
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
ed07ac
--- a/gdb/testsuite/gdb.gdb/selftest.exp
ed07ac
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
ed07ac
@@ -53,6 +53,9 @@ proc test_with_self { } {
ed07ac
 	-re ".\[0-9\]+ = +.+ +0x.*\[0-9.\]+.*$gdb_prompt $" {
ed07ac
 	    pass "printed version with cast"
ed07ac
 	}
ed07ac
+	-re ".\[0-9\]+ = .(Fedora|Red Hat Enterprise Linux) \[\\(\\)0-9.a-z\\-\]+.*$gdb_prompt $" {
ed07ac
+	    pass "printed version Fedora or Red Hat Enterprise Linux only"
ed07ac
+	}
ed07ac
     }
ed07ac
 
ed07ac
     # start the "xgdb" process
ed07ac
diff --git a/gdb/top.c b/gdb/top.c
ed07ac
--- a/gdb/top.c
ed07ac
+++ b/gdb/top.c
ed07ac
@@ -2195,7 +2195,7 @@ init_gdb_version_vars (void)
ed07ac
   struct internalvar *major_version_var = create_internalvar ("_gdb_major");
ed07ac
   struct internalvar *minor_version_var = create_internalvar ("_gdb_minor");
ed07ac
   int vmajor = 0, vminor = 0, vrevision = 0;
ed07ac
-  sscanf (version, "%d.%d.%d", &vmajor, &vminor, &vrevision);
ed07ac
+  sscanf (version, "Fedora %d.%d.%d", &vmajor, &vminor, &vrevision);
ed07ac
   set_internalvar_integer (major_version_var, vmajor);
ed07ac
   set_internalvar_integer (minor_version_var, vminor + (vrevision > 0));
ed07ac
 }