Skip to content

Commit

Permalink
Examine scopes only within specific super-scopes, like with items.
Browse files Browse the repository at this point in the history
  • Loading branch information
whitequark committed Oct 9, 2024
1 parent a3c8178 commit 71027d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/cxxrtl/proto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ export type ScopeDescriptionMap = {
export type CommandListScopes = {
type: 'command';
command: 'list_scopes';
scope: null | string;
};

export type ResponseListScopes = {
Expand Down
7 changes: 4 additions & 3 deletions src/debug/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ export class Session {
if (scopeDescriptionMap === undefined) {
const response = await this.connection.listScopes({
type: 'command',
command: 'list_scopes'
// FIXME: should be possible to filter by scope, too
command: 'list_scopes',
scope: scopeIdentifier,
});
const filteredScopes = Object.keys(response.scopes).filter((scopeName) => {
if (scopeIdentifier === '') {
Expand Down Expand Up @@ -104,7 +104,8 @@ export class Session {
if (this.rootScopeDesc === undefined) {
const response = await this.connection.listScopes({
type: 'command',
command: 'list_scopes'
command: 'list_scopes',
scope: scopeName,
});
this.rootScopeDesc = response.scopes[scopeName];
}
Expand Down

0 comments on commit 71027d2

Please sign in to comment.