* Re: early buf termination
[not found] <1183949787.19182.ezmlm@sourceware.org>
@ 2007-07-09 5:19 ` Wenbo Yang
2007-07-11 7:50 ` RSP handling Wenbo Yang
0 siblings, 1 reply; 4+ messages in thread
From: Wenbo Yang @ 2007-07-09 5:19 UTC (permalink / raw)
To: dave.tw; +Cc: gdb
s88 wrote:
> I'm implementing a gdb stub for my ARM simulator with TCP connection.
> As I query the registers information from gdb, I got
> "fetch_register_using_p: early buf termination" msg.
>
> (gdb) info registers
> r0 fetch_register_using_p: early buf termination
> (gdb)
>
> the gdb client send the packet which contains "$p0#a0" to my gdb server.
> The gdb server reply 0 (should be $0#something) to the gdb client.
You can read remote.c:3419 for more information. I think the meaning is:
unexpected message end. It should be more characters but your message
terminated. You should give GDB the standard RSP response.
Regards,
Wenbo
--
Wenbo Yang
The State Key Lab. of Information Security
Graduate School of CAS, 19A Yuquan Road, Beijing, China
Homepage: http://solrex.cn
SimpLight Nanoelectronics Ltd. 6 Zhichun Road, 10th Floor, Beijing, China
Phone: +86-10-5126-6989 --- Email: wenbo.yang@simplnano.com
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: RSP handling
2007-07-09 5:19 ` early buf termination Wenbo Yang
@ 2007-07-11 7:50 ` Wenbo Yang
2007-07-11 19:11 ` Jim Blandy
0 siblings, 1 reply; 4+ messages in thread
From: Wenbo Yang @ 2007-07-11 7:50 UTC (permalink / raw)
To: dave.tw; +Cc: gdb
> s88 wrote:
>
> but something is strange after the connection created. I set a
> breakpoint in the main function (br main), but after the connection
> created the gdb stop at the first instruction of crt0.S.
Is there anything wrong? Your stub gave GDB where the PC pointed to, and GDB
printed it out with source code accordingly. You didn't start debugging, you
were just attaching to the target. The PC you got should be the saved PC value
while enter exception handler(stub). It has little meaning, you can go ahead by
"continue".
Wenbo
--
Wenbo Yang
The State Key Lab. of Information Security
Graduate School of CAS, 19A Yuquan Road, Beijing, China
Homepage: http://solrex.cn
SimpLight Nanoelectronics Ltd. 6 Zhichun Road, 10th Floor, Beijing, China
Phone: +86-10-5126-6989 --- Email: wenbo.yang@simplnano.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RSP handling
2007-07-11 7:50 ` RSP handling Wenbo Yang
@ 2007-07-11 19:11 ` Jim Blandy
0 siblings, 0 replies; 4+ messages in thread
From: Jim Blandy @ 2007-07-11 19:11 UTC (permalink / raw)
To: Wenbo Yang; +Cc: dave.tw, gdb
Wenbo Yang <wenbo.yang@simplnano.com> writes:
>> but something is strange after the connection created. I set a
>> breakpoint in the main function (br main), but after the connection
>> created the gdb stop at the first instruction of crt0.S.
> Is there anything wrong? Your stub gave GDB where the PC pointed to,
> and GDB printed it out with source code accordingly. You didn't start
> debugging, you were just attaching to the target. The PC you got
> should be the saved PC value while enter exception handler(stub). It
> has little meaning, you can go ahead by "continue".
Right. When you connect to a target via the remote protocol, GDB
treats that as connecting to a program that's already running; it's
showing you the location where it's currently stopped.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RSP handling
@ 2007-07-11 4:57 s88
0 siblings, 0 replies; 4+ messages in thread
From: s88 @ 2007-07-11 4:57 UTC (permalink / raw)
To: gdb
Hi all:
My gdb is configured as "--host=i686-pc-linux-gnu --target=arm-elf"
and remote debugging with an arm simulator which be a target.
but something is strange after the connection created. I set a
breakpoint in the main function (br main), but after the connection
created the gdb stop at the first instruction of crt0.S.
(gdb) target remote 140.123.103.7:23137
Remote debugging using 140.123.103.7:23137
start () at ../../../../../../gcc-3.4.1/newlib/libc/sys/arm/crt0.S:36
36 mov r0, #AngelSWI_Reason_HeapInfo
Current language: auto; currently asm
(gdb)
Maybe my gdb stub doesn't handle the packet well.
Following is the command form gdb and the correspond reply by my gdb stub.
waiting for GDB connection establish...
A new GDB connection established
received from gdb ... $qSupported#37 <--from gdb
reply='' <--gdb stub reply to gdb
received from gdb ... +
received from gdb ... $Hc-1#09
reply='OK'
received from gdb ... $qC#b4
reply='*'
received from gdb ... $qOffsets#4b
reply='Text=0;Data=0;Bss=0'
received from gdb ... $qOffsets#4b
reply='Text=0;Data=0;Bss=0'
received from gdb ... $?#3f
reply='S05'
received from gdb ... $Hg0#df
reply='OK'
received from gdb ... $pf#d6
reply='10810000'
received from gdb ... $m8110,4#97
reply='1600a0e3'
received from gdb ... $qSymbol::#5b
reply='OK'
any suggestion?
best regards,
Dave.
--
System on Chip Design Lab.
Dept. of Computer Science and Information Engineering,
National Chung Cheng University
E-mail : s88.tw@acm.org
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-07-11 19:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1183949787.19182.ezmlm@sourceware.org>
2007-07-09 5:19 ` early buf termination Wenbo Yang
2007-07-11 7:50 ` RSP handling Wenbo Yang
2007-07-11 19:11 ` Jim Blandy
2007-07-11 4:57 s88
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox