Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

Debugging user space app on uClinux with MMU "hangs" system

Dear all,

I'm trying to debug a user space application on my uClinux/NIOS2 system with MMU, following the instructions in the NIOS Wiki under www(dot)nioswiki(dot)com/OperatingSystems/UClinux/DebugApps (*)

I'm using gdbserver on the target and gcc/gdb from "toolchain-mmu" in the MMU distribution of uClinux, namely "nios2-linux-gnu-gcc" and "nios2-linux-gnu-gdb". Debugging shall be done over TCP/IP via Ethernet.

At first, everything seems to work fine:

I can start the debuggee via "gdbserver", connect to the target via gdb's "target remote <ip>" command and I can also set breakpoints. AFer that, I start the debuggee by using gdb's "continue" command.

The problem is, that the entire system seems to hang as soon as the sowftware stops on the first breakpoint. In the documentation mentioned above, I found the following:

--- Quote Start ---

This nios2-linux-uclibc-insight uses ptrace support of Linux kernel. When it hits a breakpoint, all the other processes still running. this is very different from the nios2-elf-insight, where all processes are stopped

--- Quote End ---

Since I'm not using the uclibc version of gdb/gcc: does that mean that really all processes are stopped once a breakpoint is hit? This would really be a problem since I have at least on critical process (a watchdog trigger) running on the target which must never been stopped even when debugging an application. And what about the kernel drivers (ethernet)? Are they stopped too?

Bottom line: has anyone managed to debug user space apps using the toolchain in the MMU distribution? Any help is greatly appreciated.

Kind regards,

Gerald

(*) Sorry for the weird link notation. For some reason, newusers are not allowed to post weblinks.

2 Replies