Hi Greg,
These questions are fine. The key point you're missing in the existing
debug code is that most of the functions in debuginfo.rs are called from
within functions like create_local_var. I just realized that I linked to
the potentially outdated version of the file on the master branch;
https://github.com/mozilla/rust/blob/incoming/src/librustc/middle/trans/debuginfo.rsis
the more interesting one as it shows how some of the other functions
are
called in create_ty. The actual API of debuginfo.rs from the point of view
of the rest of rustc is quite limited; the rest of the compiler is usually
only concerned with marking high-level constructs such as variables,
functions, files, and line numbers.

To answer your question, yes, the primary work of the project would be to
finish the obvious gaps in the existing code in debuginfo.rs (such as the
unimplemented types in create_ty) and create tests that exercise them all
thoroughly. From there, the goal is to get rustc itself building with full
debug symbols.

The `-Z extra-debug-info` argument was put in place because the debug
symbol generation was incomplete, and we hide incomplete things behind -Z
flags. Once we expect debug symbol generation to work for arbitrary
programs, we'll fold extra-debug-info into the existing -g flag.

Cheers,
Josh


On 22 April 2013 10:22, Greg Weng <[email protected]> wrote:

> Sorry if I seemed too rude to ask these questions here...
>
> 1. The `debuginfo.rs` seems already implemented some LLVM debugging
> symbols outputting functions, like `create_vec` or `create_local_var`. But
> currently I can only find `create_local_var` already been used in other
> components, and others are missing.
>
> So, should the first step be generating LLVM debugging information in
> every language unit while compiling them ?
>
> 2. The Rust compiler owns the `-Z extra-debug-info` option, but it didn't
> work and seems related to the not yet implemented debugging symbol feature.
>  Is this option created for outputting all language units' LLVM debugging
> information ? Or it's expected to do more things than this ?
>
> 3. I've did some researching works on Rustc and LLVM debugging symbol
> features, and will start to try to add those outputting function in other
> components. Is any other step should I take to prepare the project ?
>
> Greg Weng
> [email protected]
>
> _______________________________________________
> Rust-dev mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/rust-dev
>
>
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to