Replies: 1 comment 1 reply
-
|
Look into LLDB formatters. You could start with a type summary, however, that gets you only a single line of text (well, if you include line breaks you might be able to get 2D view in tooltips). Ah, also, I know of this VSCode extension for complex data visualization. There may be others. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Out of the box, 2D fixed size arrays in C are displayed well in VSCode:
But as soon as that array is passed to a function and decays to a pointer, that ability is seemingly lost. Even if the C99 feature of specifying the dimensions with variables is used:
The default "simple expressions" interpreter gives up:
By sheer bloody minded determination, I got the native interpreter to play ball:
by basically subverting the ability to typecast as a 3D array, and print the first "row" (which is the whole 2D array). Gloriously then, I can use this in a Watch expression, which is nice.
The closest I got with simple expressions is only row by row:
But so far no way to retain the behaviour that's available before the array is passed to a function.
Is there a 2D array expression syntax, or am I perhaps using the wrong tool for the job (CodeLLDB or LLDB itself, noting the former is not focused on C necessarily)?
Beta Was this translation helpful? Give feedback.
All reactions