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]

Re: Connect 2 mips simulator


Hi -

: 	I create file pippo.txt with command that you tell me and then I
: run simulator with parameters and the programma Hello World, but into file
: it doesn't write nothing.

As the --help documentation suggests, the --memory-mapfile command
applies to the following --memory-region to be modelled by the simulator.
So,
	FOO-run --memory-mapfile blah.txt --memory-region 0x2000000,0x8000

will make available to the target program an extra memory region
0x02000000-0x02007FFF.  Any reads/writes to that region of memory
will be visible in the appropriate part of the file.  (The exact
time at which the memory and the file are synchronized is not
specified.  If you map the same file into two simulators on the
same host, you'll generally see instant synchronization.)

: If I have understood just, into file I would have to find the simulator
: memory into file, such as for example:
: <memory location> : <memory value>
: Is this right?

Your target program would have to read/write those specific areas of
memory.  For example:

	#define MMAPBASE 0x02000000
	#define MMAPBYTE ((volatile unsigned char *) MMAPBASE)
	strcpy (& MMAPBYTE[0], "hello world\n");

- FChE

PGP signature


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