Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- > LLVM_SYMBOLIZER_PATH=llvm-symbolizer-11 ~/git/llvm-project/build_x64_optdebug/bin/lldb a.out
- (lldb) target create "a.out"
- Current executable set to '/home/werat/src/cpp/a.out' (x86_64).
- (lldb) b main
- Breakpoint 1: where = a.out`main + 20 at main.cc:10:3, address = 0x0000000000401124
- (lldb) r
- Process 514701 launched: '/home/werat/src/cpp/a.out' (x86_64)
- Process 514701 stopped
- * thread #1, name = 'a.out', stop reason = breakpoint 1.1
- frame #0: 0x0000000000401124 a.out`main(argc=1, argv=0x00007fffffffe0d8) at main.cc:10:3
- 7 int main(int argc, char* argv[]) {
- 8 (void)Foo::Bar;
- 9
- -> 10 return 0;
- 11 }
- (lldb) log enable lldb expr -v
- (lldb) p (int*)100 + (long long)(&Foo::Bar)
- == [UserExpression::Evaluate] Parsing expression (int*)100 + (long long)(&Foo::Bar) ==
- ClangUserExpression::ScanContext()
- Parsing the following code:
- #line 1 "<lldb wrapper prefix>"
- #ifndef offsetof
- #define offsetof(t, d) __builtin_offsetof(t, d)
- #endif
- #ifndef NULL
- #define NULL (__null)
- #endif
- #ifndef Nil
- #define Nil (__null)
- #endif
- #ifndef nil
- #define nil (__null)
- #endif
- #ifndef YES
- #define YES ((BOOL)1)
- #endif
- #ifndef NO
- #define NO ((BOOL)0)
- #endif
- typedef __INT8_TYPE__ int8_t;
- typedef __UINT8_TYPE__ uint8_t;
- typedef __INT16_TYPE__ int16_t;
- typedef __UINT16_TYPE__ uint16_t;
- typedef __INT32_TYPE__ int32_t;
- typedef __UINT32_TYPE__ uint32_t;
- typedef __INT64_TYPE__ int64_t;
- typedef __UINT64_TYPE__ uint64_t;
- typedef __INTPTR_TYPE__ intptr_t;
- typedef __UINTPTR_TYPE__ uintptr_t;
- typedef __SIZE_TYPE__ size_t;
- typedef __PTRDIFF_TYPE__ ptrdiff_t;
- typedef unsigned short unichar;
- extern "C"
- {
- int printf(const char * __restrict, ...);
- }
- typedef signed char BOOL;
- void
- $__lldb_expr(void *$__lldb_arg)
- {
- ;
- #line 1 "<user expression 0>"
- (int*)100 + (long long)(&Foo::Bar)
- ;
- #line 1 "<lldb wrapper suffix>"
- }
- Frame has language of type c++14
- Using x86_64-unknown-linux-gnu as the target triple
- Using SIMD alignment: 128
- Target datalayout string: 'e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128'
- Target ABI: ''
- Target vector alignment: 0
- TransformTopLevelDecl(int8_t)
- TransformTopLevelDecl(uint8_t)
- TransformTopLevelDecl(int16_t)
- TransformTopLevelDecl(uint16_t)
- TransformTopLevelDecl(int32_t)
- TransformTopLevelDecl(uint32_t)
- TransformTopLevelDecl(int64_t)
- TransformTopLevelDecl(uint64_t)
- TransformTopLevelDecl(intptr_t)
- TransformTopLevelDecl(uintptr_t)
- TransformTopLevelDecl(size_t)
- TransformTopLevelDecl(ptrdiff_t)
- TransformTopLevelDecl(unichar)
- TransformTopLevelDecl(printf)
- TransformTopLevelDecl(BOOL)
- ClangExpressionDeclMap::FindExternalVisibleDecls for '$__lldb_arg' in a 'TranslationUnit'
- CEDM::FEVD Searching the root namespace
- ClangASTSource::FindExternalVisibleDecls on (ASTContext*)0x0000555FC5FD3F20 'Expression ASTContext for '<user expression 0>'' for '$__lldb_arg' in a 'TranslationUnit'
- CAS::FEVD Searching the root namespace
- ClangExpressionDeclMap::FindExternalVisibleDecls for '$__lldb_expr' in a 'TranslationUnit'
- CEDM::FEVD Searching the root namespace
- ClangASTSource::FindExternalVisibleDecls on (ASTContext*)0x0000555FC5FD3F20 'Expression ASTContext for '<user expression 0>'' for '$__lldb_expr' in a 'TranslationUnit'
- CAS::FEVD Searching the root namespace
- ClangExpressionDeclMap::FindExternalVisibleDecls for 'Foo' in a 'TranslationUnit'
- CEDM::FEVD Searching the root namespace
- ClangASTSource::FindExternalVisibleDecls on (ASTContext*)0x0000555FC5FD3F20 'Expression ASTContext for '<user expression 0>'' for 'Foo' in a 'TranslationUnit'
- CAS::FEVD Searching the root namespace
- CAS::FEVD Matching type found for "Foo": Foo
- [ClangASTImporter] Imported (CXXRecordDecl*)0x0000555FC5FF55D8, named Foo (from (Decl*)0x0000555FC5DE1268), metadata 61
- [ClangASTImporter] Decl has no origin information in (ASTContext*)0x0000555FC5DD45E0
- [ClangASTImporter] To is a TagDecl - attributes Lexical [complete->complete]
- FindExternalLexicalDecls on (ASTContext*)0x0000555FC5FD3F20 'Expression ASTContext for '<user expression 0>'' in 'Foo' (%sDecl*)CXXRecord
- FELD Original decl 0x0000555FC5DD45E0 (Decl*)0x0000555fc5de1268:
- CXXRecordDecl 0x555fc5de1268 <<invalid sloc>> <invalid sloc> struct Foo definition
- |-DefinitionData pass_in_registers empty aggregate standard_layout trivially_copyable pod trivial literal has_constexpr_non_copy_move_ctor can_const_default_init
- | |-DefaultConstructor exists trivial constexpr needs_implicit defaulted_is_constexpr
- | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param
- | |-MoveConstructor exists simple trivial needs_implicit
- | |-CopyAssignment simple trivial has_const_param needs_implicit implicit_has_const_param
- | |-MoveAssignment exists simple trivial needs_implicit
- | `-Destructor simple irrelevant trivial needs_implicit
- `-VarDecl 0x555fc5de13a0 <<invalid sloc>> <invalid sloc> Bar 'int' static
- FELD Adding [to CXXRecordDecl Foo] lexical VarDecl VarDecl 0x555fc5de13a0 <<invalid sloc>> <invalid sloc> Bar 'int' static
- [ClangASTImporter] Imported (VarDecl*)0x0000555FC5FF5728, named Bar (from (Decl*)0x0000555FC5DE13A0), metadata 18446744073709551615
- [ClangASTImporter] Decl has no origin information in (ASTContext*)0x0000555FC5DD45E0
- TransformTopLevelDecl($__lldb_expr)
- Untransformed function AST:
- void $__lldb_expr(void *$__lldb_arg) {
- ;
- (int *)100 + (long long)(&Foo::Bar);
- }
- Last statement is an rvalue with type: int *
- Transformed function AST:
- void $__lldb_expr(void *$__lldb_arg) {
- ;
- static int *$__lldb_expr_result(int *)100 + (long long)(&Foo::Bar);
- }
- Found function _Z12$__lldb_exprPv for $__lldb_expr
- PrepareForExecution - Current expression language is c++14
- Module as passed in to IRForTarget:
- "; ModuleID = '$__lldb_module'
- source_filename = "$__lldb_module"
- target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
- target triple = "x86_64-unknown-linux-gnu"
- @"_ZZ12$__lldb_exprPvE19$__lldb_expr_result" = internal global i32* null, align 8
- @"_ZGVZ12$__lldb_exprPvE19$__lldb_expr_result" = internal global i8 0, align 1
- @_ZN3Foo3BarE = external global i32, align 4
- ; Function Attrs: convergent mustprogress noinline nounwind optnone
- define dso_local void @"_Z12$__lldb_exprPv"(i8* noundef %"$__lldb_arg") #0 {
- entry:
- %"$__lldb_arg.addr" = alloca i8*, align 8, !clang.decl.ptr !6
- store i8* %"$__lldb_arg", i8** %"$__lldb_arg.addr", align 8
- %0 = load i8, i8* @"_ZGVZ12$__lldb_exprPvE19$__lldb_expr_result", align 1
- %guard.uninitialized = icmp eq i8 %0, 0
- br i1 %guard.uninitialized, label %init.check, label %init.end, !prof !7
- init.check: ; preds = %entry
- store i32* getelementptr inbounds (i32, i32* inttoptr (i64 100 to i32*), i64 ptrtoint (i32* @_ZN3Foo3BarE to i64)), i32** @"_ZZ12$__lldb_exprPvE19$__lldb_expr_result", align 8
- store i8 1, i8* @"_ZGVZ12$__lldb_exprPvE19$__lldb_expr_result", align 1
- br label %init.end
- init.end: ; preds = %init.check, %entry
- ret void
- }
- attributes #0 = { convergent mustprogress noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-builtins" "no-trapping-math"="true" "stack-protector-buffer-size"="0" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
- !clang.global.decl.ptrs = !{!0, !1, !0, !2}
- !llvm.module.flags = !{!3, !4}
- !llvm.ident = !{!5}
- !0 = !{i32** @"_ZZ12$__lldb_exprPvE19$__lldb_expr_result", i64 93869832559168}
- !1 = !{void (i8*)* @"_Z12$__lldb_exprPv", i64 93869832098952}
- !2 = !{i32* @_ZN3Foo3BarE, i64 93869832099624}
- !3 = !{i32 1, !"wchar_size", i32 4}
- !4 = !{i32 7, !"frame-pointer", i32 2}
- !5 = !{!"clang version 14.0.0 (https://github.com/llvm/llvm-project.git d89490db70ebc6438db507a20ac9558e822f1453)"}
- !6 = !{i64 93869832098728}
- !7 = !{!"branch_weights", i32 1, i32 1048575}
- "
- Result name: "_ZZ12$__lldb_exprPvE19$__lldb_expr_result"
- Found result in the IR: "@"_ZZ12$__lldb_exprPvE19$__lldb_expr_result" = internal global i32* null, align 8"
- Found result decl: "static int *$__lldb_expr_result(int *)100 + (long long)(&Foo::Bar)"
- Result decl type: "int *"
- Creating a new result global: "$RESULT_NAME" with size 8
- Replacing "@"_ZZ12$__lldb_exprPvE19$__lldb_expr_result" = internal global i32* null, align 8" with "@"$RESULT_NAME" = external global i32*"
- [ClangASTImporter] DeportType called on (int *Type*)0x0000555FC5FF5570 from (ASTContext*)0x0000555FC5FD3F20 to (ASTContext*)0x0000555FC5F58FA0
- Module after creating the result variable:
- "; ModuleID = '$__lldb_module'
- source_filename = "$__lldb_module"
- target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
- target triple = "x86_64-unknown-linux-gnu"
- @"_ZGVZ12$__lldb_exprPvE19$__lldb_expr_result" = internal global i8 0, align 1
- @_ZN3Foo3BarE = external global i32, align 4
- @reloc_placeholder = internal global i8 0
- @"$RESULT_NAME" = external global i32*
- ; Function Attrs: convergent mustprogress noinline nounwind optnone
- define dso_local void @"_Z12$__lldb_exprPv"(i8* noundef %"$__lldb_arg") #0 {
- entry:
- %"$__lldb_arg.addr" = alloca i8*, align 8, !clang.decl.ptr !7
- store i8* %"$__lldb_arg", i8** %"$__lldb_arg.addr", align 8
- %0 = load i8, i8* @"_ZGVZ12$__lldb_exprPvE19$__lldb_expr_result", align 1
- %guard.uninitialized = icmp eq i8 %0, 0
- br i1 %guard.uninitialized, label %init.check, label %init.end, !prof !8
- init.check: ; preds = %entry
- store i32* getelementptr inbounds (i32, i32* inttoptr (i64 100 to i32*), i64 ptrtoint (i32* @_ZN3Foo3BarE to i64)), i32** @"$RESULT_NAME", align 8
- store i8 1, i8* @"_ZGVZ12$__lldb_exprPvE19$__lldb_expr_result", align 1
- br label %init.end
- init.end: ; preds = %init.check, %entry
- ret void
- }
- attributes #0 = { convergent mustprogress noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-builtins" "no-trapping-math"="true" "stack-protector-buffer-size"="0" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
- !clang.global.decl.ptrs = !{!0, !1, !0, !2, !3}
- !llvm.module.flags = !{!4, !5}
- !llvm.ident = !{!6}
- !0 = distinct !{i32** @"$RESULT_NAME", i64 93869832559168}
- !1 = !{void (i8*)* @"_Z12$__lldb_exprPv", i64 93869832098952}
- !2 = !{i32* @_ZN3Foo3BarE, i64 93869832099624}
- !3 = !{i32** @"$RESULT_NAME", i64 93869832559168}
- !4 = !{i32 1, !"wchar_size", i32 4}
- !5 = !{i32 7, !"frame-pointer", i32 2}
- !6 = !{!"clang version 14.0.0 (https://github.com/llvm/llvm-project.git d89490db70ebc6438db507a20ac9558e822f1453)"}
- !7 = !{i64 93869832098728}
- !8 = !{!"branch_weights", i32 1, i32 1048575}
- "
- Examining _ZGVZ12$__lldb_exprPvE19$__lldb_expr_result, DeclForGlobalValue returns 0x0000000000000000
- Examining _ZN3Foo3BarE, DeclForGlobalValue returns 0x0000555FC5FF5728
- MaybeHandleVariable (@_ZN3Foo3BarE = external global i32, align 4)
- Type of "Bar" is [clang "int", llvm "i32*"] [size 4, align 4]
- Examining reloc_placeholder, DeclForGlobalValue returns 0x0000000000000000
- Examining $RESULT_NAME, DeclForGlobalValue returns 0x0000555FC6065A40
- MaybeHandleVariable (@"$RESULT_NAME" = external global i32*)
- Type of "$__lldb_expr_result" is [clang "int **", llvm "i32***"] [size 8, align 8]
- Adding value for (NamedDecl*)0x0000555FC6065A40 [$__lldb_expr_result - $RESULT_NAME] to the structure
- Already placed at 0x0
- Placed at 0x0
- Element arrangement:
- Arg: "i8* %"$__lldb_arg""
- "$RESULT_NAME" ("$__lldb_expr_result") placed at 0
- Replacing [@"$RESULT_NAME" = external global i32*]
- Total structure [align 8, size 8]
- Module after preparing for execution:
- "; ModuleID = '$__lldb_module'
- source_filename = "$__lldb_module"
- target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
- target triple = "x86_64-unknown-linux-gnu"
- @"_ZGVZ12$__lldb_exprPvE19$__lldb_expr_result" = internal global i8 0, align 1
- @_ZN3Foo3BarE = external global i32, align 4
- @reloc_placeholder = internal global i8 0
- ; Function Attrs: convergent mustprogress noinline nounwind optnone
- define dso_local void @"_Z12$__lldb_exprPv"(i8* noundef %"$__lldb_arg") #0 {
- entry:
- %0 = getelementptr i8, i8* %"$__lldb_arg", i32 0
- %1 = bitcast i8* %0 to i32***
- %2 = load i32**, i32*** %1, align 8
- %"$__lldb_arg.addr" = alloca i8*, align 8, !clang.decl.ptr !7
- store i8* %"$__lldb_arg", i8** %"$__lldb_arg.addr", align 8
- %guard.uninitialized = icmp eq i8 0, 0
- br i1 %guard.uninitialized, label %init.check, label %init.end, !prof !8
- init.check: ; preds = %entry
- store i32* getelementptr inbounds (i32, i32* inttoptr (i64 100 to i32*), i64 ptrtoint (i32* @_ZN3Foo3BarE to i64)), i32** %2, align 8
- br label %init.end
- init.end: ; preds = %init.check, %entry
- ret void
- }
- attributes #0 = { convergent mustprogress noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-builtins" "no-trapping-math"="true" "stack-protector-buffer-size"="0" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
- !clang.global.decl.ptrs = !{!0, !1, !0, !2, !3}
- !llvm.module.flags = !{!4, !5}
- !llvm.ident = !{!6}
- !0 = distinct !{null, i64 93869832559168}
- !1 = !{void (i8*)* @"_Z12$__lldb_exprPv", i64 93869832098952}
- !2 = !{i32* @_ZN3Foo3BarE, i64 93869832099624}
- !3 = distinct !{null, i64 93869832559168}
- !4 = !{i32 1, !"wchar_size", i32 4}
- !5 = !{i32 7, !"frame-pointer", i32 2}
- !6 = !{!"clang version 14.0.0 (https://github.com/llvm/llvm-project.git d89490db70ebc6438db507a20ac9558e822f1453)"}
- !7 = !{i64 93869832098728}
- !8 = !{!"branch_weights", i32 1, i32 1048575}
- "
- [ClangASTImporter] Forgetting destination (ASTContext*)0x0000555FC5FD3F20
- [ClangASTImporter] Forgetting source->dest (ASTContext*)0x0000555FC5FD3F20->(ASTContext*)0x0000555FC5F58FA0
- == [UserExpression::Evaluate] Executing expression ==
- IRMemoryMap::Malloc (15, 0x8, 0x3, eAllocationPolicyHostOnly) -> 0x7ffff7fca000
- IRMemoryMap::Malloc (524295, 0x8, 0x3, eAllocationPolicyHostOnly) -> 0x7ffff79f6000
- IRMemoryMap::Malloc process_sp=0x555fc5de9ed0, process_sp->CanJIT()=true, process_sp->IsAlive()=true
- IRMemoryMap::WriteMemory (0x7ffff7fca010, 0x555fc5d345e0, 0x8) went to [0x7ffff7fca010..0x7ffff7fca01f)
- IRMemoryMap::Malloc (15, 0x8, 0x3, eAllocationPolicyMirror) -> 0x7ffff7fca010
- IRMemoryMap::WriteMemory (0x7ffff7fca000, 0x7ffd03bc9ef0, 0x8) went to [0x7ffff7fca000..0x7ffff7fca00f)
- Materializer::Materialize (frame_sp = 0x7f718c380640, process_address = 0x7ffff7fca000) materialized:
- IRMemoryMap::ReadMemory (0x7ffff7fca000, 0x555fc5cdca40, 0x8) came from [0x7ffff7fca000..0x7ffff7fca00f)
- IRMemoryMap::ReadMemory (0x7ffff7fca010, 0x555fc5cdca40, 0x8) came from [0x7ffff7fca010..0x7ffff7fca01f)
- 0x7ffff7fca000: EntityResultVariable
- Pointer:
- 0x7ffff7fca000: 10 a0 fc f7 ff 7f 00 00
- Temporary allocation:
- 0x7ffff7fca000: 00 00 00 00 00 00 00 00
- Module as passed in to IRInterpreter::Interpret:
- "; ModuleID = '$__lldb_module'
- source_filename = "$__lldb_module"
- target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
- target triple = "x86_64-unknown-linux-gnu"
- @"_ZGVZ12$__lldb_exprPvE19$__lldb_expr_result" = internal global i8 0, align 1
- @_ZN3Foo3BarE = external global i32, align 4
- @reloc_placeholder = internal global i8 0
- ; Function Attrs: convergent mustprogress noinline nounwind optnone
- define dso_local void @"_Z12$__lldb_exprPv"(i8* noundef %"$__lldb_arg") #0 {
- entry:
- %0 = getelementptr i8, i8* %"$__lldb_arg", i32 0
- %1 = bitcast i8* %0 to i32***
- %2 = load i32**, i32*** %1, align 8
- %"$__lldb_arg.addr" = alloca i8*, align 8, !clang.decl.ptr !7
- store i8* %"$__lldb_arg", i8** %"$__lldb_arg.addr", align 8
- %guard.uninitialized = icmp eq i8 0, 0
- br i1 %guard.uninitialized, label %init.check, label %init.end, !prof !8
- init.check: ; preds = %entry
- store i32* getelementptr inbounds (i32, i32* inttoptr (i64 100 to i32*), i64 ptrtoint (i32* @_ZN3Foo3BarE to i64)), i32** %2, align 8
- br label %init.end
- init.end: ; preds = %init.check, %entry
- ret void
- }
- attributes #0 = { convergent mustprogress noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-builtins" "no-trapping-math"="true" "stack-protector-buffer-size"="0" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
- !clang.global.decl.ptrs = !{!0, !1, !0, !2, !3}
- !llvm.module.flags = !{!4, !5}
- !llvm.ident = !{!6}
- !0 = distinct !{null, i64 93869832559168}
- !1 = !{void (i8*)* @"_Z12$__lldb_exprPv", i64 93869832098952}
- !2 = !{i32* @_ZN3Foo3BarE, i64 93869832099624}
- !3 = distinct !{null, i64 93869832559168}
- !4 = !{i32 1, !"wchar_size", i32 4}
- !5 = !{i32 7, !"frame-pointer", i32 2}
- !6 = !{!"clang version 14.0.0 (https://github.com/llvm/llvm-project.git d89490db70ebc6438db507a20ac9558e822f1453)"}
- !7 = !{i64 93869832098728}
- !8 = !{!"branch_weights", i32 1, i32 1048575}
- "
- IRMemoryMap::WriteMemory (0x7ffff7a75ff8, 0x7ffd03bc9ae0, 0x8) went to [0x7ffff79f6000..0x7ffff7a76007)
- Made an allocation for argument i8* %"$__lldb_arg"
- Data region : 7ffff7fca000
- Ref region : 7ffff7a75ff8
- Interpreting %0 = getelementptr i8, i8* %"$__lldb_arg", i32 0
- IRMemoryMap::WriteMemory (0x7ffff7a75ff0, 0x555fc5de8830, 0x8) went to [0x7ffff79f6000..0x7ffff7a76007)
- Interpreted a GetElementPtrInst
- P : i8* %"$__lldb_arg" 0x7ffff7a75ff8
- Poffset : %0 = getelementptr i8, i8* %"$__lldb_arg", i32 0 0x7ffff7a75ff0
- Interpreting %1 = bitcast i8* %0 to i32***
- IRMemoryMap::WriteMemory (0x7ffff7a75fe8, 0x555fc5de8830, 0x8) went to [0x7ffff79f6000..0x7ffff7a76007)
- Interpreting %2 = load i32**, i32*** %1, align 8
- IRMemoryMap::ReadMemory (0x7ffff7a75fe8, 0x555fc5de8830, 0x8) came from [0x7ffff79f6000..0x7ffff7a76007)
- IRMemoryMap::ReadMemory (0x7ffff7fca000, 0x555fc5de8830, 0x8) came from [0x7ffff7fca000..0x7ffff7fca00f)
- IRMemoryMap::WriteMemory (0x7ffff7a75fe0, 0x555fc5de8830, 0x8) went to [0x7ffff79f6000..0x7ffff7a76007)
- Interpreted a LoadInst
- P : 0x7ffff7a75fe8
- R : 0x7ffff7fca000
- D : 0x7ffff7a75fe0
- Interpreting %"$__lldb_arg.addr" = alloca i8*, align 8, !clang.decl.ptr !7
- IRMemoryMap::WriteMemory (0x7ffff7a75fd0, 0x7ffd03bc9ae0, 0x8) went to [0x7ffff79f6000..0x7ffff7a76007)
- Interpreted an AllocaInst
- R : 0x7ffff7a75fd8
- P : 0x7ffff7a75fd0
- Interpreting store i8* %"$__lldb_arg", i8** %"$__lldb_arg.addr", align 8
- IRMemoryMap::ReadMemory (0x7ffff7a75fd0, 0x555fc5c41d00, 0x8) came from [0x7ffff79f6000..0x7ffff7a76007)
- IRMemoryMap::ReadMemory (0x7ffff7a75ff8, 0x555fc5c41d00, 0x8) came from [0x7ffff79f6000..0x7ffff7a76007)
- IRMemoryMap::WriteMemory (0x7ffff7a75fd8, 0x555fc5c41d00, 0x8) went to [0x7ffff79f6000..0x7ffff7a76007)
- Interpreted a StoreInst
- D : 0x7ffff7a75ff8
- P : 0x7ffff7a75fd0
- R : 0x7ffff7a75fd8
- Interpreting %guard.uninitialized = icmp eq i8 0, 0
- IRMemoryMap::WriteMemory (0x7ffff7a75fcf, 0x555fc5c41d00, 0x1) went to [0x7ffff79f6000..0x7ffff7a76007)
- Interpreted an ICmpInst
- L : i8 0
- R : i8 0
- = : %guard.uninitialized = icmp eq i8 0, 0 0x7ffff7a75fcf
- Interpreting br i1 %guard.uninitialized, label %init.check, label %init.end, !prof !8
- Interpreted a BrInst with a condition
- cond : %guard.uninitialized = icmp eq i8 0, 0 0x7ffff7a75fcf
- Interpreting store i32* getelementptr inbounds (i32, i32* inttoptr (i64 100 to i32*), i64 ptrtoint (i32* @_ZN3Foo3BarE to i64)), i32** %2, align 8
- IRMemoryMap::WriteMemory (0x7ffff7a75fc0, 0x555fc5c41d00, 0x8) went to [0x7ffff79f6000..0x7ffff7a76007)
- IRMemoryMap::ReadMemory (0x7ffff7a75fe0, 0x555fc5c41d00, 0x8) came from [0x7ffff79f6000..0x7ffff7a76007)
- IRMemoryMap::ReadMemory (0x7ffff7a75fc0, 0x555fc5c41d00, 0x8) came from [0x7ffff79f6000..0x7ffff7a76007)
- IRMemoryMap::WriteMemory (0x7ffff7fca010, 0x555fc5c41d00, 0x8) went to [0x7ffff7fca010..0x7ffff7fca01f)
- Interpreted a StoreInst
- D : 0x7ffff7a75fc0
- P : 0x7ffff7a75fe0
- R : 0x7ffff7fca010
- Interpreting br label %init.end
- Interpreted a BrInst with no condition
- Interpreting ret void
- -- [UserExpression::FinalizeJITExecution] Dematerializing after execution --
- Materializer::Dematerialize (frame_sp = 0x7f718c380640, process_address = 0x7ffff7fca000) about to dematerialize:
- IRMemoryMap::ReadMemory (0x7ffff7fca000, 0x555fc5cdca40, 0x8) came from [0x7ffff7fca000..0x7ffff7fca00f)
- IRMemoryMap::ReadMemory (0x7ffff7fca010, 0x555fc5cdca40, 0x8) came from [0x7ffff7fca010..0x7ffff7fca01f)
- 0x7ffff7fca000: EntityResultVariable
- Pointer:
- 0x7ffff7fca000: 10 a0 fc f7 ff 7f 00 00
- Temporary allocation:
- 0x7ffff7fca000: a8 40 00 00 00 00 00 00
- IRMemoryMap::ReadMemory (0x7ffff7fca000, 0x555fc5cdca40, 0x8) came from [0x7ffff7fca000..0x7ffff7fca00f)
- IRMemoryMap::ReadMemory (0x7ffff7fca010, 0x7f71c8052ad0, 0x8) came from [0x7ffff7fca010..0x7ffff7fca01f)
- IRMemoryMap::Free (0x7ffff7fca010) freed [0x7ffff7fca010..0x7ffff7fca01f)
- == [UserExpression::Evaluate] Execution completed normally with result 0x00000000000040a8 ==
- IRMemoryMap::Free (0x7ffff79f6000) freed [0x7ffff79f6000..0x7ffff7a76007)
- IRMemoryMap::Free (0x7ffff7fca000) freed [0x7ffff7fca000..0x7ffff7fca00f)
- (int *) $0 = 0x00000000000040a8
- (lldb) p (int*)100 + (long long)(&Foo::Bar)
- == [UserExpression::Evaluate] Parsing expression (int*)100 + (long long)(&Foo::Bar) ==
- ClangUserExpression::ScanContext()
- Parsing the following code:
- #line 1 "<lldb wrapper prefix>"
- #ifndef offsetof
- #define offsetof(t, d) __builtin_offsetof(t, d)
- #endif
- #ifndef NULL
- #define NULL (__null)
- #endif
- #ifndef Nil
- #define Nil (__null)
- #endif
- #ifndef nil
- #define nil (__null)
- #endif
- #ifndef YES
- #define YES ((BOOL)1)
- #endif
- #ifndef NO
- #define NO ((BOOL)0)
- #endif
- typedef __INT8_TYPE__ int8_t;
- typedef __UINT8_TYPE__ uint8_t;
- typedef __INT16_TYPE__ int16_t;
- typedef __UINT16_TYPE__ uint16_t;
- typedef __INT32_TYPE__ int32_t;
- typedef __UINT32_TYPE__ uint32_t;
- typedef __INT64_TYPE__ int64_t;
- typedef __UINT64_TYPE__ uint64_t;
- typedef __INTPTR_TYPE__ intptr_t;
- typedef __UINTPTR_TYPE__ uintptr_t;
- typedef __SIZE_TYPE__ size_t;
- typedef __PTRDIFF_TYPE__ ptrdiff_t;
- typedef unsigned short unichar;
- extern "C"
- {
- int printf(const char * __restrict, ...);
- }
- typedef signed char BOOL;
- void
- $__lldb_expr(void *$__lldb_arg)
- {
- ;
- #line 1 "<user expression 1>"
- (int*)100 + (long long)(&Foo::Bar)
- ;
- #line 1 "<lldb wrapper suffix>"
- }
- Frame has language of type c++14
- Using x86_64-unknown-linux-gnu as the target triple
- Using SIMD alignment: 128
- Target datalayout string: 'e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128'
- Target ABI: ''
- Target vector alignment: 0
- TransformTopLevelDecl(int8_t)
- TransformTopLevelDecl(uint8_t)
- TransformTopLevelDecl(int16_t)
- TransformTopLevelDecl(uint16_t)
- TransformTopLevelDecl(int32_t)
- TransformTopLevelDecl(uint32_t)
- TransformTopLevelDecl(int64_t)
- TransformTopLevelDecl(uint64_t)
- TransformTopLevelDecl(intptr_t)
- TransformTopLevelDecl(uintptr_t)
- TransformTopLevelDecl(size_t)
- TransformTopLevelDecl(ptrdiff_t)
- TransformTopLevelDecl(unichar)
- TransformTopLevelDecl(printf)
- TransformTopLevelDecl(BOOL)
- ClangExpressionDeclMap::FindExternalVisibleDecls for '$__lldb_arg' in a 'TranslationUnit'
- CEDM::FEVD Searching the root namespace
- ClangASTSource::FindExternalVisibleDecls on (ASTContext*)0x0000555FC5FD5F40 'Expression ASTContext for '<user expression 1>'' for '$__lldb_arg' in a 'TranslationUnit'
- CAS::FEVD Searching the root namespace
- ClangExpressionDeclMap::FindExternalVisibleDecls for '$__lldb_expr' in a 'TranslationUnit'
- CEDM::FEVD Searching the root namespace
- ClangASTSource::FindExternalVisibleDecls on (ASTContext*)0x0000555FC5FD5F40 'Expression ASTContext for '<user expression 1>'' for '$__lldb_expr' in a 'TranslationUnit'
- CAS::FEVD Searching the root namespace
- ClangExpressionDeclMap::FindExternalVisibleDecls for 'Foo' in a 'TranslationUnit'
- CEDM::FEVD Searching the root namespace
- ClangASTSource::FindExternalVisibleDecls on (ASTContext*)0x0000555FC5FD5F40 'Expression ASTContext for '<user expression 1>'' for 'Foo' in a 'TranslationUnit'
- CAS::FEVD Searching the root namespace
- CAS::FEVD Matching type found for "Foo": Foo
- [ClangASTImporter] Imported (CXXRecordDecl*)0x0000555FC600D1B8, named Foo (from (Decl*)0x0000555FC5DE1268), metadata 61
- [ClangASTImporter] Decl has no origin information in (ASTContext*)0x0000555FC5DD45E0
- [ClangASTImporter] To is a TagDecl - attributes Lexical [complete->complete]
- FindExternalLexicalDecls on (ASTContext*)0x0000555FC5FD5F40 'Expression ASTContext for '<user expression 1>'' in 'Foo' (%sDecl*)CXXRecord
- FELD Original decl 0x0000555FC5DD45E0 (Decl*)0x0000555fc5de1268:
- CXXRecordDecl 0x555fc5de1268 <<invalid sloc>> <invalid sloc> struct Foo definition
- |-DefinitionData pass_in_registers empty aggregate standard_layout trivially_copyable pod trivial literal has_constexpr_non_copy_move_ctor can_const_default_init
- | |-DefaultConstructor exists trivial constexpr needs_implicit defaulted_is_constexpr
- | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param
- | |-MoveConstructor exists simple trivial needs_implicit
- | |-CopyAssignment simple trivial has_const_param needs_implicit implicit_has_const_param
- | |-MoveAssignment exists simple trivial needs_implicit
- | `-Destructor simple irrelevant trivial needs_implicit
- `-VarDecl 0x555fc5de13a0 <<invalid sloc>> <invalid sloc> Bar 'int' static
- FELD Adding [to CXXRecordDecl Foo] lexical VarDecl VarDecl 0x555fc5de13a0 <<invalid sloc>> <invalid sloc> Bar 'int' static
- [ClangASTImporter] Imported (VarDecl*)0x0000555FC600D308, named Bar (from (Decl*)0x0000555FC5DE13A0), metadata 18446744073709551615
- [ClangASTImporter] Decl has no origin information in (ASTContext*)0x0000555FC5DD45E0
- TransformTopLevelDecl($__lldb_expr)
- Untransformed function AST:
- void $__lldb_expr(void *$__lldb_arg) {
- ;
- (int *)100 + (long long)(&Foo::Bar);
- }
- Last statement is an rvalue with type: int *
- Transformed function AST:
- void $__lldb_expr(void *$__lldb_arg) {
- ;
- static int *$__lldb_expr_result(int *)100 + (long long)(&Foo::Bar);
- }
- Found function _Z12$__lldb_exprPv for $__lldb_expr
- PrepareForExecution - Current expression language is c++14
- Module as passed in to IRForTarget:
- "; ModuleID = '$__lldb_module'
- source_filename = "$__lldb_module"
- target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
- target triple = "x86_64-unknown-linux-gnu"
- @"_ZZ12$__lldb_exprPvE19$__lldb_expr_result" = internal global i32* null, align 8
- @"_ZGVZ12$__lldb_exprPvE19$__lldb_expr_result" = internal global i8 0, align 1
- @_ZN3Foo3BarE = external global i32, align 4
- ; Function Attrs: convergent mustprogress noinline nounwind optnone
- define dso_local void @"_Z12$__lldb_exprPv"(i8* noundef %"$__lldb_arg") #0 {
- entry:
- %"$__lldb_arg.addr" = alloca i8*, align 8, !clang.decl.ptr !6
- store i8* %"$__lldb_arg", i8** %"$__lldb_arg.addr", align 8
- %0 = load i8, i8* @"_ZGVZ12$__lldb_exprPvE19$__lldb_expr_result", align 1
- %guard.uninitialized = icmp eq i8 %0, 0
- br i1 %guard.uninitialized, label %init.check, label %init.end, !prof !7
- init.check: ; preds = %entry
- store i32* getelementptr inbounds (i32, i32* inttoptr (i64 100 to i32*), i64 ptrtoint (i32* @_ZN3Foo3BarE to i64)), i32** @"_ZZ12$__lldb_exprPvE19$__lldb_expr_result", align 8
- store i8 1, i8* @"_ZGVZ12$__lldb_exprPvE19$__lldb_expr_result", align 1
- br label %init.end
- init.end: ; preds = %init.check, %entry
- ret void
- }
- attributes #0 = { convergent mustprogress noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-builtins" "no-trapping-math"="true" "stack-protector-buffer-size"="0" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
- !clang.global.decl.ptrs = !{!0, !1, !0, !2}
- !llvm.module.flags = !{!3, !4}
- !llvm.ident = !{!5}
- !0 = !{i32** @"_ZZ12$__lldb_exprPvE19$__lldb_expr_result", i64 93869831910512}
- !1 = !{void (i8*)* @"_Z12$__lldb_exprPv", i64 93869832196200}
- !2 = !{i32* @_ZN3Foo3BarE, i64 93869832196872}
- !3 = !{i32 1, !"wchar_size", i32 4}
- !4 = !{i32 7, !"frame-pointer", i32 2}
- !5 = !{!"clang version 14.0.0 (https://github.com/llvm/llvm-project.git d89490db70ebc6438db507a20ac9558e822f1453)"}
- !6 = !{i64 93869832195976}
- !7 = !{!"branch_weights", i32 1, i32 1048575}
- "
- Result name: "_ZZ12$__lldb_exprPvE19$__lldb_expr_result"
- Found result in the IR: "@"_ZZ12$__lldb_exprPvE19$__lldb_expr_result" = internal global i32* null, align 8"
- Found result decl: "static int *$__lldb_expr_result(int *)100 + (long long)(&Foo::Bar)"
- Result decl type: "int *"
- Creating a new result global: "$RESULT_NAME" with size 8
- Replacing "@"_ZZ12$__lldb_exprPvE19$__lldb_expr_result" = internal global i32* null, align 8" with "@"$RESULT_NAME" = external global i32*"
- [ClangASTImporter] DeportType called on (int *Type*)0x0000555FC600D150 from (ASTContext*)0x0000555FC5FD5F40 to (ASTContext*)0x0000555FC5F58FA0
- Module after creating the result variable:
- "; ModuleID = '$__lldb_module'
- source_filename = "$__lldb_module"
- target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
- target triple = "x86_64-unknown-linux-gnu"
- @"_ZGVZ12$__lldb_exprPvE19$__lldb_expr_result" = internal global i8 0, align 1
- @_ZN3Foo3BarE = external global i32, align 4
- @reloc_placeholder = internal global i8 0
- @"$RESULT_NAME" = external global i32*
- ; Function Attrs: convergent mustprogress noinline nounwind optnone
- define dso_local void @"_Z12$__lldb_exprPv"(i8* noundef %"$__lldb_arg") #0 {
- entry:
- %"$__lldb_arg.addr" = alloca i8*, align 8, !clang.decl.ptr !7
- store i8* %"$__lldb_arg", i8** %"$__lldb_arg.addr", align 8
- %0 = load i8, i8* @"_ZGVZ12$__lldb_exprPvE19$__lldb_expr_result", align 1
- %guard.uninitialized = icmp eq i8 %0, 0
- br i1 %guard.uninitialized, label %init.check, label %init.end, !prof !8
- init.check: ; preds = %entry
- store i32* getelementptr inbounds (i32, i32* inttoptr (i64 100 to i32*), i64 ptrtoint (i32* @_ZN3Foo3BarE to i64)), i32** @"$RESULT_NAME", align 8
- store i8 1, i8* @"_ZGVZ12$__lldb_exprPvE19$__lldb_expr_result", align 1
- br label %init.end
- init.end: ; preds = %init.check, %entry
- ret void
- }
- attributes #0 = { convergent mustprogress noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-builtins" "no-trapping-math"="true" "stack-protector-buffer-size"="0" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
- !clang.global.decl.ptrs = !{!0, !1, !0, !2, !3}
- !llvm.module.flags = !{!4, !5}
- !llvm.ident = !{!6}
- !0 = distinct !{i32** @"$RESULT_NAME", i64 93869831910512}
- !1 = !{void (i8*)* @"_Z12$__lldb_exprPv", i64 93869832196200}
- !2 = !{i32* @_ZN3Foo3BarE, i64 93869832196872}
- !3 = !{i32** @"$RESULT_NAME", i64 93869831910512}
- !4 = !{i32 1, !"wchar_size", i32 4}
- !5 = !{i32 7, !"frame-pointer", i32 2}
- !6 = !{!"clang version 14.0.0 (https://github.com/llvm/llvm-project.git d89490db70ebc6438db507a20ac9558e822f1453)"}
- !7 = !{i64 93869832195976}
- !8 = !{!"branch_weights", i32 1, i32 1048575}
- "
- Examining _ZGVZ12$__lldb_exprPvE19$__lldb_expr_result, DeclForGlobalValue returns 0x0000000000000000
- Examining _ZN3Foo3BarE, DeclForGlobalValue returns 0x0000555FC600D308
- MaybeHandleVariable (@_ZN3Foo3BarE = external global i32, align 4)
- Type of "Bar" is [clang "int", llvm "i32*"] [size 4, align 4]
- Examining reloc_placeholder, DeclForGlobalValue returns 0x0000000000000000
- Examining $RESULT_NAME, DeclForGlobalValue returns 0x0000555FC5FC7470
- MaybeHandleVariable (@"$RESULT_NAME" = external global i32*)
- Type of "$__lldb_expr_result" is [clang "int **", llvm "i32***"] [size 8, align 8]
- Adding value for (NamedDecl*)0x0000555FC5FC7470 [$__lldb_expr_result - $RESULT_NAME] to the structure
- Already placed at 0x0
- Placed at 0x0
- Element arrangement:
- Arg: "i8* %"$__lldb_arg""
- "$RESULT_NAME" ("$__lldb_expr_result") placed at 0
- Replacing [@"$RESULT_NAME" = external global i32*]
- Total structure [align 8, size 8]
- Module after preparing for execution:
- "; ModuleID = '$__lldb_module'
- source_filename = "$__lldb_module"
- target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
- target triple = "x86_64-unknown-linux-gnu"
- @"_ZGVZ12$__lldb_exprPvE19$__lldb_expr_result" = internal global i8 0, align 1
- @_ZN3Foo3BarE = external global i32, align 4
- @reloc_placeholder = internal global i8 0
- ; Function Attrs: convergent mustprogress noinline nounwind optnone
- define dso_local void @"_Z12$__lldb_exprPv"(i8* noundef %"$__lldb_arg") #0 {
- entry:
- %0 = getelementptr i8, i8* %"$__lldb_arg", i32 0
- %1 = bitcast i8* %0 to i32***
- %2 = load i32**, i32*** %1, align 8
- %"$__lldb_arg.addr" = alloca i8*, align 8, !clang.decl.ptr !7
- store i8* %"$__lldb_arg", i8** %"$__lldb_arg.addr", align 8
- %guard.uninitialized = icmp eq i8 0, 0
- br i1 %guard.uninitialized, label %init.check, label %init.end, !prof !8
- init.check: ; preds = %entry
- store i32* getelementptr inbounds (i32, i32* inttoptr (i64 100 to i32*), i64 ptrtoint (i32* @_ZN3Foo3BarE to i64)), i32** %2, align 8
- br label %init.end
- init.end: ; preds = %init.check, %entry
- ret void
- }
- attributes #0 = { convergent mustprogress noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-builtins" "no-trapping-math"="true" "stack-protector-buffer-size"="0" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
- !clang.global.decl.ptrs = !{!0, !1, !0, !2, !3}
- !llvm.module.flags = !{!4, !5}
- !llvm.ident = !{!6}
- !0 = distinct !{null, i64 93869831910512}
- !1 = !{void (i8*)* @"_Z12$__lldb_exprPv", i64 93869832196200}
- !2 = !{i32* @_ZN3Foo3BarE, i64 93869832196872}
- !3 = distinct !{null, i64 93869831910512}
- !4 = !{i32 1, !"wchar_size", i32 4}
- !5 = !{i32 7, !"frame-pointer", i32 2}
- !6 = !{!"clang version 14.0.0 (https://github.com/llvm/llvm-project.git d89490db70ebc6438db507a20ac9558e822f1453)"}
- !7 = !{i64 93869832195976}
- !8 = !{!"branch_weights", i32 1, i32 1048575}
- "
- [ClangASTImporter] Forgetting destination (ASTContext*)0x0000555FC5FD5F40
- [ClangASTImporter] Forgetting source->dest (ASTContext*)0x0000555FC5FD5F40->(ASTContext*)0x0000555FC5F58FA0
- == [UserExpression::Evaluate] Executing expression ==
- IRMemoryMap::Malloc (15, 0x8, 0x3, eAllocationPolicyHostOnly) -> 0x7ffff7fca000
- IRMemoryMap::Malloc (524295, 0x8, 0x3, eAllocationPolicyHostOnly) -> 0x7ffff79f6000
- IRMemoryMap::Malloc process_sp=0x555fc5de9ed0, process_sp->CanJIT()=true, process_sp->IsAlive()=true
- IRMemoryMap::WriteMemory (0x7ffff7fca010, 0x555fc5cf38b0, 0x8) went to [0x7ffff7fca010..0x7ffff7fca01f)
- IRMemoryMap::Malloc (15, 0x8, 0x3, eAllocationPolicyMirror) -> 0x7ffff7fca010
- IRMemoryMap::WriteMemory (0x7ffff7fca000, 0x7ffd03bc9ef0, 0x8) went to [0x7ffff7fca000..0x7ffff7fca00f)
- Materializer::Materialize (frame_sp = 0x7f718c380640, process_address = 0x7ffff7fca000) materialized:
- IRMemoryMap::ReadMemory (0x7ffff7fca000, 0x555fc5c4ed00, 0x8) came from [0x7ffff7fca000..0x7ffff7fca00f)
- IRMemoryMap::ReadMemory (0x7ffff7fca010, 0x555fc5c4ed00, 0x8) came from [0x7ffff7fca010..0x7ffff7fca01f)
- 0x7ffff7fca000: EntityResultVariable
- Pointer:
- 0x7ffff7fca000: 10 a0 fc f7 ff 7f 00 00
- Temporary allocation:
- 0x7ffff7fca000: 00 00 00 00 00 00 00 00
- Module as passed in to IRInterpreter::Interpret:
- "; ModuleID = '$__lldb_module'
- source_filename = "$__lldb_module"
- target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
- target triple = "x86_64-unknown-linux-gnu"
- @"_ZGVZ12$__lldb_exprPvE19$__lldb_expr_result" = internal global i8 0, align 1
- @_ZN3Foo3BarE = external global i32, align 4
- @reloc_placeholder = internal global i8 0
- ; Function Attrs: convergent mustprogress noinline nounwind optnone
- define dso_local void @"_Z12$__lldb_exprPv"(i8* noundef %"$__lldb_arg") #0 {
- entry:
- %0 = getelementptr i8, i8* %"$__lldb_arg", i32 0
- %1 = bitcast i8* %0 to i32***
- %2 = load i32**, i32*** %1, align 8
- %"$__lldb_arg.addr" = alloca i8*, align 8, !clang.decl.ptr !7
- store i8* %"$__lldb_arg", i8** %"$__lldb_arg.addr", align 8
- %guard.uninitialized = icmp eq i8 0, 0
- br i1 %guard.uninitialized, label %init.check, label %init.end, !prof !8
- init.check: ; preds = %entry
- store i32* getelementptr inbounds (i32, i32* inttoptr (i64 100 to i32*), i64 ptrtoint (i32* @_ZN3Foo3BarE to i64)), i32** %2, align 8
- br label %init.end
- init.end: ; preds = %init.check, %entry
- ret void
- }
- attributes #0 = { convergent mustprogress noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-builtins" "no-trapping-math"="true" "stack-protector-buffer-size"="0" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
- !clang.global.decl.ptrs = !{!0, !1, !0, !2, !3}
- !llvm.module.flags = !{!4, !5}
- !llvm.ident = !{!6}
- !0 = distinct !{null, i64 93869831910512}
- !1 = !{void (i8*)* @"_Z12$__lldb_exprPv", i64 93869832196200}
- !2 = !{i32* @_ZN3Foo3BarE, i64 93869832196872}
- !3 = distinct !{null, i64 93869831910512}
- !4 = !{i32 1, !"wchar_size", i32 4}
- !5 = !{i32 7, !"frame-pointer", i32 2}
- !6 = !{!"clang version 14.0.0 (https://github.com/llvm/llvm-project.git d89490db70ebc6438db507a20ac9558e822f1453)"}
- !7 = !{i64 93869832195976}
- !8 = !{!"branch_weights", i32 1, i32 1048575}
- "
- IRMemoryMap::WriteMemory (0x7ffff7a75ff8, 0x7ffd03bc9ae0, 0x8) went to [0x7ffff79f6000..0x7ffff7a76007)
- Made an allocation for argument i8* %"$__lldb_arg"
- Data region : 7ffff7fca000
- Ref region : 7ffff7a75ff8
- Interpreting %0 = getelementptr i8, i8* %"$__lldb_arg", i32 0
- IRMemoryMap::WriteMemory (0x7ffff7a75ff0, 0x555fc5c35270, 0x8) went to [0x7ffff79f6000..0x7ffff7a76007)
- Interpreted a GetElementPtrInst
- P : i8* %"$__lldb_arg" 0x7ffff7a75ff8
- Poffset : %0 = getelementptr i8, i8* %"$__lldb_arg", i32 0 0x7ffff7a75ff0
- Interpreting %1 = bitcast i8* %0 to i32***
- IRMemoryMap::WriteMemory (0x7ffff7a75fe8, 0x555fc5c35270, 0x8) went to [0x7ffff79f6000..0x7ffff7a76007)
- Interpreting %2 = load i32**, i32*** %1, align 8
- IRMemoryMap::ReadMemory (0x7ffff7a75fe8, 0x555fc5c35270, 0x8) came from [0x7ffff79f6000..0x7ffff7a76007)
- IRMemoryMap::ReadMemory (0x7ffff7fca000, 0x555fc5c35270, 0x8) came from [0x7ffff7fca000..0x7ffff7fca00f)
- IRMemoryMap::WriteMemory (0x7ffff7a75fe0, 0x555fc5c35270, 0x8) went to [0x7ffff79f6000..0x7ffff7a76007)
- Interpreted a LoadInst
- P : 0x7ffff7a75fe8
- R : 0x7ffff7fca000
- D : 0x7ffff7a75fe0
- Interpreting %"$__lldb_arg.addr" = alloca i8*, align 8, !clang.decl.ptr !7
- IRMemoryMap::WriteMemory (0x7ffff7a75fd0, 0x7ffd03bc9ae0, 0x8) went to [0x7ffff79f6000..0x7ffff7a76007)
- Interpreted an AllocaInst
- R : 0x7ffff7a75fd8
- P : 0x7ffff7a75fd0
- Interpreting store i8* %"$__lldb_arg", i8** %"$__lldb_arg.addr", align 8
- IRMemoryMap::ReadMemory (0x7ffff7a75fd0, 0x555fc5d569b0, 0x8) came from [0x7ffff79f6000..0x7ffff7a76007)
- IRMemoryMap::ReadMemory (0x7ffff7a75ff8, 0x555fc5d569b0, 0x8) came from [0x7ffff79f6000..0x7ffff7a76007)
- IRMemoryMap::WriteMemory (0x7ffff7a75fd8, 0x555fc5d569b0, 0x8) went to [0x7ffff79f6000..0x7ffff7a76007)
- Interpreted a StoreInst
- D : 0x7ffff7a75ff8
- P : 0x7ffff7a75fd0
- R : 0x7ffff7a75fd8
- Interpreting %guard.uninitialized = icmp eq i8 0, 0
- IRMemoryMap::WriteMemory (0x7ffff7a75fcf, 0x555fc5d569b0, 0x1) went to [0x7ffff79f6000..0x7ffff7a76007)
- Interpreted an ICmpInst
- L : i8 0
- R : i8 0
- = : %guard.uninitialized = icmp eq i8 0, 0 0x7ffff7a75fcf
- Interpreting br i1 %guard.uninitialized, label %init.check, label %init.end, !prof !8
- Interpreted a BrInst with a condition
- cond : %guard.uninitialized = icmp eq i8 0, 0 0x7ffff7a75fcf
- Interpreting store i32* getelementptr inbounds (i32, i32* inttoptr (i64 100 to i32*), i64 ptrtoint (i32* @_ZN3Foo3BarE to i64)), i32** %2, align 8
- PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
- Stack dump:
- 0. Program arguments: /home/werat/git/llvm-project/build_x64_optdebug/bin/lldb a.out
- #0 0x0000555fc564219d llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (.localalias) /home/werat/git/llvm-project/llvm/lib/Support/Unix/Signals.inc:569:3
- #1 0x0000555fc56406e4 llvm::sys::RunSignalHandlers() (.localalias) /home/werat/git/llvm-project/llvm/lib/Support/Signals.cpp:97:20
- #2 0x0000555fc564085e SignalHandler(int) /home/werat/git/llvm-project/llvm/lib/Support/Unix/Signals.inc:407:1
- #3 0x00007f71da1ce8e0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x138e0)
- #4 0x00007f71d6c85300 llvm::APInt::getSExtValue() const /home/werat/git/llvm-project/llvm/include/llvm/ADT/APInt.h:1478:29
- #5 0x00007f71d6c85300 llvm::ConstantInt::getSExtValue() const /home/werat/git/llvm-project/llvm/include/llvm/IR/Constants.h:148:64
- #6 0x00007f71d6c85300 llvm::DataLayout::getIndexedOffsetInType(llvm::Type*, llvm::ArrayRef<llvm::Value*>) const /home/werat/git/llvm-project/llvm/lib/IR/DataLayout.cpp:896:66
- #7 0x00007f71d4ff7b66 InterpreterStackFrame::ResolveConstantValue(llvm::APInt&, llvm::Constant const*) /home/werat/git/llvm-project/lldb/source/Expression/IRInterpreter.cpp:290:51
- #8 0x00007f71d4ff837a InterpreterStackFrame::ResolveConstant(unsigned long, llvm::Constant const*) /home/werat/git/llvm-project/lldb/source/Expression/IRInterpreter.cpp:345:30
- #9 0x00007f71d4ff8732 InterpreterStackFrame::ResolveValue(llvm::Value const*, llvm::Module&) (.isra.0) /home/werat/git/llvm-project/lldb/source/Expression/IRInterpreter.cpp:422:7
- #10 0x00007f71d4ffa827 IRInterpreter::Interpret(llvm::Module&, llvm::Function&, llvm::ArrayRef<unsigned long>, lldb_private::IRExecutionUnit&, lldb_private::Status&, unsigned long, unsigned long, lldb_private::ExecutionContext&) /home/werat/git/llvm-project/lldb/source/Expression/IRInterpreter.cpp:1277:42
- #11 0x00007f71d4fffec1 lldb_private::LLVMUserExpression::DoExecute(lldb_private::DiagnosticManager&, lldb_private::ExecutionContext&, lldb_private::EvaluateExpressionOptions const&, std::shared_ptr<lldb_private::UserExpression>&, std::shared_ptr<lldb_private::ExpressionVariable>&) (.localalias) /home/werat/git/llvm-project/lldb/source/Expression/LLVMUserExpression.cpp:123:35
- #12 0x00007f71d3423591 lldb_private::UserExpression::Execute(lldb_private::DiagnosticManager&, lldb_private::ExecutionContext&, lldb_private::EvaluateExpressionOptions const&, std::shared_ptr<lldb_private::UserExpression>&, std::shared_ptr<lldb_private::ExpressionVariable>&) (.localalias) /home/werat/git/llvm-project/lldb/source/Expression/UserExpression.cpp:401:40
- #13 0x00007f71d342459d lldb_private::UserExpression::Evaluate(lldb_private::ExecutionContext&, lldb_private::EvaluateExpressionOptions const&, llvm::StringRef, llvm::StringRef, std::shared_ptr<lldb_private::ValueObject>&, lldb_private::Status&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, lldb_private::ValueObject*) /home/werat/git/llvm-project/lldb/source/Expression/UserExpression.cpp:346:38
- #14 0x00007f71d35501aa lldb_private::Target::EvaluateExpression(llvm::StringRef, lldb_private::ExecutionContextScope*, std::shared_ptr<lldb_private::ValueObject>&, lldb_private::EvaluateExpressionOptions const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, lldb_private::ValueObject*) /home/werat/git/llvm-project/lldb/source/Target/Target.cpp:2432:12
- #15 0x00007f71d4e78001 lldb_private::CommandObjectExpression::EvaluateExpression(llvm::StringRef, lldb_private::Stream&, lldb_private::Stream&, lldb_private::CommandReturnObject&) (.localalias) /home/werat/git/llvm-project/lldb/source/Commands/CommandObjectExpression.cpp:423:35
- #16 0x00007f71d4e7912f lldb_private::CommandObjectExpression::DoExecute(llvm::StringRef, lldb_private::CommandReturnObject&) (.localalias) /home/werat/git/llvm-project/lldb/source/Commands/CommandObjectExpression.cpp:645:25
- #17 0x00007f71d345e3d7 lldb_private::CommandObjectRaw::Execute(char const*, lldb_private::CommandReturnObject&) (.localalias) /home/werat/git/llvm-project/lldb/source/Interpreter/CommandObject.cpp:1017:26
- #18 0x00007f71d345b037 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_data() const /usr/include/c++/10/bits/basic_string.h:195:28
- #19 0x00007f71d345b037 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_is_local() const /usr/include/c++/10/bits/basic_string.h:230:23
- #20 0x00007f71d345b037 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose() /usr/include/c++/10/bits/basic_string.h:239:18
- #21 0x00007f71d345b037 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() /usr/include/c++/10/bits/basic_string.h:671:19
- #22 0x00007f71d345b037 lldb_private::CommandInterpreter::HandleCommand(char const*, lldb_private::LazyBool, lldb_private::CommandReturnObject&) (.localalias) /home/werat/git/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:1957:17
- #23 0x00007f71d345b47f lldb_private::CommandInterpreter::IOHandlerInputComplete(lldb_private::IOHandler&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) /home/werat/git/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:3024:24
- #24 0x00007f71d3395431 lldb_private::IOHandlerEditline::Run() (.localalias) /home/werat/git/llvm-project/lldb/source/Core/IOHandler.cpp:576:44
- #25 0x00007f71d3372561 __gthread_mutex_lock /usr/include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:748:3
- #26 0x00007f71d3372561 __gthread_recursive_mutex_lock /usr/include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:811:31
- #27 0x00007f71d3372561 std::recursive_mutex::lock() /usr/include/c++/10/mutex:106:47
- #28 0x00007f71d3372561 std::lock_guard<std::recursive_mutex>::lock_guard(std::recursive_mutex&) /usr/include/c++/10/bits/std_mutex.h:159:23
- #29 0x00007f71d3372561 lldb_private::Debugger::RunIOHandlers() (.localalias) /home/werat/git/llvm-project/lldb/source/Core/Debugger.cpp:880:41
- #30 0x00007f71d344ca10 lldb_private::CommandInterpreterRunOptions::DefaultToYes(lldb_private::LazyBool) /home/werat/git/llvm-project/lldb/include/lldb/Interpreter/CommandInterpreter.h:196:5
- #31 0x00007f71d344ca10 lldb_private::CommandInterpreterRunOptions::GetAutoHandleEvents() const /home/werat/git/llvm-project/lldb/include/lldb/Interpreter/CommandInterpreter.h:170:24
- #32 0x00007f71d344ca10 lldb_private::CommandInterpreter::RunCommandInterpreter(lldb_private::CommandInterpreterRunOptions&) /home/werat/git/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:3269:36
- #33 0x00007f71d303296c lldb::SBDebugger::RunCommandInterpreter(bool, bool) (.localalias) /home/werat/git/llvm-project/lldb/source/API/SBDebugger.cpp:1203:3
- #34 0x0000555fc5629d1f reset_stdin_termios /home/werat/git/llvm-project/lldb/tools/driver/Driver.cpp:102:3
- #35 0x0000555fc5629d1f Driver::MainLoop() (.localalias) /home/werat/git/llvm-project/lldb/tools/driver/Driver.cpp:681:22
- #36 0x0000555fc562889e main /home/werat/git/llvm-project/lldb/tools/driver/Driver.cpp:945:34
- #37 0x00007f71d1ed0e4a __libc_start_main ./csu/../csu/libc-start.c:314:16
- #38 0x0000555fc562894a _start (/home/werat/git/llvm-project/build_x64_optdebug/bin/lldb+0x894a)
- [1] 514649 segmentation fault LLVM_SYMBOLIZER_PATH=llvm-symbolizer-11 a.out
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement