From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29000 invoked by alias); 17 May 2002 08:58:24 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 28981 invoked from network); 17 May 2002 08:58:17 -0000 Received: from unknown (HELO dell-paw-2.cambridge.redhat.com) (195.224.55.226) by sources.redhat.com with SMTP; 17 May 2002 08:58:17 -0000 Received: from north-pole.nickc.cambridge.redhat.com (host217-39-2-165.in-addr.btopenworld.com [217.39.2.165]) by dell-paw-2.cambridge.redhat.com (Postfix) with ESMTP id EA4552B563 for ; Fri, 17 May 2002 09:58:12 +0100 (BST) Received: from north-pole.nickc.cambridge.redhat.com.nickc.cambridge.redhat.com (localhost [127.0.0.1]) by north-pole.nickc.cambridge.redhat.com (Postfix) with ESMTP id 91CC71C39D for ; Fri, 17 May 2002 09:58:03 +0100 (BST) To: gdb-patches@sources.redhat.com Subject: Re: Add support for target switches in simulator References: <200205161624.RAA15198@cam-mail2.cambridge.arm.com> From: Nick Clifton Date: Fri, 17 May 2002 01:58:00 -0000 In-Reply-To: <200205161624.RAA15198@cam-mail2.cambridge.arm.com> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-05/txt/msg00698.txt.bz2 Hi Guys, Answers to comments on my patch submission: > > I would like permission to apply the following patch. It adds > > the ability for simulator backends to parse their own command > > line switches, thus creating target specific simulator options. > Frank Ch. Eigler writes: > > How does this proposed facility compare to that provided by > sim/common/sim-options*? It is a similar kind of thing accept that it has two advantages: * It works for simulators that do not use sim-common.[ch] (such as the ARM simualtor). * It isolates all of the target specific code in the target specific subdirectories, and just has a very small intrusion into the generic code. (Unlike say the SIM_H8300 option). > > I have not worked out how this feature would be accessed from > > GDB. My guess is that the switches could be added to the > > arguments passed via sim_open(), but how would a GDB user tell > > GDB to add these switches ? > Richard Earnshaw writes: > Hmm, I thought there was already a way to tell the simulator what > amount of memory to use. So did I, but looking through the GDB sources I do not see a place where it is used. > Couldn't a similar method be employed. That method is specific to setting the memory size - it uses a simulator/debugger interface call specifically set up for the purpose. I looked for the function - sim_size() - and found it being used by the run program but not by GDB. I am puzzled. Anyway the point here is that setting the memory size appears to be a specific API function and I want a generic method to set any kind of target specific option. > From: Michael Snyder >From memory, don't you do something like: (gdb) target sim xxx=yyy Yup that works - thanks Michael. I have now updated my ARM SIM patch so that it will work using this interface. So if the common sim part can be approved then we will have a complete method for controlling SWI emulation in the ARM simulator. Cheers Nick PS. I will post the arm sim parts of the patch to this list shortly.