From 065a711fc5e47237e62fbeca895a9d4c0c238cea Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 10 Jan 2012 21:26:39 +0000 Subject: PR python/13199: * python/python.c (finish_python_initialization): Set sys.argv. --- gdb/python/python.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gdb/python') diff --git a/gdb/python/python.c b/gdb/python/python.c index 5212d4e..5a0d776 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -1366,6 +1366,9 @@ def GdbSetPythonDirectory (dir):\n\ GdbSetPythonDirectory (gdb.PYTHONDIR)\n\ # Default prompt hook does nothing.\n\ prompt_hook = None\n\ +# Ensure that sys.argv is set to something.\n\ +# We do not use PySys_SetArgvEx because it did not appear until 2.6.6.\n\ +sys.argv = ['']\n\ "); do_cleanups (cleanup); -- cgit v1.1