This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Cannot access memory at address $1


Hi,

I use gdb 5.3 to debug programs written in pascal (compiled using free
pascal) on PowerPC. Printing a value of some variable I got the message:

"Cannot access memory at address $1"

What does it mean?

My environment looks like:

akserve:~ artur$ uname -a
Darwin akserve.local 7.9.0 Darwin Kernel Version 7.9.0: Wed Mar 30
20:11:17 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC  Power
Macintosh powerpc

akserve:~ artur$ gdb v
GNU gdb 5.3-20030128 (Apple version gdb-330.1) (Fri Jul 16 21:42:28 GMT
2004)

I have 2 files: a unit and main program.

-----
unit s;

interface

var a: byte;

implementation

end.
-----
uses s;

begin
   a:=10;
   writeln(a);
end.
----

A session is:

akserve:~/MizarDevelop/work artur$ fpc -g -B v.pas
Free Pascal Compiler version 1.9.8 [2005/02/20] for powerpc
Copyright (c) 1993-2005 by Florian Klaempfl
Target OS: Darwin for PowerPC
Compiling v.pas
Compiling s.pas
Assembling s
Assembling program
Linking v
16 Lines compiled, 0.3 sec
akserve:~/MizarDevelop/work artur$ gdb v
GNU gdb 5.3-20030128 (Apple version gdb-330.1) (Fri Jul 16 21:42:28 GMT
2004)
Copyright 2003 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 "powerpc-apple-darwin".
Reading symbols for shared libraries .. done
(gdb) b v.pas:4
Breakpoint 1 at 0x1cf4: file v.pas, line 4.
(gdb) r
Starting program: /Users/artur/MizarDevelop/work/v
Reading symbols for shared libraries . done

Breakpoint 1, P$PROGRAM_main () at v.pas:5
5          writeln(a);
(gdb) p a
Cannot access memory at address $1
(gdb)


Regards
Artur


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