This is the mail archive of the ecos-discuss@sourceware.cygnus.com mailing list for the eCos project.


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

Still persists-Problem while watching the variables!



> > Hi!
> > 
> >       I am working with ecos 1.3.1 in both Linux 6.1 and
> > Win-NT 4.0 (Service Pack 4) environments. The problem i am
> > facing in both the environments is when i tried to watch the
> > value of any variable in GDB(remote debugging using mbx
> > board), it is saying 
> > 
> > cannot access memory at address 0x11110019
> > 
> > Anyway Location is not unique for all the variables. It is
> > giving different locations for different variables.
> > 
> >       After plenty of efforts, i could not able to get rid
> > of this error, could any one of you provide solution for
> > this problem.
> > 
> 
> Two things to look at:
>  * On the MBX (PowerPC especially), disable the option 
>    CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM as this is known to 
>    confuse GDB [sometimes].
>  * The message above looks like you were trying to watch a variable's
>    "value" not location.  Just make sure you specify the watch carefully.
> 
> Hope it helps.

Shaik Bajeed wrote:

	I have tried, after disabling the option
CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM, still problem
persists. It is giving the same problem of can't access
memory location error.

	Actually I am trying to watch the the value of the
varaible, it is saying, can not access memory location. I
don't understand why it is giving that error.

Here is how I am working:

D:\mytests>powerpc-eabi-gdb
GNU gdb 20000426
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public
License, and you are
welcome to change it and/or distribute copies of it under
certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show
warranty" for details.
This GDB was configured as "--host=i686-pc-cygwin
--target=powerpc-eabi".
0xfe0042c4 in ?? ()
(gdb) load hello.exe
Loading section .vectors, size 0x2000 lma 0x10000
Loading section .text, size 0xee60 lma 0x12000
Loading section .rodata, size 0xf14 lma 0x20e60
Loading section .data, size 0x770 lma 0x21d78
Start address 0x10100 , load size 74980
Transfer rate: 28563 bits/sec, 506 bytes/write.
(gdb) symbol-file hello.exe
Reading symbols from hello.exe...done.

(gdb) list 1,13
1       /* this is a simple hello world program */
2       #include <stdio.h>
3
4       int main(void)
5       {
6         int a,b;
7         a=10;
8         b=4;
9         printf("value of a = %d",a);
10        printf("value of a = %d",b);
11        printf("Hello, eCos world!\n");
12        return 0;
13      }
(gdb) break 9
Breakpoint 1 at 0x1250c: file hello.c, line 9.
(gdb) continue
Continuing.
[New thread 2]
[Switching to thread 2]

Breakpoint 1, main () at hello.c:9
9         printf("value of a = %d",a);
(gdb) watch a
Cannot access memory at address 0x11110019
(gdb) watch b
Cannot access memory at address 0x1111001d
(gdb) print a
Cannot access memory at address 0x11110019
(gdb) inspect a
Cannot access memory at address 0x11110019
(gdb) continue
Continuing.
value of a = 10value of a = 4Hello, eCos world!

This is all what is happening, Please show me some way to
come out of this problem.

Thanks and Regards
Shaik Bajeed,
C-DOT, Bangalore.


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