This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: Updated patch to output dwarf2 namespace debug info


On Mon, 1 Dec 2003 14:27:28 -0500, Daniel Berlin <dberlin@dberlin.org> said:
> On Dec 1, 2003, at 2:09 PM, David Carlton wrote:

>> The version of this patch that I've been working with doesn't have
>> the "!DECL_ABSTRACT(decl)" part of this.  What's its purpose?  (I
>> don't know much about GCC's internals.)

> To avoid forcing out namespaces for an copy of a function that got
> inlined somewhere else.

Ah, okay.  I was worried that it had something to do with abstract
declarations of classes; there, we certainly need the namespace DIE.

> Otherwise, we'd
> 1. Abort because we'd output abstract instances outside of their
> actual context
> 2. Generate wrong info in that we'd place inlined versions of
> functions in namespaces, in the namespaces, instead of where they were
> inlined into.

I'm not sure I quite understand this.  Say we have

namespace N {
  inline void funcToInline() {}
}

namespace M {
  void f() {
    funcToInline();
  }
}

Then what does the debug info look like?  I just want to make sure
that, in a mythical version of GDB that can actually deal with inlined
functions, 'break N::funcToInline' will still work.

David Carlton
carlton@kealia.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]