* [patch] comment: push_target: Fix comment
@ 2010-05-23 17:06 Jan Kratochvil
2010-05-23 17:32 ` Doug Evans
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kratochvil @ 2010-05-23 17:06 UTC (permalink / raw)
To: gdb-patches
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,
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] comment: push_target: Fix comment
2010-05-23 17:06 [patch] comment: push_target: Fix comment Jan Kratochvil
@ 2010-05-23 17:32 ` Doug Evans
0 siblings, 0 replies; 2+ messages in thread
From: Doug Evans @ 2010-05-23 17:32 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: gdb-patches
On Sun, May 23, 2010 at 7:29 AM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> 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.
For reference sake, comments that describe the function it is in have
also become stale!
While the likelihood is a bit higher here, I don't have a problem with it.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-23 17:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-23 17:06 [patch] comment: push_target: Fix comment Jan Kratochvil
2010-05-23 17:32 ` Doug Evans
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox