Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

GDB definitions to print Scilla values. Updated tests #67

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions gdb-helper
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
define scilla_print

# Prepare a string of the value's type. '*' must be ommitted.
shell echo -n 'set $vt = "' > /tmp/gdb_scilla_value_type_nostar.tmp
pipe ptype *&$arg0 | cut -d '=' -f 2 | tr -d '\n' | tr -d '*' >> /tmp/gdb_scilla_value_type_nostar.tmp
shell echo -n '"' >> /tmp/gdb_scilla_value_type_nostar.tmp
source /tmp/gdb_scilla_value_type_nostar.tmp

# Check if the type contains a '*', indicating boxed type.
pipe ptype *&$arg0 | tee /tmp/gdb_scilla_value_type.tmp > /dev/null
shell fgrep -q '*' /tmp/gdb_scilla_value_type.tmp
set $isboxed = !$_shell_exitcode

# Print. Non-boxed values need their address taken.
if $isboxed
call (('ScillaRTL::ScillaExecImpl' *)_execptr)->gdbPrintValue($vt, (void *) $arg0)
else
call (('ScillaRTL::ScillaExecImpl' *)_execptr)->gdbPrintValue($vt, (void *) &$arg0)
end
end

document scilla_print
Print the Scilla value whose name is provided as the argument.
end
11 changes: 11 additions & 0 deletions libScillaRTL/ScillaExecImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "ScillaBuiltins.h"
#include "ScillaExecImpl.h"
#include "ScillaTypes.h"
#include "ScillaValue.h"
#include "SharedObject.h"

namespace ScillaRTL {
Expand Down Expand Up @@ -221,6 +222,16 @@ ScillaExecImpl::parseTypeString(const std::string &TStr) const {
TyDescrs.second, TStr);
}

const std::string ScillaExecImpl::gdbPrintValue(const char *Type,
const void *Value) const {
try {
auto T = parseTypeString(Type);
return ScillaValues::toString(false, T, Value);
} catch (...) {
return "Type or value error";
}
}

void ScillaExecImpl::outOfGasException(void) {
SCILLA_EXCEPTION("Ran out of gas");
}
Expand Down
3 changes: 3 additions & 0 deletions libScillaRTL/ScillaExecImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ class ScillaExecImpl {
uint64_t getGasRem() const;
// Parse a string into a Scilla type. Raises error on failure.
const ScillaTypes::Typ *parseTypeString(const std::string &) const;
// A function that can be conveniently called from GDB to print runtime
// values.
const std::string gdbPrintValue(const char *Type, const void *Value) const;
// Raise an out-of-gas exception.
static void outOfGasException(void);
// Consume N units of gas. Raise an error if we're out of gas.
Expand Down
789 changes: 433 additions & 356 deletions testsuite/contr/accept.dbg.ll

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion testsuite/contr/accept.ll
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
; ModuleID = 'Accept'
source_filename = "Accept"
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-pc-linux-gnu"
target triple = "x86_64-unknown-linux-gnu"

%"$TyDescrTy_PrimTyp_5" = type { i32, i32 }
%_TyDescrTy_Typ = type { i32, i8* }
Expand Down
15,367 changes: 8,123 additions & 7,244 deletions testsuite/contr/accounting_tests.dbg.ll

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions testsuite/contr/accounting_tests.ll
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
; ModuleID = 'AccountingTests'
source_filename = "AccountingTests"
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-pc-linux-gnu"
target triple = "x86_64-unknown-linux-gnu"

%"$TyDescrTy_PrimTyp_82" = type { i32, i32 }
%_TyDescrTy_Typ = type { i32, i8* }
Expand Down Expand Up @@ -1500,7 +1500,7 @@ declare i8* @_salloc(i8*, i64)

declare i64 @_literal_cost(%_TyDescrTy_Typ*, i8*)

; Function Attrs: nofree nosync nounwind readnone speculatable willreturn
; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn
declare i64 @llvm.umin.i64(i64, i64) #0

declare %TName_Bool* @_eq_String(i8*, %String, %String)
Expand Down Expand Up @@ -7835,4 +7835,4 @@ entry:
ret void
}

attributes #0 = { nofree nosync nounwind readnone speculatable willreturn }
attributes #0 = { nocallback nofree nosync nounwind readnone speculatable willreturn }
1,824 changes: 1,011 additions & 813 deletions testsuite/contr/accounting_tests_support.dbg.ll

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion testsuite/contr/accounting_tests_support.ll
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
; ModuleID = 'AccountingTestsSupport'
source_filename = "AccountingTestsSupport"
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-pc-linux-gnu"
target triple = "x86_64-unknown-linux-gnu"

%"$TyDescrTy_PrimTyp_2" = type { i32, i32 }
%_TyDescrTy_Typ = type { i32, i8* }
Expand Down
122 changes: 75 additions & 47 deletions testsuite/contr/cconstraint.dbg.ll

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion testsuite/contr/cconstraint.ll
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
; ModuleID = 'TestConstraint'
source_filename = "TestConstraint"
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-pc-linux-gnu"
target triple = "x86_64-unknown-linux-gnu"

%"$TyDescrTy_PrimTyp_3" = type { i32, i32 }
%_TyDescrTy_Typ = type { i32, i8* }
Expand Down
110 changes: 69 additions & 41 deletions testsuite/contr/chainid.dbg.ll
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
; ModuleID = 'HelloWorld'
source_filename = "HelloWorld"
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-pc-linux-gnu"
target triple = "x86_64-unknown-linux-gnu"

%"$TyDescrTy_PrimTyp_1" = type { i32, i32 }
%_TyDescrTy_Typ = type { i32, i8* }
Expand All @@ -13,9 +13,9 @@ target triple = "x86_64-pc-linux-gnu"
%TyDescrString = type { i8*, i32 }
%Int32 = type { i32 }
%Uint32 = type { i32 }
%"$ParamDescr_111" = type { %ParamDescrString, %_TyDescrTy_Typ* }
%"$ParamDescr_114" = type { %ParamDescrString, %_TyDescrTy_Typ* }
%ParamDescrString = type { i8*, i32 }
%"$TransDescr_112" = type { %ParamDescrString, i32, %"$ParamDescr_111"* }
%"$TransDescr_115" = type { %ParamDescrString, i32, %"$ParamDescr_114"* }
%Uint128 = type { i128 }
%BCQuery = type { i8*, i32 }
%String = type { i8*, i32 }
Expand Down Expand Up @@ -67,20 +67,20 @@ target triple = "x86_64-pc-linux-gnu"
@"$stringlit_85" = unnamed_addr constant [8 x i8] c"chain_id"
@_tydescr_table = constant [17 x %_TyDescrTy_Typ*] [%_TyDescrTy_Typ* @"$TyDescr_Event_25", %_TyDescrTy_Typ* @"$TyDescr_Int64_7", %_TyDescrTy_Typ* @"$TyDescr_Addr_40", %_TyDescrTy_Typ* @"$TyDescr_Bystr20_33", %_TyDescrTy_Typ* @"$TyDescr_Uint256_17", %_TyDescrTy_Typ* @"$TyDescr_Uint32_5", %_TyDescrTy_Typ* @"$TyDescr_Uint64_9", %_TyDescrTy_Typ* @"$TyDescr_Bnum_21", %_TyDescrTy_Typ* @"$TyDescr_Uint128_13", %_TyDescrTy_Typ* @"$TyDescr_Exception_27", %_TyDescrTy_Typ* @"$TyDescr_String_19", %_TyDescrTy_Typ* @"$TyDescr_Int256_15", %_TyDescrTy_Typ* @"$TyDescr_Int128_11", %_TyDescrTy_Typ* @"$TyDescr_Bystr_31", %_TyDescrTy_Typ* @"$TyDescr_ReplicateContr_29", %_TyDescrTy_Typ* @"$TyDescr_Message_23", %_TyDescrTy_Typ* @"$TyDescr_Int32_3"]
@_tydescr_table_length = constant i32 17
@"$pname__scilla_version_113" = unnamed_addr constant [15 x i8] c"_scilla_version"
@"$pname__this_address_114" = unnamed_addr constant [13 x i8] c"_this_address"
@"$pname__creation_block_115" = unnamed_addr constant [15 x i8] c"_creation_block"
@_contract_parameters = constant [3 x %"$ParamDescr_111"] [%"$ParamDescr_111" { %ParamDescrString { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @"$pname__scilla_version_113", i32 0, i32 0), i32 15 }, %_TyDescrTy_Typ* @"$TyDescr_Uint32_5" }, %"$ParamDescr_111" { %ParamDescrString { i8* getelementptr inbounds ([13 x i8], [13 x i8]* @"$pname__this_address_114", i32 0, i32 0), i32 13 }, %_TyDescrTy_Typ* @"$TyDescr_Bystr20_33" }, %"$ParamDescr_111" { %ParamDescrString { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @"$pname__creation_block_115", i32 0, i32 0), i32 15 }, %_TyDescrTy_Typ* @"$TyDescr_Bnum_21" }]
@"$pname__scilla_version_116" = unnamed_addr constant [15 x i8] c"_scilla_version"
@"$pname__this_address_117" = unnamed_addr constant [13 x i8] c"_this_address"
@"$pname__creation_block_118" = unnamed_addr constant [15 x i8] c"_creation_block"
@_contract_parameters = constant [3 x %"$ParamDescr_114"] [%"$ParamDescr_114" { %ParamDescrString { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @"$pname__scilla_version_116", i32 0, i32 0), i32 15 }, %_TyDescrTy_Typ* @"$TyDescr_Uint32_5" }, %"$ParamDescr_114" { %ParamDescrString { i8* getelementptr inbounds ([13 x i8], [13 x i8]* @"$pname__this_address_117", i32 0, i32 0), i32 13 }, %_TyDescrTy_Typ* @"$TyDescr_Bystr20_33" }, %"$ParamDescr_114" { %ParamDescrString { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @"$pname__creation_block_118", i32 0, i32 0), i32 15 }, %_TyDescrTy_Typ* @"$TyDescr_Bnum_21" }]
@_contract_parameters_length = constant i32 3
@"$tpname__amount_116" = unnamed_addr constant [7 x i8] c"_amount"
@"$tpname__origin_117" = unnamed_addr constant [7 x i8] c"_origin"
@"$tpname__sender_118" = unnamed_addr constant [7 x i8] c"_sender"
@"$tparams_EventChainID_119" = unnamed_addr constant [3 x %"$ParamDescr_111"] [%"$ParamDescr_111" { %ParamDescrString { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @"$tpname__amount_116", i32 0, i32 0), i32 7 }, %_TyDescrTy_Typ* @"$TyDescr_Uint128_13" }, %"$ParamDescr_111" { %ParamDescrString { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @"$tpname__origin_117", i32 0, i32 0), i32 7 }, %_TyDescrTy_Typ* @"$TyDescr_Addr_40" }, %"$ParamDescr_111" { %ParamDescrString { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @"$tpname__sender_118", i32 0, i32 0), i32 7 }, %_TyDescrTy_Typ* @"$TyDescr_Addr_40" }]
@"$tname_EventChainID_120" = unnamed_addr constant [12 x i8] c"EventChainID"
@_transition_parameters = constant [1 x %"$TransDescr_112"] [%"$TransDescr_112" { %ParamDescrString { i8* getelementptr inbounds ([12 x i8], [12 x i8]* @"$tname_EventChainID_120", i32 0, i32 0), i32 12 }, i32 3, %"$ParamDescr_111"* getelementptr inbounds ([3 x %"$ParamDescr_111"], [3 x %"$ParamDescr_111"]* @"$tparams_EventChainID_119", i32 0, i32 0) }]
@"$tpname__amount_119" = unnamed_addr constant [7 x i8] c"_amount"
@"$tpname__origin_120" = unnamed_addr constant [7 x i8] c"_origin"
@"$tpname__sender_121" = unnamed_addr constant [7 x i8] c"_sender"
@"$tparams_EventChainID_122" = unnamed_addr constant [3 x %"$ParamDescr_114"] [%"$ParamDescr_114" { %ParamDescrString { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @"$tpname__amount_119", i32 0, i32 0), i32 7 }, %_TyDescrTy_Typ* @"$TyDescr_Uint128_13" }, %"$ParamDescr_114" { %ParamDescrString { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @"$tpname__origin_120", i32 0, i32 0), i32 7 }, %_TyDescrTy_Typ* @"$TyDescr_Addr_40" }, %"$ParamDescr_114" { %ParamDescrString { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @"$tpname__sender_121", i32 0, i32 0), i32 7 }, %_TyDescrTy_Typ* @"$TyDescr_Addr_40" }]
@"$tname_EventChainID_123" = unnamed_addr constant [12 x i8] c"EventChainID"
@_transition_parameters = constant [1 x %"$TransDescr_115"] [%"$TransDescr_115" { %ParamDescrString { i8* getelementptr inbounds ([12 x i8], [12 x i8]* @"$tname_EventChainID_123", i32 0, i32 0), i32 12 }, i32 3, %"$ParamDescr_114"* getelementptr inbounds ([3 x %"$ParamDescr_114"], [3 x %"$ParamDescr_114"]* @"$tparams_EventChainID_122", i32 0, i32 0) }]
@_transition_parameters_length = constant i32 1

