This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] gdb: New frame_cache_cleared observer.
- From: Pedro Alves <palves at redhat dot com>
- To: Doug Evans <dje at google dot com>, Andrew Burgess <andrew dot burgess at embecosm dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Thu, 26 Mar 2015 09:24:27 +0000
- Subject: Re: [PATCH] gdb: New frame_cache_cleared observer.
- Authentication-results: sourceware.org; auth=none
- References: <1427303468-17834-1-git-send-email-andrew dot burgess at embecosm dot com> <CADPb22TsxSy8d8dstV5HPz6gU-Nbf=sKoyVXFHcR5VNTdXB3Zg at mail dot gmail dot com>
On 03/25/2015 11:18 PM, Doug Evans wrote:
> On Wed, Mar 25, 2015 at 10:11 AM, Andrew Burgess
> <firstname.lastname@example.org> wrote:
>> This adds a new observer for the frame cache cleared event.
>> While working on a new gdb port I found that I wanted to cache machine
>> state that was gathered as part of the register read process. The
>> most appropriate time to discard this cached information is when the
>> frame cache is flushed.
>> However, as I don't have an actual use for this observer that I can
>> post upstream (yet) I don't know if this will be acceptable, but given
>> it's a fairly small change I thought I'd try.
>> * frame.c (reinit_frame_cache): Trigger frame_cache_cleared
> AIUI, our rules for dead code elimination preclude such a patch being applied.
> I can go either way on this particular patch myself, but those are the rules
> (as I understand them).
Right. We delete dead code all the time. So it's better to wait until
is has a use, because otherwise someone could well end up stumbling on it,
noticing it has no uses and decides to send a patch that garbage