Download Dynamic linker and debugging/tracing interface for HelenOS

Transcript
Chapter 3
Debugging and Tracing Overview
3.1
3.1.1
Bugs and Observability
Hunting Bugs
Bugs or defects in functionality tend to appear in every part of software life cycle.
There are many different types of bugs and there are many different methods of
hunting them. Bugs in large and complex software systems can be extremely difficult
to find. To track down such bugs we try to make use of all the different options that
are available to us. Anything that can help to pinpoint the bug is a valid option.
Apart from the nature of the bug one can also choose the debugging method
to use depending on the information available to him (source code, symbol table,
type information), the position he finds himself in (developer, sustaining engineer)
or simply personal preference.
3.1.2
Observability
Observability is a property of a system that allows to infer its internal state by
knowledge of its external outputs. In software engineering observability is extremely
desirable since, in an observable system, one can examine the sequence of events that
has lead to the bug and hopefully find its cause.
Observability in a computing system can be attained through its design, debugging output and tools. In real software systems attaining full observability is an
endless battle, as each new tool or programming environment usually requires new
debugging tools to remain observable.
For example, in a traditional operating system, we need a kernel debugger to
observe the kernel and an application debugger to observe the native applications.
However, an application written in an interpreted language cannot be readily observed with the native application debugger and usually necessitates the use of a
specialized tool. A similar situation arises with the proliferation of virtual machines,
such as Microsoft’s CLR (Common Language Runtime) or Sun’s Java Virtual Machine.
3.1.3
Impact
In order to be able to pinpoint any bug that has ever manifested itself, we would
ideally want software to be fully observable. Observability, however, always comes
27