diff options
author | Tom Tromey <tromey@redhat.com> | 2012-01-10 21:26:39 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2012-01-10 21:26:39 +0000 |
commit | 065a711fc5e47237e62fbeca895a9d4c0c238cea (patch) | |
tree | d8c1b3b1302ad79d79487ce720bde42f30f910be /gdb | |
parent | f3f5162ecf1ddce3645951814b439d49ade1153e (diff) | |
download | gdb-065a711fc5e47237e62fbeca895a9d4c0c238cea.zip gdb-065a711fc5e47237e62fbeca895a9d4c0c238cea.tar.gz gdb-065a711fc5e47237e62fbeca895a9d4c0c238cea.tar.bz2 |
PR python/13199:
* python/python.c (finish_python_initialization): Set sys.argv.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/python/python.c | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 00405e5..1ac2510 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2012-01-10 Tom Tromey <tromey@redhat.com> + + PR python/13199: + * python/python.c (finish_python_initialization): Set sys.argv. + 2012-01-10 Doug Evans <dje@google.com> * dwarf2read.c (dwarf_decode_lines): Remove arg "abfd". New arg 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); |