mirror of
https://github.com/sstefani/mtrace.git
synced 2025-12-08 01:36:43 +08:00
fix 64 bit tracing
This commit is contained in:
parent
8f469b108e
commit
eaab4f5aad
7
task.c
7
task.c
@ -160,7 +160,6 @@ static int task_init(struct task *task, int attached)
|
||||
|
||||
task->leader->threads++;
|
||||
task->breakpoints = NULL;
|
||||
task->is_64bit = task->leader->is_64bit;
|
||||
|
||||
list_add_tail(&task->task_list, &task->leader->task_list);
|
||||
}
|
||||
@ -317,6 +316,8 @@ int task_clone(struct task *task, struct task *newtask)
|
||||
assert(newtask->stopped);
|
||||
assert(newtask->backtrace == NULL);
|
||||
|
||||
newtask->is_64bit = task->is_64bit;
|
||||
|
||||
if (backtrace_init(newtask) < 0)
|
||||
goto fail;
|
||||
|
||||
@ -341,6 +342,8 @@ int task_fork(struct task *task, struct task *newtask)
|
||||
assert(newtask->stopped);
|
||||
assert(newtask->backtrace == NULL);
|
||||
|
||||
newtask->is_64bit = task->is_64bit;
|
||||
|
||||
if (backtrace_init(newtask) < 0)
|
||||
goto fail;
|
||||
|
||||
@ -461,6 +464,8 @@ void open_pid(pid_t pid)
|
||||
list_for_each(it, &leader->task_list) {
|
||||
struct task *task = container_of(it, struct task, task_list);
|
||||
|
||||
assert(task->leader == leader);
|
||||
|
||||
task->is_64bit = leader->is_64bit;
|
||||
|
||||
if (backtrace_init(task) < 0) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user