From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by sourceware.org (Postfix) with ESMTPS id D70023858D28 for ; Sat, 4 Dec 2021 10:16:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D70023858D28 Received: by mail-wm1-x332.google.com with SMTP id p18so4293354wmq.5 for ; Sat, 04 Dec 2021 02:16:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=cHJcfo6hg+6iGormY8XyAbVLOpunpPgfor5uo0S8mlA=; b=TtS2Qj0/GUqldwCNpF3nV4zPuWlfb3YKDObzL8yymWf6G8JmJIGKgwuLi8huBefCC+ 1mPo0JuZgrHH/TRaBERG0M96joT/QCZp8xW040N/DhJrP0kIHEePNJh+C8ckJFqoT2QN ldgPuvD69a/AhIwgm/4qRJcRerjhqmo2yHEb6Ztw/EPw6rAOvu90aLux9C1TVlwj0uiZ J6Tr5zwvb/38FF+BRHEKIGYsTb7Pw1lwDa4OWi4cly2Q+LklyI+/E7lRU4xEd6LkD9uY Ku0gU5El25dqtFumndaTJDbXroZ9MCYt2r330Qx/Ym/40pFJVH2ZQaYEIDq/LNSAXqwP LsnQ== X-Gm-Message-State: AOAM533O+MX2NribTXsxBjbu1uzesr+tvySWdH92DaNwqCPLgS0mOdFj w1iBUDSoJMxbLFx0if8x3oWF X-Google-Smtp-Source: ABdhPJyKhtV+rLCwHyhM+UmWjbJoEgcQsyWXhDOsbsf1UJCdIZulffA4p1ZIDowQxnMPmAfcEVnDpQ== X-Received: by 2002:a1c:4e04:: with SMTP id g4mr21980362wmh.15.1638613018901; Sat, 04 Dec 2021 02:16:58 -0800 (PST) Received: from takamaka.home ([2a01:cb22:1d5:1100:189d:8d55:3ad5:13d3]) by smtp.gmail.com with ESMTPSA id u2sm5700194wrs.17.2021.12.04.02.16.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Dec 2021 02:16:58 -0800 (PST) Received: by takamaka.home (Postfix, from userid 1000) id E8899A5A43; Sat, 4 Dec 2021 14:16:55 +0400 (+04) Date: Sat, 4 Dec 2021 14:16:55 +0400 From: Joel Brobecker To: Jan Vrany Cc: gdb-patches@sourceware.org, lsix@lancelotsix.com, brobecker@adacore.com, pedro@palves.net Subject: Re: [PATCH v3 1/2] ppc: use "trap" ("tw, 31, 0, 0") as breakpoint instruction Message-ID: References: <20211124130926.2412617-1-jan.vrany@labware.com> <20211201143005.3690440-2-jan.vrany@labware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211201143005.3690440-2-jan.vrany@labware.com> X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, 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: Sat, 04 Dec 2021 10:17:02 -0000 Hi Jan, On Wed, Dec 01, 2021 at 02:30:04PM +0000, Jan Vrany wrote: > Power ISA 3.0 B spec [1], sections 3.3.11 "Fixed-Point Trap Instructions" > and section C.6 "Trap Mnemonics" specify "tw, 31, 0, 0" (encoded as > 0x7fe00008) as canonical unconditional trap instruction. > > This commit changes the breakpoint instruction used by GDB from > "tw 12, r2, r2" to unconditional "trap". > > [1]: https://openpowerfoundation.org/?resource_lib=power-isa-version-3-0 Thanks for the additional reference. This looks good to me, and I think it's can be pushed independently of patch #2. > --- > gdb/rs6000-tdep.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c > index 87a494e0bb8..43880fa4426 100644 > --- a/gdb/rs6000-tdep.c > +++ b/gdb/rs6000-tdep.c > @@ -824,8 +824,8 @@ rs6000_fetch_pointer_argument (struct frame_info *frame, int argi, > > /* Sequence of bytes for breakpoint instruction. */ > > -constexpr gdb_byte big_breakpoint[] = { 0x7d, 0x82, 0x10, 0x08 }; > -constexpr gdb_byte little_breakpoint[] = { 0x08, 0x10, 0x82, 0x7d }; > +constexpr gdb_byte big_breakpoint[] = { 0x7f, 0xe0, 0x00, 0x08 }; > +constexpr gdb_byte little_breakpoint[] = { 0x08, 0x00, 0xe0, 0x7f }; > > typedef BP_MANIPULATION_ENDIAN (little_breakpoint, big_breakpoint) > rs6000_breakpoint; > -- > 2.30.2 > -- Joel