Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp673819pxa; Fri, 14 Aug 2020 14:55:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxi61dvvnqZSKYlHQDl3M5LxUyY9iHenOdTWmzJLOcmw3d6xUIPglqjjuSODOn6Qhl3NwL4 X-Received: by 2002:a50:9d8a:: with SMTP id w10mr4184037ede.16.1597442123429; Fri, 14 Aug 2020 14:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597442123; cv=none; d=google.com; s=arc-20160816; b=NVl/WSEKih9Bm4wAY1Ge8iM0zQErRqgEUi7f8Z1yvISeT0i0b4vZXrXlIbuDggotIN DvFiUlYT9Yan5GrF03RhVrBOYeapu4XmkVVg3YmLSmT1n+NbPw92zXZs+b+aZRuTRcYl MR9ZHZ0qC1tvTuDTQgh9HQUEEwREYO2SNf4zpxbPaK4oI3h51EpFOb83MPLzzhvRuMu0 HkUSWJ287pp7Of+roLJ5qvhhEjFmKVf7ZEg0Pkbk2/sJj86S/0xQC5XM7lTfZ/z7b5r5 BEsrRzzdc+4RaVpXgWLjRXeY7jqlMTataOsEg3n9ppFJruc/AMDokbTxGz+ywss743QJ fZwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :dkim-signature:from; bh=+UPBM8vFr0h2/LYMrWplW6LR09KGF9bvBDV3GqNp6Os=; b=XDS9VLV2MLiP/15qJvGXREQdKVIckMZ5PcadeVuqrZiFOtBVnusK9s50kHO5dPqiNi z9d+gFm+hdQ26IPDChi8+B48VfKx2xiJfBnlc3OOVBmhbcyFyG5PPwgV1GyN5u/LmLW9 wk1WXmPwGx3R9ikwDyzLqnYV8gKNsAgoWH16jKjxiwGLJHjtV7AH8aKdYFiyy8gGMgDr 68zLAVSisZP0on9/DmJvznetgOqDv1RHhSuAPxpp9CwyLP5/wCzjDwwRhXPp/RSq7tAy Qn1eMqsIBcmCAOyQHK0ZJ7LCIoCL0ARMoQ1/TW482z1l003T85eaX+W6l1eCxTSb8IrU pLlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=M0SB6Apg; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v6si6091758ejg.516.2020.08.14.14.55.00; Fri, 14 Aug 2020 14:55:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=M0SB6Apg; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728270AbgHNVZb (ORCPT + 99 others); Fri, 14 Aug 2020 17:25:31 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:39106 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727957AbgHNVZ3 (ORCPT ); Fri, 14 Aug 2020 17:25:29 -0400 From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1597440327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+UPBM8vFr0h2/LYMrWplW6LR09KGF9bvBDV3GqNp6Os=; b=M0SB6Apg28/RJvVG/zdmLG2f4uh5MpqrDovNVofE/dMbAy6V83qYjumNZAwL7jzDUXvfDL mUJSk7Jt6FIoziKpY98uP4SMvLgs7MsIIsRnR1YKOMKu9USuIFvv63g/wFduYIh1Wpg2ja HonhAs3hP49MhnlAQ63LXwrUEm2/f4TwiwkJlVsLi0hzhakVV5hAbgHHlIyZ8rROnYTkU3 jtZcYCcIiAoPQsvnYQ6oTMNizb9QY1t5aerpqjxFeMY7CJrX0q0tlnuudo9bWmtJveDhk6 E2DEvS/AkLZF5Z4Of+eSEPys5IPKhYvea1Kg05vDOnCydlMXSx1ddxgusobndg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1597440327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+UPBM8vFr0h2/LYMrWplW6LR09KGF9bvBDV3GqNp6Os=; b=3FcNCnQ+lOJUysUpQgMQmsYplakbmgnQFoEbhSw0IY7aaP/oA34Hh7fEA4afye0PdmBYhS xD1nldPhJU5e5lBQ== To: Jan Kiszka Cc: Andrew Morton , Baoquan He , Dave Young , Vivek Goyal , Jonathan Corbet , Kieran Bingham , Petr Mladek , Sergey Senozhatsky , Sergey Senozhatsky , Steven Rostedt , Linus Torvalds , Greg Kroah-Hartman , Nick Desaulniers , linux-kernel@vger.kernel.org Subject: [PATCH 1/2][next] scripts/gdb: add utils.read_ulong() Date: Fri, 14 Aug 2020 23:31:24 +0206 Message-Id: <20200814212525.6118-2-john.ogness@linutronix.de> In-Reply-To: <20200814212525.6118-1-john.ogness@linutronix.de> References: <20200814212525.6118-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a function for reading unsigned long values, which vary in size depending on the architecture. Signed-off-by: John Ogness --- based on next-20200814 scripts/gdb/linux/utils.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/gdb/linux/utils.py b/scripts/gdb/linux/utils.py index ea94221dbd39..ff7c1799d588 100644 --- a/scripts/gdb/linux/utils.py +++ b/scripts/gdb/linux/utils.py @@ -123,6 +123,13 @@ def read_u64(buffer, offset): return read_u32(buffer, offset + 4) + (read_u32(buffer, offset) << 32) +def read_ulong(buffer, offset): + if get_long_type().sizeof == 8: + return read_u64(buffer, offset) + else: + return read_u32(buffer, offset) + + target_arch = None -- 2.20.1