mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Remove getdisassemble as it is not used from DebugService
This commit is contained in:
parent
7fb6a2ef1c
commit
c4920642ce
|
@ -378,7 +378,7 @@ viewsRegistry.registerViews([{ id: BREAKPOINTS_VIEW_ID, name: nls.localize('brea
|
|||
viewsRegistry.registerViews([{ id: WelcomeView.ID, name: WelcomeView.LABEL, containerIcon: icons.runViewIcon, ctorDescriptor: new SyncDescriptor(WelcomeView), order: 1, weight: 40, canToggleVisibility: true, when: CONTEXT_DEBUG_UX.isEqualTo('simple') }], viewContainer);
|
||||
viewsRegistry.registerViews([{ id: LOADED_SCRIPTS_VIEW_ID, name: nls.localize('loadedScripts', "Loaded Scripts"), containerIcon: icons.loadedScriptsViewIcon, ctorDescriptor: new SyncDescriptor(LoadedScriptsView), order: 35, weight: 5, canToggleVisibility: true, canMoveView: true, collapsed: true, when: ContextKeyExpr.and(CONTEXT_LOADED_SCRIPTS_SUPPORTED, CONTEXT_DEBUG_UX.isEqualTo('default')) }], viewContainer);
|
||||
|
||||
// Register disassembly editor
|
||||
// Register disassembly view
|
||||
|
||||
Registry.as<IEditorPaneRegistry>(EditorExtensions.EditorPane).registerEditorPane(
|
||||
EditorPaneDescriptor.create(DisassemblyView, DISASSEMBLY_VIEW_ID, nls.localize('disassembly', "Disassembly")),
|
||||
|
|
|
@ -1012,26 +1012,6 @@ export class DebugService implements IDebugService {
|
|||
await this.sendExceptionBreakpoints(session);
|
||||
}
|
||||
|
||||
async getDisassemble(offset: number, instructionOffset: number, instructionCount: number): Promise<any> {
|
||||
const session = this.getViewModel().focusedSession;
|
||||
if (session) {
|
||||
const frame = this.getViewModel().focusedStackFrame;
|
||||
if (frame?.instructionPointerReference) {
|
||||
return session.disassemble(frame?.instructionPointerReference, offset, instructionOffset, instructionCount);
|
||||
}
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
const result: DebugProtocol.DisassembledInstruction[] = [];
|
||||
|
||||
for (let i = 0; i < instructionCount; i++) {
|
||||
result.push({ address: `${i + offset}`, instruction: `debugger is not available.` });
|
||||
}
|
||||
|
||||
resolve(result);
|
||||
});
|
||||
}
|
||||
|
||||
private async sendBreakpoints(modelUri: uri, sourceModified = false, session?: IDebugSession): Promise<void> {
|
||||
const breakpointsToSend = this.model.getBreakpoints({ uri: modelUri, enabledOnly: true });
|
||||
await sendToOneOrAllSessions(this.model, session, s => s.sendBreakpoints(modelUri, breakpointsToSend, sourceModified));
|
||||
|
|
|
@ -906,6 +906,7 @@ export interface IDebugService {
|
|||
|
||||
/**
|
||||
* Removes all instruction breakpoints. If address is passed only removes the instruction breakpoint with the passed address.
|
||||
* The address should be the address string supplied by the debugger from the "Disassemble" request.
|
||||
* Notifies debug adapter of breakpoint changes.
|
||||
*/
|
||||
removeInstructionBreakpoints(address?: string): Promise<void>;
|
||||
|
@ -965,8 +966,6 @@ export interface IDebugService {
|
|||
*/
|
||||
sourceIsNotAvailable(uri: uri): void;
|
||||
|
||||
getDisassemble(offset: number, instructionOffset: number, instructionCount: number): Promise<any>;
|
||||
|
||||
/**
|
||||
* Gets the current debug model.
|
||||
*/
|
||||
|
|
|
@ -157,10 +157,6 @@ export class MockDebugService implements IDebugService {
|
|||
throw new Error('not implemented');
|
||||
}
|
||||
|
||||
getDisassemble(offset: number, instructionOffset: number, instructionCount: number): Promise<any> {
|
||||
throw new Error('not implemented');
|
||||
}
|
||||
|
||||
logToRepl(session: IDebugSession, value: string): void { }
|
||||
|
||||
sourceIsNotAvailable(uri: uri): void { }
|
||||
|
|
Loading…
Reference in a new issue