> For now, we keep the global cpu_get_dump_info symbol defined. > > Signed-off-by: Pierrick Bouvier <[email protected]> > Message-ID: <[email protected]> > > diff --git a/target/riscv/arch_dump.c b/target/riscv/arch_dump.c > index 12b687990702..ac9e49646605 100644 > --- a/target/riscv/arch_dump.c > +++ b/target/riscv/arch_dump.c > @@ -20,6 +20,7 @@ > #include "cpu.h" > #include "elf.h" > #include "system/dump.h" > +#include "internals.h" > > /* struct user_regs_struct from arch/riscv/include/uapi/asm/ptrace.h */ > struct riscv64_user_regs { > @@ -161,17 +162,11 @@ int riscv_cpu_write_elf32_note(WriteCoreDumpFunction f, > CPUState *cs, > return ret; > } > > -int cpu_get_dump_info(ArchDumpInfo *info, > - const GuestPhysBlockList *guest_phys_blocks) > +int riscv_get_dump_info(const CPUState *cs, ArchDumpInfo *info, > + const GuestPhysBlockList *guest_phys_blocks) > { > - RISCVCPU *cpu; > - CPURISCVState *env; > - > - if (first_cpu == NULL) { > - return -1; > - } > - cpu = RISCV_CPU(first_cpu); > - env = &cpu->env; > + RISCVCPU *cpu = RISCV_CPU(cs); > + CPURISCVState *env = &cpu->env;
can it be const like other archs? -- Marc-André Lureau <[email protected]>
