Let's say I have a function and a function call like below:
function foo(i, j) {
return i + j;
}
foo(1, 2);
Currently, I can print the bytecodes that the interpreter generates with a flag "--print-bytecode" like below.
$v8/out/x64.release/d8 --print-bytecode foo.js
What I'm really interested in the machine code that prints out at the CPU level (I'm not sure whether this is even possible for the interpreter level, so please let me know if it's not.) that I can get the instruction pointer information to do some sort of source level debugging and the register information.
Also, I read somewhere that I can activate the debugger like gdb with d8 (not the JIT gdb), I'm not really sure how to activate it. Does anyone have any suggestions for the above two problems?
Thank you in advance.