UPGRADE YOUR BROWSER

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# 45131

13.3 EDK - What are the differences in the debugging levels in SDK?

Description

What are the differences in the Debug Levels in SDK? The options available to me are:

  • None
  • -g1
  • -g (default)
  • -g3

Solution

The -g option in mb-gcc allows you to perform debugging at the source level. The debugger mb-gcc adds appropriate information to the executable file, which helps in debugging the code. The debugger mb-gdb provides debugging at source, assembly, and mixed source and assembly.

While initially verifying the functional correctness of a C program, do not use any mb-gcc optimization option like -O2 or -O3, as mb-gcc does aggressive code motion optimizations which might make debugging difficult to follow.

The default level is -g (sometimes known as -g2).

Level 1 produces minimal information, enough for making backtraces in parts of the program that you do not plan to debug. This includes descriptions of functions and external variables, but no information about local variables and no line numbers.

Level 3 includes extra information, such as all the macro definitions present in the program. Some debuggers support macro expansion when you use -g3.
AR# 45131
Date Created 01/23/2012
Last Updated 12/15/2012
Status Active
Type General Article
Tools
  • EDK - 11.5
  • EDK - 11.1
  • EDK - 11.3
  • More
  • EDK - 11.2
  • EDK - 11.4
  • EDK - 12.1
  • EDK - 12.2
  • EDK - 12.3
  • EDK - 12.4
  • EDK - 13
  • EDK - 13.1
  • EDK - 13.2
  • EDK - 13.3
  • Less