Chapter 9
Debugging
WHAT’S IN THIS CHAPTER?
- What a debugger can do
- The difference between a software debugger and hardware debugger
- Debugger terminology
- A few software and hardware debuggers
- Debugging techniques
- When to use a debugger
- Effective debugging
A program that works the “first time” is a myth. There will invariably be little problems that need to be fixed: Some of them will be easy; some of them will be hard. Be careful, though; sometimes the easiest problems are the hardest to spot.
There are various techniques for solving problems, but unfortunately, there is no general rule. This is something that is acquired over the years, and it sometimes boils down to instinct.
ARM processors have advanced features that enable developers to easily debug applications or kernels, whatever solution the developer takes.
WHAT IS A DEBUGGER?
For anyone in systems programming, a debugger is a software application that can run a program, line by line and show various pieces of data, such as variables and memory contents. You can use debuggers primarily to follow, step by step, the execution of a program and to understand why portions of that program do not function as wanted. Debuggers normally require an operating system to run and to have a method of communication externally: a serial line, Ethernet, monitor, and so on.
For embedded systems, this is often a problem because most do not have outputs, and some do not have an operating system. Even on systems that do have an operating system, ...
Get Professional Embedded ARM Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.