On 31 October 2016 at 03:13, Programmingkid <programmingk...@gmail.com> wrote:
> I'm trying to print the value of the arguments sent to
> gen_fmadds() in target-ppc/translate/fp-impl.inc.c. How
> do I do this? I have tried printf("cpu_fpr[rA(ctx->opcode)] = %d\n",
> cpu_fpr[rA(ctx->opcode)]), but that always prints the same
> value of 138 even if I change the values sent to fmadds.

At translate time we do not know the values in registers:
those are only available at runtime. The cpu_fpr[] values
are TCGv_i64 which are opaque datatypes (and just track
that FP register 5 is a unique thing that's not the same
as FP register 6, and so on).

For runtime information you need to turn on the -d
tracing with suitable flags for what you care about.
Where generated code calls a helper function you can
put a breakpoint or tracing in the helper to show
the arguments it prints, because the helper is called
at runtime, not translate time.

thanks
-- PMM

Reply via email to