reactos/reactos/ntoskrnl/include/internal/module.h
Alex Ionescu e160c0fb26 KD System Rewrite:
- Totally dynamic based on the principle of Native Providers built-in the Kernel (like Screen, 
      FileLog and Serial) and a pluggable Wrapper which is optionally compiled (Bochs, GDB)
    - Nothing changed in KDBG, except for that its settings (KDSERIAL/KDNOECHO) are now stored in
      KdbDebugState instead.
    - Wrappers are currently built uncondtionally. With rbuild, I'll make them easily removable.
    - Debug Log code simplified greatly, sped up and now supports printing even the first boot messages,
      which wasn't supported before.
    - Removed most of KDBG compile-time settings, ones which are needed are in include/dbg as macros now.
    - Left in some kdbg init code and break code, but it could be made to be used as a 'wrapper' for those
      functions. I will do it later.
    - Made a hack for KdpEnterDebuggerException..it seems to be called differently and at different times
      for GDB vs KDBG and I couldn't unite them.
    - KdpServiceDispatcher now does both the documented and ros-internal debug functions and will eventually
      be called through INT2D from keyboard.sys instead of as an API.

All in all, this patch makes KD  separated from KDBG and creates a pluggable architecture for creating future wrappers that don't require changing tons of code in the future. It improves the debug
log by printing even the earliest debug messages to it and it removes many of the manual ifdef(KDBG) but making them automatic though a single macro file. It makes extra debugging functionality optional and it
allows removal of a private API from our exports.

svn path=/trunk/; revision=14799
2005-04-25 14:44:48 +00:00

59 lines
1.1 KiB
C

#ifndef __MODULE_H
#define __MODULE_H
#include <ddk/ntddk.h>
#include <roscfg.h>
#include <pe.h>
#include <reactos/rossym.h>
typedef struct _MODULE_TEXT_SECTION
{
ULONG Base;
ULONG Length;
LIST_ENTRY ListEntry;
PWCH Name;
PIMAGE_OPTIONAL_HEADER OptionalHeader;
PROSSYM_INFO RosSymInfo;
} MODULE_TEXT_SECTION, *PMODULE_TEXT_SECTION;
typedef struct _MODULE_OBJECT
{
CSHORT ObjectType;
CSHORT ObjectSize;
PVOID Base;
ULONG Length;
ULONG Flags;
PVOID EntryPoint;
LIST_ENTRY ListEntry;
UNICODE_STRING FullName;
UNICODE_STRING BaseName;
PMODULE_TEXT_SECTION TextSection;
union
{
struct
{
PIMAGE_FILE_HEADER FileHeader;
PIMAGE_OPTIONAL_HEADER OptionalHeader;
PIMAGE_SECTION_HEADER SectionList;
} PE;
} Image;
} MODULE_OBJECT, *PMODULE_OBJECT;
typedef MODULE_OBJECT MODULE, *PMODULE;
#define MODULE_FLAG_BIN 0x0001
#define MODULE_FLAG_MZ 0x0002
#define MODULE_FLAG_NE 0x0004
#define MODULE_FLAG_PE 0x0008
#define MODULE_FLAG_COFF 0x0010
typedef struct _INSTANCE
{
HANDLE ModuleHandle;
} INSTANCE, *PINSTANCE;
BOOLEAN process_boot_module(unsigned int start);
#endif