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]

Re: [RFC/RFA] target.c: Check current_target in target_resize_to_sections


Committed.

        - Nathan

2004-08-27  Nathan J. Williams  <nathanw@wasabisystems.com>

	* target.c (target_resize_to_sections): Check
	current_target.to_sections for an old value when updating.

Index: target.c
===================================================================
RCS file: /cvs/src/src/gdb/target.c,v
retrieving revision 1.78
diff -u -r1.78 target.c
--- target.c	3 Aug 2004 00:57:26 -0000	1.78
+++ target.c	27 Aug 2004 18:02:57 -0000
@@ -1415,6 +1415,13 @@
 	      (*t)->to_sections_end = target->to_sections_end;
 	    }
 	}
+      /* There is a flattened view of the target stack in current_target,
+	 so its to_sections pointer might also need updating. */
+      if (current_target.to_sections == old_value)
+	{
+	  current_target.to_sections = target->to_sections;
+	  current_target.to_sections_end = target->to_sections_end;
+	}
     }
   
   return old_count;


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