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.
You can't attach the debugger to a running process if your project is "Shared library" project You get an error dialog which says: "No executable specified in project"
I was able to reproduce this bug with NB 6.5 patch 2 on Linux. Then checked current dev version - "Attach" works fine. Couldn't verify the same on Windows, because running a project is currently broken on Windows due to migration to nativeexecution. Will close this IZ as soon as I'm able to verify this on Windows.
Verified on Windows as well.
Just downloaded the daily build (Build 200903231401). It works even worst then 6.5 When I try to do attach no list of running processes is available so I can't attach to anything. Tried on Windows platform
Empty process list is another bug, unrelated to original one. Issue 125773 has been fixed today which may improve situation for you. Reassigning to Egor, who's currently fixing process list.
what toolchains do you have on windows? cygwin, mingw, both? what toolchain do you have in PATH?
I have both cygwin and mingw Cygwin is set to be build environment in NB Neither bin directory of toolchains is set on system level PATH
fixed with http://hg.netbeans.org/cnd-main/rev/e1bc3e7ee1ae with todays fixes it will find ps from cygwin and process list will not be empty any more.
Just tried it with Build 200903250219 Still no processes shown in the list Tried with both cygwin or mingw as default
most probably changes from cnd-main where it was fixed were not yet propagated into main, please wait for notification (in the issue). I can leave is as reopened until then.
Build 200903251400 is bit better, I can finally see running processes. However, still can't attach to the process when project is a dll The Error dialog appears which reads: The executable associated with the selected project does not match the selected process ID. Obviously project beeing a dll there is no executable associated with the project
most probably the rest is a duplicate of the issue 135721
Ok, what does it mean? I read the referenced issue and what I make from it is that you are not going to do anything about it? Arguments there are pretty lame. You know the name of dll and you can check against executable if it is using it. Other gdb frontends can do it so why we can't?
Do not worry, if others do it we will do it too :) I'm looking at that at the moment.
see also issue 125513
please specify what you do step by step, I wasn't able to reproduce the issue. Now if you attach to a process and it has loaded current project dll - attach does not fail.
I have a project which produce a shared library - the extension of the library is not dll but aip (shared library for adobe illustrator) Now I run illustrator and try to attach to it with gdb - and the error dialog is shown :(
ok, please attach gdb-cmdXXX.log file, it is located somewhere in temp folders (XXX is a number) also, I think you copy your lib somewhere, so it is located not where your project output is? If that's so, please try to change lib project options to have linker/output pointing directly to that place.
Created attachment 78919 [details] log file
changing output didn't help log file included
now I see the problem, thanks! We check for current project output to be one of the loaded. And paths do not match if it was copied somewhere... Maybe illustrator could use libs located at the project default output location?
Why it so in this case that when I set the ouput dir to my actuall lib gdb still not connects? With change of directory is not so easy. We have a common project for mac and win and we need to do some extra work on the output of gcc. What's more on mac the output is not a single file but a directory structure :) See part of my makefile just to have an idea: dist/AI2JavaFX.aip/Contents/Resources/AI2JavaFX.rsrc: ${RESDIR}/objects/AI2JavaFX.rsrc ${MKDIR} -p dist/AI2JavaFX.aip/Contents/Resources ${RESMERGER} -dstIs DF \ ${RESDIR}/objects/AI2JavaFX.rsrc \ -o ${RESDIR}/AI2JavaFX.rsrc ${RESMERGER} ${RESDIR}/AI2JavaFX.rsrc \ -dstIs DF -o dist/AI2JavaFX.aip/Contents/Resources/AI2JavaFX.rsrc ${RESDIR}/objects/AI2JavaFX.rsrc: dist/AI2JavaFX.aip/Contents/MacOs/AI2JavaFX ${MKDIR} -p ${RESDIR}/objects ${REZ} -progress \ -arch i386 -arch ppc \ -d SystemSevenOrLater=1 \ -useDF -script Roman \ -i Resources -i Sources \ -i /Developer/Headers/FlatCarbon \ -i "../Adobe Illustrator CS3 SDK/samplecode/common/mac" \ -o ${RESDIR}/objects/AI2JavaFX.rsrc \ Resources/FxFilePlugin.r dist/AI2JavaFX.aip/Contents/MacOs/AI2JavaFX: build/${CONF}/AI2JavaFX.aip ${MKDIR} -p dist/AI2JavaFX.aip/Contents/MacOs ${MV} dist/AI2JavaFX.jar dist/AI2JavaFX.aip/AI2JavaFX.jar ${LIPO} -create build/${CONF}/AI2JavaFX.aip -output dist/AI2JavaFX.aip/Contents/MacOs/AI2JavaFX dist/AI2JavaFX.aip: build/${CONF}/AI2JavaFX.aip ${CP} build/${CONF}/AI2JavaFX.aip dist/ if [ "${CONF}" == "Release" ]; then ${STRIP} dist/AI2JavaFX.aip; fi
fixed windows path comparator in: http://hg.netbeans.org/cnd-main/rev/7f2eb0eb2af5
window path comparator fix 2: http://hg.netbeans.org/cnd-main/rev/cf746ed9cd6a
another win path comparison fix: http://hg.netbeans.org/cnd-main/rev/bac680456e7c
yet another fix in: http://hg.netbeans.org/cnd-main/rev/17044527a697
I have confirmation from the user that now it works