Re: [PATCH] sys.argv and ipython (interactive python) support in GDB/Python

Tom Tromey
2011-07-01T14:27:17Z

>>>>> "Taisuke" == Taisuke Yamada <tai@rakugaki.org> writes:

Taisuke> So here is a patch to set sys.argv when initializing embedded
Taisuke> Python interpreter.

Taisuke> + char *argv[] = { "gdb", NULL };

It seems to me that this should probably be { "", NULL }.
From the docs:

-- Function: void PySys_SetArgvEx (int argc, char **argv,
int updatepath)
[...]
If there isn't a script that will be run,
the first entry in _argv_ can be an empty string.

Tom