forked from OSchip/llvm-project
Fix MiGdbSetShowTestCase.test_lldbmi_gdb_set_ouptut_radix after r234476
This includes: * Add CMICmnLLDBUtilSBValue::IsIntegerType to check integer type * Improve CMICmnLLDBDebugSessionInfoVarObj::GetValueStringFormatted to handle veVarFormat arg llvm-svn: 234480
This commit is contained in:
parent
1b2ff68408
commit
b49b2d2166
|
@ -275,6 +275,16 @@ CMICmnLLDBDebugSessionInfoVarObj::GetValueStringFormatted(const lldb::SBValue &v
|
|||
const CMICmnLLDBDebugSessionInfoVarObj::varFormat_e veVarFormat)
|
||||
{
|
||||
const CMICmnLLDBUtilSBValue utilValue(vrValue, true);
|
||||
if (utilValue.IsIntegerType())
|
||||
{
|
||||
MIuint64 nValue = 0;
|
||||
if (CMICmnLLDBProxySBValue::GetValueAsUnsigned(vrValue, nValue))
|
||||
{
|
||||
lldb::SBValue &rValue = const_cast<lldb::SBValue &>(vrValue);
|
||||
return GetStringFormatted(nValue, rValue.GetValue(), veVarFormat);
|
||||
}
|
||||
}
|
||||
|
||||
return utilValue.GetValue().Escape().AddSlashes();
|
||||
}
|
||||
|
||||
|
|
|
@ -260,6 +260,25 @@ CMICmnLLDBUtilSBValue::IsFirstChildCharType(void) const
|
|||
return utilValue.IsCharType();
|
||||
}
|
||||
|
||||
//++ ------------------------------------------------------------------------------------
|
||||
// Details: Retrieve the flag stating whether this value object is a integer type or some
|
||||
// other type. Char type can be signed or unsigned and short or long/very long.
|
||||
// Type: Method.
|
||||
// Args: None.
|
||||
// Return: bool - True = Yes is a integer type, false = some other type.
|
||||
// Throws: None.
|
||||
//--
|
||||
bool
|
||||
CMICmnLLDBUtilSBValue::IsIntegerType(void) const
|
||||
{
|
||||
const lldb::BasicType eType = m_rValue.GetType().GetBasicType();
|
||||
return ((eType == lldb::eBasicTypeShort) || (eType == lldb::eBasicTypeUnsignedShort) ||
|
||||
(eType == lldb::eBasicTypeInt) || (eType == lldb::eBasicTypeUnsignedInt) ||
|
||||
(eType == lldb::eBasicTypeLong) || (eType == lldb::eBasicTypeUnsignedLong) ||
|
||||
(eType == lldb::eBasicTypeLongLong) || (eType == lldb::eBasicTypeUnsignedLongLong) ||
|
||||
(eType == lldb::eBasicTypeInt128) || (eType == lldb::eBasicTypeUnsignedInt128));
|
||||
}
|
||||
|
||||
//++ ------------------------------------------------------------------------------------
|
||||
// Details: Retrieve the flag stating whether this value object is a pointer type or some
|
||||
// other type.
|
||||
|
|
|
@ -42,6 +42,7 @@ class CMICmnLLDBUtilSBValue
|
|||
CMIUtilString GetTypeNameDisplay(void) const;
|
||||
bool IsCharType(void) const;
|
||||
bool IsFirstChildCharType(void) const;
|
||||
bool IsIntegerType(void) const;
|
||||
bool IsPointerType(void) const;
|
||||
bool IsArrayType(void) const;
|
||||
bool IsLLDBVariable(void) const;
|
||||
|
|
Loading…
Reference in New Issue