diff options
author | Petr Machata <pmachata@redhat.com> | 2014-02-13 16:02:50 +0100 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-08-22 20:38:25 +0900 |
commit | 5699f1d4db485de0c837c1d3bd5f6e96f250858c (patch) | |
tree | 43d1d7bcaa1867dcf41202b92c79dc8fc166e439 | |
parent | 63099a2916d2f281aadc6304583bda09909f2a53 (diff) | |
download | ltrace-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.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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; } |