Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org, Joel Brobecker <brobecker@adacore.com>
Subject: [patch] .gdb_index: Fix Ada regression
Date: Tue, 14 Sep 2010 21:40:00 -0000	[thread overview]
Message-ID: <20100914205711.GA10361@host1.dyn.jankratochvil.net> (raw)

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  <jan.kratochvil@redhat.com>

	* 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


             reply	other threads:[~2010-09-14 20:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-14 21:40 Jan Kratochvil [this message]
2010-09-14 22:45 ` Tom Tromey
2010-09-15  3:29   ` Jan Kratochvil
2010-09-15  7:29     ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100914205711.GA10361@host1.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox