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

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