[Lldb-commits] [lldb] [lldb] Omit --show-globals in `help target var` (PR #85855)

Felipe de Azevedo Piovezan via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 19 13:20:15 PDT 2024


================
@@ -50,6 +50,11 @@ static constexpr OptionDefinition g_variable_options[] = {
      "Specify a summary string to use to format the variable output."},
 };
 
+static constexpr auto g_num_frame_options = 4;
----------------
felipepiovezan wrote:

Sadly it seems we need to hand-maintain it. The basic thing we need to maintain is "here is an array of options for target var, and here is an array of options for frame var", and one array is a suffix of the other. And they have to be arrays, because of the indexing that is done on them. 
Given all of that, I don't think there is a clean way to avoid having to maintain this constant, but the hope is that with the new approach it becomes harder to make the mistake that introduced this bug.

https://github.com/llvm/llvm-project/pull/85855


More information about the lldb-commits mailing list