Fix Java debuginfo breakage in 4.3

Andrew Haley aph@redhat.com
Fri May 23 13:51:00 GMT 2008


Andrew Haley wrote:
> The change to mapped location support broke debuginfo in Java.
> 
> The fix is pretty trivial, and I'm putting it into the 4.3 branch.
> 
> I suppose I need a test case to make sure this doesn't happen again.
> I'm not sure exactly how to write one, though.

For some reason I didn't check this into the trunk.  I have no idea
why; it is needed.

Andrew.


2008-03-06  Andrew Haley  <aph@littlepinkcloud.com>

	* jcf-parse.c (give_name_to_class): Call find_sourcefile fo find full
	pathname of source file.

Index: jcf-parse.c
===================================================================
--- jcf-parse.c (revision 131324)
+++ jcf-parse.c (working copy)
@@ -1208,7 +1208,7 @@
 #ifdef USE_MAPPED_LOCATION
       {
       tree source_name = identifier_subst (class_name, "", '.', '/', ".java");
-      const char *sfname = IDENTIFIER_POINTER (source_name);
+      const char *sfname = find_sourcefile (IDENTIFIER_POINTER (source_name));
       linemap_add (line_table, LC_ENTER, false, sfname, 0);
       input_location = linemap_line_start (line_table, 0, 1);
       file_start_location = input_location;



More information about the Java-patches mailing list