Esempio n. 1
0
static void
mem_delete_command (char *args, int from_tty)
{
  int num;
  struct get_number_or_range_state state;

  require_user_regions (from_tty);

  target_dcache_invalidate ();

  if (args == NULL || *args == '\0')
    {
      if (query (_("Delete all memory regions? ")))
	mem_clear ();
      dont_repeat ();
      return;
    }

  init_number_or_range (&state, args);
  while (!state.finished)
    {
      num = get_number_or_range (&state);
      mem_delete (num);
    }

  dont_repeat ();
}
Esempio n. 2
0
static void
mem_disable_command (char *args, int from_tty)
{
  int num;
  struct mem_region *m;
  int ix;

  require_user_regions (from_tty);

  target_dcache_invalidate ();

  if (args == NULL || *args == '\0')
    {
      for (ix = 0; VEC_iterate (mem_region_s, mem_region_list, ix, m); ix++)
	m->enabled_p = 0;
    }
  else
    {
      struct get_number_or_range_state state;

      init_number_or_range (&state, args);
      while (!state.finished)
	{
	  num = get_number_or_range (&state);
	  mem_disable (num);
	}
    }
}
Esempio n. 3
0
static void
set_stack_cache (const char *args, int from_tty, struct cmd_list_element *c)
{
  if (stack_cache_enabled != stack_cache_enabled_1)
    target_dcache_invalidate ();

  stack_cache_enabled = stack_cache_enabled_1;
}
Esempio n. 4
0
static void
set_dcache_size (char *args, int from_tty,
		 struct cmd_list_element *c)
{
  if (dcache_size == 0)
    {
      dcache_size = DCACHE_DEFAULT_SIZE;
      error (_("Dcache size must be greater than 0."));
    }
  target_dcache_invalidate ();
}
Esempio n. 5
0
static void
set_dcache_line_size (char *args, int from_tty,
		      struct cmd_list_element *c)
{
  if (dcache_line_size < 2
      || (dcache_line_size & (dcache_line_size - 1)) != 0)
    {
      unsigned d = dcache_line_size;
      dcache_line_size = DCACHE_DEFAULT_LINE_SIZE;
      error (_("Invalid dcache line size: %u (must be power of 2)."), d);
    }
  target_dcache_invalidate ();
}