Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1409)

Unified Diff: runtime/vm/simulator_arm.cc

Issue 875443002: Store pc offset instead of absolute pc in the pc descriptors. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: fixed arm/mips/arm64 build Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/simulator_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_arm.cc
===================================================================
--- runtime/vm/simulator_arm.cc (revision 43041)
+++ runtime/vm/simulator_arm.cc (working copy)
@@ -255,13 +255,14 @@
intptr_t SimulatorDebugger::GetApproximateTokenIndex(const Code& code,
uword pc) {
intptr_t token_pos = -1;
+ uword pc_offset = pc - code.EntryPoint();
const PcDescriptors& descriptors =
PcDescriptors::Handle(code.pc_descriptors());
PcDescriptors::Iterator iter(descriptors, RawPcDescriptors::kAnyKind);
while (iter.MoveNext()) {
- if (iter.Pc() == pc) {
+ if (iter.PcOffset() == pc_offset) {
return iter.TokenPos();
- } else if ((token_pos <= 0) && (iter.Pc() > pc)) {
+ } else if ((token_pos <= 0) && (iter.PcOffset() > pc_offset)) {
token_pos = iter.TokenPos();
}
}
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/simulator_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698