Blame SOURCES/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch

01917d
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
01917d
01917d
01917d
Index: gdb-7.5.50.20130118/gdb/symtab.c
01917d
===================================================================
01917d
--- gdb-7.5.50.20130118.orig/gdb/symtab.c	2013-01-18 23:53:22.009797788 +0100
01917d
+++ gdb-7.5.50.20130118/gdb/symtab.c	2013-01-18 23:53:51.044846777 +0100
01917d
@@ -2356,6 +2356,13 @@ find_pc_sect_line (CORE_ADDR pc, struct
01917d
 	     SYMBOL_LINKAGE_NAME (msymbol)); */
01917d
 	  ;
01917d
 	/* fall through */
01917d
+	/* `msymbol' trampoline may be located before its .text symbol
01917d
+	   but this text symbol may be the address we were looking for.
01917d
+	   Avoid `find_pc_sect_line'<->`find_pc_line' infinite loop.
01917d
+	   Red Hat Bug 218379.  */
01917d
+	else if (SYMBOL_VALUE (mfunsym) == pc)
01917d
+	  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));
01917d
+	/* fall through */
01917d
 	else
01917d
 	  return find_pc_line (SYMBOL_VALUE_ADDRESS (mfunsym), 0);
01917d
       }