diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2012-04-03 15:35:56 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-04-27 13:15:05 -0500 |
commit | abaf491814fa70cb24193eff4fae91919a25de4d (patch) | |
tree | 691622ddefdd666d5a849fc27a979d0efd9ef46f /src/build/debug/Hostboot/AttrDump.pm | |
parent | f373d5d3ed00d94202f2b32d75f1066ff4727938 (diff) | |
download | talos-hostboot-abaf491814fa70cb24193eff4fae91919a25de4d.tar.gz talos-hostboot-abaf491814fa70cb24193eff4fae91919a25de4d.zip |
Attribute Dump Debug Func
You can request a dump of all attributes for a given target
using the HUID as the key. The command also allows you to
specify which trace buffer the output should go into.
Synopsis
hb-AttrDump ["options"]
Options:
huid HUID of target to dump (default is to dump all targets).
trace Trace buffer to use (default=g_trac_targ).
debug More debug output.
force Run command even if state does not appear correct.
Ex: dump the attributes for sys0node0proc0 into FSIR trace
hb-AttrDump "huid=0x00070001 trace=g_trac_fsir"
RTC: 35202
Change-Id: Iab3b50af025f203bd5184481462603de9b4bc1a9
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/912
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/build/debug/Hostboot/AttrDump.pm')
-rwxr-xr-x | src/build/debug/Hostboot/AttrDump.pm | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/src/build/debug/Hostboot/AttrDump.pm b/src/build/debug/Hostboot/AttrDump.pm new file mode 100755 index 000000000..8d8dfafa0 --- /dev/null +++ b/src/build/debug/Hostboot/AttrDump.pm @@ -0,0 +1,70 @@ + +use strict; + +package Hostboot::AttrDump; +use Exporter; +our @EXPORT_OK = ('main'); +require Hostboot::CallFunc; + +sub main +{ + my ($packName,$args) = @_; + + # Parse 'debug' option. + my $debug = 0; + if (defined $args->{"debug"}) + { + $debug = 1; + } + + # Parse 'force' argument. + my $force = 0; + if (defined $args->{"force"}) + { + $force = 1; + } + + # Parse 'trace' argument. + my $trace = (::findSymbolAddress("TARGETING::g_trac_targeting"))[0]; + if (defined $args->{"trace"}) + { + $trace = (::findSymbolAddress($args->{"trace"}))[0]; + } + if( $debug ) + { + my $tmp2 = $args->{"trace"}; + ::userDisplay("\ntrace: $trace ($tmp2)\n"); + } + + # Parse 'target' argument. + my $huid = 0; # dump all targets + if (defined $args->{"huid"}) + { + $huid = hex($args->{"huid"}); + } + if( $debug ) + { + ::userDisplay("huid: $huid\n"); + } + + my @dumpparms; + push( @dumpparms, $trace ); + push( @dumpparms, $huid ); + Hostboot::CallFunc::execFunc( "TARGETING::dumpAllAttributes2(trace_buf_head**, unsigned int)", $debug, $force, \@dumpparms ); + + return 0; +} + +sub helpInfo +{ + my %info = ( + name => "AttrDump", + intro => ["Dumps all Attributes to trace."], + options => { + "huid" => ["HUID of target to dump (default is to dump all targets)."], + "trace" => ["Trace buffer to use (default=g_trac_targ)."], + "force" => ["Run command even if state does not appear correct."], + "debug" => ["More debug output."], + }, + ); +} |