Fixed some instruction definitions

This commit is contained in:
flobernd 2016-09-22 21:19:15 +02:00
parent 4c911f91b9
commit 98e9559d6d
8 changed files with 118392 additions and 118250 deletions

View File

@ -154,7 +154,7 @@ type
procedure DefinitionDelete(Node: PVirtualNode); procedure DefinitionDelete(Node: PVirtualNode);
procedure ExpandAllNodes(Expanded: Boolean); procedure ExpandAllNodes(Expanded: Boolean);
procedure ExpandLeaf(Node: PVirtualNode; Expanded: Boolean); procedure ExpandLeaf(Node: PVirtualNode; Expanded: Boolean);
procedure SetMnemonicFilter(const Filter: String; ExactMatch: Boolean); procedure SetMnemonicFilter(const Filter: String; ExactMatch: Boolean; DiffingMode: Boolean);
public public
{ Public-Deklarationen } { Public-Deklarationen }
end; end;
@ -525,7 +525,7 @@ begin
begin begin
if (not (csDestroying in ComponentState)) and (lbMnemonicFilter.Down) then if (not (csDestroying in ComponentState)) and (lbMnemonicFilter.Down) then
begin begin
SetMnemonicFilter(edtMnemonicFilter.Text, bbExactMatch.Down); SetMnemonicFilter(edtMnemonicFilter.Text, bbExactMatch.Down, lbDiffingMode.Down);
end; end;
FHasUnsavedChanges := true; FHasUnsavedChanges := true;
UpdateControls; UpdateControls;
@ -1066,7 +1066,7 @@ end;
procedure TfrmMain.bbExactMatchClick(Sender: TObject); procedure TfrmMain.bbExactMatchClick(Sender: TObject);
begin begin
SetMnemonicFilter(edtMnemonicFilter.Text, bbExactMatch.Down); SetMnemonicFilter(edtMnemonicFilter.Text, bbExactMatch.Down, lbDiffingMode.Down);
end; end;
procedure TfrmMain.bbExpandLeafClick(Sender: TObject); procedure TfrmMain.bbExpandLeafClick(Sender: TObject);
@ -1098,7 +1098,7 @@ procedure TfrmMain.edtMnemonicFilterCurChange(Sender: TObject);
begin begin
// TODO: Filter is offsync, if the user leaves the edit by pressing ESC or focusing an other // TODO: Filter is offsync, if the user leaves the edit by pressing ESC or focusing an other
// control // control
SetMnemonicFilter(edtMnemonicFilter.CurText, bbExactMatch.Down); SetMnemonicFilter(edtMnemonicFilter.CurText, bbExactMatch.Down, lbDiffingMode.Down);
end; end;
procedure TfrmMain.lbClipboardPasteClick(Sender: TObject); procedure TfrmMain.lbClipboardPasteClick(Sender: TObject);
@ -1281,7 +1281,7 @@ begin
FEditor.LoadFromFile(FFilename); FEditor.LoadFromFile(FFilename);
if (lbMnemonicFilter.Down) then if (lbMnemonicFilter.Down) then
begin begin
SetMnemonicFilter(edtMnemonicFilter.Text, bbExactMatch.Down); SetMnemonicFilter(edtMnemonicFilter.Text, bbExactMatch.Down, lbDiffingMode.Down);
end; end;
except except
on E: Exception do on E: Exception do
@ -1301,11 +1301,11 @@ begin
piStatusBarProgress.Width := barStatusBarProgress.Control.ClientWidth; piStatusBarProgress.Width := barStatusBarProgress.Control.ClientWidth;
if (lbMnemonicFilter.Down) then if (lbMnemonicFilter.Down) then
begin begin
SetMnemonicFilter(edtMnemonicFilter.Text, bbExactMatch.Down); SetMnemonicFilter(edtMnemonicFilter.Text, bbExactMatch.Down, lbDiffingMode.Down);
edtMnemonicFilter.SetFocus; edtMnemonicFilter.SetFocus;
end else end else
begin begin
SetMnemonicFilter('', false); SetMnemonicFilter('', false, false);
end; end;
end; end;
@ -1414,7 +1414,8 @@ begin
SetBounds(R.Left + 50, R.Top + 50, R.Width - 100, R.Height - 100); SetBounds(R.Left + 50, R.Top + 50, R.Width - 100, R.Height - 100);
end; end;
procedure TfrmMain.SetMnemonicFilter(const Filter: String; ExactMatch: Boolean); procedure TfrmMain.SetMnemonicFilter(const Filter: String; ExactMatch: Boolean;
DiffingMode: Boolean);
procedure ApplyMnemonicFilter(Filter: TInstructionFilter; out IsVisible: Boolean; procedure ApplyMnemonicFilter(Filter: TInstructionFilter; out IsVisible: Boolean;
const FilterText: String; FilterLength: Integer); const FilterText: String; FilterLength: Integer);
@ -1423,8 +1424,9 @@ var
C: TDefinitionContainer; C: TDefinitionContainer;
I: Integer; I: Integer;
B: Boolean; B: Boolean;
NodeData: PEditorNodeData;
begin begin
IsVisible := (FilterLength = 0); IsVisible := (FilterLength = 0) and (not DiffingMode);
if (iffIsDefinitionContainer in Filter.FilterFlags) then if (iffIsDefinitionContainer in Filter.FilterFlags) then
begin begin
C := (Filter as TDefinitionContainer); C := (Filter as TDefinitionContainer);
@ -1445,6 +1447,11 @@ begin
end; end;
end; end;
end; end;
if (DiffingMode) then
begin
NodeData := EditorTree.GetNodeData(GetTreeNode(D));
B := B and (NodeData^.DiffingState <> dsDefault);
end;
EditorTree.IsVisible[GetTreeNode(D)] := B; EditorTree.IsVisible[GetTreeNode(D)] := B;
IsVisible := IsVisible or B; IsVisible := IsVisible or B;
end; end;

