rust/src/libsyntax/parse
Ted Mielczarek 24e7491660 Add an abs_path member to FileMap, use it when writing debug info.
When items are inlined from extern crates, the filename in the debug info
is taken from the FileMap that's serialized in the rlib metadata.
Currently this is just FileMap.name, which is whatever path is passed to rustc.
Since libcore and libstd are built by invoking rustc with relative paths,
they wind up with relative paths in the rlib, and when linked into a binary
the debug info uses relative paths for the names, but since the compilation
directory for the final binary, tools trying to read source filenames
will wind up with bad paths. We noticed this in Firefox with source
filenames from libcore/libstd having bad paths.

This change stores an absolute path in FileMap.abs_path, and uses that
if available for writing debug info. This is not going to magically make
debuggers able to find the source, but it will at least provide sensible
paths.
2016-06-16 18:08:46 +01:00
..
lexer Add an abs_path member to FileMap, use it when writing debug info. 2016-06-16 18:08:46 +01:00
attr.rs parser: show a helpful note on unexpected inner comment 2016-05-03 17:53:23 +02:00
classify.rs [breaking-change] don't pub export ast::Stmt_ variants 2016-02-11 12:34:48 +01:00
common.rs Use associated functions for libsyntax SepSeq constructors. 2016-02-22 23:24:42 -05:00
mod.rs Add an abs_path member to FileMap, use it when writing debug info. 2016-06-16 18:08:46 +01:00
obsolete.rs use structured errors 2015-12-30 14:27:59 +13:00
parser.rs prefer if let to match with None => () arm in some places 2016-06-15 08:13:10 -07:00
token.rs allow InternedString to be compared to &str directly 2016-04-26 16:27:10 +02:00