This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Avoid potential crashes with --gc-sections and low addresses
- From: Daniel Jacobowitz <drow at false dot org>
- To: Jonathan Larmour <jifl at eCosCentric dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 27 Jun 2008 12:41:06 -0400
- Subject: Re: Avoid potential crashes with --gc-sections and low addresses
- References: <48650919.707@eCosCentric.com> <4865094E.2000004@eCosCentric.com>
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