From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36106 invoked by alias); 8 Aug 2018 12:42:41 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 36091 invoked by uid 89); 8 Aug 2018 12:42:40 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1311 X-HELO: mail-wr1-f67.google.com Received: from mail-wr1-f67.google.com (HELO mail-wr1-f67.google.com) (209.85.221.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 08 Aug 2018 12:42:39 +0000 Received: by mail-wr1-f67.google.com with SMTP id b15-v6so1883016wrv.10 for ; Wed, 08 Aug 2018 05:42:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=7w7dPzbAqX0a/hHwwogqISUnjfmUu+v6ck/Ovf7ePKk=; b=Tq8hyXUWYAtAIxnZChppIYm3/U7Aa+LlXSR96CYbTuB8lx7HjEFIGEV7L909beYtL/ TkRd3qUD7amJq+p4zXlzNywCtwUBGQvKYFouTtnAiaYzUPKjT234G2WgDQcb/8ouBpKY s55qoiDkMzH84R+aVlrc4hK1sIxKtKcWVxPNVxs6fpNaAlUodlj5a3kpm6cPKLVmS5pE yBudKmyIS3DKwXMG0uzMB9gAeSQtNZnCJN8QSiIm3rm/Ap92yRAxX6qSNcLDC0rmYqwq rW+h90LllESq1taVNvISpAu1dvGAjHcFGUyurNkXKkVlDXcC6iLsj2I/G8i7OS5TMJVy c9dA== Return-Path: Received: from localhost (host81-140-215-41.range81-140.btcentralplus.com. [81.140.215.41]) by smtp.gmail.com with ESMTPSA id m68-v6sm9076595wmb.10.2018.08.08.05.42.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Aug 2018 05:42:36 -0700 (PDT) Date: Wed, 08 Aug 2018 12:42:00 -0000 From: Andrew Burgess To: Jim Wilson Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 1/5] RISC-V: Make riscv_isa_xlen a global function. Message-ID: <20180808124235.GL3155@embecosm.com> References: <20180808021406.7587-1-jimw@sifive.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180808021406.7587-1-jimw@sifive.com> X-Fortune: Kiss your keyboard goodbye! X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2018-08/txt/msg00152.txt.bz2 * Jim Wilson [2018-08-07 19:14:06 -0700]: > This allows the function to be used from riscv OS files, which also need to > depend on XLEN size. > > gdb/ > * riscv-tdep.c (riscv_isa_xlen): Drop static. > * riscv-tdep.h (riscv_isa_xlen): Add extern declaration. Looks good. Thanks, Andrew > --- > gdb/riscv-tdep.c | 2 +- > gdb/riscv-tdep.h | 3 +++ > 2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c > index abcac98016..20181896c5 100644 > --- a/gdb/riscv-tdep.c > +++ b/gdb/riscv-tdep.c > @@ -346,7 +346,7 @@ riscv_has_feature (struct gdbarch *gdbarch, char feature) > Possible return values are 4, 8, or 16 for RiscV variants RV32, RV64, or > RV128. */ > > -static int > +int > riscv_isa_xlen (struct gdbarch *gdbarch) > { > switch (gdbarch_tdep (gdbarch)->abi.fields.base_len) > diff --git a/gdb/riscv-tdep.h b/gdb/riscv-tdep.h > index 4fc05976ba..b35266daf7 100644 > --- a/gdb/riscv-tdep.h > +++ b/gdb/riscv-tdep.h > @@ -76,4 +76,7 @@ struct gdbarch_tdep > unsigned core_features; > }; > > +/* Return the width in bytes of the general purpose registers for GDBARCH. */ > +extern int riscv_isa_xlen (struct gdbarch *gdbarch); > + > #endif /* RISCV_TDEP_H */ > -- > 2.17.1 >