debugging uClinux application with GDB simulator

Waldemar Brodkorb
2017-10-10T09:12:19Z

Hi GDB hackers,

I would like to debug an issue with vfork() function
from uClibc-ng for h8/300 architecture.

How it is supposed to work?

I can successfully load a Linux kernel with piggyback
initramfs and the sash shell in GDB simulator.
As soon as I try to exec another application it fails.
I think it might be a bug in vfork function.
As it is implemented in assembly I can not try to do
simple printf debugging.

The binary format used for this architecture is FLAT
and all C library functions are statically linked into
the sash binary.

As I start the GDB simulator with the kernel I can not
break into vfork() as it is not yet loaded.

Any hints?

thanks in advance,
Waldemar