Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/fuzz/fuzzing.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { test } from "node:test";
import assert from "node:assert/strict";
import fc from "fast-check";
import { MessageReader, encodeMessage, stringifyJson } from "../tcf/channel";
import { parseJson, toBigInt } from "../tcf/json";
import { MAX_ADDRESS } from "../shared/targetMemory/format";
import { encodeNeedle, MAX_NEEDLE_LENGTH } from "../shared/targetMemory/needle";
import { scanMemory } from "../shared/targetMemory/search";
import { MessageReader, encodeMessage, stringifyJson } from "@/tcf/channel";
import { parseJson, toBigInt } from "@/tcf/json";
import { MAX_ADDRESS } from "@/shared/targetMemory/format";
import { encodeNeedle, MAX_NEEDLE_LENGTH } from "@/shared/targetMemory/needle";
import { scanMemory } from "@/shared/targetMemory/search";

const options = { numRuns: 1000 };
const endianness = fc.constantFrom("little", "big");
Expand Down
6 changes: 3 additions & 3 deletions src/launchSettings/webview/launchSettings.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { LaunchConfiguration } from "../launchJson";
import type { JsonPath, StateMessage, WebviewMessage } from "../protocol";
import type { LaunchConfiguration } from "@/launchSettings/launchJson";
import type { JsonPath, StateMessage, WebviewMessage } from "@/launchSettings/protocol";
import {
agentAddress,
editList,
Expand All @@ -10,7 +10,7 @@ import {
parseInput,
toggleChoice,
valueAtPath,
} from "../schema";
} from "@/launchSettings/schema";

/*
* The launch configurations form: configuration names on the left, the attributes
Expand Down
4 changes: 2 additions & 2 deletions src/targetMemory/memoryClient.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as vscode from "vscode";
import * as req from "../tcfRequests";
import { MemoryAccessMode, type ByteRange } from "../tcf/services/memory";
import * as req from "@/tcfRequests";
import { MemoryAccessMode, type ByteRange } from "@/tcf/services/memory";

export interface ReadResult {
bytes: Uint8Array;
Expand Down
8 changes: 4 additions & 4 deletions src/targetMemory/targetMemoryManager.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import * as vscode from "vscode";
import type { DebugProtocol } from "@vscode/debugprotocol";
import * as req from "../tcfRequests";
import { BYTES_PER_ROW_OPTIONS, GROUP_SIZES, addressFromValue, parseAddress } from "../shared/targetMemory/format";
import { INT_SIZES } from "../shared/targetMemory/needle";
import * as req from "@/tcfRequests";
import { BYTES_PER_ROW_OPTIONS, GROUP_SIZES, addressFromValue, parseAddress } from "@/shared/targetMemory/format";
import { INT_SIZES } from "@/shared/targetMemory/needle";
import {
DEFAULT_SETTINGS,
type ContextMenuCommand,
type PanelSettings,
type PhysicalContext,
} from "../shared/targetMemory/protocol";
} from "@/shared/targetMemory/protocol";
import { TargetMemoryClient } from "./memoryClient";
import { TargetMemoryPanel, errorText } from "./targetMemoryPanel";

Expand Down
4 changes: 2 additions & 2 deletions src/targetMemory/targetMemoryPanel.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as vscode from "vscode";
import { randomBytes } from "crypto";
import { formatHex, hexString as hex, parseAddress } from "../shared/targetMemory/format";
import { formatHex, hexString as hex, parseAddress } from "@/shared/targetMemory/format";
import {
TARGET_MEMORY_VIEW_TYPE,
type ContextMenuCommand,
Expand All @@ -9,7 +9,7 @@ import {
type MenuTarget,
type TargetState,
type ToWebview,
} from "../shared/targetMemory/protocol";
} from "@/shared/targetMemory/protocol";
import type { TargetMemoryClient } from "./memoryClient";
import type { TargetMemoryManager } from "./targetMemoryManager";

Expand Down
2 changes: 1 addition & 1 deletion src/tcf/services/breakpoints.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TcfChannel } from "../channel";
import { TcfChannel } from "@/tcf/channel";

/** Breakpoint properties, see TCF Services -> Breakpoints -> set. */
export interface BreakpointProperties {
Expand Down
2 changes: 1 addition & 1 deletion src/tcf/services/commandLine.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TcfChannel } from "../channel";
import { TcfChannel } from "@/tcf/channel";

