graydon/rust — pull request #1331 by jdm (2011-12-19 06:51:06+00:00)
Title: Basic debugging information support

nmatsakis expressed interest in integrating even basic debugging support, and that's what this provides. The -g flag will produce source line correspondence output, allowing for stepping and breakpoints inside gdb. There's also an --xg (extra debugging) flag behind which the rest of the debugging support lies unfinished (ie. can't build rustc completely yet, but works on toy programs).

godot:build jdm$ time x86_64-apple-darwin/stage2/bin/rustc --target=x86_64-apple-darwin -o x86_64-apple-darwin/stage2/lib/rustc/x86_64-apple-darwin/bin/rustc ../src/comp/rustc.rc
warning: no debug symbols in executable (-arch x86_64)

Some stats:

```
godot:build jdm$ time x86_64-apple-darwin/stage2/bin/rustc --target=x86_64-apple-darwin -o x86_64-apple-darwin/stage2/lib/rustc/x86_64-apple-darwin/bin/rustc ../src/comp/rustc.rc
warning: no debug symbols in executable (-arch x86_64)

real	0m40.174s
user	0m39.633s
sys	0m0.708s

godot:build jdm$ time x86_64-apple-darwin/stage2/bin/rustc -g --target=x86_64-apple-darwin -o x86_64-apple-darwin/stage2/lib/rustc/x86_64-apple-darwin/bin/rustc ../src/comp/rustc.rc

real	1m50.058s
user	1m49.456s
sys	0m1.125s
```

Requires the llvm patch that's sitting in brson's repository to allow rustc to finish building.