From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2087) id EF3DF3858D28; Wed, 8 Dec 2021 11:02:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EF3DF3858D28 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Jan Vrany To: gdb-cvs@sourceware.org Subject: [binutils-gdb] ppc: use "trap" ("tw, 31, 0, 0") as breakpoint instruction X-Act-Checkin: binutils-gdb X-Git-Author: Jan Vrany X-Git-Refname: refs/heads/master X-Git-Oldrev: a619b58721f0a03fd91c27670d3e4c2fb0d88f1e X-Git-Newrev: 44f3c3c212f9b568a6b3cff0444b6750e3d8680f Message-Id: <20211208110206.EF3DF3858D28@sourceware.org> Date: Wed, 8 Dec 2021 11:02:06 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Dec 2021 11:02:07 -0000 https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=44f3c3c212f9b568a6b3cff0444b6750e3d8680f commit 44f3c3c212f9b568a6b3cff0444b6750e3d8680f Author: Jan Vrany Date: Wed Dec 8 10:46:49 2021 +0000 ppc: use "trap" ("tw, 31, 0, 0") as breakpoint instruction 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 Diff: --- 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;