From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6072 invoked by alias); 3 Nov 2007 17:25:45 -0000 Received: (qmail 6062 invoked by uid 22791); 3 Nov 2007 17:25:44 -0000 X-Spam-Check-By: sourceware.org Received: from ug-out-1314.google.com (HELO ug-out-1314.google.com) (66.249.92.170) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 03 Nov 2007 17:25:41 +0000 Received: by ug-out-1314.google.com with SMTP id o2so824803uge for ; Sat, 03 Nov 2007 10:25:38 -0700 (PDT) Received: by 10.66.240.12 with SMTP id n12mr2063815ugh.1194110738593; Sat, 03 Nov 2007 10:25:38 -0700 (PDT) Received: from localhost ( [85.231.134.78]) by mx.google.com with ESMTPS id 5sm4033576ugc.2007.11.03.10.25.37 (version=SSLv3 cipher=OTHER); Sat, 03 Nov 2007 10:25:38 -0700 (PDT) Date: Sat, 03 Nov 2007 17:25:00 -0000 From: Simon Kagstrom To: gdb@sourceware.org Subject: Interrupt packets in the remote protocol Message-ID: <20071103182847.54afb758@localhost> X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00020.txt.bz2 Hello! I'm developing a binary translator that translates MIPS binaries into Java bytecode [1], which enables C/C++ programs to be executed on J2ME platforms. To get good debugging support, I'm developing a GDB server that connects to the Java JDB debugger and "translates" commands in the GDB remote protocol to JDB commands. The server mostly works now except for interrupts (Ctrl-C in GDB). It looks like the interrupt packets (plain 0x03) are never sent. A log with 'set debug remote 1' looks as follows: (gdb) c Continuing. Sending packet: $m1000000,4#1e...Ack Packet received: 3c020000 Sending packet: $Z0,1000004,4#6b...Ack Packet received: OK Packet Z0 (software-breakpoint) is supported Sending packet: $vCont?#49...Ack Packet received: vCont;c Packet vCont (verbose-resume) is NOT supported Sending packet: $Hc0#db...Ack Packet received: Sending packet: $c#63...Ack Packet received: T0525:01000004; Sending packet: $z0,1000004,4#8b...Ack Packet received: OK Sending packet: $Z0,1000000,4#67...Ack Packet received: OK Sending packet: $Hc0#db...Ack Packet received: Sending packet: $c#63...Ack remote_interrupt called remote_stop called My server has two threads, one that receives messages from GDB and one that handles packets, controls JDB and sends replies back to GDB. The "receiver" thread is waiting for messages when Ctrl-C is sent in GDB. Did I miss some GDB configuration option or some other obvious thing? -- // Simon [1] http://cibyl.googlecode.com