Using The Gdb Debugger From The Command Line - Basler exA640-60m Operating Manual

Table of Contents

Advertisement

3.3.2 Using the Gdb Debugger from the Command
Line
In this section, we will walk through the steps for debugging the SimpleGrab program using the
gdb debugger from the command line. We assume that you have built the SimpleGrab program
with debug information, that you have created and uploaded a stripped version of the program to
the eXcite, that you have started the stripped program on the eXcite under control of the
gdbserver, and that you have created a gdb debugger configuration file as described on pages
14
through 3-18.
Now you must launch the mips-linux-gnu-gdb debugger on your development PC and step
through the program. On the development PC, execute the following from the command line:
1. cd [pathname]/samples/SimpleGrab/Debug
(Where [pathname] is the absolute path name to the directory on your development PC where
the eXcite sample programs are located.)
2. mips-linux-gnu-gdb -x $HOME/mips-linux-gnu-gdbinit SimpleGrab
(This starts the gdb debugger and you should see the (gdb) prompt appear.)
3. connect
(This command connects the debugger on the PC to the gdbserver in the eXcite.
Note that the connect command will only work if it has been defined in the debugger
configuration file as described on page 3-18.)
4. br main
(This command sets a breakpoint at the beginning of SimpleGrab's main function.)
5. cont
(This command resumes program execution until the break point is hit.)
6. next
7. next
8. next
(The three next commands are used to step over the first three statements of the main
function.)
9. cont
(This command lets the program run until it terminates itself.)
10. quit
(This command ends the gdbdebugger program.)
Basler eXcite
Draft
Learning to Use the eXcite
3-
3-19

Advertisement

Table of Contents
loading

Table of Contents