From 3a7f15311cc9393a548f1057f8e33c8998ec16c4 Mon Sep 17 00:00:00 2001 From: dragonmux Date: Sun, 6 Oct 2024 18:25:45 +0100 Subject: [PATCH] command: Make sure to output the identification string to the GDB user and not the BMDA console when the user requests the version information, and tidied up how it's generated --- src/command.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/command.c b/src/command.c index d1d110f86f4..d0164c1265a 100644 --- a/src/command.c +++ b/src/command.c @@ -188,9 +188,8 @@ bool cmd_version(target_s *t, int argc, const char **argv) #if PC_HOSTED == 1 char ident[256]; gdb_ident(ident, sizeof(ident)); - DEBUG_WARN("%s\n", ident); - DEBUG_WARN("Copyright (C) 2010-2023 Black Magic Debug Project\n"); - DEBUG_WARN("License GPLv3+: GNU GPL version 3 or later \n\n"); + gdb_out("Black Magic Debug App " FIRMWARE_VERSION "\n"); + gdb_outf("Using a %s\n", ident); #else #ifndef PLATFORM_IDENT_DYNAMIC gdb_out(BOARD_IDENT); @@ -198,9 +197,9 @@ bool cmd_version(target_s *t, int argc, const char **argv) gdb_outf(BOARD_IDENT, platform_ident()); #endif gdb_outf(", Hardware Version %d\n", platform_hwversion()); - gdb_out("Copyright (C) 2010-2023 Black Magic Debug Project\n"); - gdb_out("License GPLv3+: GNU GPL version 3 or later \n\n"); #endif + gdb_out("Copyright (C) 2010-2024 Black Magic Debug Project\n"); + gdb_out("License GPLv3+: GNU GPL version 3 or later \n\n"); return true; }