Mercurial > hg > graal-jvmci-8
comparison src/share/vm/code/pcDesc.cpp @ 3908:7588156f5cf9
7051798: SA-JDI: NPE in Frame.addressOfStackSlot(Frame.java:244)
Reviewed-by: kvn
author | never |
---|---|
date | Mon, 05 Sep 2011 17:09:05 -0700 |
parents | 5cf771a79037 |
children | 04b9a2566eec 78bbf4d43a14 |
comparison
equal
deleted
inserted
replaced
3907:7b5c767f229c | 3908:7588156f5cf9 |
---|---|
28 #include "code/pcDesc.hpp" | 28 #include "code/pcDesc.hpp" |
29 #include "code/scopeDesc.hpp" | 29 #include "code/scopeDesc.hpp" |
30 #include "memory/resourceArea.hpp" | 30 #include "memory/resourceArea.hpp" |
31 | 31 |
32 PcDesc::PcDesc(int pc_offset, int scope_decode_offset, int obj_decode_offset) { | 32 PcDesc::PcDesc(int pc_offset, int scope_decode_offset, int obj_decode_offset) { |
33 assert(sizeof(PcDescFlags) <= 4, "occupies more than a word"); | |
34 _pc_offset = pc_offset; | 33 _pc_offset = pc_offset; |
35 _scope_decode_offset = scope_decode_offset; | 34 _scope_decode_offset = scope_decode_offset; |
36 _obj_decode_offset = obj_decode_offset; | 35 _obj_decode_offset = obj_decode_offset; |
37 _flags.word = 0; | 36 _flags = 0; |
38 } | 37 } |
39 | 38 |
40 address PcDesc::real_pc(const nmethod* code) const { | 39 address PcDesc::real_pc(const nmethod* code) const { |
41 return code->code_begin() + pc_offset(); | 40 return code->code_begin() + pc_offset(); |
42 } | 41 } |
43 | 42 |
44 void PcDesc::print(nmethod* code) { | 43 void PcDesc::print(nmethod* code) { |
45 #ifndef PRODUCT | 44 #ifndef PRODUCT |
46 ResourceMark rm; | 45 ResourceMark rm; |
47 tty->print_cr("PcDesc(pc=0x%lx offset=%x bits=%x):", real_pc(code), pc_offset(), _flags.bits); | 46 tty->print_cr("PcDesc(pc=0x%lx offset=%x bits=%x):", real_pc(code), pc_offset(), _flags); |
48 | 47 |
49 if (scope_decode_offset() == DebugInformationRecorder::serialized_null) { | 48 if (scope_decode_offset() == DebugInformationRecorder::serialized_null) { |
50 return; | 49 return; |
51 } | 50 } |
52 | 51 |