diff mbox series

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

Message ID 20230223231755.81633-6-philmd@linaro.org
State New
Headers show
Series dump: Make most of it target agnostic (build once) | expand

Commit Message

Philippe Mathieu-Daudé Feb. 23, 2023, 11:17 p.m. UTC
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(-)

Comments

Richard Henderson Feb. 23, 2023, 11:43 p.m. UTC | #1
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~
Thomas Huth Feb. 24, 2023, 7:08 a.m. UTC | #2
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>
diff mbox series

Patch

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 {