sstring.Printf("%s:%d",typeName.AsCString(),valobj.GetBitfieldBitSize());
ConstString bitfieldname = ConstString(sstring.GetData());
if (log)
- log->Printf("appended bitfield info, final result is %s", bitfieldname.GetCString());
+ log->Printf("[Get_BitfieldMatch] appended bitfield info, final result is %s", bitfieldname.GetCString());
if (Get(bitfieldname, entry))
{
if (log)
- log->Printf("bitfield direct match found, returning");
+ log->Printf("[Get_BitfieldMatch] bitfield direct match found, returning");
return true;
}
else
{
reason |= lldb_private::eFormatterChoiceCriterionStrippedBitField;
if (log)
- log->Printf("no bitfield direct match");
+ log->Printf("[Get_BitfieldMatch] no bitfield direct match");
return false;
}
}
if (runtime == NULL)
{
if (log)
- log->Printf("no valid ObjC runtime, skipping dynamic");
+ log->Printf("[Get_ObjC] no valid ObjC runtime, skipping dynamic");
return false;
}
ObjCLanguageRuntime::ClassDescriptorSP objc_class_sp (runtime->GetClassDescriptor(valobj));
if (!objc_class_sp)
{
if (log)
- log->Printf("invalid ISA, skipping dynamic");
+ log->Printf("[Get_ObjC] invalid ISA, skipping dynamic");
return false;
}
ConstString name (objc_class_sp->GetClassName());
if (log)
- log->Printf("dynamic type inferred is %s - looking for direct dynamic match", name.GetCString());
+ log->Printf("[Get_ObjC] dynamic type inferred is %s - looking for direct dynamic match", name.GetCString());
if (Get(name, entry))
{
if (log)
- log->Printf("direct dynamic match found, returning");
+ log->Printf("[Get_ObjC] direct dynamic match found, returning");
return true;
}
if (log)
- log->Printf("no dynamic match");
+ log->Printf("[Get_ObjC] no dynamic match");
return false;
}
if (type.isNull())
{
if (log)
- log->Printf("type is NULL, returning");
+ log->Printf("[Get] type is NULL, returning");
return false;
}
if (!typePtr)
{
if (log)
- log->Printf("type is NULL, returning");
+ log->Printf("[Get] type is NULL, returning");
return false;
}
ConstString typeName(ClangASTType::GetTypeNameForQualType(valobj.GetClangAST(), type).c_str());
}
if (log)
- log->Printf("trying to get %s for VO name %s of type %s",
+ log->Printf("[Get] trying to get %s for VO name %s of type %s",
m_name.c_str(),
valobj.GetName().AsCString(),
typeName.AsCString());
if (Get(typeName, entry))
{
if (log)
- log->Printf("direct match found, returning");
+ log->Printf("[Get] direct match found, returning");
return true;
}
if (log)
- log->Printf("no direct match");
+ log->Printf("[Get] no direct match");
// strip pointers and references and see if that helps
if (typePtr->isReferenceType())
{
if (log)
- log->Printf("stripping reference");
+ log->Printf("[Get] stripping reference");
if (Get(valobj,type.getNonReferenceType(),entry, use_dynamic, reason) && !entry->SkipsReferences())
{
reason |= lldb_private::eFormatterChoiceCriterionStrippedPointerReference;
else if (typePtr->isPointerType())
{
if (log)
- log->Printf("stripping pointer");
+ log->Printf("[Get] stripping pointer");
clang::QualType pointee = typePtr->getPointeeType();
if (Get(valobj, pointee, entry, use_dynamic, reason) && !entry->SkipsPointers())
{
if (use_dynamic != lldb::eNoDynamicValues)
{
if (log)
- log->Printf("allowed to figure out dynamic ObjC type");
+ log->Printf("[Get] allowed to figure out dynamic ObjC type");
if (Get_ObjC(valobj,entry))
{
reason |= lldb_private::eFormatterChoiceCriterionDynamicObjCDiscovery;
}
}
if (log)
- log->Printf("dynamic disabled or failed - stripping ObjC pointer");
+ log->Printf("[Get] dynamic disabled or failed - stripping ObjC pointer");
clang::QualType pointee = typePtr->getPointeeType();
if (Get(valobj, pointee, entry, use_dynamic, reason) && !entry->SkipsPointers())
{
if (type_tdef)
{
if (log)
- log->Printf("stripping typedef");
+ log->Printf("[Get] stripping typedef");
if ((Get(valobj, type_tdef->getDecl()->getUnderlyingType(), entry, use_dynamic, reason)) && entry->Cascades())
{
reason |= lldb_private::eFormatterChoiceCriterionNavigatedTypedefs;
if (!*percent_position || *percent_position > var_name_end)
{
if (log)
- log->Printf("no format descriptor in string, skipping");
+ log->Printf("[ScanFormatDescriptor] no format descriptor in string, skipping");
*var_name_final = var_name_end;
}
else
char* format_name = new char[var_name_end-*var_name_final]; format_name[var_name_end-*var_name_final-1] = '\0';
memcpy(format_name, *var_name_final+1, var_name_end-*var_name_final-1);
if (log)
- log->Printf("parsing %s as a format descriptor", format_name);
+ log->Printf("ScanFormatDescriptor] parsing %s as a format descriptor", format_name);
if ( !FormatManager::GetFormatFromCString(format_name,
true,
*custom_format) )
{
if (log)
- log->Printf("%s is an unknown format", format_name);
+ log->Printf("ScanFormatDescriptor] %s is an unknown format", format_name);
// if this is an @ sign, print ObjC description
if (*format_name == '@')
*val_obj_display = ValueObject::eValueObjectRepresentationStyleLanguageSpecific;
else if (*format_name == 'T')
*val_obj_display = ValueObject::eValueObjectRepresentationStyleType;
else if (log)
- log->Printf("%s is an error, leaving the previous value alone", format_name);
+ log->Printf("ScanFormatDescriptor] %s is an error, leaving the previous value alone", format_name);
}
// a good custom format tells us to print the value using it
else
{
if (log)
- log->Printf("will display value for this VO");
+ log->Printf("ScanFormatDescriptor] will display value for this VO");
*val_obj_display = ValueObject::eValueObjectRepresentationStyleValue;
}
delete format_name;
}
if (log)
- log->Printf("final format description outcome: custom_format = %d, val_obj_display = %d",
+ log->Printf("ScanFormatDescriptor] final format description outcome: custom_format = %d, val_obj_display = %d",
*custom_format,
*val_obj_display);
return true;
if (*close_bracket_position - *open_bracket_position == 1)
{
if (log)
- log->Printf("[] detected.. going from 0 to end of data");
+ log->Printf("[ScanBracketedRange] '[]' detected.. going from 0 to end of data");
*index_lower = 0;
}
else if (*separator_position == NULL || *separator_position > var_name_end)
*index_lower = ::strtoul (*open_bracket_position+1, &end, 0);
*index_higher = *index_lower;
if (log)
- log->Printf("[%lld] detected, high index is same", *index_lower);
+ log->Printf("[ScanBracketedRange] [%lld] detected, high index is same", *index_lower);
}
else if (*close_bracket_position && *close_bracket_position < var_name_end)
{
*index_lower = ::strtoul (*open_bracket_position+1, &end, 0);
*index_higher = ::strtoul (*separator_position+1, &end, 0);
if (log)
- log->Printf("[%lld-%lld] detected", *index_lower, *index_higher);
+ log->Printf("[ScanBracketedRange] [%lld-%lld] detected", *index_lower, *index_higher);
}
else
{
if (log)
- log->Printf("expression is erroneous, cannot extract indices out of it");
+ log->Printf("[ScanBracketedRange] expression is erroneous, cannot extract indices out of it");
return false;
}
if (*index_lower > *index_higher && *index_higher > 0)
{
if (log)
- log->Printf("swapping indices");
+ log->Printf("[ScanBracketedRange] swapping indices");
int temp = *index_lower;
*index_lower = *index_higher;
*index_higher = temp;
}
}
else if (log)
- log->Printf("no bracketed range, skipping entirely");
+ log->Printf("[ScanBracketedRange] no bracketed range, skipping entirely");
return true;
}
std::auto_ptr<char> ptr_deref_buffer(new char[10]);
::sprintf(ptr_deref_buffer.get(), ptr_deref_format, index);
if (log)
- log->Printf("name to deref: %s",ptr_deref_buffer.get());
+ log->Printf("[ExpandIndexedExpression] name to deref: %s",ptr_deref_buffer.get());
const char* first_unparsed;
ValueObject::GetValueForExpressionPathOptions options;
ValueObject::ExpressionPathEndResultType final_value_type;
if (!item)
{
if (log)
- log->Printf("ERROR: unparsed portion = %s, why stopping = %d,"
+ log->Printf("[ExpandIndexedExpression] ERROR: unparsed portion = %s, why stopping = %d,"
" final_value_type %d",
first_unparsed, reason_to_stop, final_value_type);
}
else
{
if (log)
- log->Printf("ALL RIGHT: unparsed portion = %s, why stopping = %d,"
+ log->Printf("[ExpandIndexedExpression] ALL RIGHT: unparsed portion = %s, why stopping = %d,"
" final_value_type %d",
first_unparsed, reason_to_stop, final_value_type);
}
break;
if (log)
- log->Printf("initial string: %s",var_name_begin);
+ log->Printf("[Debugger::FormatPrompt] initial string: %s",var_name_begin);
// check for *var and *svar
if (*var_name_begin == '*')
}
if (log)
- log->Printf("initial string: %s",var_name_begin);
+ log->Printf("[Debugger::FormatPrompt] initial string: %s",var_name_begin);
if (*var_name_begin == 's')
{
}
if (log)
- log->Printf("initial string: %s",var_name_begin);
+ log->Printf("[Debugger::FormatPrompt] initial string: %s",var_name_begin);
// should be a 'v' by now
if (*var_name_begin != 'v')
break;
if (log)
- log->Printf("initial string: %s",var_name_begin);
+ log->Printf("[Debugger::FormatPrompt] initial string: %s",var_name_begin);
ValueObject::ExpressionPathAftermath what_next = (do_deref_pointer ?
ValueObject::eExpressionPathAftermathDereference : ValueObject::eExpressionPathAftermathNothing);
memcpy(expr_path.get(), var_name_begin+3,var_name_final-var_name_begin-3);
if (log)
- log->Printf("symbol to expand: %s",expr_path.get());
+ log->Printf("[Debugger::FormatPrompt] symbol to expand: %s",expr_path.get());
target = valobj->GetValueForExpressionPath(expr_path.get(),
&first_unparsed,
if (!target)
{
if (log)
- log->Printf("ERROR: unparsed portion = %s, why stopping = %d,"
+ log->Printf("[Debugger::FormatPrompt] ERROR: unparsed portion = %s, why stopping = %d,"
" final_value_type %d",
first_unparsed, reason_to_stop, final_value_type);
break;
else
{
if (log)
- log->Printf("ALL RIGHT: unparsed portion = %s, why stopping = %d,"
+ log->Printf("[Debugger::FormatPrompt] ALL RIGHT: unparsed portion = %s, why stopping = %d,"
" final_value_type %d",
first_unparsed, reason_to_stop, final_value_type);
}
if (error.Fail())
{
if (log)
- log->Printf("ERROR: %s\n", error.AsCString("unknown")); \
+ log->Printf("[Debugger::FormatPrompt] ERROR: %s\n", error.AsCString("unknown")); \
break;
}
do_deref_pointer = false;
{
StreamString str_temp;
if (log)
- log->Printf("I am into array || pointer && !range");
+ log->Printf("[Debugger::FormatPrompt] I am into array || pointer && !range");
if (target->HasSpecialPrintableRepresentation(val_obj_display,
custom_format))
val_obj_display,
custom_format);
if (log)
- log->Printf("special cases did%s match", var_success ? "" : "n't");
+ log->Printf("[Debugger::FormatPrompt] special cases did%s match", var_success ? "" : "n't");
// should not happen
if (!var_success)
if (!is_array_range)
{
if (log)
- log->Printf("dumping ordinary printable output");
+ log->Printf("[Debugger::FormatPrompt] dumping ordinary printable output");
var_success = target->DumpPrintableRepresentation(s,val_obj_display, custom_format);
}
else
{
if (log)
- log->Printf("checking if I can handle as array");
+ log->Printf("[Debugger::FormatPrompt] checking if I can handle as array");
if (!is_array && !is_pointer)
break;
if (log)
- log->Printf("handle as array");
+ log->Printf("[Debugger::FormatPrompt] handle as array");
const char* special_directions = NULL;
StreamString special_directions_writer;
if (close_bracket_position && (var_name_end-close_bracket_position > 1))
if (!item)
{
if (log)
- log->Printf("ERROR in getting child item at index %lld", index_lower);
+ log->Printf("[Debugger::FormatPrompt] ERROR in getting child item at index %lld", index_lower);
}
else
{
if (log)
- log->Printf("special_directions for child item: %s",special_directions);
+ log->Printf("[Debugger::FormatPrompt] special_directions for child item: %s",special_directions);
}
if (!special_directions)