forgot to commit luahandler changes

This commit is contained in:
Dark Byte 2021-05-11 10:12:35 +02:00
parent 43d8ffa31e
commit 115d71144d
13 changed files with 194 additions and 86 deletions

View File

@ -29,6 +29,8 @@ type
synchronizeparam: integer; synchronizeparam: integer;
synchronizeparamcount: integer; synchronizeparamcount: integer;
syncvm: Plua_State; syncvm: Plua_State;
selfdestructing: boolean;
procedure NotifyEvent(sender: TObject); procedure NotifyEvent(sender: TObject);
procedure SelectionChangeEvent(Sender: TObject; User: boolean); procedure SelectionChangeEvent(Sender: TObject; User: boolean);
procedure MouseEvent(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure MouseEvent(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
@ -99,6 +101,7 @@ type
procedure DisassemblerViewOverrideCallback(address: ptruint; var addressstring: string; var bytestring: string; var opcodestring: string; var parameterstring: string; var specialstring: string); procedure DisassemblerViewOverrideCallback(address: ptruint; var addressstring: string; var bytestring: string; var opcodestring: string; var parameterstring: string; var specialstring: string);
procedure synchronize; procedure synchronize;
procedure queue;
procedure pushFunction(L: PLua_state=nil); procedure pushFunction(L: PLua_state=nil);
@ -345,6 +348,8 @@ var
paramcount: integer; paramcount: integer;
i: integer; i: integer;
begin begin
selfdestructing:=true;
//no locking here (should already be obtained by the caller) //no locking here (should already be obtained by the caller)
PushFunction(syncvm); PushFunction(syncvm);
if synchronizeparam>0 then if synchronizeparam>0 then
@ -368,6 +373,15 @@ begin
free; free;
end; end;
procedure TLuaCaller.queue;
begin
selfdestructing:=true;
PushFunction(syncvm);
lua_pcall(syncvm, 0,0,0);
free;
end;
procedure TLuaCaller.SelectionChangeEvent(Sender: TObject; User: boolean); procedure TLuaCaller.SelectionChangeEvent(Sender: TObject; User: boolean);
var oldstack: integer; var oldstack: integer;
begin begin

View File

@ -3386,8 +3386,7 @@ begin
else else
lc.synchronizeparam:=0; lc.synchronizeparam:=0;
tthread.Queue(tthread.CurrentThread, lc.synchronize); tthread.Queue(nil, lc.queue);
result:=0; result:=0;
end; end;
@ -14193,6 +14192,29 @@ begin
exit(1); exit(1);
end; end;
function lua_extractfilenamewithoutext(L: Plua_State): integer; cdecl;
begin
if lua_gettop(L)>=1 then
begin
lua_pushstring(L, ExtractFileNameWithoutExt(Lua_ToString(L,1)));
exit(1);
end
else
exit(0);
end;
function lua_extractfileext(L: Plua_State): integer; cdecl;
begin
if lua_gettop(L)>=1 then
begin
lua_pushstring(L, ExtractFileExt(Lua_ToString(L,1)));
exit(1);
end
else
exit(0);
end;
function lua_extractFileName(L: Plua_State): integer; cdecl; function lua_extractFileName(L: Plua_State): integer; cdecl;
begin begin
if lua_gettop(L)>=1 then if lua_gettop(L)>=1 then
@ -14213,6 +14235,7 @@ begin
end end
else else
exit(0); exit(0);
end; end;
function lua_trim(L: Plua_State): integer; cdecl; function lua_trim(L: Plua_State): integer; cdecl;
@ -14293,12 +14316,12 @@ var
a: ptruint=0; a: ptruint=0;
bytes: tmemorystream=nil; bytes: tmemorystream=nil;
sl: TSymbolListHandler=nil; symbollist: TStringlist=nil;
errorlog: tstringlist=nil; errorlog: tstringlist=nil;
bw: size_t; bw: size_t;
si: PCESymbolInfo;
targetself: boolean; targetself: boolean;
ph: THandle; ph: THandle;
@ -14306,7 +14329,7 @@ var
i: integer; i: integer;
list: TStringlist=nil; list: TStringlist=nil;
count: integer; count: integer;
useKernelAlloc: boolean;
begin begin
if lua_gettop(L)>=1 then if lua_gettop(L)>=1 then
begin begin
@ -14351,6 +14374,12 @@ begin
else else
ph:=processhandle; ph:=processhandle;
if lua_gettop(L)>=4 then
useKernelAlloc:=lua_toboolean(L,4)
else
useKernelAlloc:=false;
bytes:=tmemorystream.Create; bytes:=tmemorystream.Create;
errorlog:=tstringlist.create; errorlog:=tstringlist.create;
@ -14381,7 +14410,11 @@ begin
exit(2); exit(2);
end; end;
a:=ptruint(VirtualAllocEx(ph,nil, bytes.Size*2,MEM_RESERVE or MEM_COMMIT,PAGE_EXECUTE_READWRITE)); if useKernelAlloc then
a:=ptruint(kernelalloc(bytes.size*2))
else
a:=ptruint(VirtualAllocEx(ph,nil, bytes.Size*2,MEM_RESERVE or MEM_COMMIT,PAGE_EXECUTE_READWRITE));
if a=0 then if a=0 then
begin begin
lua_pop(L,lua_gettop(L)); lua_pop(L,lua_gettop(L));
@ -14397,15 +14430,15 @@ begin
errorlog.Clear; errorlog.Clear;
end; end;
sl:=TSymbolListHandler.create; symbollist:=TStringlist.create;
//actual compile //actual compile
if ((list=nil) and (tcc.compileScript(s,a,bytes,sl,errorlog,nil,targetself)=false)) or if ((list=nil) and (tcc.compileScript(s,a,bytes,symbollist,errorlog,nil,targetself)=false)) or
((list<>nil) and ( ((list<>nil) and (
((isfile=false) and (tcc.compileScripts(list,a,bytes,sl,errorlog,targetself)=false) ) or ((isfile=false) and (tcc.compileScripts(list,a,bytes,symbollist,errorlog,targetself)=false) ) or
((isfile=true) and (tcc.compileProject(list,a,bytes,sl,errorlog,targetself)=false) ) ((isfile=true) and (tcc.compileProject(list,a,bytes,symbollist,errorlog,targetself)=false) )
)) then )) then
begin begin
lua_pop(L,lua_gettop(L)); lua_pop(L,lua_gettop(L));
@ -14415,8 +14448,8 @@ begin
if list<>nil then if list<>nil then
freeandnil(list); freeandnil(list);
if sl<>nil then if symbollist<>nil then
freeandnil(sl); freeandnil(symbollist);
exit(2); exit(2);
end; end;
@ -14424,18 +14457,16 @@ begin
begin begin
lua_newtable(L); lua_newtable(L);
si:=sl.FindFirstSymbolFromBase(0); for i:=0 to symbollist.count-1 do
while (si<>nil) and (si.address<a+bytes.size) do
begin begin
lua_pushstring(L,si.originalstring); if ptruint(symbollist.objects[i])<a+bytes.size then
lua_pushinteger(L,si.address); begin
lua_settable(L,-3); lua_pushstring(L,symbollist[i]);
si:=si.next; lua_pushinteger(L,ptruint(symbollist.objects[i]));
lua_settable(L,-3);
end;
end; end;
result:=1; result:=1;
if errorlog.count>0 then if errorlog.count>0 then
@ -14454,7 +14485,7 @@ begin
end; end;
finally finally
if sl<>nil then freeandnil(sl); if symbollist<>nil then freeandnil(symbollist);
freeandnil(bytes); freeandnil(bytes);
freeandnil(errorlog); freeandnil(errorlog);
end; end;
@ -15366,6 +15397,8 @@ begin
lua_register(L, 'getAutoRunPath', lua_getAutoRunPath); lua_register(L, 'getAutoRunPath', lua_getAutoRunPath);
lua_register(L, 'getAutorunPath', lua_getAutoRunPath); lua_register(L, 'getAutorunPath', lua_getAutoRunPath);
lua_register(L, 'extractFileName', lua_extractFileName); lua_register(L, 'extractFileName', lua_extractFileName);
lua_register(L, 'extractFileExt', lua_extractFileExt);
lua_register(L, 'extractFileNameWithoutExt', lua_extractFileNameWithoutExt);
lua_register(L, 'extractFilePath', lua_extractFilePath); lua_register(L, 'extractFilePath', lua_extractFilePath);
lua_register(L, 'registerLuaFunctionHighlight', lua_registerLuaFunctionHighlight); lua_register(L, 'registerLuaFunctionHighlight', lua_registerLuaFunctionHighlight);

View File

@ -24,9 +24,10 @@ begin
owner:=nil; owner:=nil;
ListView:=TCEListView.Create(owner); ListView:=TCEListView.Create(owner);
ListView.ViewStyle:=vsReport;
if owner<>nil then if owner<>nil then
ListView.Parent:=owner; ListView.Parent:=owner;
ListView.ViewStyle:=vsReport;
luaclass_newClass(L, ListView); luaclass_newClass(L, ListView);
result:=1; result:=1;

View File

@ -117,7 +117,7 @@ end
function findDotNetMethodAddress(name, modulename) function findDotNetMethodAddress(name, modulename)
print(string.format("findDotNetMethodAddress('%s','%s')", name, modulename)); --print(string.format("findDotNetMethodAddress('%s','%s')", name, modulename));
local result local result
local namespace, classname, methodname=SplitDotNetName(name) local namespace, classname, methodname=SplitDotNetName(name)
@ -159,7 +159,7 @@ end
function detourdotnet(oldmethodaddress,newmethodaddress,oldmethodcalleraddress) function detourdotnet(oldmethodaddress,newmethodaddress,oldmethodcalleraddress)
--write jmp newmethod at the compiled address of oldmethod and if oldmethodcaller is provided write a jmp <trampolinetoold> at oldmethodcaller --write jmp newmethod at the compiled address of oldmethod and if oldmethodcaller is provided write a jmp <trampolinetoold> at oldmethodcaller
print(string.format("detourdotnet(%08x,%08x,%08x)",oldmethodaddress, newmethodaddress, oldmethodcalleraddress)) --print(string.format("detourdotnet(%08x,%08x,%08x)",oldmethodaddress, newmethodaddress, oldmethodcalleraddress))
local ahe,ahd=generateAPIHookScript(string.format("%.8x",oldmethodaddress), string.format("%.8x",newmethodaddress)) local ahe,ahd=generateAPIHookScript(string.format("%.8x",oldmethodaddress), string.format("%.8x",newmethodaddress))
@ -169,13 +169,13 @@ jmp originalcall
]],oldmethodcalleraddress) ]],oldmethodcalleraddress)
print('-------ENABLE-------') --print('-------ENABLE-------')
print(script) --print(script)
print('--------------------') --print('--------------------')
print(''); --print('');
print('------DISABLE------') --print('------DISABLE------')
print(ahd) --print(ahd)
print('-------------------') --print('-------------------')
local aaresult,disableinfo=autoAssemble(script) local aaresult,disableinfo=autoAssemble(script)
if aaresult then if aaresult then
@ -190,10 +190,11 @@ function InjectDotNetDetour(dllmodule, oldmethodname, newmethodname, oldmethodca
--load the given dll, find and compile the methods, and call detourdotnet --load the given dll, find and compile the methods, and call detourdotnet
if dllmodule==nil then if dllmodule==nil then
print(debug.traceback()) print(debug.traceback())
print('InjectDotNetDetour: dllmodule is nil')
error('InjectDotNetDetour: dllmodule is nil') error('InjectDotNetDetour: dllmodule is nil')
end end
print(string.format("InjectDotNetDetour(%s, %s, %s, %s)", dllmodule, oldmethodname, newmethodname, oldmethodcaller)) --print(string.format("InjectDotNetDetour(%s, %s, %s, %s)", dllmodule, oldmethodname, newmethodname, oldmethodcaller))
if monopipe then if monopipe then
@ -214,44 +215,44 @@ function InjectDotNetDetour(dllmodule, oldmethodname, newmethodname, oldmethodca
else else
LaunchDotNetInterface() LaunchDotNetInterface()
print("injecting module") --print("injecting module")
if dotnet_loadModule(dllmodule)==false then if dotnet_loadModule(dllmodule)==false then
return false,'loading '..dllmodule..' failed' return false,'loading '..dllmodule..' failed'
end end
print("Getting oldmethod address "..oldmethodname); --print("Getting oldmethod address "..oldmethodname);
local oldmethodAddress=getAddressSafe(oldmethodname) local oldmethodAddress=getAddressSafe(oldmethodname)
if oldmethodAddress==nil then if oldmethodAddress==nil then
print(oldmethodname.." not perfect") --print(oldmethodname.." not perfect")
oldmethodaddress=findDotNetMethodAddress(oldmethodname) oldmethodaddress=findDotNetMethodAddress(oldmethodname)
if oldmethodaddress==nil then error('Failure getting '..oldmethodname) end if oldmethodaddress==nil then error('Failure getting '..oldmethodname) end
end end
printf("oldmethodaddress=%.8x",oldmethodaddress) --printf("oldmethodaddress=%.8x",oldmethodaddress)
print("--------------") --print("--------------")
print("Getting newmethod address "..newmethodname); --print("Getting newmethod address "..newmethodname);
local newmethodaddress=getAddressSafe(newmethodname) local newmethodaddress=getAddressSafe(newmethodname)
if newmethodaddress==nil then if newmethodaddress==nil then
print(newmethodname.." not perfect") --print(newmethodname.." not perfect")
newmethodaddress=findDotNetMethodAddress(newmethodname, extractFileName(dllmodule)) newmethodaddress=findDotNetMethodAddress(newmethodname, extractFileName(dllmodule))
if newmethodaddress==nil then error('Failure getting '..newmethodname) end if newmethodaddress==nil then error('Failure getting '..newmethodname) end
end end
printf("newmethodaddress=%.8x",newmethodaddress) --printf("newmethodaddress=%.8x",newmethodaddress)
print("--------------") --print("--------------")
print("Getting oldmethodcaller address "..oldmethodcaller); --print("Getting oldmethodcaller address "..oldmethodcaller);
local oldmethodcalleraddress=getAddressSafe(oldmethodcaller) local oldmethodcalleraddress=getAddressSafe(oldmethodcaller)
if oldmethodcalleraddress==nil then if oldmethodcalleraddress==nil then
print(oldmethodcaller.." not perfect") --print(oldmethodcaller.." not perfect")
oldmethodcalleraddress=findDotNetMethodAddress(oldmethodcaller, extractFileName(dllmodule)) oldmethodcalleraddress=findDotNetMethodAddress(oldmethodcaller, extractFileName(dllmodule))
if oldmethodcalleraddress==nil then error('Failure getting '..oldmethodcalleraddress) end if oldmethodcalleraddress==nil then error('Failure getting '..oldmethodcalleraddress) end
end end
printf("oldmethodcalleraddress=%.8x",oldmethodcalleraddress) --printf("oldmethodcalleraddress=%.8x",oldmethodcalleraddress)
print("--------------") -- print("--------------")
if oldmethodaddress and newmethodaddress and oldmethodcalleraddress then if oldmethodaddress and newmethodaddress and oldmethodcalleraddress then

View File

@ -1173,6 +1173,13 @@ end
function mono_class_getNestingType(class) function mono_class_getNestingType(class)
--returns the parent class if nested. 0 if not nested --returns the parent class if nested. 0 if not nested
if (class==nil) or (class==0) then
print("mono_class_getNestingType received an invalid class")
print(debug.traceback())
return nil
end
local result local result
monopipe.lock() monopipe.lock()
monopipe.writeByte(MONOCMD_GETCLASSNESTINGTYPE) monopipe.writeByte(MONOCMD_GETCLASSNESTINGTYPE)

View File

@ -158,6 +158,8 @@ getFileVersion(pathtofile): returns the 64-bit file version, and a table that ha
getFileList(Path:string, searchMask:string OPTIONAL, SearchSubDirs: boolean OPTIONAL, DirAttrib: integer OPTIONAL): Returns an indexed table with filenames getFileList(Path:string, searchMask:string OPTIONAL, SearchSubDirs: boolean OPTIONAL, DirAttrib: integer OPTIONAL): Returns an indexed table with filenames
getDirectoryList(Path:string, SearchSubDirs: boolean OPTIONAL): Returns an indexed table with directory names getDirectoryList(Path:string, SearchSubDirs: boolean OPTIONAL): Returns an indexed table with directory names
extractFileName(filepath): returns the filename of the path extractFileName(filepath): returns the filename of the path
extractFileExt(filepath): returns the file extension of the path
extractFileNameWithoutExt(filepath): Returns the filename of the path, without the extension
extractFilePath(filepath): removes the filename from the path extractFilePath(filepath): removes the filename from the path
enableWindowsSymbols(): Will download the PDB files of Windows and load them (Takes a long time the first time) enableWindowsSymbols(): Will download the PDB files of Windows and load them (Takes a long time the first time)
@ -189,9 +191,9 @@ autoAssemble(text, disableInfo OPTIONAL)
autoAssembleCheck(text, enable, targetself) : Checks the script for syntax errors. Returns true on succes, false with an error message on failure autoAssembleCheck(text, enable, targetself) : Checks the script for syntax errors. Returns true on succes, false with an error message on failure
compile(text, address OPTIONAL, targetself) : Compiles C code and returns a table with the addresses of the symbols on success, or nil with a secondary result containing the errormessage compile(text, address OPTIONAL, targetself OPTIONAL) : Compiles C code and returns a table with the addresses of the symbols on success, or nil with a secondary result containing the errormessage
compile({indexedtable containing scripts}, address OPTIONAL, targetself) : ^ but allows multiple scripts to be compiled into one compile({indexedtable containing scripts}, address OPTIONAL, targetself OPTIONAL) ) : ^ but allows multiple scripts to be compiled into one
compileFiles({filelist}, address OPTIONAL, targetself): ^ but takes an indexed list of files compileFiles({filelist}, address OPTIONAL, targetself OPTIONAL) ): ^ but takes an indexed list of files
compileCS(text, {references}, coreAssembly OPTIONAL) - Compiles c# code and returns the autogenerated filename. references is a list of c# assemblies this code may reference. This file will be deleted when CE closes (or next time another CE closes and it's not in use anymore). Note: This requires .NET 4 to be installed, even if the target is mono. Tip: Handy with injectDotNetDLL compileCS(text, {references}, coreAssembly OPTIONAL) - Compiles c# code and returns the autogenerated filename. references is a list of c# assemblies this code may reference. This file will be deleted when CE closes (or next time another CE closes and it's not in use anymore). Note: This requires .NET 4 to be installed, even if the target is mono. Tip: Handy with injectDotNetDLL

