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: Save the length of inserted breakpoints


> Date: Mon, 17 Apr 2006 09:37:48 -0400
> From: Daniel Jacobowitz <drow@false.org>
> 
> > I still think we should maintain a strict seperation between the
> > high-level breakpoint code and the low-level target code.  So I'd
> > really appreciate it if you'd be willing to change your patch such
> > that instead of struct bp_location, you used a different struct, which
> > for now would have three members: the saved contents, the length and
> > the address.  It's perfectly ok with me to make that new struct part
> > of struct bp_location to avoid all memory allocation problems.
> 
> Sounds perfect!  While the argument was a little wearing, I am entirely
> happy with this result.  I'll post a patch for this shortly.

Sorry about that.  I was a bit annoyed by some of the replies, and I
guess me wanting to make a point here made my subsequent replies a bit
unconstructive.

> I've been thinking about having target methods which don't need the
> shadow contents (there are definitely several) record the "length" of
> the breakpoint as zero; then deprecated_read_memory_nobpt can do the
> right thing.  Does this sound reasonable?  The alternative is to do an
> unnecessary read from the target.

Absolutely.  If the length is zero there are no shadow contents to
worry about.  But it is probably better to address
deprecated_read_memory_nobpt in a seperate patch.

Mark


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