@codingame/monaco-vscode-debug-service-override 25.1.1 → 26.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/platform/debug/common/extensionHostDebugIpc.js +41 -29
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +379 -255
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +606 -325
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +132 -91
- package/vscode/src/vs/workbench/contrib/debug/browser/debugChatIntegration.js +105 -103
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +258 -147
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +14 -10
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +163 -121
- package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +92 -41
- package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +13 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +68 -39
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +290 -214
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +409 -260
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSettingMigration.js +14 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +19 -21
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +126 -100
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.js +8 -9
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +160 -89
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +87 -71
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +270 -181
- package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.js +79 -48
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +149 -113
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debugViewlet.css +24 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +201 -189
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibilityHelp.js +28 -35
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibleView.js +10 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/runAndDebugAccessibilityHelp.js +66 -86
- package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +24 -31
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +177 -138
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +55 -33
- package/vscode/src/vs/workbench/contrib/debug/common/breakpoints.js +2 -4
- package/vscode/src/vs/workbench/contrib/debug/common/debugAccessibilityAnnouncer.js +8 -12
- package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +23 -19
- package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +9 -15
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +156 -133
- package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +81 -52
- package/vscode/src/vs/workbench/contrib/debug/common/debugTelemetry.js +3 -5
- package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +22 -14
- package/vscode/src/vs/workbench/contrib/debug/common/debugVisualizers.js +46 -30
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +74 -52
- package/vscode/src/vs/workbench/contrib/debug/common/replAccessibilityAnnouncer.js +11 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +7 -7
|
@@ -58,19 +58,34 @@ const disassemblyNotAvailable = {
|
|
|
58
58
|
allowBreakpoint: false,
|
|
59
59
|
isBreakpointSet: false,
|
|
60
60
|
isBreakpointEnabled: false,
|
|
61
|
-
instructionReference:
|
|
61
|
+
instructionReference: "",
|
|
62
62
|
instructionOffset: 0,
|
|
63
63
|
instructionReferenceOffset: 0,
|
|
64
64
|
address: 0n,
|
|
65
65
|
instruction: {
|
|
66
|
-
address:
|
|
67
|
-
instruction: ( localize(
|
|
68
|
-
}
|
|
66
|
+
address: "-1",
|
|
67
|
+
instruction: ( localize(7244, "Disassembly not available."))
|
|
68
|
+
}
|
|
69
69
|
};
|
|
70
70
|
let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
71
|
-
static {
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
static {
|
|
72
|
+
DisassemblyView_1 = this;
|
|
73
|
+
}
|
|
74
|
+
static {
|
|
75
|
+
this.NUM_INSTRUCTIONS_TO_LOAD = 50;
|
|
76
|
+
}
|
|
77
|
+
constructor(
|
|
78
|
+
group,
|
|
79
|
+
telemetryService,
|
|
80
|
+
themeService,
|
|
81
|
+
storageService,
|
|
82
|
+
_configurationService,
|
|
83
|
+
_instantiationService,
|
|
84
|
+
_debugService,
|
|
85
|
+
_contextMenuService,
|
|
86
|
+
menuService,
|
|
87
|
+
contextKeyService
|
|
88
|
+
) {
|
|
74
89
|
super(DISASSEMBLY_VIEW_ID, group, telemetryService, themeService, storageService);
|
|
75
90
|
this._configurationService = _configurationService;
|
|
76
91
|
this._instantiationService = _instantiationService;
|
|
@@ -83,15 +98,16 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
|
83
98
|
this.menu = menuService.createMenu(MenuId.DebugDisassemblyContext, contextKeyService);
|
|
84
99
|
this._register(this.menu);
|
|
85
100
|
this._disassembledInstructions = undefined;
|
|
86
|
-
this._onDidChangeStackFrame = this._register(( new Emitter({
|
|
101
|
+
this._onDidChangeStackFrame = this._register(( new Emitter({
|
|
102
|
+
leakWarningThreshold: 1000
|
|
103
|
+
})));
|
|
87
104
|
this._previousDebuggingState = _debugService.state;
|
|
88
105
|
this._register(_configurationService.onDidChangeConfiguration(e => {
|
|
89
|
-
if (e.affectsConfiguration(
|
|
90
|
-
const newValue = this._configurationService.getValue(
|
|
106
|
+
if (e.affectsConfiguration("debug")) {
|
|
107
|
+
const newValue = this._configurationService.getValue("debug").disassemblyView.showSourceCode;
|
|
91
108
|
if (this._enableSourceCodeRender !== newValue) {
|
|
92
109
|
this._enableSourceCodeRender = newValue;
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
110
|
+
} else {
|
|
95
111
|
this._disassembledInstructions?.rerender();
|
|
96
112
|
}
|
|
97
113
|
}
|
|
@@ -101,7 +117,7 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
|
101
117
|
if (!this._fontInfo) {
|
|
102
118
|
this._fontInfo = this.createFontInfo();
|
|
103
119
|
this._register(this._configurationService.onDidChangeConfiguration(e => {
|
|
104
|
-
if (e.affectsConfiguration(
|
|
120
|
+
if (e.affectsConfiguration("editor")) {
|
|
105
121
|
this._fontInfo = this.createFontInfo();
|
|
106
122
|
}
|
|
107
123
|
}));
|
|
@@ -109,15 +125,13 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
|
109
125
|
return this._fontInfo;
|
|
110
126
|
}
|
|
111
127
|
createFontInfo() {
|
|
112
|
-
return createBareFontInfoFromRawSettings(
|
|
128
|
+
return createBareFontInfoFromRawSettings(
|
|
129
|
+
this._configurationService.getValue("editor"),
|
|
130
|
+
PixelRatio.getInstance(this.window).value
|
|
131
|
+
);
|
|
113
132
|
}
|
|
114
133
|
get currentInstructionAddresses() {
|
|
115
|
-
return ( ( ( ( this._debugService.getModel().getSessions(false).
|
|
116
|
-
map(session => session.getAllThreads())).
|
|
117
|
-
reduce((prev, curr) => prev.concat(curr), []).
|
|
118
|
-
map(thread => thread.getTopStackFrame())).
|
|
119
|
-
map(frame => frame?.instructionPointerReference)).
|
|
120
|
-
map(ref => ref ? this.getReferenceAddress(ref) : undefined));
|
|
134
|
+
return ( ( ( ( this._debugService.getModel().getSessions(false).map(session => session.getAllThreads())).reduce((prev, curr) => prev.concat(curr), []).map(thread => thread.getTopStackFrame())).map(frame => frame?.instructionPointerReference)).map(ref => ref ? this.getReferenceAddress(ref) : undefined));
|
|
121
135
|
}
|
|
122
136
|
get focusedCurrentInstructionReference() {
|
|
123
137
|
return this._debugService.getViewModel().focusedStackFrame?.thread.getTopStackFrame()?.instructionPointerReference;
|
|
@@ -133,11 +147,15 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
|
133
147
|
const ref = this.focusedInstructionReference;
|
|
134
148
|
return ref ? this.getReferenceAddress(ref) : undefined;
|
|
135
149
|
}
|
|
136
|
-
get isSourceCodeRender() {
|
|
150
|
+
get isSourceCodeRender() {
|
|
151
|
+
return this._enableSourceCodeRender;
|
|
152
|
+
}
|
|
137
153
|
get debugSession() {
|
|
138
154
|
return this._debugService.getViewModel().focusedSession;
|
|
139
155
|
}
|
|
140
|
-
get onDidChangeStackFrame() {
|
|
156
|
+
get onDidChangeStackFrame() {
|
|
157
|
+
return this._onDidChangeStackFrame.event;
|
|
158
|
+
}
|
|
141
159
|
get focusedAddressAndOffset() {
|
|
142
160
|
const element = this._disassembledInstructions?.getFocusedElements()[0];
|
|
143
161
|
if (!element) {
|
|
@@ -148,10 +166,14 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
|
148
166
|
getAddressAndOffset(element) {
|
|
149
167
|
const reference = element.instructionReference;
|
|
150
168
|
const offset = Number(element.address - this.getReferenceAddress(reference));
|
|
151
|
-
return {
|
|
169
|
+
return {
|
|
170
|
+
reference,
|
|
171
|
+
offset,
|
|
172
|
+
address: element.address
|
|
173
|
+
};
|
|
152
174
|
}
|
|
153
175
|
createEditor(parent) {
|
|
154
|
-
this._enableSourceCodeRender = this._configurationService.getValue(
|
|
176
|
+
this._enableSourceCodeRender = this._configurationService.getValue("debug").disassemblyView.showSourceCode;
|
|
155
177
|
const lineHeight = this.fontInfo.lineHeight;
|
|
156
178
|
const thisOM = this;
|
|
157
179
|
const delegate = new (class {
|
|
@@ -162,48 +184,52 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
|
162
184
|
if (thisOM.isSourceCodeRender && row.showSourceLocation && row.instruction.location?.path && row.instruction.line) {
|
|
163
185
|
if (row.instruction.endLine) {
|
|
164
186
|
return lineHeight * Math.max(2, (row.instruction.endLine - row.instruction.line + 2));
|
|
165
|
-
}
|
|
166
|
-
else {
|
|
187
|
+
} else {
|
|
167
188
|
return lineHeight * 2;
|
|
168
189
|
}
|
|
169
190
|
}
|
|
170
191
|
return lineHeight;
|
|
171
192
|
}
|
|
172
|
-
});
|
|
193
|
+
})();
|
|
173
194
|
const instructionRenderer = this._register(this._instantiationService.createInstance(InstructionRenderer, this));
|
|
174
|
-
this._disassembledInstructions = this._register(
|
|
175
|
-
{
|
|
176
|
-
label:
|
|
177
|
-
tooltip:
|
|
195
|
+
this._disassembledInstructions = this._register(
|
|
196
|
+
this._instantiationService.createInstance(WorkbenchTable, "DisassemblyView", parent, delegate, [{
|
|
197
|
+
label: "",
|
|
198
|
+
tooltip: "",
|
|
178
199
|
weight: 0,
|
|
179
200
|
minimumWidth: this.fontInfo.lineHeight,
|
|
180
201
|
maximumWidth: this.fontInfo.lineHeight,
|
|
181
202
|
templateId: BreakpointRenderer.TEMPLATE_ID,
|
|
182
|
-
project(row) {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
203
|
+
project(row) {
|
|
204
|
+
return row;
|
|
205
|
+
}
|
|
206
|
+
}, {
|
|
207
|
+
label: ( localize(7245, "instructions")),
|
|
208
|
+
tooltip: "",
|
|
187
209
|
weight: 0.3,
|
|
188
210
|
templateId: InstructionRenderer.TEMPLATE_ID,
|
|
189
|
-
project(row) {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
211
|
+
project(row) {
|
|
212
|
+
return row;
|
|
213
|
+
}
|
|
214
|
+
}], [
|
|
215
|
+
this._instantiationService.createInstance(BreakpointRenderer, this),
|
|
216
|
+
instructionRenderer
|
|
217
|
+
], {
|
|
218
|
+
identityProvider: {
|
|
219
|
+
getId: e => e.instruction.address
|
|
220
|
+
},
|
|
221
|
+
horizontalScrolling: false,
|
|
222
|
+
overrideStyles: {
|
|
223
|
+
listBackground: editorBackground
|
|
224
|
+
},
|
|
225
|
+
multipleSelectionSupport: false,
|
|
226
|
+
setRowLineHeight: false,
|
|
227
|
+
openOnSingleClick: false,
|
|
228
|
+
accessibilityProvider: ( new AccessibilityProvider()),
|
|
229
|
+
mouseSupport: false
|
|
230
|
+
})
|
|
231
|
+
);
|
|
232
|
+
this._disassembledInstructions.domNode.classList.add("disassembly-view");
|
|
207
233
|
if (this.focusedInstructionReference) {
|
|
208
234
|
this.reloadDisassembly(this.focusedInstructionReference, 0);
|
|
209
235
|
}
|
|
@@ -217,19 +243,26 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
|
217
243
|
if (e.oldScrollTop > e.scrollTop && e.scrollTop < e.height) {
|
|
218
244
|
this._loadingLock = true;
|
|
219
245
|
const prevTop = Math.floor(e.scrollTop / this.fontInfo.lineHeight);
|
|
220
|
-
this.scrollUp_LoadDisassembledInstructions(DisassemblyView_1.NUM_INSTRUCTIONS_TO_LOAD).then(
|
|
246
|
+
this.scrollUp_LoadDisassembledInstructions(DisassemblyView_1.NUM_INSTRUCTIONS_TO_LOAD).then(loaded => {
|
|
221
247
|
if (loaded > 0) {
|
|
222
248
|
this._disassembledInstructions.reveal(prevTop + loaded, 0);
|
|
223
249
|
}
|
|
224
|
-
}).finally(() => {
|
|
225
|
-
|
|
226
|
-
|
|
250
|
+
}).finally(() => {
|
|
251
|
+
this._loadingLock = false;
|
|
252
|
+
});
|
|
253
|
+
} else if (e.oldScrollTop < e.scrollTop && e.scrollTop + e.height > e.scrollHeight - e.height) {
|
|
227
254
|
this._loadingLock = true;
|
|
228
|
-
this.scrollDown_LoadDisassembledInstructions(DisassemblyView_1.NUM_INSTRUCTIONS_TO_LOAD).finally(() => {
|
|
255
|
+
this.scrollDown_LoadDisassembledInstructions(DisassemblyView_1.NUM_INSTRUCTIONS_TO_LOAD).finally(() => {
|
|
256
|
+
this._loadingLock = false;
|
|
257
|
+
});
|
|
229
258
|
}
|
|
230
259
|
}));
|
|
231
260
|
this._register(this._disassembledInstructions.onContextMenu(e => this.onContextMenu(e)));
|
|
232
|
-
this._register(this._debugService.getViewModel().onDidFocusStackFrame((
|
|
261
|
+
this._register(this._debugService.getViewModel().onDidFocusStackFrame((
|
|
262
|
+
{
|
|
263
|
+
stackFrame
|
|
264
|
+
}
|
|
265
|
+
) => {
|
|
233
266
|
if (this._disassembledInstructions && stackFrame?.instructionPointerReference) {
|
|
234
267
|
this.goToInstructionAndOffset(stackFrame.instructionPointerReference, 0);
|
|
235
268
|
}
|
|
@@ -238,7 +271,7 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
|
238
271
|
this._register(this._debugService.getModel().onDidChangeBreakpoints(bpEvent => {
|
|
239
272
|
if (bpEvent && this._disassembledInstructions) {
|
|
240
273
|
let changed = false;
|
|
241
|
-
bpEvent.added?.forEach(
|
|
274
|
+
bpEvent.added?.forEach(bp => {
|
|
242
275
|
if (bp instanceof InstructionBreakpoint) {
|
|
243
276
|
const index = this.getIndexFromReferenceAndOffset(bp.instructionReference, bp.offset);
|
|
244
277
|
if (index >= 0) {
|
|
@@ -248,7 +281,7 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
|
248
281
|
}
|
|
249
282
|
}
|
|
250
283
|
});
|
|
251
|
-
bpEvent.removed?.forEach(
|
|
284
|
+
bpEvent.removed?.forEach(bp => {
|
|
252
285
|
if (bp instanceof InstructionBreakpoint) {
|
|
253
286
|
const index = this.getIndexFromReferenceAndOffset(bp.instructionReference, bp.offset);
|
|
254
287
|
if (index >= 0) {
|
|
@@ -257,7 +290,7 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
|
257
290
|
}
|
|
258
291
|
}
|
|
259
292
|
});
|
|
260
|
-
bpEvent.changed?.forEach(
|
|
293
|
+
bpEvent.changed?.forEach(bp => {
|
|
261
294
|
if (bp instanceof InstructionBreakpoint) {
|
|
262
295
|
const index = this.getIndexFromReferenceAndOffset(bp.instructionReference, bp.offset);
|
|
263
296
|
if (index >= 0) {
|
|
@@ -278,10 +311,9 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
|
278
311
|
}
|
|
279
312
|
}));
|
|
280
313
|
this._register(this._debugService.onDidChangeState(e => {
|
|
281
|
-
if ((e === State.Running || e === State.Stopped) &&
|
|
282
|
-
(this._previousDebuggingState !== State.Running && this._previousDebuggingState !== State.Stopped)) {
|
|
314
|
+
if ((e === State.Running || e === State.Stopped) && (this._previousDebuggingState !== State.Running && this._previousDebuggingState !== State.Stopped)) {
|
|
283
315
|
this.clear();
|
|
284
|
-
this._enableSourceCodeRender = this._configurationService.getValue(
|
|
316
|
+
this._enableSourceCodeRender = this._configurationService.getValue("debug").disassemblyView.showSourceCode;
|
|
285
317
|
}
|
|
286
318
|
this._previousDebuggingState = e;
|
|
287
319
|
this._onDidChangeStackFrame.fire();
|
|
@@ -293,7 +325,12 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
|
293
325
|
async goToInstructionAndOffset(instructionReference, offset, focus) {
|
|
294
326
|
let addr = this._referenceToMemoryAddress.get(instructionReference);
|
|
295
327
|
if (addr === undefined) {
|
|
296
|
-
await this.loadDisassembledInstructions(
|
|
328
|
+
await this.loadDisassembledInstructions(
|
|
329
|
+
instructionReference,
|
|
330
|
+
0,
|
|
331
|
+
-DisassemblyView_1.NUM_INSTRUCTIONS_TO_LOAD,
|
|
332
|
+
DisassemblyView_1.NUM_INSTRUCTIONS_TO_LOAD * 2
|
|
333
|
+
);
|
|
297
334
|
addr = this._referenceToMemoryAddress.get(instructionReference);
|
|
298
335
|
}
|
|
299
336
|
if (addr) {
|
|
@@ -324,14 +361,24 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
|
324
361
|
async scrollUp_LoadDisassembledInstructions(instructionCount) {
|
|
325
362
|
const first = this._disassembledInstructions?.row(0);
|
|
326
363
|
if (first) {
|
|
327
|
-
return this.loadDisassembledInstructions(
|
|
364
|
+
return this.loadDisassembledInstructions(
|
|
365
|
+
first.instructionReference,
|
|
366
|
+
first.instructionReferenceOffset,
|
|
367
|
+
first.instructionOffset - instructionCount,
|
|
368
|
+
instructionCount
|
|
369
|
+
);
|
|
328
370
|
}
|
|
329
371
|
return 0;
|
|
330
372
|
}
|
|
331
373
|
async scrollDown_LoadDisassembledInstructions(instructionCount) {
|
|
332
374
|
const last = this._disassembledInstructions?.row(this._disassembledInstructions?.length - 1);
|
|
333
375
|
if (last) {
|
|
334
|
-
return this.loadDisassembledInstructions(
|
|
376
|
+
return this.loadDisassembledInstructions(
|
|
377
|
+
last.instructionReference,
|
|
378
|
+
last.instructionReferenceOffset,
|
|
379
|
+
last.instructionOffset + 1,
|
|
380
|
+
instructionCount
|
|
381
|
+
);
|
|
335
382
|
}
|
|
336
383
|
return 0;
|
|
337
384
|
}
|
|
@@ -344,8 +391,7 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
|
344
391
|
try {
|
|
345
392
|
this._referenceToMemoryAddress.set(instructionReference, BigInt(s[0].address));
|
|
346
393
|
return true;
|
|
347
|
-
}
|
|
348
|
-
catch {
|
|
394
|
+
} catch {
|
|
349
395
|
return false;
|
|
350
396
|
}
|
|
351
397
|
}
|
|
@@ -373,7 +419,7 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
|
373
419
|
startLineNumber: instruction.line,
|
|
374
420
|
startColumn: instruction.column ?? 0,
|
|
375
421
|
endLineNumber: instruction.endLine ?? instruction.line,
|
|
376
|
-
endColumn: instruction.endColumn ?? 0
|
|
422
|
+
endColumn: instruction.endColumn ?? 0
|
|
377
423
|
};
|
|
378
424
|
if (!Range.equalsRange(currentLine, lastLine ?? null)) {
|
|
379
425
|
lastLine = currentLine;
|
|
@@ -383,9 +429,10 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
|
383
429
|
let address;
|
|
384
430
|
try {
|
|
385
431
|
address = BigInt(instruction.address);
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
|
|
432
|
+
} catch {
|
|
433
|
+
console.error(
|
|
434
|
+
`Could not parse disassembly address ${instruction.address} (in ${JSON.stringify(instruction)})`
|
|
435
|
+
);
|
|
389
436
|
continue;
|
|
390
437
|
}
|
|
391
438
|
if (address === -1n) {
|
|
@@ -399,7 +446,7 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
|
399
446
|
instructionReferenceOffset: offset,
|
|
400
447
|
instructionOffset: thisInstructionOffset,
|
|
401
448
|
instruction,
|
|
402
|
-
address
|
|
449
|
+
address
|
|
403
450
|
};
|
|
404
451
|
newEntries.push(entry);
|
|
405
452
|
if (offset === 0 && thisInstructionOffset === 0) {
|
|
@@ -417,7 +464,7 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
|
417
464
|
}
|
|
418
465
|
return {
|
|
419
466
|
enabled: p.enabled,
|
|
420
|
-
address: base + BigInt(p.offset || 0)
|
|
467
|
+
address: base + BigInt(p.offset || 0)
|
|
421
468
|
};
|
|
422
469
|
}));
|
|
423
470
|
if (refBaseAddress !== undefined) {
|
|
@@ -442,14 +489,15 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
|
442
489
|
const toDelete = end - start;
|
|
443
490
|
let lastLocated;
|
|
444
491
|
for (let i = start - 1; i >= 0; i--) {
|
|
445
|
-
const {
|
|
492
|
+
const {
|
|
493
|
+
instruction
|
|
494
|
+
} = da.row(i);
|
|
446
495
|
if (instruction.location && instruction.line !== undefined) {
|
|
447
496
|
lastLocated = instruction;
|
|
448
497
|
break;
|
|
449
498
|
}
|
|
450
499
|
}
|
|
451
|
-
const shouldShowLocation =
|
|
452
|
-
(!lastLocated || !sourcesEqual(instruction.location, lastLocated.location) || instruction.line !== lastLocated.line);
|
|
500
|
+
const shouldShowLocation = instruction => instruction.line !== undefined && instruction.location !== undefined && (!lastLocated || !sourcesEqual(instruction.location, lastLocated.location) || instruction.line !== lastLocated.line);
|
|
453
501
|
for (const entry of newEntries) {
|
|
454
502
|
if (shouldShowLocation(entry.instruction)) {
|
|
455
503
|
entry.showSourceLocation = true;
|
|
@@ -485,9 +533,25 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
|
485
533
|
this._loadingLock = true;
|
|
486
534
|
this.clear();
|
|
487
535
|
this._instructionBpList = this._debugService.getModel().getInstructionBreakpoints();
|
|
488
|
-
this.loadDisassembledInstructions(
|
|
536
|
+
this.loadDisassembledInstructions(
|
|
537
|
+
instructionReference,
|
|
538
|
+
offset,
|
|
539
|
+
-DisassemblyView_1.NUM_INSTRUCTIONS_TO_LOAD * 4,
|
|
540
|
+
DisassemblyView_1.NUM_INSTRUCTIONS_TO_LOAD * 8
|
|
541
|
+
).then(() => {
|
|
489
542
|
if (this._disassembledInstructions.length > 0) {
|
|
490
|
-
|
|
543
|
+
let targetIndex = undefined;
|
|
544
|
+
const refBaseAddress = this._referenceToMemoryAddress.get(instructionReference);
|
|
545
|
+
if (refBaseAddress !== undefined) {
|
|
546
|
+
const da = this._disassembledInstructions;
|
|
547
|
+
targetIndex = binarySearch2(da.length, i => Number(da.row(i).address - refBaseAddress));
|
|
548
|
+
if (targetIndex < 0) {
|
|
549
|
+
targetIndex = ~targetIndex;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
if (targetIndex === undefined) {
|
|
553
|
+
targetIndex = Math.floor(this._disassembledInstructions.length / 2);
|
|
554
|
+
}
|
|
491
555
|
this._disassembledInstructions.reveal(targetIndex, 0.5);
|
|
492
556
|
this._disassembledInstructions.domFocus();
|
|
493
557
|
this._disassembledInstructions.setFocus([targetIndex]);
|
|
@@ -500,7 +564,9 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
|
500
564
|
this._disassembledInstructions?.splice(0, this._disassembledInstructions.length, [disassemblyNotAvailable]);
|
|
501
565
|
}
|
|
502
566
|
onContextMenu(e) {
|
|
503
|
-
const actions = getFlatContextMenuActions(this.menu.getActions({
|
|
567
|
+
const actions = getFlatContextMenuActions(this.menu.getActions({
|
|
568
|
+
shouldForwardArgs: true
|
|
569
|
+
}));
|
|
504
570
|
this._contextMenuService.showContextMenu({
|
|
505
571
|
getAnchor: () => e.anchor,
|
|
506
572
|
getActions: () => actions,
|
|
@@ -508,65 +574,71 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
|
508
574
|
});
|
|
509
575
|
}
|
|
510
576
|
};
|
|
511
|
-
DisassemblyView = DisassemblyView_1 = ( __decorate([
|
|
512
|
-
( __param(1, ITelemetryService)),
|
|
513
|
-
( __param(2, IThemeService)),
|
|
514
|
-
( __param(3, IStorageService)),
|
|
515
|
-
( __param(4, IConfigurationService)),
|
|
516
|
-
( __param(5, IInstantiationService)),
|
|
517
|
-
( __param(6, IDebugService)),
|
|
518
|
-
( __param(7, IContextMenuService)),
|
|
519
|
-
( __param(8, IMenuService)),
|
|
520
|
-
( __param(9, IContextKeyService))
|
|
521
|
-
], DisassemblyView));
|
|
577
|
+
DisassemblyView = DisassemblyView_1 = ( __decorate([( __param(1, ITelemetryService)), ( __param(2, IThemeService)), ( __param(3, IStorageService)), ( __param(4, IConfigurationService)), ( __param(5, IInstantiationService)), ( __param(6, IDebugService)), ( __param(7, IContextMenuService)), ( __param(8, IMenuService)), ( __param(9, IContextKeyService))], DisassemblyView));
|
|
522
578
|
let BreakpointRenderer = class BreakpointRenderer {
|
|
523
|
-
static {
|
|
524
|
-
|
|
579
|
+
static {
|
|
580
|
+
BreakpointRenderer_1 = this;
|
|
581
|
+
}
|
|
582
|
+
static {
|
|
583
|
+
this.TEMPLATE_ID = "breakpoint";
|
|
584
|
+
}
|
|
525
585
|
constructor(_disassemblyView, _debugService) {
|
|
526
586
|
this._disassemblyView = _disassemblyView;
|
|
527
587
|
this._debugService = _debugService;
|
|
528
588
|
this.templateId = BreakpointRenderer_1.TEMPLATE_ID;
|
|
529
|
-
this._breakpointIcon =
|
|
530
|
-
this._breakpointDisabledIcon =
|
|
531
|
-
this._breakpointHintIcon =
|
|
532
|
-
this._debugStackframe =
|
|
533
|
-
this._debugStackframeFocused =
|
|
589
|
+
this._breakpointIcon = "codicon-" + breakpoint.regular.id;
|
|
590
|
+
this._breakpointDisabledIcon = "codicon-" + breakpoint.disabled.id;
|
|
591
|
+
this._breakpointHintIcon = "codicon-" + debugBreakpointHint.id;
|
|
592
|
+
this._debugStackframe = "codicon-" + debugStackframe.id;
|
|
593
|
+
this._debugStackframeFocused = "codicon-" + debugStackframeFocused.id;
|
|
534
594
|
}
|
|
535
595
|
renderTemplate(container) {
|
|
536
|
-
container.style.alignSelf =
|
|
537
|
-
const icon = append(container, $(
|
|
538
|
-
icon.style.display =
|
|
539
|
-
icon.style.alignItems =
|
|
540
|
-
icon.style.justifyContent =
|
|
541
|
-
icon.style.height = this._disassemblyView.fontInfo.lineHeight +
|
|
542
|
-
const currentElement = {
|
|
596
|
+
container.style.alignSelf = "flex-end";
|
|
597
|
+
const icon = append(container, $(".codicon"));
|
|
598
|
+
icon.style.display = "flex";
|
|
599
|
+
icon.style.alignItems = "center";
|
|
600
|
+
icon.style.justifyContent = "center";
|
|
601
|
+
icon.style.height = this._disassemblyView.fontInfo.lineHeight + "px";
|
|
602
|
+
const currentElement = {
|
|
603
|
+
element: undefined
|
|
604
|
+
};
|
|
543
605
|
const disposables = [
|
|
544
606
|
this._disassemblyView.onDidChangeStackFrame(() => this.rerenderDebugStackframe(icon, currentElement.element)),
|
|
545
|
-
addStandardDisposableListener(container,
|
|
607
|
+
addStandardDisposableListener(container, "mouseover", () => {
|
|
546
608
|
if (currentElement.element?.allowBreakpoint) {
|
|
547
609
|
icon.classList.add(this._breakpointHintIcon);
|
|
548
610
|
}
|
|
549
611
|
}),
|
|
550
|
-
addStandardDisposableListener(container,
|
|
612
|
+
addStandardDisposableListener(container, "mouseout", () => {
|
|
551
613
|
if (currentElement.element?.allowBreakpoint) {
|
|
552
614
|
icon.classList.remove(this._breakpointHintIcon);
|
|
553
615
|
}
|
|
554
616
|
}),
|
|
555
|
-
addStandardDisposableListener(container,
|
|
617
|
+
addStandardDisposableListener(container, "click", () => {
|
|
556
618
|
if (currentElement.element?.allowBreakpoint) {
|
|
557
619
|
icon.classList.add(this._breakpointHintIcon);
|
|
558
620
|
const reference = currentElement.element.instructionReference;
|
|
559
|
-
const offset = Number(
|
|
621
|
+
const offset = Number(
|
|
622
|
+
currentElement.element.address - this._disassemblyView.getReferenceAddress(reference)
|
|
623
|
+
);
|
|
560
624
|
if (currentElement.element.isBreakpointSet) {
|
|
561
625
|
this._debugService.removeInstructionBreakpoints(reference, offset);
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
|
|
626
|
+
} else if (currentElement.element.allowBreakpoint && !currentElement.element.isBreakpointSet) {
|
|
627
|
+
this._debugService.addInstructionBreakpoint({
|
|
628
|
+
instructionReference: reference,
|
|
629
|
+
offset,
|
|
630
|
+
address: currentElement.element.address,
|
|
631
|
+
canPersist: false
|
|
632
|
+
});
|
|
565
633
|
}
|
|
566
634
|
}
|
|
567
635
|
})
|
|
568
636
|
];
|
|
569
|
-
return {
|
|
637
|
+
return {
|
|
638
|
+
currentElement,
|
|
639
|
+
icon,
|
|
640
|
+
disposables
|
|
641
|
+
};
|
|
570
642
|
}
|
|
571
643
|
renderElement(element, index, templateData) {
|
|
572
644
|
templateData.currentElement.element = element;
|
|
@@ -579,11 +651,9 @@ let BreakpointRenderer = class BreakpointRenderer {
|
|
|
579
651
|
rerenderDebugStackframe(icon, element) {
|
|
580
652
|
if (element?.address === this._disassemblyView.focusedCurrentInstructionAddress) {
|
|
581
653
|
icon.classList.add(this._debugStackframe);
|
|
582
|
-
}
|
|
583
|
-
else if (element?.address === this._disassemblyView.focusedInstructionAddress) {
|
|
654
|
+
} else if (element?.address === this._disassemblyView.focusedInstructionAddress) {
|
|
584
655
|
icon.classList.add(this._debugStackframeFocused);
|
|
585
|
-
}
|
|
586
|
-
else {
|
|
656
|
+
} else {
|
|
587
657
|
icon.classList.remove(this._debugStackframe);
|
|
588
658
|
icon.classList.remove(this._debugStackframeFocused);
|
|
589
659
|
}
|
|
@@ -592,27 +662,38 @@ let BreakpointRenderer = class BreakpointRenderer {
|
|
|
592
662
|
if (element.isBreakpointEnabled) {
|
|
593
663
|
icon.classList.add(this._breakpointIcon);
|
|
594
664
|
icon.classList.remove(this._breakpointDisabledIcon);
|
|
595
|
-
}
|
|
596
|
-
else {
|
|
665
|
+
} else {
|
|
597
666
|
icon.classList.remove(this._breakpointIcon);
|
|
598
667
|
icon.classList.add(this._breakpointDisabledIcon);
|
|
599
668
|
}
|
|
600
|
-
}
|
|
601
|
-
else {
|
|
669
|
+
} else {
|
|
602
670
|
icon.classList.remove(this._breakpointIcon);
|
|
603
671
|
icon.classList.remove(this._breakpointDisabledIcon);
|
|
604
672
|
}
|
|
605
673
|
}
|
|
606
674
|
};
|
|
607
|
-
BreakpointRenderer = BreakpointRenderer_1 = ( __decorate([
|
|
608
|
-
( __param(1, IDebugService))
|
|
609
|
-
], BreakpointRenderer));
|
|
675
|
+
BreakpointRenderer = BreakpointRenderer_1 = ( __decorate([( __param(1, IDebugService))], BreakpointRenderer));
|
|
610
676
|
let InstructionRenderer = class InstructionRenderer extends Disposable {
|
|
611
|
-
static {
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
static {
|
|
615
|
-
|
|
677
|
+
static {
|
|
678
|
+
InstructionRenderer_1 = this;
|
|
679
|
+
}
|
|
680
|
+
static {
|
|
681
|
+
this.TEMPLATE_ID = "instruction";
|
|
682
|
+
}
|
|
683
|
+
static {
|
|
684
|
+
this.INSTRUCTION_ADDR_MIN_LENGTH = 25;
|
|
685
|
+
}
|
|
686
|
+
static {
|
|
687
|
+
this.INSTRUCTION_BYTES_MIN_LENGTH = 30;
|
|
688
|
+
}
|
|
689
|
+
constructor(
|
|
690
|
+
_disassemblyView,
|
|
691
|
+
themeService,
|
|
692
|
+
editorService,
|
|
693
|
+
textModelService,
|
|
694
|
+
uriService,
|
|
695
|
+
logService
|
|
696
|
+
) {
|
|
616
697
|
super();
|
|
617
698
|
this._disassemblyView = _disassemblyView;
|
|
618
699
|
this.editorService = editorService;
|
|
@@ -628,17 +709,28 @@ let InstructionRenderer = class InstructionRenderer extends Disposable {
|
|
|
628
709
|
}));
|
|
629
710
|
}
|
|
630
711
|
renderTemplate(container) {
|
|
631
|
-
const sourcecode = append(container, $(
|
|
632
|
-
const instruction = append(container, $(
|
|
712
|
+
const sourcecode = append(container, $(".sourcecode"));
|
|
713
|
+
const instruction = append(container, $(".instruction"));
|
|
633
714
|
this.applyFontInfo(sourcecode);
|
|
634
715
|
this.applyFontInfo(instruction);
|
|
635
|
-
const currentElement = {
|
|
716
|
+
const currentElement = {
|
|
717
|
+
element: undefined
|
|
718
|
+
};
|
|
636
719
|
const cellDisposable = [];
|
|
637
|
-
const disposables = [
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
720
|
+
const disposables = [this._disassemblyView.onDidChangeStackFrame(
|
|
721
|
+
() => this.rerenderBackground(instruction, sourcecode, currentElement.element)
|
|
722
|
+
), addStandardDisposableListener(
|
|
723
|
+
sourcecode,
|
|
724
|
+
"dblclick",
|
|
725
|
+
() => this.openSourceCode(currentElement.element?.instruction)
|
|
726
|
+
)];
|
|
727
|
+
return {
|
|
728
|
+
currentElement,
|
|
729
|
+
instruction,
|
|
730
|
+
sourcecode,
|
|
731
|
+
cellDisposable,
|
|
732
|
+
disposables
|
|
733
|
+
};
|
|
642
734
|
}
|
|
643
735
|
renderElement(element, index, templateData) {
|
|
644
736
|
this.renderElementInner(element, index, templateData);
|
|
@@ -646,7 +738,7 @@ let InstructionRenderer = class InstructionRenderer extends Disposable {
|
|
|
646
738
|
async renderElementInner(element, index, templateData) {
|
|
647
739
|
templateData.currentElement.element = element;
|
|
648
740
|
const instruction = element.instruction;
|
|
649
|
-
templateData.sourcecode.innerText =
|
|
741
|
+
templateData.sourcecode.innerText = "";
|
|
650
742
|
const sb = ( new StringBuilder(1000));
|
|
651
743
|
if (this._disassemblyView.isSourceCodeRender && element.showSourceLocation && instruction.location?.path && instruction.line !== undefined) {
|
|
652
744
|
const sourceURI = this.getUriFromSource(instruction);
|
|
@@ -664,7 +756,7 @@ let InstructionRenderer = class InstructionRenderer extends Disposable {
|
|
|
664
756
|
while (lineNumber && lineNumber >= 1 && lineNumber <= textModel.getLineCount()) {
|
|
665
757
|
const lineContent = textModel.getLineContent(lineNumber);
|
|
666
758
|
sourceSB.appendString(` ${lineNumber}: `);
|
|
667
|
-
sourceSB.appendString(lineContent +
|
|
759
|
+
sourceSB.appendString(lineContent + "\n");
|
|
668
760
|
if (instruction.endLine && lineNumber < instruction.endLine) {
|
|
669
761
|
lineNumber++;
|
|
670
762
|
continue;
|
|
@@ -676,13 +768,13 @@ let InstructionRenderer = class InstructionRenderer extends Disposable {
|
|
|
676
768
|
}
|
|
677
769
|
}
|
|
678
770
|
let spacesToAppend = 10;
|
|
679
|
-
if (instruction.address !==
|
|
771
|
+
if (instruction.address !== "-1") {
|
|
680
772
|
sb.appendString(instruction.address);
|
|
681
773
|
if (instruction.address.length < InstructionRenderer_1.INSTRUCTION_ADDR_MIN_LENGTH) {
|
|
682
774
|
spacesToAppend = InstructionRenderer_1.INSTRUCTION_ADDR_MIN_LENGTH - instruction.address.length;
|
|
683
775
|
}
|
|
684
776
|
for (let i = 0; i < spacesToAppend; i++) {
|
|
685
|
-
sb.appendString(
|
|
777
|
+
sb.appendString(" ");
|
|
686
778
|
}
|
|
687
779
|
}
|
|
688
780
|
if (instruction.instructionBytes) {
|
|
@@ -692,7 +784,7 @@ let InstructionRenderer = class InstructionRenderer extends Disposable {
|
|
|
692
784
|
spacesToAppend = InstructionRenderer_1.INSTRUCTION_BYTES_MIN_LENGTH - instruction.instructionBytes.length;
|
|
693
785
|
}
|
|
694
786
|
for (let i = 0; i < spacesToAppend; i++) {
|
|
695
|
-
sb.appendString(
|
|
787
|
+
sb.appendString(" ");
|
|
696
788
|
}
|
|
697
789
|
}
|
|
698
790
|
sb.appendString(instruction.instruction);
|
|
@@ -709,13 +801,11 @@ let InstructionRenderer = class InstructionRenderer extends Disposable {
|
|
|
709
801
|
}
|
|
710
802
|
rerenderBackground(instruction, sourceCode, element) {
|
|
711
803
|
if (element && this._disassemblyView.currentInstructionAddresses.includes(element.address)) {
|
|
712
|
-
instruction.style.background = this._topStackFrameColor?.toString() ||
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
else {
|
|
718
|
-
instruction.style.background = 'transparent';
|
|
804
|
+
instruction.style.background = this._topStackFrameColor?.toString() || "transparent";
|
|
805
|
+
} else if (element?.address === this._disassemblyView.focusedInstructionAddress) {
|
|
806
|
+
instruction.style.background = this._focusedStackFrameColor?.toString() || "transparent";
|
|
807
|
+
} else {
|
|
808
|
+
instruction.style.background = "transparent";
|
|
719
809
|
}
|
|
720
810
|
}
|
|
721
811
|
openSourceCode(instruction) {
|
|
@@ -725,22 +815,22 @@ let InstructionRenderer = class InstructionRenderer extends Disposable {
|
|
|
725
815
|
startLineNumber: instruction.line,
|
|
726
816
|
endLineNumber: instruction.endLine,
|
|
727
817
|
startColumn: instruction.column || 1,
|
|
728
|
-
endColumn: instruction.endColumn || Constants.MAX_SAFE_SMALL_INTEGER
|
|
818
|
+
endColumn: instruction.endColumn || Constants.MAX_SAFE_SMALL_INTEGER
|
|
729
819
|
} : {
|
|
730
820
|
startLineNumber: instruction.line,
|
|
731
821
|
endLineNumber: instruction.line,
|
|
732
822
|
startColumn: instruction.column || 1,
|
|
733
|
-
endColumn: instruction.endColumn || Constants.MAX_SAFE_SMALL_INTEGER
|
|
823
|
+
endColumn: instruction.endColumn || Constants.MAX_SAFE_SMALL_INTEGER
|
|
734
824
|
};
|
|
735
825
|
this.editorService.openEditor({
|
|
736
826
|
resource: sourceURI,
|
|
737
|
-
description: ( localize(
|
|
827
|
+
description: ( localize(7246, "from disassembly")),
|
|
738
828
|
options: {
|
|
739
829
|
preserveFocus: false,
|
|
740
830
|
selection: selection,
|
|
741
831
|
revealIfOpened: true,
|
|
742
832
|
selectionRevealType: TextEditorSelectionRevealType.CenterIfOutsideViewport,
|
|
743
|
-
pinned: false
|
|
833
|
+
pinned: false
|
|
744
834
|
}
|
|
745
835
|
});
|
|
746
836
|
}
|
|
@@ -753,34 +843,34 @@ let InstructionRenderer = class InstructionRenderer extends Disposable {
|
|
|
753
843
|
if (path && isAbsolute(path)) {
|
|
754
844
|
return this.uriService.asCanonicalUri(URI.file(path));
|
|
755
845
|
}
|
|
756
|
-
return getUriFromSource(
|
|
846
|
+
return getUriFromSource(
|
|
847
|
+
instruction.location,
|
|
848
|
+
instruction.location.path,
|
|
849
|
+
this._disassemblyView.debugSession.getId(),
|
|
850
|
+
this.uriService,
|
|
851
|
+
this.logService
|
|
852
|
+
);
|
|
757
853
|
}
|
|
758
854
|
applyFontInfo(element) {
|
|
759
855
|
applyFontInfo(element, this._disassemblyView.fontInfo);
|
|
760
|
-
element.style.whiteSpace =
|
|
856
|
+
element.style.whiteSpace = "pre";
|
|
761
857
|
}
|
|
762
858
|
};
|
|
763
|
-
InstructionRenderer = InstructionRenderer_1 = ( __decorate([
|
|
764
|
-
( __param(1, IThemeService)),
|
|
765
|
-
( __param(2, IEditorService)),
|
|
766
|
-
( __param(3, ITextModelService)),
|
|
767
|
-
( __param(4, IUriIdentityService)),
|
|
768
|
-
( __param(5, ILogService))
|
|
769
|
-
], InstructionRenderer));
|
|
859
|
+
InstructionRenderer = InstructionRenderer_1 = ( __decorate([( __param(1, IThemeService)), ( __param(2, IEditorService)), ( __param(3, ITextModelService)), ( __param(4, IUriIdentityService)), ( __param(5, ILogService))], InstructionRenderer));
|
|
770
860
|
class AccessibilityProvider {
|
|
771
861
|
getWidgetAriaLabel() {
|
|
772
|
-
return localize(
|
|
862
|
+
return localize(7247, "Disassembly View");
|
|
773
863
|
}
|
|
774
864
|
getAriaLabel(element) {
|
|
775
|
-
let label =
|
|
865
|
+
let label = "";
|
|
776
866
|
const instruction = element.instruction;
|
|
777
|
-
if (instruction.address !==
|
|
778
|
-
label += `${( localize(
|
|
867
|
+
if (instruction.address !== "-1") {
|
|
868
|
+
label += `${( localize(7248, "Address"))}: ${instruction.address}`;
|
|
779
869
|
}
|
|
780
870
|
if (instruction.instructionBytes) {
|
|
781
|
-
label += `, ${( localize(
|
|
871
|
+
label += `, ${( localize(7249, "Bytes"))}: ${instruction.instructionBytes}`;
|
|
782
872
|
}
|
|
783
|
-
label += `, ${( localize(
|
|
873
|
+
label += `, ${( localize(7250, "Instruction"))}: ${instruction.instruction}`;
|
|
784
874
|
return label;
|
|
785
875
|
}
|
|
786
876
|
}
|
|
@@ -797,12 +887,15 @@ let DisassemblyViewContribution = class DisassemblyViewContribution {
|
|
|
797
887
|
const activeTextEditorControl = editorService.activeTextEditorControl;
|
|
798
888
|
if (isCodeEditor(activeTextEditorControl)) {
|
|
799
889
|
const language = activeTextEditorControl.getModel()?.getLanguageId();
|
|
800
|
-
this._languageSupportsDisassembleRequest?.set(
|
|
890
|
+
this._languageSupportsDisassembleRequest?.set(
|
|
891
|
+
!!language && debugService.getAdapterManager().someDebuggerInterestedInLanguage(language)
|
|
892
|
+
);
|
|
801
893
|
this._onDidChangeModelLanguage = activeTextEditorControl.onDidChangeModelLanguage(e => {
|
|
802
|
-
this._languageSupportsDisassembleRequest?.set(
|
|
894
|
+
this._languageSupportsDisassembleRequest?.set(
|
|
895
|
+
debugService.getAdapterManager().someDebuggerInterestedInLanguage(e.newLanguage)
|
|
896
|
+
);
|
|
803
897
|
});
|
|
804
|
-
}
|
|
805
|
-
else {
|
|
898
|
+
} else {
|
|
806
899
|
this._languageSupportsDisassembleRequest?.set(false);
|
|
807
900
|
}
|
|
808
901
|
};
|
|
@@ -814,14 +907,10 @@ let DisassemblyViewContribution = class DisassemblyViewContribution {
|
|
|
814
907
|
this._onDidChangeModelLanguage?.dispose();
|
|
815
908
|
}
|
|
816
909
|
};
|
|
817
|
-
DisassemblyViewContribution = ( __decorate([
|
|
818
|
-
( __param(0, IEditorService)),
|
|
819
|
-
( __param(1, IDebugService)),
|
|
820
|
-
( __param(2, IContextKeyService))
|
|
821
|
-
], DisassemblyViewContribution));
|
|
910
|
+
DisassemblyViewContribution = ( __decorate([( __param(0, IEditorService)), ( __param(1, IDebugService)), ( __param(2, IContextKeyService))], DisassemblyViewContribution));
|
|
822
911
|
CommandsRegistry.registerCommand({
|
|
823
912
|
metadata: {
|
|
824
|
-
description: COPY_ADDRESS_LABEL
|
|
913
|
+
description: COPY_ADDRESS_LABEL
|
|
825
914
|
},
|
|
826
915
|
id: COPY_ADDRESS_ID,
|
|
827
916
|
handler: async (accessor, entry) => {
|