From 49707ab8651e65a565b404070f1362cf50a96fc1 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Wed, 15 Sep 2010 00:02:43 +0200 Subject: [PATCH] - Fix Ada regression when any .gdb_index library is present. --- gdb-gdbindex-ada-regression.patch | 50 +++++++++++++++++++++++++++++++ gdb.spec | 9 +++++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 gdb-gdbindex-ada-regression.patch diff --git a/gdb-gdbindex-ada-regression.patch b/gdb-gdbindex-ada-regression.patch new file mode 100644 index 0000000..9d67d58 --- /dev/null +++ b/gdb-gdbindex-ada-regression.patch @@ -0,0 +1,50 @@ +http://sourceware.org/ml/gdb-patches/2010-09/msg00273.html +Subject: [patch] .gdb_index: Fix Ada regression + +Hi, + +on a system with libraries using .gdb_index all the Ada testcases FAIL: + +Running ./gdb.ada/print_pc.exp ... +FAIL: gdb.ada/print_pc.exp: start inferior (GDB internal error) +FAIL: gdb.ada/print_pc.exp: p /x $pc + +dwarf2read.c:2374: internal-error: map_ada_symtabs called via index method + +FAIl is on Fedora 14 snapshot using gcc-debuginfo-4.5.1-3.fc14.x86_64 file: + /usr/lib/debug/lib64/libgcc_s-4.5.1-20100907.so.1.debug + +The regressions get fixed on x86_64-fedora14snapshot-linux-gnu by the attached +patch. No regressions on {x86_64,x86_64-m32,i686}-fedora14snapshot-linux-gnu. + +During my tests with `set language ada' I could not lookup non-Ada symbols +anyway so I believe the patch is OK but sure it needs an Ada-wise review. + + +Thanks, +Jan + + +gdb/ +2010-09-14 Jan Kratochvil + + * dwarf2read.c (dw2_map_ada_symtabs): Remove the internal_error. + Update the comment. + +--- a/gdb/dwarf2read.c ++++ b/gdb/dwarf2read.c +@@ -2369,10 +2369,9 @@ dw2_map_ada_symtabs (struct objfile *objfile, + domain_enum namespace, int wild, + void *data) + { +- /* For now, we don't support Ada, so this function can't be +- reached. */ +- internal_error (__FILE__, __LINE__, +- _("map_ada_symtabs called via index method")); ++ /* For now, we don't support Ada. Still the function can be called if the ++ current language is Ada for a non-Ada objfile using GNU index. As Ada ++ does not look for non-Ada symbols this function should just return. */ + } + + static void + diff --git a/gdb.spec b/gdb.spec index 5859107..2465953 100644 --- a/gdb.spec +++ b/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: 4%{?_with_upstream:.upstream}%{dist} +Release: 5%{?_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 @@ -437,6 +437,9 @@ Patch499: gdb-bz631575-gdb-index-nobits.patch # Fix symbol lookup misses methods of current class (BZ 631158, Sami Wagiaalla). Patch500: gdb-bz631158-cxx-this-lookup.patch +# Fix Ada regression when any .gdb_index library is present. +Patch501: gdb-gdbindex-ada-regression.patch + BuildRequires: ncurses-devel%{?_isa} texinfo gettext flex bison expat-devel%{?_isa} Requires: readline%{?_isa} BuildRequires: readline-devel%{?_isa} @@ -693,6 +696,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c %patch497 -p1 %patch499 -p1 %patch500 -p1 +%patch501 -p1 %patch393 -p1 %patch335 -p1 @@ -1074,6 +1078,9 @@ fi %endif %changelog +* Tue Sep 14 2010 Jan Kratochvil - 7.2-5.fc14 +- Fix Ada regression when any .gdb_index library is present. + * Sat Sep 11 2010 Jan Kratochvil - 7.2-4.fc14 - Fix symbol lookup misses methods of current class (BZ 631158, Sami Wagiaalla). - Fix python gdb.execute-to_string redirection (BZ 627506, with Paul Bolle).