diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-05-22 08:25:35 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-05-22 08:26:57 +0200 |
| commit | 96ea259e3e3a3b1be7d0e3b589063340fc48cd2e (patch) | |
| tree | eee3788889ee7c9f7e5d538604920acef05a8bba /dev/LibCompiler/Detail | |
| parent | 385178a1ecb41a7a529d219d80e2ed1232831abd (diff) | |
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 <amlal@nekernel.org>
Diffstat (limited to 'dev/LibCompiler/Detail')
| -rw-r--r-- | dev/LibCompiler/Detail/ClUtils.h | 14 |
1 files changed, 6 insertions, 8 deletions
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; } } |
