Commit 615e9003 authored by Peter Marshall's avatar Peter Marshall Committed by Commit Bot

[tools] Fix Code::Disassemble to print the address properly

This was missed when changing Object to hold a ptr field instead of
abusing the this pointer.

This was printing the stack address of the particular Object rather
than the location of the printed code object on the heap.

Change-Id: I5c884464419debcbc70b73fe8bdfa8107f2bdb71
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1833681
Auto-Submit: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64065}
parent 282a74c7
......@@ -682,7 +682,7 @@ void Code::Disassemble(const char* name, std::ostream& os, Isolate* isolate,
os << "stack_slots = " << stack_slots() << "\n";
}
os << "compiler = " << (is_turbofanned() ? "turbofan" : "unknown") << "\n";
os << "address = " << static_cast<const void*>(this) << "\n\n";
os << "address = " << reinterpret_cast<void*>(ptr()) << "\n\n";
if (is_off_heap_trampoline()) {
int trampoline_size = raw_instruction_size();
......
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