Replace some xmalloc-family functions with XNEW-family ones
Commit Message
On 15-08-26 05:19 PM, Simon Marchi wrote:
> Alright, pushed a slightly modified (rebased) version:
I had a little mistake, result of some bad git handling. I pushed
this fix:
From 1dc7a6235090327d7b5586f85e6115c3cd13ed83 Mon Sep 17 00:00:00 2001
From: Simon Marchi <simon.marchi@ericsson.com>
Date: Wed, 26 Aug 2015 17:31:47 -0400
Subject: [PATCH] Fix gdbarch.c build error
I made a mistake while handling my previous patch. A change in
gdbarch causes a build failure.
gdb/ChangeLog:
* gdbarch.sh (append_name): Fix type in XRESIZEVEC.
* gdbarch.c: Re-generate.
---
gdb/ChangeLog | 5 +++++
gdb/gdbarch.c | 2 +-
gdb/gdbarch.sh | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
@@ -1,5 +1,10 @@
2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
+ * gdbarch.sh (append_name): Fix type in XRESIZEVEC.
+ * gdbarch.c: Re-generate.
+
+2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
+
* aarch64-linux-nat.c (aarch64_add_process): Likewise.
* aarch64-tdep.c (aarch64_gdbarch_init): Likewise.
* ada-exp.y (write_ambiguous_var): Likewise.
@@ -4894,7 +4894,7 @@ static struct gdbarch_registration *gdbarch_registry = NULL;
static void
append_name (const char ***buf, int *nr, const char *name)
{
- *buf = XRESIZEVEC (const char **, *buf, *nr + 1);
+ *buf = XRESIZEVEC (const char *, *buf, *nr + 1);
(*buf)[*nr] = name;
*nr += 1;
}
@@ -2201,7 +2201,7 @@ static struct gdbarch_registration *gdbarch_registry = NULL;
static void
append_name (const char ***buf, int *nr, const char *name)
{
- *buf = XRESIZEVEC (const char **, *buf, *nr + 1);
+ *buf = XRESIZEVEC (const char *, *buf, *nr + 1);
(*buf)[*nr] = name;
*nr += 1;
}