Print instruction summary

This commit is contained in:
momo5502
2025-08-18 19:00:31 +02:00
parent 5a3d05c64c
commit c71c204583
5 changed files with 81 additions and 3 deletions

View File

@@ -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"

View File

@@ -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);