7#include "libmicroemu/types.h"
109 switch (status_code) {
120 return "MemInaccesible";
123 return "IteratorExhausted";
126 return "DecoderUnknownOpCode";
129 return "DecoderUnpredictable";
132 return "DecoderUndefined";
135 return "ExecutorUnpredictable";
138 return "MemWriteNotAllowed";
141 return "BufferTooSmall";
144 return "ElfWrongHeader";
147 return "ElfNotValid";
150 return "OpenFileFailed";
153 return "NotImplemented";
159 return "ExecutorExitWithError";
162 return "ExecutorUndefined";
168 return "Unsuporrted";
171 return "MaxInstructionsReached";
174 return "UnknownStatusCode";
177 return "UnknownStatusCode";
The libmicroemu namespace contains all classes and functions of the libmicroemu which are public.
Definition bkpt_flags.h:6
@ kError
Error log level.
Definition logger.h:18
@ kUsageFault
Usage fault exception, triggered by errors in the usage of the processor.
Definition exception_type.h:30
static std::string_view StatusCodeToString(const StatusCode &status_code) noexcept
Converts a status code to a string.
Definition status_code.h:108
StatusCode
Enum representing various status codes used throughout the system.
Definition status_code.h:17
@ kElfNotValid
ELF file is not valid.
Definition status_code.h:87
@ kUnsuporrted
Operation or feature is unsupported.
Definition status_code.h:31
@ kBufferTooSmall
Provided buffer is too small.
Definition status_code.h:45
@ kOpenFileFailed
Failed to open the file.
Definition status_code.h:48
@ kMaxInstructionsReached
Maximum instruction count reached.
Definition status_code.h:100
@ kUnexpected
An unexpected error occurred.
Definition status_code.h:28
@ kExecutorExitWithError
Executor exited with an error.
Definition status_code.h:82
@ kIteratorExhausted
Iterator has been exhausted.
Definition status_code.h:42
@ kDecoderUndefined
Decoder encountered an undefined operation.
Definition status_code.h:69
@ kDecoderUnknownOpCode
Decoder encountered an unknown opcode.
Definition status_code.h:61
@ kExecutorUndefined
Executor encountered an undefined operation.
Definition status_code.h:79
@ kSuccess
Operation succeeded successfully.
Definition status_code.h:20
@ kUsageFault
Usage fault occurred.
Definition status_code.h:95
@ kMemInaccesible
Memory is inaccessible.
Definition status_code.h:53
@ kMemWriteNotAllowed
Memory write operation is not allowed.
Definition status_code.h:56
@ kDecoderUnpredictable
Decoder encountered an unpredictable operation.
Definition status_code.h:66
@ kExecutorUnpredictable
Executor encountered an unpredictable operation.
Definition status_code.h:76
@ kElfWrongHeader
ELF file has a wrong header.
Definition status_code.h:90
@ kError
An unspecified error occurred.
Definition status_code.h:25
@ kNotImplemented
Operation or feature is not implemented.
Definition status_code.h:34
@ kOutOfRange
Value is out of the allowed range.
Definition status_code.h:39