Skip to content

Natvis: strip address prefix from string pointer DisplayStrings"#1573

Open
lugerard wants to merge 1 commit into
microsoft:mainfrom
lugerard:natvis-sub-specifier-cleanup
Open

Natvis: strip address prefix from string pointer DisplayStrings"#1573
lugerard wants to merge 1 commit into
microsoft:mainfrom
lugerard:natvis-sub-specifier-cleanup

Conversation

@lugerard
Copy link
Copy Markdown
Contributor

GDB and LLDB prefix string pointer results with the pointer address when evaluating ,sub, ,su or ,sb format specifiers. This causes the address to appear inline in the display value.

Add StripFormatSpecifier() and ExtractFormatSpecifier() to parse format specifiers from NatVis expressions. Add CleanUtf16StringValue() to strip the address and surrounding u"..." quotes for ,sub / ,su, and CleanAsciiStringValue() to strip the address for ,sb. Call each in FormatValue for the corresponding specifier. All new functions include unit tests.

…ings

GDB and LLDB prefix string pointer results with the pointer address when
evaluating ,sub, ,su or ,sb format specifiers. This causes the address
to appear inline in the display value.

Add StripFormatSpecifier() and ExtractFormatSpecifier() to parse format
specifiers from NatVis expressions. Add CleanUtf16StringValue() to strip
the address and surrounding u"..." quotes for ,sub / ,su, and
CleanAsciiStringValue() to strip the address for ,sb. Call each in
FormatValue for the corresponding specifier. All new functions include
unit tests.
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.

1 participant