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: [RFC] problem fetching inferior memory due to breakpoint


Daniel Jacobowitz wrote:
On Wed, Apr 26, 2006 at 04:33:12PM -0700, Michael Snyder wrote:

You know what might be a good optimization?

Take "breakpoints_inserted" out of infcmd, stick it in breakpoint.c,
and export an access method.  It makes no sense for anybody except
breakpoint.c to be keeping track of this anyway.

Then, read_memory_no_bpt can simply check this, and if it's not set,
default to target_read_memory.


True - but not in the big picture. If there's enough breakpoints that
walking the linked list checking ->inserted is a problem, think how
much more of a problem removing them and inserting them every step time
must be.

I must not have made myself clear. I didn't mean to suggest any change as to when or how often breakpoints are inserted. My suggestion relates to when and how often we would have to walk the list of breakpoints before reading memory.

If the breakpoints_inserted flag were made globally available
(thru an accessor method, of course), then there is a really
inexpensive way to determine that the list-walking step may
be skipped.


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