From 5c7e0eedb0a87a36df5c78122fa254187fb2ef15 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Tue, 1 Dec 2020 15:54:42 +0100 Subject: [PATCH] command.c: Consolidate "mon version" output --- src/command.c | 8 +++++--- src/platforms/hosted/platform.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/command.c b/src/command.c index c935f77..7b6e060 100644 --- a/src/command.c +++ b/src/command.c @@ -131,16 +131,18 @@ int command_process(target *t, char *cmd) return target_command(t, argc, argv); } +#define BOARD_IDENT "Black Magic Probe" PLATFORM_IDENT FIRMWARE_VERSION + bool cmd_version(target *t, int argc, char **argv) { (void)t; (void)argc; (void)argv; + gdb_out(BOARD_IDENT); #if PC_HOSTED == 1 - gdb_outf("Black Magic Probe, PC-Hosted for " PLATFORM_IDENT() - ", Version " FIRMWARE_VERSION "\n"); + gdb_outf("\n for %s, %s\n", info.manufacturer, info.product); #else - gdb_outf("Black Magic Probe (Firmware " FIRMWARE_VERSION ") (Hardware Version %d)\n", platform_hwversion()); + gdb_outf(", Hardware Version %d\n", platform_hwversion()); #endif gdb_out("Copyright (C) 2015 Black Sphere Technologies Ltd.\n"); gdb_out("License GPLv3+: GNU GPL version 3 or later " diff --git a/src/platforms/hosted/platform.h b/src/platforms/hosted/platform.h index edbc16d..d5f1860 100644 --- a/src/platforms/hosted/platform.h +++ b/src/platforms/hosted/platform.h @@ -10,7 +10,7 @@ char *platform_ident(void); void platform_buffer_flush(void); -#define PLATFORM_IDENT() "NONE" +#define PLATFORM_IDENT "(PC-Hosted) " #define SET_IDLE_STATE(x) #define SET_RUN_STATE(x)