- Fix memory trashing on binaries from GNAT/Ada (workaround GCC PR 35998).
This commit is contained in:
parent
e237432bca
commit
ad4fdd5fb5
@ -121,26 +121,3 @@
|
||||
|
||||
if (args == NULL)
|
||||
error_no_arg (_("one or more choice numbers"));
|
||||
|
||||
|
||||
|
||||
2008-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Workaround GCC PR ada/35998.
|
||||
* ada-lang.c (to_fixed_record_type): Error out on invalid length of the
|
||||
type TYPE0.
|
||||
|
||||
--- ./gdb/ada-lang.c 6 Apr 2008 08:56:36 -0000 1.137
|
||||
+++ ./gdb/ada-lang.c 20 Apr 2008 21:47:05 -0000
|
||||
@@ -7313,6 +7313,11 @@ to_fixed_record_type (struct type *type0
|
||||
{
|
||||
struct type *templ_type;
|
||||
|
||||
+ /* GCC PR ada/35998 workaround. */
|
||||
+ if (TYPE_LENGTH (type0) == 0xffffffff)
|
||||
+ error (_("Type %s has invalid length -1, check your GCC"),
|
||||
+ TYPE_NAME (type0));
|
||||
+
|
||||
if (TYPE_FLAGS (type0) & TYPE_FLAG_FIXED_INSTANCE)
|
||||
return type0;
|
||||
|
||||
|
18
gdb-6.8-gcc35998-ada-memory-trash.patch
Normal file
18
gdb-6.8-gcc35998-ada-memory-trash.patch
Normal file
@ -0,0 +1,18 @@
|
||||
--- ./gdb/dwarf2read.c 4 May 2008 17:27:01 -0000 1.260
|
||||
+++ ./gdb/dwarf2read.c 4 May 2008 18:26:20 -0000
|
||||
@@ -6754,7 +6754,14 @@ dwarf2_attr (struct die_info *die, unsig
|
||||
for (i = 0; i < die->num_attrs; ++i)
|
||||
{
|
||||
if (die->attrs[i].name == name)
|
||||
- return &die->attrs[i];
|
||||
+ {
|
||||
+ /* GCC PR ada/35998 workaround. */
|
||||
+ if (name == DW_AT_byte_size
|
||||
+ && DW_UNSND (&die->attrs[i]) == 0xffffffff)
|
||||
+ return NULL;
|
||||
+
|
||||
+ return &die->attrs[i];
|
||||
+ }
|
||||
if (die->attrs[i].name == DW_AT_specification
|
||||
|| die->attrs[i].name == DW_AT_abstract_origin)
|
||||
spec = &die->attrs[i];
|
9
gdb.spec
9
gdb.spec
@ -13,7 +13,7 @@ Version: 6.8
|
||||
|
||||
# The release always contains a leading reserved number, start it at 1.
|
||||
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
|
||||
Release: 8%{?_with_upstream:.upstream}%{?dist}
|
||||
Release: 9%{?_with_upstream:.upstream}%{?dist}
|
||||
|
||||
License: GPLv3+
|
||||
Group: Development/Debuggers
|
||||
@ -355,6 +355,9 @@ Patch316: gdb-6.8-sparc-fix.patch
|
||||
# Silence memcpy check which returns false positive (sparc64)
|
||||
Patch317: gdb-6.8-sparc64-silence-memcpy-check.patch
|
||||
|
||||
# Fix memory trashing on binaries from GCC Ada (workaround GCC PR 35998).
|
||||
Patch318: gdb-6.8-gcc35998-ada-memory-trash.patch
|
||||
|
||||
BuildRequires: ncurses-devel glibc-devel gcc make gzip texinfo dejagnu gettext
|
||||
BuildRequires: flex bison sharutils expat-devel
|
||||
Requires: readline
|
||||
@ -532,6 +535,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
||||
%patch315 -p1
|
||||
%patch316 -p1
|
||||
%patch317 -p1
|
||||
%patch318 -p1
|
||||
%patch124 -p1
|
||||
|
||||
find -name "*.orig" | xargs rm -f
|
||||
@ -781,6 +785,9 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu May 22 2008 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8-9
|
||||
- Fix memory trashing on binaries from GNAT/Ada (workaround GCC PR 35998).
|
||||
|
||||
* Thu May 15 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 6.8-8
|
||||
- Silence memcpy check which returns false positive (sparc64)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user