- Do not crash on broken separate debuginfo due to old elfutils (BZ 631575).
This commit is contained in:
parent
a7131289b9
commit
941489ae9f
|
@ -0,0 +1,61 @@
|
|||
http://sourceware.org/ml/gdb-patches/2010-09/msg00183.html
|
||||
Subject: [patch] .gdb_index: Do not crash on NOBITS
|
||||
|
||||
Hi,
|
||||
|
||||
elfutils-0.148 still do not contain patch of its GIT
|
||||
804e9ca4d644e64a6125307cbf0a0b89477d7611 where the .gdb_index section has been
|
||||
also split into the separate debug info file.
|
||||
|
||||
Due to it binaries split using elfutils-0.148 contain
|
||||
[38] .gdb_index NOBITS 0000000000000000 0000338c
|
||||
instead of expected
|
||||
[28] .gdb_index PROGBITS 0000000000000000 0000211c
|
||||
|
||||
and due to it GDB while reading the file can error() by:
|
||||
Reading symbols from x.debug...Dwarf Error: Can't read DWARF data from 'x.debug'
|
||||
|
||||
which should not be fatal but due to some other bugs therein it can crash GDB.
|
||||
|
||||
The wrong separate debug info file is for example:
|
||||
http://kojipkgs.fedoraproject.org/packages/glibc/2.12.90/10/x86_64/glibc-debuginfo-2.12.90-10.x86_64.rpm
|
||||
/usr/lib/debug/lib64/libutil-2.12.90.so.debug
|
||||
|
||||
OK to check-in?
|
||||
|
||||
It does not attempt to use .gdb_index from the main binary, it will just
|
||||
disable .gdb_index usage on these binaries.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
http://sourceware.org/ml/gdb-cvs/2010-09/msg00062.html
|
||||
|
||||
### src/gdb/ChangeLog 2010/09/08 19:09:42 1.12162
|
||||
### src/gdb/ChangeLog 2010/09/08 19:49:28 1.12163
|
||||
## -1,3 +1,7 @@
|
||||
+2010-09-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
+
|
||||
+ * dwarf2read.c (dwarf2_read_index): Return on no SEC_HAS_CONTENTS.
|
||||
+
|
||||
2010-09-08 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* dwarf2read.c (read_structure_type): Move processing of
|
||||
--- src/gdb/dwarf2read.c 2010/09/08 19:09:42 1.452
|
||||
+++ src/gdb/dwarf2read.c 2010/09/08 19:49:28 1.453
|
||||
@@ -1904,6 +1904,13 @@
|
||||
if (dwarf2_per_objfile->gdb_index.asection == NULL
|
||||
|| dwarf2_per_objfile->gdb_index.size == 0)
|
||||
return 0;
|
||||
+
|
||||
+ /* Older elfutils strip versions could keep the section in the main
|
||||
+ executable while splitting it for the separate debug info file. */
|
||||
+ if ((bfd_get_file_flags (dwarf2_per_objfile->gdb_index.asection)
|
||||
+ & SEC_HAS_CONTENTS) == 0)
|
||||
+ return 0;
|
||||
+
|
||||
dwarf2_read_section (objfile, &dwarf2_per_objfile->gdb_index);
|
||||
|
||||
addr = dwarf2_per_objfile->gdb_index.buffer;
|
11
gdb.spec
11
gdb.spec
|
@ -38,7 +38,7 @@ Version: 7.2
|
|||
|
||||
# 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: 2%{?_with_upstream:.upstream}%{dist}
|
||||
Release: 3%{?_with_upstream:.upstream}%{dist}
|
||||
|
||||
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and GFDL and BSD and Public Domain
|
||||
Group: Development/Debuggers
|
||||
|
@ -431,6 +431,9 @@ Patch496: gdb-bz568248-oom-is-error.patch
|
|||
# Workaround false GCC warning(s).
|
||||
Patch497: gdb-false-gcc-warning.patch
|
||||
|
||||
# Do not crash on broken separate debuginfo due to old elfutils (BZ 631575).
|
||||
Patch499: gdb-bz631575-gdb-index-nobits.patch
|
||||
|
||||
BuildRequires: ncurses-devel%{?_isa} texinfo gettext flex bison expat-devel%{?_isa}
|
||||
Requires: readline%{?_isa}
|
||||
BuildRequires: readline-devel%{?_isa}
|
||||
|
@ -685,6 +688,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
|||
%patch493 -p1
|
||||
%patch496 -p1
|
||||
%patch497 -p1
|
||||
%patch499 -p1
|
||||
|
||||
%patch393 -p1
|
||||
%patch335 -p1
|
||||
|
@ -1066,7 +1070,10 @@ fi
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Sat Sep 04 2010 Dennis Gilmore <dennis@ausil.us> - 7.2-2
|
||||
* Wed Sep 8 2010 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2-3.fc14
|
||||
- Do not crash on broken separate debuginfo due to old elfutils (BZ 631575).
|
||||
|
||||
* Sat Sep 04 2010 Dennis Gilmore <dennis@ausil.us> - 7.2-2.fc14
|
||||
- libinproctrace doesnt exist on sparc arches
|
||||
|
||||
* Fri Sep 3 2010 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2-1.fc14
|
||||
|
|
Loading…
Reference in New Issue