View File

@ -1,7 +1,7 @@
object formAddressChange: TformAddressChange object formAddressChange: TformAddressChange
Left = 806 Left = 828
Height = 295 Height = 295
Top = 226 Top = 182
Width = 263 Width = 263
AutoSize = True AutoSize = True
BorderIcons = [biSystemMenu] BorderIcons = [biSystemMenu]
@ -47,6 +47,7 @@ object formAddressChange: TformAddressChange
Width = 36 Width = 36
Caption = '=Value' Caption = '=Value'
ParentColor = False ParentColor = False
PopupMenu = pmValue
end end
object btnOk: TButton object btnOk: TButton
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
@ -685,4 +686,15 @@ object formAddressChange: TformAddressChange
FF00FFFFFF00FFFFFF00FFFFFF00 FF00FFFFFF00FFFFFF00FFFFFF00
} }
end end
object pmValue: TPopupMenu
Left = 184
object miCopyFinalAddressToClipboard: TMenuItem
Caption = 'Copy this address to Clipboard'
OnClick = miCopyFinalAddressToClipboardClick
end
object miCopyValueToClipboard: TMenuItem
Caption = 'Copy this value to Clipboard'
OnClick = miCopyValueToClipboardClick
end
end
end end

View File

@ -149,6 +149,8 @@ type
LabelType: TLabel; LabelType: TLabel;
LabelDescription: TLabel; LabelDescription: TLabel;
lblValue: TLabel; lblValue: TLabel;
miCopyFinalAddressToClipboard: TMenuItem;
miCopyValueToClipboard: TMenuItem;
miAddOffsetAbove: TMenuItem; miAddOffsetAbove: TMenuItem;
miAddOffsetBelow: TMenuItem; miAddOffsetBelow: TMenuItem;
miRemoveOffset: TMenuItem; miRemoveOffset: TMenuItem;
@ -183,6 +185,7 @@ type
lengthlabel: TLabel; lengthlabel: TLabel;
pnlExtra: TPanel; pnlExtra: TPanel;
pmOffset: TPopupMenu; pmOffset: TPopupMenu;
pmValue: TPopupMenu;
RadioButton1: TRadioButton; RadioButton1: TRadioButton;
RadioButton2: TRadioButton; RadioButton2: TRadioButton;
RadioButton3: TRadioButton; RadioButton3: TRadioButton;
@ -206,6 +209,8 @@ type
procedure FormDestroy(Sender: TObject); procedure FormDestroy(Sender: TObject);
procedure FormResize(Sender: TObject); procedure FormResize(Sender: TObject);
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
procedure miCopyFinalAddressToClipboardClick(Sender: TObject);
procedure miCopyValueToClipboardClick(Sender: TObject);
procedure miAddAddressToListClick(Sender: TObject); procedure miAddAddressToListClick(Sender: TObject);
procedure miCopyAddressToClipboardClick(Sender: TObject); procedure miCopyAddressToClipboardClick(Sender: TObject);
procedure miAddOffsetAboveClick(Sender: TObject); procedure miAddOffsetAboveClick(Sender: TObject);
@ -1817,6 +1822,24 @@ begin
//autosize:=true; //autosize:=true;
end; end;
procedure TformAddressChange.miCopyFinalAddressToClipboardClick(Sender: TObject);
var e: boolean;
a: ptruint;
begin
if (memoryrecord<>nil) then
e:=not memoryrecord.parseAddressString(utf8toansi(editAddress.Text),a)
else
a:=symhandler.getAddressFromName(utf8toansi(editAddress.Text),false,e);
if not e then
Clipboard.AsText:=inttohex(a,8);
end;
procedure TformAddressChange.miCopyValueToClipboardClick(Sender: TObject);
begin
Clipboard.AsText:=copy(lblValue.Caption,2);
end;
procedure TformAddressChange.miAddAddressToListClick(Sender: TObject); procedure TformAddressChange.miAddAddressToListClick(Sender: TObject);
var var
oi: TOffsetInfo; oi: TOffsetInfo;

