[padb-devel] [padb commit] r114 - Don't try and read elan_base->state->vp when running with "local"

codesite-noreply at google.com codesite-noreply at google.com
Fri Jul 17 18:31:51 BST 2009


Author: apittman
Date: Fri Jul 17 10:31:24 2009
New Revision: 114

Modified:
    branches/full-duplex/src/padb

Log:
Don't try and read elan_base->state->vp when running with "local"
as the resource manger, it's ugly, unlikely to work and breaks things.


Modified: branches/full-duplex/src/padb
==============================================================================
--- branches/full-duplex/src/padb	(original)
+++ branches/full-duplex/src/padb	Fri Jul 17 10:31:24 2009
@@ -5150,13 +5150,6 @@
      return "";
  }

-sub gdb_int_from_raw {
-    my $str = shift;
-    if ( $str =~ /\$\d+ \= (\d)+/ ) {
-        return $1;
-    }
-}
-
  sub stack_from_core {
      my $exe  = shift;
      my $core = shift;
@@ -5740,22 +5733,6 @@
      }
  }

-sub gdb_int_from_pid {
-    my $pid = shift;
-    my $var = shift;
-    my $gdb = gdb_start();
-    if ( not gdb_attach( $gdb, $pid ) ) {
-        return;
-    }
-
-    # use data-evaluate-expression here?
-    my %r = gdb_n_send( $gdb, "p $var" );
-    my $nvp = gdb_int_from_raw( $r{raw} );
-    gdb_detach($gdb);
-    gdb_quit($gdb);
-    return $nvp;
-}
-
  sub show_vars {
      my ( $vp, $frame, $type ) = @_;
      my %l;
@@ -6361,18 +6338,12 @@
      }
  }

-# Local processes per node, i.e. no resource manager support.
+# Local processes per node, i.e. no resource manager support, we only
+# have one process in this case so call it process 0.
  sub local_find_pids {
      my $pid = shift;

-# Hard-wire this to vp 0, probably not true but without the resource  
manager it's difficult
-# to tell.  We should really use elan_base->state->vp here.
-    my $vp = gdb_int_from_pid( $pid, "elan_base->state->vp" );
-    if ( not defined $vp or $vp eq "" ) {
-        $vp = 0;
-    }
-
-    maybe_show_pid( $vp, $pid );
+    maybe_show_pid( 0, $pid );
  }

  sub mpd_find_pids {




More information about the padb-devel mailing list