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

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