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

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