This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Watchpoint problem in GDB stub
- From: "N.Suresh" <nsuresh at cdotb dot ernet dot in>
- To: ecos-discuss at sourceware dot cygnus dot com, bshiva at cdotb dot ernet dot in, rprakash at cdotb dot ernet dot in
- Date: Tue, 26 Feb 2002 17:30:20 +0530
- Subject: [ECOS] Watchpoint problem in GDB stub
- Organization: C-DoT
Hi all,
I am not able to put watchpoints on expressions.
I am using ADS8260 board.
This is the scenario of the session:
Program being debugged:
#include <stdio.h>
int main()
{
int i=0;
volatile int j=0;
for(i=0;i<10;i++)
{
j++;
printf("J is changed\n");
}
return 0;
}
Basically i am able to put watch on a variable and program stops for
first 2 times, after that this error message is printed
GDB session:
<cut>
(gdb) watch j
Watchpoint 2: j
(gdb) c
Continuing.
Watchpoint 2: j
Old value = 286326812
New value = 0
main () at watch.cpp:9
9 for(i=0;i<10;i++)
(gdb) c
Continuing.
Watchpoint 2: j
Old value = 0
New value = 1
main () at watch.cpp:12
12 printf("J is changed\n");
(gdb) c
Continuing.
Watchpoint 2 deleted because the program has left the block in
which its expression is valid.
0x105fa4 in vfnprintf (stream=0x11110010, n=286326799,
format=0x112e28 "J is changed\n", arg=0x112e28)
at
/export/home1/nsuresh/ecos-sync/itel/modules/ecos2001/packages/language/c/libc/stdio/current/src/output/
vfnprintf.cxx:147
147 {
</cut>
After this program continues to work and prints "J is changed" 10 times?
Any idea what's happening?
thanx in advance,
bye
--
!============================================================================!
= Suresh N., Research Engineer, C-DoT, Bangalore. =
= Call me at : OFF: 2383951(Dir) / 2263399 (268) RES: 3334248 =
= Alternate email : nsur_mys@rediffmail.com =
= QOT: For fast-acting relief, try slowing down. =
!============================================================================!
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss