[MLton-devel] stabs vs dwarf2
Thu, 31 Oct 2002 13:05:14 -0800
> Note, that if you change the gcc invocations of -gdwarf-2 to -gdwarf2 (or,
> equivalently (at least on gcc 2.96), -g2), then you can set break points
> in both. Likewise, when you remove all the -gdwarf-2 options.
I had to change 'em to -gdwarf -g2, but that still doesn't work for
me. I always get the error message
No source file named z.0.s.
even when I break in z.0.s before z.c.
To be clear, here's what the compile looked like
Compile C starting
gcc -S -gdwarf -g2 \
-I/home/sweeks/mlton/src/build/bin/../lib/self/include -O1 -o \
Compile C finished in 0.19 + 0.00 (0% GC)
gcc -gdwarf -g2 -c -o z.o /tmp/fileEbMRCn.s
gcc -Wa,--gdwarf2 -c -o z.0.o z.0.s
Assemble finished in 0.12 + 0.00 (0% GC)
gcc -gdwarf -g2 -o z z.o z.0.o \
-L/home/sweeks/mlton/src/build/bin/../lib/self -lmlton-gdb -lm \
Link finished in 0.09 + 0.00 (0% GC)
To simplify stuff, I took MLton out of the loop, created a simple
hello-world assembly file foo.s, and tried various ways of compiling
gcc -gdwarf-2 -o foo foo.s
gcc -Wa,--gdwarf2 -o foo foo.s
gcc -gdwarf-2 -Wa,--gdwarf2 -o foo foo.s
If I then try to set a break in foo.s, for all three, I get
No source file named foo.s.
Oh well. I don't think it's worth the time to debug gcc/gdb, so it
looks like we'll live with stabs for now.
This sf.net email is sponsored by: Influence the future
of Java(TM) technology. Join the Java Community
Process(SM) (JCP(SM)) program now.
MLton-devel mailing list