Debugging GCJ using CygWin Insight

Øyvind Harboe oyvind.harboe@zylin.com
Tue May 20 14:15:00 GMT 2003


I decided it was time to rummage through my toolchest
to see if I could find something to debug my GCJ apps with.

Voila!

I have CygWin installed and it comes with Insight.

I can start debugging my app from the command line:

insight test

Here is a quick list of what I got up'n running immedidately:

- I can debug my own code, e.g. use function browser to find 
Test.java below, open and set breakpoint, examine variables, etc.
- I was going to set a breakpoint in Runtime.exec, but wasn't
able to locate it in the function browser. Nor do I believe
Mohans build comes with source code and debug information
compiled in.



\thisiscool-gcc\gcc-3.3\bin\gcj -o test.exe -g --main=Test Test.java


public class Test
{
	public static void main(String[] args)
	{
		try
		{
	
Runtime.getRuntime().exec("c:\\winnt\\system32\\cmd /c echo asdf");
		} catch (IOException e)
		{
			e.printStackTrace();
		}
	}
}

Øyvind






More information about the Java mailing list