# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#ident "@(#)dbxrc 1.8 07/05/30 SMI"
if [ -f $HOME/.dbxrc ]; then
when in init_threads -temp { stop in debug_hook; }
when in init_threads -temp { when in debug_hook { call debug_dump_pc(); }; }
: ${1?"usage: $0 <pc> #set a simulation breakpoint at pc"}
eval "when in init_threads -temp { call debug_set_breakpoint($1); }"
call debug_set_breakpoint($1)
: ${1?"usage: $0 <pc> #clear simulation breakpoint at pc"}
eval "when in init_threads -temp { call debug_clear_breakpoint($1); }"
call debug_clear_breakpoint($1)
echo "dbx: sim not active"
call debug_print_breakpoints()
[ -z "$2" ] || { echo "usage: $0 [<n>]" >&2 && return; }
echo "dbx: sim not active"
if [ -z "$1" ]; then n=1; else n=$1; fi
call debug_set_breakpoint_next()
echo "dbx: sim not active"
echo "dbx: sim not active"
echo "dbx: sim not active"
echo "dbx: sim not active"
echo "dbx: sim not active"
echo "dbx: sim not active"
call debug_dump_dtlb_all()
echo "dbx: sim not active"
echo "dbx: sim not active"
call debug_dump_itlb_all()
: ${1?"usage: $0 <paddr> [<n>]"}
echo "dbx: sim not active"
if [ -z "$2" ]; then n=1; else n=$2; fi
: ${1?"usage: $0 <paddr> [<n>]"}
echo "dbx: sim not active"
if [ -z "$2" ]; then n=1; else n=$2; fi
echo "dbx: sim not active"
call debug_focus_set($1);
: ${1?"usage: $0 <vaddr>"}
echo "dbx: sim not active"
echo "dbx: sim not active"
echo "dbx: sim not active"
echo "dbx: sim not active"
call debug_print_scratch(-1)
call debug_print_scratch($1)
echo "dbx: sim not active"
call debug_initiate_save_state_now()
echo "type 'cont' on the debugger prompt for the save_state to begin"
echo "dbx: sim not active"
call debug_print_icount()
echo "dbx: sim not active"
: ${1?"usage: $0 <fname> #dump breakpoints to file"}
echo "dbx: sim not active"
call debug_dump_breakpoints($1)
: ${1?"usage: $0 <fname> #restore breakpoints from file"}
echo "dbx: sim not active"
call debug_restore_breakpoints($1)