Hi David,
by default the decision of what types do and do not get “one line” printing is hardcoded in FormatManager::ShouldPrintAsOneLiner
The only setting that users can tweak with regard to that is
(lldb) settings show auto-one-line-summaries
auto-one-line-summaries (boolean) = true
which acts as a global kill-switch for the feature (true means “allow”)
A quick fix for your problem is to manually add a summary for all int arrays, thusly:
(lldb) type summary add -x “int [[0-9]+]” -c
That is saying, for all types whose names match the regular expression int [ followed by one ore more digits followed by a ], then force one-line formatting
With that, I get
(lldb) fr var x
(int [10]) x = ([0] = 0, [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 5, [6] = 6, [7] = 7, [8] = 8, [9] = 9)
(lldb) expr x
(int [10]) $2 = ([0] = 0, [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 5, [6] = 6, [7] = 7, [8] = 8, [9] = 9)
With all of that said, I think lldb-300 is a fairly old series. And indeed, on a recent LLDB I automatically get the kind of output you would like to see:
(lldb) expr x
(int [10]) $0 = ([0] = 0, [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 5, [6] = 6, [7] = 7, [8] = 8, [9] = 9)
even without applying any custom formatting