From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14300 invoked by alias); 24 Jun 2002 21:04:58 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 14291 invoked from network); 24 Jun 2002 21:04:56 -0000 Received: from unknown (HELO motgate.mot.com) (129.188.136.100) by sources.redhat.com with SMTP; 24 Jun 2002 21:04:56 -0000 Received: [from mothost.mot.com (mothost.mot.com [129.188.137.101]) by motgate.mot.com (motgate 2.1) with ESMTP id OAA18762 for ; Mon, 24 Jun 2002 14:04:55 -0700 (MST)] Received: [from mail.wm.sps.mot.com ([199.10.246.2]) by mothost.mot.com (MOT-pobox 2.0) with ESMTP id OAA05258 for ; Mon, 24 Jun 2002 14:04:58 -0700 (MST)] Received: from hyper.wm.sps.mot.com (hyper.wm.sps.mot.com [199.10.246.43]) by mail.wm.sps.mot.com (8.9.3/8.9.3) with ESMTP id RAA07465 for ; Mon, 24 Jun 2002 17:04:47 -0400 Received: by hyper.wm.sps.mot.com (8.11.2) id g5OL4pY06652; Mon, 24 Jun 2002 17:04:51 -0400 Date: Mon, 24 Jun 2002 14:04:00 -0000 Message-Id: <200206242104.g5OL4pY06652@hyper.wm.sps.mot.com> From: Peter Barada To: gdb@sources.redhat.com Subject: Torubles with remote stub for m68k References: X-SW-Source: 2002-06/txt/msg00225.txt.bz2 I'm in the midst of bringing up a remote stub for coldfire using gdb-5.1.1, and I'm having troubles getting it to step. My stub does not suppor the 'Z0' or 'e' packets so gdb has to fall back to the insertion of a 0x4e41 (trap #1) instruction into the stream as a breakpoint. when it hits the breakpoint, a 'si' command is expected to: 1) Restore the memory overwritten by the 0x4e41 (trap #1) instruction 2) Step the processor by setting the T bit in the SR register and return from gdb 3) Reinsert the previously removed breakpoint. (and seen in version 4.16) When I execute that with gdb-5.1.1, it attempts to step the processor without removing the trap instruction so the target processor never steps past the trap instruction. Here's a cut back version of the remote protocol exchange(via set debug remote 1) to show what's happening: (gdb) set debug remote 1 (gdb) b FRSfindfont Sending packet: $m3af58,2#32...Ack Packet received: 4e56 Sending packet: $m3af5c,2#5d...Ack Packet received: 48d7 Breakpoint 1 at 0x3af78: file ../pdi/fntsockt.c, line 604. (gdb) c Continuing. Sending packet: $Z0,3af78,2#7d...Ack Packet received: Packet Z0 (software-breakpoint) is NOT supported Sending packet: $m3af78,2#34...Ack Packet received: 4ab9 Sending packet: $X3af78,0:#57...Ack Packet received: OK binary downloading suppported by target Sending packet: $X3af78,2:NA#e8...Ack Packet received: OK Sending packet: $Hc0#db...Ack Packet received: ENN Sending packet: $c#63...Ack Packet received: T05thread:9; [New Thread 9] Sending packet: $g#67...Ack Packet received: 00000000000000000000006300000000004b47b8000000000000000000000000000000000000000000012ca000012c240000000000000000005c34d4005c34c8000000000014a898000000000000000000000000000000007fffffffffffffff7fffffffffffffff7fffffffffffffff7fffffffffffffff7fffffffffffffff7fffffffffffffff7fffffffffffffff7fffffffffffffff7fffffffffffffff7fffffffffffffff7fffffffffffffff0000000000000000000000000000000000000000 Program received signal SIGTRAP, Trace/breakpoint trap. (gdb) thr 1 Sending packet: $T00000009#dd...Ack Packet received: OK Sending packet: $m1fd6ae8,4#fc...Ack Packet received: 01fd6b70 Sending packet: $m1fd6b70,8#cb...Ack Packet received: 416c626572747573 Sending packet: $m1fd6b78,8#d3...Ack Packet received: 4d5400700061926c [Switching to thread 1 (Thread 9)]#0 FRSfindfont ( Sending packet: $m1fd6aec,4#27...Ack Packet received: 01fd6b4c Sending packet: $m1fd6af0,4#f5...Ack Packet received: 01fd6b50 Sending packet: $m1fd6af4,4#f9...Ack Packet received: 01fd6b54 name=0x1fd6b70 "AlbertusMT", idptr=0x1fd6b4c, ftype=0x1fd6b50, Sending packet: $m1fd6af8,4#fd...Ack Packet received: 004c590c Sending packet: $m1fd6afc,4#28...Ack Packet received: 01fd6b58 Sending packet: $m1fd6b00,4#c0...Ack Packet received: 01fd6b5c fclass=0x1fd6b54, font_mat=0x4c590c, painttype=0x1fd6b58, fontname=0x1fd6b5c) at ../pdi/fntsockt.c:604 (gdb) si Sending packet: $Hc9#e4...Ack Packet received: OK Sending packet: $s#73...Ack Packet received: T05thread:9; Sending packet: $g#67...Ack Packet received: 0000000a00000000001fca200000000501fd6b5c01fd6b58004c590c01fd6b54002161d6002161e1005e87b001fd6b5001fd6b70005ca53c01fd6ae001fd6aac4084a0000003af784046800000000000404ca5dc000000007fffffffffffffff7fffffffffffffff7fffffffffffffff7fffffffffffffff7fffffffffffffff7fffffffffffffff000000000000008800000000 (gdb) p/x $pc <------------- Note $pc value $2 = 0x3af78 (gdb) si Sending packet: $s#73...Ack Packet received: T05thread:9; Sending packet: $g#67...Ack Packet received: 0000000a00000000001fca200000000501fd6b5c01fd6b58004c590c01fd6b54002161d6002161e1005e87b001fd6b5001fd6b70005ca53c01fd6ae001fd6aa84084a0000003af784046800000000000404ca5dc000000007fffffffffffffff7fffffffffffffff7fffffffffffffff7fffffffffffffff7fffffffffffffff7fffffffffffffff000000000000008800000000 (gdb) p/x $pc <------------- Note $pc value $3 = 0x3af78 (gdb) Any ideas how to best fix this? -- Peter Barada Peter.Barada@motorola.com Wizard 781-852-2768 (direct) WaveMark Solutions(wholly owned by Motorola) 781-270-0193 (fax)