When I wanted to alter the execution of the program I am debugging by resizing a vector, but I got an error:
(lldb) expression std_vector_foo.resize(1)
error: Couldn't lookup symbols:
std::vector<string_id<mtype>, std::allocator<string_id<mtype> > >::resize(unsigned long)
Strangely enough the following runs fine:
expression std_vector_foo.reserve(1)
There are two ways to work around the absence of template methods that you want to call.
The most straightforward - if it works for you - is to turn on building the "stl module" for use in the expression parser by putting:
settings set target.import-std-module true
in your ~/.lldbinit. This will cause lldb to build a "clang module" for the stl libraries, from which lldb can build needed specializations on demand. This is, however, a fairly new feature, and was quite tricky to get working, so YMMV... I don't know if the GNU STL is modularizable, so it may only work with a recent version of the clang STL. ""Modules" turns out to be a highly overloaded term; in this context it means the clang feature:
https://clang.llvm.org/docs/Modules.html
If you do find problems with this, please file bugs with http://bugs.llvm.org.
The brute force way to make these methods available if this doesn't work is to put the equivalent of:
template class std::vector<string_id<mtype>>;
for whatever type you were trying to access the methods of into one of your source files. That forces the compiler to emit a complete version of this class specialization, leaving you with methods you can call. Of course, this will also bloat your code and you have to do it specialization by specialization, so it isn't a general solution. Still, it's a useful trick to keep in your back pocket.