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


On Friday 23 April 2010 08:41:50, Pieter Maljaars wrote:
> I have tested this with Solaris 2.10 and GDB-7.1. I have removed 
> the CANNOT_STEP_HW_WATCHPOINT define.  Here this bug does not occur.
> 
>     (gdb) start
>     Temporary breakpoint 1 at 0x8050681: file watchp.c, line 13.
>     Starting program: [...]/watchp
> 
>     Temporary breakpoint 1, main () at watchp.c:13
>     13        myrec.x = 5;
>     (gdb) print myrec.x
>     $1 = 0
>     (gdb) watch myrec.x
>     Hardware watchpoint 2: myrec.x
>     (gdb) s
>     Hardware watchpoint 2: myrec.x
>     
>     Old value = 0
>     New value = 5
>     main () at watchp.c:14
>     14        myrec.y = 3.4;
> 
> 
> Here it works as expected.  GDB stops also at the other watchpoint.
> So with "step" and "continue" both watchpoints are triggered, like
> it behaves on x86-linux.

(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.

-- 
Pedro Alves


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