[ltrace-commits] 01/01: Initialize struct process.e_machine and .e_class for secondary threads

Petr Machata pmachata-guest at moszumanska.debian.org
Thu Feb 13 15:03:44 UTC 2014


This is an automated email from the git hooks/post-receive script.

pmachata-guest pushed a commit to branch master
in repository ltrace.

commit 8137e804992f15590105a3db29673674971dff7b
Author: Petr Machata <pmachata at redhat.com>
Date:   Thu Feb 13 16:02:50 2014 +0100

    Initialize struct process.e_machine and .e_class for secondary threads
---
 proc.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/proc.c b/proc.c
index 6f4f64e..17bb3cd 100644
--- a/proc.c
+++ b/proc.c
@@ -224,9 +224,11 @@ process_init(struct process *proc, const char *filename, pid_t pid)
 		goto fail;
 	}
 
-	if (proc->leader != proc)
-		return 0;
-	if (process_init_main(proc) < 0) {
+	if (proc->leader != proc) {
+		proc->e_machine = proc->leader->e_machine;
+		proc->e_class = proc->leader->e_class;
+		get_arch_dep(proc);
+	} else if (process_init_main(proc) < 0) {
 		process_bare_destroy(proc, 0);
 		goto fail;
 	}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/ltrace.git



More information about the ltrace-commits mailing list