/*
* The Simics CommandLine service, see CommandLine-service.md in the Simics TCF
Expand Down
2 changes: 1 addition & 1 deletion src/tcf/services/disassembly.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TcfChannel } from "../channel";
import { TcfChannel } from "@/tcf/channel";

export interface DisassemblyField {
Type?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/tcf/services/expressions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TcfChannel, formatTcfError } from "../channel";
import { TcfChannel, formatTcfError } from "@/tcf/channel";

/** Type classes, see TCF Services -> Symbols -> TypeClass. */
export const enum TypeClass {
Expand Down
2 changes: 1 addition & 1 deletion src/tcf/services/lineNumbers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TcfChannel } from "../channel";
import { TcfChannel } from "@/tcf/channel";

/** A code area, see TCF Services -> Line Numbers. */
export interface CodeArea {
Expand Down
4 changes: 2 additions & 2 deletions src/tcf/services/memory.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TcfChannel, TcfError, formatTcfError } from "../channel";
import { toBigInt } from "../json";
import { TcfChannel, TcfError, formatTcfError } from "@/tcf/channel";
import { toBigInt } from "@/tcf/json";

/** Memory context properties, see TCF Services -> Memory. */
export interface MemoryContext {
Expand Down
2 changes: 1 addition & 1 deletion src/tcf/services/memoryMap.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TcfChannel } from "../channel";
import { TcfChannel } from "@/tcf/channel";

/** Memory map region properties, see TCF Services -> Memory Map. */
export interface MemoryRegionProperties {
Expand Down
2 changes: 1 addition & 1 deletion src/tcf/services/pathMap.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TcfChannel } from "../channel";
import { TcfChannel } from "@/tcf/channel";

/** Path map rule properties, see TCF Services -> Path Map. */
export interface PathMapRuleProperties {
Expand Down
2 changes: 1 addition & 1 deletion src/tcf/services/registers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TcfChannel } from "../channel";
import { TcfChannel } from "@/tcf/channel";

export interface NamedValue {
Name?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/tcf/services/runControl.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TcfChannel } from "../channel";
import { TcfChannel } from "@/tcf/channel";

/** RunControl context properties, see TCF Services -> Run Control. */
export interface RunControlContext {
Expand Down
2 changes: 1 addition & 1 deletion src/tcf/services/stackTrace.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TcfChannel, TcfError, formatTcfError } from "../channel";
import { TcfChannel, TcfError, formatTcfError } from "@/tcf/channel";
import { CodeArea } from "./lineNumbers";

/** Stack frame context properties, see TCF Services -> Stack Trace. */
Expand Down
2 changes: 1 addition & 1 deletion src/tcf/services/symbols.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TcfChannel } from "../channel";
import { TcfChannel } from "@/tcf/channel";

/** Symbol classes, see TCF Services -> Symbols -> SymbolClass. */
export const enum SymbolClass {
Expand Down
10 changes: 5 additions & 5 deletions src/test/breakpointManager.test.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { test } from "node:test";
import assert from "node:assert/strict";
import { BreakpointHost, BreakpointManager, parseHitCondition } from "../breakpointManager";
import { instructionReference } from "../disassembly";
import { formatFunctionBreakpointName, parseFunctionBreakpointName } from "../functionBreakpoint";
import { PathMapper } from "../pathMapper";
import { BreakpointHost, BreakpointManager, parseHitCondition } from "@/breakpointManager";
import { instructionReference } from "@/disassembly";
import { formatFunctionBreakpointName, parseFunctionBreakpointName } from "@/functionBreakpoint";
import { PathMapper } from "@/pathMapper";
import {
BreakpointCapabilities,
BreakpointProperties,
BreakpointStatus,
BreakpointsService,
} from "../tcf/services/breakpoints";
} from "@/tcf/services/breakpoints";

// TCF ignores the first IgnoreCount hits, so "N" means ignore N-1 hits.
// Zero and extra spaces are allowed.
Expand Down
2 changes: 1 addition & 1 deletion src/test/callStackFrame.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test } from "node:test";
import assert from "node:assert/strict";
import { parseCallStackContext } from "../callStackFrame";
import { parseCallStackContext } from "@/callStackFrame";

