I was unable to attach to mysqld process on Mac from the IDE.
At the same time I easily attached to it from command line gdb.
I can also launch it in debugger from the IDE - and everything goes ok.
But I still can not attach from the IDE.
I don't yet know whether it is platform specific or not.
Here are more details.
I've downloaded MySQL sources 5.1.28-rc;
./configure --enable-shared --disable-static --prefix=/usr/local/mysql --with-charset=utf8
--with-collation=utf8_unicode_ci --with-extra-charsets=none CFLAGS="-g3 -gdwarf-2" CXXFLAGS="-g3 -gdwarf-2"
then build via "make" and installed via "sudo make install"
After that it was installed into /usr/local/mysql.
Then I launched /usr/local/mysql/bin/mysql_install_db to initialize master tables.
I had to change owner of the /usr/local/mysql/var to myself, recursively, to be able to attach.
I launch /usr/local/mysql/bin/mysqld, launcg gdb and is able to attach.
But I can not attach to the same process from IDE
The problem is in GdbDebugger.attach method,
String path = runDirectory + '/' + ma.getOutput()
is validated and in case of mysql it validates:
Upgraded to P2 because it looks like attach does not work for makefile based projects.
Attach debugger works for makefile based projects, at least it works for Freeway even if an executable file is moved
from it's original location to one level up.
The issue needs additional investigation.
Freeway differs from projects that usually have our users.
The problem arises when the binary you want to attach resides outside of the project directory
(i.e. directory that contains nbproject).
That's how the makefile-based project (apart from Freeway) is vreated by default.
And as a rule, that's how users create projects
So this IZ really means that for now attaching to makefile-based project (i.e. the majority of user projects) does NOT work.
Created attachment 72610 [details]
IllegalArgumentException: Parameter file was not normalized stack trace
I created a very simple makefile-based project and tried to attach.
The attempt failed (it failed in a bit different way - see attached stack), but I believe the reason is quite similar.
I had an exception, because (by default), binary path was specified as relative to Netbeans project:
As soon as I replaced it with the absolute path, I've got the same message as with MySQL:
"The executable associated with the selected project does not match the selected process ID"
So neither relative nor absolute path work - unless the binary is inside the NB project directory.
The same message "The executable associated with the selected project does not match the selected process ID"
appears on windows for managed projects so it seems to be a common issue. It worked fine some time ago (I mean on
windows for managed projects).
As noted in #147788, you can get an IAE because the attach path isn't normalized before calling
The full stack trace is http://www.netbeans.org/nonav/issues/showattachment.cgi/72610/stack.txt.
*** Issue 151341 has been marked as a duplicate of this issue. ***
I did not get IllegalArgumentException but fixed the rest:
I checked the trunk build on the same project I had IllegalArgumentException.
No exception occurred.
I believe it is fixed.
now I can attach to makefile based project process
verified in trunk build 200810290201
Reopened and marked with 65_HR_FIX keyword to follow the Code Freeze Process
Pushed into release65:
somehow it got P2 again
verified in a preliminary FCS build