Use try item offset to find catch block instead of Dex PC.
Change-Id: Icb8cd07a824be638c02a6204cfaf034a249d49b5
diff --git a/src/dex_file.h b/src/dex_file.h
index 70c2059..aeb7e89 100644
--- a/src/dex_file.h
+++ b/src/dex_file.h
@@ -1128,6 +1128,10 @@
class CatchHandlerIterator {
public:
CatchHandlerIterator(const DexFile::CodeItem& code_item, uint32_t address);
+
+ CatchHandlerIterator(const DexFile::CodeItem& code_item,
+ const DexFile::TryItem& try_item);
+
explicit CatchHandlerIterator(const byte* handler_data) {
Init(handler_data);
}
@@ -1148,6 +1152,7 @@
return current_data_;
}
private:
+ void Init(const DexFile::CodeItem& code_item, int32_t offset);
void Init(const byte* handler_data);
struct CatchHandlerItem {