From 637879db26affa54e474535d9aac1b04e15bebfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Thu, 9 Nov 2023 23:35:13 +0100 Subject: [PATCH] Put the project name inside the profile file. [GB.DEBUG] * NEW: Put the project name inside the profile file. --- main/gbx/gbx_debug.c | 2 +- main/lib/debug/gb.debug.h | 2 +- main/lib/debug/profile.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main/gbx/gbx_debug.c b/main/gbx/gbx_debug.c index 7a4c9fe5f..d3fa72fee 100644 --- a/main/gbx/gbx_debug.c +++ b/main/gbx/gbx_debug.c @@ -177,7 +177,7 @@ void DEBUG_init(void) if (EXEC_profile) { EXEC_profile_instr = TRUE; - DEBUG.Profile.Init(EXEC_profile_path); + DEBUG.Profile.Init(EXEC_profile_path, PROJECT_name); } } diff --git a/main/lib/debug/gb.debug.h b/main/lib/debug/gb.debug.h index 64646b659..acebbad29 100644 --- a/main/lib/debug/gb.debug.h +++ b/main/lib/debug/gb.debug.h @@ -106,7 +106,7 @@ typedef void (*InitBreakpoints)(void *klass); bool (*CheckWatches)(void); struct { - void (*Init)(const char *path); + void (*Init)(const char *path, const char *project_name); void (*Add)(void *cp, void *fp, void *pc); void (*Exit)(void); void (*Begin)(void *cp, void *fp); diff --git a/main/lib/debug/profile.c b/main/lib/debug/profile.c index fd6f768fe..06e1b995b 100644 --- a/main/lib/debug/profile.c +++ b/main/lib/debug/profile.c @@ -61,7 +61,7 @@ static uint64_t get_time(void) return t; } -void PROFILE_init(const char *path) +void PROFILE_init(const char *path, const char *project_name) { char *env; size_t max; @@ -85,7 +85,7 @@ void PROFILE_init(const char *path) abort(); } - fprintf(_file, "[1]\n"); + fprintf(_file, "[1] %s\n", project_name); //_ticks_per_sec = sysconf(_SC_CLK_TCK); //fprintf(stderr, "_ticks_per_sec = %ld\n", _ticks_per_sec);