This is the mail archive of the gdb-patches@sources.redhat.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]
Other format: [Raw text]

Re: [RFC] Possible bug with i386 watchpoints on several targets.


At 12:22 05/12/2001 , vous avez écrit:

>On Wed, 5 Dec 2001, Pierre Muller wrote:
>
> > Eli, you didn't answer if you agree that 
> > the call to i386_cleanup_dregs is required for all targets using
> > standard i386 hardware watchpoints.
>
>I don't know; theoretically, GDB should remove all the watchpoints from 
>the debuggee on the way to exit.  If all watchpoints are removed, the 
>dr_* variables are cleaned up automatically.

But that is not the case for now...
I agree that this also should solve the problem,
but I don't know exactly how to do this, and if
there are reasons NOT to do so.

I think that for instance removing a normal breakpoint
will fail after program termination, if the breakpoint
is set by changing the .text section,
as the address will most probably not be accessible anymore.
  Processors different from ix86 might also
need access to the memory location to remove a watchpoint successfully.

We could use function remove_hw_watchpoints,
but hardware breakpoints should probably also be removed, no ?

I don't know exactly at which location this call should be made...

>But an explicit call to i386_cleanup_dregs when the debuggee dies cannot 
>possibly do any harm, so there should be no reason not to do that, if it 
>is sometimes needed.

    If your patch also does explicitly remove all hardware watchpoints, 
the it will indeed become unneeded  (probably also for go32-nat target).


Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07  Fax : (33)-3-88-41-40-99


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