https://bugs.kde.org/show_bug.cgi?id=469146

--- Comment #8 from Paul Floyd <pjfl...@wanadoo.fr> ---
+   for (i = 0; i < n_ips && !top_has_fnname; ++i) {

That needs to be "for (i = *top;"

+      iipc = VG_(new_IIPC)(ep, ips[i]);
+      do {
+         top_has_fnname = VG_(get_fnname_inl)(ep, ips[i], &fnname, iipc);
+         if (top_has_fnname && VG_(strIsMemberXA)(alloc_fns, fnname)) {
+            VERB(4, "filtering alloc fn %s\n", fnname);
+            (*top)++;
+            (*n_ips_sel)--;
+         } else {
+            i = n_ips;
+            break;
+         }
+      } while (VG_(next_IIPC)(iipc));
+      VG_(delete_IIPC)(iipc);

That's a bit tricker. The code is working its way down the stack as long as
functions have a name and are in the alloc-fn set.

So maybe something like

 // look for inline functions
 do {
     top_has_fnname = VG_(get_fnname_inl)(ep, ips[i], &fnname, iipc);
     is_allloc_fn = VG_(strIsMemberXA)(alloc_fns, fnname);
  } while (top_has_fnname && is_alloc_fn && VG_(next_IIPC)(iipc));
  // next step down stack
      if (top_has_fnname &&  is_alloc_fn) {
         VERB(4, "filtering alloc fn %s\n", fnname);
         (*top)++;
         (*n_ips_sel)--;
      } else {
         break;
      }

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to