We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 17626

3.2 EDK - GDB is very slow; each instruction takes about 0.3 seconds, and initializing BSS takes about 4 minutes


Keywords: EDK, GDB, slow, BSS, instruction, sec, min, ML300, GNU, Debug

Urgency: Standard

General Description:
When I am using ML300 or some other Virtex-II Pro board and GDB, it seems that GDB is very slow. It appears to take about 0.3 sec to execute a machine instruction, and to initialize BSS might take about four minutes. Can be considered normal speed?


This is slow processing, and likely the reason for this slow processing is that the user is using 'c' and breakpoint instead of 's' and breakpoint.

When encountering this type of a situation, consider the following general advice:

A complicated system could have many peripherals fighting for a bus, thereby slowing down gdb operations. One thing to try is to simplify your system and remove components besides memory and try to load the code and test it that way. A simple design might not bring about the same performance level as a more elaborate one.

Also worth trying is changing the port setting used by XMD. XMD uses tcpip (localhost:1234) to communicate with gdb debug targets. Perhaps other programs are using the tcp port? If so, you could try changing the port number by modifying the "xmdterm.tcl" file to see if that makes a difference.

Regarding SingleStepping, if you do SingleStepping from XMD using the "stp" command, it will be a lot faster. When you do SingleStepping from GDB, it does a lot of extra processing for every "s" command (for example, reading all the PowerPC registers (about 80 regs), reading the memory at the current PC, etc.). This slows down single stepping considerably, but this is usually acceptable if you are interactively debugging a program.

If you are trying to single step over many instructions, then you might want to use the XMD command "stp" to single step through just one instruction, read the current PC, and display it.
AR# 17626
Date 04/28/2006
Status Archive
Type General Article