Resources - Using GDB in MI (machine interface) mode

While working with GDB in MI mode we have encountered the following issues:

1. Target hooks cleared after initialization

Some target implementations rely on GDB hooks to keep internal state consistent with target state -- for example, the registers_changed_hook and the register_changed_hook. These hooks are typically initialized in the targets _initialize_xxx routine. When running in MI mode, for GDB implementations based on the 5.3 tree, these hooks are reset in mi-main.c: mi_command_loop() after the target initialization routine. This problem has been fixed since version 6.0.

2. "finish" breakpoints not cleaned up

(registered as issue gdb/2426)

For certain versions of GDB running in MI mode, internal breakpoints used to implement the "finish" command are not properly deleted resulting in unexpected program stoppages during debugging. This problem was introduced at some point after version 6.0 and appears to be present in all versions up to version 6.7.1. The problem is reported to be fixed in the latest source and will be in GDB versions after 6.8.