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

parse natvis format specifiers properly #1031

Merged
merged 3 commits into from
Sep 9, 2020

Conversation

Trass3r
Copy link
Contributor

@Trass3r Trass3r commented Aug 20, 2020

fixes #4

Copy link
Collaborator

@pieandcakes pieandcakes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at this list here: http://www.sourceware.org/gdb/onlinedocs/gdb/Output-Formats.html

I don't see some of the ones you have on here. Do you have a reference document that specifies some of these?

@pieandcakes
Copy link
Collaborator

Thanks for the PR. Can you tell us which debugger version and distros you tried this on so that we can validate the testing matrix?

@WardenGnaw TODO: add tests for these format specifiers

@Trass3r
Copy link
Contributor Author

Trass3r commented Aug 20, 2020

I don't see some of the ones you have on here. Do you have a reference document that specifies some of these?

https://docs.microsoft.com/en-us/visualstudio/debugger/format-specifiers-in-cpp
https://sourceware.org/gdb/current/onlinedocs/gdb/GDB_002fMI-Variable-Objects.html#The-_002dvar_002dset_002dformat-Command

Thanks for the PR. Can you tell us which debugger version and distros you tried this on so that we can validate the testing matrix?

gdb 9/10 on WSL2 Ubuntu 18.04/20.04.

@pieandcakes
Copy link
Collaborator

I don't see some of the ones you have on here. Do you have a reference document that specifies some of these?

https://docs.microsoft.com/en-us/visualstudio/debugger/format-specifiers-in-cpp
https://sourceware.org/gdb/current/onlinedocs/gdb/GDB_002fMI-Variable-Objects.html#The-_002dvar_002dset_002dformat-Command

Thanks for the PR. Can you tell us which debugger version and distros you tried this on so that we can validate the testing matrix?

gdb 9/10 on WSL2 Ubuntu 18.04/20.04.

The problem with https://docs.microsoft.com/en-us/visualstudio/debugger/format-specifiers-in-cpp?view=vs-2019 is that it is specifically for the Visual Studio Debugger (cppvsdbg) and not for this. I don't mind it being added in this case but that document is targeting something else.

@pieandcakes
Copy link
Collaborator

@WardenGnaw Assigning to you. I'm approving it but I'll leave it up to you to determine when to commit this change.

@Trass3r
Copy link
Contributor Author

Trass3r commented Aug 26, 2020

The problem with https://docs.microsoft.com/en-us/visualstudio/debugger/format-specifiers-in-cpp?view=vs-2019 is that it is specifically for the Visual Studio Debugger (cppvsdbg) and not for this. I don't mind it being added in this case but that document is targeting something else.

The reason for adding these is compatibility with natvis type definitions originally written for VS.
Like Qt visualizers for example.

src/MIDebugEngine/Engine.Impl/Variables.cs Show resolved Hide resolved
src/MIDebugEngine/Engine.Impl/Variables.cs Show resolved Hide resolved
case "sb":
case "s8":
case "s8b":
case "bstr":
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bstr is different and not worth supported as BSTR is a Windows-only concept.

@Trass3r
Copy link
Contributor Author

Trass3r commented Sep 9, 2020

Done.

@WardenGnaw
Copy link
Member

@Trass3r Thank you for your contirubtion to MIEngine!

We will target this for the next VSCode C++ Extension's insiders release.

It will appear in the CHANGELOG when it is avaliabe to use in the extension.

@WardenGnaw WardenGnaw merged commit ec52d60 into microsoft:master Sep 9, 2020
@Trass3r Trass3r deleted the format-specifiers branch September 9, 2020 18:54
@Trass3r
Copy link
Contributor Author

Trass3r commented Mar 17, 2021

It will appear in the CHANGELOG when it is avaliabe to use in the extension.

@WardenGnaw I still don't see it in the changelog. So I guess it hasn't been integrated yet?

@WardenGnaw
Copy link
Member

I must have missed this one when updating the change log.
Do you not see the change in the latest cpptools extension?

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

Successfully merging this pull request may close these issues.

Format specifiers don't work with natvis
4 participants