From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 498 invoked by alias); 15 Jul 2008 17:19:58 -0000 Received: (qmail 489 invoked by uid 22791); 15 Jul 2008 17:19:57 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 15 Jul 2008 17:19:40 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m6FHJaHj029762; Tue, 15 Jul 2008 13:19:36 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m6FHJZKw012047; Tue, 15 Jul 2008 13:19:35 -0400 Received: from opsy.redhat.com (vpn-10-3.bos.redhat.com [10.16.10.3]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m6FHJYN4016655; Tue, 15 Jul 2008 13:19:35 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id DA302378172; Tue, 15 Jul 2008 11:19:30 -0600 (MDT) To: Thiago Jung Bauermann Cc: gdb-patches ml Subject: Re: [RFA] Re: [RFC][patch 1/9] initial Python support References: <20080429155212.444237503@br.ibm.com> <20080429155304.288626880@br.ibm.com> <20080528205921.GA2969@caradoc.them.org> <20080615181833.uxmo25mg0kko40kw@imap.linux.ibm.com> <1216107418.14956.27.camel@localhost.localdomain> From: Tom Tromey Reply-To: tromey@redhat.com X-Attribution: Tom Date: Tue, 15 Jul 2008 17:19:00 -0000 In-Reply-To: <1216107418.14956.27.camel@localhost.localdomain> (Thiago Jung Bauermann's message of "Tue\, 15 Jul 2008 04\:36\:58 -0300") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 X-SW-Source: 2008-07/txt/msg00304.txt.bz2 >>>>> "Thiago" == Thiago Jung Bauermann writes: This patch had a couple of problems I didn't have time to fix up yesterday. I'm sorry about this ... I knew of them but didn't get the message out on time. Thiago> + if (list->control_type == python_control) Thiago> + { Thiago> + ui_out_field_string (uiout, NULL, "python"); Thiago> + print_command_lines (uiout, *list->body_list, depth + 1); Thiago> + if (depth) Thiago> + ui_out_spaces (uiout, 2 * depth); Thiago> + ui_out_field_string (uiout, NULL, "end"); Thiago> + ui_out_text (uiout, "\n"); Thiago> + list = list->next; Thiago> + continue; We should probably explicitly *not* indent python command bodies somehow. Thiago> +@node Python Thiago> +@chapter Scripting @value{GDBN} using Python Thiago> +@cindex Python I forgot to document the new 'python-stack' variable. (This one I just realized this morning...) Thiago> + Thiago> +void Thiago> +eval_python_from_control_command (struct command_line *cmd) Thiago> +{ This function needs a comment. Thiago> + char *tmpbuf = xstrprintf ("Type python script"); Thiago> + struct cleanup *cleanups = make_cleanup (xfree, tmpbuf); Thiago> + struct command_line *l = get_command_line (python_control, ""); Thiago> + cleanups = make_cleanup_free_command_lines (&l); Thiago> + execute_control_command_suppressed (l); Thiago> + do_cleanups (cleanups); Here we allocate a temporary string for no good reason (we can just use a string constant afaik); then we don't actually print it as a prompt. Whoops. I think I didn't quite finish a change here... though I don't really remember. How can we change our development process in git to make this work simpler for you? Tom