hw/intc/arm_gicv3_its: Implement VMOVP
[qemu/ar7.git] / target / hexagon / gdbstub.c
blobd152d01bfe7ef992d24a1f0626195b1657c0065c
1 /*
2 * Copyright(c) 2019-2021 Qualcomm Innovation Center, Inc. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see <http://www.gnu.org/licenses/>.
18 #include "qemu/osdep.h"
19 #include "exec/gdbstub.h"
20 #include "cpu.h"
21 #include "internal.h"
23 int hexagon_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
25 HexagonCPU *cpu = HEXAGON_CPU(cs);
26 CPUHexagonState *env = &cpu->env;
28 if (n < TOTAL_PER_THREAD_REGS) {
29 return gdb_get_regl(mem_buf, env->gpr[n]);
32 g_assert_not_reached();
35 int hexagon_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
37 HexagonCPU *cpu = HEXAGON_CPU(cs);
38 CPUHexagonState *env = &cpu->env;
40 if (n < TOTAL_PER_THREAD_REGS) {
41 env->gpr[n] = ldtul_p(mem_buf);
42 return sizeof(target_ulong);
45 g_assert_not_reached();