* Re: Connect 2 mips simulator
@ 2001-09-06 15:19 Frank Ch. Eigler
0 siblings, 0 replies; 9+ messages in thread
From: Frank Ch. Eigler @ 2001-09-06 15:19 UTC (permalink / raw)
To: gdb
Hi -
On Thu, Sep 06, 2001 at 05:35:03PM -0400, Zampieri Marco wrote:
: [...]
: I try to use the command, but the simulator response me :
: $>mips64vr4300-elf-run: unrecognized option `--memory-mapfile'
:
: I use gdb 5.0 compiled with this option:
Perhaps gdb 5.0 is too old: the simulator mmap feature was
added on 2001-03-16. Consider fetching a version from CVS.
Search for mmap in sim/common/* to see if the code is there.
: $>configure --target=mips64vr4300-elf
: --prefix=/home/zampieri/tools/other
: --exec-prefix=/home/zampieri/tools/H-i686-pc-linux-gnu/other
: -v 2>&1 | tee configure.out
(The exec-prefix part looks suspicious - consider using instead
# --exec-prefix=/home/zampieri/tools/other/H-i686-pc-linux-gnu
: The mips nec vr4300 elf cross simulator support mmap?
Yes, it should.
- FChE
PS. Your email address <zampieri@students.univr.it> is invalid, as
it is unable to receive mail.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Connect 2 mips simulator
@ 2001-09-07 4:37 Manganotto Filippo
2001-09-07 4:42 ` Frank Ch. Eigler
0 siblings, 1 reply; 9+ messages in thread
From: Manganotto Filippo @ 2001-09-07 4:37 UTC (permalink / raw)
To: gdb; +Cc: fche
Hi,
I'm working with Zampieri Marco. We have downloaded GDB from CVS
and installed it. We find option --memory-mapfile FILE, but we doesn't
know how to use it, because when we run
$>TARGET-run --memory-mapfile pippo.txt --memory-region=... hello
it responde
$>Cannot open file `ciao.txt': No such file or directory
than we create an empty file called "pippo.txt", an the run
$>Error, cannot confirm that mmap file is large enough (>= 32768
bytes)
What could we write into file pippo.txt?
We haven't newer work with C program and we are learning it now, and we
forced to ask you many things.
Thanks in advance
-----------------------------------------------------------------------
MANGANOTTO FILIPPO
filippo.manganotto@students.univr.it
manganot@arena.sci.univr.it
pippomanga@tiscalinet.it
filippo.manganotto@tin.it
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Connect 2 mips simulator
2001-09-07 4:37 Manganotto Filippo
@ 2001-09-07 4:42 ` Frank Ch. Eigler
[not found] ` <Pine.LNX.4.33.0109071359470.29146-100000@delta046.sci.univr.it>
0 siblings, 1 reply; 9+ messages in thread
From: Frank Ch. Eigler @ 2001-09-07 4:42 UTC (permalink / raw)
To: Manganotto Filippo; +Cc: gdb
Hi -
On Fri, Sep 07, 2001 at 01:36:17PM +0200, Manganotto Filippo wrote:
: I'm working with Zampieri Marco. We have downloaded GDB from CVS
: and installed it. We find option --memory-mapfile FILE, but we doesn't
: know how to use it, because when we run
: $>TARGET-run --memory-mapfile pippo.txt --memory-region=... hello
: [...]
: than we create an empty file called "pippo.txt", an the run
: $>Error, cannot confirm that mmap file is large enough (>= 32768
: bytes)
A typical use of the mmap system call requires that the file being mapped
into memory be at least as large as the chosen mapped memory size, so
that there is a one-to-one relationship between an existing byte in a
file, and a mapped byte in memory. This means that an empty file, or
a too-small file will not be acceptable.
An easy way to create a file of a chosen size is to use the dd command
like this:
dd if=/dev/zero of=pippo.txt bs=32768 count=1
This copies 1 block of 32768 bytes from /dev/zero to pippo.txt.
You will have a nice small zero-filled file.
- FChE
--
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE7mLKWVZbdDOm/ZT0RApbJAJ95KQ8MZtTB8pkeYBlDZointLP0HQCfZLT1
/WU5F50UAHfNpCGu2ezDjlU=
=qqir
-----END PGP SIGNATURE-----
From in000566@students.univr.it Fri Sep 07 05:07:00 2001
From: Manganotto Filippo <in000566@students.univr.it>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: "gdb@sources.redhat.com" <gdb@sources.redhat.com>
Subject: Re: Connect 2 mips simulator
Date: Fri, 07 Sep 2001 05:07:00 -0000
Message-id: <Pine.LNX.4.33.0109071359470.29146-100000@delta046.sci.univr.it>
References: <20010907074214.A20756@redhat.com>
X-SW-Source: 2001-09/msg00059.html
Content-length: 584
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.
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?
Thanks in advance
---------------------------------------------------------------
MANGANOTTO FILIPPO
filippo.manganotto@students.univr.it
manganot@arena.sci.univr.it
pippomanga@tiscalinet.it
filippo.manganotto@tin.it
^ permalink raw reply [flat|nested] 9+ messages in thread
* Connect 2 mips simulator..
@ 2001-09-03 8:42 Zampieri Marco
2001-09-03 9:19 ` Frank Ch. Eigler
0 siblings, 1 reply; 9+ messages in thread
From: Zampieri Marco @ 2001-09-03 8:42 UTC (permalink / raw)
To: gdb
Hallo all,
Where I can find developer documentation to understand how the simulator
and gdb dialog. Infact, I must know how write a little program that
connect to mips simulator and drive its functionality. I search to
develop a comunication system between 2 or plus mips simulator. This
permit me to send datas between 2 or plus process crosscompiled for mips
execute in
your simulator.
Can you help me to find one solution.
Someone know another solution to my problem.
Thanks for all helps
--------------------------------------------------------
|E-Mail :zampieri.marco@ieee.org |
| :marco.zampieri@students.univr.it |
| :zampieri.marco@tin.it |
|Wap Mail(text only) :zampieri.marco@libero.it |
--------------------------------------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Connect 2 mips simulator..
2001-09-03 8:42 Zampieri Marco
@ 2001-09-03 9:19 ` Frank Ch. Eigler
2001-09-06 5:44 ` Zampieri Marco
2001-09-06 7:46 ` Zampieri Marco
0 siblings, 2 replies; 9+ messages in thread
From: Frank Ch. Eigler @ 2001-09-03 9:19 UTC (permalink / raw)
To: Zampieri Marco; +Cc: gdb
Zampieri Marco <in000466@students.univr.it> writes:
: Where I can find developer documentation to understand how the simulator
: and gdb dialog.
The primary interface between gdb and its mips simulator is an API
defined by include/remote-sim.h.
: In fact, I must know how write a little program that connect to mips
: simulator and drive its functionality.
You may accomplish this by writing a C program that uses the above API
and links to the libsim.a library.
: I search to develop a comunication system between 2 or plus mips
: simulator. This permit me to send datas between 2 or plus process
: cross-compiled for mips execute in your simulator. [...]
The gdb simulators are not designed to allow multiple instances to
coexist within a single application. So, you can accomplish what you
want by interconnecting simulators running as separate applications,
by some middleware of your own. Alternately, the existing simulator
"--memory-mapfile FILE" command line option may help, if the
interconnection between the simulators is limited to sharing some
region of target RAM.
- FChE
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Connect 2 mips simulator..
2001-09-03 9:19 ` Frank Ch. Eigler
@ 2001-09-06 5:44 ` Zampieri Marco
2001-09-06 6:46 ` Frank Ch. Eigler
2001-09-06 7:46 ` Zampieri Marco
1 sibling, 1 reply; 9+ messages in thread
From: Zampieri Marco @ 2001-09-06 5:44 UTC (permalink / raw)
To: Frank Ch. Eigler; +Cc: gdb
I'm looking for the option --memory-mapfile FILE, but I can't find it in
the simulator parameters or gdb option.
Where I can find it? It is a configure option or a parameter of Make
program?
Thanks in advance
On 3 Sep 2001, Frank Ch. Eigler wrote:
>
> Zampieri Marco <in000466@students.univr.it> writes:
>
> : Where I can find developer documentation to understand how the simulator
> : and gdb dialog.
>
> The primary interface between gdb and its mips simulator is an API
> defined by include/remote-sim.h.
>
>
> : In fact, I must know how write a little program that connect to mips
> : simulator and drive its functionality.
>
> You may accomplish this by writing a C program that uses the above API
> and links to the libsim.a library.
>
>
> : I search to develop a comunication system between 2 or plus mips
> : simulator. This permit me to send datas between 2 or plus process
> : cross-compiled for mips execute in your simulator. [...]
>
> The gdb simulators are not designed to allow multiple instances to
> coexist within a single application. So, you can accomplish what you
> want by interconnecting simulators running as separate applications,
> by some middleware of your own. Alternately, the existing simulator
> "--memory-mapfile FILE" command line option may help, if the
> interconnection between the simulators is limited to sharing some
> region of target RAM.
>
> - FChE
>
--------------------------------------------------------
|E-Mail :zampieri.marco@ieee.org |
| :marco.zampieri@students.univr.it |
| :zampieri.marco@tin.it |
|Wap Mail(text only) :zampieri.marco@libero.it |
--------------------------------------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Connect 2 mips simulator..
2001-09-06 5:44 ` Zampieri Marco
@ 2001-09-06 6:46 ` Frank Ch. Eigler
0 siblings, 0 replies; 9+ messages in thread
From: Frank Ch. Eigler @ 2001-09-06 6:46 UTC (permalink / raw)
To: Zampieri Marco; +Cc: gdb
Hi -
On Thu, Sep 06, 2001 at 02:58:51PM -0400, Zampieri Marco wrote:
: I'm looking for the option --memory-mapfile FILE, but I can't find it in
: the simulator parameters or gdb option.
: Where I can find it? It is a configure option or a parameter of Make
: program?
The --memory-mapfile option for the sim/common-based simulators such
as mips is supported automatically if your host supports mmap. From
gdb, use "(gdb) [target] sim memory-mapfile FILE"; from the command
line, use "TARGET-run --memory-mapfile FILE".
Have you built your own cross-compiler/debugger/simulator recently?
- FChE
--
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE7l34WVZbdDOm/ZT0RAkqLAJ488NHiRorasTKjKRneh7XoHMKFGwCeKBYT
r9XRR2/9QW801SabikVI/0k=
=m3+N
-----END PGP SIGNATURE-----
From dcoutts@cray.com Thu Sep 06 07:24:00 2001
From: Duncan Coutts <dcoutts@cray.com>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: <gdb@sources.redhat.com>
Subject: Re: right way to_post_attach ?
Date: Thu, 06 Sep 2001 07:24:00 -0000
Message-id: <Pine.SGI.4.33.0109060911120.1220-100000@underbird7.mw.cray.com>
References: <3B970771.5060508@cygnus.com>
X-SW-Source: 2001-09/msg00044.html
Content-length: 2807
Hi,
On Thu, 6 Sep 2001, Andrew Cagney wrote:
> > Hi,
> >
> > I can't quite figure out what the right way to setup a
> > target_ops.to_post_attach hook. I'm not defining a whole new target (am
> > I?), I'm using the procfs target. I just need to hook the to_post_attach
> > so I can do some random symbol fiddling just after the attach.
> >
> > I notice that several targets do a push_target during their attach, so
> > that their operations become avaliable, but presumably I still want to
> > use the procfs target so I can't have the attach operation push my extra
> > target vector.
> >
> > In oop terms, I just want to 'override' the to_post_attach
> > method. I can't find anywhere that uses the to_post_attach in any
> > substantial way, so I'm rather short on clues.
> >
> > What's the way to do this, or is to_post_attach not the tool to be using
> > here?
> >
> > Thank's for any tips.
>
>
> i cant comment on post attach but i can comment on the underlying
> problem. yes, the push / pop mechanism and gdb's target stack is
> primative at best - little wonder you're having problems. the oo
> concept is simple, what gdb did to it is not, sigh,
Well as a simple hack, I've done to procfs what the child target does,
which is to #define some flag CHILD[/PROCFS]_POST_ATTACH which indicates
that the to_post_attach hook should be set to an externally defined
function child[/procfs]_post_attach.
So I've modified procfs but done it in a similar way to how the child
target provides it's own hook. If there's a better way that doesn't
invlove changing generic code I'd be happy to use it.
To be more specific here's what I did:
Comments welcome.
Duncan
Index: procfs.c
===================================================================
diff -c -r1.7 procfs.c
*** procfs.c 2001/08/27 17:32:52 1.7
--- procfs.c 2001/09/04 17:03:09
***************
*** 93,98 ****
--- 93,101 ----
static void procfs_open PARAMS((char *, int));
static void procfs_attach PARAMS ((char *, int));
+ #if defined(PROCFS_POST_ATTACH)
+ extern void procfs_post_attach PARAMS ((int));
+ #endif
static void procfs_detach PARAMS ((char *, int));
static void procfs_resume PARAMS ((int, int, enum target_signal));
static int procfs_can_run PARAMS ((void));
***************
*** 131,136 ****
--- 134,142 ----
procfs_ops.to_kill = procfs_kill_inferior;
procfs_ops.to_mourn_inferior = procfs_mourn_inferior;
procfs_ops.to_attach = procfs_attach;
+ #if defined(PROCFS_POST_ATTACH)
+ procfs_ops.to_post_attach = procfs_post_attach;
+ #endif
procfs_ops.to_detach = procfs_detach;
procfs_ops.to_wait = procfs_wait;
procfs_ops.to_resume = procfs_resume;
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Connect 2 mips simulator
2001-09-03 9:19 ` Frank Ch. Eigler
2001-09-06 5:44 ` Zampieri Marco
@ 2001-09-06 7:46 ` Zampieri Marco
1 sibling, 0 replies; 9+ messages in thread
From: Zampieri Marco @ 2001-09-06 7:46 UTC (permalink / raw)
To: gdb
Hi - On Thu, Sep 06, 2001 at 02:58:51PM -0400, Zampieri Marco wrote:
>: I'm looking for the option --memory-mapfile FILE, but I can't find it in
>: the simulator parameters or gdb option.
>: Where I can find it? It is a configure option or a parameter of Make
>: program?
>The --memory-mapfile option for the sim/common-based simulators such as
>mips is supported automatically if your host supports mmap.
From gdb, use "(gdb) [target] sim memory-mapfile FILE"; from the command
>line, use "TARGET-run --memory-mapfile FILE".
I try to use the command, but the simulator response me :
$>mips64vr4300-elf-run: unrecognized option `--memory-mapfile'
I use gdb 5.0 compiled with this option:
$>configure --target=mips64vr4300-elf
--prefix=/home/zampieri/tools/other
--exec-prefix=/home/zampieri/tools/H-i686-pc-linux-gnu/other
-v 2>&1 | tee configure.out
$>make -w all install
I compiled it 2 weeks ago.
Is this right?
I must include some other option for compilator.
The mips nec vr4300 elf cross simulator support mmap?
I'm sorry but I must find a solution for this question!
Thanks
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2001-09-07 7:09 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-06 15:19 Connect 2 mips simulator Frank Ch. Eigler
-- strict thread matches above, loose matches on Subject: below --
2001-09-07 4:37 Manganotto Filippo
2001-09-07 4:42 ` Frank Ch. Eigler
[not found] ` <Pine.LNX.4.33.0109071359470.29146-100000@delta046.sci.univr.it>
2001-09-07 7:09 ` Frank Ch. Eigler
2001-09-03 8:42 Zampieri Marco
2001-09-03 9:19 ` Frank Ch. Eigler
2001-09-06 5:44 ` Zampieri Marco
2001-09-06 6:46 ` Frank Ch. Eigler
2001-09-06 7:46 ` Zampieri Marco
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox