public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [patch] .gdb_index: Fix Ada regression
@ 2010-09-14 21:40 Jan Kratochvil
  2010-09-14 22:45 ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kratochvil @ 2010-09-14 21:40 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches, Joel Brobecker

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch] .gdb_index: Fix Ada regression
  2010-09-14 21:40 [patch] .gdb_index: Fix Ada regression Jan Kratochvil
@ 2010-09-14 22:45 ` Tom Tromey
  2010-09-15  3:29   ` Jan Kratochvil
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2010-09-14 22:45 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: gdb-patches, Joel Brobecker

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> During my tests with `set language ada' I could not lookup non-Ada symbols
Jan> anyway so I believe the patch is OK but sure it needs an Ada-wise review.

The comment explains it all.  Thanks.

Jan> 2010-09-14  Jan Kratochvil  <jan.kratochvil@redhat.com>

Jan> 	* dwarf2read.c (dw2_map_ada_symtabs): Remove the internal_error.
Jan> 	Update the comment.

This is ok.

Tom

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch] .gdb_index: Fix Ada regression
  2010-09-14 22:45 ` Tom Tromey
@ 2010-09-15  3:29   ` Jan Kratochvil
  2010-09-15  7:29     ` Joel Brobecker
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kratochvil @ 2010-09-15  3:29 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches, Joel Brobecker

On Tue, 14 Sep 2010 23:20:48 +0200, Tom Tromey wrote:
> >>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> Jan> 2010-09-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 
> Jan> 	* dwarf2read.c (dw2_map_ada_symtabs): Remove the internal_error.
> Jan> 	Update the comment.
> 
> This is ok.

I thought about the Ada review but OK, checked-in:
	http://sourceware.org/ml/gdb-cvs/2010-09/msg00103.html


Thanks,
Jan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch] .gdb_index: Fix Ada regression
  2010-09-15  3:29   ` Jan Kratochvil
@ 2010-09-15  7:29     ` Joel Brobecker
  0 siblings, 0 replies; 4+ messages in thread
From: Joel Brobecker @ 2010-09-15  7:29 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: Tom Tromey, gdb-patches

> I thought about the Ada review but OK, checked-in:
> 	http://sourceware.org/ml/gdb-cvs/2010-09/msg00103.html

I'm much more comfortable with Tom reviewing this part, as I don't
know this area of the code all that well... (Thanks, Tom!).

-- 
Joel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-09-14 21:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-14 21:40 [patch] .gdb_index: Fix Ada regression Jan Kratochvil
2010-09-14 22:45 ` Tom Tromey
2010-09-15  3:29   ` Jan Kratochvil
2010-09-15  7:29     ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).