You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Missing quotation for variables with spaces leads to "Could not expand variable: Variable object not found" #278
In my program I have a vector variable of a certain type, e.g., cl::Platform. When I list all children using GDB with the M2 interface, the name of that variable is reported as var_1_platforms::_Vector_base<cl::Platform, std::allocator<cl::Platform> > (note the spaces in the name). But when I try to get the children of that variable (var-list-children --all-values <name>) I receive a Could not expand variable: Variable object not found exception. I traced the issue to the spaces in the variable name as they break the parsing of the name. This can be easily reproduced on the command line.
Quoting the variable name fixes the issue for me and I noticed that there are already quotation marks around some other commands in the MI2 class, e.g., around expression when we create a variable. I will push a PR adding those quotation marks shortly.
Activity
WebFreak001#278: Add quotation marks around the variable name to supp…
WebFreak001#278: Quote variable names to support spaces
WebFreak001#278: Quote variable names to support spaces
WebFreak001#278: Quote variable names to support spaces
WebFreak001#278: Quote variable names to support spaces
#278: Quote variable names to support spaces
GitMensch commentedon Mar 4, 2022
218d824 should have fixed this, so I assume it can be closed. If there is still an issue please report and we'll reopen.