Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: minor fix for i386v-nat.c
       [not found] <NCBBLMGKIKDGJMEOMNMEMEDEHEAA.john@Calva.COM>
@ 2001-06-27 21:36 ` Andrew Cagney
  2001-06-28  0:47   ` John Hughes
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Andrew Cagney @ 2001-06-27 21:36 UTC (permalink / raw)
  To: John Hughes; +Cc: gdb-patches

Did anyone ever look at this?



> In i386_insert_aligned_watchpoint the actual address being watched was saved
> in address_loookup.  This is fine for aligned watchpoints, the address gdb
> wants to watch is the same as the actual address.  For non-aligned
> watchpoints
> we have to ask the hadware to watch up to 3 different addresses.  We need to
> remember the address gdb wants to watch so i386_remove_watchpoint knows
> which
> registers to clean up.
> 
> Changelog:
> 
> 2000-10-30  John Hughes  <john@CalvaEDI.COM>
> 
> * i386v-nat.c (i386_insert_aligned_watchpoint) save waddr (the
>         watched address) in address_lookup[] rather than addr.  This allows
>         clean removal of non-aligned watchpoints.
> 
> Patch (against released gdb-5.0) attached.
> 
> --
> John Hughes <john@Calva.COM>,
>         CalvaEDI SA.                            Tel: +33-1-4313-3131
>         66 rue du Moulin de la Pointe,          Fax: +33-1-4313-3139
>         75013 PARIS.
> 
> 
> 
> --- i386v-nat.c.orig	Wed Dec  8 03:50:38 1999
> +++ i386v-nat.c	Sun Oct 29 12:53:16 2000
> @@ -213,7 +213,7 @@
>  	  addr);
>  
>    /* Record where we came from.  */
> -  address_lookup[register_number] = addr;
> +  address_lookup[register_number] = waddr;
>    return 0;
>  }
>  
> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: minor fix for i386v-nat.c
  2001-06-27 21:36 ` minor fix for i386v-nat.c Andrew Cagney
@ 2001-06-28  0:47   ` John Hughes
  2001-06-28  2:58   ` John Hughes
  2001-06-28  3:41   ` Eli Zaretskii
  2 siblings, 0 replies; 6+ messages in thread
From: John Hughes @ 2001-06-28  0:47 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches

Andrew Cagney <ac131313@cygnus.com> writes:
> 
> Did anyone ever look at this?
> 

You mean appart from me?  No idea.

(I don't think I'm on the mailing list any more, CC me if you
have questions).


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: minor fix for i386v-nat.c
  2001-06-27 21:36 ` minor fix for i386v-nat.c Andrew Cagney
  2001-06-28  0:47   ` John Hughes
@ 2001-06-28  2:58   ` John Hughes
  2001-06-28  3:42     ` Eli Zaretskii
  2001-06-28  3:41   ` Eli Zaretskii
  2 siblings, 1 reply; 6+ messages in thread
From: John Hughes @ 2001-06-28  2:58 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches

Andrew Cagney <ac131313@cygnus.com> writes:
>
>Did anyone ever look at this?

The right thing to do would be to zap the watchpoint handling from
i386v-nat.c and use the more sophisticated code in i386-nat.c.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: minor fix for i386v-nat.c
  2001-06-27 21:36 ` minor fix for i386v-nat.c Andrew Cagney
  2001-06-28  0:47   ` John Hughes
  2001-06-28  2:58   ` John Hughes
@ 2001-06-28  3:41   ` Eli Zaretskii
  2 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2001-06-28  3:41 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: John Hughes, gdb-patches

On Thu, 28 Jun 2001, Andrew Cagney wrote:

> Did anyone ever look at this?

Is any x86 port still using this code?  I'd expect them all to switch
to the new watchpoint support in i386-nat.c, by now.

> > In i386_insert_aligned_watchpoint the actual address being watched
> > was saved in address_loookup.  This is fine for aligned
> > watchpoints, the address gdb wants to watch is the same as the
> > actual address.  For non-aligned watchpoints we have to ask the
> > hadware to watch up to 3 different addresses.  We need to remember
> > the address gdb wants to watch so i386_remove_watchpoint knows
> > which registers to clean up.

Won't this do the wrong thing in i386_stopped_by_watchpoint?  You'll
report the wrong address there (not the one the debug register
actually watched).

I think a cleaner way to do this is to store the actual address being
watched by the DRi, but to modify i386_remove_watchpoint to break up
its act into several individual removals like
i386_insert_aligned_watchpoint does.  This is what the code in
i386-nat.c does.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: minor fix for i386v-nat.c
  2001-06-28  2:58   ` John Hughes
@ 2001-06-28  3:42     ` Eli Zaretskii
  2001-06-28  9:23       ` Andrew Cagney
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2001-06-28  3:42 UTC (permalink / raw)
  To: John Hughes; +Cc: Andrew Cagney, gdb-patches

On Thu, 28 Jun 2001, John Hughes wrote:

> The right thing to do would be to zap the watchpoint handling from
> i386v-nat.c and use the more sophisticated code in i386-nat.c.

Yep.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: minor fix for i386v-nat.c
  2001-06-28  3:42     ` Eli Zaretskii
@ 2001-06-28  9:23       ` Andrew Cagney
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Cagney @ 2001-06-28  9:23 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: John Hughes, gdb-patches

> On Thu, 28 Jun 2001, John Hughes wrote:
> 
> 
>> The right thing to do would be to zap the watchpoint handling from
>> i386v-nat.c and use the more sophisticated code in i386-nat.c.
> 
> 
> Yep.


In that case I declare the patch dead :-)

	Andrew





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-06-28  9:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <NCBBLMGKIKDGJMEOMNMEMEDEHEAA.john@Calva.COM>
2001-06-27 21:36 ` minor fix for i386v-nat.c Andrew Cagney
2001-06-28  0:47   ` John Hughes
2001-06-28  2:58   ` John Hughes
2001-06-28  3:42     ` Eli Zaretskii
2001-06-28  9:23       ` Andrew Cagney
2001-06-28  3:41   ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox