yet more -v stuff

Stephen Weeks MLton@sourcelight.com
Fri, 5 Jan 2001 10:31:58 -0800 (PST)


> This looks fine, although I think that the -g in
> gcc -Wa,--gstabs -c -g -o /tmp/fileffLS2e.o /tmp/fileZx94k5.0.S
> is redundant; but it's probably more trouble than it's worth to remove it
> (and it shouldn't hurt).

It was no problem to change it.

> I discovered yesterday an unfortunate side effect of using .S and -g: all
> of the debugging information is relative to the pre-processed temporary
> file that gcc creates, which is trashed at the end of the gcc invocation.
> This makes debugging assembly files almost useless -- there isn't much to
> step through in the .c file, and we can't really get through the assembly
> files.
> 
> I see two sorts of solutions:
...

Two more solutions.

1. Ignore it and don't pass the info to the gc.

2. It doesn't seem very hard to keep track of the line number in
x86-codegen.fun.  You could then pass the line number as an extra argument to 
Assembly.toString, which sticks it in the right place in the instruction.  That
doesn't seem like a big deal to me -- you just need a magic kind of operand that 
prints the line number (+ 7 if you want).