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

26bbde
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
26bbde
26bbde
26bbde
Index: gdb-7.7.90.20140613/gdb/symtab.c
26bbde
===================================================================
26bbde
--- gdb-7.7.90.20140613.orig/gdb/symtab.c	2014-06-13 21:52:06.219338401 +0200
26bbde
+++ gdb-7.7.90.20140613/gdb/symtab.c	2014-06-13 21:55:02.753531885 +0200
26bbde
@@ -2394,6 +2394,13 @@ find_pc_sect_line (CORE_ADDR pc, struct
26bbde
 	     SYMBOL_LINKAGE_NAME (msymbol)); */
26bbde
 	  ;
26bbde
 	/* fall through */
26bbde
+	/* `msymbol' trampoline may be located before its .text symbol
26bbde
+	   but this text symbol may be the address we were looking for.
26bbde
+	   Avoid `find_pc_sect_line'<->`find_pc_line' infinite loop.
26bbde
+	   Red Hat Bug 218379.  */
26bbde
+	else if (BMSYMBOL_VALUE_ADDRESS (mfunsym) == pc)
26bbde
+	  warning ("In stub for %s (0x%s); interlocked, please submit the binary to http://bugzilla.redhat.com", MSYMBOL_LINKAGE_NAME (msymbol.minsym), paddress (target_gdbarch (), pc));
26bbde
+	/* fall through */
26bbde
 	else
26bbde
 	  return find_pc_line (BMSYMBOL_VALUE_ADDRESS (mfunsym), 0);
26bbde
       }