From 96ea259e3e3a3b1be7d0e3b589063340fc48cd2e Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Thu, 22 May 2025 08:25:35 +0200 Subject: feat(LibCompiler): Update AssemblyInterface's Arch method. also: - Figured out the segfault, currently working on a patch. - Better CLI output, with each library having it's prefix. - LibCompiler: `drv` - LibDebugger: `dbg` Signed-off-by: Amlal El Mahrouss --- dev/LibCompiler/Detail/ClUtils.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'dev/LibCompiler/Detail') diff --git a/dev/LibCompiler/Detail/ClUtils.h b/dev/LibCompiler/Detail/ClUtils.h index 5277a6b..7a400b4 100644 --- a/dev/LibCompiler/Detail/ClUtils.h +++ b/dev/LibCompiler/Detail/ClUtils.h @@ -24,8 +24,8 @@ #define kWhite "\e[0;97m" #define kYellow "\e[0;33m" -#define kStdOut (std::cout << kWhite) -#define kStdErr (std::cout << kRed) +#define kStdOut (std::cout << kRed << "drv: " << kWhite) +#define kStdErr (std::cout << kYellow << "drv: " << kWhite) inline static UInt32 kErrorLimit = 10; inline static UInt32 kAcceptableErrors = 0; @@ -36,7 +36,7 @@ namespace Detail { inline void print_error(std::string reason, std::string file) noexcept { if (reason[0] == '\n') reason.erase(0, 1); - kStdErr << kRed << "drv: " << kWhite << reason << kBlank << std::endl; + kStdErr << kRed << reason << kBlank << std::endl; if (kAcceptableErrors > kErrorLimit) std::exit(LIBCOMPILER_EXEC_ERROR); @@ -46,7 +46,7 @@ inline void print_error(std::string reason, std::string file) noexcept { inline void print_warning(std::string reason, std::string file) noexcept { if (reason[0] == '\n') reason.erase(0, 1); - kStdOut << kYellow << "drv: " << kWhite << reason << kBlank << std::endl; + kStdOut << kYellow << reason << kBlank << std::endl; } /// @internal @@ -54,14 +54,12 @@ inline void print_warning(std::string reason, std::string file) noexcept { inline void drv_segfault_handler(std::int32_t id) { switch (id) { case SIGSEGV: { - kStdErr << kRed << "drv: " << kWhite - << "Segmentation fault. Please report this on the GitHub issues page." << kBlank + kStdErr << "SIGSEGV: Please report this on the GitHub issues page." << kBlank << std::endl; break; } case SIGABRT: { - kStdErr << kRed << "drv: " << kWhite - << "Aborted. Please report this on the GitHub issues page." << kBlank << std::endl; + kStdErr << "SIGABRT: Please report this on the GitHub issues page." << kBlank << std::endl; break; } } -- cgit v1.2.3