forked from OSchip/llvm-project
When creating typedefs, don't call Type::GetName() since that might recursively call "lldb_private::Type::ResolveClangType(lldb_private::Type::ResolveStateTag)" and cause a crash. A lldb_private::Type should have a valid name if it is created without a backing CompilerType. Also provide a name that we can recognize so if we see it in a as the typename of a variable, we will know to check it out. This crash is happening quite a bit and we need to determine if this is due to incorrect debug info, or just due to some bug in LLDBD.
<rdar://problem/25192037> llvm-svn: 264762
This commit is contained in:
parent
cba3e8b4b5
commit
fee32cd9e2
|
@ -559,8 +559,8 @@ Type::ResolveClangType (ResolveState compiler_type_resolve_state)
|
|||
break;
|
||||
|
||||
case eEncodingIsTypedefUID:
|
||||
m_compiler_type = encoding_type->GetForwardCompilerType ().CreateTypedef(GetName().AsCString(),
|
||||
GetSymbolFile()->GetDeclContextContainingUID(GetID()));
|
||||
m_compiler_type = encoding_type->GetForwardCompilerType ().CreateTypedef(m_name.AsCString("__lldb_invalid_typedef_name"),
|
||||
GetSymbolFile()->GetDeclContextContainingUID(GetID()));
|
||||
m_name.Clear();
|
||||
break;
|
||||
|
||||
|
@ -605,8 +605,8 @@ Type::ResolveClangType (ResolveState compiler_type_resolve_state)
|
|||
break;
|
||||
|
||||
case eEncodingIsTypedefUID:
|
||||
m_compiler_type = void_compiler_type.CreateTypedef(GetName().AsCString(),
|
||||
GetSymbolFile()->GetDeclContextContainingUID(GetID()));
|
||||
m_compiler_type = void_compiler_type.CreateTypedef(m_name.AsCString("__lldb_invalid_typedef_name"),
|
||||
GetSymbolFile()->GetDeclContextContainingUID(GetID()));
|
||||
break;
|
||||
|
||||
case eEncodingIsPointerUID:
|
||||
|
|
Loading…
Reference in New Issue