debugging SWT

View: New views
5 Messages — Rating Filter:   Alert me  

debugging SWT

by Tyler Durvik :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am working on debugging some code I added to the SWT library on the
C side.  Are there instructions anywhere that would show my how to
step through my code from the Java side to the C side in Eclipse using
Fedora?

Thanks
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@...
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev

Re: debugging SWT

by Grant Gayed :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,

This is not something that's done here during swt development, so we don't have any instructions or experience to pass along.  It's rare that swt's C/C++ code needs to be debugged because most of it is generated, and is responsible for just making an OS call (fprintf has proven to be adequate here).

Googling came across:
- http://www.jboss.org/community/wiki/DebuggingJNICandJavacodeinEclipse looks promising
- http://forums.sun.com/thread.jspa?threadID=670308 suggests a Visual Studio approach, which may have a corresponding approach in the linux world

HTH,
Grant





Tyler Durvik <phangbyte@...>
Sent by: platform-swt-dev-bounces@...

11/06/09 09:04 AM
Please respond to
"Eclipse Platform SWT component developers list."        <platform-swt-dev@...>

To
platform-swt-dev@...
cc
Subject
[platform-swt-dev] debugging SWT





I am working on debugging some code I added to the SWT library on the
C side.  Are there instructions anywhere that would show my how to
step through my code from the Java side to the C side in Eclipse using
Fedora?

Thanks
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@...
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@...
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev

Re: debugging SWT

by Tyler Durvik :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for the information.  If I were extending the functionality of SWT and you say that most of the SWT code is autogenerated, where would I go to change either how the code is generated or what the code is generated from?

Thanks..


On Tue, Nov 10, 2009 at 11:00 AM, Grant Gayed <Grant_Gayed@...> wrote:

Hi,

This is not something that's done here during swt development, so we don't have any instructions or experience to pass along.  It's rare that swt's C/C++ code needs to be debugged because most of it is generated, and is responsible for just making an OS call (fprintf has proven to be adequate here).

Googling came across:
- http://www.jboss.org/community/wiki/DebuggingJNICandJavacodeinEclipse looks promising
- http://forums.sun.com/thread.jspa?threadID=670308 suggests a Visual Studio approach, which may have a corresponding approach in the linux world

HTH,
Grant





Tyler Durvik <phangbyte@...>
Sent by: platform-swt-dev-bounces@...

11/06/09 09:04 AM

Please respond to
"Eclipse Platform SWT component developers list."        <platform-swt-dev@...>

To
platform-swt-dev@...
cc
Subject
[platform-swt-dev] debugging SWT





I am working on debugging some code I added to the SWT library on the
C side.  Are there instructions anywhere that would show my how to
step through my code from the Java side to the C side in Eclipse using
Fedora?

Thanks
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@...
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@...
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev



_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@...
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev

Re: debugging SWT

by Grant Gayed :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


To change SWT's C/C++ generator, start by retrieving the org.eclipse.swt.tools project from dev.eclipse.org (see http://www.eclipse.org/swt/cvs.php ).  The generator lives in its "JNI Generation" unit.

To run the generator, run the JNIGeneratorApp class with argument "all" (no quotes).  You can then make changes to what gets generated in the other classes in the package.

To change the set of java classes that have their natives generated, modify the org.eclipse.swt.internal.properties file in this package.

Grant


_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@...
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev

Re: debugging SWT

by Carolyn MacLeod :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Not sure if it will help in this case, but here's a little overview of the "typical" use of the JNI generator (which is just to add a java method or class that corresponds to a native method or struct):
http://www.eclipse.org/swt/jnigen.php

Carolyn


From: Grant Gayed/Ottawa/IBM@IBMCA
To: "Eclipse Platform SWT component developers list." <platform-swt-dev@...>
Date: 10/11/2009 11:40 AM
Subject: Re: [platform-swt-dev] debugging SWT
Sent by: platform-swt-dev-bounces@...






To change SWT's C/C++ generator, start by retrieving the org.eclipse.swt.tools project from dev.eclipse.org (see
http://www.eclipse.org/swt/cvs.php ).  The generator lives in its "JNI Generation" unit.

To run the generator, run the JNIGeneratorApp class with argument "all" (no quotes).  You can then make changes to what gets generated in the other classes in the package.


To change the set of java classes that have their natives generated, modify the org.eclipse.swt.internal.properties file in this package.


Grant

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@...
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev



_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@...
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev