Skip to content

Commit 19a6b42

Browse files
committed
Test ethdebug output when requested in standard json under EOF
1 parent ccca48a commit 19a6b42

File tree

10 files changed

+150
-0
lines changed

10 files changed

+150
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--allow-paths .
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/// @use-src 0:"input.sol"
2+
object "C_6_deployed" {
3+
code {
4+
/// @src 0:60:101 "contract C {..."
5+
mstore(64, 128)
6+
7+
// f()
8+
fun_f_5()
9+
10+
/// @src 0:77:99 "function f() public {}"
11+
function fun_f_5() {
12+
sstore(0, 42)
13+
}
14+
/// @src 0:60:101 "contract C {..."
15+
}
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"language": "Yul",
3+
"sources": {
4+
"C": {
5+
"urls": [
6+
"standard_yul_debug_info_ethdebug_compatible_output_eof/in.yul"
7+
]
8+
}
9+
},
10+
"settings": {
11+
"eofVersion": 1,
12+
"evmVersion": "osaka",
13+
"debug": {"debugInfo": ["ethdebug"]},
14+
"outputSelection": {
15+
"*": {"*": ["ir", "irOptimized", "evm.bytecode.ethdebug"]}
16+
}
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"contracts": {
3+
"C": {
4+
"C_6_deployed": {
5+
"evm": {
6+
"bytecode": {
7+
"ethdebug": "<ETHDEBUG DEBUG DATA REMOVED>"
8+
}
9+
},
10+
"ir": "/// ethdebug: enabled
11+
/// @use-src 0:\"input.sol\"
12+
object \"C_6_deployed\" {
13+
code {
14+
/// @src 0:60:101
15+
mstore(64, 128)
16+
fun_f_5()
17+
/// @src 0:77:99
18+
function fun_f_5()
19+
{ sstore(0, 42) }
20+
}
21+
}
22+
",
23+
"irOptimized": "/// ethdebug: enabled
24+
/// @use-src 0:\"input.sol\"
25+
object \"C_6_deployed\" {
26+
code {
27+
{
28+
/// @src 0:60:101
29+
mstore(64, 128)
30+
fun_f()
31+
}
32+
/// @src 0:77:99
33+
function fun_f()
34+
{ sstore(0, 42) }
35+
}
36+
}
37+
"
38+
}
39+
}
40+
},
41+
"ethdebug": "<ETHDEBUG DEBUG DATA REMOVED>"
42+
}

test/cmdlineTests/standard_yul_debug_info_ethdebug_compatible_output_eof/strip-ethdebug

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--allow-paths .
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/// @use-src 0:"input.sol"
2+
object "C_6_deployed" {
3+
code {
4+
/// @src 0:60:101 "contract C {..."
5+
mstore(64, 128)
6+
7+
// f()
8+
fun_f_5()
9+
10+
/// @src 0:77:99 "function f() public {}"
11+
function fun_f_5() {
12+
sstore(0, 42)
13+
}
14+
/// @src 0:60:101 "contract C {..."
15+
}
16+
}
17+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"language": "Yul",
3+
"sources": {
4+
"C": {"urls": ["standard_yul_ethdebug_eof/in.yul"]}
5+
},
6+
"settings": {
7+
"eofVersion": 1,
8+
"evmVersion": "osaka",
9+
"outputSelection": {
10+
"*": {"*": ["evm.bytecode.ethdebug", "evm.deployedBytecode.ethdebug", "ir", "irOptimized"]}
11+
}
12+
}
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"contracts": {
3+
"C": {
4+
"C_6_deployed": {
5+
"evm": {
6+
"bytecode": {
7+
"ethdebug": "<ETHDEBUG DEBUG DATA REMOVED>"
8+
}
9+
},
10+
"ir": "/// ethdebug: enabled
11+
/// @use-src 0:\"input.sol\"
12+
object \"C_6_deployed\" {
13+
code {
14+
/// @src 0:60:101
15+
mstore(64, 128)
16+
fun_f_5()
17+
/// @src 0:77:99
18+
function fun_f_5()
19+
{ sstore(0, 42) }
20+
}
21+
}
22+
",
23+
"irOptimized": "/// ethdebug: enabled
24+
/// @use-src 0:\"input.sol\"
25+
object \"C_6_deployed\" {
26+
code {
27+
{
28+
/// @src 0:60:101
29+
mstore(64, 128)
30+
fun_f()
31+
}
32+
/// @src 0:77:99
33+
function fun_f()
34+
{ sstore(0, 42) }
35+
}
36+
}
37+
"
38+
}
39+
}
40+
},
41+
"ethdebug": "<ETHDEBUG DEBUG DATA REMOVED>"
42+
}

test/cmdlineTests/standard_yul_ethdebug_eof/strip-ethdebug

Whitespace-only changes.

0 commit comments

Comments
 (0)