<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<font face="Anonymous Pro">After a long wild goose chase, that
didn't get me nowhere I am looking for some help.<br>
Basically what's not working for me anymore in 9.0.0 is the
"expression" printer `p` (not `po`). <br>
Technically that is a JIT compiled Objective-C category method,
where the resulting binary code gets extracted from and executed
in the executable.<br>
<br>
When I enabled `log enable lldb expr` on 8.0.0 I see the following
on `p *self`:<br>
<br>
```<br>
mulle-lldb Frame has language of type objective-c<br>
mulle-lldb Using x86_64--linux as the target triple<br>
mulle-lldb Using SIMD alignment: 128<br>
mulle-lldb Target datalayout string:
'e-m:e-i64:64-f80:128-n8:16:32:64-S128'<br>
mulle-lldb Target ABI: ''<br>
mulle-lldb Target vector alignment: 0<br>
mulle-lldb
ClangExpressionDeclMap::FindExternalVisibleDecls[7] for
'$__lldb_objc_class' in a 'TranslationUnit'<br>
mulle-lldb CEDM::FEVD[7] Searching the root namespace<br>
mulle-lldb FEVD[7] Adding type for $__lldb_objc_class: Foo<br>
mulle-lldb [ClangASTImporter] Imported
(ObjCInterfaceDecl*)0x14e76c0, named Foo (from
(Decl*)0x7fda7801b558), metadata 0xffffffff0000002a<br>
mulle-lldb [ClangASTImporter] Decl has no origin
information in (ASTContext*)0x7fda78009bf0<br>
mulle-lldb [ClangASTImporter] To is an ObjCInterfaceDecl
- attributes Lexical Visible HasDefinition<br>
mulle-lldb ClangASTSource::FindExternalVisibleDecls[7] on
(ASTContext*)0x13e5610 for '$__lldb_objc_class' in a
'TranslationUnit'<br>
mulle-lldb CAS::FEVD[7] Searching the root namespace<br>
mulle-lldb
ClangExpressionDeclMap::FindExternalVisibleDecls[8] for
'$__lldb_arg' in a 'TranslationUnit'<br>
mulle-lldb CEDM::FEVD[8] Searching the root namespace<br>
mulle-lldb ClangASTSource::FindExternalVisibleDecls[8] on
(ASTContext*)0x13e5610 for '$__lldb_arg' in a 'TranslationUnit'<br>
mulle-lldb CAS::FEVD[8] Searching the root namespace<br>
mulle-lldb FindExternalLexicalDecls[6] on
(ASTContext*)0x13e5610 in 'Foo' (ObjCInterfaceDecl*)0x14e76c0<br>
mulle-lldb FELD[6] Original decl
(ASTContext*)0x7fda78009bf0 (Decl*)0x7fda7801b558:<br>
mulle-lldb @interface Foo<br>
mulle-lldb @end<br>
mulle-lldb FELD[6] Adding [to ObjCInterfaceDecl Foo]
lexical ObjCMethodDecl + (void)main<br>
mulle-lldb [ClangASTImporter] Imported
(ObjCMethodDecl*)0x14e7dd8, named main (from
(Decl*)0x7fda7801b670), metadata 0xffffffff00000033<br>
mulle-lldb [ClangASTImporter] Decl has no origin
information in (ASTContext*)0x7fda78009bf0<br>
mulle-lldb Last statement is an lvalue with type: Class<br>
mulle-lldb Found function +[Foo($__lldb_category)
$__lldb_expr:] for $__lldb_expr<br>
mulle-lldb PrepareForExecution - Current expression language
is objective-c<br>
```<br>
<br>
Here is some stipulation: `</font><font face="Anonymous Pro">[ClangASTImporter]
Imported (ObjCInterfaceDecl*)0x14e76c0, named Foo (from
(Decl*)0x7fda7801b558), metadata 0xffffffff0000002a` is the
ObjcInterfaceDecl as derived from DWARF but not yet filled in with
the complete instance variable information. The </font><font
face="Anonymous Pro">FindExternalLexicalDecls then completes the
declaration from DWARF info.<br>
<br>
This is what happens in 9.0.0:<br>
<br>
```<br>
mulle-lldb Frame has language of type objective-c<br>
mulle-lldb Using x86_64-unknown-linux-gnu as the target
triple<br>
mulle-lldb Using SIMD alignment: 128<br>
mulle-lldb Target datalayout string:
'e-m:e-i64:64-f80:128-n8:16:32:64-S128'<br>
mulle-lldb Target ABI: ''<br>
mulle-lldb Target vector alignment: 0<br>
mulle-lldb
ClangExpressionDeclMap::FindExternalVisibleDecls[5] for
'$__lldb_objc_class' in a 'TranslationUnit'<br>
mulle-lldb CEDM::FEVD[5] Searching the root namespace<br>
mulle-lldb FEVD[5] Adding type for $__lldb_objc_class: Foo<br>
mulle-lldb [ClangASTImporter] Imported
(ObjCInterfaceDecl*)0xfe58b0, named Foo (from
(Decl*)0x7f6f40047038), metadata 0x7fffffff00001672<br>
mulle-lldb [ClangASTImporter] Decl has no origin
information in (ASTContext*)0x7f6f40005590<br>
mulle-lldb [ClangASTImporter] To is an ObjCInterfaceDecl
- attributes Lexical Visible<br>
mulle-lldb ClangASTSource::FindExternalVisibleDecls[4] on
(ASTContext*)0x1051e20 for '$__lldb_objc_class' in a
'TranslationUnit'<br>
mulle-lldb CAS::FEVD[4] Searching the root namespace<br>
mulle-lldb [CompleteObjCInterfaceDecl] on
(ASTContext*)0x1051e20 Completing an ObjCInterfaceDecl named Foo<br>
mulle-lldb [COID] Before:<br>
mulle-lldb [COID] @class Foo;<br>
mulle-lldb [COID] After:<br>
mulle-lldb [COID] @class Foo;<br>
mulle-lldb
ClangExpressionDeclMap::FindExternalVisibleDecls[6] for
'$__lldb_arg' in a 'TranslationUnit'<br>
mulle-lldb CEDM::FEVD[6] Searching the root namespace<br>
mulle-lldb ClangASTSource::FindExternalVisibleDecls[5] on
(ASTContext*)0x1051e20 for '$__lldb_arg' in a 'TranslationUnit'<br>
mulle-lldb CAS::FEVD[5] Searching the root namespace<br>
mulle-lldb [CompleteObjCInterfaceDecl] on
(ASTContext*)0x1051e20 Completing an ObjCInterfaceDecl named Foo<br>
mulle-lldb [COID] Before:<br>
mulle-lldb [COID] @class Foo;<br>
mulle-lldb [COID] After:<br>
mulle-lldb [COID] @class Foo;<br>
mulle-lldb Last statement is an lvalue with type: Class<br>
mulle-lldb [ClangASTImporter] Forgetting destination
(ASTContext*)0x1051e20<br>
mulle-lldb [ClangASTImporter] Forgetting source->dest
(ASTContext*)0x1051e20->(ASTContext*)0x7f6f4005ed50<br>
error: cannot define category for undefined class 'Foo'<br>
forward declaration of class here<br>
error: cannot find interface declaration for 'Foo'<br>
forward declaration of class here<br>
```<br>
<br>
As you can see the "incomplete import" step for `Foo` succeeds but
the `</font><font face="Anonymous Pro"><font face="Anonymous Pro">FindExternalLexicalDecls`
just doesn't happen any more, and I'd like to know, why this
might be the case. And how I can possibly remedy this.<br>
<br>
</font></font><br>
<font face="Anonymous Pro"><font face="Anonymous Pro"><font
face="Anonymous Pro">My lldb is a slightly modified version of
the llvm lldb, with an added ObjCRuntime Plugin and some small
changes in the way DWARF information is convered to method
declarations. But the not-called</font></font></font><font
face="Anonymous Pro"><font face="Anonymous Pro"><font
face="Anonymous Pro"><font face="Anonymous Pro"><font
face="Anonymous Pro"> FindExternalLexicalDecls</font></font>
is also reproducable with an unadulterated lldb. The
Objective-C variant in question is a v1 compatible variant of
Objective-C. The Plugin itself does not create any Decls.<br>
<br>
<br>
</font>Ciao<br>
Nat!<br>
<br>
</font></font>
</body>
</html>