Skip to content

Commit

Permalink
Wire up some more
Browse files Browse the repository at this point in the history
  • Loading branch information
oleavr committed Oct 1, 2024
1 parent 53eb285 commit e6ed313
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion apps/tracer/src/DisassemblyView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, R2Operation>());
const [_r2Ops, setR2Ops] = useState(new Map<string, R2Operation>());
const [r2Output, setR2Output] = useState<string[]>([]);
const [isLoading, setIsLoading] = useState(false);
const highlightedAddressAnchorRef = useRef<HTMLAnchorElement | null>(null);
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion apps/tracer/src/EventView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export default function EventView({
return (
<div ref={containerRef} className="event-view">
{
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++) {
Expand Down
4 changes: 2 additions & 2 deletions apps/tracer/src/model.ts
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit e6ed313

Please sign in to comment.