Issue using lldb to debug a moose app

138 views
Skip to first unread message

Benjamin Spencer

unread,
Feb 22, 2018, 2:16:47 PM2/22/18
to moose-users
I'm using Build 63 of the MOOSE package on a Mac (Sierra), and having an issue trying to run lldb on my MOOSE executable (compiled with clang).

$ which lldb
/opt/moose/llvm-5.0.1/bin/lldb
$ which clang
/opt/moose/llvm-5.0.1/bin/clang


$ lldb ~/projects/myapp/myapp-dbg
(lldb) target create "/Users/fred/projects/myapp/myapp-dbg"
Current executable set to '/Users/fred/projects/myapp/myapp-dbg' (x86_64).
bind: Invalid command `rl_complete'.
(lldb) r -i my_input.i
error: process exited with status -1 (unable to attach)

Any ideas what's going wrong?

Thanks,
Ben

Benjamin Spencer

unread,
Feb 22, 2018, 2:27:38 PM2/22/18
to moose-users
I found my bug the old fashioned way, so this isn't very urgent, but I'd still like to figure out what's wrong for the next time I need a working debugger.

-Ben

Daniel Schwen

unread,
Feb 22, 2018, 2:36:59 PM2/22/18
to moose...@googlegroups.com
Have you looked at your executable? I've had a few cases where the supposed executable was a libtool wrapper script with the actual executable in the .libs directory. This happens if libtool thinks you need to install some contrib lib first.

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CANcsQPfs1gzLomrPx_NcsHzZMV%3D5P74wj%3DFd-bpZ5x2BB_TdDg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Benjamin Spencer

unread,
Feb 22, 2018, 2:39:02 PM2/22/18
to moose-users
It's a regular binary executable, and it runs fine outside the debugger.

On Thu, Feb 22, 2018 at 12:36 PM, Daniel Schwen <dan...@schwen.de> wrote:
Have you looked at your executable? I've had a few cases where the supposed executable was a libtool wrapper script with the actual executable in the .libs directory. This happens if libtool thinks you need to install some contrib lib first.

On Thu, Feb 22, 2018, 1:27 PM Benjamin Spencer <benjamin...@inl.gov> wrote:
I found my bug the old fashioned way, so this isn't very urgent, but I'd still like to figure out what's wrong for the next time I need a working debugger.

-Ben


On Thu, Feb 22, 2018 at 12:16 PM, Benjamin Spencer <benjamin...@inl.gov> wrote:
I'm using Build 63 of the MOOSE package on a Mac (Sierra), and having an issue trying to run lldb on my MOOSE executable (compiled with clang).

$ which lldb
/opt/moose/llvm-5.0.1/bin/lldb
$ which clang
/opt/moose/llvm-5.0.1/bin/clang


$ lldb ~/projects/myapp/myapp-dbg
(lldb) target create "/Users/fred/projects/myapp/myapp-dbg"
Current executable set to '/Users/fred/projects/myapp/myapp-dbg' (x86_64).
bind: Invalid command `rl_complete'.
(lldb) r -i my_input.i
error: process exited with status -1 (unable to attach)

Any ideas what's going wrong?

Thanks,
Ben

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.

Alexander Lindsay

unread,
Feb 22, 2018, 2:57:19 PM2/22/18
to moose...@googlegroups.com
If you're using the package provided lldb, you need to run with sudo

Benjamin Spencer

unread,
Feb 22, 2018, 3:06:36 PM2/22/18
to moose-users
Thanks, that did the trick. That seems pretty odd that it needs to be run with sudo...

-Ben

Cody Permann

unread,
Feb 22, 2018, 3:10:19 PM2/22/18
to moose...@googlegroups.com
Yes and no, When you use the Apple supplied lldb, note that it'll prompt you for a password the first time. It's running with elevated privileges. The version that Jason builds in our package from source doesn't have the Apple integration. We'd like to get that figured out, but it's one step at a time for now.

To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.

Derek Gaston

unread,
Feb 22, 2018, 3:17:03 PM2/22/18
to moose...@googlegroups.com
I think we could either setguid lldb - or wrap it in a script that does sudo...

Reply all
Reply to author
Forward
0 new messages