summaryrefslogtreecommitdiffstats
path: root/src/dex_file.h
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2013-04-18 16:51:54 -0700
committerIan Rogers <irogers@google.com>2013-04-18 17:02:36 -0700
commitdbbc99d2a197592aee8fdaf01253e426c9dff1d8 (patch)
treef08f3aad803db4400f5de6bcf8d0c8d6e694436b /src/dex_file.h
parentfbdc0fa4f5b1a45390a909afa44a61042406dcd4 (diff)
downloadart-dbbc99d2a197592aee8fdaf01253e426c9dff1d8.zip
art-dbbc99d2a197592aee8fdaf01253e426c9dff1d8.tar.gz
art-dbbc99d2a197592aee8fdaf01253e426c9dff1d8.tar.bz2
Factor out try item from catch handler finding.
Portable indexs try basic blocks using their try item index. Factor out this computation from catch handler address computation so that the binary search code can be shared (WIP for the sharing in https://googleplex-android-review.googlesource.com/#/c/281427/20). Change-Id: Ifea63bf06c0184c6fa7a6aa3a6620711e390069a
Diffstat (limited to 'src/dex_file.h')
-rw-r--r--src/dex_file.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dex_file.h b/src/dex_file.h
index 002d79c..88dd5fc 100644
--- a/src/dex_file.h
+++ b/src/dex_file.h
@@ -690,11 +690,11 @@ class DexFile {
return handler_data + offset;
}
- // Find the handler associated with a given address, if any.
- // Initializes the given iterator and returns true if a match is
- // found. Returns end if there is no applicable handler.
- static int32_t FindCatchHandlerOffset(const CodeItem &code_item, int32_t tries_size,
- uint32_t address);
+ // Find which try region is associated with the given address (ie dex pc). Returns -1 if none.
+ static int32_t FindTryItem(const CodeItem &code_item, uint32_t address);
+
+ // Find the handler offset associated with the given address (ie dex pc). Returns -1 if none.
+ static int32_t FindCatchHandlerOffset(const CodeItem &code_item, uint32_t address);
// Get the pointer to the start of the debugging data
const byte* GetDebugInfoStream(const CodeItem* code_item) const {