From padb at googlecode.com Sat Feb 19 21:45:48 2011 From: padb at googlecode.com (padb at googlecode.com) Date: Sat, 19 Feb 2011 21:45:48 +0000 Subject: [padb] r429 committed - Be sure to explicitly quit gdb after detaching. Message-ID: <0015175cddfac4975f049ca98d6e@google.com> Revision: 429 Author: apittman at gmail.com Date: Sat Feb 19 13:45:30 2011 Log: Be sure to explicitly quit gdb after detaching. http://code.google.com/p/padb/source/detail?r=429 Modified: /trunk/src/padb ======================================= --- /trunk/src/padb Wed Dec 8 10:56:59 2010 +++ /trunk/src/padb Sat Feb 19 13:45:30 2011 @@ -8567,6 +8567,7 @@ foreach my $proc ( @{$procs} ) { if ( defined $proc->{gdb_handle} ) { gdb_detach( $proc->{gdb_handle} ); + gdb_quit( $proc->{gdb_handle} ); delete $proc->{gdb_handle}; } } From padb at googlecode.com Sat Feb 19 21:51:51 2011 From: padb at googlecode.com (padb at googlecode.com) Date: Sat, 19 Feb 2011 21:51:51 +0000 Subject: [padb] r430 committed - Use official mi commands rather than gdb commands when attaching... Message-ID: <0015175ce16c5e814b049ca9a3a6@google.com> Revision: 430 Author: apittman at gmail.com Date: Sat Feb 19 13:51:03 2011 Log: Use official mi commands rather than gdb commands when attaching and telling gdb to quit. http://code.google.com/p/padb/source/detail?r=430 Modified: /trunk/src/padb ======================================= --- /trunk/src/padb Sat Feb 19 13:45:30 2011 +++ /trunk/src/padb Sat Feb 19 13:51:03 2011 @@ -6152,7 +6152,7 @@ } return; } - gdb_send( $gdb, 'quit' ); + gdb_send( $gdb, '-gdb-exit' ); waitpid $gdb->{gdbpid}, 0; foreach my $fdname (qw(rdr wtr err)) { next unless exists $gdb->{$fdname}; @@ -6177,7 +6177,7 @@ } send_cont_signal($pid); - my %p = gdb_n_send( $gdb, "attach $pid" ); + my %p = gdb_n_send( $gdb, "-target-attach $pid" ); if ( not defined $p{status} ) { $gdb->{error} = 'Failed to attach to process'; @@ -6249,7 +6249,7 @@ send_cont_signal($pid); - _gdb_send_real_async_start( $gdb, "attach $pid" ); + _gdb_send_real_async_start( $gdb, "-target-attach $pid" ); return; } From padb at googlecode.com Sat Feb 19 21:55:51 2011 From: padb at googlecode.com (padb at googlecode.com) Date: Sat, 19 Feb 2011 21:55:51 +0000 Subject: [padb] r431 committed - Only select thread by id if there is more than one thread. Message-ID: <0015175cdbdcb2e500049ca9b165@google.com> Revision: 431 Author: apittman at gmail.com Date: Sat Feb 19 13:54:26 2011 Log: Only select thread by id if there is more than one thread. http://code.google.com/p/padb/source/detail?r=431 Modified: /trunk/src/padb ======================================= --- /trunk/src/padb Sat Feb 19 13:51:03 2011 +++ /trunk/src/padb Sat Feb 19 13:54:26 2011 @@ -7885,7 +7885,9 @@ next unless $thread_id eq $id; } my %t = ( id => $id ); - gdb_send( $gdb, "-thread-select $id" ); + if ( $data->{'number-of-threads'} != 1 ) { + gdb_send( $gdb, "-thread-select $id" ); + } @{ $t{frames} } = gdb_dump_frames( $gdb, $detail ); push @th, \%t; } From padb at googlecode.com Sat Feb 19 21:59:54 2011 From: padb at googlecode.com (padb at googlecode.com) Date: Sat, 19 Feb 2011 21:59:54 +0000 Subject: [padb] r432 committed - Accept RESULT_UNKNOWN as a code from gdb as well as "done" or "error".... Message-ID: <0015175cba5e342542049ca9c0f6@google.com> 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;