From a64b4e179a85cefd8fd492e019430185e19fa32e Mon Sep 17 00:00:00 2001 From: Viktor Prutyanov Date: Wed, 6 Apr 2022 20:15:55 +0300 Subject: include/qemu: rename Windows context definitions to expose bitness MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Context structure in 64-bit Windows differs from 32-bit one and it should be reflected in its name. Signed-off-by: Viktor Prutyanov Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau Message-Id: <20220406171558.199263-2-viktor.prutyanov@redhat.com> --- dump/win_dump.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'dump') diff --git a/dump/win_dump.c b/dump/win_dump.c index fbdbb7b..e9215e4 100644 --- a/dump/win_dump.c +++ b/dump/win_dump.c @@ -188,7 +188,7 @@ try_again: } struct saved_context { - WinContext ctx; + WinContext64 ctx; uint64_t addr; }; @@ -220,7 +220,7 @@ static void patch_and_save_context(WinDumpHeader64 *h, CPUX86State *env = &x86_cpu->env; uint64_t Prcb; uint64_t Context; - WinContext ctx; + WinContext64 ctx; if (cpu_memory_rw_debug(first_cpu, KiProcessorBlock + i * sizeof(uint64_t), @@ -240,8 +240,8 @@ static void patch_and_save_context(WinDumpHeader64 *h, saved_ctx[i].addr = Context; - ctx = (WinContext){ - .ContextFlags = WIN_CTX_ALL, + ctx = (WinContext64){ + .ContextFlags = WIN_CTX64_ALL, .MxCsr = env->mxcsr, .SegEs = env->segs[0].selector, @@ -283,13 +283,13 @@ static void patch_and_save_context(WinDumpHeader64 *h, }; if (cpu_memory_rw_debug(first_cpu, Context, - (uint8_t *)&saved_ctx[i].ctx, sizeof(WinContext), 0)) { + (uint8_t *)&saved_ctx[i].ctx, sizeof(WinContext64), 0)) { error_setg(errp, "win-dump: failed to save CPU #%d context", i); return; } if (cpu_memory_rw_debug(first_cpu, Context, - (uint8_t *)&ctx, sizeof(WinContext), 1)) { + (uint8_t *)&ctx, sizeof(WinContext64), 1)) { error_setg(errp, "win-dump: failed to write CPU #%d context", i); return; } @@ -305,7 +305,7 @@ static void restore_context(WinDumpHeader64 *h, for (i = 0; i < h->NumberProcessors; i++) { if (cpu_memory_rw_debug(first_cpu, saved_ctx[i].addr, - (uint8_t *)&saved_ctx[i].ctx, sizeof(WinContext), 1)) { + (uint8_t *)&saved_ctx[i].ctx, sizeof(WinContext64), 1)) { warn_report("win-dump: failed to restore CPU #%d context", i); } } -- cgit v1.1