From 4af0c6106d4ad12db20d79a691da65d12e8412f4 Mon Sep 17 00:00:00 2001 From: brolley Date: Mon, 22 Mar 2004 21:28:19 +0000 Subject: [PATCH] 2004-03-22 Dave Brolley * sidcpuutil.h (trace_pin): New member of basic_cpu. (trace_pin_handler): New method of basic_cpu. (basic_cpu): Add and initialize trace_pin. --- sid/include/ChangeLog | 6 ++++++ sid/include/sidcpuutil.h | 12 ++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/sid/include/ChangeLog b/sid/include/ChangeLog index 17b0fedac5..4af41c1244 100644 --- a/sid/include/ChangeLog +++ b/sid/include/ChangeLog @@ -1,3 +1,9 @@ +2004-03-22 Dave Brolley + + * sidcpuutil.h (trace_pin): New member of basic_cpu. + (trace_pin_handler): New method of basic_cpu. + (basic_cpu): Add and initialize trace_pin. + 2003-12-17 Dave Brolley * sidmiscutil.h (delete_saved_messages): Use 'clear' method. diff --git a/sid/include/sidcpuutil.h b/sid/include/sidcpuutil.h index 39487c150f..5a99999d5a 100644 --- a/sid/include/sidcpuutil.h +++ b/sid/include/sidcpuutil.h @@ -1,6 +1,6 @@ // sidcpuutil.h - Elements common to CPU models. -*- C++ -*- -// Copyright (C) 1999, 2000, 2001, 2002, 2003 Red Hat. +// Copyright (C) 1999-2004 Red Hat. // This file is part of SID and is licensed under the GPL. // See the file COPYING.SID for conditions for redistribution. @@ -213,6 +213,7 @@ namespace sidutil // tracing private: string trace_filename; + callback_pin trace_pin; class cpu_trace_stream: public std::ofstream { public: @@ -244,6 +245,11 @@ namespace sidutil template friend cpu_trace_stream& operator<< (cpu_trace_stream& s, T t); + void trace_pin_handler (sid::host_int_4 value) + { + trace_stream << static_cast (value); + } + public: bool trace_extract_p; bool trace_result_p; @@ -546,7 +552,8 @@ public: endian_set_pin (this, & basic_cpu::endian_set_pin_handler), debugger_bus (& this->data_bus), trace_stream (), - trace_filename ("-") // standard output + trace_filename ("-"), // standard output + trace_pin (this, & basic_cpu::trace_pin_handler) { // buses this->data_bus = 0; @@ -571,6 +578,7 @@ public: add_watchable_pin ("trap", & this->trap_type_pin); // output side add_watchable_pin ("trap-code", & this->trap_code_pin); add_pin ("trap", & this->trap_disposition_pin); // input side + add_pin ("trace", & this->trace_pin); // attributes this->step_insn_count = 1; -- 2.11.0