mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-29 13:04:46 +08:00
Add support for -m option. Fix PR gdb/433.
This commit is contained in:
parent
8f3f366625
commit
058f270dea
@ -1,3 +1,9 @@
|
||||
2002-09-27 Andrew Cagney <ac131313@redhat.com>
|
||||
|
||||
* wrapper.c (sim_open): Add support for -m<mem-size>.
|
||||
(mem_size): Reduce to 2MB.
|
||||
Fix PR gdb/433.
|
||||
|
||||
2002-08-15 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* armos.c (ARMul_OSHandleSWI): Catch and ignore SWIs of -1, they
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user