From patchwork Sat Oct 19 04:38:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Edlinger X-Patchwork-Id: 35152 Received: (qmail 92733 invoked by alias); 19 Oct 2019 04:40:12 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 92725 invoked by uid 89); 19 Oct 2019 04:40:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.9 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: EUR01-VE1-obe.outbound.protection.outlook.com Received: from mail-oln040092066099.outbound.protection.outlook.com (HELO EUR01-VE1-obe.outbound.protection.outlook.com) (40.92.66.99) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 19 Oct 2019 04:38:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IEQCEyPJsHiAj9lLBN1vKeXtSzsqyph1KPNNFLCM9DLHVr2eeS87cn+/RMmwWTUtCkKTTb6aoJ3ysfxsLrpTm5HaLY8gUmGUtDD+V2z7YAiqDQnpsEp56w5/aqT9UreqHb3hF3ju2Z/7XlbL97aDK1Xw05DtegmTcZo2bWW88leHAUhnm8LzYtckeryXe5ylJ+FGtR9B+cx2TSkXPtTisEhuJLcJ1DIZCNyshdSQ5FGG4dXwlXf68B5b1uD4Ds/KorcwcAdtrrbL/mY/QPk+vA2xkb4I+JrfZuj04ex7K5A8BQ0WgqdVUn8V9zoiSqMtse4Qrx3n2KcJUwRl6IHu3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9FgQOCooS1/Eaf4IpBH5ObSvjhv9igcaQ2shhT3GCCE=; b=k14xFhRhlGAwuYWDETdxBwniKkJNlB1YHst6ZSEzoF5lnFaI6+4mjqYaU84aYSR+G8mqJ7UlnUtEo1HJsVzPdMH8rFmxn5nVb9t2EvVG5TxDvZ+1efrJf9CXGYdc4mbZDBcmIIjv3jvRDMuXy+cqHXg9v7gWl7t8i9lFR/q3la1p6ifDmpyLIbyoCmdWJDR8V2VBKGrfdfijwIFwrnbM8I6KXP1q5TYAlluvsCnc11Twxss7qXzI3aL4giIe6p1tyHuOD/OcJe6bIDzjBEKXmEgC7FnWKPhhIdF5E7jGAspztRz38IZIMsGW+inVrYtTyv0nEHSHy7v9eLWFdsPFKw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from VE1EUR01FT056.eop-EUR01.prod.protection.outlook.com (10.152.2.51) by VE1EUR01HT155.eop-EUR01.prod.protection.outlook.com (10.152.3.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2367.14; Sat, 19 Oct 2019 04:38:38 +0000 Received: from VI1PR03MB4528.eurprd03.prod.outlook.com (10.152.2.53) by VE1EUR01FT056.mail.protection.outlook.com (10.152.3.115) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2367.14 via Frontend Transport; Sat, 19 Oct 2019 04:38:38 +0000 Received: from VI1PR03MB4528.eurprd03.prod.outlook.com ([fe80::f12a:6f14:2368:e758]) by VI1PR03MB4528.eurprd03.prod.outlook.com ([fe80::f12a:6f14:2368:e758%4]) with mapi id 15.20.2347.024; Sat, 19 Oct 2019 04:38:38 +0000 From: Bernd Edlinger To: "gdb-patches@sourceware.org" Subject: Re: [PATCH] Make "skip" work on inline frames Date: Sat, 19 Oct 2019 04:38:37 +0000 Message-ID: References: In-Reply-To: x-microsoft-original-message-id: <316c711e-31ff-bf50-21b5-0f2d15f16df0@hotmail.de> x-ms-exchange-transport-forked: True Content-ID: <8E85AE2BBFCEB845A974230EBEF08D73@eurprd03.prod.outlook.com> MIME-Version: 1.0 Hmm, I noticed that the patch does not yet handle the step correctly, the count is decremented although the inline frame is skipped and should not be counted... Thus I will need to change at least this: > > I noticed that skip is not working well on inlined frames which may > happen in optimized gcc stage3 binary, where step stops at functions > which are marked for skip, whenever they happen to be in-lined, where > it is ignored if the frame is marked for skip, thus currently > skipped frames are only checked when the skipped function > is not inlined, which is usually only the case in non-optimized builds. > > > Thanks > Bernd. > --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -1122,7 +1122,6 @@ prepare_one_step (struct step_command_fsm *sm) set_running (resume_ptid, 1); step_into_inline_frame (tp); - sm->count--; sal = find_frame_sal (frame); sym = get_frame_function (frame); @@ -1132,13 +1131,17 @@ prepare_one_step (struct step_command_fsm *sm) if (sal.line == 0 || !function_name_is_marked_for_skip (fn, sal)) - return prepare_one_step (sm); + { + sm->count--; + return prepare_one_step (sm); + } } So I'll send a new patch in a moment. Thanks. On 10/18/19 2:52 PM, Bernd Edlinger wrote: > Hi,