================ @@ -914,6 +914,11 @@ def get_variant_npos_value(index_byte_size): if index == npos_value: return " No Value" + # Invalid index can happen when the variant is not initialized yet. + template_arg_count = data_obj.GetType().GetNumberOfTemplateArguments() + if index >= template_arg_count: + return " <Invalid>" + active_type = data_obj.GetType().GetTemplateArgumentType(index) ---------------- clayborg wrote:
If this is what was crashing, we should modify the GetTemplateArgumentType(<index>) to not crash with an inalid index as part of this fix. https://github.com/llvm/llvm-project/pull/69253 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits