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]

gdb remote serial protocol


[I'm not on the list, please CC me]

Hi

I have some problems with a recent gdb debugging oskit kernels over a
serial line. Older gdb like 5.0 run flawlessly. 

First, there is a new command 'e' which is not documented (Roland
McGrath told me that). It would be good to have this command
documented. Thanks.

Now to the real problem. Here is small gdb session for demonstration:

gdb version: woody debian
oskit version: 20030317
remote maschine is a K6-2

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)



As you can see gdb expects a register which doesn't exist, therefore
oskit returns an error. The same kernel with gdb-5.0 doesn't send this
packet.


Current directory is /home/wagi/rboot/
GNU gdb 5.0
Copyright 2000 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 "i686-pc-linux-gnu"...
(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
main (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
argc=6, argv=0x1000000)
    at ../../../../oskit-20020317+pcmcia/examples/x86/pingreply.c:381
(gdb) n
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: $Z0,100544,1#41...[+]Ack
[$][#][0][0]Packet received: 
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,0:#1c...[+]Ack
[$][O][K][#][9][a]Packet received: OK
binary downloading suppported by target
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
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
target_terminal_ours ()
(gdb) 


BTW, the newest gdb 5.2.1 I've see the same problem. The question is
now what's going wrong? I didn't send a bug, because I'm not totaly
sure if it's really a bug, or just stupidy of me.


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