View File

@ -1,31 +1,31 @@
object frmExceptionIgnoreList: TfrmExceptionIgnoreList object frmExceptionIgnoreList: TfrmExceptionIgnoreList
Left = 1013 Left = 1023
Height = 240 Height = 240
Top = 160 Top = 214
Width = 320 Width = 335
Caption = 'Exception ignore list' Caption = 'Exception ignore list'
ClientHeight = 240 ClientHeight = 240
ClientWidth = 320 ClientWidth = 335
OnCreate = FormCreate OnCreate = FormCreate
OnDestroy = FormDestroy OnDestroy = FormDestroy
OnShow = FormShow OnShow = FormShow
Position = poScreenCenter Position = poScreenCenter
LCLVersion = '2.0.0.4' LCLVersion = '2.0.6.0'
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
Height = 225 Height = 225
Top = 15 Top = 15
Width = 320 Width = 335
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 225 ClientHeight = 225
ClientWidth = 320 ClientWidth = 335
TabOrder = 0 TabOrder = 0
object lbExceptionCodeList: TListBox object lbExceptionCodeList: TListBox
Left = 0 Left = 0
Height = 225 Height = 225
Top = 0 Top = 0
Width = 176 Width = 191
Align = alClient Align = alClient
ItemHeight = 0 ItemHeight = 0
OnDblClick = lbExceptionCodeListDblClick OnDblClick = lbExceptionCodeListDblClick
@ -33,7 +33,7 @@ object frmExceptionIgnoreList: TfrmExceptionIgnoreList
TabOrder = 0 TabOrder = 0
end end
object Panel2: TPanel object Panel2: TPanel
Left = 176 Left = 191
Height = 225 Height = 225
Top = 0 Top = 0
Width = 144 Width = 144
@ -60,7 +60,7 @@ object frmExceptionIgnoreList: TfrmExceptionIgnoreList
Left = 7 Left = 7
Height = 15 Height = 15
Top = 5 Top = 5
Width = 80 Width = 81
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Top = 4 BorderSpacing.Top = 4
Caption = 'Exception code' Caption = 'Exception code'
@ -71,10 +71,10 @@ object frmExceptionIgnoreList: TfrmExceptionIgnoreList
AnchorSideLeft.Side = asrCenter AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = edtExceptionCode AnchorSideTop.Control = edtExceptionCode
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 20 Left = 19
Height = 25 Height = 25
Top = 48 Top = 48
Width = 105 Width = 106
AutoSize = True AutoSize = True
BorderSpacing.Top = 5 BorderSpacing.Top = 5
Caption = 'Add Exception ' Caption = 'Add Exception '
@ -88,7 +88,7 @@ object frmExceptionIgnoreList: TfrmExceptionIgnoreList
Left = 0 Left = 0
Height = 15 Height = 15
Top = 0 Top = 0
Width = 320 Width = 335
Align = alTop Align = alTop
Caption = 'The following exceptions will be ignored' Caption = 'The following exceptions will be ignored'
ParentColor = False ParentColor = False
@ -96,8 +96,8 @@ object frmExceptionIgnoreList: TfrmExceptionIgnoreList
end end
object PopupMenu1: TPopupMenu object PopupMenu1: TPopupMenu
OnPopup = PopupMenu1Popup OnPopup = PopupMenu1Popup
left = 54 Left = 54
top = 53 Top = 53
object miDelete: TMenuItem object miDelete: TMenuItem
Caption = 'Delete' Caption = 'Delete'
OnClick = lbExceptionCodeListDblClick OnClick = lbExceptionCodeListDblClick

