From: Andrew Cagney <cagney@gnu.org>
To: "Nathan J. Williams" <nathanw@wasabisystems.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFC/RFA] target.c: Check current_target in target_resize_to_sections
Date: Fri, 27 Aug 2004 15:13:00 -0000 [thread overview]
Message-ID: <412F4F68.5000104@gnu.org> (raw)
In-Reply-To: <mtu7jrkocgn.fsf@contents-vnder-pressvre.mit.edu>
> Andrew Cagney <cagney@gnu.org> writes:
>
>
>>>> > 2004-08-25 Nathan J. Williams <nathanw@wasabisystems.com>
>>>> > * target.c (target_resize_to_sections): Check
>>>> > current_target.to_sections for an old value when updating.
>>
>>>
>>> Can you just add some sort of brief comment noting why current_target
>>> also needs to be checked. With that it's ok (but post the revised
>>> patch when committing).
>
>
> Sure. Should I add the comment to the ChangeLog, the code, or both?
> (The code already says what it's trying to do by updating all this
> stuff, and while it's not obvious when something like current_target
> is missing, it's pretty obvious when it's there).
The code. The ChangeLog contains what was changed, the code why.
It's not so obvious, as otherwize you'd have not found yourself fixing
the bug :-) Just some sort of gentle reminder that current_target
contains a flattened copy of the target stack and hence also needs to be
updated.
Andrew
next prev parent reply other threads:[~2004-08-27 15:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-25 20:40 Nathan J. Williams
2004-08-26 21:25 ` Andrew Cagney
2004-08-27 14:57 ` Nathan J. Williams
2004-08-27 15:13 ` Andrew Cagney [this message]
2004-08-27 18:12 ` Nathan J. Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=412F4F68.5000104@gnu.org \
--to=cagney@gnu.org \
--cc=gdb-patches@sources.redhat.com \
--cc=nathanw@wasabisystems.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox