Forum Discussion

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

[uClinux] debug stub not caught by gdb

Hi all, I tried to debug a user app using a procedure listed on he wiki, namely:

  1. configure FPGA (nios2-configure-sof ...)

  2. open a JTAG terminal on host (nios2-terminal)

  3. start gdb server on host (nios2-gdb-server --tcpport 8888)

  4. start gdb on host upon vmlinux (nios2-linux-uclibc-gdb vmlinux)

  5. connect gdb to server (target remote localhost:8888)

  6. from gdb load vmlinux on target (load)

  7. start kernel execution (continue), now uClinux boots as seen on nios2-terminal

  8. at target's prompt execute 'debug hello' (hello is the hello world app).
Now the expected behaviour is (I think) for gdb to stop the processor as the Nios2 debug application stub 'debug' issues a 'movi r2, 1; trap' instruction pair, but what I get is the hello program fully executed and the target's prompt ready again.

I'm using the wiki version of both uClinux & toolchain. nios2-elf-gdb does also the same.

What's my error? Why gdb does not caught the trap?

Thanks and regards.
No RepliesBe the first to reply