microsoft / microsoft/MIEngine
Base class members are not displayed correctly using natvis files (LLDB)
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 859
- Forks
- 233
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 3
Description
Hi,
Under MacOS with LLDB, natvis fails to resolve base class member expressions, generating an error message instead. For example, given the code:
class ClassA
{
public:
int intVal;
};
class ClassB : public ClassA
{
public:
};
int main()
{
ClassB b;
b.intVal = 42;
}
ClassB will not resolve the member expression intVal when used in a natvis file.
Attached is a small example project highlighting the issue. Note that this project also highlights anonymous structure and union issues with and without natvis under LLDB (see comments at the top of main.cpp for details) reported here.
Windows 10 + CDB (Visual Studio 2017). Works as expected with and without natvis.
Ubuntu 16.04 + GDB 7.11.1. Works without natvis, generates expression errors with.
MacOS 10.12.6 + LLDB 370.0.42 (XCode 8.3.2 installed). Fails with or without natvis.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the attached vscode-natvis.zip, especially main.cpp and the natvis example, and reproduce the base-class member expression failure under LLDB on macOS. Done means the ClassB natvis expression resolves intVal without an expression error, while preserving the reported behavior on the other debugger configurations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, macos
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100