[Ltrace-devel] [PATCH v1 1/6] Export find_dynamic_entry_addr
edgar.iglesias at gmail.com
edgar.iglesias at gmail.com
Tue Oct 9 12:50:30 UTC 2012
From: "Edgar E. Iglesias" <edgar at axis.com>
Export find_dynamic_entry_addr as proc_find_dynamic_entry_addr.
Signed-off-by: Edgar E. Iglesias <edgar at axis.com>
---
proc.h | 5 +++++
sysdeps/linux-gnu/proc.c | 6 +++---
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/proc.h b/proc.h
index 9864e1b..b1b22b5 100644
--- a/proc.h
+++ b/proc.h
@@ -237,4 +237,9 @@ void *proc_each_breakpoint(struct Process *proc, void *start,
void *data),
void *data);
+/* Iterate through the dynamic section at src_addr looking for D_TAG.
+ * If tag is found, fill it's value in RET and return 0.
+ * If tag is not found, return a negative value. */
+int proc_find_dynamic_entry_addr(struct Process *proc, arch_addr_t src_addr,
+ int d_tag, arch_addr_t *ret);
#endif /* _PROC_H_ */
diff --git a/sysdeps/linux-gnu/proc.c b/sysdeps/linux-gnu/proc.c
index d05da13..450177c 100644
--- a/sysdeps/linux-gnu/proc.c
+++ b/sysdeps/linux-gnu/proc.c
@@ -317,9 +317,9 @@ dyn_fetcher(struct Process *proc))(struct Process *,
return select_32_64(proc, fetch_dyn32, fetch_dyn64);
}
-static int
-find_dynamic_entry_addr(struct Process *proc, arch_addr_t src_addr,
- int d_tag, arch_addr_t *ret)
+int
+proc_find_dynamic_entry_addr(struct Process *proc, arch_addr_t src_addr,
+ int d_tag, arch_addr_t *ret)
{
debug(DEBUG_FUNCTION, "find_dynamic_entry()");
--
1.7.8.6
More information about the Ltrace-devel
mailing list