debug problems on ppc 83xx target due to changed struct task_struct

Holger Brunck holger.brunck at
Sat Aug 13 00:50:38 AEST 2016

Hi all,
we are currently trying to update from kernel 3.10 to latest stable kernel 4.4
and we encounter the following problem.

When I try to debug our multithreaded userspace application with gdb I  get
stuck when trying to single step code.

Due to the fact that our ppc 8360 target is mainlined (kmeter1) I was able to
bisect the kernel to check when this problem was introduced. It turns out to be
introduced with commit:

commit 0c8c0f03e3a292e031596484275c14cf39c0ab7a
Author: Dave Hansen <dave at>
Date:   Fri Jul 17 12:28:11 2015 +0200

    x86/fpu, sched: Dynamically allocate 'struct fpu'

This patch moves the definition of "struct thread_struct thread;" from the
middle of the "struct task_struct" to the end (include/linux/sched.h). When I
move back the definition to the original place and recompile, everything works
fine. I double-checked this with the latest kernel 4.7 and I have the  same

I also tried a different toolchain (I got poky/jethro with gcc 5.2) and tried a
eldk 5.4 with gcc 4.7, as I am not sure if this is really a kernel problem  or
related to a gdb or gcc. But I still have the same behaviour with a different

Does anyone have an idea why the change in sched.h break my debug usecase?
Anyone out here who is debugging ppc83xx targets flawlessly with a recent kernel?

Any help is apreciated.

Best regards
Holger Brunck

More information about the Linuxppc-dev mailing list