]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* dwarf2read.c (dwarf2_build_psymtabs_hard): Do not adjust the
authorPeter Schauer <Peter.Schauer@mytum.de>
Sun, 11 Oct 1998 19:54:57 +0000 (19:54 +0000)
committerPeter Schauer <Peter.Schauer@mytum.de>
Sun, 11 Oct 1998 19:54:57 +0000 (19:54 +0000)
address range of a compilation unit without children.

* mdebugread.c (parse_partial_symbols):  Fix handling of stabs
continuations, use xmalloc and xrealloc.

gdb/ChangeLog
gdb/dwarf2read.c
gdb/mdebugread.c

index 558e1317f44db99d11be441b3935e4f0ab531dd5..b6e3b6d7db4735f23b8281f742e2534f71d1a7a0 100644 (file)
@@ -1,3 +1,11 @@
+Sun Oct 11 12:08:07 1998  Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>
+
+       * dwarf2read.c (dwarf2_build_psymtabs_hard):  Do not adjust the
+       address range of a compilation unit without children.
+
+       * mdebugread.c (parse_partial_symbols):  Fix handling of stabs
+       continuations, use xmalloc and xrealloc.
+
 Fri Oct  9 18:14:43 1998  Mark Alexander  <marka@cygnus.com>
 
        * rs6000-tdep.c: Don't include tm.h twice.
index 2339b6ba8555ca3632bfdc3e2b5d978634892b22..dffc621a303d4fb2fe344ed36e407ae6854014fb 100644 (file)
@@ -1002,15 +1002,17 @@ dwarf2_build_psymtabs_hard (objfile, section_offsets, mainline)
          If so, read the rest of the partial symbols from this comp unit.
          If not, there's no more debug_info for this comp unit. */
       if (comp_unit_die.has_children)
-         info_ptr = scan_partial_symbols (info_ptr, objfile, &lowpc, &highpc);
-
-      /* If the compilation unit didn't have an explicit address range,
-        then use the information extracted from its child dies.  */
-      if (!comp_unit_has_pc_info)
        {
-         comp_unit_die.lowpc  = lowpc;
-         comp_unit_die.highpc = highpc;
-        }
+         info_ptr = scan_partial_symbols (info_ptr, objfile, &lowpc, &highpc);
+
+         /* If the compilation unit didn't have an explicit address range,
+            then use the information extracted from its child dies.  */
+         if (!comp_unit_has_pc_info)
+           {
+             comp_unit_die.lowpc  = lowpc;
+             comp_unit_die.highpc = highpc;
+           }
+       }
       pst->textlow  = comp_unit_die.lowpc + baseaddr;
       pst->texthigh = comp_unit_die.highpc + baseaddr;
 
index c3fae0a8f0dba062b23244fd49f1609b0e629c28..1064490dcff652b8879ae22ed751a3fcdccf7bb9 100644 (file)
@@ -1,5 +1,5 @@
 /* Read a symbol table in ECOFF format (Third-Eye).
-   Copyright 1986, 87, 89, 90, 91, 92, 93, 94, 95, 96, 1997
+   Copyright 1986, 87, 89, 90, 91, 92, 93, 94, 95, 96, 97, 1998
    Free Software Foundation, Inc.
    Original version contributed by Alessandro Forin (af@cs.cmu.edu) at
    CMU.  Major work by Per Bothner, John Gilmore and Ian Lance Taylor
@@ -2749,11 +2749,12 @@ parse_partial_symbols (objfile, section_offsets)
                    /* Concatinate stabstring2 with stabstring1 */
                    if (stabstring
                        && stabstring != debug_info->ss + fh->issBase + sh.iss)
-                     stabstring = realloc (stabstring, len + len2 + 1);
+                     stabstring = xrealloc (stabstring, len + len2 + 1);
                    else
-                     stabstring = malloc (len + len2 + 1);
+                     stabstring = xmalloc (len + len2 + 1);
                    strcpy (stabstring, stabstring1);
                    strcpy (stabstring + len, stabstring2);
+                   len += len2;
                  }
 
 #define SET_NAMESTRING() \