public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Why not a label for .debug_frame?
@ 2001-09-24 17:37 Stan Shebs
  2001-09-24 18:13 ` Richard Henderson
  2001-09-24 22:56 ` Robert Lipe
  0 siblings, 2 replies; 4+ messages in thread
From: Stan Shebs @ 2001-09-24 17:37 UTC (permalink / raw)
  To: gcc

I've been looking into adopting Dwarf 2 for Darwin / Mac OS X, and
as part of that, tried enabling -gdwarf-2 in GCC's Darwin port.

However, I have a problem where the name of the section .debug_frame
is used as a symbol (a "section symbol"), which is an ELFism not
supported by the Mach-O assembler.  I'm a little loath to change
the assembler to create section symbols, and have been looking at
how the .debug_frame symbol is used.  In the process I noticed that
other sections such as .debug_info and .debug_abbrev have labels
generated for them, and subsequent code refers to those labels
rather than the sections.  (To help jog memories, the patch was
from Robert Lipe for SVR5, and may be seen at
http://gcc.gnu.org/ml/gcc-patches/1999-02n/msg00802.html .)

So my question is, why isn't .debug_frame handled this way too?
Inertia perhaps?

Stan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Why not a label for .debug_frame?
  2001-09-24 17:37 Why not a label for .debug_frame? Stan Shebs
@ 2001-09-24 18:13 ` Richard Henderson
  2001-09-24 22:56 ` Robert Lipe
  1 sibling, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2001-09-24 18:13 UTC (permalink / raw)
  To: Stan Shebs; +Cc: gcc

On Mon, Sep 24, 2001 at 05:35:38PM -0700, Stan Shebs wrote:
> So my question is, why isn't .debug_frame handled this way too?

Oversight?


r~

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Why not a label for .debug_frame?
  2001-09-24 17:37 Why not a label for .debug_frame? Stan Shebs
  2001-09-24 18:13 ` Richard Henderson
@ 2001-09-24 22:56 ` Robert Lipe
  2001-09-25 12:15   ` Stan Shebs
  1 sibling, 1 reply; 4+ messages in thread
From: Robert Lipe @ 2001-09-24 22:56 UTC (permalink / raw)
  To: Stan Shebs; +Cc: gcc

Stan Shebs wrote:
> I've been looking into adopting Dwarf 2 for Darwin / Mac OS X, and
> as part of that, tried enabling -gdwarf-2 in GCC's Darwin port.

As a maintainer, you're unlikely to regret it. 

> However, I have a problem where the name of the section .debug_frame
> is used as a symbol (a "section symbol"), which is an ELFism not
> supported by the Mach-O assembler.  I'm a little loath to change

I'm not convinced it's an ELF-ism at all.  I think it's something that
just happens to be supported by GNU as.

> the assembler to create section symbols, and have been looking at
> how the .debug_frame symbol is used.  In the process I noticed that
> other sections such as .debug_info and .debug_abbrev have labels
> generated for them, and subsequent code refers to those labels
> rather than the sections.  (To help jog memories, the patch was
> from Robert Lipe for SVR5, and may be seen at
> http://gcc.gnu.org/ml/gcc-patches/1999-02n/msg00802.html .)
> 
> So my question is, why isn't .debug_frame handled this way too?
> Inertia perhaps?

I selfishly scratched only the rash that was affecting me.  I was in
code that was well above my head.  I beat it until submission so that my
target bootstrapped and the debugger worked at least trivially.  So I
made no promises that I took the moral high roads on that.   

RJL

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Why not a label for .debug_frame?
  2001-09-24 22:56 ` Robert Lipe
@ 2001-09-25 12:15   ` Stan Shebs
  0 siblings, 0 replies; 4+ messages in thread
From: Stan Shebs @ 2001-09-25 12:15 UTC (permalink / raw)
  To: Robert Lipe; +Cc: gcc

Robert Lipe wrote:
> 
> > However, I have a problem where the name of the section .debug_frame
> > is used as a symbol (a "section symbol"), which is an ELFism not
> > supported by the Mach-O assembler.  I'm a little loath to change
> 
> I'm not convinced it's an ELF-ism at all.  I think it's something that
> just happens to be supported by GNU as.

Yeah, somehow I always "just knew" this, but I couldn't find any
documented reference to the behavior, and finally had to verify by
looking at gas sources...

> > So my question is, why isn't .debug_frame handled this way too?
> > Inertia perhaps?
> 
> I selfishly scratched only the rash that was affecting me.  I was in
> code that was well above my head.  I beat it until submission so that my
> target bootstrapped and the debugger worked at least trivially.  So I
> made no promises that I took the moral high roads on that.

No prob, now that I have a similar itch to scratch (image of
hundreds of engineers all furiously scratching themselves, bleah),
I'll work up the patch.

Stan

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-09-25 12:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-24 17:37 Why not a label for .debug_frame? Stan Shebs
2001-09-24 18:13 ` Richard Henderson
2001-09-24 22:56 ` Robert Lipe
2001-09-25 12:15   ` Stan Shebs

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).