This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 87677 - Need to debug dynamic JNI libraries with Java
Summary: Need to debug dynamic JNI libraries with Java
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: _ gordonp
URL:
Keywords:
Depends on: 125513
Blocks:
  Show dependency tree
 
Reported: 2006-10-20 18:12 UTC by _ gordonp
Modified: 2009-06-25 10:59 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ gordonp 2006-10-20 18:12:24 UTC
> Question with no answer. Maybe it is impossible, maybe I just don`t know
> to deal with it... I want to debug *dynamic* C++ library when it using
> by java application`s native methods. It is possible?

I don't know that any code changes will be required for this. What I think
we should do is to do some mixed C/C++ and Java debugging (including a JNI
shared library) to see how well this works. I attended a talk at JavaONE
presented by an Eclipse user who did the equivalent of concurrent Java and gdb
sessions to debug his JNI application. There are "gotchas" in doing this as
the gdb session is really debugging the JVM the Java session is talking to.

So what I'd realy like to see here, is a white paper we could publish about
how to debug a JNI application and what pitfalls the user is likely to see
and how to work around them.

I almost assigned this to myself as I think it would be a very interesting
project. However, since Nik is now the "owner" of gdb-lite I guess I'll let
him have 1st chance. If you (Nik) don't want this then please assign to me
or let me know you're not interested.
Comment 1 Alexander Pepin 2008-05-12 00:16:52 UTC
Are there any current plans to add the ability to "Attach to Process" to
NB6.x?  Or to create a more "integrated" Java<->JNI (C++) debugging
experience?

I'd love...  And I mean...  LOVE... the ability to debug a Java
application's JNI methods easily from Netbeans.  Currently, I use Data
Display Debugger to attach to the running Java application so I can
debug the JNI code, which is cumbersome.
-- Dustin McCartney Chief Technology Officer DAM Entertainment LLC http://www.damentertainment.com
Comment 2 _ gordonp 2008-05-12 10:19:01 UTC
Making this depend on 125513, since debugging JNI is really just a subset of debugging
shared libraries. Most likely doing this will resolve the JNI issue. But I'll leave it
open in case its not completely resolved by this issue.
Comment 3 Quality Engineering 2008-08-09 03:45:06 UTC
Integrated into 'main-golden', available in build *200808090201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/131629edf547
User: Gordon Prieur <gordonp@netbeans.org>
Log: Attach to dynamic libraries (IZs #87677, #125513, #135721 and #125176). Preliminary work
making it work on Solaris (although not heavily tested).