This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: determining whether page 0 (or low addresses in general) is executable
- From: Daniel Jacobowitz <drow at false dot org>
- To: Doug Evans <dje at google dot com>
- Cc: gdb at sourceware dot org, ppluzhnikov at google dot com
- Date: Wed, 16 Apr 2008 15:33:46 -0400
- Subject: Re: determining whether page 0 (or low addresses in general) is executable
- References: <20080416192047.984F91C75AD@localhost>
On Wed, Apr 16, 2008 at 12:20:47PM -0700, Doug Evans wrote:
> Hi. We're trying to come up with a workaround for an apparent gcc/linker issue
> where debug info can be left behind that messes up backtraces.
> The erroneous debug info shouldn't be generated, but gdb could do a better
> job when faced with it.
Not much better; I would suggest effort be spent on the
linker/compiler limitations, instead. For instance moving debug info
into comdat sections.
I thought GNU ld only had this problem for .debug_info and already
edited out discarded FDEs from .debug_frame / .eh_frame. Are you
using GNU ld or gold? Maybe the linker only edits .eh_frame.
> *************** dwarf2_frame_find_fde (CORE_ADDR *pc)
> @@ -1585,6 +1608,13 @@
>
> while (fde)
> {
> + if (fde->initial_location + offset == 0
> + && !is_zero_page_executable ())
> + {
> + /* Ignore this FDE -- linker bug. */
> + fde = fde->next;
> + continue;
> + }
>
See has_section_at_zero in dwarf2read.c. It's just the same hack.
--
Daniel Jacobowitz
CodeSourcery