aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/monitor/hmp-target.h2
-rw-r--r--monitor/misc.c6
-rw-r--r--target/i386/monitor.c6
-rw-r--r--target/m68k/monitor.c2
-rw-r--r--target/nios2/monitor.c2
-rw-r--r--target/ppc/monitor.c10
-rw-r--r--target/riscv/monitor.c2
-rw-r--r--target/sh4/monitor.c2
-rw-r--r--target/sparc/monitor.c6
-rw-r--r--target/xtensa/monitor.c2
10 files changed, 20 insertions, 20 deletions
diff --git a/include/monitor/hmp-target.h b/include/monitor/hmp-target.h
index 385fb18..60fc927 100644
--- a/include/monitor/hmp-target.h
+++ b/include/monitor/hmp-target.h
@@ -41,7 +41,7 @@ struct MonitorDef {
const MonitorDef *target_monitor_defs(void);
int target_get_monitor_def(CPUState *cs, const char *name, uint64_t *pval);
-CPUArchState *mon_get_cpu_env(void);
+CPUArchState *mon_get_cpu_env(Monitor *mon);
CPUState *mon_get_cpu(Monitor *mon);
void hmp_info_mem(Monitor *mon, const QDict *qdict);
diff --git a/monitor/misc.c b/monitor/misc.c
index f566e28..398211a 100644
--- a/monitor/misc.c
+++ b/monitor/misc.c
@@ -294,9 +294,9 @@ CPUState *mon_get_cpu(Monitor *mon)
return mon_get_cpu_sync(mon, true);
}
-CPUArchState *mon_get_cpu_env(void)
+CPUArchState *mon_get_cpu_env(Monitor *mon)
{
- CPUState *cs = mon_get_cpu(monitor_cur());
+ CPUState *cs = mon_get_cpu(mon);
return cs ? cs->env_ptr : NULL;
}
@@ -1680,7 +1680,7 @@ int get_monitor_def(Monitor *mon, int64_t *pval, const char *name)
if (md->get_value) {
*pval = md->get_value(mon, md, md->offset);
} else {
- CPUArchState *env = mon_get_cpu_env();
+ CPUArchState *env = mon_get_cpu_env(mon);
ptr = (uint8_t *)env + md->offset;
switch(md->type) {
case MD_I32:
diff --git a/target/i386/monitor.c b/target/i386/monitor.c
index fed4606..9f9e1c4 100644
--- a/target/i386/monitor.c
+++ b/target/i386/monitor.c
@@ -222,7 +222,7 @@ void hmp_info_tlb(Monitor *mon, const QDict *qdict)
{
CPUArchState *env;
- env = mon_get_cpu_env();
+ env = mon_get_cpu_env(mon);
if (!env) {
monitor_printf(mon, "No CPU available\n");
return;
@@ -550,7 +550,7 @@ void hmp_info_mem(Monitor *mon, const QDict *qdict)
{
CPUArchState *env;
- env = mon_get_cpu_env();
+ env = mon_get_cpu_env(mon);
if (!env) {
monitor_printf(mon, "No CPU available\n");
return;
@@ -604,7 +604,7 @@ void hmp_mce(Monitor *mon, const QDict *qdict)
static target_long monitor_get_pc(Monitor *mon, const struct MonitorDef *md,
int val)
{
- CPUArchState *env = mon_get_cpu_env();
+ CPUArchState *env = mon_get_cpu_env(mon);
return env->eip + env->segs[R_CS].base;
}
diff --git a/target/m68k/monitor.c b/target/m68k/monitor.c
index 2055fe8..2bdf6ac 100644
--- a/target/m68k/monitor.c
+++ b/target/m68k/monitor.c
@@ -12,7 +12,7 @@
void hmp_info_tlb(Monitor *mon, const QDict *qdict)
{
- CPUArchState *env1 = mon_get_cpu_env();
+ CPUArchState *env1 = mon_get_cpu_env(mon);
if (!env1) {
monitor_printf(mon, "No CPU available\n");
diff --git a/target/nios2/monitor.c b/target/nios2/monitor.c
index 6646836..0152dec 100644
--- a/target/nios2/monitor.c
+++ b/target/nios2/monitor.c
@@ -29,7 +29,7 @@
void hmp_info_tlb(Monitor *mon, const QDict *qdict)
{
- CPUArchState *env1 = mon_get_cpu_env();
+ CPUArchState *env1 = mon_get_cpu_env(mon);
dump_mmu(env1);
}
diff --git a/target/ppc/monitor.c b/target/ppc/monitor.c
index 9c0fc2b..a475108 100644
--- a/target/ppc/monitor.c
+++ b/target/ppc/monitor.c
@@ -32,7 +32,7 @@
static target_long monitor_get_ccr(Monitor *mon, const struct MonitorDef *md,
int val)
{
- CPUArchState *env = mon_get_cpu_env();
+ CPUArchState *env = mon_get_cpu_env(mon);
unsigned int u;
int i;
@@ -47,27 +47,27 @@ static target_long monitor_get_ccr(Monitor *mon, const struct MonitorDef *md,
static target_long monitor_get_decr(Monitor *mon, const struct MonitorDef *md,
int val)
{
- CPUArchState *env = mon_get_cpu_env();
+ CPUArchState *env = mon_get_cpu_env(mon);
return cpu_ppc_load_decr(env);
}
static target_long monitor_get_tbu(Monitor *mon, const struct MonitorDef *md,
int val)
{
- CPUArchState *env = mon_get_cpu_env();
+ CPUArchState *env = mon_get_cpu_env(mon);
return cpu_ppc_load_tbu(env);
}
static target_long monitor_get_tbl(Monitor *mon, const struct MonitorDef *md,
int val)
{
- CPUArchState *env = mon_get_cpu_env();
+ CPUArchState *env = mon_get_cpu_env(mon);
return cpu_ppc_load_tbl(env);
}
void hmp_info_tlb(Monitor *mon, const QDict *qdict)
{
- CPUArchState *env1 = mon_get_cpu_env();
+ CPUArchState *env1 = mon_get_cpu_env(mon);
if (!env1) {
monitor_printf(mon, "No CPU available\n");
diff --git a/target/riscv/monitor.c b/target/riscv/monitor.c
index b569f08..e51188f 100644
--- a/target/riscv/monitor.c
+++ b/target/riscv/monitor.c
@@ -204,7 +204,7 @@ void hmp_info_mem(Monitor *mon, const QDict *qdict)
{
CPUArchState *env;
- env = mon_get_cpu_env();
+ env = mon_get_cpu_env(mon);
if (!env) {
monitor_printf(mon, "No CPU available\n");
return;
diff --git a/target/sh4/monitor.c b/target/sh4/monitor.c
index 918a5cc..2da6a54 100644
--- a/target/sh4/monitor.c
+++ b/target/sh4/monitor.c
@@ -41,7 +41,7 @@ static void print_tlb(Monitor *mon, int idx, tlb_t *tlb)
void hmp_info_tlb(Monitor *mon, const QDict *qdict)
{
- CPUArchState *env = mon_get_cpu_env();
+ CPUArchState *env = mon_get_cpu_env(mon);
int i;
if (!env) {
diff --git a/target/sparc/monitor.c b/target/sparc/monitor.c
index bf979d6..3184136 100644
--- a/target/sparc/monitor.c
+++ b/target/sparc/monitor.c
@@ -30,7 +30,7 @@
void hmp_info_tlb(Monitor *mon, const QDict *qdict)
{
- CPUArchState *env1 = mon_get_cpu_env();
+ CPUArchState *env1 = mon_get_cpu_env(mon);
if (!env1) {
monitor_printf(mon, "No CPU available\n");
@@ -43,7 +43,7 @@ void hmp_info_tlb(Monitor *mon, const QDict *qdict)
static target_long monitor_get_psr(Monitor *mon, const struct MonitorDef *md,
int val)
{
- CPUArchState *env = mon_get_cpu_env();
+ CPUArchState *env = mon_get_cpu_env(mon);
return cpu_get_psr(env);
}
@@ -52,7 +52,7 @@ static target_long monitor_get_psr(Monitor *mon, const struct MonitorDef *md,
static target_long monitor_get_reg(Monitor *mon, const struct MonitorDef *md,
int val)
{
- CPUArchState *env = mon_get_cpu_env();
+ CPUArchState *env = mon_get_cpu_env(mon);
return env->regwptr[val];
}
diff --git a/target/xtensa/monitor.c b/target/xtensa/monitor.c
index 608173c..fbf60d5 100644
--- a/target/xtensa/monitor.c
+++ b/target/xtensa/monitor.c
@@ -29,7 +29,7 @@
void hmp_info_tlb(Monitor *mon, const QDict *qdict)
{
- CPUArchState *env1 = mon_get_cpu_env();
+ CPUArchState *env1 = mon_get_cpu_env(mon);
if (!env1) {
monitor_printf(mon, "No CPU available\n");