qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 09/11] target/ppc: convert gdbstub to new helpers


From: Richard Henderson
Subject: Re: [PATCH v2 09/11] target/ppc: convert gdbstub to new helpers
Date: Mon, 24 Mar 2025 13:04:04 -0700
User-agent: Mozilla Thunderbird

On 3/24/25 12:29, Pierrick Bouvier wrote:
On 3/24/25 10:39, Richard Henderson wrote:
On 3/24/25 03:21, Alex Bennée wrote:
+    #ifdef TARGET_BIG_ENDIAN
+    MemOp end = MO_BE;
+    #else
+    MemOp end = MO_LE;
+    #endif
+#endif

That's what MO_TE is for.

+/*
+ * Helpers copied from helpers.h just for handling target_ulong values
+ * from gdbstub's GByteArray based on what the build config is. This
+ * will need fixing for single-binary.
+ */
+
+#if TARGET_LONG_BITS == 64
+#define ldtul_p(addr) ldq_p(addr)
+#define gdb_get_regl_value(m, b, v) gdb_get_reg64_value(m, b, v)
+#else
+#define ldtul_p(addr) ldl_p(addr)
+#define gdb_get_regl_value(m, b, v) gdb_get_reg32_value(m, b, v)
+#endif

Surely you're not intending to replicate this in any target that can have 
multiple sizes?
This is not an improvement.


If I'm correct (and from v1), ppc is the only architecture having registers defined with target_long types.

With a quick check, mips, riscv, sparc do as well.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]