Skip to content

Conversation

iridinite
Copy link
Contributor

Unlike GDB, LLDB-MI has a different result format for var-set-format. It wraps the new value in an array which only ever has one element. I'm not sure why that is the case, but it stops custom formats in Natvis from working.

Min repro:

struct Wrapper
{
	int mFoo;
};

int main(int argc, char* argv[])
{
	Wrapper w;
	w.mFoo = 123456789;

	__builtin_debugtrap();
}

Natvis:

<Type Name="Wrapper">
	<DisplayString>{mFoo,x}</DisplayString>
</Type>

Before

4bq6n4LaLm

After

fEtO3lj0fQ

Unlike GDB, LLDB-MI has a different result format for var-set-format.
It wraps the new value in an array which only ever has one element.
@gregg-miskelly gregg-miskelly merged commit 58930db into microsoft:main Sep 23, 2025
6 checks passed
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.

2 participants