keiths / rpms / gdb

Forked from rpms/gdb 18 days ago
Clone
7c724ed
2005-09-22  Bastien Nocera  <bnocera@redhat.com>
7c724ed
7c724ed
	* symtab.c (find_line_pc_range): Don't free up pc_list
7c724ed
	unconditionally as it may not be allocated.
7c724ed
7c724ed
--- gdb-6.3/gdb/symtab.c.fix	2005-09-22 16:24:06.000000000 -0400
7c724ed
+++ gdb-6.3/gdb/symtab.c	2005-09-22 16:26:17.000000000 -0400
7c724ed
@@ -2427,9 +2427,10 @@ find_line_pc_range (struct symtab_and_li
7c724ed
   /* FIXME: have to handle ctors/dtors where line equates to multiple
7c724ed
             pc ranges.  */
7c724ed
   if (startaddr == 0)
7c724ed
-    startaddr = pc_list[0];
7c724ed
-
7c724ed
-  xfree (pc_list);
7c724ed
+    {
7c724ed
+      startaddr = pc_list[0];
7c724ed
+      xfree (pc_list);
7c724ed
+    }
7c724ed
 
7c724ed
   /* This whole function is based on address.  For example, if line 10 has
7c724ed
      two parts, one from 0x100 to 0x200 and one from 0x300 to 0x400, then