Index: i386-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/i386-tdep.c,v retrieving revision 1.225 diff -u -p -r1.225 i386-tdep.c --- i386-tdep.c 8 Aug 2006 21:36:46 -0000 1.225 +++ i386-tdep.c 9 Dec 2006 19:30:25 -0000 @@ -825,6 +825,29 @@ i386_skip_prologue (CORE_ADDR start_pc) CORE_ADDR pc; gdb_byte op; int i; + char *func_name; + CORE_ADDR func_addr, func_end = 0; + + /* See what the symbol table says. */ + + if (find_pc_partial_function (start_pc, &func_name, &func_addr, &func_end)) + { + struct symbol *sym; + struct symtab_and_line sal; + + /* Found a function. */ + sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL, NULL); + if (sym && SYMBOL_LANGUAGE (sym) != language_asm) + { + /* Don't use this trick for assembly source files. */ + sal = find_pc_line (func_addr, 0); + if ((sal.line != 0) && (sal.end < func_end)) + return sal.end; + } + } + + /* Can't find the prologue end in the symbol table, try it the hard way + by disassembling the instructions. */ cache.locals = -1; pc = i386_analyze_prologue (start_pc, 0xffffffff, &cache);