Debug a remote system via serial or firewire interface. For example, specify 'tr /dev/cuad0' to use first serial port, or 'tr localhost:5556' for default firewire port. See also tr0, tr1 and trf commands.
Debug a remote system via firewire interface at default port 5556. See also tr, tr0 and tr1 commands.
end
# Get symbols from klds. Unfortunately, there are a number of
# landmines involved here:
#
# When debugging the same machine (via /dev/mem), we can get the
# script to call kldstat and pass the info on to asf(8). This won't
# work for crashes or remote debugging, of course, because we'd get
# the information for the wrong system. Instead, we use the macro
# "kldstat", which extracts the information from the "dump". The
# trouble here is that it's a pain to use, since gdb doesn't have the
# capability to pass data to scripts, so we have to mark it and paste
# it into the script. This makes it silly to use this method for
# debugging the local system. Instead, we have two scripts:
#
# getsyms uses the information in the "dump", and you have to paste it.
# kldsyms uses the local kld information.
#
# Improvements in gdb should make this go away some day.
#
define kldsyms
# This will be replaced by the path of the real modules directory.
shell asf -f -k MODPATH
source .asf
end
document kldsyms
Read in the symbol tables for the debugging machine. This only makes sense when debugging /dev/mem; use the 'getsyms' macro for remote debugging.
end
# Remote system
define getsyms
kldstat
echo Select the list above with the mouse, paste into the screen\n
echo and then press ^D. Yes, this is annoying.\n
# This will be replaced by the path of the real modules directory.
shell asf -f MODPATH
source .asf
end
document getsyms
Display kldstat information for the target machine and invite user to paste it back in. This causes the symbols for the KLDs to be loaded. When doing memory debugging, use the command kldsyms instead.