-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 visualizers do not follow typedefs on Linux #3038
Comments
@Djoulihen Thank you for reporting this. The natvis implementation inside the extension is a subset of Visual Studio, but that being said, we will investigate. The code for our implementation lives here: https://github.com/Microsoft/MIEngine/tree/master/src/MIDebugEngine/Natvis.Impl |
|
|
@ferdinandhelmer My assumption is the size of the data set and then the transformation it goes through. We request the data from Implementation: https://github.com/microsoft/MIEngine/tree/master/src/MIDebugEngine/Natvis.Impl For the request of showing the return value of the last function, I suspect we would need |
Return value is covered by #3214. |
That's an easy one and already handled in the official natvis: <Type Name="std::string">
<AlternativeType Name="std::basic_string<char,*,*>" /> It is much worse that template code and thus in particular STL is riddled with member typedefs. This is severe! <Type Name="std::optional<*>">
<DisplayString Condition="!_M_payload._M_engaged">nullopt</DisplayString>
<DisplayString Condition="_M_payload._M_engaged">{_M_payload._M_payload}</DisplayString>
<Expand>
<Item Condition="_M_payload._M_engaged" Name="value">($T1)_M_payload._M_payload</Item>
</Expand>
</Type> Without the |
This issue has been closed automatically because it has not had recent activity. |
Seems that issue still present in C/C++ version 1.5.0-insiders. |
See the linked MIEngine issue. There's simply no easy way to get the base type from gdb. |
This issue is still present 1.61.2 |
@Trass3r Wouldn't gdb |
This issue has been closed automatically because it has not had recent activity. |
No recent activity does not mean the bug is magically gone. @awulkiew see the MIEngine ticket. ptype output is hard to parse. |
Real issue is here microsoft/MIEngine#1026 |
Hi
First of all thanks for implementing natvis visualization even with GDB, that is a very useful feature.
One pretty limiting shortcoming I found is that the visualization gets broken on Linux when the type of the variable is hidden behind a typedef. An example:
Using this natvis declaration:
In this case myVec1 will have its display string as
{ size=5 }
while myVec2 will just have{...}
. As it would be a cumbersome to add a new declaration in the natvis for every local typedef that could be used, it would be very useful if the visualizer could find the real type behind the typedef and match it, as Visual Studio does.Thanks,
Julien
The text was updated successfully, but these errors were encountered: