diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-09-27 23:57:50 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-09-27 23:57:50 +0000 |
commit | 058f270deae9e1d9e81ea0d4751c80c35395c299 (patch) | |
tree | 570feed5fcdb9407271cdae4a9531c2099efc8a8 /sim/arm/wrapper.c | |
parent | 8f3f3666254c68a3564c359881e06eca7e4b63f6 (diff) | |
download | gdb-058f270deae9e1d9e81ea0d4751c80c35395c299.zip gdb-058f270deae9e1d9e81ea0d4751c80c35395c299.tar.gz gdb-058f270deae9e1d9e81ea0d4751c80c35395c299.tar.bz2 |
Add support for -m option. Fix PR gdb/433.
Diffstat (limited to 'sim/arm/wrapper.c')
-rw-r--r-- | sim/arm/wrapper.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/sim/arm/wrapper.c b/sim/arm/wrapper.c index c8361ba..262e2e7 100644 --- a/sim/arm/wrapper.c +++ b/sim/arm/wrapper.c @@ -49,7 +49,7 @@ static SIM_OPEN_KIND sim_kind; 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; @@ -632,7 +632,7 @@ sim_open (kind, ptr, abfd, argv) { 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') { @@ -667,6 +667,23 @@ sim_open (kind, ptr, abfd, argv) 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; + } + + } } return (SIM_DESC) 1; |