Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tcf-dev] Problems with mangled C symbols without namespace

Hi,

We are seeing some issues with finding symbols after updating the TCF agent, because of an one year old fix for name spaces in C++.

 

The fix “TCF Agent: Symbols Service: fixed search of definition for a declaration in a name space in C++” introduced a requirement for a namespace tag in the symbols unit in order to add Dwarf symbols with add_pub_names from create_pub_names (in dwarfcache.c).

We see a case were a GHS C compiler mangles symbols (they are named something like foo..2Fpath1..2Fpath. for the symbol foo) but the compile unit (or any unit) does not contain any DW_TAG_namespace. Previous to the mentioned fix the symbol would be found when searching for ‘foo’ as it could be found as that in the Dwarf information. After this fix that symbol is no longer found.

 

My question is that in that add_namespace function (in dwarfcache.c) there is an exception for the ADA95 language (ns->mCompUnit->mLanguage == LANG_ADA95), should not the namespace requirement just apply to C++? Or does this apply to other languages (the patch indicates that this is just for C++)? Changing that line to “ns->mCompUnit->mLanguage =! LANG_C_PLUS_PLUS” or adding exceptions for the different C languages in dwarf.h would solve our problem.

 

Best Regards,

Andreas Ragnerstam

 

----------------------------------------------------------------------
Intel Sweden AB
Registered Office: Isafjordsgatan 30B, 164 40 Kista, Stockholm, Sweden
Registration Number: 556189-6027

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


Back to the top