Add a DBG_CALL_R for remote calls

This commit is contained in:
Gaith Hallak 2023-03-17 08:28:39 +03:00
parent 7cac2c215d
commit a336314cfc
3 changed files with 8 additions and 3 deletions

View File

@ -147,7 +147,8 @@
-define( 'DBG_DEF', 16#b2). -define( 'DBG_DEF', 16#b2).
-define( 'DBG_UNDEF', 16#b3). -define( 'DBG_UNDEF', 16#b3).
-define( 'DBG_CALL', 16#b4). -define( 'DBG_CALL', 16#b4).
-define( 'DBG_RETURN', 16#b5). -define( 'DBG_CALL_R', 16#b5).
-define( 'DBG_RETURN', 16#b6).
-define( 'STATICCALL', 16#fa). -define( 'STATICCALL', 16#fa).

View File

@ -245,8 +245,9 @@ ops_defs() ->
, { '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}" } , { '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}" }
, { '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}" } , { '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}" }
, { '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}" } , { '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}" }
, { 'DBG_CALL', 16#b4, false, true, true, ?GAS(0), [a, a, a], dbg_call, {address, string, boolean}, none, "Debug Op: Push to call stack. Args = {contract_pk, fun_name, is_tail_call}" } , { 'DBG_CALL', 16#b4, false, true, true, ?GAS(0), [a, a], dbg_call, {string, boolean}, none, "Debug Op: Push to call stack. Args = {fun_name, is_tail_call}" }
, { 'DBG_RETURN', 16#b5, false, true, true, ?GAS(0), [], dbg_return, {}, none, "Debug Op: Pop from call stack" } , { 'DBG_CALL_R', 16#b5, false, true, true, ?GAS(0), [a, a, a], dbg_call_r, {address, string, boolean}, none, "Debug Op: Push to call stack. Args = {contract_pk, fun_name, is_tail_call}" }
, { 'DBG_RETURN', 16#b6, false, true, true, ?GAS(0), [], dbg_return, {}, none, "Debug Op: Pop from call stack" }
, { 'DEACTIVATE', 16#fa, false, true, true, ?GAS(10), [], deactivate, {}, none, "Mark the current contract for deactivation."} , { 'DEACTIVATE', 16#fa, false, true, true, ?GAS(10), [], deactivate, {}, none, "Mark the current contract for deactivation."}
, { 'ABORT', 16#fb, true, true, true, ?GAS(10), [a], abort, {string}, none, "Abort execution (dont use all gas) with error message in Arg0."} , { 'ABORT', 16#fb, true, true, true, ?GAS(10), [a], abort, {string}, none, "Abort execution (dont use all gas) with error message in Arg0."}

View File

@ -166,6 +166,7 @@ opcode(?DBG_LOC) -> ?DBG_LOC;
opcode(?DBG_DEF) -> ?DBG_DEF; opcode(?DBG_DEF) -> ?DBG_DEF;
opcode(?DBG_UNDEF) -> ?DBG_UNDEF; opcode(?DBG_UNDEF) -> ?DBG_UNDEF;
opcode(?DBG_CALL) -> ?DBG_CALL; opcode(?DBG_CALL) -> ?DBG_CALL;
opcode(?DBG_CALL_R) -> ?DBG_CALL_R;
opcode(?DBG_RETURN) -> ?DBG_RETURN; opcode(?DBG_RETURN) -> ?DBG_RETURN;
opcode(?SUICIDE) -> ?SUICIDE. opcode(?SUICIDE) -> ?SUICIDE.
@ -312,6 +313,7 @@ mnemonic(?DBG_LOC) -> 'DBG_LOC' ;
mnemonic(?DBG_DEF) -> 'DBG_DEF' ; mnemonic(?DBG_DEF) -> 'DBG_DEF' ;
mnemonic(?DBG_UNDEF) -> 'DBG_UNDEF' ; mnemonic(?DBG_UNDEF) -> 'DBG_UNDEF' ;
mnemonic(?DBG_CALL) -> 'DBG_CALL' ; mnemonic(?DBG_CALL) -> 'DBG_CALL' ;
mnemonic(?DBG_CALL_R) -> 'DBG_CALL_R' ;
mnemonic(?DBG_RETURN) -> 'DBG_RETURN' ; mnemonic(?DBG_RETURN) -> 'DBG_RETURN' ;
mnemonic(?SUICIDE) -> 'SUICIDE' . mnemonic(?SUICIDE) -> 'SUICIDE' .
@ -460,6 +462,7 @@ m_to_op('DBG_LOC') -> ?DBG_LOC ;
m_to_op('DBG_DEF') -> ?DBG_DEF ; m_to_op('DBG_DEF') -> ?DBG_DEF ;
m_to_op('DBG_UNDEF') -> ?DBG_UNDEF ; m_to_op('DBG_UNDEF') -> ?DBG_UNDEF ;
m_to_op('DBG_CALL') -> ?DBG_CALL ; m_to_op('DBG_CALL') -> ?DBG_CALL ;
m_to_op('DBG_CALL_R') -> ?DBG_CALL_R ;
m_to_op('DBG_RETURN') -> ?DBG_RETURN ; m_to_op('DBG_RETURN') -> ?DBG_RETURN ;
m_to_op(Data) when 0=<Data, Data=<255 m_to_op(Data) when 0=<Data, Data=<255
-> Data . -> Data .