Tuesday 15 June 2010

vector - LLDB C++ debugging -



vector - LLDB C++ debugging -

i new lldb , working various std::vectors in code, when seek print values of vector or query size of vector expr '(int)myvector[0]' or expr '(int)myvector.size()' debugger prints values have nil values know there in vector.

as i'm learning debug command line , lldb, i'm sure i'm missing here, can spot error or give advise?

edit forgot i'm under os x mavericks latest command-line tools installed.

i found reply myself. apparently overloaded operators [] not allowed since inlined, see question improve explanation on that.

moreover, don't know why did set single quotes statement wanted evaluate (i'm pretty sure saw in other place ... mean in lldb?) expr 'printf("hey")'

so, taking out quotes , using reply in cited question suffices like

expr (int) myvector.__begin_[0]

to single value of position in vector.

c++ vector stl lldb

No comments:

Post a Comment