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

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