|
From: | Stefan Weil |
Subject: | Re: [Qemu-devel] [PATCH 4/4] target-xxx: Use fprintf_function (format checking) |
Date: | Mon, 01 Nov 2010 08:05:48 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.15) Gecko/20101027 Thunderbird/3.0.10 |
Am 01.11.2010 03:24, schrieb TeLeMan:
On Sat, Oct 23, 2010 at 05:03, Stefan Weil <address@hidden> wrote:int eflags, i, nb; @@ -335,9 +333,11 @@ void cpu_dump_state(CPUState *env, FILE *f, (uint32_t)env->cr[2], (uint32_t)env->cr[3], (uint32_t)env->cr[4]); - for(i = 0; i < 4; i++) - cpu_fprintf(f, "DR%d=%08x ", i, env->dr[i]); - cpu_fprintf(f, "\nDR6=%08x DR7=%08x\n", env->dr[6], env->dr[7]); + for(i = 0; i < 4; i++) { + cpu_fprintf(f, "DR%d=" TARGET_FMT_lx " ", i, env->dr[i]); + }+ cpu_fprintf(f, "\nDR6=" TARGET_FMT_lx " DR7=" TARGET_FMT_lx "\n",+ env->dr[6], env->dr[7]); }I think this patch is not right. Outputting 64bits data is not necessary on 32bits mode.
Do you speak of 32 bit hosts or 32 bit targets? dr is of type target_ulong, so its size depends on the target's word size. TARGET_FMT_lx is the correct format specifier for target_ulong. What would you propose? Cheers, Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |