This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Add xmalloc_failed() function to common-utils.c in to avoid the need to link in libiberty's xmalloc


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=51403f74d96cc69f391fbd31389a9153a230b431

commit 51403f74d96cc69f391fbd31389a9153a230b431
Author: Nick Clifton <nickc@redhat.com>
Date:   Wed Jun 1 11:44:08 2016 +0100

    Add xmalloc_failed() function to common-utils.c in to avoid the need to link in libiberty's xmalloc code.

Diff:
---
 gdb/ChangeLog             | 5 +++++
 gdb/common/common-utils.c | 6 ++++++
 2 files changed, 11 insertions(+)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 134f0f4..9d08c67 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2016-06-01  Nick Clifton  <nickc@redhat.com>
+
+	* common/common-utils.c (xmalloc_failed): New function.  Provided
+	so that the version in libiberty is not linked in.
+
 2016-06-01  Markus Metzger  <markus.t.metzger@intel.com>
 
 	* infcmd.c (skip_finish_frames): New.
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. */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]