summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/python-wrapper.swig
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2014-11-22 00:02:47 +0000
committerEnrico Granata <egranata@apple.com>2014-11-22 00:02:47 +0000
commit7e4df56aae9256aab00ceb24bf26b30d2ed6900b (patch)
tree79fda1df16543541c1a70b5295746de7d4fffb61 /lldb/scripts/Python/python-wrapper.swig
parent4104b908cce949b47aa65e683df428fbf547d6ab (diff)
downloadbcm5719-llvm-7e4df56aae9256aab00ceb24bf26b30d2ed6900b.tar.gz
bcm5719-llvm-7e4df56aae9256aab00ceb24bf26b30d2ed6900b.zip
Enable Python summaries to use custom SBTypeSummaryOptions if the user is so inclined. Updates to the webdoc will follow
llvm-svn: 222593
Diffstat (limited to 'lldb/scripts/Python/python-wrapper.swig')
-rw-r--r--lldb/scripts/Python/python-wrapper.swig11
1 files changed, 10 insertions, 1 deletions
diff --git a/lldb/scripts/Python/python-wrapper.swig b/lldb/scripts/Python/python-wrapper.swig
index 1eaa52ba246..84375fd1547 100644
--- a/lldb/scripts/Python/python-wrapper.swig
+++ b/lldb/scripts/Python/python-wrapper.swig
@@ -342,10 +342,12 @@ LLDBSwigPythonCallTypeScript
const void *session_dictionary,
const lldb::ValueObjectSP& valobj_sp,
void** pyfunct_wrapper,
+ const lldb::TypeSummaryOptionsSP& options_sp,
std::string& retval
)
{
lldb::SBValue sb_value (valobj_sp);
+ lldb::SBTypeSummaryOptions sb_options(options_sp.get());
retval.clear();
@@ -384,7 +386,14 @@ LLDBSwigPythonCallTypeScript
if (!pfunc)
return false;
-
+
+ // if the third argument is supported, or varargs are allowed
+ PyCallable::argc argc = pfunc.GetNumArguments();
+ if (argc.num_args == 3 || argc.varargs == true)
+ pvalue = pfunc(sb_value,session_dict,sb_options);
+ else
+ pvalue = pfunc(sb_value,session_dict);
+
pvalue = pfunc(sb_value,session_dict);
Py_INCREF (session_dict);
OpenPOWER on IntegriCloud