This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]