test("parseCallStackContext reads the thread and frame index", () => {
assert.deepEqual(
Expand Down
4 changes: 2 additions & 2 deletions src/test/channel.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { test } from "node:test";
import assert from "node:assert/strict";
import * as net from "net";
import { MessageReader, TcfChannel, TraceMessage, encodeMessage, formatTcfError, stringifyJson } from "../tcf/channel";
import { parseJson, toBigInt } from "../tcf/json";
import { MessageReader, TcfChannel, TraceMessage, encodeMessage, formatTcfError, stringifyJson } from "@/tcf/channel";
import { parseJson, toBigInt } from "@/tcf/json";

const ESC = 3;

Expand Down
6 changes: 3 additions & 3 deletions src/test/disassembly.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {
DisassemblyCache,
KnownInstructionStarts,
parseInstructionReference,
} from "../disassembly";
import { TcfError } from "../tcf/channel";
import { DisassemblyLine } from "../tcf/services/disassembly";
} from "@/disassembly";
import { TcfError } from "@/tcf/channel";
import { DisassemblyLine } from "@/tcf/services/disassembly";

const NOP = Buffer.from([0x90, 0x90, 0x90, 0x90]).toString("base64");

Expand Down
2 changes: 1 addition & 1 deletion src/test/expressions.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test } from "node:test";
import assert from "node:assert/strict";
import { TypeClass, ValueProperties, formatExpressionValue } from "../tcf/services/expressions";
import { TypeClass, ValueProperties, formatExpressionValue } from "@/tcf/services/expressions";

function format(bytes: number[], properties: ValueProperties): string {
return formatExpressionValue({ bytes: Buffer.from(bytes), properties });
Expand Down
2 changes: 1 addition & 1 deletion src/test/functionHeaders.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
functionHeaderLine,
functionHeaderSource,
functionHeaderText,
} from "../functionHeaders";
} from "@/functionHeaders";

/** Lookup over fixed functions, counting the addresses asked for. */
function fakeLookup(functions: FunctionInfo[]) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/fuzzing.test.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import "../fuzz/fuzzing.test";
import "@/fuzz/fuzzing.test";
2 changes: 1 addition & 1 deletion src/test/launchJson.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
setPathMapRules,
setNamedConfigurationValue,
uniqueName,
} from "../launchSettings/launchJson";
} from "@/launchSettings/launchJson";