View File

@ -30,6 +30,7 @@ type
procedure PopupMenu1Popup(Sender: TObject); procedure PopupMenu1Popup(Sender: TObject);
private private
{ private declarations } { private declarations }
loadedPosition: boolean;
public public
{ public declarations } { public declarations }
procedure updateList; procedure updateList;
@ -42,13 +43,13 @@ implementation
{$R *.lfm} {$R *.lfm}
uses UnexpectedExceptionsHelper, CEFuncProc; uses UnexpectedExceptionsHelper, CEFuncProc, math;
{ TfrmExceptionIgnoreList } { TfrmExceptionIgnoreList }
procedure TfrmExceptionIgnoreList.FormCreate(Sender: TObject); procedure TfrmExceptionIgnoreList.FormCreate(Sender: TObject);
begin begin
LoadFormPosition(self); loadedPosition:=LoadFormPosition(self);
end; end;
procedure TfrmExceptionIgnoreList.btnAddClick(Sender: TObject); procedure TfrmExceptionIgnoreList.btnAddClick(Sender: TObject);
@ -72,6 +73,13 @@ begin
updateList; updateList;
edtExceptionCode.Width:=btnAdd.Width+2; edtExceptionCode.Width:=btnAdd.Width+2;
if not loadedPosition then
begin
clientwidth:=max(clientwidth, canvas.TextWidth(label1.Caption)*2);
clientheight:=max(clientheight, canvas.TextHeight('jf')*20);
end;
end; end;
procedure TfrmExceptionIgnoreList.lbExceptionCodeListDblClick(Sender: TObject); procedure TfrmExceptionIgnoreList.lbExceptionCodeListDblClick(Sender: TObject);

