================ @@ -1202,13 +1225,16 @@ lldb_private::formatters::Foundation1100:: m_data_64 = nullptr; } -size_t -lldb_private::formatters::Foundation1100:: - NSDictionaryMSyntheticFrontEnd::GetIndexOfChildWithName(ConstString name) { +llvm::Expected<size_t> lldb_private::formatters::Foundation1100:: + NSDictionaryMSyntheticFrontEnd::GetIndexOfChildWithName(ConstString name) { const char *item_name = name.GetCString(); uint32_t idx = ExtractIndexFromString(item_name); - if (idx < UINT32_MAX && idx >= CalculateNumChildrenIgnoringErrors()) - return UINT32_MAX; + if (idx == UINT32_MAX || + (idx < UINT32_MAX && idx >= CalculateNumChildrenIgnoringErrors())) + return llvm::createStringError( + "'SyntheticChildrenFrontEnd::NSDictionaryMSyntheticFrontEnd' cannot " + "find index of child '%s'. (idx='%d')", ---------------- Michael137 wrote:
Lets change all the index logging to: ```suggestion "find index of child '%s'. (idx='%" PRIu32 "')", ``` https://github.com/llvm/llvm-project/pull/136693 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits