+2004-03-22 Dave Brolley <brolley@redhat.com>
+
+ * 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 <brolley@redhat.com>
* sidmiscutil.h (delete_saved_messages): Use 'clear' method.
// 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.
// tracing
private:
string trace_filename;
+ callback_pin<basic_cpu> trace_pin;
class cpu_trace_stream: public std::ofstream
{
public:
template <typename T> friend
cpu_trace_stream& operator<< (cpu_trace_stream& s, T t);
+ void trace_pin_handler (sid::host_int_4 value)
+ {
+ trace_stream << static_cast<char> (value);
+ }
+
public:
bool trace_extract_p;
bool trace_result_p;
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;
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;