Ignore:
Timestamp:
Aug 20, 2007, 4:43:13 AM (18 years ago)
Author:
bird
Message:

Some refactoring and OS abstraction by instroducing kDbgHlp.

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/kDbg/kDbgInternal.h

    • Property svn:eol-style set to native
    • Property svn:keywords set to Id
    r3524 r3528  
    1 /* $Id: $ */
     1/* $Id$ */
    22/** @file
    3  *
    4  * kProfile Mark 2 - Debug Info Reader, Internal Header.
    5  *
    6  * Copyright (c) 2006 knut st. osmundsen <bird-src-spam@anduin.net.de>
    7  *
     3 * kDbg - The Debug Info Reader, Internal Header.
     4 */
     5
     6/*
     7 * Copyright (c) 2006-2007 knut st. osmundsen <bird-src-spam@anduin.net>
    88 *
    99 * This program is free software; you can redistribute it and/or modify
     
    2323 */
    2424
    25 #ifndef __internal_DBGInternal_h__
    26 #define __internal_DBGInternal_h__
     25#ifndef ___kDbgInternal_h___
     26#define ___kDbgInternal_h___
    2727
    28 #include "dbg.h"
     28#include "kDbgBase.h"
     29#include "kDbgHlp.h"
     30#include "kDbg.h"
    2931
    30 __BEGIN_DECLS
     32#ifdef __cplusplus
     33extern "C" {
     34#endif
    3135
    3236
     
    3438 * The debug module method table.
    3539 */
    36 typedef struct RTDBGMODOPS
     40typedef struct KDBGMODOPS
    3741{
    3842    /** The name of the reader. */
     
    4852     * @param   pMod        The module.
    4953     */
    50     DECLCALLBACKMEMBER(int, pfnClose)(PRTDBGMOD pMod);
     54    int (*pfnClose)(PKDBGMOD pMod);
    5155
    5256    /**
     
    6367     * @param   pSym        Where to store the symbol details.
    6468     */
    65     DECLCALLBACKMEMBER(int, pfnQuerySymbol)(PRTDBGMOD pMod, int32_t iSegment, RTUINTPTR off, PRTDBGSYMBOL pSym);
     69    int (*pfnQuerySymbol)(PKDBGMOD pMod, int32_t iSegment, KDBGADDR off, PKDBGSYMBOL pSym);
    6670
    6771    /**
     
    7882     * @param   pLine       Where to store the line number details.
    7983     */
    80     DECLCALLBACKMEMBER(int, pfnQueryLine)(PRTDBGMOD pMod, int32_t iSegment, RTUINTPTR uOffset, PRTDBGLINE pLine);
     84    int (*pfnQueryLine)(PKDBGMOD pMod, int32_t iSegment, KDBGADDR uOffset, PKDBGLINE pLine);
    8185
    82 } RTDBGMODOPS;
     86} KDBGMODOPS;
    8387/** Pointer to a module method table. */
    84 typedef RTDBGMODOPS *PRTDBGMODOPS;
     88typedef KDBGMODOPS *PKDBGMODOPS;
    8589/** Pointer to a const module method table. */
    86 typedef const RTDBGMODOPS *PCRTDBGMODOPS;
     90typedef const KDBGMODOPS *PCKDBGMODOPS;
    8791
    8892
     
    9094 * Internal representation of a debug module.
    9195 */
    92 typedef struct RTDBGMOD
     96typedef struct KDBGMOD
    9397{
    94     /** Magic value (RTDBGMOD_MAGIC). */
     98    /** Magic value (KDBGMOD_MAGIC). */
    9599    uint32_t        u32Magic;
    96100    /** The handle to the module. (If closed, this is NIL_RTFILE.) */
    97     RTFILE          File;
     101    PKDBGHLPFILE    pFile;
    98102    /** Pointer to the method table. */
    99     PCRTDBGMODOPS   pOps;
    100 } RTDBGMOD;
     103    PCKDBGMODOPS    pOps;
     104} KDBGMOD;
    101105
    102106
    103 /** The magic value for the debug module structure. (Some english writer) */
    104 #define RTDBGMOD_MAGIC      0x00000000
     107/** The magic value for the debug module structure. (Some dead english writer) */
     108#define KDBGMOD_MAGIC      0x00000000
    105109/** The magic value of a dead module structure. */
    106 #define RTDBGMOD_MAGIC_DEAD 0x00000000
     110#define KDBGMOD_MAGIC_DEAD 0x00000001
    107111
    108112
    109 int rtDbgModPEOpen(RTFILE File, RTFOFF offHdr, const char *pszModulePath, PRTDBGMOD *ppDbgMod);
     113int kdbgModPEOpen(PKDBGHLPFILE pFile, KDBGADDR offHdr, const char *pszModulePath, PKDBGMOD *ppDbgMod);
    110114
    111 
    112 __END_DECLS
     115#ifdef __cplusplus
     116}
    113117#endif
    114118
     119#endif
     120
Note: See TracChangeset for help on using the changeset viewer.