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