Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: nickc@redhat.com
Cc: Anthony Green <green@redhat.com>, gdb-patches@sources.redhat.com
Subject: [rfa] Add -m; Was: ARM sim patch: increase default target memory
Date: Sun, 07 Apr 2002 10:06:00 -0000	[thread overview]
Message-ID: <3CB07C82.3040902@cygnus.com> (raw)
In-Reply-To: <200203171650.g2HGo8714138@louie.sfbay.redhat.com>

[-- Attachment #1: Type: text/plain, Size: 236 bytes --]

Hello,

The attatched patch (er, hack), adds support for the -m flag from the 
GDB command line (vis (gdb) target sim -m<size>).  It also sets the 
default memory size back to something consistent with the other simulators.

ok?
Andrew

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 1412 bytes --]

2002-04-07  Andrew Cagney  <ac131313@redhat.com>

	* wrapper.c (sim_open): Add support for -m<mem-size>.
	(mem_size): Reduce to 2MB.
	Fix PR gdb/433.

Index: wrapper.c
===================================================================
RCS file: /cvs/src/src/sim/arm/wrapper.c,v
retrieving revision 1.18
diff -u -r1.18 wrapper.c
--- wrapper.c	18 Mar 2002 21:43:15 -0000	1.18
+++ wrapper.c	7 Apr 2002 16:59:18 -0000
@@ -47,7 +47,7 @@
 static char *myname;
 
 /* Memory size in bytes.  */
-static int mem_size = (1 << 23);
+static int mem_size = (1 << 21);
 
 /* Non-zero to display start up banner, and maybe other things.  */
 static int verbosity;
@@ -448,7 +448,7 @@
     {
       int i;
 
-      /* Scan for endian-ness switch.  */
+      /* Scan for endian-ness and memory-size switches.  */
       for (i = 0; (argv[i] != NULL) && (argv[i][0] != 0); i++)
 	if (argv[i][0] == '-' && argv[i][1] == 'E')
 	  {
@@ -482,6 +482,23 @@
 		  (sim_callback, "Unrecognised argument to -E option\n");
 		break;
 	      }
+	  }
+	else if (argv[i][0] == '-' && argv[i][1] == 'm')
+	  {
+	    if (argv[i][2] != '\0')
+	      sim_size (atoi (&argv[i][2]));
+	    else if (argv[i + 1] != NULL)
+	      {
+		sim_size (atoi (argv[i + 1]));
+		i++;
+	      }
+	    else
+	      {
+		sim_callback->printf_filtered (sim_callback,
+					       "Missing argument to -m option\n");
+		return NULL;
+	      }
+	      
 	  }
     }
 

  parent reply	other threads:[~2002-04-07 17:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-17  8:52 Anthony Green
2002-03-17  9:13 ` Andrew Cagney
     [not found] ` <m3ofhnyt7d.fsf@north-pole.nickc.cambridge.redhat.com>
2002-03-18 13:50   ` Anthony Green
2002-03-18 17:30     ` Andrew Cagney
2002-03-18 23:06       ` Anthony Green
2002-03-19  7:46         ` Andrew Cagney
2002-03-19  8:20           ` Anthony Green
2002-03-19  8:39             ` Andrew Cagney
2002-03-19  9:43               ` Andrew Cagney
2002-04-07 10:06 ` Andrew Cagney [this message]
2002-04-08  2:34   ` [rfa] Add -m; Was: " Nick Clifton
2002-04-08 20:05     ` Andrew Cagney
2002-04-09  1:21       ` Nick Clifton
2002-09-27 17:00         ` Andrew Cagney

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=3CB07C82.3040902@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=green@redhat.com \
    --cc=nickc@redhat.com \
    /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