This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[old patch] symfile.c


I thought I committed this to mainline, but I committed it only to
gdb-6 branch. 
Committed it now.

elena


http://sources.redhat.com/ml/gdb-patches/2003-08/msg00240.html

2003-08-13  Elena Zannoni  <ezannoni@redhat.com>

	* symfile.c (symbol_file_add_with_addrs_or_offsets): Make sure
	orig_addrs is set up properly.

Index: symfile.c
===================================================================
RCS file: /cvs/uberbaum/gdb/symfile.c,v
retrieving revision 1.101
diff -u -p -r1.101 symfile.c
--- symfile.c	27 Jun 2003 13:11:17 -0000	1.101
+++ symfile.c	13 Aug 2003 22:08:27 -0000
@@ -854,7 +854,12 @@ symbol_file_add_with_addrs_or_offsets (c
   orig_addrs = alloc_section_addr_info (bfd_count_sections (abfd));
   my_cleanups = make_cleanup (xfree, orig_addrs);
   if (addrs)
-    *orig_addrs = *addrs;
+    {
+      int i;
+      orig_addrs->num_sections = addrs->num_sections;
+      for (i = 0; i < addrs->num_sections; i++)
+	orig_addrs->other[i] = addrs->other[i];
+    }
 
   /* If the objfile uses a mapped symbol file, and we have a psymtab for
      it, then skip reading any symbols at this time. */



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]