diff options
author | Arun Sharma <arun@sharma-home.net> | 2010-05-15 12:15:49 -0700 |
---|---|---|
committer | Arun Sharma <arun@sharma-home.net> | 2010-05-15 12:15:49 -0700 |
commit | 8ee7b1762ed76957a86d6c84a1d34ee49eda37a3 (patch) | |
tree | da3a9bd705d907ac1e01d3d940dab490eef4acdb | |
parent | 1787a2fd284a786b409af74047a12de02c644cd1 (diff) | |
download | libunwind-8ee7b1762ed76957a86d6c84a1d34ee49eda37a3.tar.gz |
Add ip argument to _UPTi_find_unwind_table.
Signed-off-by: Andris Zeila <andris.zeila@accenture.com>
-rw-r--r-- | src/ptrace/_UPT_find_proc_info.c | 8 | ||||
-rw-r--r-- | src/ptrace/_UPT_internal.h | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/ptrace/_UPT_find_proc_info.c b/src/ptrace/_UPT_find_proc_info.c index 4d70bf59..a0bd52c4 100644 --- a/src/ptrace/_UPT_find_proc_info.c +++ b/src/ptrace/_UPT_find_proc_info.c @@ -97,7 +97,8 @@ find_gp (struct UPT_info *ui, Elf64_Phdr *pdyn, Elf64_Addr load_base) HIDDEN unw_dyn_info_t * _UPTi_find_unwind_table (struct UPT_info *ui, unw_addr_space_t as, - char *path, unw_word_t segbase, unw_word_t mapoff) + char *path, unw_word_t segbase, unw_word_t mapoff, + unw_word_t ip) { Elf64_Phdr *phdr, *ptxt = NULL, *punw = NULL, *pdyn = NULL; Elf64_Ehdr *ehdr; @@ -165,7 +166,8 @@ dwarf_read_encoded_pointer (unw_addr_space_t as, unw_accessors_t *a, HIDDEN unw_dyn_info_t * _UPTi_find_unwind_table (struct UPT_info *ui, unw_addr_space_t as, - char *path, unw_word_t segbase, unw_word_t mapoff) + char *path, unw_word_t segbase, unw_word_t mapoff, + unw_word_t ip) { Elf_W(Phdr) *phdr, *ptxt = NULL, *peh_hdr = NULL, *pdyn = NULL; unw_word_t addr, eh_frame_start, fde_count, load_base; @@ -348,7 +350,7 @@ get_unwind_info (struct UPT_info *ui, unw_addr_space_t as, unw_word_t ip) /* Here, SEGBASE is the starting-address of the (mmap'ped) segment which covers the IP we're looking for. */ - di = _UPTi_find_unwind_table (ui, as, path, segbase, mapoff); + di = _UPTi_find_unwind_table (ui, as, path, segbase, mapoff, ip); if (!di /* This can happen in corner cases where dynamically generated code falls into the same page that contains the data-segment diff --git a/src/ptrace/_UPT_internal.h b/src/ptrace/_UPT_internal.h index bc7bf9c1..ff11e738 100644 --- a/src/ptrace/_UPT_internal.h +++ b/src/ptrace/_UPT_internal.h @@ -62,6 +62,7 @@ extern unw_dyn_info_t *_UPTi_find_unwind_table (struct UPT_info *ui, unw_addr_space_t as, char *path, unw_word_t segbase, - unw_word_t mapoff); + unw_word_t mapoff, + unw_word_t ip); #endif /* _UPT_internal_h */ |