// ========== Copyright Header Begin ==========================================
// OpenSPARC T2 Processor File: SS_BreakPoint.cc
// 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 ============================================
#include "SS_BreakPoint.h"
BL_Mutex
SS_BreakPoint::id_mutex
;
SS_BreakPoint::Ident
SS_BreakPoint::id_count
= 0;
SS_BreakPoint::SS_BreakPoint( Break _type
, SS_BreakPoint
* _next
)/*{{{*/
bool SS_BreakPoint::trigger( SS_Strand
* s
)/*{{{*/
SS_Signal
* sgn
= s
->msg
.make_signal(SS_Signal::BREAKPOINT
);
// In case of trc_step(1) we should get out of the loop
// signaling a breakpoint. Breaks are reported to the
// UI though a non zero return of step. See SS_Strand::trc_step()
// for why we set break_hit prematurely.
void SS_BreakPoint::unlink( SS_BreakPoint
** root
)/*{{{*/
SS_BreakPoint
* help
= *root
;
(prev
? prev
->link
: *root
) = this->link
;
extern "C" SS_Vaddr
run_exe_breakpoint( SS_Vaddr pc
, SS_Vaddr npc
, SS_Strand
* s
, SS_Instr
* i
)/*{{{*/
SS_BreakPoint
* bp
= i
->bp
;
SS_Signal
* sgn
= s
->msg
.make_signal(SS_Signal::BREAKPOINT
);
return (bp
->inst
.exe
)(pc
,npc
,s
,&bp
->inst
);
void SS_BreakPoint::remove()/*{{{*/