================ @@ -645,6 +645,33 @@ lldb::SBValue SBValue::CreateValueFromData(const char *name, SBData data, return sb_value; } +lldb::SBValue SBValue::CreateBoolValue(const char *name, bool value) { + LLDB_INSTRUMENT_VA(this, name); + + lldb::SBValue sb_value; + lldb::ValueObjectSP new_value_sp; + ValueLocker locker; + lldb::ValueObjectSP value_sp(GetSP(locker)); + ProcessSP process_sp = m_opaque_sp->GetProcessSP(); + lldb::SBTarget target = GetTarget(); + if (!target.IsValid()) + return sb_value; + lldb::SBType boolean_type = target.GetBasicType(lldb::eBasicTypeBool); + lldb::TypeImplSP type_impl_sp(boolean_type.GetSP()); + if (value_sp && process_sp && type_impl_sp) { + int data_buf[1] = {value ? 1 : 0}; ---------------- Jlalond wrote:
Is a data buffer the only option here because of the bitwise logic? I ask because we could just have the address point to a singular byte instead right? https://github.com/llvm/llvm-project/pull/108414 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits