418be79
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
418be79
418be79
e5611bf
Index: gdb-6.8.50.20090803/gdb/symtab.c
8b1b3fd
===================================================================
e5611bf
--- gdb-6.8.50.20090803.orig/gdb/symtab.c	2009-08-03 16:09:36.000000000 +0200
e5611bf
+++ gdb-6.8.50.20090803/gdb/symtab.c	2009-08-03 16:13:13.000000000 +0200
e5611bf
@@ -2261,6 +2261,13 @@ find_pc_sect_line (CORE_ADDR pc, struct 
418be79
 	  /* See above comment about why warning is commented out */
418be79
 	  /* warning ("In stub for %s; unable to find real function/line info", SYMBOL_LINKAGE_NAME (msymbol)) */ ;
418be79
 	/* fall through */
418be79
+	/* `msymbol' trampoline may be located before its .text symbol
418be79
+	   but this text symbol may be the address we were looking for.
418be79
+	   Avoid `find_pc_sect_line'<->`find_pc_line' infinite loop.
418be79
+	   Red Hat Bug 218379.  */
418be79
+	else if (SYMBOL_VALUE (mfunsym) == pc)
e5611bf
+	  warning ("In stub for %s (0x%s); interlocked, please submit the binary to http://bugzilla.redhat.com", SYMBOL_LINKAGE_NAME (msymbol), paddress (target_gdbarch, pc));
418be79
+	/* fall through */
418be79
 	else
8b1b3fd
 	  return find_pc_line (SYMBOL_VALUE_ADDRESS (mfunsym), 0);
418be79
       }