Qualified names
Different levels of qualification are recognized, therefore ambiguity can arise and symbol evaluation can return several hits.
Fully qualified name is constructed:
<filename>#<funcname>##<namespace><nakedname><signature>,,<downloadfile>
Fully qualified name would look like this:
“test1.cpp#”N::N::A::B::f(int,int),,test.elf |
for a C++ function or |
“test1.cpp#N::N::A::B::f(int,int)##”s_n,,test.elf |
for a C++ function static variable |
Generated names in winIDEA are not available, but the format is recognized by the evaluator.
Almost all combinations are possible (and optional)
File Scope |
Func Scope |
Namespace |
Signature [f] |
DLF |
---|---|---|---|---|
test1.cpp# |
- |
:: |
() |
,,test1.elf |
test2.cpp# |
f## |
B:: |
(int I, int J) |
,,test2.elf |
B::f## |
A::B:: |
(int I, int J) const |
||
A::B::f## |
N::A::B:: |
|||
N::A::B::f## |
N::N::A::B:: |
|||
N::N::A::B::f## |
Programming languages such as C and C++ allow collisions between symbol names. This means that multiple symbols use the same name, but are in different scopes. C allows collisions of file and function static objects, whereas C++ allows additional collisions on multiple levels (namespaces, classes, function overloads). To avoid ambiguity when multiple symbols use the same name, but are in different scopes, qualified names should be used. When winIDEA displays symbols it could happen that several different symbols with the same name are shown.
To avoid confusion winIDEA offers two levels of symbol qualification:
•Reasonably-Qualified name
•Unique-enough name
This is a name which removes redundant information from fully qualified name. If there is only one download file with symbol info, ,,<downloadfile> is not used (otherwise on all symbols even if there are no collisions). “<filename>#” is only used on static file symbols which cause collisions. In winIDEA selected by: "C/C++, function static".
This is the preferred name when winIDEA output is processed by scripts. By default it contains:
•For a function: the filename (if the symbol is file static), namespace, naked name, function signature;
•For a variable: the filename (if the symbol is file static), naked name;
•For a function static variable: qualified function name, naked name;
If the application only has one download file, the download file will not be added. If there are multiple download files, then the download file will be listed for all symbols (even if there are no collisions).
“N::N::A::B::f(int,int)##”s_n
N::N::A::B::f(int,int)
“test1.cpp#”N::N::A::B::f(int,int) |
for a file static function |
“test1.cpp#N::N::A::B::f(int,int)##”s_n |
for a function static variable |
s_n,,test.elf |
for a global variable |
This is a name which is qualified to a point where it becomes unique. It allows a simplified/shortened display for most symbols which are usually unique by itself. It always contains <namespace><nakedname>. If it is a function static data object, it will contain <funcname>##, where <funcname> is also unique-enough qualified. In winIDEA selected by: "Unique (avoid collisions)".
Afterwards attempts to uniqueness are performed in this order:
<signature>
<filename>#
,,<downloadfile>
Examples
Minimally qualified name will look like this:
f |
for a C function |
N::N::A::B::f |
for a C++ function |
“N::N::A::B::f##”s_n |
for a function static variable |
If the source code is changed, e.g. a function is added, which collides with an existing name, winIDEA will automatically qualify the name to make them distinct. This can cause problems when scripts rely on the original name (the way it was originally qualified). |