gdb/gdb-6.5-bz218379-solib-tram...

22 lines
986 B
Diff

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