From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7431 invoked by alias); 8 Nov 2004 16:30:07 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 6891 invoked from network); 8 Nov 2004 16:29:43 -0000 Received: from unknown (HELO krynn.se.axis.com) (193.13.178.10) by sourceware.org with SMTP; 8 Nov 2004 16:29:43 -0000 Received: from ignucius.se.axis.com (ignucius.se.axis.com [10.83.5.18]) by krynn.se.axis.com (8.12.9/8.12.9/Debian-5local0.1) with ESMTP id iA8GTgAD001938; Mon, 8 Nov 2004 17:29:42 +0100 Received: from ignucius.se.axis.com (localhost [127.0.0.1]) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) with ESMTP id iA8GTgdD020391; Mon, 8 Nov 2004 17:29:42 +0100 Received: (from hp@localhost) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) id iA8GTg3J020387; Mon, 8 Nov 2004 17:29:42 +0100 Date: Mon, 08 Nov 2004 20:54:00 -0000 Message-Id: <200411081629.iA8GTg3J020387@ignucius.se.axis.com> From: Hans-Peter Nilsson To: gdb@sourceware.org Subject: When submitting sim/cris: other sim improvements before or after? X-SW-Source: 2004-11/txt/msg00062.txt.bz2 Hi. I'm in the progress of updating a local CGEN-based sim port for CRIS and CRISv32 (a mostly-incompatible improved pipelined variant) for submission to gdb. The sim port aims to be useful for GCC regression testing as well as debugging of GNU/Linux statically linked binaries (lots of syscalls supported), but may lack in integration with gdb. (That is, I'm totally clueless as to what is needed in that area.) 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. - 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. Some other changes worth noting: - Syscall for lstat. - Missing CB_SYS_rename case in common/syscall.c (though the common/callback.c case is already in place). - Ten more struct stat st_* fields supported in cb_host_to_target_stat (just using the existing strncmp/store machinery with no further host<->target mapping). I'd like to submit these features before the actual CRIS port, because that'd simplify my work. There's also a ~500k port-specific testsuite, both C tests (mostly to exercise syscalls in a sane fashion) and assembler tests for the actual CPU parts. I'll accept responsibility as maintainer for this sim port. Copyright assignment papers for GDB are in place, company-wide for Axis Communications. Does the file-path-prefix and the pipe support sound acceptable? Would you (as I) prefer to deal with the new features and bug-fixes etc. before the actual port? brgds, H-P