[gdb/f16] Fixing dumb thing that I did while including the SystemTap patch.
sergiosdj
sergiosdj at fedoraproject.org
Thu Mar 1 19:45:07 UTC 2012
commit 815858a51564532230ddf7e415240480f07ec95c
Author: Sergio Durigan Junior <sergiodj at redhat.com>
Date: Thu Mar 1 16:44:11 2012 -0300
Fixing dumb thing that I did while including the SystemTap patch.
gdb-stap-corrupt-probes-fix.patch | 25 +++++++++++++++++++++++++
gdb.spec | 1 +
2 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/gdb-stap-corrupt-probes-fix.patch b/gdb-stap-corrupt-probes-fix.patch
index 8494186..9036c28 100644
--- a/gdb-stap-corrupt-probes-fix.patch
+++ b/gdb-stap-corrupt-probes-fix.patch
@@ -48,3 +48,28 @@ Index: gdb-7.3.50.20110722/gdb/elfread.c
@@ -2650,15 +2651,19 @@
if (ret->name)
{
+ ret->args = memchr (ret->name, '\0',
+- (unsigned long *) el->data
+- + el->size - (unsigned long *) ret->name);
++ (char *) el->data + el->size - ret->name);
+
+- if (ret->args++ != NULL
+- || memchr (ret->args, '\0', (unsigned long *) el->data
+- + el->size - (unsigned long *) ret->name)
+- != el->data + el->size - 1)
+- complaint (&symfile_complaints, _("corrupt probe when reading `%s'"),
+- objfile->name);
++ if (ret->args != NULL)
++ ++ret->args;
++ if (ret->args == NULL
++ || (memchr (ret->args, '\0',
++ (char *) el->data + el->size - ret->name)
++ != el->data + el->size - 1))
++ {
++ complaint (&symfile_complaints, _("corrupt probe when reading `%s'"),
++ objfile->name);
++ ret->args = NULL;
++ }
+ }
+ else
+ ret->args = NULL;
diff --git a/gdb.spec b/gdb.spec
index 07c997f..771053d 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -842,6 +842,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%if 0%{?rhel:1} && 0%{?rhel} <= 6
%patch487 -p1
%endif # 0%{?rhel:1} && 0%{?rhel} <= 6
+%patch647 -p1
find -name "*.orig" | xargs rm -f
! find -name "*.rej" # Should not happen.
More information about the scm-commits
mailing list