View File

@ -14,8 +14,7 @@ uses
formEditorX86Registers in 'Forms\Editors\formEditorX86Registers.pas' {frmEditorX86Registers}, formEditorX86Registers in 'Forms\Editors\formEditorX86Registers.pas' {frmEditorX86Registers},
formCodeGenerator in 'Forms\formCodeGenerator.pas' {frmCodeGenerator}, formCodeGenerator in 'Forms\formCodeGenerator.pas' {frmCodeGenerator},
Zydis.CodeGenerator in 'Zydis.CodeGenerator.pas', Zydis.CodeGenerator in 'Zydis.CodeGenerator.pas',
untPropertyEditors in 'untPropertyEditors.pas', untPropertyEditors in 'untPropertyEditors.pas';
formCompareDatabases in 'Forms\formCompareDatabases.pas' {frmCompareDatabases};
{$R *.res} {$R *.res}

View File

@ -156,10 +156,6 @@
</DCCReference> </DCCReference>
<DCCReference Include="Zydis.CodeGenerator.pas"/> <DCCReference Include="Zydis.CodeGenerator.pas"/>
<DCCReference Include="untPropertyEditors.pas"/> <DCCReference Include="untPropertyEditors.pas"/>
<DCCReference Include="Forms\formCompareDatabases.pas">
<Form>frmCompareDatabases</Form>
<FormType>dfm</FormType>
</DCCReference>
<BuildConfiguration Include="Release"> <BuildConfiguration Include="Release">
<Key>Cfg_2</Key> <Key>Cfg_2</Key>
<CfgParent>Base</CfgParent> <CfgParent>Base</CfgParent>
@ -192,12 +188,27 @@
<Overwrite>true</Overwrite> <Overwrite>true</Overwrite>
</Platform> </Platform>
</DeployFile> </DeployFile>
<DeployClass Name="ProjectiOSDeviceResourceRules"> <DeployClass Name="DependencyModule">
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.dll;.bpl</Extensions>
</Platform>
<Platform Name="iOSDevice64"> <Platform Name="iOSDevice64">
<Operation>1</Operation> <Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform> </Platform>
<Platform Name="iOSDevice32"> <Platform Name="iOSDevice32">
<Operation>1</Operation> <Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform> </Platform>
</DeployClass> </DeployClass>
<DeployClass Name="ProjectOSXResource"> <DeployClass Name="ProjectOSXResource">
@ -549,27 +560,12 @@
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
</DeployClass> </DeployClass>
<DeployClass Name="DependencyModule"> <DeployClass Name="ProjectiOSDeviceResourceRules">
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.dll;.bpl</Extensions>
</Platform>
<Platform Name="iOSDevice64"> <Platform Name="iOSDevice64">
<Operation>1</Operation> <Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform> </Platform>
<Platform Name="iOSDevice32"> <Platform Name="iOSDevice32">
<Operation>1</Operation> <Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform> </Platform>
</DeployClass> </DeployClass>
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/> <ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff