Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Jim Ingham <jingham@apple.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch] Fix to processing end of function stab in dbxread.c
Date: Fri, 12 Jul 2002 10:46:00 -0000	[thread overview]
Message-ID: <20020712173056.GA989@nevyn.them.org> (raw)
In-Reply-To: <ACB33854-9512-11D6-AB35-00039379E320@apple.com>

On Thu, Jul 11, 2002 at 02:10:49PM -0700, Jim Ingham wrote:
> >I judge from your example that MacOSX has resolved addresses attached
> >to N_SLINE stabs, but not in ending N_FUN stabs?  GDB assumes that
> >function_start_offset applies to both of them equally (and it will be
> >zero if we expect both to be resolved).  On GNU/Linux both N_SLINE and
> >final N_FUN have offsets within the function.  I suspect that on some
> >Solaris variant N_SLINE and final N_FUN will both have resolved values.
> >In that case using last_function_start + valu will put us well outside
> >of the actual function, causing mayhem.
> 
> That's right.  MacOS X's linker does fix up the SLINE stabs, but it 
> does what stabs.texi says to do with the end of function stabs.
> 
> It would suprise me if there were a Solaris compile/linker that does 
> otherwise with the end of FUN stab.  After all, it seems like the 
> Solaris tools go out of their way to avoid having STABS that the linker 
> has to fix up.  Also, the comment in stabs.texi says "Recent versions 
> of GCC will mark the end of the function with an N_FUN symbol..."  
> Sounds like the Solaris compilers may not have this end of function FUN 
> stab at all.
> 
> Would somebody with access to a Solaris box with acc on it compile a 
> simple program with "-g" and see if it has this stab, and if so what 
> its value is?
> 
> I bet the code I suggested will work fine.

ACC is HP/UX, isn't it?  The Sun compiler is Sun Workshop CC.  In any
case, it appears that Solaris does not mark the end of functions with
stabs.  I'm satisfied; sorry for the runaround.

You might want to repost the patch not-mangled this time; since your
mail client persistently wraps things attaching it might be simplest.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2002-07-12 17:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-10 19:08 Jim Ingham
2002-07-11  2:42 ` Daniel Jacobowitz
2002-07-11 11:42   ` Jim Ingham
2002-07-11 11:52     ` Daniel Jacobowitz
2002-07-11 16:40       ` Jim Ingham
2002-07-12 10:46         ` Daniel Jacobowitz [this message]
2002-07-12 11:03           ` Jim Ingham
2003-02-18 15:41             ` Elena Zannoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020712173056.GA989@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jingham@apple.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox