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]

Re: [PATCH] gdb: New frame_cache_cleared observer.


Doug, Pedro,

* Pedro Alves <palves@redhat.com> [2015-03-26 09:24:27 +0000]:

> On 03/25/2015 11:18 PM, Doug Evans wrote:
> > On Wed, Mar 25, 2015 at 10:11 AM, Andrew Burgess
> > <andrew.burgess@embecosm.com> 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.

> 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
> collects it.

Thanks for looking at my patch, and I understand why you've rejected
it for now.

I do have one followup: as far as I can tell the observers
register_changed, inferior_call_pre, and inferior_call_post are only
used by the python bindings to make the events available in python.
As far as I can tell[1] these event bindings are only used within the
test suite.

... and a question: If I made frame_cache_cleared a python accessible
event, and added a test would this be sufficient to keep the code
alive?

Thanks for your time,
Andrew

[1] I could easily be wrong!


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