This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: FYI: fix mapped locations for java


I'm checking this in.

This fixes the one gcj regression seen with --enable-mapped-location.
The bug was that the current file in line_table was <built-in> when
parse_class_file was called.  The simplest fix is to re-enter the file
at this point.

The only remaining mapped location regressions are with Fortran.
I believe FranÃois-Xavier is looking at these; unless I hear otherwise
I don't plan to.

Tom

gcc/java/ChangeLog:
2007-09-06  Tom Tromey  <tromey@redhat.com>

	* jcf-parse.c (parse_class_file): Re-enter the current file.

Index: gcc/java/jcf-parse.c
===================================================================
--- gcc/java/jcf-parse.c	(revision 128190)
+++ gcc/java/jcf-parse.c	(working copy)
@@ -1586,6 +1586,13 @@
   java_layout_seen_class_methods ();
 
   input_location = DECL_SOURCE_LOCATION (TYPE_NAME (current_class));
+#ifdef USE_MAPPED_LOCATION
+  {
+    /* Re-enter the current file.  */
+    expanded_location loc = expand_location (input_location);
+    linemap_add (line_table, LC_ENTER, 0, loc.file, loc.line);
+  }
+#endif
   file_start_location = input_location;
   (*debug_hooks->start_source_file) (input_line, input_filename);
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]