summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2014-02-13 16:02:50 +0100
committerChanho Park <chanho61.park@samsung.com>2014-08-22 20:38:25 +0900
commit5699f1d4db485de0c837c1d3bd5f6e96f250858c (patch)
tree43d1d7bcaa1867dcf41202b92c79dc8fc166e439
parent63099a2916d2f281aadc6304583bda09909f2a53 (diff)
downloadltrace-5699f1d4db485de0c837c1d3bd5f6e96f250858c.tar.gz
ltrace-5699f1d4db485de0c837c1d3bd5f6e96f250858c.tar.bz2
ltrace-5699f1d4db485de0c837c1d3bd5f6e96f250858c.zip
Initialize struct process.e_machine and .e_class for secondary threads
-rw-r--r--proc.c8
1 files 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;
}