From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21823 invoked by alias); 25 Apr 2013 19:35:52 -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 21806 invoked by uid 89); 25 Apr 2013 19:35:52 -0000 X-Spam-SWARE-Status: No, score=-6.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 25 Apr 2013 19:35:51 +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 r3PJZn6I010209 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 25 Apr 2013 15:35:49 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3PJZmI2013187 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 25 Apr 2013 15:35:49 -0400 From: Tom Tromey To: Phil Muldoon Cc: "gdb-patches\@sourceware.org" Subject: Re: [patch][python] 2 of 5 - Frame filter MI code changes. References: <51753BAE.7000406@redhat.com> Date: Fri, 26 Apr 2013 11:19:00 -0000 In-Reply-To: <51753BAE.7000406@redhat.com> (Phil Muldoon's message of "Mon, 22 Apr 2013 14:31:26 +0100") Message-ID: <87fvyeh08b.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-04/txt/msg00794.txt.bz2 Phil> + int result = PY_BT_ERROR; The enum type. Here and elsewhere. Phil> + if ((argc > 3 && ! raw_arg) || (argc == 1 && ! raw_arg) Phil> + || (argc == 2 && raw_arg)) Phil> + error (_("-stack-list-frames: Usage: [--no-frame-filters] [FRAME_LOW FRAME_HIGH]")); I think it is better for this code to check oind rather than argc. That way it will be robust if more options are added. And, it will mean checking fewer cases. Phil> + frame_low = atoi (argv[0 + raw_arg]); Phil> + frame_high = atoi (argv[1 + raw_arg]); oind here and anywhere else in the functions using mi_getopt. Phil> + int result = PY_BT_ERROR; enum type, it appears in a few spots. Tom