Skip to content
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

Natvis: are multi-dimensional arrays supported in gdb natvis? #980

Closed
elbrandt opened this issue Mar 23, 2020 · 6 comments
Closed

Natvis: are multi-dimensional arrays supported in gdb natvis? #980

elbrandt opened this issue Mar 23, 2020 · 6 comments

Comments

@elbrandt
Copy link

elbrandt commented Mar 23, 2020

Hello,
I have a natvis to visualize a 2D array that works perfectly in VisualStudio 2019.
The same natvis file on VSCode 1.43.0 in Ubunutu, using gdb is not so happy.

Can you tell me if multi dimensional array capability is supposed to work using MIMode: gdb?

I'll be glad to work up a full minimal-working-example if this is supposed to work, but for now, here's the Type definition from my natvis that works on VStudio, but not on VSCode/gdb

  <Type Name="PhysBAM::ARRAYS_ND_BASE&lt;PhysBAM::VECTOR&lt;*,2&gt;&gt;">
    <DisplayString>{{ [({domain.min_corner.x},{domain.min_corner.y}),({domain.max_corner.x},{domain.max_corner.y})] }}</DisplayString>
    <Expand>
      <ArrayItems>
        <Direction>Forward</Direction>
        <Rank>2</Rank>
        <Size>((int*)&amp;counts)[$i]</Size>
        <ValuePointer>($T1*)base_pointer</ValuePointer>
      </ArrayItems>
    </Expand>
  </Type>

Thanks in advance!
-Eric.

View in VSCode (not so good):
image

View in Visual Studio (very nice!):
image

@pieandcakes
Copy link
Collaborator

@paulmaybee Is this something that is supported in our MIEngine's natvis implementation?

@paulmaybee
Copy link
Contributor

@pieandcakes Multi-dimensional array are not currently supported.

@elbrandt
Copy link
Author

Thanks for letting me know...saves me the trouble (for the time being) of trying to debug something that isn't meant to work.

Do you have any idea of where this support ranks in terms of priority, difficulty, mi-support, etc? Is this something that is 'likely to happen' or 'wishful thinking'?

@Trass3r
Copy link
Contributor

Trass3r commented Sep 9, 2020

I guess more the latter.
There are more pressing issues with natvis than this.

@WardenGnaw
Copy link
Member

Fixed with #1346

@sean-mcmanus
Copy link

The fix is available with 1.13.1: https://github.com/microsoft/vscode-cpptools/releases/tag/v1.13.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants