This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Make "skip" work on inline frames
- From: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Sat, 19 Oct 2019 04:38:37 +0000
- Subject: Re: [PATCH] Make "skip" work on inline frames
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
- 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-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==
- References: <VI1PR03MB4528B9076FC778EF9C0B8B61E46C0@VI1PR03MB4528.eurprd03.prod.outlook.com>
Hmm,
I noticed that the patch does not yet handle
the step <count> 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:
--- 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,
>
> 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.
>