Re: [patch v6 00/12] branch tracing support for Atom

Jan Kratochvil
2013-01-01T16:35:00Z

On Sat, 22 Dec 2012 14:08:12 +0100, Jan Kratochvil wrote:
> On Wed, 19 Dec 2012 10:59:37 +0100, Metzger, Markus T wrote:
> > If I just followed the "target record" command, I would lose the selective
> > enabling as well as the automatic enabling
>
> Pushing of the new target could be hooked to to_post_startup_inferior and
> to_post_attach, I hope that's enough.

When thinking about it the btrace target should stay pushed
after "record btrace auto". And contrary to the current record.c practice it
would no longer unpush itself during to_mourn_inferior, to_kill etc.

(The same wouhld apply to a new feature "record auto" as it is the same issue.
Just I do not want to get you into a too much work of improving record.c,
I can take some parts of record.c if you ask for.)

Also the keeping up to date of observer_attach_new_thread and
observer_detach_new_thread could be simplified by creating a new to_target
method would would be called together with observer_notify_new_thread.

Then one can forget about to_post_startup_inferior/to_post_attach, that was
a wrong advice.

Thanks,
Jan