This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v1 03/13] script language API for GDB: python.[ch] changes
- From: Phil Muldoon <pmuldoon at redhat dot com>
- To: xdje42 at gmail dot com, gdb-patches at sourceware dot org
- Date: Fri, 06 Dec 2013 09:43:16 +0000
- Subject: Re: [PATCH v1 03/13] script language API for GDB: python.[ch] changes
- Authentication-results: sourceware.org; auth=none
- References: <52a1662d dot a601430a dot 7cf1 dot 61b3 at mx dot google dot com>
On 06/12/13 05:52, xdje42@gmail.com wrote:
> This patch contains the changes to python-internal.h, python.c, python.h.
> It defines the "ops" vectors for Python, defines script_language_python
> as the top level interface to Python, and then has a bunch of renamings.
> The functions that implement the script_language_ops "methods" are all
> named ${lang}_${method_name}.
> Functions that were exported to gdb now live in the ops vectors.
Thanks, I am reviewing these today. But, just a quick note.
> @@ -1815,8 +1851,29 @@ finish_python_initialization (void)
> do_cleanups (cleanup);
> }
>
> +/* Return non-zero if Python has successfully initialized.
> + This is the script_languages_ops.initialized "method". */
> +
> +static int
> +gdbpy_initialized (const struct script_language_defn *slang)
> +{
> + return gdb_python_initialized;
> +}
> +
> #endif /* HAVE_PYTHON */
>
> +/* Some code (e.g., MI) wants to know if a particular scripting language
> + successfully initialized.
> + Return non-zero if Python scripting successfully initialized. */
> +
> +int
> +script_lang_python_initialized (void)
> +{
> + if (script_language_python.ops != NULL)
> + return script_language_python.ops->initialized (&script_language_python);
> + return 0;
> +}
> +
This hunk was rejected via patch. All the other patches and hunks in
all the other mails were fine, so weird. Anyway just thought I would
note it, you might need to do a git pull. Or maybe the ^L's got mangled
by the mailer or something.
Cheers,
Phil