re PR java/28352 (gcj -C fails to generate line number info for method)

2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>

	PR libgcj/28352
	* stacktrace.cc (getLineNumberForFrame): Roll back PC by 1 when
	looking up line number for interpreted frame.

From-SVN: r115370
This commit is contained in:
Bryce McKinlay 2006-07-12 13:56:25 +00:00 committed by Bryce McKinlay
parent 8b907df422
commit 2bdda702e9
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
PR libgcj/28352
* stacktrace.cc (getLineNumberForFrame): Roll back PC by 1 when
looking up line number for interpreted frame.
2006-07-07 Bryce McKinlay <mckinlay@redhat.com>
Geoffrey Keating <geoffk@apple.com>

View File

@ -182,7 +182,9 @@ _Jv_StackTrace::getLineNumberForFrame(_Jv_StackFrame *frame, NameFinder *finder,
_Jv_InterpClass *interp_class =
(_Jv_InterpClass *) interp_meth->defining_class->aux_info;
*sourceFileName = interp_class->source_file_name;
*lineNum = interp_meth->get_source_line(frame->interp.pc);
// The interpreter advances the PC before executing an instruction,
// so roll-back 1 byte to ensure the line number is accurate.
*lineNum = interp_meth->get_source_line(frame->interp.pc - 1);
return;
}
#endif