gdb/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
Jan Kratochvil 418be7985a - Try to reduce sideeffects of skipping ppc .so libs trampolines (BZ
218379).
- Fix lockup on trampoline vs. its function lookup; unreproducible (BZ
    218379).
- Resolves: rhbz#218379
- Related: rhbz#192964
2006-12-23 21:32:21 +00:00

21 lines
1.0 KiB
Diff

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
diff -u -rup -x testsuite gdb-6.5-orig/gdb/symtab.c gdb-6.5/gdb/symtab.c
--- gdb-6.5-orig/gdb/symtab.c 2006-12-17 11:59:52.000000000 +0100
+++ gdb-6.5/gdb/symtab.c 2006-12-17 11:56:03.000000000 +0100
@@ -2139,6 +2139,13 @@ find_pc_sect_line (CORE_ADDR pc, struct
/* See above comment about why warning is commented out */
/* warning ("In stub for %s; unable to find real function/line info", 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), paddr (pc));
+ /* fall through */
else
return find_pc_line (SYMBOL_VALUE (mfunsym), 0);
}