2003-11-12 Michael Snyder <msnyder@redhat.com>
[deliverable/binutils-gdb.git] / sim / common / sim-arange.c
index 43c5789ae6058b4bb4bbf2b3149ef2afd9f071ee..fc08113a468adef96cb4e0904c32d444d3d2e405 100644 (file)
@@ -21,9 +21,18 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 /* Tell sim-arange.h it's us.  */
 #define SIM_ARANGE_C
 
+#include "libiberty.h"
 #include "sim-basics.h"
 #include "sim-assert.h"
 
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
 #define DEFINE_INLINE_P (! defined (SIM_ARANGE_C_INCLUDED))
 #define DEFINE_NON_INLINE_P defined (SIM_ARANGE_C_INCLUDED)
 
@@ -252,6 +261,9 @@ sim_addr_range_add (ADDR_RANGE *ar, address_word start, address_word end)
   frob_range (ar, start, end, 0);
 
   /* Rebuild the search tree.  */
+  /* ??? Instead of rebuilding it here it could be done in a module resume
+     handler, say by first checking for a `changed' flag, assuming of course
+     this would never be done while the simulation is running.  */
   free_search_tree (ar->range_tree);
   build_search_tree (ar);
 }
@@ -262,6 +274,9 @@ sim_addr_range_delete (ADDR_RANGE *ar, address_word start, address_word end)
   frob_range (ar, start, end, 1);
 
   /* Rebuild the search tree.  */
+  /* ??? Instead of rebuilding it here it could be done in a module resume
+     handler, say by first checking for a `changed' flag, assuming of course
+     this would never be done while the simulation is running.  */
   free_search_tree (ar->range_tree);
   build_search_tree (ar);
 }
This page took 0.025095 seconds and 4 git commands to generate.