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

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