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 250796 - Add native LLDB debugging support
Summary: Add native LLDB debugging support
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 8.0.2
Hardware: Macintosh All
: P2 normal with 4 votes (vote)
Assignee: Maria Tishkova
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-01 10:53 UTC by kazssym
Modified: 2019-07-13 09:35 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kazssym 2015-03-01 10:53:04 UTC
Since the default debugger on Mac OS X is now LLDB, it should be supported by Netbeans IDE in addition to GDB.
Comment 2 kazssym 2015-03-03 12:37:15 UTC
(In reply to henk89 from comment #1)
> https://netbeans.org/bugzilla/show_bug.cgi?id=236801#c12

So I'm requesting *native* support.
Comment 3 Vladimir Voskresensky 2015-03-03 16:09:34 UTC
Could you share, please, your understanding of "native support"?
Comment 4 kazssym 2015-03-03 23:42:59 UTC
(In reply to Vladimir Voskresensky from comment #3)
> Could you share, please, your understanding of "native support"?

I would like NetBeans IDE to detect the existence of LLDB and use its commads directly to debug a program without any helper program.  It would require a debugger abstraction layer but if it could be done, adding support for other debuggers, if any, should be easier.
Comment 5 Vladimir Voskresensky 2015-03-04 16:01:49 UTC
(In reply to kazssym from comment #4)
> (In reply to Vladimir Voskresensky from comment #3)
> > Could you share, please, your understanding of "native support"?
> 
> I would like NetBeans IDE to detect the existence of LLDB and use its
> commads directly to debug a program without any helper program.  It would
> require a debugger abstraction layer but if it could be done, adding support
> for other debuggers, if any, should be easier.
Thanks. This is exactly the way we already communicate with other debuggers (gdb, dbx) from NB. I.e. for gdb it is known as MI (Machine Interface) protocol. The diff between Gdb and LLDB is that in LLDB MI part is extracted out of main binary while in Gdb it is part of gdb itself.
Fortunately MI of LLDB and Gdb are very similar. So, the current workaround is to build this MI layer for LLDB and use on Mac, while in NB we added LLDB's MI flavor translator in the context of 
https://netbeans.org/bugzilla/show_bug.cgi?id=236801#c12.

We can think about shipping pre-build MI layer of LLDB for Mac users then no extra efforts would be required.
Comment 6 jwatt 2017-10-05 13:31:07 UTC
'lldb-mi' was added to Xcode some time between 6.0.1 (Sept 2014) and 6.4 (Jun 2015) and has since then always been at:

/Applications/Xcode.app/Contents/Developer/usr/bin/lldb-mi

As noted in https://netbeans.org/bugzilla/show_bug.cgi?id=236801#c12 'debugserver' also comes as standard and since at least since Xcode 5 has been located at:

/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/debugserver

So it seems NB could find both of these without requiring building lldb or setting of the LLDB_DEBUGSERVER_PATH environment variable.

Could that be fixed in this bug?
Comment 7 jwatt 2017-10-05 13:31:48 UTC
That just leaves the setting of the -J-Dcnd.debugger.lldb=true parameter. It would be nice to have a dropdown option in the Debugging Options preferences pane to choose between debuggers, but perhaps that should be a separate bug since it involves UI changes.
Comment 8 jwatt 2017-10-05 13:32:30 UTC
Oh, and it would also be good to document how to use lldb somewhere in the docs at:

https://netbeans.org/kb/trails/cnd.html
Comment 9 Castrob 2019-07-13 09:35:04 UTC
So basically we will use the 11db or setting of the LLDB_DEBUGSERVER_PATH environment variable?

Castro B,
https://sparpedia.ch