]> sourceware.org Git - systemtap.git/commitdiff
Flatten dwflpp in add_unwindsym_ldd
authorJosh Stone <jistone@redhat.com>
Sat, 3 May 2014 00:50:00 +0000 (17:50 -0700)
committerJosh Stone <jistone@redhat.com>
Sat, 3 May 2014 00:50:00 +0000 (17:50 -0700)
There's no reason to new/delete this dwflpp instance; just create it
directly on the stack with no worries.

translate.cxx

index 2c890240af3047f054ee28c81021775c7e609b02..629a99f666ff7c5e04d4a36791c76c640765357f 100644 (file)
@@ -6439,14 +6439,13 @@ add_unwindsym_ldd (systemtap_session &s)
       assert (modname.length() != 0);
       if (! is_user_module (modname)) continue;
 
-      struct dwflpp *mod_dwflpp = new dwflpp(s, modname, false);
-      mod_dwflpp->iterate_over_modules(&query_module, mod_dwflpp);
-      if (mod_dwflpp->module) // existing binary
+      dwflpp mod_dwflpp (s, modname, false);
+      mod_dwflpp.iterate_over_modules(&query_module, &mod_dwflpp);
+      if (mod_dwflpp.module) // existing binary
         {
-          assert (mod_dwflpp->module_name != "");
-          mod_dwflpp->iterate_over_libraries (&add_unwindsym_iol_callback, &added);
+          assert (mod_dwflpp.module_name != "");
+          mod_dwflpp.iterate_over_libraries (&add_unwindsym_iol_callback, &added);
         }
-      delete mod_dwflpp;
     }
 
   s.unwindsym_modules.insert (added.begin(), added.end());
This page took 0.036725 seconds and 5 git commands to generate.