| < Previous PageNext Page > | |
The BlackDog SDK includes the GDB (GNU Project Debugger). This debugger is an extremely useful tool that displays messages to a console or log file to help you see inside a running program.
Note: To use the debugger, you need to compile the code with the -g flag, and you should not use the -O flag. See Compiling Applications for more information.
For example to use the debugger:
gdb applicationName
(gdb) runGDB runs the program and displays debugging messages.
See the GDB manual or go to http://www.gnu.org/software/gdb/gdb.html for more information about GDB.
Because embedded applications often have to run in a resource-constrained environment, it is a good idea to optimize your applications for performance. Profiling allows you to learn where your program spent its time and which functions called other functions while it was executing. This information can show you which pieces of your program are slower than you expected, and might be candidates for rewriting to make your program execute faster. It can also tell you which functions are being called more or less often than you expected. This may help you spot bugs that had otherwise gone unnoticed. The BlackDog SDK includes the GNU compiler's gprof program to profile your applications.
Note: To use the profiler, you need to compile the code with the -pg flag and run the application. See Compiling Applications for more information.
To use the profiler:
gprof applicationName > applicationName.out
Note: The above command redirects the profiler's output to a file called applicationName.out.
Click here for more information about gprof.
| < Previous PageNext Page > | |
Copyright © Realm Systems, Inc. 2003-2005.
All rights reserved. |