This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: A problem about read / access watchpoint
- From: Jim Blandy <jimb at red-bean dot com>
- To: Wu Zhou <woodzltc at cn dot ibm dot com>
- Cc: gdb at sources dot redhat dot com, anton at au1 dot ibm dot com, pgilliam at us dot ibm dot com
- Date: Sun, 15 Jan 2006 23:17:04 -0800
- Subject: Re: A problem about read / access watchpoint
- References: <Pine.LNX.4.64.0601151901120.15022@wks190239wss.cn.ibm.com>
On 1/15/06, Wu Zhou <woodzltc@cn.ibm.com> wrote:
> I did some tracing on that, and find that the kernel _did_ issue signal
> trap on line 15, and gdb could also get the stopped data address by
> ptrace. But when gdb call watchpoint_check to check if the value changed
> or not. It will reports WP_VALUE_CHANGED, which really confuse me.
Just out of curiosity, could you post a disassembly of main? The
kernel is watching what the machine code version of the program does,
and I wouldn't assume that it was the same as what the source code
version does, even if you compile with -O0.