Skip to content

probe-web / @probe-web/client / index / Core

Class: Core

Defined in: index.ts:779

Direct control of one core, without the debugger's bookkeeping. Get one from Session.core. For breakpoints, stepping and variables use Session.debugger.

Methods

halt()

ts
halt(timeoutMs?): Promise<WireCoreInformation>;

Defined in: index.ts:793

Halt the core, waiting up to timeoutMs. Resolves with the program counter.

Parameters

ParameterTypeDefault value
timeoutMsnumber500

Returns

Promise<WireCoreInformation>


run()

ts
run(): Promise<void>;

Defined in: index.ts:797

Resume the core.

Returns

Promise<void>


status()

ts
status(): Promise<WireCoreStatus>;

Defined in: index.ts:799

Whether the core is running, halted (and why), sleeping or locked up.

Returns

Promise<WireCoreStatus>


reset()

ts
reset(): Promise<void>;

Defined in: index.ts:801

Reset the core and let it run.

Returns

Promise<void>


resetAndHalt()

ts
resetAndHalt(timeoutMs?): Promise<WireCoreInformation>;

Defined in: index.ts:803

Reset the core and halt it at the reset vector, waiting up to timeoutMs.

Parameters

ParameterTypeDefault value
timeoutMsnumber500

Returns

Promise<WireCoreInformation>


readMemory8()

ts
readMemory8(address, count): Promise<Uint8Array<ArrayBufferLike>>;

Defined in: index.ts:807

Read count bytes starting at address.

Parameters

ParameterType
addressnumber | bigint
countnumber

Returns

Promise<Uint8Array<ArrayBufferLike>>


readMemory32()

ts
readMemory32(address, count): Promise<Uint32Array<ArrayBufferLike>>;

Defined in: index.ts:811

Read count 32-bit words starting at address (which must be word aligned).

Parameters

ParameterType
addressnumber | bigint
countnumber

Returns

Promise<Uint32Array<ArrayBufferLike>>


writeMemory8()

ts
writeMemory8(address, data): Promise<void>;

Defined in: index.ts:815

Write bytes starting at address.

Parameters

ParameterType
addressnumber | bigint
dataUint8Array

Returns

Promise<void>


writeMemory32()

ts
writeMemory32(address, data): Promise<void>;

Defined in: index.ts:819

Write 32-bit words starting at address (which must be word aligned).

Parameters

ParameterType
addressnumber | bigint
dataUint32Array

Returns

Promise<void>


dumpCore()

ts
dumpCore(ranges): Promise<WireCoreDump>;

Defined in: index.ts:830

Registers plus the memory in ranges, as structured data.

Ranges are [start, end) pairs. Reading is not free — the memory comes back over the probe — so ask for the regions you care about, typically the stack and any RAM a postmortem needs.

Parameters

ParameterType
ranges[number | bigint, number | bigint][]

Returns

Promise<WireCoreDump>


dumpCoreFile()

ts
dumpCoreFile(ranges): Promise<Uint8Array<ArrayBufferLike>>;

Defined in: index.ts:840

The same snapshot as a coredump file, in the encoding native probe-rs reads.

Pair it with downloadBytes from @probe-web/artifacts to save it, then open it with the usual tools — a dump taken in a browser is not a dead end.

Parameters

ParameterType
ranges[number | bigint, number | bigint][]

Returns

Promise<Uint8Array<ArrayBufferLike>>