View File

@ -1,6 +1,6 @@
Additions and changes: Additions and changes:
Added dark mode support (restart CE when you channge the setting) Added dark mode support (restart CE when you channge the setting)
Hotkeys can be repeated by releasing the key anbd repressing if the repeat timer hasn't finished yet Hotkeys can be repeated by releasing the key and repressing if the repeat timer hasn't finished yet
structure dissect add to addresslist uses the addressstring instead of number, so symbols will be preserved structure dissect add to addresslist uses the addressstring instead of number, so symbols will be preserved
structure dissect now has a option to save the previous state of a column and show changes easier structure dissect now has a option to save the previous state of a column and show changes easier
Added {$LUACODE} blocks for inline Lua coding Added {$LUACODE} blocks for inline Lua coding
@ -15,6 +15,9 @@ Additions and changes:
The change address window now also supports relative offsets The change address window now also supports relative offsets
DBVM speed improvements DBVM speed improvements
New debugger interface: DBVM-level debugger New debugger interface: DBVM-level debugger
Improved performance of "Find what access/writes this address"
Dissect code now lets you specify custom ranges
Addresslist value sort now sorts values by alphabet if the record is a string type
@ -30,12 +33,13 @@ Fixes:
fixed ultimap ret filter fixed ultimap ret filter
fixed luapipe never calling OnError fixed luapipe never calling OnError
fixed DBVM find what access/writes sometimes skipping entries on AMD fixed DBVM find what access/writes sometimes skipping entries on AMD
fixed undo not working on memory records when using the single line editor
lua: lua:
changes: changes:
saveTable won't ask to sign the table anymore saveTable won't ask to sign the table anymore
messageDialog will work if you omit the buttonlist. (Defaults to mbOK then) messageDialog will work if you omit the buttonlist. (Defaults to mbOK then)
added custom designable button added more customizabe button
New functions: New functions:
form.saveToStream form.saveToStream

