Ignore:
Timestamp:
Sep 3, 2007, 3:18:26 AM (18 years ago)
Author:
bird
Message:

Cpu / architecture cleanup...

File:
1 edited

Legend:

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

    r3579 r3585  
    11/* $Id$ */
    22/** @file
    3  *
    43 * kErrors - Status Codes.
    5  *
    6  * Copyright (c) 2007 knut st. osmundsen <bird-src-spam@anduin.net>
    7  *
     4 */
     5
     6/*
     7 * Copyright (c) 2006-2007 knut st. osmundsen <bird-src-spam@anduin.net>
    88 *
    99 * This file is part of kStuff.
    1010 *
    11  * kStuff is free software; you can redistribute it and/or modify
    12  * it under the terms of the GNU Lesser General Public License as published
    13  * by the Free Software Foundation; either version 2 of the License, or
    14  * (at your option) any later version.
     11 * kStuff is free software; you can redistribute it and/or
     12 * modify it under the terms of the GNU Lesser General Public
     13 * License as published by the Free Software Foundation; either
     14 * version 2.1 of the License, or (at your option) any later version.
    1515 *
    1616 * kStuff is distributed in the hope that it will be useful,
    1717 * but WITHOUT ANY WARRANTY; without even the implied warranty of
    18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    19  * GNU Lesser General Public License for more details.
    20  *
    21  * You should have received a copy of the GNU Lesser General Public License
    22  * along with kStuff; if not, write to the Free Software
    23  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     19 * Lesser General Public License for more details.
     20 *
     21 * You should have received a copy of the GNU Lesser General Public
     22 * License along with kStuff; if not, write to the Free Software
     23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
    2424 *
    2525 */
     
    8383/** @} */
    8484
    85 
    8685/** @name   kDbg Specific
    8786 * @{
     
    117116 * @{
    118117 */
     118/** The base of the kLdr specific status codes. */
    119119#define KLDR_ERR_BASE                                   (KRDR_ERR_BASE + 3)
    120120
     
    166166/** Failed to allocate the main stack. */
    167167#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)
    170168/** Symbol not found. */
    171 #define KLDR_ERR_SYMBOL_NOT_FOUND                       (KLDR_ERR_BASE + 22)
     169#define KLDR_ERR_SYMBOL_NOT_FOUND                       (KLDR_ERR_BASE + 21)
    172170/** 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)
     171#define KLDR_ERR_FORWARDER_SYMBOL                       (KLDR_ERR_BASE + 22)
    174172/** Encountered a bad fixup. */
    175 #define KLDR_ERR_BAD_FIXUP                              (KLDR_ERR_BASE + 24)
     173#define KLDR_ERR_BAD_FIXUP                              (KLDR_ERR_BASE + 23)
    176174/** The import ordinal was out of bounds. */
    177 #define KLDR_ERR_IMPORT_ORDINAL_OUT_OF_BOUNDS           (KLDR_ERR_BASE + 25)
     175#define KLDR_ERR_IMPORT_ORDINAL_OUT_OF_BOUNDS           (KLDR_ERR_BASE + 24)
    178176/** A forwarder chain was too long. */
    179 #define KLDR_ERR_TOO_LONG_FORWARDER_CHAIN               (KLDR_ERR_BASE + 26)
     177#define KLDR_ERR_TOO_LONG_FORWARDER_CHAIN               (KLDR_ERR_BASE + 25)
    180178/** The module has no debug info. */
    181 #define KLDR_ERR_NO_DEBUG_INFO                          (KLDR_ERR_BASE + 27)
     179#define KLDR_ERR_NO_DEBUG_INFO                          (KLDR_ERR_BASE + 26)
    182180/** The module is already mapped.
    183181 * kLdrModMap() can only be called once (without kLdrModUnmap() in between). */
    184 #define KLDR_ERR_ALREADY_MAPPED                         (KLDR_ERR_BASE + 28)
     182#define KLDR_ERR_ALREADY_MAPPED                         (KLDR_ERR_BASE + 27)
    185183/** The module was not mapped.
    186184 * kLdrModUnmap() should not called without being preceeded by a kLdrModMap(). */
    187 #define KLDR_ERR_NOT_MAPPED                             (KLDR_ERR_BASE + 29)
     185#define KLDR_ERR_NOT_MAPPED                             (KLDR_ERR_BASE + 28)
    188186/** 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)
     187#define KLDR_ERR_ADDRESS_OVERFLOW                       (KLDR_ERR_BASE + 29)
    190188/** 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)
     189#define KLDR_ERR_SIZE_OVERFLOW                          (KLDR_ERR_BASE + 30)
    192190/** Thread attach failed. */
    193 #define KLDR_ERR_THREAD_ATTACH_FAILED                   (KLDR_ERR_BASE + 32)
     191#define KLDR_ERR_THREAD_ATTACH_FAILED                   (KLDR_ERR_BASE + 31)
    194192/** The module wasn't a DLL or object file. */
    195 #define KLDR_ERR_NOT_DLL                                (KLDR_ERR_BASE + 33)
     193#define KLDR_ERR_NOT_DLL                                (KLDR_ERR_BASE + 32)
    196194/** The module wasn't an EXE. */
    197 #define KLDR_ERR_NOT_EXE                                (KLDR_ERR_BASE + 34)
     195#define KLDR_ERR_NOT_EXE                                (KLDR_ERR_BASE + 33)
    198196/** Not implemented yet. */
    199 #define KLDR_ERR_TODO                                   (KLDR_ERR_BASE + 35)
     197#define KLDR_ERR_TODO                                   (KLDR_ERR_BASE + 34)
    200198/** @} */
    201199
     
    203201 * @{
    204202 */
    205 #define KLDR_ERR_PE_BASE                                (KLDR_ERR_BASE + 36)
     203/** The base of the kLdrModPE specific status codes. */
     204#define KLDR_ERR_PE_BASE                                (KLDR_ERR_BASE + 35)
    206205/** The machine isn't supported by the interpreter. */
    207206#define KLDR_ERR_PE_UNSUPPORTED_MACHINE                 (KLDR_ERR_PE_BASE + 0)
     
    225224 * @{
    226225 */
     226/** The base of the kLdrModLX specific status codes. */
    227227#define KLDR_ERR_LX_BASE                                (KLDR_ERR_PE_BASE + 8)
    228228/** validation of LX header failed. */
     
    255255 * @{
    256256 */
     257/** The base of the kLdrModMachO specific status codes. */
    257258#define KLDR_ERR_MACHO_BASE                             (KLDR_ERR_LX_BASE + 12)
    258259/** Only native endian Mach-O files are supported. */
     
    290291/** @} */
    291292
     293/** @name kCpu Specific
     294 * @{
     295 */
     296/** The base of the kCpu specific status codes. */
     297#define KCPU_ERR_BASE                                   (KLDR_ERR_MACHO_BASE + 16)
     298/** The specified ARCH+CPU pairs aren't compatible. */
     299#define KCPU_ERR_ARCH_CPU_NOT_COMPATIBLE                (KCPU_ERR_BASE + 0)
     300/** @} */
    292301
    293302/** End of the valid status codes. */
    294 #define KERR_END                                        (KLDR_ERR_MACHO_BASE + 16)
     303#define KERR_END                                        (KCPU_ERR_BASE + 1)
    295304/** @}*/
    296305
    297306#endif
     307
Note: See TracChangeset for help on using the changeset viewer.