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

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