This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] Fix Java regression (Re: [rfc] Consoldiate prologue skipping code - fix expand_line_sal_maybe internal error)
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: gdb-patches at sourceware dot org
- Cc: keiths at redhat dot com
- Date: Fri, 9 Apr 2010 17:33:12 +0200 (CEST)
- Subject: Re: [rfc] Fix Java regression (Re: [rfc] Consoldiate prologue skipping code - fix expand_line_sal_maybe internal error)
> Index: gdb/symtab.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/symtab.c,v
> retrieving revision 1.230
> diff -u -p -r1.230 symtab.c
> --- gdb/symtab.c 26 Mar 2010 19:41:50 -0000 1.230
> +++ gdb/symtab.c 29 Mar 2010 18:49:22 -0000
> @@ -2295,6 +2295,18 @@ find_function_start_sal (struct symbol *
> sal = find_pc_sect_line (BLOCK_START (SYMBOL_BLOCK_VALUE (sym)),
> SYMBOL_OBJ_SECTION (sym), 0);
>
> + /* We always should have a line for the function start address.
> + If we don't, something is odd. Create a plain SAL refering
> + just the PC and hope that skip_prologue_sal (if requested)
> + can find a line number for after the prologue. */
> + if (sal.pc < BLOCK_START (SYMBOL_BLOCK_VALUE (sym)))
> + {
> + init_sal (&sal);
> + sal.pspace = current_program_space;
> + sal.pc = BLOCK_START (SYMBOL_BLOCK_VALUE (sym));
> + sal.section = SYMBOL_OBJ_SECTION (sym);
> + }
> +
I've checked this in now.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com