On Fri, 15 Nov 2024 at 15:21, Philippe Mathieu-Daudé <phi...@linaro.org> wrote: > > cpu_unwind_state_data() is specific to TCG accelerator, > move it to "exec/translate-all.h". > > Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> > --- > include/exec/cpu-common.h | 13 ------------- > include/exec/translate-all.h | 12 ++++++++++++ > 2 files changed, 12 insertions(+), 13 deletions(-) > > diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h > index 638dc806a5..b36fbf2a39 100644 > --- a/include/exec/cpu-common.h > +++ b/include/exec/cpu-common.h > @@ -193,19 +193,6 @@ void tcg_cflags_set(CPUState *cpu, uint32_t flags); > /* current cflags for hashing/comparison */ > uint32_t curr_cflags(CPUState *cpu); > > -/** > - * cpu_unwind_state_data: > - * @cpu: the cpu context > - * @host_pc: the host pc within the translation > - * @data: output data > - * > - * Attempt to load the the unwind state for a host pc occurring in > - * translated code. If @host_pc is not in translated code, the > - * function returns false; otherwise @data is loaded. > - * This is the same unwind info as given to restore_state_to_opc. > - */ > -bool cpu_unwind_state_data(CPUState *cpu, uintptr_t host_pc, uint64_t *data); > - > /** > * cpu_restore_state: > * @cpu: the cpu context > diff --git a/include/exec/translate-all.h b/include/exec/translate-all.h > index 85c9460c7c..f06cfedd52 100644 > --- a/include/exec/translate-all.h > +++ b/include/exec/translate-all.h > @@ -21,6 +21,18 @@ > > #include "exec/exec-all.h" > > +/** > + * cpu_unwind_state_data: > + * @cpu: the cpu context > + * @host_pc: the host pc within the translation > + * @data: output data > + * > + * Attempt to load the the unwind state for a host pc occurring in > + * translated code. If @host_pc is not in translated code, the > + * function returns false; otherwise @data is loaded. > + * This is the same unwind info as given to restore_state_to_opc. > + */ > +bool cpu_unwind_state_data(CPUState *cpu, uintptr_t host_pc, uint64_t *data); > > /* translate-all.c */ > void tb_check_watchpoint(CPUState *cpu, uintptr_t retaddr);
This function is used by some code in target/i386 and target/openrisc, but a quick grep suggests that they don't include translate-all.h or any other header that would pull it in indirectly. It also seems a bit odd to move the cpu_unwind_state_data() prototype but not the similar cpu_restore_state() (which is also TCG-only). thanks -- PMM