define void @_init_libs() !dbg !4 {
define void @_init_libs() !dbg !3 {
entry:
%"$gasrem_42" = load i64, i64* @_gasrem, align 8
%"$gascmp_43" = icmp ugt i64 5, %"$gasrem_42"
Expand Down Expand Up @@ -117,6 +117,15 @@ entry:

define internal void @"$EventChainID_52"(%Uint128 %_amount, [20 x i8]* %"$_origin_53", [20 x i8]* %"$_sender_54") !dbg !11 {
entry:
%"$_sender_106" = alloca [20 x i8]*, align 8
store [20 x i8]* %"$_sender_54", [20 x i8]** %"$_sender_106", align 8
call void @llvm.dbg.declare(metadata [20 x i8]** %"$_sender_106", metadata !12, metadata !DIExpression()), !dbg !14
%"$_origin_105" = alloca [20 x i8]*, align 8
store [20 x i8]* %"$_origin_53", [20 x i8]** %"$_origin_105", align 8
call void @llvm.dbg.declare(metadata [20 x i8]** %"$_origin_105", metadata !15, metadata !DIExpression()), !dbg !14
%"$_amount_104" = alloca %Uint128, align 8
store %Uint128 %_amount, %Uint128* %"$_amount_104", align 8
call void @llvm.dbg.declare(metadata %Uint128* %"$_amount_104", metadata !16, metadata !DIExpression()), !dbg !14
%_origin = load [20 x i8], [20 x i8]* %"$_origin_53", align 1
%_sender = load [20 x i8], [20 x i8]* %"$_sender_54", align 1
%"$gasrem_55" = load i64, i64* @_gasrem, align 8
Expand All @@ -131,8 +140,9 @@ entry:
%"$consume_59" = sub i64 %"$gasrem_55", 1
store i64 %"$consume_59", i64* @_gasrem, align 8
%cid = alloca %Uint32, align 8
call void @llvm.dbg.declare(metadata %Uint32* %cid, metadata !18, metadata !DIExpression()), !dbg !20
%"$execptr_load_62" = load i8*, i8** @_execptr, align 8
%"$cid_call_63" = call i8* @_read_blockchain(i8* %"$execptr_load_62", %BCQuery { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @"$fetchbc_query_name_60", i32 0, i32 0), i32 7 }, %String { i8* getelementptr inbounds ([0 x i8], [0 x i8]* @"$fetchbc_query_arg_61", i32 0, i32 0), i32 0 }), !dbg !12
%"$cid_call_63" = call i8* @_read_blockchain(i8* %"$execptr_load_62", %BCQuery { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @"$fetchbc_query_name_60", i32 0, i32 0), i32 7 }, %String { i8* getelementptr inbounds ([0 x i8], [0 x i8]* @"$fetchbc_query_arg_61", i32 0, i32 0), i32 0 }), !dbg !20
%"$cid_64" = bitcast i8* %"$cid_call_63" to %Uint32*
%"$cid_65" = load %Uint32, %Uint32* %"$cid_64", align 4
store %Uint32 %"$cid_65", %Uint32* %cid, align 4
Expand All @@ -148,6 +158,7 @@ entry:
%"$consume_70" = sub i64 %"$gasrem_66", 1
store i64 %"$consume_70", i64* @_gasrem, align 8
%e = alloca i8*, align 8
call void @llvm.dbg.declare(metadata i8** %e, metadata !21, metadata !DIExpression()), !dbg !24
%"$gasrem_71" = load i64, i64* @_gasrem, align 8
%"$gascmp_72" = icmp ugt i64 1, %"$gasrem_71"
br i1 %"$gascmp_72", label %"$out_of_gas_73", label %"$have_gas_74"
Expand Down Expand Up @@ -183,7 +194,7 @@ entry:
%"$msgobj_v_91" = getelementptr i8, i8* %"$msgobj_76", i32 65
%"$msgobj_v_92" = bitcast i8* %"$msgobj_v_91" to %Uint32*
store %Uint32 %"$cid_90", %Uint32* %"$msgobj_v_92", align 4
store i8* %"$msgobj_76", i8** %e, align 8, !dbg !13
store i8* %"$msgobj_76", i8** %e, align 8, !dbg !25
%"$e_94" = load i8*, i8** %e, align 8
%"$_literal_cost_call_96" = call i64 @_literal_cost(%_TyDescrTy_Typ* @"$TyDescr_Event_25", i8* %"$e_94")
%"$gasrem_97" = load i64, i64* @_gasrem, align 8
Expand All @@ -199,10 +210,13 @@ entry:
store i64 %"$consume_101", i64* @_gasrem, align 8
%"$execptr_load_102" = load i8*, i8** @_execptr, align 8
%"$e_103" = load i8*, i8** %e, align 8
call void @_event(i8* %"$execptr_load_102", %_TyDescrTy_Typ* @"$TyDescr_Event_25", i8* %"$e_103"), !dbg !14
call void @_event(i8* %"$execptr_load_102", %_TyDescrTy_Typ* @"$TyDescr_Event_25", i8* %"$e_103"), !dbg !26
ret void
}

; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn
declare void @llvm.dbg.declare(metadata, metadata, metadata) #0

declare i8* @_read_blockchain(i8*, %BCQuery, %String)

declare i8* @_salloc(i8*, i64)
Expand All @@ -211,36 +225,50 @@ declare i64 @_literal_cost(%_TyDescrTy_Typ*, i8*)

declare void @_event(i8*, %_TyDescrTy_Typ*, i8*)

define void @EventChainID(i8* %0) !dbg !15 {
define void @EventChainID(i8* %0) !dbg !27 {
entry:
%"$_amount_105" = getelementptr i8, i8* %0, i32 0
%"$_amount_106" = bitcast i8* %"$_amount_105" to %Uint128*
%_amount = load %Uint128, %Uint128* %"$_amount_106", align 8
%"$_origin_107" = getelementptr i8, i8* %0, i32 16
%"$_origin_108" = bitcast i8* %"$_origin_107" to [20 x i8]*
%"$_sender_109" = getelementptr i8, i8* %0, i32 36
%"$_sender_110" = bitcast i8* %"$_sender_109" to [20 x i8]*
call void @"$EventChainID_52"(%Uint128 %_amount, [20 x i8]* %"$_origin_108", [20 x i8]* %"$_sender_110"), !dbg !16
%"$_amount_108" = getelementptr i8, i8* %0, i32 0
%"$_amount_109" = bitcast i8* %"$_amount_108" to %Uint128*
%_amount = load %Uint128, %Uint128* %"$_amount_109", align 8
%"$_origin_110" = getelementptr i8, i8* %0, i32 16
%"$_origin_111" = bitcast i8* %"$_origin_110" to [20 x i8]*
%"$_sender_112" = getelementptr i8, i8* %0, i32 36
%"$_sender_113" = bitcast i8* %"$_sender_112" to [20 x i8]*
call void @"$EventChainID_52"(%Uint128 %_amount, [20 x i8]* %"$_origin_111", [20 x i8]* %"$_sender_113"), !dbg !28
ret void
}

attributes #0 = { nocallback nofree nosync nounwind readnone speculatable willreturn }

!llvm.module.flags = !{!0}
!llvm.dbg.cu = !{!1}

!0 = !{i32 2, !"Debug Info Version", i32 3}
!1 = distinct !DICompileUnit(language: DW_LANG_C89, file: !2, producer: "Scilla Compiler", isOptimized: false, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !3, splitDebugInlining: false)
!1 = distinct !DICompileUnit(language: DW_LANG_C89, file: !2, producer: "Scilla Compiler", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false)
!2 = !DIFile(filename: "chainid.scilla", directory: "codegen/contr")
!3 = !{}
!4 = distinct !DISubprogram(name: "_init_libs", linkageName: "_init_libs", scope: !5, file: !5, type: !6, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1, retainedNodes: !3)
!5 = !DIFile(filename: ".", directory: ".")
!6 = !DISubroutineType(types: !7)
!7 = !{!8}
!8 = !DIBasicType(tag: DW_TAG_unspecified_type, name: "void")
!9 = !DILocation(line: 0, scope: !4)
!10 = distinct !DISubprogram(name: "_deploy_ops", linkageName: "_deploy_ops", scope: !5, file: !5, type: !6, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1, retainedNodes: !3)
!11 = distinct !DISubprogram(name: "EventChainID", linkageName: "EventChainID", scope: !2, file: !2, line: 9, type: !6, scopeLine: 9, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1, retainedNodes: !3)
!12 = !DILocation(line: 10, column: 3, scope: !11)
!13 = !DILocation(line: 11, column: 7, scope: !11)
!14 = !DILocation(line: 12, column: 3, scope: !11)
!15 = distinct !DISubprogram(name: "EventChainID", linkageName: "EventChainID", scope: !2, file: !2, line: 9, type: !6, scopeLine: 9, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1, retainedNodes: !3)
!16 = !DILocation(line: 9, column: 12, scope: !15)
!3 = distinct !DISubprogram(name: "_init_libs", linkageName: "_init_libs", scope: !4, file: !4, type: !5, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1, retainedNodes: !8)
!4 = !DIFile(filename: ".", directory: ".")
!5 = !DISubroutineType(types: !6)
!6 = !{!7}
!7 = !DIBasicType(tag: DW_TAG_unspecified_type, name: "void")
!8 = !{}
!9 = !DILocation(line: 0, scope: !3)
!10 = distinct !DISubprogram(name: "_deploy_ops", linkageName: "_deploy_ops", scope: !4, file: !4, type: !5, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1, retainedNodes: !8)
!11 = distinct !DISubprogram(name: "EventChainID", linkageName: "EventChainID", scope: !2, file: !2, line: 9, type: !5, scopeLine: 9, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1, retainedNodes: !8)
!12 = !DILocalVariable(name: "_sender", scope: !11, file: !2, line: 9, type: !13)
!13 = !DIBasicType(name: "ByStr20 with end", size: 20)
!14 = !DILocation(line: 9, column: 12, scope: !11)
!15 = !DILocalVariable(name: "_origin", scope: !11, file: !2, line: 9, type: !13)
!16 = !DILocalVariable(name: "_amount", scope: !11, file: !2, line: 9, type: !17)
!17 = !DIBasicType(name: "Uint128", size: 16)
!18 = !DILocalVariable(name: "cid", scope: !11, file: !2, line: 10, type: !19)
!19 = !DIBasicType(name: "Uint32", size: 4)
!20 = !DILocation(line: 10, column: 3, scope: !11)
!21 = !DILocalVariable(name: "e", scope: !11, file: !2, line: 11, type: !22)
!22 = !DIDerivedType(tag: DW_TAG_pointer_type, name: "Event", baseType: !23, size: 8, align: 8, dwarfAddressSpace: 0)
!23 = !DIBasicType(name: "Event", size: 8)
!24 = !DILocation(line: 11, column: 3, scope: !11)
!25 = !DILocation(line: 11, column: 7, scope: !11)
!26 = !DILocation(line: 12, column: 3, scope: !11)
!27 = distinct !DISubprogram(name: "EventChainID", linkageName: "EventChainID", scope: !2, file: !2, line: 9, type: !5, scopeLine: 9, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1, retainedNodes: !8)
!28 = !DILocation(line: 9, column: 12, scope: !27)
2 changes: 1 addition & 1 deletion testsuite/contr/chainid.ll
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
; ModuleID = 'HelloWorld'
source_filename = "HelloWorld"
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-pc-linux-gnu"
target triple = "x86_64-unknown-linux-gnu"

%"$TyDescrTy_PrimTyp_1" = type { i32, i32 }
%_TyDescrTy_Typ = type { i32, i8* }
Expand Down
Loading