This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] sys.argv and ipython (interactive python) support in GDB/Python
- From: Tom Tromey <tromey at redhat dot com>
- To: Taisuke Yamada <tai at rakugaki dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 01 Jul 2011 08:26:58 -0600
- Subject: Re: [PATCH] sys.argv and ipython (interactive python) support in GDB/Python
- References: <BANLkTi=36=aFZPsBDJacOWvh-2Pk7OHKfQ@mail.gmail.com>
>>>>> "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