Ask Your Question
0

Print contents of Mat object when debugging in Xcode 5 with lldb

asked 2013-12-06 19:38:00 -0600

drdan14 gravatar image

I'm building a project in Xcode 5, which uses the lldb debugger. I'd like to be able to examine the contents of a Mat object from the lldb prompt. However, doing the obvious thing, printing with std::cout, doesn't work. For example, let's say I have declared Mat err and filled it with something. I'm actually debugging the BundleAdjusterBase::estimate method where this happens. Here's what happens when I try to examine the variable in lldb:

(lldb) expr cout << err
error: use of undeclared identifier 'cout'
error: 1 errors parsing expression

and

(lldb) expr std::cout << err
error: no member named 'cout' in namespace 'std'
error: 1 errors parsing expression

This is probably related to lldb not understanding the std::cout command; see also my stackoverflow post about generally using cout in lldb.

Is there any other way to examine a Mat structure in lldb?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-08-18 19:42:21 -0600

Carlo gravatar image

I recently started a project to use LLDB to debug openCV Mat() data types. You can check it out at https://github.com/carlodalmutto/Imag...

edit flag offensive delete link more

Comments

Exact tool i was looking for. But seems like it is no longer maintained.

ajonnet gravatar imageajonnet ( 2017-05-25 07:54:03 -0600 )edit

Question Tools

Stats

Asked: 2013-12-06 19:38:00 -0600

Seen: 1,741 times

Last updated: Dec 06 '13