Using gdb to debug program on target

Man I use to be a pro with gdb and debugging remote programs. I wrote a target-side stub for heaven’s sake. Now I can’t even remember how to do a basic connection. sad.


Host: x86_64 Ubuntu (

Target: ARM-based board (


  1. Copy program from Host to Target.
    • $ scp Hello root@
  2. On target:
    • $ gdbserver Hello
  3. On Host:
    • $ arm-none-linux-gnueabi-gdb Hello
    • (gdb) target remote



gdbserver <HOST>:<PORT#> PROGRAM

This entry was posted in troubleshooting and tagged , , . Bookmark the permalink.

2 Responses to Using gdb to debug program on target

  1. Ester says:

    Hi Mitchell!
    Nice to come across your examples while googling to fix a pulseaudio problem 🙂

    • fangstar says:

      hehe. there are few pulseaudio programmatic examples. I’ll probably be writing some stuff about PulseAudio. Maybe this student can help his teacher? I know your soundcontroller code so well now! One thing I’m trying to figure out for PulseAudio is the data callbacks for threaded mainloop. The signal(cxt, 1) and approve doesn’t work for me so I’m just doing the basic callback.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s