summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2012-08-08 02:06:30 +0000
committerEnrico Granata <egranata@apple.com>2012-08-08 02:06:30 +0000
commit40d557107f13a3b1781d83e0b41bc15754ddad07 (patch)
tree5d5301d6ea3c6bd3fe5870014770f5a01d951031 /lldb/source
parent316d5e4e9a74af8f90b49514377adb343f11db71 (diff)
downloadbcm5719-llvm-40d557107f13a3b1781d83e0b41bc15754ddad07.tar.gz
bcm5719-llvm-40d557107f13a3b1781d83e0b41bc15754ddad07.zip
<rdar://problem/11975483> Removing user-visible references to 'dict' as a parameter name for Python summary-generating functions since it is a Python keyword.
llvm-svn: 161467
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/Commands/CommandObjectBreakpointCommand.cpp2
-rw-r--r--lldb/source/Commands/CommandObjectCommands.cpp2
-rw-r--r--lldb/source/Commands/CommandObjectType.cpp4
-rw-r--r--lldb/source/Core/FormatManager.cpp4
-rw-r--r--lldb/source/Interpreter/ScriptInterpreterPython.cpp12
5 files changed, 12 insertions, 12 deletions
diff --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
index e8425599cc1..dd4901a0561 100644
--- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
@@ -558,7 +558,7 @@ protected:
else if (m_options.m_function_name.size())
{
std::string oneliner(m_options.m_function_name);
- oneliner += "(frame, bp_loc, dict)";
+ oneliner += "(frame, bp_loc, internal_dict)";
m_interpreter.GetScriptInterpreter()->SetBreakpointCommandCallback (bp_options,
oneliner.c_str());
}
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index bc26c74aa9d..d6eb21d9a5a 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -330,7 +330,7 @@ CommandObjectCommandsSource::CommandOptions::g_option_table[] =
static const char *g_python_command_instructions = "Enter your Python command(s). Type 'DONE' to end.\n"
"You must define a Python function with this signature:\n"
- "def my_command_impl(debugger, args, result, dict):";
+ "def my_command_impl(debugger, args, result, internal_dict):";
class CommandObjectCommandsAlias : public CommandObjectRaw
diff --git a/lldb/source/Commands/CommandObjectType.cpp b/lldb/source/Commands/CommandObjectType.cpp
index 96abd01596f..c5998723bd5 100644
--- a/lldb/source/Commands/CommandObjectType.cpp
+++ b/lldb/source/Commands/CommandObjectType.cpp
@@ -742,7 +742,7 @@ CommandObjectTypeFormatList_LoopCallback (
//-------------------------------------------------------------------------
static const char *g_summary_addreader_instructions = "Enter your Python command(s). Type 'DONE' to end.\n"
- "def function (valobj,dict):";
+ "def function (valobj,internal_dict):";
class TypeScriptAddInputReader : public InputReaderEZ
{
@@ -1050,7 +1050,7 @@ CommandObjectTypeSummaryAdd::Execute_ScriptSummary (Args& command, CommandReturn
return false;
}
- std::string code = (" " + m_options.m_python_function + "(valobj,dict)");
+ std::string code = (" " + m_options.m_python_function + "(valobj,internal_dict)");
script_format.reset(new ScriptSummaryFormat(m_options.m_flags,
funct_name,
diff --git a/lldb/source/Core/FormatManager.cpp b/lldb/source/Core/FormatManager.cpp
index cd689d6f6ff..c49301818c0 100644
--- a/lldb/source/Core/FormatManager.cpp
+++ b/lldb/source/Core/FormatManager.cpp
@@ -772,7 +772,7 @@ FormatManager::LoadLibcxxFormatters()
.SetHideItemNames(false);
#ifndef LLDB_DISABLE_PYTHON
- std::string code(" lldb.formatters.cpp.libcxx.stdstring_SummaryProvider(valobj,dict)");
+ std::string code(" lldb.formatters.cpp.libcxx.stdstring_SummaryProvider(valobj,internal_dict)");
lldb::TypeSummaryImplSP std_string_summary_sp(new ScriptSummaryFormat(stl_summary_flags, "lldb.formatters.cpp.libcxx.stdstring_SummaryProvider",code.c_str()));
TypeCategoryImpl::SharedPointer libcxx_category_sp = GetCategory(m_libcxx_category_name);
@@ -868,7 +868,7 @@ AddScriptSummary(TypeCategoryImpl::SharedPointer category_sp,
{
std::string code(" ");
- code.append(funct_name).append("(valobj,dict)");
+ code.append(funct_name).append("(valobj,internal_dict)");
lldb::TypeSummaryImplSP summary_sp(new ScriptSummaryFormat(flags,
funct_name,
diff --git a/lldb/source/Interpreter/ScriptInterpreterPython.cpp b/lldb/source/Interpreter/ScriptInterpreterPython.cpp
index 51f4af7e837..8d935dda92e 100644
--- a/lldb/source/Interpreter/ScriptInterpreterPython.cpp
+++ b/lldb/source/Interpreter/ScriptInterpreterPython.cpp
@@ -1466,9 +1466,9 @@ ScriptInterpreterPython::GenerateFunction(const char *signature, const StringLis
StringList auto_generated_function;
auto_generated_function.AppendString (signature);
auto_generated_function.AppendString (" global_dict = globals()"); // Grab the global dictionary
- auto_generated_function.AppendString (" new_keys = dict.keys()"); // Make a list of keys in the session dict
+ auto_generated_function.AppendString (" new_keys = internal_dict.keys()"); // Make a list of keys in the session dict
auto_generated_function.AppendString (" old_keys = global_dict.keys()"); // Save list of keys in global dict
- auto_generated_function.AppendString (" global_dict.update (dict)"); // Add the session dictionary to the
+ auto_generated_function.AppendString (" global_dict.update (internal_dict)"); // Add the session dictionary to the
// global dictionary.
// Wrap everything up inside the function, increasing the indentation.
@@ -1480,7 +1480,7 @@ ScriptInterpreterPython::GenerateFunction(const char *signature, const StringLis
auto_generated_function.AppendString (sstr.GetData());
}
auto_generated_function.AppendString (" for key in new_keys:"); // Iterate over all the keys from session dict
- auto_generated_function.AppendString (" dict[key] = global_dict[key]"); // Update session dict values
+ auto_generated_function.AppendString (" internal_dict[key] = global_dict[key]"); // Update session dict values
auto_generated_function.AppendString (" if key not in old_keys:"); // If key was not originally in global dict
auto_generated_function.AppendString (" del global_dict[key]"); // ...then remove key/value from global dict
@@ -1508,7 +1508,7 @@ ScriptInterpreterPython::GenerateTypeScriptFunction (StringList &user_input, std
// ValueObject as parameter to the function.
std::string auto_generated_function_name(GenerateUniqueName("lldb_autogen_python_type_print_func", num_created_functions, name_token));
- sstr.Printf ("def %s (valobj, dict):", auto_generated_function_name.c_str());
+ sstr.Printf ("def %s (valobj, internal_dict):", auto_generated_function_name.c_str());
if (!GenerateFunction(sstr.GetData(), user_input))
return false;
@@ -1531,7 +1531,7 @@ ScriptInterpreterPython::GenerateScriptAliasFunction (StringList &user_input, st
std::string auto_generated_function_name(GenerateUniqueName("lldb_autogen_python_cmd_alias_func", num_created_functions));
- sstr.Printf ("def %s (debugger, args, result, dict):", auto_generated_function_name.c_str());
+ sstr.Printf ("def %s (debugger, args, result, internal_dict):", auto_generated_function_name.c_str());
if (!GenerateFunction(sstr.GetData(),user_input))
return false;
@@ -1651,7 +1651,7 @@ ScriptInterpreterPython::GenerateBreakpointCommandCallbackData (StringList &user
return false;
std::string auto_generated_function_name(GenerateUniqueName("lldb_autogen_python_bp_callback_func_",num_created_functions));
- sstr.Printf ("def %s (frame, bp_loc, dict):", auto_generated_function_name.c_str());
+ sstr.Printf ("def %s (frame, bp_loc, internal_dict):", auto_generated_function_name.c_str());
if (!GenerateFunction(sstr.GetData(), user_input))
return false;
OpenPOWER on IntegriCloud