public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ppc: use 'trap' ('tw, 31, 0, 0', 0x7fe00008) as breakpoint instruction
@ 2021-11-23 15:42 Jan Vrany
  2021-11-23 15:42 ` [PATCH 2/2] ppc: recognize all program traps Jan Vrany
  2021-11-24 13:09 ` [PATCH v2 0/2] " Jan Vrany
  0 siblings, 2 replies; 19+ messages in thread
From: Jan Vrany @ 2021-11-23 15:42 UTC (permalink / raw)
  To: gdb-patches; +Cc: Jan Vrany

GDB used to use "tw 12, r2, r2" as a breakpoint instruction. While it
works, the PowerPC specifies 'tw, 31, 0, 0' (0x7fe00008) as the
canonical unconditional trap.
---
 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


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2021-12-07 23:30 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23 15:42 [PATCH 1/2] ppc: use 'trap' ('tw, 31, 0, 0', 0x7fe00008) as breakpoint instruction Jan Vrany
2021-11-23 15:42 ` [PATCH 2/2] ppc: recognize all program traps Jan Vrany
2021-11-24 10:43   ` Lancelot SIX
2021-11-24 10:57     ` Lancelot SIX
2021-11-24 13:09 ` [PATCH v2 0/2] " Jan Vrany
2021-11-24 13:09   ` [PATCH v2 1/2] ppc: use 'trap' ('tw, 31, 0, 0', 0x7fe00008) as breakpoint instruction Jan Vrany
2021-11-27  6:45     ` Joel Brobecker
2021-11-29 11:50       ` Jan Vrany
2021-12-01  9:23         ` Joel Brobecker
2021-11-24 13:09   ` [PATCH v2 2/2] ppc: recognize all program traps Jan Vrany
2021-11-27  6:58     ` Joel Brobecker
2021-11-30 12:17     ` Pedro Alves
2021-12-01 13:52       ` Jan Vrany
2021-12-01 14:30   ` [PATCH v3 0/2] " Jan Vrany
2021-12-01 14:30   ` [PATCH v3 1/2] ppc: use "trap" ("tw, 31, 0, 0") as breakpoint instruction Jan Vrany
2021-12-04 10:16     ` Joel Brobecker
2021-12-01 14:30   ` [PATCH v3 2/2] ppc: recognize all program traps Jan Vrany
2021-12-04 10:18     ` Joel Brobecker
2021-12-07 23:30     ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).