This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: Question about solaris CANNOT_STEP_HW_WATCHPOINTS macro
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: <pieter dot maljaars at altenpts dot nl>, "'Joel Brobecker'" <brobecker at adacore dot com>
- Cc: <Peter dot Schauer at regent dot e-technik dot tu-muenchen dot de>, <gdb at sourceware dot org>, "'Joseph S. Myers'" <joseph at codesourcery dot com>, "'Pedro Alves'" <pedro at codesourcery dot com>
- Date: Fri, 23 Apr 2010 14:40:50 +0200
- Subject: RE: Question about solaris CANNOT_STEP_HW_WATCHPOINTS macro
- References: 20100422235956.GG13204@adacore.com <20100423074150.24ae59af@mail.altenpts.nl>
I reproduced Pieter's results and filed
a bug report:
http://sourceware.org/bugzilla/show_bug.cgi?id=11531
This changes the scenery completely:
it becomes important that CANNOT_STEP_HW_WATCHPOINTS macro
does not get set.
If, as Pedro said, GDB does not check for a hardware watchpoint
trigger after the step anyway, the whole code of this macro
becomes useless and only creates problems.
I will try to submit a testcase for this bug report.
Pierre Muller
> -----Message d'origine-----
> De?: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] De la
> part de Pieter Maljaars
> Envoyé?: Friday, April 23, 2010 9:42 AM
> À?: Joel Brobecker; Pierre Muller
> Cc?: Peter.Schauer@regent.e-technik.tu-muenchen.de; gdb@sourceware.org;
> 'Joseph S. Myers'; 'Pedro Alves'
> Objet?: Re: Question about solaris CANNOT_STEP_HW_WATCHPOINTS macro
>
> > Looks like a different bug is now occurring:
> >
> > (gdb) start
> > Temporary breakpoint 1 at 0x805067a: file foo.c, line 13.
> > Starting program: [...]/foo
> >
> > Temporary breakpoint 1, main () at foo.c:13
> > 13 myrec.x = 5;
> > (gdb) print myrec.x
> > $1 = 0
> > (gdb) watch myrec.x
> > Hardware watchpoint 2: myrec.x
> > (gdb) s
> > 14 myrec.y = 3.4;
>
> 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.
>
> Pieter Maljaars