Skip to content

Commit 0f7529b

Browse files
authored
Introduce debugging instructions (#113)
* Add DBGLOC fate op * Add DBGDEF and DBGUNDEF * Change the type of arg for dbgdef and dbgundef * Change DBGUNDEF to end_bb = true * No safe sanity check for dbgundef * Rename DBGDEF and DBGUNDEF to DBG_DEF and DBG_UNDEF * Revert "No safe sanity check for dbgundef" This reverts commit ee49497. * Rename DBGLOC to DBG_LOC * Remove column from DBG_LOC * Add DBG_CALL and DBG_RETURN * Update the docs for debug opcodes * Add a DBG_CALL_R for remote calls * Remove is_tail_call from DBG_CALL_R * Revert "Remove is_tail_call from DBG_CALL_R" This reverts commit a620c9c. * Revert "Add a DBG_CALL_R for remote calls" This reverts commit a336314. * Revert "Add DBG_CALL and DBG_RETURN" This reverts commit db9766a. * Add DBG_CONTRACT op * Upgrade aeserialization dep * Use aeserialization v1.0.0 * Use aeserialization tag v1.0.0 * Remove debug instructions from AEVM
1 parent 2a0a397 commit 0f7529b

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

rebar.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
{deps, [ {eblake2, "1.0.0"}
88
, {aeserialization, {git, "https://github.com/aeternity/aeserialization.git",
9-
{ref, "eb68fe3"}}}
9+
{tag, "v1.0.0"}}}
1010
, {getopt, "1.0.1"}
1111
]}.
1212

@@ -40,7 +40,7 @@
4040
{profiles, [{binary, [
4141
{deps, [ {eblake2, "1.0.0"}
4242
, {aeserialization, {git, "https://github.com/aeternity/aeserialization.git",
43-
{ref, "47aaa8f"}}}
43+
{tag, "v1.0.0"}}}
4444
, {getopt, "1.0.1"}
4545
]},
4646

rebar.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{"1.2.0",
22
[{<<"aeserialization">>,
33
{git,"https://github.com/aeternity/aeserialization.git",
4-
{ref,"eb68fe331bd476910394966b7f5ede7a74d37e35"}},
4+
{ref,"177bf604b2a05e940f92cf00e96e6e269e708245"}},
55
0},
66
{<<"base58">>,
77
{git,"https://github.com/aeternity/erl-base58.git",

src/aeb_fate_generate_ops.erl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,11 @@ ops_defs() ->
242242
, { 'BSL', 16#af, false, true, true, ?GAS(10), [a, a, a], bin_sl, {integer, integer}, integer, "Arg0 := Arg1 << Arg2"}
243243
, { 'BSR', 16#b0, false, true, true, ?GAS(10), [a, a, a], bin_sr, {integer, integer}, integer, "Arg0 := Arg1 >> Arg2"}
244244

245+
, { 'DBG_LOC', 16#b1, false, true, true, ?GAS(0), [a, a], dbg_loc, {string, integer}, none, "Debug Op: Execution location. Args = {file_name, line_num}" }
246+
, { 'DBG_DEF', 16#b2, false, true, true, ?GAS(0), [a, a], dbg_def, {string, any}, none, "Debug Op: Define a variable. Args = {var_name, register}" }
247+
, { 'DBG_UNDEF', 16#b3, false, true, true, ?GAS(0), [a, a], dbg_undef, {string, any}, none, "Debug Op: Undefine a variable. Args = {var_name, register}" }
248+
, { 'DBG_CONTRACT', 16#b4, false, true, true, ?GAS(0), [a], dbg_contract, {string}, none, "Debug Op: Name the current contract. Args: {contract_name}"}
249+
245250
, { 'DEACTIVATE', 16#fa, false, true, true, ?GAS(10), [], deactivate, {}, none, "Mark the current contract for deactivation."}
246251
, { 'ABORT', 16#fb, true, true, true, ?GAS(10), [a], abort, {string}, none, "Abort execution (dont use all gas) with error message in Arg0."}
247252
, { 'EXIT', 16#fc, true, true, true, ?GAS(10), [a], exit, {string}, none, "Abort execution (use upp all gas) with error message in Arg0."}

0 commit comments

Comments
 (0)