From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lndn.lancelotsix.com (lndn.lancelotsix.com [51.195.220.111]) by sourceware.org (Postfix) with ESMTPS id BC4843858412 for ; Wed, 24 Nov 2021 10:57:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BC4843858412 Received: from ubuntu.lan (unknown [IPv6:2a02:390:9086::635]) by lndn.lancelotsix.com (Postfix) with ESMTPSA id E5BD080D5D; Wed, 24 Nov 2021 10:57:20 +0000 (UTC) Date: Wed, 24 Nov 2021 10:57:16 +0000 From: Lancelot SIX To: Jan Vrany , gdb-patches@sourceware.org Subject: Re: [PATCH 2/2] ppc: recognize all program traps Message-ID: <20211124105716.k67xzprypupf2kbz@ubuntu.lan> References: <20211123154237.2335848-1-jan.vrany@labware.com> <20211123154237.2335848-2-jan.vrany@labware.com> <20211124104312.4tclxcwyrvnhgqwv@ubuntu.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211124104312.4tclxcwyrvnhgqwv@ubuntu.lan> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.11 (lndn.lancelotsix.com [0.0.0.0]); Wed, 24 Nov 2021 10:57:21 +0000 (UTC) X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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, 24 Nov 2021 10:57:23 -0000 > > + > > +/* Implementation of gdbarch_program_breakpoint_here_p for POWER. */ > > + > > +static bool > > +rs6000_program_breakpoint_here_p (gdbarch *gdbarch, CORE_ADDR address) > > +{ > > + const uint32_t insn_len = 4; > > + gdb_byte target_mem[4]; > > You could probably use 'gdb_byte target_mem[insn_len]' here. Hi again, Using insn_len here makes most sense if insn_len is also declared constexpr. So this could become: constexpr uint32_t insn_len = 4; gdb_byte target_mem[insn_len]; What do you think? Best Lancelot.