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 251586 - Attach Debugger hangs in the "Starting Debugger" dialog when using lldb-mi on OS X.
Summary: Attach Debugger hangs in the "Starting Debugger" dialog when using lldb-mi on...
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 8.1
Hardware: Macintosh Mac OS X
: P3 normal with 1 vote (vote)
Assignee: henk89
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-02 10:39 UTC by PerMildner
Modified: 2015-05-01 02:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description PerMildner 2015-04-02 10:39:00 UTC
Attach Debugger hangs in the "Starting Debugger" dialog when using lldb-mi on OS X.

Reproduce with:
1. Start "/sbin/ping netbeans.org" (other debugees gives similar results)
2. Add the following to end of netbeans.conf (based on "http://wiki.netbeans.org/NewAndNoteworthyNB81"):
### BEGIN
   netbeans_default_options="$netbeans_default_options -J-Dcnd.debugger.lldb=true"
   LLDB_DEBUGSERVER_PATH='/Applications/Xcode_6_2.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/debugserver'
   export LLDB_DEBUGSERVER_PATH
### END
(note the non-standard Xcode.app location)
3. Start NetBeans, change the GDB debugger path to point at lldb-mi
4. Menu: "Debug->Attach Debugger..."
5. Select the ping process (the "Executable" field is incorrect ("/sbin/ping netbeans.org"), as it includes the command arguments, I do not know whether this is significant)
6. Select OK in the Attach dialog. The "Starting Debugger" progress dialog comes up, and never goes away.
7. Menu: Window->Debugging->Debugger Console
8. The Debugger Console shows:
### BEGIN
This log is saved to: /var/folders/xr/272qfyr13s1cflm4tmq_8ktr0000gn/T/gdb-cmds8664143881699123857.log
NB build: 201503300001
(gdb)
-file-exec-and-symbols "/Users/p/.gdbinit"
(gdb)
MI parse error while parsing 'result list': Expected , or ] but got SYM (/sbin/ping"'.)
(gdb)
### END

So,
a. The -file-exec-and-symbols argument is strange, I think it should have been "/sbin/ping"
b. The "MI parse error" is similar to Bug 217898. 

I can successfully use plain lldb and lldb-mi from the command line. I can successfully use NetBeans with the legacy Apple gdb (6.3.50-20050815).

NetBeans IDE Dev (Build 201503300001), OS X 10.10.2, XCode 6.2, lldb from svn 2015-03-31 (lldb --version says lldb-340.99.0; lldb-mi --version says "... GNU gdb (GDB) 7.4").
Comment 1 henk89 2015-04-30 09:26:33 UTC
It seems to be an lldb-mi bug. It uses a command-line arg as a debug target.I'll check if the latest version behaves the same way or not.
Comment 2 henk89 2015-04-30 12:02:07 UTC
There is no need to fix this confusing behavior. The root cause of the issue is incorrect setting a symbol file after attach.
Comment 3 henk89 2015-04-30 12:06:48 UTC
Fixed in:
http://hg.netbeans.org/cnd-main/rev/4145242bb278
Comment 4 Quality Engineering 2015-05-01 02:54:09 UTC
Integrated into 'main-silver', will be available in build *201505010001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/4145242bb278
User: Nikolay Koldunov <henk89@netbeans.org>
Log: Fixed #251586 - Attach Debugger hangs in the "Starting Debugger" dialog when using lldb-mi on OS X.