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: Avoid potential crashes with --gc-sections and low addresses


On Fri, Jun 27, 2008 at 04:37:50PM +0100, Jonathan Larmour wrote:
> --- gdb/dwarf2-frame.c~	2008-05-04 00:24:17.000000000 +0100
> +++ gdb/dwarf2-frame.c	2008-06-20 17:06:04.000000000 +0100
> @@ -1795,7 +1795,8 @@ decode_frame_entry_1 (struct comp_unit *
>  
>        fde->eh_frame_p = eh_frame_p;
>  
> -      add_fde (unit, fde);
> +      if (fde->initial_location)
> +          add_fde (unit, fde);
>      }
>  
>    return end;

This won't work if there is code actually at zero.  Take a look at the
.debug_info reader to see how we handled this case for symbolic debug info.

-- 
Daniel Jacobowitz
CodeSourcery


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