This is the mail archive of the gdb-patches@sourceware.org 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]

[patch] comment: push_target: Fix comment


Hi,

I would like to update this comment but I was told one should not make
references to other code in comments as such comment may become stale.
OTOH unaware how to fix it otherwise, changing this code will most probably
require updating the referenced add_target_sections code anyway.


Thanks,
Jan


2010-05-23  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* target.c (push_target): Fix comment wrt strata above.

--- gdb/target.c	23 May 2010 14:23:31 -0000	1.255
+++ gdb/target.c	23 May 2010 14:26:35 -0000
@@ -898,9 +898,8 @@ push_target (struct target_ops *t)
 	break;
     }
 
-  /* If there's already targets at this stratum, remove them.  */
-  /* FIXME: cagney/2003-10-15: I think this should be popping all
-     targets to CUR, and not just those at this stratum level.  */
+  /* If there's already targets at this stratum, remove them.  Do not remove
+     targets at strata above, at least add_target_sections depends on it.  */
   while ((*cur) != NULL && t->to_stratum == (*cur)->to_stratum)
     {
       /* There's already something at this stratum level.  Close it,


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