public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* symtab/2472: Dwarf problem with functions close to address 0x0 if linker gc in use
@ 2008-06-27 18:48 jifl
  0 siblings, 0 replies; only message in thread
From: jifl @ 2008-06-27 18:48 UTC (permalink / raw)
  To: gdb-gnats


>Number:         2472
>Category:       symtab
>Synopsis:       Dwarf problem with functions close to address 0x0 if linker gc in use
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 27 18:48:02 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     jifl@ecoscentric.com
>Release:        gdb-6.8
>Organization:
>Environment:

>Description:
As described here:
http://sourceware.org/ml/gdb-patches/2008-06/msg00497.html
linker garbage collection removes functions, but can leave behind the DWARF2 frame info. The frames end up marked with location 0. Normally GDB gets away with this, but not if there are genuine functions close to 0. If that happens dwarf2_frame_find_fde can get a bad match on the wrong function.

The patch in the associated mail http://sourceware.org/ml/gdb-patches/2008-06/msg00498.html also contained a suggested fix. But as per http://sourceware.org/ml/gdb-patches/2008-06/msg00503.html there could be a problem if there are functions that really do start at address 0x0.

The suggestion is to "Take a look at the debug_info reader to see how we handled this case for symbolic debug info." which is beyond the scope of what I can manage without taking a while to get up to speed with the intricacies of the dwarf2 reader, so hopefully this bug submission will ensure the issue is not lost.
>How-To-Repeat:
I have not been able to find a way to demonstrate this in a target-independent way. Even a hacked around native linux linker script (producing executables that could never run) will stick main off at 0x1a3 - quite a bit from 0.

I was originally able to reproduce it with an in-house port to an embedded board.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-06-27 18:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-27 18:48 symtab/2472: Dwarf problem with functions close to address 0x0 if linker gc in use jifl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).