diff options
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/utils.c | 3 | ||||
-rw-r--r-- | gdb/utils.h | 5 | ||||
-rw-r--r-- | gdb/xml-support.c | 2 |
4 files changed, 8 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 766cff4..2ffc333 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,12 @@ 2019-12-12 Tom Tromey <tromey@adacore.com> + * xml-support.c (xml_fetch_content_from_file): Don't call + malloc_failure. + * utils.h (class gdb_argv): Remove malloc_failure comment. + * utils.c (gdb_argv::reset): Don't call malloc_failure. + +2019-12-12 Tom Tromey <tromey@adacore.com> + * Makefile.in (ALL_TARGET_OBS): Add riscv-ravenscar-thread.o. (HFILES_NO_SRCDIR): Add riscv-ravenscar-thread.h. (ALLDEPFILES): Add riscv-ravenscar-thread.c. diff --git a/gdb/utils.c b/gdb/utils.c index f7fae35..0b8ec02 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -3033,9 +3033,6 @@ gdb_argv::reset (const char *s) { char **argv = buildargv (s); - if (s != NULL && argv == NULL) - malloc_failure (0); - freeargv (m_argv); m_argv = argv; } diff --git a/gdb/utils.h b/gdb/utils.h index c8337f2..7186019 100644 --- a/gdb/utils.h +++ b/gdb/utils.h @@ -146,10 +146,7 @@ public: } /* A constructor that calls buildargv on STR. STR may be NULL, in - which case this object is initialized with a NULL array. If - buildargv fails due to out-of-memory, call malloc_failure. - Therefore, the value is guaranteed to be non-NULL, unless the - parameter itself is NULL. */ + which case this object is initialized with a NULL array. */ explicit gdb_argv (const char *str) : m_argv (NULL) diff --git a/gdb/xml-support.c b/gdb/xml-support.c index 915be76..f5a1427 100644 --- a/gdb/xml-support.c +++ b/gdb/xml-support.c @@ -977,8 +977,6 @@ xml_fetch_content_from_file (const char *filename, void *baton) { char *fullname = concat (dirname, "/", filename, (char *) NULL); - if (fullname == NULL) - malloc_failure (0); file = gdb_fopen_cloexec (fullname, FOPEN_RT); xfree (fullname); } |