In cases where you'd use an expression to get a value to insert in a command, be ready to use synthetic children if they are there. Those are now a source of values, so worth checking for

llvm-svn: 219452
This commit is contained in:
Enrico Granata 2014-10-09 23:09:40 +00:00
parent 32cac2e062
commit ca0e5ad3d3
2 changed files with 12 additions and 7 deletions

View File

@ -878,7 +878,10 @@ Args::StringToAddress (const ExecutionContext *exe_ctx, const char *s, lldb::add
bool success = false;
if (expr_result == eExpressionCompleted)
{
if (valobj_sp)
valobj_sp = valobj_sp->GetQualifiedRepresentationIfAvailable(valobj_sp->GetDynamicValueType(), true);
// Get the address to watch.
if (valobj_sp)
addr = valobj_sp->GetValueAsUnsigned(fail_value, &success);
if (success)
{

View File

@ -1473,6 +1473,8 @@ CommandInterpreter::PreprocessCommand (std::string &command)
if (expr_result == eExpressionCompleted)
{
Scalar scalar;
if (expr_result_valobj_sp)
expr_result_valobj_sp = expr_result_valobj_sp->GetQualifiedRepresentationIfAvailable(expr_result_valobj_sp->GetDynamicValueType(), true);
if (expr_result_valobj_sp->ResolveValue (scalar))
{
command.erase (start_backtick, end_backtick - start_backtick + 1);