const LAUNCH = `{
// Comment at the top.
Expand Down
4 changes: 2 additions & 2 deletions src/test/pathMapper.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {
parsePathMapConfig,
pathMapProblems,
pathMapContextQuery,
} from "../pathMapper";
import { PathMapRuleProperties, PathMapService } from "../tcf/services/pathMap";
} from "@/pathMapper";
import { PathMapRuleProperties, PathMapService } from "@/tcf/services/pathMap";

function fakePathMapService(agentRules: PathMapRuleProperties[] | Error) {
const sets: PathMapRuleProperties[][] = [];
Expand Down
4 changes: 2 additions & 2 deletions src/test/schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import {
parseInput,
toggleChoice,
valueAtPath,
} from "../launchSettings/schema";
import { DEFAULT_TRACE_SILENCE } from "../tcf/traceSilence";
} from "@/launchSettings/schema";
import { DEFAULT_TRACE_SILENCE } from "@/tcf/traceSilence";

// The bundled test runs from out/test.
const PACKAGE_JSON: unknown = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "..", "package.json"), "utf8"));
Expand Down
4 changes: 2 additions & 2 deletions src/test/simicsConsole.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import {
isEmptySession,
simicsCliOptions,
trimHistory,
} from "../simicsConsole";
import { TcfError } from "../tcf/channel";
} from "@/simicsConsole";
import { TcfError } from "@/tcf/channel";

const SHIFT = 1;
const CTRL = 2;
Expand Down
4 changes: 2 additions & 2 deletions src/test/symbolFiles.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
describeForeignSymbolFile,
formatSymbolFileAddress,
parseSymbolFilesConfig,
} from "../symbolFiles";
import { MemoryMapService, MemoryRegionProperties } from "../tcf/services/memoryMap";
} from "@/symbolFiles";
import { MemoryMapService, MemoryRegionProperties } from "@/tcf/services/memoryMap";

// No setting gives no files and no errors. A setting that is not a list
// is an error.
Expand Down
10 changes: 5 additions & 5 deletions src/test/targetMemory.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ import {
inspectBytes,
parseAddress,
setNibble,
} from "../shared/targetMemory/format";
import { encodeNeedle } from "../shared/targetMemory/needle";
} from "@/shared/targetMemory/format";
import { encodeNeedle } from "@/shared/targetMemory/needle";
import {
findInChunk,
planChunks,
scanMemory,
type ScanRead,
type SearchDirection,
} from "../shared/targetMemory/search";
import { ByteState, MemoryCache } from "../webview/targetMemory/memoryCache";
import type { FromWebview } from "../shared/targetMemory/protocol";
} from "@/shared/targetMemory/search";
import { ByteState, MemoryCache } from "@/webview/targetMemory/memoryCache";
import type { FromWebview } from "@/shared/targetMemory/protocol";

const bytes = (...b: number[]) => Uint8Array.from(b);

Expand Down
6 changes: 3 additions & 3 deletions src/test/targetMemoryAdapter.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { test } from "node:test";
import assert from "node:assert/strict";
import type { DebugProtocol } from "@vscode/debugprotocol";
import { TcfDebugSession } from "../tcfDebugSession";
import type { MemoryReadResult } from "../tcf/services/memory";
import * as req from "../tcfRequests";
import { TcfDebugSession } from "@/tcfDebugSession";
import type { MemoryReadResult } from "@/tcf/services/memory";
import * as req from "@/tcfRequests";

/** A debug session with a fake Memory service holding `data` at `base`. */
function sessionWithMemory(
Expand Down
8 changes: 4 additions & 4 deletions src/test/tcfDebugSession.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { test } from "node:test";
import assert from "node:assert/strict";
import { TcfDebugSession, formatRegisterValue, selectStepMode } from "../tcfDebugSession";
import { ResumeMode } from "../tcf/services/runControl";
import { TcfDebugSession, formatRegisterValue, selectStepMode } from "@/tcfDebugSession";
import { ResumeMode } from "@/tcf/services/runControl";
import type { DebugProtocol } from "@vscode/debugprotocol";
import type { LineNumbersService } from "../tcf/services/lineNumbers";
import { PathMapper } from "../pathMapper";
import type { LineNumbersService } from "@/tcf/services/lineNumbers";
import { PathMapper } from "@/pathMapper";
import * as fs from "fs";
import * as os from "os";
import * as path from "path";
Expand Down
4 changes: 2 additions & 2 deletions src/test/traceSilence.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { test } from "node:test";
import assert from "node:assert/strict";
import type { TraceMessage } from "../tcf/channel";
import { DEFAULT_TRACE_SILENCE, TraceSilenceRule, isSilenced, parseTraceSilence } from "../tcf/traceSilence";
import type { TraceMessage } from "@/tcf/channel";
import { DEFAULT_TRACE_SILENCE, TraceSilenceRule, isSilenced, parseTraceSilence } from "@/tcf/traceSilence";

// The default keeps the trace to the debugger's own traffic: no heartbeats or
// other peer events, and nothing from the Simics console.
Expand Down
4 changes: 2 additions & 2 deletions src/webview/targetMemory/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
formatGroup,
asciiChar,
hexString,
} from "../../shared/targetMemory/format";
} from "@/shared/targetMemory/format";
import {
DEFAULT_SETTINGS,
type ContextMenuCommand,
Expand All @@ -15,7 +15,7 @@ import {
type PanelSettings,
type TargetState,
type ToWebview,
} from "../../shared/targetMemory/protocol";
} from "@/shared/targetMemory/protocol";
import { MemoryCache } from "./memoryCache";
import { onMessage, post } from "./vscode";
import { GridHeader, MemoryGrid, selectionRange, type GridHandle, type Selection } from "./components/MemoryGrid";
Expand Down
8 changes: 4 additions & 4 deletions src/webview/targetMemory/components/FindWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ import {
hexString,
parseAddress,
type Endianness,
} from "../../../shared/targetMemory/format";
} from "@/shared/targetMemory/format";
import {
INT_SIZES,
encodeNeedle,
type EncodeResult,
type FindFormat,
type IntSize,
} from "../../../shared/targetMemory/needle";
import { DEFAULT_SETTINGS, type FindSettings } from "../../../shared/targetMemory/protocol";
import type { SearchDirection } from "../../../shared/targetMemory/search";
} from "@/shared/targetMemory/needle";
import { DEFAULT_SETTINGS, type FindSettings } from "@/shared/targetMemory/protocol";
import type { SearchDirection } from "@/shared/targetMemory/search";
import { IconButton, Segmented } from "./controls";

export type FindStatus =
Expand Down
4 changes: 2 additions & 2 deletions src/webview/targetMemory/components/MemoryGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {
hexString,
setNibble,
type Endianness,
} from "../../../shared/targetMemory/format";
import { ByteState, type MemoryCache } from "../memoryCache";
} from "@/shared/targetMemory/format";
import { ByteState, type MemoryCache } from "@/webview/targetMemory/memoryCache";

export const ROW_HEIGHT = 20;
/**
Expand Down
Loading