View File

@ -12,15 +12,15 @@ object frmSymbolhandler: TfrmSymbolhandler
Position = poScreenCenter Position = poScreenCenter
LCLVersion = '2.0.6.0' LCLVersion = '2.0.6.0'
object Panel1: TPanel object Panel1: TPanel
Left = 332 Left = 371
Height = 432 Height = 432
Top = 0 Top = 0
Width = 165 Width = 126
Align = alRight Align = alRight
AutoSize = True AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 432 ClientHeight = 432
ClientWidth = 165 ClientWidth = 126
Constraints.MinHeight = 250 Constraints.MinHeight = 250
TabOrder = 0 TabOrder = 0
object Label2: TLabel object Label2: TLabel
@ -32,7 +32,7 @@ object frmSymbolhandler: TfrmSymbolhandler
Left = 8 Left = 8
Height = 15 Height = 15
Top = 58 Top = 58
Width = 149 Width = 110
Alignment = taCenter Alignment = taCenter
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 8 BorderSpacing.Left = 8
@ -45,10 +45,13 @@ object frmSymbolhandler: TfrmSymbolhandler
AnchorSideLeft.Control = Panel1 AnchorSideLeft.Control = Panel1
AnchorSideTop.Control = Label2 AnchorSideTop.Control = Label2
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Panel1
AnchorSideRight.Side = asrBottom
Left = 8 Left = 8
Height = 23 Height = 23
Top = 73 Top = 73
Width = 149 Width = 110
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Right = 8 BorderSpacing.Right = 8
TabOrder = 1 TabOrder = 1
@ -58,7 +61,7 @@ object frmSymbolhandler: TfrmSymbolhandler
AnchorSideLeft.Side = asrCenter AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = edtAddress AnchorSideTop.Control = edtAddress
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 37 Left = 18
Height = 25 Height = 25
Top = 104 Top = 104
Width = 90 Width = 90
@ -85,7 +88,7 @@ object frmSymbolhandler: TfrmSymbolhandler
Left = 8 Left = 8
Height = 15 Height = 15
Top = 16 Top = 16
Width = 149 Width = 110
Alignment = taCenter Alignment = taCenter
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 8 BorderSpacing.Left = 8
@ -103,7 +106,7 @@ object frmSymbolhandler: TfrmSymbolhandler
Left = 8 Left = 8
Height = 23 Height = 23
Top = 31 Top = 31
Width = 149 Width = 110
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Right = 8 BorderSpacing.Right = 8
@ -115,17 +118,17 @@ object frmSymbolhandler: TfrmSymbolhandler
Left = 0 Left = 0
Height = 432 Height = 432
Top = 0 Top = 0
Width = 332 Width = 371
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 432 ClientHeight = 432
ClientWidth = 332 ClientWidth = 371
TabOrder = 1 TabOrder = 1
object Label1: TLabel object Label1: TLabel
Left = 0 Left = 0
Height = 15 Height = 15
Top = 0 Top = 0
Width = 332 Width = 371
Align = alTop Align = alTop
Caption = 'Userdefined symbols:' Caption = 'Userdefined symbols:'
ParentColor = False ParentColor = False
@ -134,7 +137,7 @@ object frmSymbolhandler: TfrmSymbolhandler
Left = 0 Left = 0
Height = 238 Height = 238
Top = 15 Top = 15
Width = 332 Width = 371
Align = alTop Align = alTop
Columns = < Columns = <
item item
@ -161,7 +164,7 @@ object frmSymbolhandler: TfrmSymbolhandler
Left = 0 Left = 0
Height = 159 Height = 159
Top = 273 Top = 273
Width = 332 Width = 371
Align = alClient Align = alClient
PopupMenu = PopupMenu2 PopupMenu = PopupMenu2
ReadOnly = True ReadOnly = True
@ -175,7 +178,7 @@ object frmSymbolhandler: TfrmSymbolhandler
Left = 0 Left = 0
Height = 5 Height = 5
Top = 253 Top = 253
Width = 332 Width = 371
Align = alTop Align = alTop
ResizeAnchor = akTop ResizeAnchor = akTop
end end
@ -183,7 +186,7 @@ object frmSymbolhandler: TfrmSymbolhandler
Left = 0 Left = 0
Height = 15 Height = 15
Top = 258 Top = 258
Width = 332 Width = 371
Align = alTop Align = alTop
Caption = 'Symbol groups:' Caption = 'Symbol groups:'
ParentColor = False ParentColor = False

View File

@ -107,10 +107,10 @@ begin
li:=listview1.Items.Add; li:=listview1.Items.Add;
li.Caption:=sl[i]; li.Caption:=sl[i];
extradata:=pointer(sl.objects[i]); extradata:=pointer(sl.objects[i]);
li.SubItems.Add(extradata^.addressstring);
if extradata^.doNotSave=false then if extradata^.doNotSave=false then
begin begin
li.SubItems.Add(extradata^.addressstring);
if extradata^.allocsize>0 then if extradata^.allocsize>0 then
li.SubItems.Add(inttohex(dword(extradata^.allocsize),8)); li.SubItems.Add(inttohex(dword(extradata^.allocsize),8));
end; end;