[ARM] PR ld/21402, only override the symbol dynamic decision on undefined weak symbol.
[deliverable/binutils-gdb.git] / gdb / ppc-linux-tdep.c
index 2faee42fb6ebd90e1514bff71ae66a819b472720..5f313f85b94d764bc01056a40a9b3e14551d69c8 100644 (file)
@@ -1363,13 +1363,12 @@ ppu2spu_sniffer (const struct frame_unwind *self,
            = FRAME_OBSTACK_CALLOC (1, struct ppu2spu_cache);
 
          struct address_space *aspace = get_frame_address_space (this_frame);
-         struct regcache *regcache = new regcache (data.gdbarch, aspace);
-         struct cleanup *cleanups = make_cleanup_regcache_xfree (regcache);
-         regcache_save (regcache, ppu2spu_unwind_register, &data);
-         discard_cleanups (cleanups);
+         std::unique_ptr<struct regcache> regcache
+           (new struct regcache (data.gdbarch, aspace));
+         regcache_save (regcache.get (), ppu2spu_unwind_register, &data);
 
          cache->frame_id = frame_id_build (base, func);
-         cache->regcache = regcache;
+         cache->regcache = regcache.release ();
          *this_prologue_cache = cache;
          return 1;
        }
This page took 0.024988 seconds and 4 git commands to generate.