-
Notifications
You must be signed in to change notification settings - Fork 123
Gdb var objects #107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gdb var objects #107
Conversation
Replace own value parser with GDB's variable objects interface. See https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Variable-Objects.html
hm the empty variable looks exactly the same as normal variables so I don't really know how to fix that, well maybe not really that big of an issue. However arrays (length prefixed |
I've never used D. Can you post the piece of code which gives this? |
Here just some test code where both the issues can be observed if you just halt anywhere in the main: import std.stdio;
struct A
{
string b;
A* child;
}
void main()
{
string str = "abc"; // strings are char arrays
int[] arr = [1, 2, 3];
writeln(str);
writeln(arr);
A a;
a.b = "def";
writeln(a);
} build with |
Use GDB's stask frames number as its id in vscode
Same variables now have same ids in each VariablesResponse. This allows vscode to keep track of changes properly and prevents collapsing of all variables after every step.
Var objects for local variables now have the same names as that variables. So adding to watchlist by right click should work better. But according to GDB's documentation expressions can't work with dynamic objects.
|
I think this should be available through some |
I added launch config parameter
|
yeah thats perfect, thanks for this contribution. Code quality and your responsiveness were great. Gonna merge this and push a new version to the marketplace in a minute. Also the main reason why I want it to work with D out of the box is that I listed this extension on the D wiki as debugger plus I always recommend it to D people using vscode and I am always mostly testing it with D. |
Replace own value parser with GDB's variable objects interface.
This improves variables view and allows to show values from custom pretty-printers loaded into GDB.
Tested with
vscode-1.12.2
andGDB-7.12
on Gentoo Linux