2017-12-10 22:00:49 +00:00
|
|
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
2017-12-04 19:24:00 +00:00
|
|
|
From: Elena Zannoni <ezannoni@redhat.com>
|
|
|
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
2018-06-19 00:10:24 +00:00
|
|
|
Subject: gdb-6.3-rh-testversion-20041202.patch
|
2017-12-04 19:24:00 +00:00
|
|
|
|
2017-12-08 04:31:26 +00:00
|
|
|
;; Match the Fedora's version info.
|
|
|
|
;;=fedora
|
|
|
|
|
2004-12-02 15:42:08 +00:00
|
|
|
2003-02-24 Elena Zannoni <ezannoni@redhat.com>
|
|
|
|
|
|
|
|
* gdb.gdb/selftest.exp: Add matching on specific Red Hat only version
|
|
|
|
string.
|
|
|
|
|
2017-12-08 04:31:26 +00:00
|
|
|
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 { } {
|
2004-12-02 15:42:08 +00:00
|
|
|
-re ".\[0-9\]+ = +.+ +0x.*\[0-9.\]+.*$gdb_prompt $" {
|
|
|
|
pass "printed version with cast"
|
|
|
|
}
|
2023-01-27 19:02:27 +00:00
|
|
|
+ -re ".\[0-9\]+ = .(Fedora Linux|Red Hat Enterprise Linux) \[\\(\\)0-9.a-z\\-\]+.*$gdb_prompt $" {
|
2010-01-12 22:15:57 +00:00
|
|
|
+ pass "printed version Fedora or Red Hat Enterprise Linux only"
|
2004-12-02 15:42:08 +00:00
|
|
|
+ }
|
|
|
|
}
|
2010-07-21 21:30:20 +00:00
|
|
|
|
2017-02-27 21:30:32 +00:00
|
|
|
# start the "xgdb" process
|
2019-04-12 20:35:20 +00:00
|
|
|
diff --git a/gdb/top.c b/gdb/top.c
|
|
|
|
--- a/gdb/top.c
|
|
|
|
+++ b/gdb/top.c
|
2022-05-13 17:30:05 +00:00
|
|
|
@@ -2234,7 +2234,7 @@ init_gdb_version_vars (void)
|
2019-04-12 20:35:20 +00:00
|
|
|
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);
|
2023-01-27 19:02:27 +00:00
|
|
|
+ sscanf (version, "%*[^0123456789]%d.%d.%d", &vmajor, &vminor, &vrevision);
|
2019-04-12 20:35:20 +00:00
|
|
|
set_internalvar_integer (major_version_var, vmajor);
|
|
|
|
set_internalvar_integer (minor_version_var, vminor + (vrevision > 0));
|
|
|
|
}
|