]> git.pld-linux.org Git - packages/gdb.git/blame - gdb-bz631575-gdb-index-nobits.patch
- updated (performance fixes).
[packages/gdb.git] / gdb-bz631575-gdb-index-nobits.patch
CommitLineData
51a5ef0f
PS
1http://sourceware.org/ml/gdb-patches/2010-09/msg00183.html
2Subject: [patch] .gdb_index: Do not crash on NOBITS
3
4Hi,
5
6elfutils-0.148 still do not contain patch of its GIT
7804e9ca4d644e64a6125307cbf0a0b89477d7611 where the .gdb_index section has been
8also split into the separate debug info file.
9
10Due to it binaries split using elfutils-0.148 contain
11 [38] .gdb_index NOBITS 0000000000000000 0000338c
12instead of expected
13 [28] .gdb_index PROGBITS 0000000000000000 0000211c
14
15and due to it GDB while reading the file can error() by:
16Reading symbols from x.debug...Dwarf Error: Can't read DWARF data from 'x.debug'
17
18which should not be fatal but due to some other bugs therein it can crash GDB.
19
20The wrong separate debug info file is for example:
21http://kojipkgs.fedoraproject.org/packages/glibc/2.12.90/10/x86_64/glibc-debuginfo-2.12.90-10.x86_64.rpm
22/usr/lib/debug/lib64/libutil-2.12.90.so.debug
23
24OK to check-in?
25
26It does not attempt to use .gdb_index from the main binary, it will just
27disable .gdb_index usage on these binaries.
28
29
30Thanks,
31Jan
32
33
34http://sourceware.org/ml/gdb-cvs/2010-09/msg00062.html
35
36### src/gdb/ChangeLog 2010/09/08 19:09:42 1.12162
37### src/gdb/ChangeLog 2010/09/08 19:49:28 1.12163
38## -1,3 +1,7 @@
39+2010-09-08 Jan Kratochvil <jan.kratochvil@redhat.com>
40+
41+ * dwarf2read.c (dwarf2_read_index): Return on no SEC_HAS_CONTENTS.
42+
43 2010-09-08 Daniel Jacobowitz <dan@codesourcery.com>
44
45 * dwarf2read.c (read_structure_type): Move processing of
46--- src/gdb/dwarf2read.c 2010/09/08 19:09:42 1.452
47+++ src/gdb/dwarf2read.c 2010/09/08 19:49:28 1.453
48@@ -1904,6 +1904,13 @@
49 if (dwarf2_per_objfile->gdb_index.asection == NULL
50 || dwarf2_per_objfile->gdb_index.size == 0)
51 return 0;
52+
53+ /* Older elfutils strip versions could keep the section in the main
54+ executable while splitting it for the separate debug info file. */
55+ if ((bfd_get_file_flags (dwarf2_per_objfile->gdb_index.asection)
56+ & SEC_HAS_CONTENTS) == 0)
57+ return 0;
58+
59 dwarf2_read_section (objfile, &dwarf2_per_objfile->gdb_index);
60
61 addr = dwarf2_per_objfile->gdb_index.buffer;
This page took 0.032498 seconds and 4 git commands to generate.