From: Stefan R. <Ste...@gm...> - 2014-02-13 15:55:33
|
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div> <div>Hello Fabio,</div> <div>thank you for the hint.</div> <div> </div> <div>I finally got it working similar to the method described here:</div> <div>https://community.jboss.org/wiki/DebuggingJNICAndJavaCodeInEclipse</div> <div> <div>However, I modified it a bit. Instead of using a Java-breakpoint, it is possible</div> <div>to use a Python-breakpoint and let the Python debugger do the Job that</div> <div>is done by the Java debugger in the linked tutorial.</div> <div> </div> <div>Cheers,</div> <div> </div> <div>Stefan</div> <div> </div> <div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"> <div style="margin:0 0 10px 0;"><b>Gesendet:</b> Dienstag, 11. Februar 2014 um 14:07 Uhr<br/> <b>Von:</b> "Fabio Zadrozny" <fa...@es...><br/> <b>An:</b> "Stefan Richthofer" <Ste...@gm...><br/> <b>Cc:</b> jyt...@li...<br/> <b>Betreff:</b> Re: [Jython-dev] Using Debugger for mixed Jython/Java/C-Project in Eclipse</div> <div name="quoted-content"> <div> <div class="gmail_extra"> <div class="gmail_quote">On Tue, Feb 11, 2014 at 10:45 AM, Stefan Richthofer <span><<a href="Ste...@gm..." target="_parent">Ste...@gm...</a>></span> wrote: <blockquote class="gmail_quote" style="margin: 0.0px 0.0px 0.0px 0.8ex;border-left-width: 1.0px;border-left-color: rgb(204,204,204);border-left-style: solid;padding-left: 1.0ex;">Hello everybody,<br/> <br/> I am currently trying to set up GDB in Eclipse to debug JyNI. Problem here is that<br/> my usual test-run starts in Python-code (as a Jython-run), then enters Java code<br/> and finally enters a C-shared lib via JNI and also goes through two more C-shared libs<br/> via dynamic loading. I would like to track breakpoints in the last two shared C-libs.<br/> <br/> It turned out that each of these steps requires notable tweaking with configuration.<br/> <br/> For example there are guides how to debug CPython+native C-code with GDB, how to debug<br/> Java code with native JNI-lib, how to debug C-code that steps into other libraries by<br/> dynamic loading (this one is said to require GDB-config that is not possible via<br/> Eclipse GUI). However, none of these covers my issue completely.<br/> <br/> Now my question is, whether there is someone around on this list who has already done<br/> something like this. Developing JNI-bindings intended for Jython should be not such a<br/> rare use-case. Does someone have experience in debugging such things in Eclipse?<br/> <br/> I would appreciate any help or guidance on this topic.<br/> <br/> <br/> Currently my best guess would be the following way:<br/> I could try to start my test-run as a pure Java-Application<br/> that passes the Python-file somehow to the Jython interpreter<br/> (thus not using PyDev at all).<br/> Then I could try to apply the howto for JNI/native code GDB and<br/> hope that it somehow covers the way through dynamically loaded<br/> libs.<br/> Is there a better, i.e. more "right" way to do this?<br/> </blockquote> <div> </div> Hi Stefan, <div> </div> <div>Usually in this situation what I do is start one of the debuggers regularly and attach the other one(s) through remote debugging (In PyDev there are instructions at <a href="http://pydev.org/manual_adv_remote_debugger.html" target="_blank">http://pydev.org/manual_adv_remote_debugger.html</a> -- there should be counterparts for the other languages).</div> <div> </div> <div>Cheers,</div> <div> </div> <div>Fabio</div> </div> </div> </div> ------------------------------------------------------------------------------ Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. <a href="http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk_______________________________________________" target="_blank">http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk_______________________________________________</a> Jython-dev mailing list Jyt...@li... <a href="https://lists.sourceforge.net/lists/listinfo/jython-dev" target="_blank">https://lists.sourceforge.net/lists/listinfo/jython-dev</a></div> </div> </div> </div></div></body></html> |