diff options
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 55c2412..65b4e26 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -1686,9 +1686,11 @@ add_partial_namespace (struct partial_die_info *pdi, char *info_ptr, /* Calculate the full name of the namespace that we just entered. */ const char *new_name = pdi->name; + char *full_name; + if (new_name == NULL) new_name = "(anonymous namespace)"; - char *full_name = alloca (strlen (namespace) + 2 + strlen (new_name) + 1); + full_name = alloca (strlen (namespace) + 2 + strlen (new_name) + 1); strcpy (full_name, namespace); if (*namespace != '\0') strcat (full_name, "::"); |