aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>2002-01-24 04:08:33 +0000
committerFred Fish <fnf@specifix.com>2002-01-24 04:08:33 +0000
commit86f902e0d1c08e9ac59cbff5e82c6a0351e037cb (patch)
tree92facdd9cb3793cfab2e93d9129857a734851d7e /gdb
parent8af51c360e7b5902a27f92cf57327c472f0f365a (diff)
downloadfsf-binutils-gdb-86f902e0d1c08e9ac59cbff5e82c6a0351e037cb.zip
fsf-binutils-gdb-86f902e0d1c08e9ac59cbff5e82c6a0351e037cb.tar.gz
fsf-binutils-gdb-86f902e0d1c08e9ac59cbff5e82c6a0351e037cb.tar.bz2
Approved by msynder@redhat.com
2002-01-23 Fred Fish <fnf@redhat.com> * mdebugread.c (parse_partial_symbols): Only copy stabstring1 to stabstring on initial malloc. Reallocing will copy it for us, if necessary.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/mdebugread.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fa8553c..32ae048 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2002-01-23 Fred Fish <fnf@redhat.com>
+
+ * mdebugread.c (parse_partial_symbols): Only copy stabstring1 to
+ stabstring on initial malloc. Reallocing will copy it for us,
+ if necessary.
+
2002-01-23 Elena Zannoni <ezannoni@redhat.com>
* Makefile.in (hpread_h): Delete.
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 7be8080..629fa9a 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -2707,8 +2707,10 @@ parse_partial_symbols (struct objfile *objfile)
&& stabstring != debug_info->ss + fh->issBase + sh.iss)
stabstring = xrealloc (stabstring, len + len2 + 1);
else
- stabstring = xmalloc (len + len2 + 1);
- strcpy (stabstring, stabstring1);
+ {
+ stabstring = xmalloc (len + len2 + 1);
+ strcpy (stabstring, stabstring1);
+ }
strcpy (stabstring + len, stabstring2);
len += len2;
}