From e6ed313c479e1df7ac297d1440311266b73aaa0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Wed, 2 Oct 2024 00:28:40 +0200 Subject: [PATCH] Wire up some more --- apps/tracer/src/DisassemblyView.tsx | 4 +++- apps/tracer/src/EventView.tsx | 2 +- apps/tracer/src/model.ts | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/tracer/src/DisassemblyView.tsx b/apps/tracer/src/DisassemblyView.tsx index 4142c76f..450cc375 100644 --- a/apps/tracer/src/DisassemblyView.tsx +++ b/apps/tracer/src/DisassemblyView.tsx @@ -29,7 +29,7 @@ export type AddInstructionHookRequestHandler = (address: bigint) => void; export default function DisassemblyView({ target, handlers, onSelectHandler, onAddInstructionHook }: DisassemblyViewProps) { const [rawR2Output, setRawR2Output] = useState(""); - const [r2Ops, setR2Ops] = useState(new Map()); + const [_r2Ops, setR2Ops] = useState(new Map()); const [r2Output, setR2Output] = useState([]); const [isLoading, setIsLoading] = useState(false); const highlightedAddressAnchorRef = useRef(null); @@ -181,12 +181,14 @@ export default function DisassemblyView({ target, handlers, onSelectHandler, onA ); } +/* interface R2Function { name: string; size: string; addr: string; ops: R2Operation[]; } +*/ interface R2Operation { offset: string; diff --git a/apps/tracer/src/EventView.tsx b/apps/tracer/src/EventView.tsx index d842a974..9543834c 100644 --- a/apps/tracer/src/EventView.tsx +++ b/apps/tracer/src/EventView.tsx @@ -132,7 +132,7 @@ export default function EventView({ return (
{ - events.reduce((result, [targetId, timestamp, threadId, depth, caller, backtrace, message, style], i) => { + events.reduce((result, [targetId, timestamp, threadId, depth, _caller, _backtrace, message, style], i) => { let timestampStr = timestamp.toString(); const timestampPaddingNeeded = Math.max(6 - timestampStr.length, 0); for (let i = 0; i !== timestampPaddingNeeded; i++) { diff --git a/apps/tracer/src/model.ts b/apps/tracer/src/model.ts index cad102dd..1e2d3fa2 100644 --- a/apps/tracer/src/model.ts +++ b/apps/tracer/src/model.ts @@ -1,10 +1,10 @@ import { useR2, type Platform, type Architecture } from "@frida/react-use-r2"; -import r2WasmUrl from "@frida/react-use-r2/dist/r2.wasm?url"; +//import r2WasmUrl from "@frida/react-use-r2/dist/r2.wasm?url"; import { OverlayToaster } from "@blueprintjs/core"; import { useCallback, useEffect, useRef, useState } from "react"; import useWebSocket, { ReadyState } from "react-use-websocket"; -console.log("r2WasmUrl:", r2WasmUrl); +//console.log("r2WasmUrl:", r2WasmUrl); const SOCKET_URL = (import.meta.env.MODE === "development") ? "ws://localhost:1337"