[padb-devel] [padb] r161 committed - Added a "tdata" debug option to print the contents of target_data....
codesite-noreply at google.com
codesite-noreply at google.com
Wed Aug 26 11:16:36 BST 2009
Revision: 161
Author: apittman
Date: Wed Aug 26 03:16:06 2009
Log: Added a "tdata" debug option to print the contents of target_data.
As this is a namespace/value hash with range lists reduced in the network
it prints really nicely and is very useful to have.
http://code.google.com/p/padb/source/detail?r=161
Modified:
/trunk/src/padb
=======================================
--- /trunk/src/padb Wed Aug 26 02:18:13 2009
+++ /trunk/src/padb Wed Aug 26 03:16:06 2009
@@ -618,6 +618,7 @@
$debugModes{signon} = undef;
$debugModes{rmgr} = undef;
$debugModes{ctree} = undef;
+$debugModes{tdata} = undef;
sub parse_args_outer {
@@ -3512,6 +3513,20 @@
}
$header_shown = 1;
}
+
+sub format_target_data {
+ my ($td) = @_;
+
+ my $ret = "\n";
+ foreach my $name ( sort( keys( %{$td} ) ) ) {
+ $ret .= "Namespace: \"$name\"\n";
+ foreach my $value ( sortn( keys( %{ $td->{$name} } ) ) ) {
+ $ret .= " $value\t";
+ $ret .= rng_convert_to_user( $td->{$name}{$value} ) . "\n";
+ }
+ }
+ return $ret;
+}
sub command_from_inner {
my ( $comm_data, $cdata, $line ) = @_;
@@ -3552,6 +3567,14 @@
if ( not $watch ) {
issue_command_to_inner( $cdata, $req );
}
+
+ if ( defined $d->{target_data} ) {
+ debug_log(
+ "tdata", $d->{target_data},
+ "Target data %s",
+ format_target_data( $d->{target_data} )
+ );
+ }
maybe_clear_screen();
maybe_show_header($comm_data);
@@ -5948,6 +5971,7 @@
my ( $vp, $key, $value ) = @_;
if ( $confInner{mode} eq "proc_summary" ) {
if ( defined $proc_keys{ lc($key) } ) {
+ target_key_pair( $vp, lc($key), $value );
$proc_info->{$vp}{ lc($key) } = $value;
}
} else {
@@ -6442,6 +6466,7 @@
# Load the status now before we attach with GDB,
# otherwise we'll just see it as "T" (Stopped).
my $m = find_from_status( $pid, "State" );
+ target_key_pair( $vp, "state", $m );
if ( $m eq "R" ) {
$m = ",";
} elsif ( $m eq "S" ) {
More information about the padb-devel
mailing list