demand_copy_C_string NUL check
[binutils-gdb.git] / sim / README-HACKING
index 9953f99fc81d0534a4caaa43b25b28ec497dd8c6..0b72d96f5c2fe57b0e00d97f1a77ae2569619fed 100644 (file)
@@ -38,8 +38,8 @@ The configure.ac of a simulator using the common framework should look like:
 
 --- snip ---
 dnl Process this file with autoconf to produce a configure script.
-sinclude(../common/aclocal.m4)
 AC_INIT(Makefile.in)
+AC_CONFIG_MACRO_DIRS([../common ../.. ../../config])
 
 SIM_AC_COMMON
 
@@ -267,8 +267,8 @@ And in your insn fetcher:
   PROFILE_COUNT_CORE (cpu, target_addr, size_in_bytes, map_exec);
 
 To use the PC profiling code, you simply have to tell the system where to find
-your simulator's PC.  So in your sim_open() function:
-  STATE_WATCHPOINTS (sd)->pc = address_of_cpu0_pc;
+your simulator's PC.  So in your model initialization function:
+  CPU_PC_FETCH (cpu) = function_that_fetches_the_pc;
 
 To profile branches, in every location where a branch insn is executed, call
 one of the related helpers: