From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11770 invoked by alias); 28 Sep 2002 00:00:59 -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 11761 invoked from network); 28 Sep 2002 00:00:57 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 28 Sep 2002 00:00:57 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 10CC53E9C; Fri, 27 Sep 2002 20:00:52 -0400 (EDT) Message-ID: <3D94F133.8070403@redhat.com> Date: Fri, 27 Sep 2002 17:00:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020824 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Nick Clifton Cc: Andrew Cagney , Anthony Green , gdb-patches@sources.redhat.com Subject: Re: [rfa] Add -m; Was: ARM sim patch: increase default target memory References: <200203171650.g2HGo8714138@louie.sfbay.redhat.com> <3CB07C82.3040902@cygnus.com> <3CB25A74.1080308@cygnus.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-09/txt/msg00696.txt.bz2 > Hi Andrew, > > >> > I would also suggest that you consider adding support for a >> > megabyte postfix so that the user could do: >> > -m 6M > >> >> Good idea, all the sims should do this. Any pointers for the code? > > > Nope - it was just an idea that popped into my head whilst reading > your code. It should be very straightforward though. Something like > the code attached to the end of this email maybe ? Given I've not got to this I've created a bug report. The original ``-m'' fix is committed. Andrew >> >> It also sets the default memory size back to something consistent >> >> with the other simulators. > >> > This will stop the java tests from running, so maybe you should also >> > add the new switch to the java test harness so that they do not fail. > >> >> Do you know which file? > > > Umm, not sure - libjava.exp maybe ? Anthony ? > > Cheers > Nick > > ------------------------------------------------------------------------- > else if (argv[i][0] == '-' && argv[i][1] == 'm') > { > char * end_ptr; > const char * ptr; > unsigned long size; > > if (argv[i][2] != '\0') > ptr = argv[i] + 2; > else > { > ptr = argv [++i]; > > if (ptr == NULL) > { > sim_callback->printf_filtered > (sim_callback, > "Missing argument to -m option\n"); > return NULL; > } > } > > size = strtoul (ptr, & end_ptr, 0); > if (end_ptr != ptr) > { > switch (* end_ptr) > { > case 'k': > case 'K': > size *= 1024; > break; > case 'm': > case 'M': > size *= 1024 * 1024; > break; > case 'g': > case 'G': > size *= 1024 * 1024 * 1024; > break; > case 0: > break; > default: > sim_callback->printf_filtered > (sim_callback, > "Unexpected characters at end of -m option\n"); > break; > } > } > > sim_size (size); > } > >