|
From: Fabio Z. <fa...@es...> - 2014-02-11 13:08:01
|
On Tue, Feb 11, 2014 at 10:45 AM, Stefan Richthofer < Ste...@gm...> wrote: > Hello everybody, > > I am currently trying to set up GDB in Eclipse to debug JyNI. Problem here > is that > my usual test-run starts in Python-code (as a Jython-run), then enters > Java code > and finally enters a C-shared lib via JNI and also goes through two more > C-shared libs > via dynamic loading. I would like to track breakpoints in the last two > shared C-libs. > > It turned out that each of these steps requires notable tweaking with > configuration. > > For example there are guides how to debug CPython+native C-code with GDB, > how to debug > Java code with native JNI-lib, how to debug C-code that steps into other > libraries by > dynamic loading (this one is said to require GDB-config that is not > possible via > Eclipse GUI). However, none of these covers my issue completely. > > Now my question is, whether there is someone around on this list who has > already done > something like this. Developing JNI-bindings intended for Jython should be > not such a > rare use-case. Does someone have experience in debugging such things in > Eclipse? > > I would appreciate any help or guidance on this topic. > > > Currently my best guess would be the following way: > I could try to start my test-run as a pure Java-Application > that passes the Python-file somehow to the Jython interpreter > (thus not using PyDev at all). > Then I could try to apply the howto for JNI/native code GDB and > hope that it somehow covers the way through dynamically loaded > libs. > Is there a better, i.e. more "right" way to do this? > > Hi Stefan, 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 http://pydev.org/manual_adv_remote_debugger.html -- there should be counterparts for the other languages). Cheers, Fabio |