qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC PATCH v7 13/29] target/loongarch: Add gdb support.


From: Richard Henderson
Subject: Re: [RFC PATCH v7 13/29] target/loongarch: Add gdb support.
Date: Mon, 28 Mar 2022 14:35:18 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0

On 3/28/22 06:57, Xiaojuan Yang wrote:
+int loongarch_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
+{
+    LoongArchCPU *cpu = LOONGARCH_CPU(cs);
+    CPULoongArchState *env = &cpu->env;
+    target_ulong tmp = ldtul_p(mem_buf);
+
+    if (0 <= n && n < 32) {
+        return env->gpr[n] = tmp, sizeof(target_ulong);

Ew.  Do not use the comma operator with return.
Split these into two statements, all through this file.


r~



reply via email to

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