Index: linespec.c =================================================================== RCS file: /cvs/src/src/gdb/linespec.c,v retrieving revision 1.18 diff -c -w -r1.18 linespec.c *** linespec.c 5 Apr 2002 22:04:41 -0000 1.18 --- linespec.c 23 Jul 2002 01:09:59 -0000 *************** *** 1070,1076 **** --- 1070,1100 ---- if (val.symtab == 0) val.symtab = s; + /* If funfirstline is set, we need to look up the function + containing the line, and move past the prologue. */ + val.pc = 0; + if (funfirstline) + { + CORE_ADDR pc = 0; + + if (find_line_pc (val.symtab, val.line, &pc)) + { + struct symbol *func_sym; + struct symtab_and_line sal; + + func_sym = find_pc_function (pc); + if (func_sym) + { + sal = find_function_start_sal (func_sym, 1); + /* Don't move the line, just set the pc + to the right place. */ + if (val.line <= sal.line) + val.pc = sal.pc; + } + } + } + values.sals = (struct symtab_and_line *) xmalloc (sizeof (struct symtab_and_line)); values.sals[0] = val;