Index: sid/component/loader/compLoader.cxx =================================================================== RCS file: /cvs/src/src/sid/component/loader/compLoader.cxx,v retrieving revision 1.9 diff -c -p -r1.9 compLoader.cxx *** sid/component/loader/compLoader.cxx 29 Jun 2004 19:10:39 -0000 1.9 --- sid/component/loader/compLoader.cxx 12 May 2005 16:06:17 -0000 *************** class loader_probe_bus: public sidutil:: *** 77,90 **** void set_section_table (const struct TextSection *s) { section_table = s; } // Some macros to make manufacturing of the cartesian-product // calls simpler. #define SID_GB_WRITE(dtype) \ sid::bus::status write(sid::host_int_4 addr, dtype data) throw ()\ { if (LIKELY(*target)) \ { \ ! if (write_to_code_address_pin && textSectionAddress (addr, section_table)) \ ! write_to_code_address_pin->drive (addr); \ return (*target)->write(addr, data); \ } \ else return sid::bus::unpermitted; \ --- 77,95 ---- void set_section_table (const struct TextSection *s) { section_table = s; } + void probe_address (sid::host_int_4 addr) + { + if (write_to_code_address_pin && textSectionAddress (addr, section_table)) + write_to_code_address_pin->drive (addr); + } + // Some macros to make manufacturing of the cartesian-product // calls simpler. #define SID_GB_WRITE(dtype) \ sid::bus::status write(sid::host_int_4 addr, dtype data) throw ()\ { if (LIKELY(*target)) \ { \ ! probe_address (addr); \ return (*target)->write(addr, data); \ } \ else return sid::bus::unpermitted; \ *************** protected: *** 142,147 **** --- 147,158 ---- loader_probe_bus probe_upstream; bus *probe_downstream; + callback_pin probe_pin; + + void handle_probe_pin (sid::host_int_4 v) + { + probe_upstream.probe_address (v); + } // The load pin was triggered. virtual void load_it (host_int_4) = 0; *************** public: *** 161,167 **** load_accessor_insn(0), load_accessor_data(0), probe_upstream (& probe_downstream, & this->write_to_code_address_pin), ! probe_downstream(0) { add_pin("load!", & this->doit_pin); add_pin("start-pc-set", & this->start_pc_pin); --- 172,179 ---- load_accessor_insn(0), load_accessor_data(0), probe_upstream (& probe_downstream, & this->write_to_code_address_pin), ! probe_downstream(0), ! probe_pin (this, & generic_loader::handle_probe_pin) { add_pin("load!", & this->doit_pin); add_pin("start-pc-set", & this->start_pc_pin); *************** public: *** 174,179 **** --- 186,192 ---- add_attribute("file", & this->load_file, "setting"); add_bus ("probe-upstream", & this->probe_upstream); add_accessor ("probe-downstream", & this->probe_downstream); + add_pin ("probe", & this->probe_pin); add_attribute("verbose?", & this->verbose_p, "setting"); add_attribute_virtual ("state-snapshot", this, & generic_loader::save_state, Index: sid/component/loader/sw-load-elf.xml =================================================================== RCS file: /cvs/src/src/sid/component/loader/sw-load-elf.xml,v retrieving revision 1.3 diff -c -p -r1.3 sw-load-elf.xml *** sid/component/loader/sw-load-elf.xml 21 Oct 2003 21:30:44 -0000 1.3 --- sid/component/loader/sw-load-elf.xml 12 May 2005 16:06:17 -0000 *************** *** 9,14 **** --- 9,15 ---- + *************** *** 73,79 **** to a code segment, the write-to-code-address pin is driven with the address of the write attempt. All reads and writes coming in through the probe-upstream bus are passed on to the ! probe-downstream accessor.

--- 74,81 ---- to a code segment, the write-to-code-address pin is driven with the address of the write attempt. All reads and writes coming in through the probe-upstream bus are passed on to the ! probe-downstream accessor. In addition, addresses driven on the ! "probe" pin are checked in the same way.