[PATCH v4 5/7] dump: Introduce create_win_dump()

Philippe Mathieu-Daudé posted 7 patches 2 years, 2 months ago
There is a newer version of this series
[PATCH v4 5/7] dump: Introduce create_win_dump()
Posted by Philippe Mathieu-Daudé 2 years, 2 months ago
Remove another TARGET_X86_64 #ifdef'ry by introducing
a create_win_dump() stub. We'll extract it to a stub
file for non-x86 targets in the next commit.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 dump/dump.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/dump/dump.c b/dump/dump.c
index c356a88be1..b33a613d45 100644
--- a/dump/dump.c
+++ b/dump/dump.c
@@ -39,6 +39,11 @@ bool win_dump_available(Error **errp)
 
     return false;
 }
+
+void create_win_dump(DumpState *s, Error **errp)
+{
+    win_dump_available(errp);
+}
 #endif
 
 #include <zlib.h>
@@ -2031,9 +2036,7 @@ static void dump_process(DumpState *s, Error **errp)
     DumpQueryResult *result = NULL;
 
     if (s->has_format && s->format == DUMP_GUEST_MEMORY_FORMAT_WIN_DMP) {
-#ifdef TARGET_X86_64
         create_win_dump(s, errp);
-#endif
     } else if (s->has_format && s->format != DUMP_GUEST_MEMORY_FORMAT_ELF) {
         create_kdump_vmcore(s, errp);
     } else {
-- 
2.38.1


Re: [PATCH v4 5/7] dump: Introduce create_win_dump()
Posted by Thomas Huth 2 years, 2 months ago
On 24/02/2023 00.17, Philippe Mathieu-Daudé wrote:
> Remove another TARGET_X86_64 #ifdef'ry by introducing
> a create_win_dump() stub. We'll extract it to a stub
> file for non-x86 targets in the next commit.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   dump/dump.c | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/dump/dump.c b/dump/dump.c
> index c356a88be1..b33a613d45 100644
> --- a/dump/dump.c
> +++ b/dump/dump.c
> @@ -39,6 +39,11 @@ bool win_dump_available(Error **errp)
>   
>       return false;
>   }
> +
> +void create_win_dump(DumpState *s, Error **errp)
> +{
> +    win_dump_available(errp);
> +}
>   #endif
>   
>   #include <zlib.h>
> @@ -2031,9 +2036,7 @@ static void dump_process(DumpState *s, Error **errp)
>       DumpQueryResult *result = NULL;
>   
>       if (s->has_format && s->format == DUMP_GUEST_MEMORY_FORMAT_WIN_DMP) {
> -#ifdef TARGET_X86_64
>           create_win_dump(s, errp);
> -#endif
>       } else if (s->has_format && s->format != DUMP_GUEST_MEMORY_FORMAT_ELF) {
>           create_kdump_vmcore(s, errp);
>       } else {

Reviewed-by: Thomas Huth <thuth@redhat.com>


Re: [PATCH v4 5/7] dump: Introduce create_win_dump()
Posted by Richard Henderson 2 years, 2 months ago
On 2/23/23 13:17, Philippe Mathieu-Daudé wrote:
> Remove another TARGET_X86_64 #ifdef'ry by introducing
> a create_win_dump() stub. We'll extract it to a stub
> file for non-x86 targets in the next commit.
> 
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> ---
>   dump/dump.c | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~