From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x544.google.com (mail-ed1-x544.google.com [IPv6:2a00:1450:4864:20::544]) by sourceware.org (Postfix) with ESMTPS id E3AC938930F4 for ; Wed, 17 Jun 2020 15:46:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E3AC938930F4 Received: by mail-ed1-x544.google.com with SMTP id e12so2352058eds.2 for ; Wed, 17 Jun 2020 08:46:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-description:content-disposition:in-reply-to; bh=BGNe4wILAzRf9J/8UDg17ux5lmkuqeuAc7QUct7n+o0=; b=oGeA9pFjGglUvPCdJeJEJXBegfPxMbhRb/lsbG4nXJcxIJ94TJPiO0zFDahcZktzah sewNMb1Ab6O8G+G4tlNXU5UWB0iX4tjA0sMJdVgAHz6G8zLjT/RMEAG8hdw1wwiHpZnS 26vD65B0KsjbrRCCyGaK72R4p/luNSksio2k2MXSeEZhzOpuVXPqFPiOKwo8KGaYS1IJ 6yz2HfVkeiQ70QuFY0bg24ud+rz99gbfc9FyoVRWxDy+SyNuRLuj2QxpIFpmQ81ehD3H /6YAIm7WDmfYnbJvMpy4we7n/VqB4eQUkLAZMwkM/G4QqILs/dp8dSoQn/T/l5TuuZup NHMg== X-Gm-Message-State: AOAM531gAXW0depDhDDx1gBnIF6kF+XCShpsTIY+GLkaW454bAXOIiIW 3MsQhn8a0/wwesg4arOHRsY= X-Google-Smtp-Source: ABdhPJzgqCp2tADKEakhR5D0gG6lMUnouw6LgQaICOxwVCiWUKBIPJiDilnbBlzOmxsv+XW2xxDSMA== X-Received: by 2002:a05:6402:1247:: with SMTP id l7mr7461002edw.61.1592408813042; Wed, 17 Jun 2020 08:46:53 -0700 (PDT) Received: from gmail.com ([2a03:1b20:3:f011::6d]) by smtp.gmail.com with ESMTPSA id n35sm42307edc.11.2020.06.17.08.46.51 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Jun 2020 08:46:52 -0700 (PDT) Date: Wed, 17 Jun 2020 17:46:53 +0200 From: Shahab Vahedi To: Simon Marchi Cc: gdb-patches@sourceware.org, Shahab Vahedi , Anton Kolesov , Tom Tromey , Francois Bedard Subject: Re: [PATCH v2 2/4] arc: Recognize registers available on Linux targets Message-ID: <20200617154653.GA2284@gmail.com> References: <20200326125206.13120-1-shahab.vahedi@gmail.com> <20200428160437.1585-1-shahab.vahedi@gmail.com> <20200428160437.1585-3-shahab.vahedi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Description: simark_response Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2020 15:46:55 -0000 Hi Simon, On Thu, May 14, 2020 at 11:01:44AM -0400, Simon Marchi wrote: > Just some nits - I don't really know about the specific details of the ARC architecture. > > On 2020-04-28 12:04 p.m., Shahab Vahedi via Gdb-patches wrote: > > struct gdbarch *gdbarch = gdbarch_alloc (&info, tdep); > > > > /* Data types. */ > > @@ -1987,6 +2025,13 @@ arc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) > > set_gdbarch_ps_regnum (gdbarch, ARC_STATUS32_REGNUM); > > set_gdbarch_fp0_regnum (gdbarch, -1); /* No FPU registers. */ > > > > + /* Confirm that register name lists have proper length. */ > > + gdb_static_assert (ARC_LAST_REGNUM + 1 > > + == (ARRAY_SIZE (core_v2_register_names) > > + + ARRAY_SIZE (aux_minimal_register_names))); > > + gdb_static_assert (ARRAY_SIZE (core_v2_register_names) > > + == ARRAY_SIZE (core_arcompact_register_names)); > > Does this need to be here? I would expect them to be near (just after) the definitions > of said arrays. *_register_names are static arrays. That should be why gdb_STATIC_assert is used as well. I believe this place in the code is OK for making that check. Shahab