gdbsupport: add observer_debug_printf, OBSERVER_SCOPED_DEBUG_ENTER_EXIT
Switch observer to use the "new" debug printf mechanism and sprinkle a
few debug prints. Here's a small example of the output with "infrun"
and "observer" debug output enabled:
[infrun] proceed: enter
[observer] notify: start: observable target_resumed notify() called
[observer] notify: start: calling observer mi-interp of observable target_resumed
[observer] notify: end: calling observer mi-interp of observable target_resumed
[observer] notify: start: calling observer py-inferior of observable target_resumed
[observer] notify: end: calling observer py-inferior of observable target_resumed
[observer] notify: end: observable target_resumed notify() called
...
gdbsupport/ChangeLog:
* observable.h (observer_debug_printf,
OBSERVER_SCOPED_DEBUG_START_END): New.
(class observable) <notify, attach>: Use them.
Change-Id: If3ae4b6b65450ca3b7cae56698a87fc526688b86