mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-27 23:11:02 +00:00
Print instruction summary
This commit is contained in:
@@ -172,6 +172,21 @@ export class SettingsMenu extends React.Component<SettingsMenuProps, Settings> {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex gap-6">
|
||||
<Checkbox
|
||||
id="settings-summary"
|
||||
checked={this.state.instructionSummary}
|
||||
onCheckedChange={(checked: boolean) => {
|
||||
this.setState({ instructionSummary: checked });
|
||||
}}
|
||||
/>
|
||||
<SettingsLabel
|
||||
htmlFor="settings-summary"
|
||||
text={"Print Instruction Summary"}
|
||||
tooltip={"Print summary of executed instructions"}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex gap-6">
|
||||
<Checkbox
|
||||
id="settings-persist"
|
||||
|
||||
@@ -9,6 +9,7 @@ export interface Settings {
|
||||
execAccess: boolean;
|
||||
foreignAccess: boolean;
|
||||
wasm64: boolean;
|
||||
instructionSummary: boolean;
|
||||
ignoredFunctions: string[];
|
||||
interestingModules: string[];
|
||||
commandLine: string;
|
||||
@@ -24,6 +25,7 @@ export function createDefaultSettings(): Settings {
|
||||
execAccess: true,
|
||||
foreignAccess: false,
|
||||
wasm64: false,
|
||||
instructionSummary: false,
|
||||
ignoredFunctions: [],
|
||||
interestingModules: [],
|
||||
commandLine: "",
|
||||
@@ -83,6 +85,10 @@ export function translateSettings(settings: Settings): string[] {
|
||||
switches.push("-f");
|
||||
}
|
||||
|
||||
if (settings.instructionSummary) {
|
||||
switches.push("-is");
|
||||
}
|
||||
|
||||
settings.ignoredFunctions.forEach((f) => {
|
||||
switches.push("-i");
|
||||
switches.push(f);
|
||||
|
||||
Reference in New Issue
Block a user