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 Dec 1, 2003, at 2:09 PM, David Carlton wrote:


On Mon, 1 Dec 2003 11:58:26 -0600, Benjamin Kosnik <bkoz@redhat.com> said:

Attached is a patch that applies without errors to today's sources. I
have verified that it bootstraps and adds no new regressions.

Thanks to everybody who's gotten this applied so quickly - I really appreciate it.

It's not applied yet, it still requires approval.
One question:

+ /* Force out any required namespaces to be able to output DECL,
+ and return the new context_die for it, if it's changed. */
+ static dw_die_ref
+ setup_namespace_context (tree decl, dw_die_ref context_die)
+ {
+ /* Force out the namespace. */
+ if (!DECL_ABSTRACT (decl) && DECL_CONTEXT (decl) && TREE_CODE (DECL_CONTEXT (decl)) == NAMESPACE_DECL)

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.


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.



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