This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Add observer notification in normal_stop


[sigh, once more, with the patch this time...]

Welcome to my world.


Hello,

I am currently writing a regression test for observer.c, which will live
in testsuite/gdb.gdb. It's using a mechanism similar to xfullpath.exp.
But in order for the test to function, observer.o needs to be linked in.
This wasn't the case up to now, because there is currently no code using
it.

This patch is adding a call to observer_notify_normal_stop() inside
normal_stop. This notification will be useful later, when the latest
version of ada-task.c (from ACT's repository, accessible from
libre.act-europe.fr BTW) is contributed. In the meantime, the overhead
is really minimal and it allows us to test observer.c by debugging gdb.

2003-03-17 J. Brobecker <brobecker at gnat dot com>

        * infrun.c (observer.h): Add #include.
        (normal_stop): Add call to observer_notify_normal_stop.
        * Makefile.in (infrun.o): Add dependency on observer.h.

Ok to apply?

I think down the end, next to the annotate_stop() call, would be better.


I'm assuming that the secret agenda is to replace all annotate_xxx() and xxx_hook() calls with a equivalent observer_notify_xxx() call. Hence, adding an observer_xxx() call where ever either of the former appears should be pretty obvious and largely mechanical.

An orthogonal task is rationalizing some of those events and/or their call site. For instance, merging registers changed and memory changed into a single observer_notify_target_changed().

Andrew



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]