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 230518 - GDB attach to JVM fails (JNI debug): No such file or directory
Summary: GDB attach to JVM fails (JNI debug): No such file or directory
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 7.3
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Assignee: Egor Ushakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-30 10:53 UTC by alibabashack
Modified: 2013-06-21 02:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
gdb log, failing on osx (3.09 KB, text/x-log)
2013-05-30 10:53 UTC, alibabashack
Details
gdb log, working on linux (13.23 KB, text/x-log)
2013-05-30 10:55 UTC, alibabashack
Details
patched NativeDebuggerManager to strip process arguments (1.17 KB, patch)
2013-06-04 20:58 UTC, alibabashack
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description alibabashack 2013-05-30 10:53:45 UTC
Created attachment 135123 [details]
gdb log, failing on osx

This might be a dublicate of #194661, but adding logs.

I am debugging a JNI library under ubuntu linux and OS X mountain lion. Therefor I use the "attach debugger" feature to attach to a JVM instance. At this time it is assured that the library is already loaded by the JVM.

On linux everything works like a charm (see gdb-linux.log). On OS X before gdb actually attaches to the process, the executable name is not resolved correctly. The JVM arguments are treated as part of the file name. Therefor gdb fails with "No such file or directory". (gdb-osx-ml.log)

The issue occurs when using remote debugging (netbeans on linux, target OS X) as well as on localhost debug under OS X.
Comment 1 alibabashack 2013-05-30 10:55:06 UTC
Created attachment 135124 [details]
gdb log, working on linux
Comment 2 alibabashack 2013-06-04 20:58:33 UTC
Created attachment 135349 [details]
patched NativeDebuggerManager to strip process arguments
Comment 3 Egor Ushakov 2013-06-19 14:50:58 UTC
agree with the patch, fixed in:
http://hg.netbeans.org/cnd-main/rev/0f839a4a0992
Comment 4 Quality Engineering 2013-06-21 02:29:36 UTC
Integrated into 'main-golden', will be available in build *201306202301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/0f839a4a0992
User: Egor Ushakov <gorrus@netbeans.org>
Log: fixed #230518 - GDB attach to JVM fails (JNI debug): No such file or directory