Ignore:
Timestamp:
Sep 2, 2007, 11:40:41 PM (18 years ago)
Author:
bird
Message:

error code cleanup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kStuff/include/k/kErrors.h

    r3573 r3579  
    7373
    7474/** @name File System and I/O
    75  * @{ */
     75 * @{
     76 */
    7677/** The base of the file system and I/O status cdoes. */
    7778#define KERR_FILE_SYSTEM_AND_IO_BASE                    (KERR_INPUT_BASE + 7)
     
    8485
    8586/** @name   kDbg Specific
    86  * @{ */
     87 * @{
     88 */
    8789/** The base of the kDbg specific status codes. */
    8890#define KDBG_ERR_BASE                                   (KERR_FILE_SYSTEM_AND_IO_BASE + 2)
     
    100102
    101103/** @name   kRdr Specific
    102  * @{ */
     104 * @{
     105 */
    103106/** the base of the kRdr specific status codes. */
    104107#define KRDR_ERR_BASE                                   (KDBG_ERR_BASE + 5)
     
    111114/** @} */
    112115
     116/** @name   kLdr Specific
     117 * @{
     118 */
     119#define KLDR_ERR_BASE                                   (KRDR_ERR_BASE + 3)
     120
     121/** The image format is unknown. */
     122#define KLDR_ERR_UNKNOWN_FORMAT                         (KLDR_ERR_BASE + 0)
     123/** The MZ image format isn't supported by this kLdr build. */
     124#define KLDR_ERR_MZ_NOT_SUPPORTED                       (KLDR_ERR_BASE + 1)
     125/** The NE image format isn't supported by this kLdr build. */
     126#define KLDR_ERR_NE_NOT_SUPPORTED                       (KLDR_ERR_BASE + 2)
     127/** The LX image format isn't supported by this kLdr build. */
     128#define KLDR_ERR_LX_NOT_SUPPORTED                       (KLDR_ERR_BASE + 3)
     129/** The LE image format isn't supported by this kLdr build. */
     130#define KLDR_ERR_LE_NOT_SUPPORTED                       (KLDR_ERR_BASE + 4)
     131/** The PE image format isn't supported by this kLdr build. */
     132#define KLDR_ERR_PE_NOT_SUPPORTED                       (KLDR_ERR_BASE + 5)
     133/** The ELF image format isn't supported by this kLdr build. */
     134#define KLDR_ERR_ELF_NOT_SUPPORTED                      (KLDR_ERR_BASE + 6)
     135/** The mach-o image format isn't supported by this kLdr build. */
     136#define KLDR_ERR_MACHO_NOT_SUPPORTED                    (KLDR_ERR_BASE + 7)
     137/** The FAT image format isn't supported by this kLdr build or
     138 * a direct open was attempt without going thru the FAT file provider.
     139 * FAT images are also known as Universal Binaries. */
     140#define KLDR_ERR_FAT_NOT_SUPPORTED                      (KLDR_ERR_BASE + 8)
     141/** The a.out image format isn't supported by this kLdr build. */
     142#define KLDR_ERR_AOUT_NOT_SUPPORTED                     (KLDR_ERR_BASE + 9)
     143
     144/** The module wasn't loaded dynamically. */
     145#define KLDR_ERR_NOT_LOADED_DYNAMICALLY                 (KLDR_ERR_BASE + 10)
     146/** The module wasn't found. */
     147#define KLDR_ERR_MODULE_NOT_FOUND                       (KLDR_ERR_BASE + 11)
     148/** A prerequisit module wasn't found. */
     149#define KLDR_ERR_PREREQUISITE_MODULE_NOT_FOUND          (KLDR_ERR_BASE + 12)
     150/** The module is being terminated and can therefore not be loaded. */
     151#define KLDR_ERR_MODULE_TERMINATING                     (KLDR_ERR_BASE + 13)
     152/** A prerequisit module is being terminated and can therefore not be loaded. */
     153#define KLDR_ERR_PREREQUISITE_MODULE_TERMINATING        (KLDR_ERR_BASE + 14)
     154/** The module initialization failed. */
     155#define KLDR_ERR_MODULE_INIT_FAILED                     (KLDR_ERR_BASE + 15)
     156/** The initialization of a prerequisite module failed. */
     157#define KLDR_ERR_PREREQUISITE_MODULE_INIT_FAILED        (KLDR_ERR_BASE + 16)
     158/** The module has already failed initialization and can't be attempted reloaded until
     159 * after we've finished garbage collection. */
     160#define KLDR_ERR_MODULE_INIT_FAILED_ALREADY             (KLDR_ERR_BASE + 17)
     161/** A prerequisite module has already failed initialization and can't be attempted
     162 * reloaded until after we've finished garbage collection. */
     163#define KLDR_ERR_PREREQUISITE_MODULE_INIT_FAILED_ALREADY (KLDR_ERR_BASE + 18)
     164/** Prerequisite recursed too deeply. */
     165#define KLDR_ERR_PREREQUISITE_RECURSED_TOO_DEEPLY       (KLDR_ERR_BASE + 19)
     166/** Failed to allocate the main stack. */
     167#define KLDR_ERR_MAIN_STACK_ALLOC_FAILED                (KLDR_ERR_BASE + 20)
     168/** The specified ARCH+CPU isn't compatible with image. */
     169#define KLDR_ERR_ARCH_CPU_NOT_COMPATIBLE                (KLDR_ERR_BASE + 21)
     170/** Symbol not found. */
     171#define KLDR_ERR_SYMBOL_NOT_FOUND                       (KLDR_ERR_BASE + 22)
     172/** A forward symbol was encountered but the caller didn't provide any means to resolve it. */
     173#define KLDR_ERR_FORWARDER_SYMBOL                       (KLDR_ERR_BASE + 23)
     174/** Encountered a bad fixup. */
     175#define KLDR_ERR_BAD_FIXUP                              (KLDR_ERR_BASE + 24)
     176/** The import ordinal was out of bounds. */
     177#define KLDR_ERR_IMPORT_ORDINAL_OUT_OF_BOUNDS           (KLDR_ERR_BASE + 25)
     178/** A forwarder chain was too long. */
     179#define KLDR_ERR_TOO_LONG_FORWARDER_CHAIN               (KLDR_ERR_BASE + 26)
     180/** The module has no debug info. */
     181#define KLDR_ERR_NO_DEBUG_INFO                          (KLDR_ERR_BASE + 27)
     182/** The module is already mapped.
     183 * kLdrModMap() can only be called once (without kLdrModUnmap() in between). */
     184#define KLDR_ERR_ALREADY_MAPPED                         (KLDR_ERR_BASE + 28)
     185/** The module was not mapped.
     186 * kLdrModUnmap() should not called without being preceeded by a kLdrModMap(). */
     187#define KLDR_ERR_NOT_MAPPED                             (KLDR_ERR_BASE + 29)
     188/** Couldn't fit the address value into the field. Typically a relocation kind of error. */
     189#define KLDR_ERR_ADDRESS_OVERFLOW                       (KLDR_ERR_BASE + 30)
     190/** Couldn't fit a calculated size value into the native size type of the host. */
     191#define KLDR_ERR_SIZE_OVERFLOW                          (KLDR_ERR_BASE + 31)
     192/** Thread attach failed. */
     193#define KLDR_ERR_THREAD_ATTACH_FAILED                   (KLDR_ERR_BASE + 32)
     194/** The module wasn't a DLL or object file. */
     195#define KLDR_ERR_NOT_DLL                                (KLDR_ERR_BASE + 33)
     196/** The module wasn't an EXE. */
     197#define KLDR_ERR_NOT_EXE                                (KLDR_ERR_BASE + 34)
     198/** Not implemented yet. */
     199#define KLDR_ERR_TODO                                   (KLDR_ERR_BASE + 35)
     200/** @} */
     201
     202/** @name kLdrModPE Specific
     203 * @{
     204 */
     205#define KLDR_ERR_PE_BASE                                (KLDR_ERR_BASE + 36)
     206/** The machine isn't supported by the interpreter. */
     207#define KLDR_ERR_PE_UNSUPPORTED_MACHINE                 (KLDR_ERR_PE_BASE + 0)
     208/** The file handler isn't valid. */
     209#define KLDR_ERR_PE_BAD_FILE_HEADER                     (KLDR_ERR_PE_BASE + 1)
     210/** The the optional headers isn't valid. */
     211#define KLDR_ERR_PE_BAD_OPTIONAL_HEADER                 (KLDR_ERR_PE_BASE + 2)
     212/** One of the section headers aren't valid. */
     213#define KLDR_ERR_PE_BAD_SECTION_HEADER                  (KLDR_ERR_PE_BASE + 3)
     214/** Bad forwarder entry. */
     215#define KLDR_ERR_PE_BAD_FORWARDER                       (KLDR_ERR_PE_BASE + 4)
     216/** Forwarder module not found in the import descriptor table. */
     217#define KLDR_ERR_PE_FORWARDER_IMPORT_NOT_FOUND          (KLDR_ERR_PE_BASE + 5)
     218/** Bad PE fixups. */
     219#define KLDR_ERR_PE_BAD_FIXUP                           (KLDR_ERR_PE_BASE + 6)
     220/** Bad PE import (thunk). */
     221#define KLDR_ERR_PE_BAD_IMPORT                          (KLDR_ERR_PE_BASE + 7)
     222/** @} */
     223
     224/** @name kLdrModLX Specific
     225 * @{
     226 */
     227#define KLDR_ERR_LX_BASE                                (KLDR_ERR_PE_BASE + 8)
     228/** validation of LX header failed. */
     229#define KLDR_ERR_LX_BAD_HEADER                          (KLDR_ERR_LX_BASE + 0)
     230/** validation of the loader section (in the LX header) failed. */
     231#define KLDR_ERR_LX_BAD_LOADER_SECTION                  (KLDR_ERR_LX_BASE + 1)
     232/** validation of the fixup section (in the LX header) failed. */
     233#define KLDR_ERR_LX_BAD_FIXUP_SECTION                   (KLDR_ERR_LX_BASE + 2)
     234/** validation of the LX object table failed. */
     235#define KLDR_ERR_LX_BAD_OBJECT_TABLE                    (KLDR_ERR_LX_BASE + 3)
     236/** A bad page map entry was encountered. */
     237#define KLDR_ERR_LX_BAD_PAGE_MAP                        (KLDR_ERR_LX_BASE + 4)
     238/** Bad iterdata (EXEPACK) data. */
     239#define KLDR_ERR_LX_BAD_ITERDATA                        (KLDR_ERR_LX_BASE + 5)
     240/** Bad iterdata2 (EXEPACK2) data. */
     241#define KLDR_ERR_LX_BAD_ITERDATA2                       (KLDR_ERR_LX_BASE + 6)
     242/** Bad bundle data. */
     243#define KLDR_ERR_LX_BAD_BUNDLE                          (KLDR_ERR_LX_BASE + 7)
     244/** No soname. */
     245#define KLDR_ERR_LX_NO_SONAME                           (KLDR_ERR_LX_BASE + 8)
     246/** Bad soname. */
     247#define KLDR_ERR_LX_BAD_SONAME                          (KLDR_ERR_LX_BASE + 9)
     248/** Bad forwarder entry. */
     249#define KLDR_ERR_LX_BAD_FORWARDER                       (KLDR_ERR_LX_BASE + 10)
     250/** internal fixup chain isn't implemented yet. */
     251#define KLDR_ERR_LX_NRICHAIN_NOT_SUPPORTED              (KLDR_ERR_LX_BASE + 11)
     252/** @} */
     253
     254/** @name kLdrModMachO Specific
     255 * @{
     256 */
     257#define KLDR_ERR_MACHO_BASE                             (KLDR_ERR_LX_BASE + 12)
     258/** Only native endian Mach-O files are supported. */
     259#define KLDR_ERR_MACHO_OTHER_ENDIAN_NOT_SUPPORTED       (KLDR_ERR_MACHO_BASE + 0)
     260/** 64-bit Mach-O files aren't supported yet. */
     261#define KLDR_ERR_MACHO_64BIT_NOT_SUPPORTED              (KLDR_ERR_MACHO_BASE + 1)
     262/** The Mach-O header is bad or contains new and unsupported features. */
     263#define KLDR_ERR_MACHO_BAD_HEADER                       (KLDR_ERR_MACHO_BASE + 2)
     264/** The file type isn't supported. */
     265#define KLDR_ERR_MACHO_UNSUPPORTED_FILE_TYPE            (KLDR_ERR_MACHO_BASE + 3)
     266/** The machine (cputype / cpusubtype combination) isn't supported. */
     267#define KLDR_ERR_MACHO_UNSUPPORTED_MACHINE              (KLDR_ERR_MACHO_BASE + 4)
     268/** Bad load command(s). */
     269#define KLDR_ERR_MACHO_BAD_LOAD_COMMAND                 (KLDR_ERR_MACHO_BASE + 5)
     270/** Encountered an unknown load command.*/
     271#define KLDR_ERR_MACHO_UNKNOWN_LOAD_COMMAND             (KLDR_ERR_MACHO_BASE + 6)
     272/** Encountered a load command that's not implemented.*/
     273#define KLDR_ERR_MACHO_UNSUPPORTED_LOAD_COMMAND         (KLDR_ERR_MACHO_BASE + 7)
     274/** Bad section. */
     275#define KLDR_ERR_MACHO_BAD_SECTION                      (KLDR_ERR_MACHO_BASE + 8)
     276/** Encountered a section type that's not implemented.*/
     277#define KLDR_ERR_MACHO_UNSUPPORTED_SECTION              (KLDR_ERR_MACHO_BASE + 9)
     278/** Encountered a section type that's not known to the loader. (probably invalid) */
     279#define KLDR_ERR_MACHO_UNKNOWN_SECTION                  (KLDR_ERR_MACHO_BASE + 10)
     280/** The sections aren't ordered by segment as expected by the loader. */
     281#define KLDR_ERR_MACHO_BAD_SECTION_ORDER                (KLDR_ERR_MACHO_BASE + 11)
     282/** The image is 32-bit and contains 64-bit load commands or vise versa. */
     283#define KLDR_ERR_MACHO_BIT_MIX                          (KLDR_ERR_MACHO_BASE + 12)
     284/** Bad MH_OBJECT file. */
     285#define KLDR_ERR_MACHO_BAD_OBJECT_FILE                  (KLDR_ERR_MACHO_BASE + 13)
     286/** Bad symbol table entry. */
     287#define KLDR_ERR_MACHO_BAD_SYMBOL                       (KLDR_ERR_MACHO_BASE + 14)
     288/** Unsupported fixup type. */
     289#define KLDR_ERR_MACHO_UNSUPPORTED_FIXUP_TYPE           (KLDR_ERR_MACHO_BASE + 15)
     290/** @} */
     291
     292
     293/** End of the valid status codes. */
     294#define KERR_END                                        (KLDR_ERR_MACHO_BASE + 16)
    113295/** @}*/
    114296
Note: See TracChangeset for help on using the changeset viewer.