This is the mail archive of the
mailing list for the GCC project.
Don't randomly guess source filenames
- From: Andrew Haley <aph at redhat dot com>
- To: java-patches at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 16 Mar 2007 17:27:28 +0000
- Subject: Don't randomly guess source filenames
We were guessing source filename based on classname. Unsurprisingly,
this often doesn't work, and we end up with a ton of nonexistent
filenames in our debuginfo. This confuses some tools.
This doesn't destroy any real debuginfo, because as soon as we find a
SourceFile attribute in a .class file we use it. This removes
hundreds of bogus filenames, and AFAICS doesn't lose any real ones.
In the case of .class files with no debuginfo, we generate no
debuginfo for the corresponding object files.
2007-03-16 Andrew Haley <firstname.lastname@example.org>
* class.c (push_class): Don't bogusly guess the source filename.
--- class.c (revision 122746)
+++ class.c (working copy)
@@ -426,8 +426,7 @@
tree decl, signature;
location_t saved_loc = input_location;
- tree source_name = identifier_subst (class_name, "", '.', '/', ".java");
- input_filename = IDENTIFIER_POINTER (source_name);
+ input_filename = "<unknown>";
input_line = 0;
CLASS_P (class_type) = 1;