Debugging Via The Gdb Console - WAGO 750 Series Manual

Linux fieldbus coupler
Hide thumbs Also See for 750 Series:
Table of Contents

Advertisement

122 • Step-by-Step Guide to your own Linux Application
Debugging of User Space Programs
To simplify the operation of GDB, a script needs to be generated that creates
defined starting conditions for the debugger. Use the following call to generate
the script:
> emacs gdb.script
Enter the following code into the emacs and save it via CTRL-X, CTRL-S:
target remote 192.168.1.3:1234
b main
continue
If the default IP address of the Linux fieldbus controller has been changed, it
is necessary to also change the IP address that is in the first line of the above-
mentioned script.
In the first line of the script, a remote connection is automatically established
to the GDB server of the Linux fieldbus controller with the IP address
192.168.1.3
the
breakpoint is reached.

5.12.5 Debugging via the GDB Console

In order to enable cross debugging between the PC and the Linux fieldbus
controller, a connection via Ethernet is used. In the procedure described below
the Linux fieldbus controller has the default IP address 192.168.1.3, the Linux
PC has IP address 192.168.1.4. If your settings differ from the settings
indicated above, change the IP addresses so that they match the addresses in
the example.
First, start the GDB server on the Linux fieldbus controller. To do so, change
the directory in which is the program that has been created in the previous
section:
> cd ~/uclinux-dist/user/newProg
Enter the following call into the console:
> gdbserver 192.168.1.4:1234 newProg
using port number
routine and the third line starts the program that runs until the
main
. The second line sets a breakpoint to
1234
WAGO-I/O-SYSTEM 750
Linux Fieldbus Coupler

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

750-860

Table of Contents