]> sourceware.org Git - systemtap.git/commit
stapdyn: Manage mutator lifetime better
authorJosh Stone <jistone@redhat.com>
Tue, 30 Oct 2012 01:53:59 +0000 (18:53 -0700)
committerJosh Stone <jistone@redhat.com>
Tue, 30 Oct 2012 01:53:59 +0000 (18:53 -0700)
commit7f7eca3097d9f00ed11b3402f629e2f3be8348a5
tree6f904809585cd5b46878b97bcc14af37614957e1
parent744aac4dc3e066dcd92f31d7d89a47a7de65def8
stapdyn: Manage mutator lifetime better

We need to have a global record of mutators in order for dyninst
callbacks to work, since they have no context attached.  But rather than
some singleton factory style, just keep a global list of all mutators
we've seen.

* stapdyn/mutator.cxx (g_mutators): New vector for all mutators.
  (g_dynamic_library_callback): Iterate callbacks for all g_mutators.
  (mutator::dynamic_library_callback): Do the individual work.
  (mutator::mutator): Add this to g_mutators.
  (mutator::~mutator): Remove this from g_mutators.
  (mutator::create, mutator::g_mutator): Removed.
* stapdyn/stapdyn.cxx (main): Use mutator new and auto_ptr delete.
stapdyn/mutator.cxx
stapdyn/mutator.h
stapdyn/stapdyn.cxx
This page took 0.024845 seconds and 5 git commands to generate.