Added the ability to log a value object just as a value would be display
when using the "frame variable" or "target variable" commands. llvm-svn: 153266
This commit is contained in:
parent
1d1435d8a8
commit
f830dbb77b
|
@ -881,7 +881,17 @@ public:
|
|||
DumpValueObject (Stream &s,
|
||||
ValueObject *valobj,
|
||||
const DumpValueObjectOptions& options);
|
||||
|
||||
|
||||
static void
|
||||
LogValueObject (Log *log,
|
||||
ValueObject *valobj);
|
||||
|
||||
static void
|
||||
LogValueObject (Log *log,
|
||||
ValueObject *valobj,
|
||||
const DumpValueObjectOptions& options);
|
||||
|
||||
|
||||
// returns true if this is a char* or a char[]
|
||||
// if it is a char* and check_pointer is true,
|
||||
// it also checks that the pointer is valid
|
||||
|
|
|
@ -3390,6 +3390,28 @@ DumpValueObject_Impl (Stream &s,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
ValueObject::LogValueObject (Log *log,
|
||||
ValueObject *valobj)
|
||||
{
|
||||
if (log && valobj)
|
||||
return LogValueObject (log, valobj, DumpValueObjectOptions::DefaultOptions());
|
||||
}
|
||||
|
||||
void
|
||||
ValueObject::LogValueObject (Log *log,
|
||||
ValueObject *valobj,
|
||||
const DumpValueObjectOptions& options)
|
||||
{
|
||||
if (log && valobj)
|
||||
{
|
||||
StreamString s;
|
||||
ValueObject::DumpValueObject (s, valobj, options);
|
||||
if (s.GetSize())
|
||||
log->PutCString(s.GetData());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ValueObject::DumpValueObject (Stream &s,
|
||||
ValueObject *valobj)
|
||||
|
|
Loading…
Reference in New Issue