This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Torubles with remote stub for m68k


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]