Skip to content

Missing quotation for variables with spaces leads to "Could not expand variable: Variable object not found" #278

Closed

Description

@martin-fleck-at

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

  1. added 5 commits that reference this issue on Jul 26, 2021
  2. added a commit that references this issue on Jul 30, 2021
  3. GitMensch commented on Mar 4, 2022

    @GitMensch
    Collaborator

    218d824 should have fixed this, so I assume it can be closed. If there is still an issue please report and we'll reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions