From: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
To: cagney@gnu.org
Cc: hans-peter.nilsson@axis.com, gdb@sourceware.org
Subject: Re: When submitting sim/cris: other sim improvements before or after?
Date: Tue, 16 Nov 2004 07:59:00 -0000 [thread overview]
Message-ID: <200411160656.iAG6u0pr002084@ignucius.se.axis.com> (raw)
In-Reply-To: <41995917.3020304@gnu.org> (message from Andrew Cagney on Mon, 15 Nov 2004 20:34:15 -0500)
> Date: Mon, 15 Nov 2004 20:34:15 -0500
> From: Andrew Cagney <cagney@gnu.org>
> Hans-Peter Nilsson wrote:
> > I'd also like to submit two additional features:
> >
> > - New option --file-path-prefix=/where/ever. Prefix all
> > syscalls with the supplied path and chdir to there upon program
> > start. Chroot your simulated programs! (Half-baked that is;
> > there's still a "..".) Changes are mostly in
> > sim/common/callback.c, to all syscalls taking filename
> > arguments.
>
> There's already --with-sysroot, how is this different?
One is a run-time option, the other is a configure option. Do
you mean that there should be a constant path compiled in?
> Having the code
> obey that, and have a --sysroot=... option (same name as GCC?) definitly
> sound like a good idea.
There's no option with the intended effect in GCC. There is a
configure option and there is a preprocessor option -isysroot.
(No link-time option besides the configure option.)
If you want to call it "--sysroot=..." rather than
"--file-path-prefix=...", sure, I don't really mind. Maybe
there'll eventually be a GCC option, and it'd likely be called
"--sysroot=..." or "-fsysroot=..." (the former non-f-convention
is used in some recent options).
> > - Pipe support. Well, not full support, just enough that it has
> > been successfully used to emulate the glibc non-nptl
> > linuxthreads (well-behaved pipe usage) and do some performance
> > analysis on a reasonably large application using pthreads. To
> > make any use of pipes, CPU-specific support to keep track of
> > different CPU contexts is needed (but only one memory space of
> > course). Changes are in sim/common/callback.c for all syscalls
> > that have anything to do with file descriptors and a few extra
> > fields in include/gdb/callback.h.
>
> By "pipe" you mean?
See pipe(2) :-)
A synchronization mechanism, usable for passing messages. In
sim, writing to the write-end of a pipe causes the write to go
to a buffer and a callback to be called, which port-specific
code can hook into and use to switch context, so that the
context switched to (another thread) can read from the read-end
of the pipe. It is up to target-side code to implement
blocking. Similar for the read-end; a read that empties the
buffer of the pipe causes another callback to be called that the
target code can hook into and switch context (to the original or
yet another thread). All syscalls operating on fd:s need to add
conditions that check if the fd is a pipe and DTRT (return error
or read or write or fstat the pipe). For typical use, refer to
glibc 2.2.4 (IIRC) non-nptl "linuxthreads".
> > I'd like to submit these features before the actual CRIS port,
> > because that'd simplify my work.
>
> Sounds like a good move, lets start with that.
Status: I'm busy updating the CGEN port to the CGEN in CVS (a
year and a half newer), so I can run my sim test-suite and add
necessary tests for the new syscalls on the expect to be
pristine sources and submit it together with the new code. (But
more on the CGEN-specific things on the CGEN list once I know at
which end each fault is, and how to fix them.)
brgds, H-P
prev parent reply other threads:[~2004-11-16 6:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-08 20:54 Hans-Peter Nilsson
2004-11-16 2:06 ` Andrew Cagney
2004-11-16 7:59 ` Hans-Peter Nilsson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200411160656.iAG6u0pr002084@ignucius.se.axis.com \
--to=hans-peter.nilsson@axis.com \
--cc=cagney@gnu.org \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox