jj> Currently, the gdb.java/jmain.exp test has hard-coded line 6 as the
jj> expected line number for a break at jmain.main (java.lang.String[]).
jj> This occurs for gcc 3.3 and is incorrect. Line 6 is the end brace for
jj> the main routine. As of gcc 3.4, the line number is reported to be line
jj> 4. This also isn't what gdb wants as this points to the open brace.
jj> The desired result is that we point to line 5 which is the first line in
jj> main (return statement). That said, I have changed the expected line to
jj> be 5 and set the test as an XFAIL.
Dunno what Andrew will say about this patch but I don't think it's good.
If gcc HEAD actually gives line 5, then I would do this in the test
script:
# gcc HEAD 2004-07-05 marks the first line as 5, which is correct.
# gcc 3.3.4 -gdwarf-2 marks the first line as line 6.
# gcc 3.4.1 -gdwarf-2 marks the first line as line 4.
set bpmain "Breakpoint .* file .*jmain.java, line 5\."
If gcc HEAD gives some other line, then I think you need to file
a PR against gcc. It may be low priority and not fixed for years,
in which case you can XFAIL the test with that PR number.