aboutsummaryrefslogtreecommitdiff
path: root/gdb/dbxread.c
diff options
context:
space:
mode:
authorPaul Pluzhnikov <ppluzhnikov@google.com>2009-07-29 23:10:05 +0000
committerPaul Pluzhnikov <ppluzhnikov@google.com>2009-07-29 23:10:05 +0000
commit60f25dfd8c668f0b184302ae6b63b14a1482c631 (patch)
treea8caac80d87e1ec6fb2cc72d54c022db9c417ead /gdb/dbxread.c
parentb0832eea407474d0312edfa21734ef12bc28404f (diff)
downloadgdb-60f25dfd8c668f0b184302ae6b63b14a1482c631.zip
gdb-60f25dfd8c668f0b184302ae6b63b14a1482c631.tar.gz
gdb-60f25dfd8c668f0b184302ae6b63b14a1482c631.tar.bz2
2009-07-29 Paul Pluzhnikov <ppluzhnikov@google.com>
PR gdb/6817 * dbxread.c (read_dbx_symtab): Reduce stack use.
Diffstat (limited to 'gdb/dbxread.c')
-rw-r--r--gdb/dbxread.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 37e9be7..7cb016d 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -1689,7 +1689,7 @@ pos %d"),
sym_name = NULL; /* pacify "gcc -Werror" */
if (psymtab_language == language_cplus)
{
- char *new_name, *name = alloca (p - namestring + 1);
+ char *new_name, *name = xmalloc (p - namestring + 1);
memcpy (name, namestring, p - namestring);
name[p - namestring] = '\0';
new_name = cp_canonicalize_string (name);
@@ -1700,6 +1700,7 @@ pos %d"),
&objfile->objfile_obstack);
xfree (new_name);
}
+ xfree (name);
}
if (sym_len == 0)