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

View File

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

View File

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