From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20526 invoked by alias); 6 May 2013 20:42:56 -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 20517 invoked by uid 89); 6 May 2013 20:42:55 -0000 X-Spam-SWARE-Status: No, score=-7.0 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; Mon, 06 May 2013 20:42:55 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r46Kgsih017633 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 6 May 2013 16:42:54 -0400 Received: from barimba (ovpn-113-163.phx2.redhat.com [10.3.113.163]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r46KgqEn022136 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 6 May 2013 16:42:53 -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: <51876882.3010301@redhat.com> Date: Mon, 06 May 2013 20:42:00 -0000 In-Reply-To: <51876882.3010301@redhat.com> (Phil Muldoon's message of "Mon, 06 May 2013 09:23:30 +0100") Message-ID: <87ppx3x2k3.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-05/txt/msg00152.txt.bz2 >>>>> "Phil" == Phil Muldoon writes: Phil> @@ -52,14 +78,43 @@ mi_cmd_stack_list_frames (char *command, char **argv, int argc) Phil> + if ((argc > 3) || (argc == 2 && oind) || (argc == 1 && ! oind)) Phil> + error (_("-stack-list-frames: Usage: [--no-frame-filters] [FRAME_LOW FRAME_HIGH]")); Phil> - if (argc == 2) Phil> + if (argc == 3 || argc == 2) It seems to me that these checks should use oind rather than argc. Then they would be simpler. As it is I think they are wrong for the weird but accepted input: -stack-list-frames --no-frame-filters --no-frame-filters 0 15 Tom