This is the mail archive of the java@gcc.gnu.org mailing list for the Java 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]

Debugging GCJ using CygWin Insight


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





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