Skip to content

Commit

Permalink
Fix a few typos
Browse files Browse the repository at this point in the history
  • Loading branch information
planger committed Apr 24, 2024
1 parent 36b8d0e commit 380351a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/plugin/adapter-registry/adapter-capabilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface AdapterCapabilities {
getVariables?(session: vscode.DebugSession): Promise<VariableRange[]>;
/** Resolve symbols resident in the memory at the specified range. Will be preferred to {@link getVariables} if present. */
getResidents?(session: vscode.DebugSession, params: DebugProtocol.ReadMemoryArguments): Promise<VariableRange[]>;
/** Resolves the address of a given variable in bytes withthe current context. */
/** Resolves the address of a given variable in bytes with the current context. */
getAddressOfVariable?(session: vscode.DebugSession, variableName: string): Promise<string | undefined>;
/** Resolves the size of a given variable in bytes within the current context. */
getSizeOfVariable?(session: vscode.DebugSession, variableName: string): Promise<bigint | undefined>;
Expand All @@ -48,7 +48,7 @@ export function extractDecimalAddress(text?: string): string | undefined {
}

export function extractAddress(text?: string): string | undefined {
// search for hex address first as a hex adress (0x12345678) also matches an integer address (12345678)
// search for hex address first as a hex address (0x12345678) also matches an integer address (12345678)
return text ? extractHexAddress(text) ?? extractDecimalAddress(text) : undefined;
}

Expand Down
6 changes: 3 additions & 3 deletions src/plugin/memory-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,17 @@ export class MemoryProvider {
/** Returns the session if the capability is present, otherwise throws. */
protected assertCapability(capability: keyof DebugProtocol.Capabilities, action: string): vscode.DebugSession {
const session = this.assertActiveSession(action);
if (!this.hasDebugCapabilitiy(session, capability)) {
if (!this.hasDebugCapability(session, capability)) {
throw new Error(`Cannot ${action}. Session does not have capability ${capability}.`);
}
return session;
}

protected hasDebugCapabilitiy(session: vscode.DebugSession, capability: keyof DebugProtocol.Capabilities): boolean {
protected hasDebugCapability(session: vscode.DebugSession, capability: keyof DebugProtocol.Capabilities): boolean {
return !!this.sessionDebugCapabilities.get(session.id)?.[capability];
}

protected hasClientCapabilitiy(session: vscode.DebugSession, capability: keyof DebugProtocol.InitializeRequestArguments): boolean {
protected hasClientCapability(session: vscode.DebugSession, capability: keyof DebugProtocol.InitializeRequestArguments): boolean {
return !!this.sessionClientCapabilities.get(session.id)?.[capability];
}

Expand Down

0 comments on commit 380351a

Please sign in to comment.