Error when debugging with lldb

343 views
Skip to first unread message

Alex Lindsay

unread,
Jul 8, 2016, 7:25:58 PM7/8/16
to moose...@googlegroups.com
I've been debugging with gdb for a while but am starting to use lldb. I got the following error when trying to debug my application:

(lldb) p _sgnip[_qp]
error: libzapdos-dbg.so.0 DWARF DIE at 0x00c5d4fc for class 'NeumannCircuitVoltageMoles_KV' has a base class 'IntegratedBC' that is a forward declaration, not a complete definition.
Please file a bug against the compiler and include the preprocessed output for /home/lindsayad/.ccache/tmp/NeumannCir.stdout.lindsayad-OptiPlex-990.27829.kjV7Kq.ii
error: use of undeclared identifier '_qp'
error: 1 errors parsing expression

I'm used to gdb being able to identify _qp. Is there a way to make this work with lldb?

I already tried:

	echo "settings set target.inline-breakpoint-strategy always" >> ~/.lldbinit

which was recommend on the wiki for ccache.

Peterson, JW

unread,
Jul 11, 2016, 10:47:56 AM7/11/16
to moose-users
On Fri, Jul 8, 2016 at 5:25 PM, Alex Lindsay <adli...@ncsu.edu> wrote:
I've been debugging with gdb for a while but am starting to use lldb. I got the following error when trying to debug my application:

(lldb) p _sgnip[_qp]
error: libzapdos-dbg.so.0 DWARF DIE at 0x00c5d4fc for class 'NeumannCircuitVoltageMoles_KV' has a base class 'IntegratedBC' that is a forward declaration, not a complete definition.
Please file a bug against the compiler and include the preprocessed output for /home/lindsayad/.ccache/tmp/NeumannCir.stdout.lindsayad-OptiPlex-990.27829.kjV7Kq.ii
error: use of undeclared identifier '_qp'
error: 1 errors parsing expression

I'm used to gdb being able to identify _qp. Is there a way to make this work with lldb?

When you switched to lldb, did you also start compiling your code with clang?

I'm pretty sure this should just work, so I tested it with a test that uses a NeumannBC, which is also derived from IntegratedBC, and it seems to work fine:

cd test/tests/bcs/1d_neumann
lldb -- ../../../moose_test-dbg -i 1d_neumann.i
b NeumannBC.C:33
(lldb) p _qp
(unsigned int) $0 = 0

Note that I have had trouble printing specific entries in vectors with lldb before (I think it had some issue calling operator[], can't recall exactly).  I worked around it at the time by doing:

p _sgnip.__begin_[0]
p _sgnip.__begin_[1]

etc.

--
John

Reply all
Reply to author
Forward
0 new messages