public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mark Mitchell <mark@codesourcery.com>
To: Geoffrey Keating <geoffk@apple.com>
Cc: Eric Botcazou <ebotcazou@adacore.com>,
	  Daniel Jacobowitz <drow@false.org>,
	 gcc-patches List <gcc-patches@gcc.gnu.org>,
	  Andrew Haley <aph-gcc@littlepinkcloud.com>
Subject: Re: Don't set DECL_IGNORED_P on a cdtor function
Date: Tue, 09 Oct 2007 21:03:00 -0000	[thread overview]
Message-ID: <470BECA5.3070801@codesourcery.com> (raw)
In-Reply-To: <05DDE86C-505D-46FD-9594-C11331D0D4BA@apple.com>

Geoffrey Keating wrote:

>>>> The key issues are that (a) we have no source for these
>>>> compiler-generated functions, and (b) they don't correspond to anything
>>>> in the source program.  If I say "step" off the end of a C++ "main", I
>>>> don't want to end up in one of these functions; I want to end up in the
>>>> first C++ destructor being called by them.  That's the C++ view of the
>>>> world; these cdtor functions are just implementation details.

> The entire paragraph under 'Eric Botcazou wrote' lists reasons why my
> patch is correct.
> 
> "(a)": well, if you don't have source, tell the debugger that, rather
> than having the debugger associate it with the last line in the previous
> function.

In practice, what happens with your patch?  What file/line information
(if any) is associated with the function?

(I'd rather hope that the debugger was clever enough to associate
regions with no debug information with the nearby ELF (or equivalent)
object file symbols, rather than glomming it onto the previous function,
but that's a separate issue.)

> "(b)": this is what DECL_ARTIFICIAL is for, but it has no effect if
> there's no debug information.

I do see a good argument for generating debug info for these functions:
language-level constructors and destructors may be inlined into them.
So, I guess we'd ideally like to have most of the function be invisible
to the debugger, but we'd like the inlined functions to show up.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713

  reply	other threads:[~2007-10-09 21:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-04 21:23 Geoffrey Keating
2007-10-04 21:36 ` Daniel Jacobowitz
2007-10-04 21:58   ` Eric Botcazou
2007-10-04 22:05     ` Daniel Jacobowitz
2007-10-05  5:57       ` Eric Botcazou
2007-10-04 22:13   ` Geoffrey Keating
2007-10-04 22:55     ` Daniel Jacobowitz
2007-10-05  7:33       ` Eric Botcazou
2007-10-05  8:55         ` Eric Botcazou
2007-10-05 14:47     ` Daniel Jacobowitz
2007-10-05 14:52       ` Andrew Haley
2007-10-05 15:11         ` Daniel Jacobowitz
2007-10-06 16:04           ` Eric Botcazou
2007-10-07  9:28             ` Eric Botcazou
2007-10-08 22:27               ` Mark Mitchell
2007-10-09  0:18                 ` Eric Botcazou
2007-10-09  0:35                   ` Mark Mitchell
2007-10-09  4:30                     ` Geoffrey Keating
2007-10-09 21:03                       ` Mark Mitchell [this message]
2007-10-09 21:08                         ` Eric Botcazou

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=470BECA5.3070801@codesourcery.com \
    --to=mark@codesourcery.com \
    --cc=aph-gcc@littlepinkcloud.com \
    --cc=drow@false.org \
    --cc=ebotcazou@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=geoffk@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).