eclipse-cdt-cloud / eclipse-cdt-cloud/cdt-gdb-adapter

Support global and file static variables

Open
#424 1 comment 0 reactions 1 assignee Claimed by @omarArm View on GitHub
enhancement
Dominant language
TypeScript
Stars
39
Forks
56
Avg merge
3d 9h
Merged PRs (30d)
2

Description

The CDT GDB adapter currently only displays local variables and registers in the Variables view.
However, you also may want to see global variables and/or file-static variables (see [here](https://sourceware.org/gdb/current/onlinedocs/gdb.html/Variables.html))

GDB supports enumeration and access through https://sourceware.org/gdb/current/onlinedocs/gdb.html/GDB_002fMI-Symbol-Query.html and https://sourceware.org/gdb/current/onlinedocs/gdb.html/GDB_002fMI-Variable-Objects.html#GDB_002fMI-Variable-Objects

We should add support for global/file-static variables. You currently can only inspect them from the Watch or the Debug Console if you know a certain variable name, or through GDB CLI commands.

Potential caveats
* Depending on the program, you may have a significant number of such variables. Showing them as a flat list may become expensive on Variable view updates for embedded targets due to the target accesses.
* File-statics could be always shown or only when they are in scope, i.e. PC is at code from a specific file.

Hence, we need to keep an eye on performance during work on this feature. And may need a setting as a fail-safe to turn this off.

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.