Esempio n. 1
0
//++ ------------------------------------------------------------------------------------
// MI private summary providers
static inline bool
MI_char_summary_provider(lldb::SBValue value, lldb::SBTypeSummaryOptions options, lldb::SBStream &stream)
{
    if (!value.IsValid())
        return false;

    lldb::SBType value_type = value.GetType();
    if(!value_type.IsValid())
        return false;
    
    lldb::BasicType type_code = value_type.GetBasicType();
    if (type_code == lldb::eBasicTypeSignedChar)
        stream.Printf("%d %s", (int)value.GetValueAsSigned(), value.GetValue());
    else if (type_code == lldb::eBasicTypeUnsignedChar)
        stream.Printf("%u %s", (unsigned)value.GetValueAsUnsigned(), value.GetValue());
    else
        return false;
    
    return true;
}