This is the mail archive of the gdb@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: Question about solaris CANNOT_STEP_HW_WATCHPOINTS macro



> -----Message d'origine-----
> De?: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] De la
> part de Joel Brobecker
> Envoyé?: Friday, April 23, 2010 4:08 PM
> À?: Pedro Alves
> Cc?: pieter.maljaars@altenpts.nl; Pierre Muller;
> Peter.Schauer@regent.e-technik.tu-muenchen.de; gdb@sourceware.org;
> 'Joseph S. Myers'
> Objet?: Re: Question about solaris CANNOT_STEP_HW_WATCHPOINTS macro
> 
> > (I assume this was x86 or x86-64 solaris, not sparc.)  If you
> > _don't_ remove the CANNOT_STEP_HW_WATCHPOINT, then I suppose
> > you'll see watchpoints being missed when you step (since
> > the workaround works by removing watchpoints
> > when single-stepping) on Solaris 10 as well.
> 
> Just for the record, I just finished testing on x86-solaris 10,
> and same results as on 8...

  We are getting troubles, but I
think that I understood what is going on:
  the problem is that it all depends on how you start your
program:
  If you use 'break main' followed by 'run',
you will have a breakpoint that is at the exact instruction
that should trigger the watchpoint hit.
  But currently GDB disables all breakpoints (including watchpoints)
to step over the breakpoint on main without hitting again the 'int 3'
instruction.
  If you use the 'start' command, a temporary breakpoint at the same
location
is created, but the breakpoint is removed by GDB.
  Thus the 'next' does not need to disable the breakpoints.
In that configuration you do get a failure with current GDB
due to CANNOT_STEP_OVER_HW_WATCHPOINTS macro that gets
resolved by removing that macro.

  I will send a RFA for this test to gdb-patches.

Pierre


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