Hi Thomas,
Thomas Koenig <tkoe...@netcologne.de> wrote:
If it’s part of a symbol used by the rest of the toolchain (assembler,
linker
debugger) then it’s also important to note that some OS/tool pairs might
be more constrained than the one you’ve tested. In particular, some
assemblers will not accept all characters in an identifier.
That is, of course, true. What I have works for the usual Linux
toolchain. Since I do not have access to other systems where
I can compile gcc (see the recent *BSD desaster when I tried this),
the most I could do is to make the character configurable - use
: by default, use something else if specified.
yes a configure option is a possible way around a conflict.
You could take advantage of the understanding of assembler identifier
rules
built into create_var_debug_raw()
.. perhaps (totally untested)….
if (flag_debug_aux_vars)
prefix = prefix ? prefix : “gfc”;
t = create_tmp_var_raw (type, prefix);
if (flag_debug_aux_vars)
{
/* We want debug info for it. */
DECL_IGNORED_P (t) = false;
/* It should not be nameless. */
DECL_NAMELESS (t) = false;
}
return t;
… or doens’t this approach work for some reason?
This doesn't work for gdb because gdb searches for
a variable called "S" when trying to access "S.0".
I also tried out @ as a separation character; that
is also interpreted by gdb in a special way.
and there are other debug consumers in common use - at
least lldb.
And I wanted to avoid anything in the namespace of
Fortran identifiers, even with options, so _ and $ were
out.
Do you have any other suggestions?
At the moment none other than the obvious..
.. test the current proposal on a wider range of systems - I expect
someone would volunteer to test on Darwin (Dominique or me)
.. you could use the cfarm for AIX, Solaris and others (I mention
AIX, Solaris and Darwin as three known to use non-GNU
assemblers and linkers).
Iain