From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54875 invoked by alias); 31 May 2017 15:19:46 -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 54459 invoked by uid 89); 31 May 2017 15:19:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.2 spammy=Hx-languages-length:835 X-HELO: mail-wm0-f45.google.com Received: from mail-wm0-f45.google.com (HELO mail-wm0-f45.google.com) (74.125.82.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 31 May 2017 15:19:45 +0000 Received: by mail-wm0-f45.google.com with SMTP id d127so23818176wmf.0 for ; Wed, 31 May 2017 08:19:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=BIAlTTeOTfEnYb8TdfwIgIqdEQ6LkHfUd5bRI4i24Ds=; b=fgCq8ccXkineoGa2V/lP782EDEm/uawpGMCUtgD3Lz7r0LNOjKWxZKru/tbNWM6Bak nhw4Fmo2X4mutPR8Z4UlTnPewm806tPOBO9OdWmyhqldTCg3DGt3jOfGafBg46JpRqj/ vk1H7o45udrfxVRsODb7u4HH5vnyf91+pQe9IL4n/dxhE0zY69zzy6aALeLB6sxCv49t K8Fi+ZS1W15S8W4yWIiF8IWO459bTFcyUBPXm0U9Rdz0WLksqwzaCMTHk9W4GX3O2gq7 N5qpueOWk1D6xNkOav9yEs8xzI2cHDzowHGOGRTIM1v9GRHexJXp+9szccwhDuCH4Rpr xJzw== X-Gm-Message-State: AODbwcDGHp4UzBcJYV0bFUdRSlforCLgGweyVbcFk98Q6wNkZbG5qdP1 3uYm5QnDYa2p/X9Nl+48rQ== X-Received: by 10.223.153.244 with SMTP id y107mr16445731wrb.96.1496243986138; Wed, 31 May 2017 08:19:46 -0700 (PDT) Received: from ?IPv6:2a02:c7f:ae15:7800:4685:ff:fe66:9f4? ([2a02:c7f:ae15:7800:4685:ff:fe66:9f4]) by smtp.gmail.com with ESMTPSA id x126sm24402388wme.12.2017.05.31.08.19.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 May 2017 08:19:44 -0700 (PDT) Subject: Re: [RFA] Make "bt N" print correct number of frames when using a frame filter To: Tom Tromey , gdb-patches@sourceware.org References: <20170423160446.17062-1-tom@tromey.com> From: Phil Muldoon Message-ID: <6e79fd89-6152-4504-3505-f754d0595deb@redhat.com> Date: Wed, 31 May 2017 15:19:00 -0000 MIME-Version: 1.0 In-Reply-To: <20170423160446.17062-1-tom@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00638.txt.bz2 On 23/04/17 17:04, Tom Tromey wrote: > PR python/16497 notes that using "bt" with a positive argument prints > the wrong number of frames when a frame filter is in use. Also, in this > case, the non-frame-filter path will print a message about "More stack > frames" when there are more; but this is not done in the frame-filter > case. > > The first problem is that backtrace_command_1 passes the wrong value > to apply_ext_lang_frame_filter -- that function takes the final > frame's number as an argument, but backtrace_command_1 passes the > count, which is off by one. > > The solution to the second problem is to have the C stack-printing > code stop at the correct number of frames and then print the message. Good catch. Patch LGTM. Cheers Phil