Ok, after a few false leads, I found something that produced a
pleasing result. Fantastic I should say!
With this mod:
C:\devel\gcc\gcc>cvs diff debug.c
Index: debug.c
===================================================================
RCS file: c:\cvsroot/gcc/gcc/debug.c,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 debug.c
20a21,31
#include "output.h"
#include "flags.h"
void
fff (line, text)
unsigned int line ATTRIBUTE_UNUSED;
const char *text ATTRIBUTE_UNUSED;
{
if (flag_debug_asm)
fprintf(asm_out_file, "fff %d %s\n", line, text);
}
with s/fff/ASM_COMMENT_START/ and with a proper function name, this is
actually an almost acceptable patch. Only, you also have to do
app_enable/app_disable (search for the other occurrences of
flag_debug_asm in dwarf2out.c, they also explain why this is needed).
These probably can be moved to common code in general.
But let me guess - I'm not allowed to modify debug.c and have
to decide whether MVS is an sdb, xcoff, dbx, dwarf 1/2, or vms?
No, that's fine. -dA can actually be handled by common code.
Paolo