This is the mail archive of the gdb-patches@sourceware.cygnus.com 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]

Re: [PATCH RFA] TARGET_ADJUST_BREAKPOINT_ADDRESS...


> Date: Wed, 21 Jun 2000 12:50:32 -0700
> From: Kevin Buettner <kevinb@cygnus.com>
> 
> > Perhaps we should make the information about moving the breakpoint
> > part of the "Breakpoint 1 at ..." message.
> 
> I think this is a good idea.  Perhaps something like
> 
>     Breakpoint 1 at 0x0620008c (moved from 0x6200090): file bar.c, line 21.
> 
> or perhaps
> 
>     Breakpoint 1 at 0x0620008c (adjusted from 0x6200090): file bar.c, line 21.
> 
> To do this, I think it'll be necessary to add a field to the
> breakpoint structure which would record the address requested vs. the
> address you actually got.

Yes, this is what I had in mind.  It's also possible that the
"adjusted" part should be moved to a separate line, like so:

  Breakpoint 1 at 0x0620008c: file bar.c, line 21
  (breakpoint address adjusted from 0x6200090).

This would prevent the line from overflowing when the file name is
long.  It also separates the main info from the addendum more
clearly.

> > My other comment is about hardware-assisted breakpoints: it looks
> > like, at least in some of the examples you gave, the address of
> > hardware-assisted breakpoints will also need to be adjusted in the
> > same way.  So I think we need some provision for that as well.
> 
> I don't have a lot of experience with hardware assisted breakpoints. 
> Is there something that I forgot do which'll prevent the adjustment
> from happening for hardware assisted breakpoints as well?

I admit I didn't try to apply your patch and look at the resulting
source, so perhaps I'm the one who misses something.

My comment actually boils down to this:

  1) Do hardware breakpoints go through the same code where you put
     the changes?  If not, we will need similar changes where hardware
     breakpoints are handled.

  2) Are we sure that the adjustment for hardware breakpoints is
     identical to that for normal breakpoints?  If not, it's probably
     a good idea to have two separate macros.

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