summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/FormatManager.cpp
diff options
context:
space:
mode:
authorEnrico Granata <granata.enrico@gmail.com>2011-08-12 02:00:06 +0000
committerEnrico Granata <granata.enrico@gmail.com>2011-08-12 02:00:06 +0000
commit22c55d180ddc9772ee03d5034677d27a2735c92e (patch)
treeca48d4214abacb43fba0202dbfb673cf04d99f92 /lldb/source/Core/FormatManager.cpp
parente45db981e45f21ef6ec4101d12e626aa627b4374 (diff)
downloadbcm5719-llvm-22c55d180ddc9772ee03d5034677d27a2735c92e.tar.gz
bcm5719-llvm-22c55d180ddc9772ee03d5034677d27a2735c92e.zip
*Some more optimizations in usage of ConstString
*New setting target.max-children-count gives an upper-bound to the number of child objects that will be displayed at each depth-level This might be a breaking change in some scenarios. To override the new limit you can use the --show-all-children (-A) option to frame variable or increase the limit in your lldbinit file *Command "type synthetic" has been split in two: - "type synthetic" now only handles Python synthetic children providers - the new command "type filter" handles filters Because filters and synthetic providers are both ways to replace the children of a ValueObject, only one can be effective at any given time. llvm-svn: 137416
Diffstat (limited to 'lldb/source/Core/FormatManager.cpp')
-rw-r--r--lldb/source/Core/FormatManager.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/lldb/source/Core/FormatManager.cpp b/lldb/source/Core/FormatManager.cpp
index c0242fef336..2210e37f111 100644
--- a/lldb/source/Core/FormatManager.cpp
+++ b/lldb/source/Core/FormatManager.cpp
@@ -230,6 +230,44 @@ FormatNavigator<lldb::RegularExpressionSP, SyntheticFilter>::Delete(const char*
return false;
}
+template<>
+bool
+FormatNavigator<lldb::RegularExpressionSP, SyntheticScriptProvider>::Get(const char* key, SyntheticFilter::SharedPointer& value)
+{
+ Mutex::Locker(m_format_map.mutex());
+ MapIterator pos, end = m_format_map.map().end();
+ for (pos = m_format_map.map().begin(); pos != end; pos++)
+ {
+ lldb::RegularExpressionSP regex = pos->first;
+ if (regex->Execute(key))
+ {
+ value = pos->second;
+ return true;
+ }
+ }
+ return false;
+}
+
+template<>
+bool
+FormatNavigator<lldb::RegularExpressionSP, SyntheticScriptProvider>::Delete(const char* type)
+{
+ Mutex::Locker(m_format_map.mutex());
+ MapIterator pos, end = m_format_map.map().end();
+ for (pos = m_format_map.map().begin(); pos != end; pos++)
+ {
+ lldb::RegularExpressionSP regex = pos->first;
+ if ( ::strcmp(type,regex->GetText()) == 0)
+ {
+ m_format_map.map().erase(pos);
+ if (m_format_map.listener)
+ m_format_map.listener->Changed();
+ return true;
+ }
+ }
+ return false;
+}
+
lldb::Format
FormatManager::GetSingleItemFormat(lldb::Format vector_format)
{
OpenPOWER on IntegriCloud