Hi Iain,


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.


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 I wanted to avoid anything in the namespace of
Fortran identifiers, even with options, so _ and $ were
out.

Do you have any other suggestions?

Best regards

        Thomas

Reply via email to