[padb] r432 committed - Accept RESULT_UNKNOWN as a code from gdb as well as "done" or "error"....

padb at googlecode.com padb at googlecode.com
Sat Feb 19 21:59:54 GMT 2011


Revision: 432
Author: apittman at gmail.com
Date: Sat Feb 19 13:58:31 2011
Log: Accept RESULT_UNKNOWN as a code from gdb as well as "done" or "error".

This doesn't happen with gdb but does happen quite often with idb so handle
it properly.  I should probably catch this and assume RESULT_UNKNOWN is an
error, after all if the command had worked then idb would know that it had
done.

http://code.google.com/p/padb/source/detail?r=432

Modified:
  /trunk/src/padb

=======================================
--- /trunk/src/padb	Sat Feb 19 13:54:26 2011
+++ /trunk/src/padb	Sat Feb 19 13:58:31 2011
@@ -6257,7 +6257,7 @@
  sub gdb_attach_async_end {
      my ( $gdb, $pid ) = @_;

-    my %p = _gdb_send_real_async_wait( $gdb, "attach $pid" );
+    my %p = _gdb_send_real_async_wait( $gdb, "-target-attach $pid" );

      if ( not defined $p{status} ) {
          $gdb->{error} = 'Failed to attach to process';
@@ -6697,7 +6697,7 @@
          #if (/\&\"(.*)\"\n/) {    #"
          #    $res{debug} .= $1;
          #}
-        if (m{\A(\d+)\^(done|error),?(.*)\Z}x) {
+        if (m{\A(\d+)\^(done|error|RESULT_UNKNOWN),?(.*)\Z}x) {
              my $seq    = $1;
              my $status = $2;
              my $reason = $3;




More information about the padb-devel mailing list