eclipse-cdt-cloud / eclipse-cdt-cloud/vscode-memory-inspector

Address expression context only on top of stack

Open
#163 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
17
Forks
25
Avg merge
3d 22h
Merged PRs (30d)
8

Description

**Description**

when using a expression as the address on the memory inspector, it will not work properly for previous stack frames.
**How to reproduce:**

- use the sample code bellow
``` C
#include

static void foo(size_t val)
{
printf("%ld\n", val*2); // <------------ break here
}

static void test(int n)
{
foo(80*n);
}

int main(void)
{
test(1);
test(2);
return 0;
}
```
- set break point at the comment
- run in debug
- select `test` on the call stack
- inspect the memory with expression `&(n)`
- Error message: `No symbol "n" in current context.`

**Expected behavior**

it should be able to get the adress of the local variable with no errors.

**Environment**
- _OS_: Ubuntu GNU/Linux
- _Browser_:
- _Theia or VS Code Version_:
Version: 1.100.23258
Commit: 557d9224936804f4aeb93625d7a45c97113627e4
Date: 2025-05-15T18:24:48.143Z
Electron: 34.5.4
ElectronBuildId: undefined
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Linux x64 6.8.0-60-generic snap

**Additional information**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.