Fix C++ type name collisions in xcpclient - #126
Conversation
|
Thanks for the precise report and for the pull request. Your analysis is right: DW_AT_name is the unqualified name, and the typedef has to be qualified with the enclosing namespaces or classes when the same name is used by different types. I started in parallel to you with an AI supported analysis and fix of the problem.
Your fixture cpp_type_name_collisions.cpp is now part of the xcpclient unit tests, with credits, so your case stays covered. There also is a new up to date documentation file on offline A2L generation. I tested with the no_a2l library configuration in absolute addressing mode and the C++ no_a2l example on Linux, have no hardware with FreeRTOS at the moment. I would be happy, if you could verify that the V2.1.14 xcpclient serves your needs in your project. Thanks ... |
Summary
Fix C++ type collisions when generating A2L definitions from DWARF information.
DWARF type entries generally provide an unqualified
DW_AT_name. Types with the same name in different C++ namespaces could therefore share an incorrect A2L typedef, causing instances to reference the wrong type definition.Changes
Testing
masterbranch and passes with this fix.Fixes #125