* ========== Copyright Header Begin ==========================================
* OpenSPARC T2 Processor File: stracer.h
* Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
* The above named program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License version 2 as published by the Free Software Foundation.
* The above named program is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
* You should have received a copy of the GNU General Public
* License along with this work; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
* ========== Copyright Header End ============================================
////////////////////////////////////////////////////////////
// Copyright (C) 2007 Sun Microsystems, Inc.
//////////////////////////////////////////////////////////
// debug tracer to output instructions to the ui console
class STracer
: public VTracer
friend class STracerContainer
;
int attach(VTracer_SAM_intf
* intf
);
int instr ( VCPU_Instruction
*i
);
int trap ( VCPU_Trap
*t
);
int hwop ( VCPU_HwOp
*s
);
int async (VCPU_AsyncData
*) { return 1; }
int sync (VCPU_Sync
*) { return 1; }
int put_string(int cpuid
, const char * str
);
char * get_trace_name() { return trace_name
; }
STracer (const char *fname
=NULL
, SymTable
*symtable
=NULL
);
int ref
; // reference counter
STracerContainer() { head
= NULL
; }
STracer
*alloc(const char *fname
, SymTable
*symtable
);
int dealloc (STracer
*s
);
bool is_found(STracer
*s
);
typedef enum { STRACER_OFF
, STRACER_ON
, STRACER_STATUS
} trace_cmd_t
;
extern int tracer_cmd ( trace_cmd_t cmd
, int *vid
= NULL
, const char *fname
= NULL
, bool separate
= false );