[Dwarf-Discuss] name lookup w/ using directives

Kendrick Wong kendrick@ca.ibm.com
Fri Aug 22 18:53:49 GMT 2008


Michael wrote: 
> Inlining from Fortran into C++ clearly isn't going to be based on the
> source.  Given the differences in how Fortran and C++ pass parameters,
> I'm unclear how parameter binding might occur.  What do you do with
> C++ references or Fortran value returns.

Taking a simpler case, where there is no parameter on the function call: a 
C++ function has inlined a Fortran function.  In the debug information, 
data structures used by both functions are brought together into a single 
compilation unit.  The compilation unit is now made up of two different 
languages.  Since the name-lookup semantics for DW_TAG_imported_module is 
different depending on the language, debugger needs a way to differentiate 
between the two types.  (The language attribute on the CU doesn't help in 
this case).

I guess an easy way to solve this problem is to add an DW_AT_language 
attribute to the TAG.  (And if the language attribute is missing, then use 
the CU language attribute).

Thanks,
Regards,

Kendrick Wong 
z/OS C/C++ Compiler 
Common Debug Architecture 
C2/YGK/8200/MKM 
kendrick at ca.ibm.com 
Office:905-413-2865 Fax:905-413-4839 Tie:313-2865 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dwarfstd.org/private.cgi/dwarf-discuss-dwarfstd.org/attachments/20080822/50f51ad9/attachment.htm>



More information about the Dwarf-discuss mailing list