aboutsummaryrefslogtreecommitdiff
path: root/gdb/cp-support.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/cp-support.c')
-rw-r--r--gdb/cp-support.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index 17f8237..4902e50 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -528,6 +528,13 @@ cp_canonicalize_string (const char *string)
ret = cp_comp_to_string (info->tree, estimated_len);
cp_demangled_name_parse_free (info);
+ if (ret == NULL)
+ {
+ warning (_("internal error: string \"%s\" failed to be canonicalized"),
+ string);
+ return NULL;
+ }
+
if (strcmp (string, ret) == 0)
{
xfree (ret);