mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:37:35 +00:00
LibJS/JIT: Provide source location information for JIT code
This works by walking a backtrace until the currently executing native executable is found, and then mapping the native address to its bytecode instruction.
This commit is contained in:
parent
112eadc863
commit
fb7b4b9c59
8 changed files with 59 additions and 6 deletions
|
@ -157,10 +157,10 @@ private:
|
|||
|
||||
class InstructionStreamIterator {
|
||||
public:
|
||||
InstructionStreamIterator(ReadonlyBytes bytes, Executable const* executable = nullptr)
|
||||
InstructionStreamIterator(ReadonlyBytes bytes, Executable const* executable = nullptr, size_t offset = 0)
|
||||
: m_begin(bytes.data())
|
||||
, m_end(bytes.data() + bytes.size())
|
||||
, m_ptr(bytes.data())
|
||||
, m_ptr(bytes.data() + offset)
|
||||
, m_executable(executable)
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue