Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Berlin <dberlin@dberlin.org>
To: "H. J. Lu" <hjl@lucon.org>
Cc: Daniel Jacobowitz <drow@false.org>,
	gcc@gcc.gnu.org,  GDB <gdb@sources.redhat.com>
Subject: Re: Gdb generates location list without DW_AT_frame_base
Date: Fri, 31 Dec 2004 20:16:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.60.0412311512420.6844@dberlin.org> (raw)
In-Reply-To: <20041231201127.GA4344@lucon.org>

>
> This patch seems to generate better debug info.

You missed a whole bunch of cases where we are arbitrarily passing true to 
mem_loc_descriptor or loc_descriptor.
You also *can* generate a frame base for the testcase you sent me, we just 
don't use all the info we could to generate it.
See the last patch i sent you which adds code to the 
add_location_or_const_value_attribute routine.

Also, whether we generate a frame_base has *nothing* to do with the 
setting of TREE_PUBLIC.

The code says:

else if (!DECL_EXTERNAL (decl))
{
....


       /* Define the "frame base" location for this routine.  We use the
 	 frame pointer or stack pointer registers, since the RTL for local
 	 variables is relative to one of them.  */
       if (frame_base_decl && lookup_decl_loc (frame_base_decl) != NULL)
 	{
 	  add_location_or_const_value_attribute (subr_die, 
frame_base_decl,
 						 DW_AT_frame_base);
 	}
       else
 	{
 	  fp_reg
 	    = frame_pointer_needed ? hard_frame_pointer_rtx : 
stack_pointer_rtx;
 	  add_AT_loc (subr_die, DW_AT_frame_base, reg_loc_descriptor 
(fp_reg));
 	}

}


  reply	other threads:[~2004-12-31 20:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-22  1:16 Is this a gcc, gdb or readelf bug? H. J. Lu
2004-12-22 11:09 ` Nick Clifton
2004-12-22 18:25   ` H. J. Lu
2004-12-23  3:43     ` Daniel Jacobowitz
2004-12-30 19:24       ` GDB 6.3 assumes that DW_AT_frame_base exists H. J. Lu
2004-12-30 19:36         ` H. J. Lu
2004-12-30 19:56           ` H. J. Lu
2004-12-30 20:07             ` Daniel Jacobowitz
2004-12-30 20:23               ` Gdb generates location list without DW_AT_frame_base H. J. Lu
2004-12-30 20:28                 ` Daniel Jacobowitz
2004-12-30 20:52                   ` Gdb generates DW_OP_fbreg in " H. J. Lu
2004-12-30 20:56                   ` Gdb generates " Daniel Berlin
2004-12-30 21:05                     ` H. J. Lu
2004-12-31  0:35                       ` Daniel Berlin
2004-12-31 19:57                         ` H. J. Lu
2004-12-31 20:09                           ` Daniel Berlin
2004-12-31 20:11                           ` H. J. Lu
2004-12-31 20:16                             ` Daniel Berlin [this message]
     [not found]                         ` <20041231163806.GA1335@lucon.org>
     [not found]                           ` <Pine.LNX.4.60.0412311158280.27590@dberlin.org>
     [not found]                             ` <20041231184405.GA2182@lucon.org>
     [not found]                               ` <Pine.LNX.4.60.0412311451060.6844@dberlin.org>
     [not found]                                 ` <Pine.LNX.4.60.0412311509360.6844@dberlin.org>
     [not found]                                   ` <20041231215010.GA5722@lucon.org>
     [not found]                                     ` <20041231215443.GA5853@lucon.org>
     [not found]                                       ` <Pine.LNX.4.60.0412311656360.6844@dberlin.org>
     [not found]                                         ` <20041231220324.GA5987@lucon.org>
2005-01-01 19:15                                           ` gcc 4.0 " H. J. Lu
2005-01-01 20:09                                             ` Daniel Jacobowitz
2005-01-01 20:50                                             ` Daniel Berlin

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=Pine.LNX.4.60.0412311512420.6844@dberlin.org \
    --to=dberlin@dberlin.org \
    --cc=drow@false.org \
    --cc=gcc@gcc.gnu.org \
    --cc=gdb@sources.redhat.com \
    --cc=hjl@lucon.org \
    /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