<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - "expr/x $eax" fails on FreeBSD after r244308"
href="https://llvm.org/bugs/show_bug.cgi?id=24416">24416</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>"expr/x $eax" fails on FreeBSD after r244308
</td>
</tr>
<tr>
<th>Product</th>
<td>lldb
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>FreeBSD
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>lldb-dev@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Reporter</th>
<td>emaste@freebsd.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Found by test_register_expressions TestRegisters RegisterCommandsTestCase
lldb-3.8.0 ABISysV_x86_64::PrepareTrivialCall (tid = 0x191cc, sp =
0x7fffffffddd0, func_addr = 0x800d282c0, return_addr = 0x401d40, arg1 = 0x0,
arg2 = 0x1000, arg3 = 0x7, arg4 = 0x1002, arg5 = 0xffffffffffffffff, arg6 =
0x0)
lldb-3.8.0 About to write arg1 (0x0) into rdi
lldb-3.8.0 About to write arg2 (0x1000) into rsi
lldb-3.8.0 About to write arg3 (0x7) into rdx
lldb-3.8.0 About to write arg4 (0x1002) into rcx
lldb-3.8.0 About to write arg5 (0xffffffffffffffff) into r8
lldb-3.8.0 About to write arg6 (0x0) into r9
lldb-3.8.0 16-byte aligning SP: 0x7fffffffddd0 to 0x7fffffffddd0
lldb-3.8.0 Pushing the return address onto the stack: 0x7fffffffddc8: 0x401d40
lldb-3.8.0 Writing SP: 0x7fffffffddc8
lldb-3.8.0 Writing IP: 0x800d282c0
lldb-3.8.0 == [ClangUserExpression::Evaluate] Parsing expression $eax ==
lldb-3.8.0 ClangUserExpression::ScanContext()
lldb-3.8.0 Parsing the following code:
#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)
{
$eax;
}
lldb-3.8.0 LayoutRecordType[0] on (ASTContext*)0x80a9c9000 for
(RecordDecl*)0x80a9d69a0 [name = '_objc_super']
lldb-3.8.0 LayoutRecordType[1] on (ASTContext*)0x80a9c9000 for
(RecordDecl*)0x80a9d6c70 [name = '_message_ref_t']
lldb-3.8.0 ClangExpressionDeclMap::FindExternalVisibleDecls[0] for
'$__lldb_arg' in a 'TranslationUnit'
lldb-3.8.0 CEDM::FEVD[0] Searching the root namespace
lldb-3.8.0 ClangASTSource::FindExternalVisibleDecls[0] on
(ASTContext*)0x80a9c9000 for '$__lldb_arg' in a 'TranslationUnit'
lldb-3.8.0 CAS::FEVD[0] Searching the root namespace
lldb-3.8.0 ClangExpressionDeclMap::FindExternalVisibleDecls[1] for
'$__lldb_expr' in a 'TranslationUnit'
lldb-3.8.0 CEDM::FEVD[1] Searching the root namespace
lldb-3.8.0 ClangASTSource::FindExternalVisibleDecls[1] on
(ASTContext*)0x80a9c9000 for '$__lldb_expr' in a 'TranslationUnit'
lldb-3.8.0 CAS::FEVD[1] Searching the root namespace
lldb-3.8.0 ClangExpressionDeclMap::FindExternalVisibleDecls[2] for '$eax' in a
'TranslationUnit'
lldb-3.8.0 CEDM::FEVD[2] Searching the root namespace
lldb-3.8.0 CEDM::FEVD[2] Found register eax
lldb-3.8.0 CEDM::FEVD[2] Added register $eax, returned static unsigned int
$eax
lldb-3.8.0 ClangASTSource::FindExternalVisibleDecls[2] on
(ASTContext*)0x80a9c9000 for '$eax' in a 'TranslationUnit'
lldb-3.8.0 CAS::FEVD[2] Searching the root namespace
lldb-3.8.0 Last statement is an lvalue with type: unsigned int
lldb-3.8.0 Found function _Z12$__lldb_exprPv for $__lldb_expr
lldb-3.8.0 Module as passed in to IRForTarget:
"; ModuleID = '$__lldb_module'
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-freebsd10.1"
@"_ZZ12$__lldb_exprPvE23$__lldb_expr_result_ptr" = internal global i32*
@"_ZL4$eax", align 8
@"_ZL4$eax" = external global i32, align 4
; Function Attrs: nounwind
define void @"_Z12$__lldb_exprPv"(i8* %"$__lldb_arg") #0 {
entry:
%"$__lldb_arg.addr" = alloca i8*, align 8, !clang.decl.ptr !8
store i8* %"$__lldb_arg", i8** %"$__lldb_arg.addr", align 8
ret void
}
attributes #0 = { nounwind "disable-tail-calls"="false"
"less-precise-fpmad"="false" "no-frame-pointer-elim"="true"
"no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false"
"no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="0"
"target-features"="+sse,+sse2" "unsafe-fp-math"="false"
"use-soft-float"="false" }
!clang.global.decl.ptrs = !{!0, !1, !0, !2}
!llvm.module.flags = !{!3, !4, !5, !6}
!llvm.ident = !{!7}
!0 = !{i32** @"_ZZ12$__lldb_exprPvE23$__lldb_expr_result_ptr", i64 34538040904}
!1 = !{void (i8*)* @"_Z12$__lldb_exprPv", i64 34538040496}
!2 = !{i32* @"_ZL4$eax", i64 34538040696}
!3 = !{i32 1, !"Objective-C Version", i32 2}
!4 = !{i32 1, !"Objective-C Image Info Version", i32 0}
!5 = !{i32 1, !"Objective-C Image Info Section", !"__DATA, __objc_imageinfo,
regular, no_dead_strip"}
!6 = !{i32 4, !"Objective-C Garbage Collection", i32 0}
!7 = !{!"clang version 3.8.0 (<a href="http://llvm.org/git/clang.git">http://llvm.org/git/clang.git</a>
d5ce1fd9c90ff12f6dead706043560936d02636b)"}
!8 = !{i64 34538040280}
"
lldb-3.8.0 Result name: "_ZZ12$__lldb_exprPvE23$__lldb_expr_result_ptr"
lldb-3.8.0 Found result in the IR:
"@"_ZZ12$__lldb_exprPvE23$__lldb_expr_result_ptr" = internal global i32*
@"_ZL4$eax", align 8"
lldb-3.8.0 Found result decl: "static unsigned int
*$__lldb_expr_result_ptr&$eax"
lldb-3.8.0 Result decl type: "unsigned int"
lldb-3.8.0 Creating a new result global: "$RESULT_NAME" with size 0x4
lldb-3.8.0 Replacing "@"_ZZ12$__lldb_exprPvE23$__lldb_expr_result_ptr" =
internal global i32* @"_ZL4$eax", align 8" with "@"$RESULT_NAME" = external
global i32*"
lldb-3.8.0 Synthesized result store " store i32* @"_ZL4$eax", i32**
@"$RESULT_NAME""
lldb-3.8.0 Examining non-declaration function _Z12$__lldb_exprPv
lldb-3.8.0 Examining _ZL4$eax, DeclForGlobalValue returns 0x80aa0ad78
lldb-3.8.0 MaybeHandleVariable (@"_ZL4$eax" = external global i32, align 4)
lldb-3.8.0 Type of "$eax" is [clang "unsigned int *", llvm "i32**"] [size 8,
align 8]
lldb-3.8.0 Adding value for (NamedDecl*)0x80aa0ad78 [$eax - $eax] to the
structure
lldb-3.8.0 Placed at 0x8
lldb-3.8.0 Examining reloc_placeholder, DeclForGlobalValue returns 0x0
lldb-3.8.0 Examining $RESULT_NAME, DeclForGlobalValue returns 0x80aa0ae48
lldb-3.8.0 MaybeHandleVariable (@"$RESULT_NAME" = external global i32*)
lldb-3.8.0 Type of "$__lldb_expr_result_ptr" is [clang "unsigned int **", llvm
"i32***"] [size 8, align 8]
lldb-3.8.0 Adding value for (NamedDecl*)0x80aa0ae48 [$__lldb_expr_result_ptr -
$RESULT_NAME] to the structure
lldb-3.8.0 Already placed at 0x0
lldb-3.8.0 Placed at 0x0
lldb-3.8.0 Element arrangement:
lldb-3.8.0 Arg: "i8* %"$__lldb_arg""
lldb-3.8.0 "$eax" ("$eax") placed at 8
lldb-3.8.0 Replacing [@"_ZL4$eax" = external global i32, align 4]
lldb-3.8.0 "$RESULT_NAME" ("$__lldb_expr_result_ptr") placed at 0
lldb-3.8.0 Replacing [@"$RESULT_NAME" = external global i32*]
lldb-3.8.0 Total structure [align 8, size 12]
lldb-3.8.0 Did remove @reloc_placeholder = internal global i8 0
lldb-3.8.0 == ClangASTMetrics output ==
lldb-3.8.0 -- Global metrics --
lldb-3.8.0 Number of visible Decl queries by name : 6
lldb-3.8.0 Number of lexical Decl queries : 0
lldb-3.8.0 Number of imports initiated by LLDB : 0
lldb-3.8.0 Number of imports conducted by Clang : 0
lldb-3.8.0 Number of Decls completed : 0
lldb-3.8.0 Number of records laid out : 2
lldb-3.8.0 -- Local metrics --
lldb-3.8.0 Number of visible Decl queries by name : 6
lldb-3.8.0 Number of lexical Decl queries : 0
lldb-3.8.0 Number of imports initiated by LLDB : 0
lldb-3.8.0 Number of imports conducted by Clang : 0
lldb-3.8.0 Number of Decls completed : 0
lldb-3.8.0 Number of records laid out : 2
lldb-3.8.0 [ClangASTImporter] Forgetting destination
(ASTContext*)0x80a9c9000
lldb-3.8.0 [ClangASTImporter] Forgetting source->dest
(ASTContext*)0x80a9c9000->(ASTContext*)0x80a97d000
lldb-3.8.0 == [ClangUserExpression::Evaluate] Executing expression ==
lldb-3.8.0 ABISysV_x86_64::PrepareTrivialCall (tid = 0x191cc, sp =
0x7fffffffddd0, func_addr = 0x800d282c0, return_addr = 0x401d40, arg1 = 0x0,
arg2 = 0x1000, arg3 = 0x3, arg4 = 0x1002, arg5 = 0xffffffffffffffff, arg6 =
0x0)
lldb-3.8.0 About to write arg1 (0x0) into rdi
lldb-3.8.0 About to write arg2 (0x1000) into rsi
lldb-3.8.0 About to write arg3 (0x3) into rdx
lldb-3.8.0 About to write arg4 (0x1002) into rcx
lldb-3.8.0 About to write arg5 (0xffffffffffffffff) into r8
lldb-3.8.0 About to write arg6 (0x0) into r9
lldb-3.8.0 16-byte aligning SP: 0x7fffffffddd0 to 0x7fffffffddd0
lldb-3.8.0 Pushing the return address onto the stack: 0x7fffffffddc8: 0x401d40
lldb-3.8.0 Writing SP: 0x7fffffffddc8
lldb-3.8.0 Writing IP: 0x800d282c0
lldb-3.8.0 IRMemoryMap::Malloc (16, 0x8, 0x3, eAllocationPolicyHostOnly) ->
0x80064d000
lldb-3.8.0 ABISysV_x86_64::PrepareTrivialCall (tid = 0x191cc, sp =
0x7fffffffddd0, func_addr = 0x800d282c0, return_addr = 0x401d40, arg1 = 0x0,
arg2 = 0x80000, arg3 = 0x3, arg4 = 0x1002, arg5 = 0xffffffffffffffff, arg6 =
0x0)
lldb-3.8.0 About to write arg1 (0x0) into rdi
lldb-3.8.0 About to write arg2 (0x80000) into rsi
lldb-3.8.0 About to write arg3 (0x3) into rdx
lldb-3.8.0 About to write arg4 (0x1002) into rcx
lldb-3.8.0 About to write arg5 (0xffffffffffffffff) into r8
lldb-3.8.0 About to write arg6 (0x0) into r9
lldb-3.8.0 16-byte aligning SP: 0x7fffffffddd0 to 0x7fffffffddd0
lldb-3.8.0 Pushing the return address onto the stack: 0x7fffffffddc8: 0x401d40
lldb-3.8.0 Writing SP: 0x7fffffffddc8
lldb-3.8.0 Writing IP: 0x800d282c0
lldb-3.8.0 IRMemoryMap::Malloc (524288, 0x8, 0x3, eAllocationPolicyHostOnly) ->
0x80064e000
lldb-3.8.0 EntityRegister::Materialize [address = 0x80064d008, m_register_info
= eax]
lldb-3.8.0 == [ClangUserExpression::Evaluate] Execution completed abnormally ==
lldb-3.8.0 IRMemoryMap::Free (0x80064d000) freed [0x80064d000..0x80064d010)
lldb-3.8.0 IRMemoryMap::Free (0x80064e000) freed [0x80064e000..0x8006ce000)
error: Couldn't materialize: data for register eax had size 8 but we expected 4
Errored out in Execute, couldn't PrepareToExecuteJITExpression</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>