From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1639 invoked by alias); 6 Dec 2013 12:35:10 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 1564 invoked by uid 89); 6 Dec 2013 12:35:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Dec 2013 12:35:09 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rB6CZ3Kb005555 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 6 Dec 2013 07:35:03 -0500 Received: from localhost.localdomain (ovpn-112-40.ams2.redhat.com [10.36.112.40]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rB6CZ1Nw032040; Fri, 6 Dec 2013 07:35:02 -0500 Message-ID: <52A1C475.4010901@redhat.com> Date: Fri, 06 Dec 2013 12:35:00 -0000 From: Phil Muldoon MIME-Version: 1.0 To: xdje42@gmail.com, gdb-patches@sourceware.org Subject: Re: [PATCH v1 03/13] script language API for GDB: python.[ch] changes References: <52a1662d.a601430a.7cf1.61b3@mx.google.com> In-Reply-To: <52a1662d.a601430a.7cf1.61b3@mx.google.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00241.txt.bz2 > + > +extern int gdbpy_auto_load_enabled (const struct script_language_defn *); > + > +/* script_language_ops "methods". */ > + > +extern int gdbpy_apply_val_pretty_printer > + (const struct script_language_defn *, > + struct type *type, const gdb_byte *valaddr, > + int embedded_offset, CORE_ADDR address, > + struct ui_file *stream, int recurse, > + const struct value *val, > + const struct value_print_options *options, > + const struct language_defn *language); > +extern enum script_bt_status gdbpy_apply_frame_filter > + (const struct script_language_defn *, > + struct frame_info *frame, int flags, enum script_frame_args args_type, > + struct ui_out *out, int frame_low, int frame_high); > +extern void gdbpy_preserve_values (const struct script_language_defn *, > + struct objfile *objfile, > + htab_t copied_types); > +extern enum scr_bp_stop gdbpy_breakpoint_cond_says_stop > + (const struct script_language_defn *, struct breakpoint *); > +extern int gdbpy_breakpoint_has_cond (const struct script_language_defn *, > + struct breakpoint *b); I did not ask in the previous patch, but why could not these functions have been kept in 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; > +} > + I missed the convention here, but I thought that methods exported to the ops struct had a gdbpy_ prefix? Cheers, Phil