Exception Handling: libdex integration. Also added unit test on exception.

Runtime processing of TryItem and CatchHandler. Added iterator.

Next step: Exception Handling: RT integration. Implement throw and
unwind.

Change-Id: Idf88ce83e37b004016f1eca2c621e5a86948fe91
diff --git a/src/class_linker.cc b/src/class_linker.cc
index 9053d57..2aed455 100644
--- a/src/class_linker.cc
+++ b/src/class_linker.cc
@@ -489,6 +489,7 @@
     dst->descriptor_ = String::AllocFromModifiedUtf8(utf16_length, utf8.get());
   }
   dst->proto_idx_ = method_id.proto_idx_;
+  dst->code_off_ = src.code_off_;
   dst->shorty_ = dex_file.GetShorty(method_id.proto_idx_);
   dst->access_flags_ = src.access_flags_;
 
@@ -499,7 +500,6 @@
     dst->num_registers_ = code_item->registers_size_;
     dst->num_ins_ = code_item->ins_size_;
     dst->num_outs_ = code_item->outs_size_;
-    dst->insns_ = code_item->insns_;
   } else {
     uint16_t num_args = dst->NumArgRegisters();
     if (!dst->IsStatic()) {
@@ -1340,7 +1340,9 @@
   for (size_t i = 0; i < klass->NumVirtualMethods(); ++i) {
     Method* method = klass->GetVirtualMethod(i);
     if (method->IsAbstract()) {
-      method->insns_ = reinterpret_cast<uint16_t*>(0xFFFFFFFF);  // TODO: AbstractMethodError
+      LG << "AbstractMethodError";
+      method->code_off_ = 0xFFFFFFFF;
+      // TODO: throw AbstractMethodError
     }
   }
 }