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] [C++/DWARF] Add 'using' support - take 3



On Jan 26, 2004, at 12:18 PM, Jason Merrill wrote:


On Mon, 26 Jan 2004 11:01:30 -0800, Devang Patel <dpatel@apple.com> wrote:
On Jan 23, 2004, at 12:50 PM, Jason Merrill wrote:

+ /* Enum to distinguish imported modules vs. decls.  */
+ enum dbg_module_or_decl
+   {
+     DBG_IMPORTED_MODULE,
+     DBG_IMPORTED_DECL
+   };

Why did we need this, again? It seems to me that we should be able to
tell which it is based on the decl passed. Sorry I didn't mention this
before; I thought of it when reviewing your last patch, but looking back
over my mail I don't see it.

I want to use same debug hook (I'll rename it appropriately later) to emit
DW_AT_Friend, DW_TAG_Try_Block, DW_TAG_Catch_Block, DW_TAG_Thrown_Type
etc...
so I need some one enum.

Hmm. This sort of approach makes sense for namespace-scope usings, because
like other top-level declarations, we want to feed them to the debugging
back end when we see them. It's acceptable for local and class-scope
usings in the interests of using the same code. I'm dubious about
extending it to other constructs which do have a natural scope.


In particular, there's no way to handle try/catch properly using this sort
of scheme, since they need to be nested properly wrt lexical block debug
entries. Besides, we have a language-independent EH framework; the debug
info should be generated from that, not from front end hooks.

OK. GCC's EH framework is still magic for me. It'd be helpful if you approve new patch, I just posted few minutes ago, with a condition that that I remove this enum before checking-in.

*************** gen_subprogram_die (tree decl, dw_die_re
! 	  remove_children (subr_die);
--- 10748,10757 ----
! 	  remove_child_TAG (subr_die, DW_TAG_formal_parameter);

What other children will there be?

At least newly added DW_TAG_Imported_Module or Decl die.

Sure. Please add a comment to that effect.

I will.


Thank you,
--
Devang


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