This removes regcache_xfree in favor of plain "delete".
gdb/ChangeLog
2017-09-25 Tom Tromey <tom@tromey.com>
* spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
* regcache.h (regcache_xfree): Don't declare.
* regcache.c (regcache_xfree): Remove.
(do_regcache_xfree): Use delete.
* ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
* linux-fork.c (free_fork): Use delete.
(fork_save_infrun_state): Likewise.
* jit.c (jit_dealloc_cache): Use delete.
* infrun.c (discard_infcall_suspend_state): Use delete.
2017-09-25 Tom Tromey <tom@tromey.com>
+ * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
+ * regcache.h (regcache_xfree): Don't declare.
+ * regcache.c (regcache_xfree): Remove.
+ (do_regcache_xfree): Use delete.
+ * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
+ * linux-fork.c (free_fork): Use delete.
+ (fork_save_infrun_state): Likewise.
+ * jit.c (jit_dealloc_cache): Use delete.
+ * infrun.c (discard_infcall_suspend_state): Use delete.
+
+2017-09-25 Tom Tromey <tom@tromey.com>
+
* regcache.h (regcache_xmalloc): Don't declare.
(regcache_raw_set_cached_value): Update comment.
* regcache.c (regcache_xmalloc): Remove.
void
discard_infcall_suspend_state (struct infcall_suspend_state *inf_state)
{
- regcache_xfree (inf_state->registers);
+ delete inf_state->registers;
xfree (inf_state->siginfo_data);
xfree (inf_state);
}
struct jit_unwind_private *priv_data = (struct jit_unwind_private *) cache;
gdb_assert (priv_data->regcache != NULL);
- regcache_xfree (priv_data->regcache);
+ delete priv_data->regcache;
xfree (priv_data);
}
if (fp)
{
if (fp->savedregs)
- regcache_xfree (fp->savedregs);
+ delete fp->savedregs;
if (fp->filepos)
xfree (fp->filepos);
xfree (fp);
DIR *d;
if (fp->savedregs)
- regcache_xfree (fp->savedregs);
+ delete fp->savedregs;
fp->savedregs = regcache_dup (get_current_regcache ());
fp->clobber_regs = clobber_regs;
ppu2spu_dealloc_cache (struct frame_info *self, void *this_cache)
{
struct ppu2spu_cache *cache = (struct ppu2spu_cache *) this_cache;
- regcache_xfree (cache->regcache);
+ delete cache->regcache;
}
static const struct frame_unwind ppu2spu_unwind = {
return regcache->ptid ();
}
-void
-regcache_xfree (struct regcache *regcache)
-{
- if (regcache == NULL)
- return;
-
- delete regcache;
-}
-
static void
do_regcache_xfree (void *data)
{
- regcache_xfree ((struct regcache *) data);
+ delete (struct regcache *) data;
}
struct cleanup *
struct gdbarch *,
struct address_space *);
-void regcache_xfree (struct regcache *regcache);
struct cleanup *make_cleanup_regcache_xfree (struct regcache *regcache);
/* Return REGCACHE's ptid. */
spu2ppu_dealloc_cache (struct frame_info *self, void *this_cache)
{
struct spu2ppu_cache *cache = (struct spu2ppu_cache *) this_cache;
- regcache_xfree (cache->regcache);
+ delete cache->regcache;
}
static const struct frame_unwind spu2ppu_unwind = {