[Ltrace-devel] [PATCH 1/1] Initialize libdl tracing when attaching ltrace to specific PIDs

Joe Damato ice799 at gmail.com
Mon Mar 18 04:53:37 UTC 2013


---
 proc.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/proc.c b/proc.c
index aab0b62..d0de6f0 100644
--- a/proc.c
+++ b/proc.c
@@ -561,6 +561,11 @@ open_pid(pid_t pid)
 	}
 
 	struct process *leader = pid2proc(pid)->leader;
+	struct library *pidlib = leader->libraries;
+	while (pidlib->next != NULL)
+		pidlib = pidlib->next;
+
+	linkmap_init(leader, pidlib->dyn_addr);
 
 	/* XXX Is there a way to figure out whether _start has
 	 * actually already been hit?  */
-- 
1.7.9.5




More information about the Ltrace-devel mailing list