?? immplugin.pas
字號:
NCOLORS = 20; // Total number of defined colours
BKTRANSP = $00; // Background colours in syntax hiliting
BKBLACK = $10;
BKGRAY = $20;
BKWHITE = $30;
BKCYAN = $40;
BKGREEN = $50;
BKRED = $60;
BKYELLOW = $70;
BLACKWHITE = 0; // Colour schemes used by IMMDBG
BLUEGOLD = 1;
SKYWIND = 2;
NIGHTSTARS = 3;
SCHEME4 = 4;
SCHEME5 = 5;
SCHEME6 = 6;
SCHEME7 = 7;
FIXEDFONT = 0; // Fonts used by IMMDBG. Variable-pitch
TERMINAL6 = 1; // fonts are placed at the end of this
FIXEDSYS = 2; // table.
COURIERFONT = 3;
LUCIDACONS = 4;
FONT5 = 5;
FONT6 = 6;
FONT7 = 7;
MAINFONT = 8;
SYSFONT = 9;
INFOFONT = 10;
////////////////////////////////////////////////////////////////////////////////
///////////////////////////// INFORMATION FUNCTIONS ////////////////////////////
Var
Addtolist : procedure (addr: LongInt; highlight: Integer; format: PChar); cdecl varargs;
Updatelist : procedure; cdecl;
Createlistwindow : function : HWND; cdecl;
Error : procedure (format: PChar); cdecl varargs;
Message : procedure (addr: ULONG; format: PChar); cdecl varargs;
Infoline : procedure (format: PChar); cdecl varargs;
Progress : procedure (promille: Integer; format: PChar); cdecl varargs;
Flash : procedure (format: PChar); cdecl varargs;
////////////////////////////////////////////////////////////////////////////////
/////////////////////////// DATA FORMATTING FUNCTIONS //////////////////////////
// Bits used in Decodeaddress(), Decoderelativeoffset() and Decodethreadname()
// to specify decoding mode:
const
ADC_DEFAULT = $0000; // Default decoding mode
ADC_DIFFMOD = $0001; // Show module only if different
ADC_NOMODNAME = $0002; // Never show module name
ADC_VALID = $0004; // Only decode if allocated memory
ADC_INMODULE = $0008; // Only decode if in some module
ADC_SAMEMOD = $0010; // Decode only address in same module
ADC_SYMBOL = $0020; // Only decode if symbolic name
ADC_JUMP = $0040; // Check if points to JMP/CALL command
ADC_OFFSET = $0080; // Check if symbol for data
ADC_STRING = $0100; // Check if pointer to ASCII or UNICODE
ADC_ENTRY = $0200; // Check if entry to subroutine
ADC_UPPERCASE = $0400; // First letter in uppercase if possible
ADC_WIDEFORM = $0800; // Extended form of decoded name
ADC_NONTRIVIAL = $1000; // Name + non-zero offset
ADC_DYNAMIC = $2000; // JMP/CALL to dynamically loaded name
PLAINASCII = $01; // Plain ASCII character
DIACRITICAL = $02; // Diacritical character
RAREASCII = $10; // Rare ASCII character
Var
Decodeaddress : function (addr: ULONG; base: ULONG; addrmode: Integer; symb: PChar; nsymb: Integer; comment: PChar): Integer; cdecl;
Decoderelativeoffset : function (addr: ULONG; addrmode: Integer; symb: PChar; nsymb: Integer): Integer; cdecl;
Decodecharacter : function (s: PChar; c: UINT): Integer; cdecl;
Printfloat4 : function (s: PChar; f: Single): Integer; cdecl;
Printfloat8 : function (s: PChar; d: Double): Integer; cdecl;
Printfloat10 : function (s: PChar; ext: Extended): Integer; cdecl;
Print3dnow : function (s: PChar; f: PChar): Integer; cdecl;
Printsse : function (s: PChar; f: PChar): Integer; cdecl;
Followcall : function (addr: ULONG): ULONG; cdecl;
IstextA : function (c: Char): Integer; cdecl;
IstextW : function (w: WCHAR): Integer; cdecl;
Stringtotext : function (data: PChar; ndata: Integer; text: PChar; ntext: Integer): Integer; cdecl;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////// DATA INPUT FUNCTIONS ////////////////////////////
const
MAXCMDSIZE = 16; // Maximal length of 80x86 command
NSEQ = 8; // Max length of command sequence
NMODELS = 8; // Number of assembler search models
// Note that each of dialog functions decodes only subset of listed flags.
DIA_ASKGLOBAL = $0001; // Display checkbox 'Global search'
DIA_HEXONLY = $0002; // Hexadecimal format only
DIA_ALIGNED = $0004; // Display checkbox 'Aligned search'
DIA_DEFHEX = $0000; // On startup, cursor in hex control
DIA_DEFASCII = $0010; // On startup, cursor in ASCII control
DIA_DEFUNICODE = $0020; // On startup, cursor in UNICODE control
DIA_SEARCH = $0040; // Is a search dialog
DIA_HISTORY = $0100; // Allows previous hex strings
// Status of animation or trace.
ANIMATE_OFF = 0; // No animation
ANIMATE_IN = 1; // Animate into
ANIMATE_OVER = 2; // Animate over
ANIMATE_RET = 3; // Execute till RET
ANIMATE_SKPRET = 4; // Skip RET instruction
ANIMATE_USER = 5; // Execute till user code
ANIMATE_TRIN = 6; // Run trace in
ANIMATE_TROVER = 7; // Run trace over
ANIMATE_STOP = 8; // Gracefully stop animation
type
p_hexstr = ^t_hexstr;
t_hexstr = packed record // String used for hex/text search
n: Integer; // String length
data: array[0..TEXTLEN-1] of Char; // Data
mask: array[0..TEXTLEN-1] of Char; // Mask, 0 bits are masked
end;
p_asmmodel = ^t_asmmodel;
t_asmmodel = packed record // Model to search for assembler command
code: array[0..MAXCMDSIZE-1] of Char; // Binary code
mask: array[0..MAXCMDSIZE-1] of Char; // Mask for binary code (0: bit ignored)
length: Integer; // Length of code, bytes (0: empty)
jmpsize: Integer; // Offset size if relative jump
jmpoffset: Integer; // Offset relative to IP
jmppos: Integer; // Position of jump offset in command
end;
p_asmmodels = ^t_asmmodels;
t_asmmodels = array[0..NMODELS - 1] of t_asmmodel;
t_extmodel = packed record // Model for extended command search
code: array[0..MAXCMDSIZE-1] of Char; // Binary code
mask: array[0..MAXCMDSIZE-1] of Char; // Mask for binary code (0: bit ignored)
length: Integer; // Length of code, bytes (0: empty)
jmpsize: Integer; // Offset size if relative jump
jmpoffset: Integer; // Offset relative to IP
jmppos: Integer; // Position of jump offset in command
isany: Integer; // Count for ANY's argument
cmdoffset: Integer; // Offset of command in the source
ramask: array[0..MAXCMDSIZE-1] of Char; // Mask for pseudoregister RA
rbmask: array[0..MAXCMDSIZE-1] of Char; // Mask for pseudoregister RB
end;
p_extmodels = ^t_extmodels;
t_extmodels = array[0..NSEQ - 1, 0..NMODELS - 1] of t_extmodel;
Var
Getlong : function (title: PChar; data: PULONG; datasize: Integer; letter: Char; mode: Integer): Integer; cdecl;
Getlongxy : function (title: PChar; data: PULONG; datasize: Integer; letter: Char; mode: Integer; x: Integer; y: Integer): Integer; cdecl;
Getregxy : function (title: PChar; data: PULONG; letter: Char; x: Integer; y: Integer): Integer; cdecl;
Getline : function (title: PChar; data: PULONG): Integer; cdecl;
Getlinexy : function (title: PChar; data: PULONG; x: Integer; y: Integer): Integer; cdecl;
Getfloat10 : function (title: PChar; fdata: PExtended; tag: PChar; letter: Char; mode: Integer): Integer; cdecl;
Getfloat10xy : function (title: PChar; fdata: PExtended; tag: PChar; letter: Char; mode: Integer; x: Integer; y: Integer): Integer; cdecl;
Getfloat : function (title: PChar; fdata: Pointer; size: Integer; letter: Char; mode: Integer): Integer; cdecl;
Getfloatxy : function (title: PChar; fdata: Pointer; size: Integer; letter: Char; mode: Integer; x: Integer; y: Integer): Integer; cdecl;
Getasmfindmodel : procedure (models: p_asmmodels; letter: Char; searchall: Integer); cdecl;
Getasmfindmodelxy : procedure (models: p_asmmodels; letter: Char; searchall: Integer; x: Integer; y: Integer); cdecl;
Gettext : function (title: PChar; text: PChar; letter: Char; type_i: Integer; fontindex: Integer): Integer; cdecl;
Gettextxy : function (title: PChar; text: PChar; letter: Char; type_i: Integer; fontindex: Integer; x: Integer; y: Integer): Integer; cdecl;
Gethexstring : function (title: PChar; phs: p_hexstr; mode: Integer; fontindex: Integer; letter: Char): Integer; cdecl;
Gethexstringxy : function (title: PChar; phs: p_hexstr; mode: Integer; fontindex: Integer; letter: Char; x: Integer; y: Integer): Integer; cdecl;
Getmmx : function (title: PChar; data: PChar; mode: Integer): Integer; cdecl;
Getmmxxy : function (title: PChar; data: PChar; mode: Integer; x: Integer; y: Integer): Integer; cdecl;
Get3dnow : function (title: PChar; data: PChar; mode: Integer): Integer; cdecl;
Get3dnowxy : function (title: PChar; data: PChar; mode: Integer; x: Integer; y: Integer): Integer; cdecl;
Browsefilename : function (title: PChar; name: PChar; defext: PChar; getarguments: Integer): Integer; cdecl;
OpenEXEfile : function (path: PChar; dropped: Integer): Integer; cdecl;
Attachtoactiveprocess : function (newprocessid: Integer): Integer; cdecl;
Animate : procedure (animation: Integer); cdecl;
/////////////////////////////////////////////////////////////////////////////////
///////////////////////////// SORTED DATA FUNCTIONS /////////////////////////////
const
NBAR = 17; // Max allowed number of segments in bar
BAR_PRESSED = $01; // Bar segment pressed, used internally
BAR_DISABLED = $02; // Bar segment disabled
BAR_NOSORT = $04; // Flat bar column, supports no sorting
BAR_NORESIZE = $08; // Bar column cannot be resized
BAR_BUTTON = $10; // Segment sends WM_USER_BAR
BAR_SHIFTSEL = $20; // Selection shifted 1/2 char to left
CAPT_FREE = 0; // Bar and data are not captured
TABLE_DIR = $0001; // Bottom-to-top table
TABLE_COPYMENU = $0002; // Attach copy item
TABLE_SORTMENU = $0004; // Attach sort menu
TABLE_APPMENU = $0010; // Attach appearance menu
TABLE_WIDECOL = $0020; // Attach wide columns menu item
TABLE_USERAPP = $0040; // Attach user-processed appearance menu
TABLE_USERDEF = $0080; // User-drawn table
TABLE_NOHSCR = $0100; // Table contains no horizontal scroll
TABLE_SAVEPOS = $0200; // Save position & appearance to .ini
TABLE_CPU = $0400; // Table belongs to CPU window
TABLE_FASTSEL = $0800; // Update when selection changes
TABLE_COLSEL = $1000; // Column-wide selection
TABLE_SAVEAPP = $2000; // Save multiinstance appearance to .ini
TABLE_HILMENU = $4000; // Attach Syntax highlighting menu
DRAW_NORMAL = $0000; // Normal plain text
DRAW_GRAY = $0001; // Grayed text
DRAW_HILITE = $0002; // Highlighted text
DRAW_UL = $0004; // Underlined text
DRAW_SELECT = $0008; // Selected background
DRAW_EIP = $0010; // Inverted normal text/background
DRAW_BREAK = $0020; // Breakpoint background
DRAW_GRAPH = $0040; // Graphical element
DRAW_DIRECT = $0080; // Direct text colour index (mask only)
DRAW_MASK = $0080; // Use mask to set individual colors
DRAW_EXTSEL = $0100; // Extend mask till end of column
DRAW_UNICODE = $0200; // Text in UNICODE
DRAW_TOP = $0400; // Draw upper half of text
DRAW_BOTTOM = $0800; // Draw lower half of text
// Symbolic names for graphical characters. Any other character is displayed
// as space. Use only characters in range [1..0x7F]!
D_SPACE = 'N'; // Space
D_SEP = ' '; // Thin separating line
D_BEGIN = 'B'; // Begin of procedure or scope
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -