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

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