summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/FormatClasses.cpp
diff options
context:
space:
mode:
authorEnrico Granata <granata.enrico@gmail.com>2011-07-25 16:59:05 +0000
committerEnrico Granata <granata.enrico@gmail.com>2011-07-25 16:59:05 +0000
commitc53114e30aa428ff2fcfd48927ef05b3d250a371 (patch)
tree5c42691b0243ffe52882e00b4e8d4ea3c8aebd79 /lldb/source/Core/FormatClasses.cpp
parent6d28d7f2a3079745a79fb95210e641ca844a902a (diff)
downloadbcm5719-llvm-c53114e30aa428ff2fcfd48927ef05b3d250a371.tar.gz
bcm5719-llvm-c53114e30aa428ff2fcfd48927ef05b3d250a371.zip
new flag -P to type synth add lets you type a Python class interactively
added a final newline to fooSynthProvider.py new option to automatically save user input in InputReaderEZ checking for NULL pointers in several new places llvm-svn: 135916
Diffstat (limited to 'lldb/source/Core/FormatClasses.cpp')
-rw-r--r--lldb/source/Core/FormatClasses.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/lldb/source/Core/FormatClasses.cpp b/lldb/source/Core/FormatClasses.cpp
index 9a232ae7af4..e321a40a310 100644
--- a/lldb/source/Core/FormatClasses.cpp
+++ b/lldb/source/Core/FormatClasses.cpp
@@ -164,15 +164,26 @@ SyntheticScriptProvider::FrontEnd::FrontEnd(std::string pclass,
SyntheticChildrenFrontEnd(be),
m_python_class(pclass)
{
+ if (be.get() == NULL)
+ {
+ m_interpreter = NULL;
+ m_wrapper = NULL;
+ return;
+ }
+
m_interpreter = be->GetUpdatePoint().GetTarget()->GetDebugger().GetCommandInterpreter().GetScriptInterpreter();
- m_wrapper = (PyObject*)m_interpreter->CreateSyntheticScriptedProvider(m_python_class, m_backend);
+
+ if (m_interpreter == NULL)
+ m_wrapper = NULL;
+ else
+ m_wrapper = (PyObject*)m_interpreter->CreateSyntheticScriptedProvider(m_python_class, m_backend);
}
std::string
SyntheticScriptProvider::GetDescription()
{
StreamString sstr;
- sstr.Printf("%s%s%s Python class: %s",
+ sstr.Printf("%s%s%s Python class %s",
m_cascades ? "" : " (not cascading)",
m_skip_pointers ? " (skip pointers)" : "",
m_skip_references ? " (skip references)" : "",
OpenPOWER on IntegriCloud