Difference between revisions of "GDB"

From ArmadeusWiki
Jump to: navigation, search
m (Debugging directly on target)
m (Debugging on target from Host through Ethernet)
Line 10: Line 10:
  
 
* On your host launch:
 
* On your host launch:
  $ arm-linux-gdb program
+
  [armadeus]$ arm-linux-gdb program_name
 +
(gdb) set solib-absolute-prefix ./buildroot/build_arm/staging_dir/
 
  (gdb) target remote 192.168.0.3:2345
 
  (gdb) target remote 192.168.0.3:2345
 
192.168.0.3 is the address of your target
 
192.168.0.3 is the address of your target

Revision as of 19:56, 7 July 2008

On this page you will find all you need to debug your applications running on your Armadeus board

First of all, be sure to have installed the Toolchain During Cross Compiler configuration be sure to have choosen GDB for the Host and GDBserver options

Debugging on target from Host through Ethernet

  • On the target launch your program like that:
# gdbserver 192.168.0.2:2345 program [args]

192.168.0.2 is the IP address of your Host and 2345 the port number to use

  • On your host launch:
[armadeus]$ arm-linux-gdb program_name
(gdb) set solib-absolute-prefix ./buildroot/build_arm/staging_dir/
(gdb) target remote 192.168.0.3:2345

192.168.0.3 is the address of your target

only continue (c) can be used to start program as it is always running when you launch GDB on your host

Core dump analysis doesn't seem to work in this use case !!

Debugging directly on target

You have to build gdb for the target and have a working NFS link between your target and your host.
On target launch GDB from your NFS mount like you do it usually:

# /mnt/host/gdb your_prog

If you need argument passing:

# /mnt/host/gdb --args your_prog your_args

To debug a Core dump:

# /mnt/host/gdb your_prog -c your_core

Links

Other languages:

English Flag.svg English  •  French Flag.svg Français