Is there something I need to do to be able to interactively query the state of the json objects while debugging in lldb? For example, this sample program produces output as expected
#include "json.h"
int main(int argc, char **argv)
{
json j;
j["a"] = 1;
j["b"] = "foo";
j["c"] = 3;
for (json::const_iterator element = j.begin(); element != j.end(); ++element) {
std::cout << element.key() << ": " << element.value() << std::endl;
}
}
but if I set a breakpoint on the "cout" line, attempting print the value of element.key() produces the error:
(lldb) print element.key()
error: Couldn't lookup symbols:
__ZNK8nlohmann6detail9iter_implIKNS_10basic_jsonIT_S3_NSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEbxydS3_S3_EEE3keyEv
I'm currently compiling with -O0 and and -g, but I've also tried all combinations of -fno-inline -mllvm -inline-threshold=1, as well as explicitly instantiating the template with:
template class nlohmann::basic_json<
std::__1::map,
std::__1::vector,
std::__1::basic_string< char, std::__1::char_traits< char >, std::__1::allocator< char > >,
bool,
long long,
unsigned long long,
double,
std::__1::allocator,
nlohmann::adl_serializer >;
Is there something I need to do to be able to interactively query the state of the json objects while debugging in lldb? For example, this sample program produces output as expected
#include "json.h"
but if I set a breakpoint on the "cout" line, attempting print the value of element.key() produces the error:
I'm currently compiling with -O0 and and -g, but I've also tried all combinations of
-fno-inline -mllvm -inline-threshold=1, as well as explicitly instantiating the template with: