summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/FormatManager.cpp
diff options
context:
space:
mode:
authorEnrico Granata <granata.enrico@gmail.com>2011-06-29 22:27:15 +0000
committerEnrico Granata <granata.enrico@gmail.com>2011-06-29 22:27:15 +0000
commit4becb37e345b95b00774e9e0a12d1f40776c175a (patch)
treef287f1b3244ec9528604626bbb73db3b42a46dbe /lldb/source/Core/FormatManager.cpp
parentd1ef780bb3162c53a51e0335325993298ea1e160 (diff)
downloadbcm5719-llvm-4becb37e345b95b00774e9e0a12d1f40776c175a.tar.gz
bcm5719-llvm-4becb37e345b95b00774e9e0a12d1f40776c175a.zip
This commit adds a new top subcommand "summary" to command type named "type". Currently this command
implements three commands: type summary add <format> <typename1> [<typename2> ...] type summary delete <typename1> [<typename2> ...] type summary list [<typename1> [<typename2>] ...] type summary clear This allows you to specify the default format that will be used to display summaries for variables, shown when you use "frame variable" or "expression", or the SBValue classes. Examples: type summary add "x = ${var.x}" Point type summary list type summary add --one-liner SimpleType llvm-svn: 134108
Diffstat (limited to 'lldb/source/Core/FormatManager.cpp')
-rw-r--r--lldb/source/Core/FormatManager.cpp58
1 files changed, 0 insertions, 58 deletions
diff --git a/lldb/source/Core/FormatManager.cpp b/lldb/source/Core/FormatManager.cpp
index 72503842387..8f8a60d3b49 100644
--- a/lldb/source/Core/FormatManager.cpp
+++ b/lldb/source/Core/FormatManager.cpp
@@ -151,61 +151,3 @@ FormatManager::GetFormatAsCString (Format format)
return g_format_infos[format].format_name;
return NULL;
}
-
-bool
-FormatManager::GetFormatForType (const ConstString &type_name, lldb::Format& format, bool& cascade)
-{
- Mutex::Locker locker (m_format_map_mutex);
- FormatMap& fmtmap = m_format_map;
- FormatMap::iterator iter = fmtmap.find(type_name.GetCString());
- if(iter == fmtmap.end())
- return false;
- else {
- format = iter->second.format;
- cascade = iter->second.cascades;
- return true;
- }
-}
-
-void
-FormatManager::AddFormatForType (const ConstString &type_name, lldb::Format format, bool cascade)
-{
- Entry entry(format, cascade);
- Mutex::Locker locker (m_format_map_mutex);
- FormatMap& fmtmap = m_format_map;
- fmtmap[type_name.GetCString()] = entry;
-}
-
-bool
-FormatManager::DeleteFormatForType (const ConstString &type_name)
-{
- Mutex::Locker locker (m_format_map_mutex);
- FormatMap& fmtmap = m_format_map;
- const char* typeCS = type_name.GetCString();
- FormatMap::iterator iter = fmtmap.find(typeCS);
- if (iter != fmtmap.end())
- {
- fmtmap.erase(typeCS);
- return true;
- }
- return false;
-}
-
-void
-FormatManager::LoopThroughFormatList (Callback callback, void* param)
-{
- if (callback)
- {
- Mutex::Locker locker (m_format_map_mutex);
- FormatIterator pos, end = m_format_map.end();
- for (pos = m_format_map.begin(); pos != end; ++pos)
- {
- const char* type = pos->first;
- lldb::Format format = pos->second.format;
- bool cascade = pos->second.cascades;
- if (!callback(param, type, format, cascade))
- break;
- }
- }
-}
-
OpenPOWER on IntegriCloud