Index: runtime/vm/simulator_arm64.cc |
diff --git a/runtime/vm/simulator_arm64.cc b/runtime/vm/simulator_arm64.cc |
index 5f126e45cc9afc4cf7d294383a667173de77a80e..d284e1eeafe6b70bed2d6f2756e72a4aebba1119 100644 |
--- a/runtime/vm/simulator_arm64.cc |
+++ b/runtime/vm/simulator_arm64.cc |
@@ -630,6 +630,16 @@ class Redirection { |
return reinterpret_cast<Redirection*>(addr_of_redirection); |
} |
+ static uword FunctionForRedirect(uword address_of_hlt) { |
+ Redirection* current; |
+ for (current = list_; current != NULL; current = current->next_) { |
+ if (current->address_of_hlt_instruction() == address_of_hlt) { |
+ return current->external_function_; |
+ } |
+ } |
+ return 0; |
+ } |
+ |
private: |
static const int32_t kRedirectInstruction = Instr::kRedirectInstruction; |
Redirection(uword external_function, |
@@ -664,6 +674,11 @@ uword Simulator::RedirectExternalReference(uword function, |
} |
+uword Simulator::FunctionForRedirect(uword redirect) { |
+ return Redirection::FunctionForRedirect(redirect); |
+} |
+ |
+ |
// Get the active Simulator for the current isolate. |
Simulator* Simulator::Current() { |
Simulator* simulator = Isolate::Current()->simulator(); |