Debugger[New CDB]: First attempts at QMap<>.

Qualify map and hash nodes as Module!QMapNode<>.
Limit recursion depth of GDBMI dump.
Introduce error reporting.
Iterate QMap nodes and create artificial key/value nodes.
This commit is contained in:
Friedemann Kleint
2010-12-21 17:23:27 +01:00
parent da3a5360df
commit 8d3e48af33
9 changed files with 451 additions and 37 deletions

View File

@@ -37,6 +37,7 @@
#include <string>
#include <sstream>
#include <map>
#include <functional>
void trimFront(std::string &s);
void trimBack(std::string &s);
@@ -58,6 +59,18 @@ void split(const std::string &s, char sep, Iterator it)
}
}
// A boolean predicate that can be used for grepping sequences
// of strings for a 'needle' substring.
class SubStringPredicate : public std::unary_function<const std::string &, bool>
{
public:
explicit SubStringPredicate(const std::string &needle) : m_needle(needle) {}
bool operator()(const std::string &s) { return s.find(m_needle) != std::string::npos; }
private:
const std::string &m_needle;
};
// Format numbers, etc, as a string.
template <class Streamable>
std::string toString(const Streamable s)