aboutsummaryrefslogtreecommitdiff
path: root/gdb/common/common-utils.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-06-01 11:44:08 +0100
committerNick Clifton <nickc@redhat.com>2016-06-01 11:44:08 +0100
commit51403f74d96cc69f391fbd31389a9153a230b431 (patch)
tree5c664f3e2dcd5100c338ff6e45108f43d74be846 /gdb/common/common-utils.c
parente3b5daf9f735999259c5a8f68b422850c59897e5 (diff)
downloadgdb-51403f74d96cc69f391fbd31389a9153a230b431.zip
gdb-51403f74d96cc69f391fbd31389a9153a230b431.tar.gz
gdb-51403f74d96cc69f391fbd31389a9153a230b431.tar.bz2
Add xmalloc_failed() function to common-utils.c in to avoid the need to link in libiberty's xmalloc code.
Diffstat (limited to 'gdb/common/common-utils.c')
-rw-r--r--gdb/common/common-utils.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/common/common-utils.c b/gdb/common/common-utils.c
index 33668f3..5a346ec 100644
--- a/gdb/common/common-utils.c
+++ b/gdb/common/common-utils.c
@@ -100,6 +100,12 @@ xfree (void *ptr)
free (ptr); /* ARI: free */
}
+void
+xmalloc_failed (size_t size)
+{
+ malloc_failure (size);
+}
+
/* Like asprintf/vasprintf but get an internal_error if the call
fails. */