Commit a9f86d3a authored by Mike Stanton's avatar Mike Stanton Committed by Commit Bot

[gdb-jit] Fix gdb-jit to work with embedded builtins

We can use GcSafeFindCodeForInnerPointer() when handling a code
added event. This method understands embedded builtins.

Change-Id: I94757f96b7b4ad10cbf7cb5f715d3368cc86b798
Reviewed-on: https://chromium-review.googlesource.com/c/1297953Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57021}
parent a68f7fdb
......@@ -2128,7 +2128,8 @@ void EventHandler(const v8::JitCodeEvent* event) {
switch (event->type) {
case v8::JitCodeEvent::CODE_ADDED: {
Address addr = reinterpret_cast<Address>(event->code_start);
Code* code = Code::GetCodeFromTargetAddress(addr);
Isolate* isolate = reinterpret_cast<Isolate*>(event->isolate);
Code* code = isolate->heap()->GcSafeFindCodeForInnerPointer(addr);
LineInfo* lineinfo = GetLineInfo(addr);
EmbeddedVector<char, 256> buffer;
StringBuilder builder(buffer.start(), buffer.length());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment