[Prev][Next][Index][Thread]

Re: serial remote debugging with oskit and gdb



Roland McGrath <roland@frob.com> writes:

> The "e" command is new.  You can use the various "set remote" commands to
> tell gdb not to try to use these new features.  You can also complain to
> them that they broke compatibility by default and that the GDB manual fails
> to document these new protocol commands.  The latter definitely deserves
> complaint.  But it could be that the oskit stub is not properly responding
> to commands it does not recognize, since gdb seems to try to detect whether
> the stub supports fancy commands and stop using them if it doesn't.

I will complain about the documentation. 
'set remote step-over-range-packet 0' and 
'set remote step-over-range-w-signal-packet 0' didn't help. Therefore
I think the new 'e' command isn't the reason why it's not working properly.

Here is another test using the gdb woody version from Debian and the
pingreply example kernel. Oskit was configured like this:
../../oskit-20020317+pcmcia/configure  --target=i386-pc-linux-gnu --enable-debug

Current directory is /home/wagi/rboot/
GNU gdb 2002-04-01-cvs
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-linux"...
(gdb) set debug target 1
(gdb) set debug remote 1
(gdb) set debug serial 1
(gdb) target remote /dev/ttyS1
Remote debugging using /dev/ttyS1
Sending packet: $Hc-1#09...[
r +]Ack
[$][#][0][0]Packet received: 
Sending packet: $qC#b4...[+]Ack
[$][#][0][0]Packet received: 
Sending packet: $qOffsets#4b...[+]Ack
[$][#][0][0]Packet received: 
Sending packet: $?#3f...[+]Ack
[$][S][0][5][#][b][8]Packet received: S05
target_wait (-1, status) = 42000,   status->kind = stopped, signal = SIGTRAP
Sending packet: $Hg0#df...[+]Ack
[$][#][0][0]Packet received: 
Sending packet: $g#67...[+]Ack
[$][f][7][f][*]["][0][3][0][*]["][2][1][0][*]["][8][0][f][4][0][2][0][0][8][0][7][f][1][a][0][0][a][8][7][f][1][a][0][0][b][4][f][4][0][2][0][0][d][4][f][b][1][a][0][0][3][f][0][5][1][0][0][0][9][3][0][2][0][*][ ][1][1][0][*]["][1][9][0][*]["][1][8][0][*]["][1][8][0][*][2][#][d][9]Packet received: f7ffffff030000002100000080f40200807f1a00a87f1a00b4f40200d4fb1a003f05100093020000110000001900000018000000180000000000000000000000
target_fetch_registers (eip) = 0x10053f 1049919
target_terminal_ours_for_output ()
target_terminal_ours ()
Sending packet: $m1a7fb0,4#8e...[+]Ack
[$][0][6][0][*]["][#][e][2]Packet received: 06000000
target_xfer_memory (0x1a7fb0, xxx, 4, read, xxx) = 4, bytes = 06 00 00 00
Sending packet: $m1a7fb4,4#92...[+]Ack
[$][0][*]["][0][1][#][d][d]Packet received: 00000001
target_xfer_memory (0x1a7fb4, xxx, 4, read, xxx) = 4, bytes =
 00 00 00 01
main (argc=6, argv=0x1000000)
    at ../../../../oskit-20020317+pcmcia/examples/x86/pingreply.c:381
Sending packet: $qSymbol::#5b...[+]Ack
[$][#][0][0]Packet received: 
Packet qSymbol (symbol-lookup) is NOT supported
(gdb) n
Sending packet: $Z0,15c58c,1#ac...[+]Ack
[$][#][0][0]Packet received: 
Packet Z0 (software-breakpoint) is NOT supported
Sending packet: $m15c58c,1#63...[+]Ack
[$][8][b][#][9][a]Packet received: 8b
target_xfer_memory (0x15c58c, xxx, 1, read, xxx) = 1, bytes = 8b
Sending packet: $X15c58c,0:#87...[+]Ack
[$][O][K][#][9][a]Packet received: OK
binary downloading suppported by target
Sending packet: $X15c58c,1:Ì#54...[+]Ack
[$][O][K][#][9][a]Packet received: OK
target_xfer_memory (0x15c58c, xxx, 1, write, xxx) = 1, bytes =
 cc
target_insert_breakpoint (0x15c58c, xxx) = 0
Sending packet: $m100000,1#eb...[+]Ack
[$][e][b][#][c][7]Packet received: eb
target_xfer_memory (0x100000, xxx, 1, read, xxx) = 1, bytes = eb
Sending packet: $X100000,1:Ì#dc...[+]Ack
[$][O][K][#][9][a]Packet received: OK
target_xfer_memory (0x100000, xxx, 1, write, xxx) = 1, bytes =
 cc
target_insert_breakpoint (0x100000, xxx) = 0
target_terminal_inferior ()
Sending packet: $Hc0#db...[+]Ack
[$][#][0][0]Packet received: 
Sending packet: $s#73...[+]Ack
target_resume (-1, step, 0)
[$][S][0][5][#][b][8]Packet received: S05
target_wait (-1, status) = 42000,   status->kind = stopped, signal = SIGTRAP
Sending packet: $g#67...[+]Ack
[$][f][7][f][*]["][0][3][0][*]["][2][1][0][*]["][8][0][f][4][0][2][0][0][7][c][7][f][1][a][0][0][a][8][7][f][1][a][0][0][b][4][f][4][0][2][0][0][d][4][f][b][1][a][0][0][5][4][0][a][1][0][0][0][9][3][0][3][0][1][0][0][1][1][0][*]["][1][9][0][*]["][1][8][0][*]["][1][8][0][*][2][#][4][f]Packet received: f7ffffff030000002100000080f402007c7f1a00a87f1a00b4f40200d4fb1a00540a100093030100110000001900000018000000180000000000000000000000
target_fetch_registers (eip) = 0x100a54 1051220
target_terminal_ours_for_output ()
Sending packet: $m1a7f7c,4#96...[+]Ack
[$][4][4][0][5][1][0][0][0][#][8][e]Packet received: 44051000
target_xfer_memory (0x1a7f7c, xxx, 4, read, xxx) = 4, bytes = 44 05 10 00
Sending packet: $m100544,1#f8...[+]Ack
[$][8][3][#][6][b]Packet received: 83
target_xfer_memory (0x100544, xxx, 1, read, xxx) = 1, bytes =
 83
Sending packet: $X100544,1:Ì#e9...[+]Ack
[$][O][K][#][9][a]Packet received: OK
target_xfer_memory (0x100544, xxx, 1, write, xxx) = 1, bytes =
 cc
target_insert_breakpoint (0x100544, xxx) = 0
target_terminal_inferior ()
Sending packet: $c#63...[+]Ack
target_resume (-1, continue, 0)
[$][S][0][5][#][b][8]Packet received: S05
target_wait (-1, status) = 42000,   status->kind = stopped, signal = SIGTRAP
Sending packet: $g#67...[+]Ack
[$][0][1][0][*]["][4][0][6][4][1][8][0][0][4][0][6][4][1][8][0][0][8][0][f][4][0][2][0][0][8][0][7][f][1][a][0][0][a][8][7][f][1][a][0][0][b][4][f][4][0][2][0][0][d][4][f][b][1][a][0][0][4][5][0][5][1][0][0][0][0][3][0][2][0][*][ ][1][1][0][*]["][1][9][0][*]["][1][8][0][*]["][1][8][0][*][2][#][9][e]Packet received: 01000000406418004064180080f40200807f1a00a87f1a00b4f40200d4fb1a004505100003020000110000001900000018000000180000000000000000000000
target_fetch_registers (eip) = 0x100545 1049925
target_prepare_to_store ()
Sending packet: $P8=44051000#53...[+]Ack
[$][O][K][#][9][a]Packet received: OK
target_store_registers (eip) = 0x100544 1049924
target_prepare_to_store ()
Sending packet: $P29=ffffffff#28...[+]Ack      <--- XXX
[$][E][0][4][#][a][9]Packet received: E04
target_terminal_ours ()
Remote failure reply: E04
Sending packet: $X100544,1:\203#a0...[+]Ack
[$][O][K][#][9][a]Packet received: OK
target_xfer_memory (0x100544, xxx, 1, write, xxx) = 1, bytes =
 83
target_remove_breakpoint (0x100544, xxx) = 0
(gdb)

I don't know why gdb thinks the remote machine has so many
register. As previously, gdb-5.0 works flawlessly with the same kernel.


wagi

Follow-Ups: References: