Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp715977pxa; Fri, 14 Aug 2020 16:23:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDwOHZD9ixDlGeynC9elgbB2EHycmDSlL8xWlZ6NMhKShMsBKZIoYlWmkR+STTDAJ9fJmI X-Received: by 2002:a17:906:5811:: with SMTP id m17mr4639414ejq.40.1597447388733; Fri, 14 Aug 2020 16:23:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597447388; cv=none; d=google.com; s=arc-20160816; b=0ETWAiesfXLtoc0cHIn4Db9RVXBB9Od8gv8YKNBuC9/JCwRZrl5Pp5AWjePikbn1jo 1+gM07SUnWVFqb78scygX+8FD6UZIf1FmqYIz/9VUDKTZK3CJiNU/lPYjv2vCihXHxSq Gfysi68h1+sHRfHImwg99wKCqnpg1NE56y9hOGU6kdYuuKmVM5Bw66QvTsyI8Bxm6GZy Ez8AcGKlj0Bnw11blUJ7tQ6HVkD33Ru2QzgtXG3biz6uEu+/TFXnfBSQ/jqvNBBhQd50 1mEtNi04eRhQjUkWXJhEveDTgv8Wbj+242Adr+li0PqUd9kj0a7K7mHSHdpv/0FaIr47 p0ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ZGUYTp73E8GMFqW/rsmEDltaWlYgY9ocHa8g62Q6xxQ=; b=eyvo9kNbbk6j5/KGD1jn22dGxFQaC3LYCwNdiwaRIZYTFhYmcBLn25Ww01GCSLSo/x 4GLEdelB1ZAeq5fPOHRXNMnjZmwYogmzgkrxTP6XRgT6/HCePl3DYCeDrlQYDsASnmSE i2F5KMEgmqitP2khYUlIQolk+R1HmnfS5RnTLQV9if6pMo3q2IXQLgl+XBFR9fRULCfP yUln9GXFD3rcFEdy8MT2SuP6KZngasQOEHvLBvtubPHTmM5Jd3kn5VOshkMlruFn6ArN Cq6oOc61sax3CpYuYQMgfiH10zIiO9Oxb9pKErvML21Dx97OPT9ZUPQ8WOyGrbLL/mZe GPjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=IpQ2IByu; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s24si6566782ejd.365.2020.08.14.16.22.46; Fri, 14 Aug 2020 16:23:08 -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=@google.com header.s=20161025 header.b=IpQ2IByu; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727946AbgHNW3s (ORCPT + 99 others); Fri, 14 Aug 2020 18:29:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726596AbgHNW3r (ORCPT ); Fri, 14 Aug 2020 18:29:47 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DBCEC061385 for ; Fri, 14 Aug 2020 15:29:45 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id 2so5053725pjx.5 for ; Fri, 14 Aug 2020 15:29:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZGUYTp73E8GMFqW/rsmEDltaWlYgY9ocHa8g62Q6xxQ=; b=IpQ2IByuLN+qZHcmz6Rp4PPhjPciiwBzN0lr3mpy495zjqQSngmqMWVI5/K7hmT6TQ tPOC7rPhbe0NolN5YoHISUBumH61UqmE7hkJO0AkWvM4hvG0o466JZ44hnFTPC4ivO+L QT9PSPTQWc4/z0m2DBOMULaZ9Iv+LuXX8W8jDmNOAr1WN/e4GyvwRnZk84mR+sUUCabx 2Hw3sd0ioOodsTR5fI7TqwB1gIpO1sKxXalqh7YtfMhVC3qEq/aMoKu2Gw+Wg5kvyxRI KCwrHJV0RO4gqmFdbRw6x2r6WUfwRTiXllzcvYbt8joKEsyW7ivBJKWq2Jxq3qPK1ggq Xh6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZGUYTp73E8GMFqW/rsmEDltaWlYgY9ocHa8g62Q6xxQ=; b=acvajBi+GLHRZSCgbGmF/I4TlZ7NbI1g63+BRGerzCEC7DEGsC1eBP9o3BW1h65+kF h8tlq6lpCIUjA701ytg3rvjMkmDbUDZhqqFS4rJqtHkd2GeANkXNSaWMMp6pxpit59fj M6xm6op/UbhK0KORNfS/RpCvUIwah+G9JhDVZBEcKSR9JTPLo2z7K099mxX/0MbwukJW dLMtrnInRd8MVLPIXdDNtnSmwptKVkYB0XQlz0iq3zo1vmpzRCoKOKpKk80JOLbY8Ich e6d90KKZMEROHTKPsGRAj79+afPcd33ZFPnImgKqxxMHuEIY6cKM2CHXMVva/UrVVCru 5mNg== X-Gm-Message-State: AOAM533bEuS6ZXIV7ONTrb63AbjXgQgXAdykqkmCrNZcnmN2L/QMSZiP iZz0n9riFu3txVZzBDmXcfcE2fJLLrJ3eWDarisN+A== X-Received: by 2002:a17:90a:fc98:: with SMTP id ci24mr3981435pjb.101.1597444185005; Fri, 14 Aug 2020 15:29:45 -0700 (PDT) MIME-Version: 1.0 References: <20200814212525.6118-1-john.ogness@linutronix.de> <20200814212525.6118-2-john.ogness@linutronix.de> In-Reply-To: <20200814212525.6118-2-john.ogness@linutronix.de> From: Nick Desaulniers Date: Fri, 14 Aug 2020 15:29:33 -0700 Message-ID: Subject: Re: [PATCH 1/2][next] scripts/gdb: add utils.read_ulong() To: John Ogness Cc: Jan Kiszka , 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 , LKML , David Laight Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 14, 2020 at 2:25 PM John Ogness wrote: > > Add a function for reading unsigned long values, which vary in size > depending on the architecture. > > Signed-off-by: John Ogness Reviewed-by: Nick Desaulniers /me wonders if there's any non-ILP32 or LP64 ARCH='s supported by the kernel. > --- > > 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 > -- Thanks, ~Nick Desaulniers