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 159525 - Can't debug dll
Summary: Can't debug dll
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Egor Ushakov
URL:
Keywords:
Depends on: 125513 135721
Blocks:
  Show dependency tree
 
Reported: 2009-03-03 14:17 UTC by luky
Modified: 2009-06-25 10:59 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
log file (163.36 KB, text/plain)
2009-03-26 15:53 UTC, luky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description luky 2009-03-03 14:17:01 UTC
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"
Comment 1 Alexey Vladykin 2009-03-13 12:49:48 UTC
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.
Comment 2 Alexey Vladykin 2009-03-13 14:57:18 UTC
Verified on Windows as well.
Comment 3 luky 2009-03-24 14:05:01 UTC
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




Comment 4 Alexey Vladykin 2009-03-24 14:18:38 UTC
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.
Comment 5 Egor Ushakov 2009-03-24 14:34:32 UTC
what toolchains do you have on windows?
cygwin, mingw, both?
what toolchain do you have in PATH?
Comment 6 luky 2009-03-24 14:38:49 UTC
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



Comment 7 Egor Ushakov 2009-03-24 14:50:55 UTC
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.
Comment 8 luky 2009-03-25 11:50:39 UTC
Just tried it with Build 200903250219
Still no processes shown in the list
Tried with both cygwin or mingw as default



Comment 9 Egor Ushakov 2009-03-25 11:56:57 UTC
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.
Comment 10 luky 2009-03-26 11:41:46 UTC
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
Comment 11 Egor Ushakov 2009-03-26 11:45:29 UTC
most probably the rest is a duplicate of the issue 135721
Comment 12 luky 2009-03-26 11:56:54 UTC
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?
Comment 13 Egor Ushakov 2009-03-26 12:00:21 UTC
Do not worry, if others do it we will do it too :)
I'm looking at that at the moment.
Comment 14 Egor Ushakov 2009-03-26 12:42:14 UTC
see also issue 125513
Comment 15 Egor Ushakov 2009-03-26 14:56:08 UTC
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.
Comment 16 luky 2009-03-26 15:03:51 UTC
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 :(

Comment 17 Egor Ushakov 2009-03-26 15:42:00 UTC
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.
Comment 18 luky 2009-03-26 15:53:39 UTC
Created attachment 78919 [details]
log file
Comment 19 luky 2009-03-26 15:55:01 UTC
changing output didn't help
log file included
Comment 20 Egor Ushakov 2009-03-26 16:08:16 UTC
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?
Comment 21 luky 2009-03-26 16:21:07 UTC
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
Comment 22 Egor Ushakov 2009-03-26 17:03:27 UTC
fixed windows path comparator in:
http://hg.netbeans.org/cnd-main/rev/7f2eb0eb2af5
Comment 23 Egor Ushakov 2009-03-27 14:08:05 UTC
window path comparator fix 2:
http://hg.netbeans.org/cnd-main/rev/cf746ed9cd6a
Comment 24 Egor Ushakov 2009-03-30 13:37:40 UTC
another win path comparison fix:
http://hg.netbeans.org/cnd-main/rev/bac680456e7c
Comment 25 Egor Ushakov 2009-03-30 16:40:42 UTC
yet another fix in:
http://hg.netbeans.org/cnd-main/rev/17044527a697
Comment 26 Egor Ushakov 2009-03-31 10:26:27 UTC
I have confirmation from the user that now it works