Hello Jan and Doug,
Thanks for your mails. I today downloaded gdb-6.6 and
gdb-6.8.50.20090824.
gdb-6.6 outputs the messages as follows when the program is restarted
Program exited normally.
(gdb) r
Starting program: /home/chandru/rawatch
Hardware read watchpoint 2: value1
Hardware access (read/write) watchpoint 3: value1
Hardware read watchpoint 2: value1
Hardware access (read/write) watchpoint 3: value1
Hardware read watchpoint 2: value1
Hardware access (read/write) watchpoint 3: value1
Breakpoint 1, main () at rawatch.c:20
20 value1 =3;
(gdb)
whereas gdb-6.8.50.20090824 doesn't.
Program exited normally.
(gdb) r
Starting program: /home/chandru/rawatch
Breakpoint 1, main () at rawatch.c:20
20 value1 =3;
(gdb)
It is not the case that the read or access watchpoints are not being hit.
Just the messages like 'Hardware read watchpoint 2: value1' and
'Hardware access (read/write) watchpoint 3: value1' are not shown
on the screen when the program is restarted and the condition
if (breakpoint_enabled (b))
mention(b);
only helped to see those messages. It is only the first occurrence of the
watchpoints that the messages don't get displayed for. We could see the
messages for later occurrences of the watchpoints on value1. Hence this
is just a cosmetic issue and doesn't look like a architecture or a kernel
specific issue.
Thanks,
Chandru