microsoft / MIEngine

The Visual Studio MI Debug Engine ("MIEngine") provides an open-source Visual Studio Debugger extension that works with MI-enabled debuggers such as gdb and lldb.
MIT License
817 stars 217 forks source link

Is it possible to stop to expand pointer field when it point to NULL (0x0)? #698

Open WardenGnaw opened 6 years ago

WardenGnaw commented 6 years ago

From https://github.com/Microsoft/vscode-cpptools/issues/1705 by @K9A2

Is it possible to stop to expand pointer field when it point to NULL (0x0)?

When we use integrated debugger, such as inspecting a link list in written in C with list node defined as below:

struct ListNode {
    int val;
    struct ListNode *next;
}

We can expand its pointer field (next) as much as we want. But it could leed to possible confusion to noobs. Therefore, it is possible to stop user to at the end of list (i.e., remove the right triangle at the next field of node e090 to make it un able to expand it when it points to 0x0)? _20180320203757

WardenGnaw commented 6 years ago

Fix would be here: https://github.com/Microsoft/MIEngine/blob/f7251a88119fd2b4b682a0cb7535e5d02cc61066/src/MIDebugEngine/Engine.Impl/Variables.cs#L575