[Dwarf-Discuss] name lookup w/ using directives
John DelSignore
jdelsign@totalviewtech.com
Fri Aug 22 19:19:15 GMT 2008
Kendrick Wong wrote:
>
> 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.
Wait a tick... How the heck can that happen? It implies that a single compilation unit can contain multiple languages, which I though was not possible.
What is bringing things together? Do you have a compiler that is capable of compiling multiple languages in the same compilation unit? Or do you have a smart linker that is capable of inlining functions at link time? IIRC, the AIX linker could do this with C++ code, and it got it right most of the time.
Cheers, John D.
> 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*
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Dwarf-Discuss mailing list
> Dwarf-Discuss at lists.dwarfstd.org
> http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org
More information about the Dwarf-discuss
mailing list