Interpreter entries and instrumentation as a listener.

Make the instrumentation responsible for whether we want method entry/exit
stubs, and allow it to use interpreter entry stubs when instruction by
instruction instrumentation is required. Improve deoptimization so more JDWP
test cases are passing.

Refactor exception debug posting, in particular improve reporting in the
interpreter. Improve class linker exception throwing so that broken dex files
are more likely to be reported. Fixes the performance issue Bug: 8410519.

Fix some error reporting lock level errors for the large object space. Make
fast object verification faster.

Add some debug mode robustness to finding dex PCs in GC maps.

Add printf attributes to JniAbortF and fix errors.

Expand run-test 044 to test return behaviors and fix issues with not throwing
appropriate exceptions for proxies.

Ensure causes are reported with a class linker NoClassDefFoundError and JNI
NoSuchFieldError.

Remove unused debugMe and updateDebuggerFromCode.

There's a minor sizing tweak to the arg array builder, and an extra reference
array check in the interpreter.

Some clean-up of trace code.

Fix reg type cache destructor if it is called after the reg type cache is
shutdown (as is the case in oatdump).

Change-Id: I6519c7b35df77f978d011999354c864f4918e8ce
diff --git a/src/throw_location.h b/src/throw_location.h
new file mode 100644
index 0000000..8c1b941
--- /dev/null
+++ b/src/throw_location.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ART_SRC_THROW_LOCATION_H_
+#define ART_SRC_THROW_LOCATION_H_
+
+#include "base/macros.h"
+#include "root_visitor.h"
+
+#include <stdint.h>
+#include <string>
+
+namespace art {
+
+namespace mirror {
+class AbstractMethod;
+class Object;
+}  // mirror
+
+class PACKED(4) ThrowLocation {
+ public:
+  ThrowLocation() {
+    Clear();
+  }
+
+  ThrowLocation(mirror::Object* throw_this_object, mirror::AbstractMethod* throw_method,
+                uint32_t throw_dex_pc) :
+      this_object_(throw_this_object),
+      method_(throw_method),
+      dex_pc_(throw_dex_pc) {}
+
+  mirror::Object* GetThis() const {
+    return this_object_;
+  }
+
+  mirror::AbstractMethod* GetMethod() const {
+    return method_;
+  }
+
+  uint32_t GetDexPc() const {
+    return dex_pc_;
+  }
+
+  void Clear() {
+    this_object_ = NULL;
+    method_ = NULL;
+    dex_pc_ = -1;
+  }
+
+  std::string Dump() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+
+  void VisitRoots(RootVisitor* visitor, void* arg);
+
+ private:
+  // The 'this' reference of the throwing method.
+  mirror::Object* this_object_;
+  // The throwing method.
+  mirror::AbstractMethod* method_;
+  // The instruction within the throwing method.
+  uint32_t dex_pc_;
+};
+
+}  // namespace art
+
+#endif  // ART_SRC_THROW_LOCATION_H_