Skip to content

Commit b2a15d0

Browse files
committed
Match Current Context with one of Contexts
Match current context id with one of the elements of the Contexts array. Signed-off-by: Thor Thayer <thor.thayer@ericsson.com>
1 parent d471346 commit b2a15d0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/plugin/adapter-registry/amalgamator-gdb-tracker.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ export class AmalgamatorGdbVariableTransformer extends AdapterVariableTracker {
9090
}
9191

9292
async getCurrentConnectionContext(_session: vscode.DebugSession): Promise<ConnectionContext | undefined> {
93-
return Promise.resolve(this.currentConnectionContext);
93+
const curConnectionContext = this.connectionContexts?.length ?
94+
(this.connectionContexts?.filter(context => context.id === this.currentConnectionContext?.id).shift() ??
95+
this.currentConnectionContext) :
96+
this.currentConnectionContext;
97+
return Promise.resolve(curConnectionContext);
9498
}
9599

96100
readMemory(session: vscode.DebugSession, args: ReadMemoryArguments, context: ConnectionContext): Promise<ReadMemoryResult> {

0 commit comments

Comments
 (0)