Revision 5b50e790 target-openrisc/gdbstub.c
b/target-openrisc/gdbstub.c | ||
---|---|---|
17 | 17 |
* You should have received a copy of the GNU Lesser General Public |
18 | 18 |
* License along with this library; if not, see <http://www.gnu.org/licenses/>. |
19 | 19 |
*/ |
20 |
#include "config.h" |
|
21 |
#include "qemu-common.h" |
|
22 |
#include "exec/gdbstub.h" |
|
20 | 23 |
|
21 |
static int cpu_gdb_read_register(CPUOpenRISCState *env, uint8_t *mem_buf, int n)
|
|
24 |
int openrisc_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n)
|
|
22 | 25 |
{ |
26 |
OpenRISCCPU *cpu = OPENRISC_CPU(cs); |
|
27 |
CPUOpenRISCState *env = &cpu->env; |
|
28 |
|
|
23 | 29 |
if (n < 32) { |
24 | 30 |
return gdb_get_reg32(mem_buf, env->gpr[n]); |
25 | 31 |
} else { |
... | ... | |
40 | 46 |
return 0; |
41 | 47 |
} |
42 | 48 |
|
43 |
static int cpu_gdb_write_register(CPUOpenRISCState *env, |
|
44 |
uint8_t *mem_buf, int n) |
|
49 |
int openrisc_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) |
|
45 | 50 |
{ |
46 |
OpenRISCCPU *cpu = openrisc_env_get_cpu(env); |
|
47 |
CPUClass *cc = CPU_GET_CLASS(cpu); |
|
51 |
OpenRISCCPU *cpu = OPENRISC_CPU(cs); |
|
52 |
CPUClass *cc = CPU_GET_CLASS(cs); |
|
53 |
CPUOpenRISCState *env = &cpu->env; |
|
48 | 54 |
uint32_t tmp; |
49 | 55 |
|
50 | 56 |
if (n > cc->gdb_num_core_regs) { |
Also available in: Unified diff