Message ID | 20240619074911.100434-7-kuan-ying.lee@canonical.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 859BBC27C53 for <linux-mm@archiver.kernel.org>; Wed, 19 Jun 2024 07:49:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 108206B03F4; Wed, 19 Jun 2024 03:49:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0B7E06B03F5; Wed, 19 Jun 2024 03:49:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E73A46B03F6; Wed, 19 Jun 2024 03:49:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id C03A96B03F4 for <linux-mm@kvack.org>; Wed, 19 Jun 2024 03:49:55 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 4CE93A3390 for <linux-mm@kvack.org>; Wed, 19 Jun 2024 07:49:55 +0000 (UTC) X-FDA: 82246864350.27.BEE1623 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by imf23.hostedemail.com (Postfix) with ESMTP id 3434914000C for <linux-mm@kvack.org>; Wed, 19 Jun 2024 07:49:52 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=canonical.com header.s=20210705 header.b=sZ6nBALH; spf=pass (imf23.hostedemail.com: domain of kuan-ying.lee@canonical.com designates 185.125.188.122 as permitted sender) smtp.mailfrom=kuan-ying.lee@canonical.com; dmarc=pass (policy=none) header.from=canonical.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1718783387; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=+Z6PIWkhLWvItlz4Fqmv/v1cM41RjY2eqsQ7JQg3TVM=; b=uSYKriRmMVodEn/L3AkgYE9u/vR53B/8z4lup78HNIIJo9llv+QlCfUHl57DdUai/SE0vh 2vkDz/gMzRRvBGId3WYMYsfE20bH4VrNUM/h1FrwlCH7pdEJpg9NRdzQ3NojNVFebF/A82 TD9K5xqS7nQuCk669cY7M6MCB5lzIIY= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=canonical.com header.s=20210705 header.b=sZ6nBALH; spf=pass (imf23.hostedemail.com: domain of kuan-ying.lee@canonical.com designates 185.125.188.122 as permitted sender) smtp.mailfrom=kuan-ying.lee@canonical.com; dmarc=pass (policy=none) header.from=canonical.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718783387; a=rsa-sha256; cv=none; b=gBxnfB+lb55djCLY3zv+Jf4joBaNAO/mexbztwUuFSxuJi/pv1hrZwZdFJeAGA0bvRvaga Np7GS9XaHlFD4I6+d71xNMVBfiXx/NtVxEMRmT5lezlEFt52ALW7zv2mYtc4HaLIi3qKOu fhDFmbjQfyFQqYwKdoLSPhAtl0UJHrU= Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 8A0E63F67A for <linux-mm@kvack.org>; Wed, 19 Jun 2024 07:49:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1718783391; bh=+Z6PIWkhLWvItlz4Fqmv/v1cM41RjY2eqsQ7JQg3TVM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=sZ6nBALHlx056d9Lv09vlvluguvFoKiwMgadV8h+lAo/XaBGR3cULWjfF63jlDAF8 Dxoj5BppvmOOIut90pkX9HU8kvDiGWMTmo1VdU13SSP0XUikzZJby1rmPGu3ZmnrFq 1oScB43sZq3Zt2WOvsErmFtpzR1tL6KQy+LRZaJ10XTGhbEPaKcGNYWINN6tZfPwfF NYhI3gu7qrcJcDkVqJfJ8ttFqgqS7YvEPItN3wEMCuxRuQV+H7RmF32ENGK8SOzbvd NSdLr4XmcXQHRLjqO6jYK2vE1GLSAK4C1lAy1tplhrINkgulns0vouvntM9HeKAJVs sSv1EAiM4Jz0Q== Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-706345802a3so510325b3a.1 for <linux-mm@kvack.org>; Wed, 19 Jun 2024 00:49:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718783390; x=1719388190; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+Z6PIWkhLWvItlz4Fqmv/v1cM41RjY2eqsQ7JQg3TVM=; b=uhUizRHHMLwJxIiPeZkslYgA1sLVYVTBN3ORniRMci46uNbAPjv6pDu2JukraKleVV VkXdbOqzEYr9IdKHEUpJn1Mrj3ZTm8Vt9mzzrbefoyDfUTMeE3l9MlK318IE8/a3omzC ZKq9nwnO7BhZ3EGeNC6aOPbA/lmRLOxTrH5/855mFEuXWGbr4lyn3COZBOiCmwO8Eqs0 2diBCSoLGFZMJHllV4Xh2frPPS0DXv3qareC3L49NneC0ePNs/bYl4ivlL9Hl6G8rtjq 3Kiz7RKdNa1MN/dmbkW7oPT6mw9gvYZ86DDN2gQTXEe2ZX9WBggtqpBApSCcunfgofOZ TuvQ== X-Gm-Message-State: AOJu0YwjOdPAZKz8tOn67UnN6Wu1AdJ6Ti5rKzwB9GCzXsvn8ItwpGUU rVEK/faKP23Ng0e4AzbOvToOm1WhkuL4fRPq7dp00VKMUEweCENup4A5OOMtYpZsH5GDe2giF4i LQaIN4hAVvItsogqcCQtXVL+l8Qw9iMgNn9/jQGjXVMzz7H4Jy/Mlj7KgF06Iseyr X-Received: by 2002:a05:6a20:3219:b0:1af:96e8:7b9c with SMTP id adf61e73a8af0-1bcbb5e2c01mr1830060637.47.1718783390166; Wed, 19 Jun 2024 00:49:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH1iF4A/y2B2hwDQfIT/eUeqxoyRy14g5sQYr2UmEdpWhzAQpQaAnzac+jnykGR3Ot6xCIhJA== X-Received: by 2002:a05:6a20:3219:b0:1af:96e8:7b9c with SMTP id adf61e73a8af0-1bcbb5e2c01mr1830050637.47.1718783389848; Wed, 19 Jun 2024 00:49:49 -0700 (PDT) Received: from kylee-ThinkPad-E16-Gen-1.. ([122.147.171.160]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-705ccb3cdc6sm10076908b3a.138.2024.06.19.00.49.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 00:49:49 -0700 (PDT) From: Kuan-Ying Lee <kuan-ying.lee@canonical.com> To: kuan-ying.lee@canonical.com, Andrew Morton <akpm@linux-foundation.org>, Jan Kiszka <jan.kiszka@siemens.com>, Kieran Bingham <kbingham@kernel.org>, Vlastimil Babka <vbabka@suse.cz>, Marco Elver <elver@google.com>, Peter Collingbourne <pcc@google.com>, Oscar Salvador <osalvador@suse.de> Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/6] scripts/gdb: rename pool_index to pool_index_plus_1 Date: Wed, 19 Jun 2024 15:49:11 +0800 Message-Id: <20240619074911.100434-7-kuan-ying.lee@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240619074911.100434-1-kuan-ying.lee@canonical.com> References: <20240619074911.100434-1-kuan-ying.lee@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Stat-Signature: docpjhmw1er5ungyhn43e7iwgyw4fwwn X-Rspam-User: X-Rspamd-Queue-Id: 3434914000C X-Rspamd-Server: rspam02 X-HE-Tag: 1718783392-239627 X-HE-Meta: U2FsdGVkX18ELF1iHa2s9PbGedsRJC8v12ZRepH10YsfzqRtNufKzru7hqqEGF7D2kfPQyK8DmcNhmOyT3OhMvXpdbYKWWaATI1tlxVmoq+dm6mZTyaLqYHo8BE+MT0DbwQZwxWAgsnGYOqDM4GDf2aMJvjgE3eUUl+Eka7whW5EYv9NkcUbwaYKqgkYGHykEGbWc6SRM+iHqsPhBKm5ybVzLxGTQaliHcqJ3ZDJPR88ZIci3XReS+Y5/x7Jyu96PB5DzDDm4YvdBviQAoixzqhwKcCFRnP9MoW147AAmWanfMyRR4UFZhzmQ4FKi4peSMhEQAF6WVTSyS34VBal7nO/MsbIbAmP2M8p105wWqU8yDn1oFIwSzhp/ehmnLAxP6vZE+6H1B8SSJVAuwDalQ3+d8wvUkYHLO3HbT2jp61RWs+7wEDDi4qOzBgeORIcKfN3k5FKg4cIOmZkXqjV2v9Puw9y+FMMPZKMgiinXyXlmMui/VxeV9Uw7OVynGbLjEaDzLkBaomYjK/EU+3Q8rS1TFgfNmDhG+GWkH3YuLwJuDkp7Nbj4V3daBgPkm0fMFuXvTgrMagU205DD+pZlmhd2mUs2BzXulAOFsxUMzLvr2heF1/hSEhR4vhvy9WDK2L8XpI6LuO6O45Lx6J93uR8PjMY9IFwj8Ws5wbeVrsoZDF6dXmY4yhgCICZtOuTmbYNjH/LiE3ue3GQfCJ2gc03plzfm9U0xvHz/Ccl3mh2J+QI0HWPMt5FTKWK9PpGoCvQ2qFumc1pG80/4Z9RtsIEHNdrtz0gCzUu86P9rsRW/s/9vhOizYvVhn1ve0gtu+gbeVFnZt65W2NOUz2ekb6FwKxm5ys5boYTj5ToimejoUDBDrRy8uZxBq1Rn8VeapNrmuwSBRzIAGQN9l5imKPY9FT03nFF9mGDDuu8swKQFw8bqOWUPZVnLso5fFeWzCD4qg0NPKHkgdVcLrZ nkh2GUmF n9J8YYFMfbv11Sew5EDvnL3+xq5n9Z/qo4lWDDdZqmzJpZNKm8gpHMEM71e+HVp205g6ssrQZzbqke5naocrW2i7jgs86MRKID/buhDP7pIgUILM78CmFhwxcFgpvAp8Jqqu6Wz/2u1qu++OME52FnoHYUSwCfQqlB5aeeqByGAoZBwFIc5RxSYFhXza5+kLIHoRBYJ07o40IHQNAjlsg4jz1aWnrcEgV/yl6RbTK1/z4T4fKOXyWTALNpc0W2S4lwDt8/CqqM/Z432HWdfb/1WOvYMygVZRqw2R8nIa2HDWM45PdEd72aHz9dD0p30j+jI5ntdmK2UQU0F3uFaQADNdkiBpjO5nkVBVodlDgg/+qVlc= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Fix GDB command error
|
expand
|
diff --git a/scripts/gdb/linux/stackdepot.py b/scripts/gdb/linux/stackdepot.py index 0281d9de4b7c..bb3a0f843931 100644 --- a/scripts/gdb/linux/stackdepot.py +++ b/scripts/gdb/linux/stackdepot.py @@ -27,14 +27,18 @@ def stack_depot_fetch(handle): offset = parts['offset'] << DEPOT_STACK_ALIGN pools_num = gdb.parse_and_eval('pools_num') - if parts['pool_index'] > pools_num: + if handle == 0: + raise gdb.GdbError("handle is 0\n") + + pool_index = parts['pool_index_plus_1'] - 1 + if pool_index >= pools_num: gdb.write("pool index %d out of bounds (%d) for stack id 0x%08x\n" % (parts['pool_index'], pools_num, handle)) return gdb.Value(0), 0 stack_pools = gdb.parse_and_eval('stack_pools') try: - pool = stack_pools[parts['pool_index']] + pool = stack_pools[pool_index] stack = (pool + gdb.Value(offset).cast(utils.get_size_t_type())).cast(stack_record_type.get_type().pointer()) size = int(stack['size'].cast(utils.get_ulong_type())) return stack['entries'], size
We encounter the following issue after commit a6c1d9cb9a68 ("stackdepot: rename pool_index to pool_index_plus_1"). (gdb) lx-dump-page-owner --pfn 262144 ... Python Exception <class 'gdb.error'>: There is no member named pool_index. Error occurred in Python: There is no member named pool_index. We rename pool_index to pool_index_plus_1 to fix this issue. Fixes: a6c1d9cb9a68 ("stackdepot: rename pool_index to pool_index_plus_1") Signed-off-by: Kuan-Ying Lee <kuan-ying.lee@canonical.com> --- scripts/gdb/linux/stackdepot.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)