qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 1/5] dump: Include missing "cpu.h" header for tswap32/tswa


From: Richard Henderson
Subject: Re: [PATCH v3 1/5] dump: Include missing "cpu.h" header for tswap32/tswap64() declarations
Date: Thu, 23 Feb 2023 08:01:59 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1

On 2/23/23 00:09, Philippe Mathieu-Daudé wrote:
+#include "cpu.h"

Does it work to include "exec/cpu-all.h" instead?

We get:

include/exec/cpu-all.h:110:5: warning: 'TARGET_LONG_SIZE' is not defined, evaluates to 0 [-Wundef]
#if TARGET_LONG_SIZE == 4
     ^

TARGET_LONG_SIZE is defined in "exec/cpu-defs.h" which is
target specific. If I add "exec/cpu-defs.h" to "exec/cpu-all.h"
I get:

In file included from ../../dump/dump.c:18:
include/exec/cpu-all.h:439:8: error: incomplete definition of type 'struct 
ArchCPU'
     cpu->parent_obj.env_ptr = &cpu->env;
     ~~~^

Is it worth extracting the few tswapX() declarations to "exec/tswap.h"?

That's probably worthwhile, using cpu-param.h directly, perhaps, rather than pulling in the rest of cpu stuff?


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]