Commit 50151a1e authored by Junliang Yan's avatar Junliang Yan Committed by Commit Bot

[disassembler] Set proper constant pool to relocinfo

set constant_pool_ to proper value before trying to print it

Change-Id: Iee0da126dd3641f40c1d1847e7f1ef5d6e3e58fd
Reviewed-on: https://chromium-review.googlesource.com/916890Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#51292}
parent a56d6169
......@@ -485,6 +485,9 @@ class RelocInfo {
intptr_t data() const { return data_; }
Code* host() const { return host_; }
Address constant_pool() const { return constant_pool_; }
void set_constant_pool(Address constant_pool) {
constant_pool_ = constant_pool;
}
// Apply a relocation by delta bytes. When the code object is moved, PC
// relative addresses have to be updated as well as absolute addresses
......
......@@ -256,7 +256,9 @@ static int DecodeIt(Isolate* isolate, std::ostream* os,
// Print all the reloc info for this instruction which are not comments.
for (size_t i = 0; i < pcs.size(); i++) {
// Put together the reloc info
RelocInfo relocinfo(pcs[i], rmodes[i], datas[i], converter.code());
Code* host = converter.code();
RelocInfo relocinfo(pcs[i], rmodes[i], datas[i], host);
relocinfo.set_constant_pool(host ? host->constant_pool() : nullptr);
bool first_reloc_info = (i == 0);
PrintRelocInfo(&out, isolate, ref_encoder, os, &relocinfo,
......
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