diff mbox

[3/3] Use command "monitor set debug 0" to check the connection

Message ID 87lhooox25.fsf@codesourcery.com
State New
Headers show

Commit Message

Yao Qi Oct. 10, 2014, 1:48 p.m. UTC
Pedro Alves <palves@redhat.com> writes:

> So I think we should do "set remote trace-status-packet on" before
> the "tstatus".
>

Sure.

> I know that the test originally didn't use "tstatus",
> but it's really the packet we should be testing for exercising
> that remote_get_trace_status's exception swallowing code,
> which was very much related to the original bug this test covered,
> see:
>
>   https://sourceware.org/bugzilla/show_bug.cgi?id=15275
>
>   https://sourceware.org/ml/gdb-patches/2013-03/msg00691.html

Thanks for the information.  I remember the first half of the
story, but forget the second half.  How about the patch below?

Comments

Pedro Alves Oct. 10, 2014, 1:57 p.m. UTC | #1
On 10/10/2014 02:48 PM, Yao Qi wrote:
> Pedro Alves <palves@redhat.com> writes:
>> I know that the test originally didn't use "tstatus",
>> but it's really the packet we should be testing for exercising
>> that remote_get_trace_status's exception swallowing code,
>> which was very much related to the original bug this test covered,
>> see:
>>
>>   https://sourceware.org/bugzilla/show_bug.cgi?id=15275
>>
>>   https://sourceware.org/ml/gdb-patches/2013-03/msg00691.html
> 
> Thanks for the information.  I remember the first half of the
> story, but forget the second half.  How about the patch below?

Looks good.

Thanks,
Pedro Alves
diff mbox

Patch

diff --git a/gdb/testsuite/gdb.server/server-kill.exp b/gdb/testsuite/gdb.server/server-kill.exp
index 83c11f2..53d8e9a 100644
--- a/gdb/testsuite/gdb.server/server-kill.exp
+++ b/gdb/testsuite/gdb.server/server-kill.exp
@@ -52,6 +52,11 @@  if {$server_pid == "" } {
 
 remote_exec target "kill -9 $server_pid"
 
+# Enable trace status packet which is disabled after the connection
+# if the remote target doesn't support tracepoint at all.  Otherwise,
+# no RSP packet is sent out.
+gdb_test_no_output "set remote trace-status-packet on"
+
 # Force GDB to talk with GDBserver, so that we can get the
 # "connection closed" error.
 gdb_test "tstatus" {Remote connection closed|Remote communication error\.  Target disconnected\.: Connection reset by peer\.}