* GDB startup session with Eclipse
@ 2007-12-19 12:35 Guillaume MENANT
2007-12-19 13:55 ` Daniel Jacobowitz
0 siblings, 1 reply; 11+ messages in thread
From: Guillaume MENANT @ 2007-12-19 12:35 UTC (permalink / raw)
To: gdb
Hello, Eclispe send by GDB to my stub the following commands :
qSupported
Hc-1 (not even found in the GDB documentation)
qC
qOffsets
?
Which one is mandatory to reply to ? Currently, I'm only replying to
qSupported. What is the purpose of 'qOffsets' and '?' commands ?
Thanks a lot.
--
View this message in context: http://www.nabble.com/GDB-startup-session-with-Eclipse-tp14416165p14416165.html
Sent from the Sourceware - gdb list mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: GDB startup session with Eclipse
2007-12-19 12:35 GDB startup session with Eclipse Guillaume MENANT
@ 2007-12-19 13:55 ` Daniel Jacobowitz
2007-12-19 15:30 ` Guillaume MENANT
0 siblings, 1 reply; 11+ messages in thread
From: Daniel Jacobowitz @ 2007-12-19 13:55 UTC (permalink / raw)
To: Guillaume MENANT; +Cc: gdb
On Wed, Dec 19, 2007 at 04:35:47AM -0800, Guillaume MENANT wrote:
>
> Hello, Eclispe send by GDB to my stub the following commands :
>
> qSupported
> Hc-1 (not even found in the GDB documentation)
> qC
> qOffsets
> ?
>
> Which one is mandatory to reply to ? Currently, I'm only replying to
> qSupported. What is the purpose of 'qOffsets' and '?' commands ?
Have you read the protocol documentation in the manual? It should
answer these questions; if it does not, please be clearer so we can
improve the manual.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: GDB startup session with Eclipse
2007-12-19 13:55 ` Daniel Jacobowitz
@ 2007-12-19 15:30 ` Guillaume MENANT
2007-12-19 15:37 ` Daniel Jacobowitz
0 siblings, 1 reply; 11+ messages in thread
From: Guillaume MENANT @ 2007-12-19 15:30 UTC (permalink / raw)
To: gdb
Yes of course I've read the remote protocol chapter in the manual but I think
there is a lack of information on the GDB startup sequence and perhaps on
mandatory commands (in the manual mandatory commands are g, G, m, M, c and
s).
For now, I've implemented the qSupported command because I want the flash
support but qC, qOffsets and ? don't seems mandatory to me. I don't know
what is the Hc-1 command too.
Eclipse don't seems happy when I reply an empty reply to the '?' command but
I don't know why and if it's a problem.
Thanks. (I'm french, with pretty good english, but my misunderstanding of
the manual can come from there too)
Daniel Jacobowitz-2 wrote:
>
> On Wed, Dec 19, 2007 at 04:35:47AM -0800, Guillaume MENANT wrote:
>>
>> Hello, Eclispe send by GDB to my stub the following commands :
>>
>> qSupported
>> Hc-1 (not even found in the GDB documentation)
>> qC
>> qOffsets
>> ?
>>
>> Which one is mandatory to reply to ? Currently, I'm only replying to
>> qSupported. What is the purpose of 'qOffsets' and '?' commands ?
>
> Have you read the protocol documentation in the manual? It should
> answer these questions; if it does not, please be clearer so we can
> improve the manual.
>
> --
> Daniel Jacobowitz
> CodeSourcery
>
>
--
View this message in context: http://www.nabble.com/GDB-startup-session-with-Eclipse-tp14416165p14418949.html
Sent from the Sourceware - gdb list mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: GDB startup session with Eclipse
2007-12-19 15:30 ` Guillaume MENANT
@ 2007-12-19 15:37 ` Daniel Jacobowitz
2007-12-19 17:01 ` Guillaume MENANT
0 siblings, 1 reply; 11+ messages in thread
From: Daniel Jacobowitz @ 2007-12-19 15:37 UTC (permalink / raw)
To: Guillaume MENANT; +Cc: gdb
On Wed, Dec 19, 2007 at 07:30:04AM -0800, Guillaume MENANT wrote:
> For now, I've implemented the qSupported command because I want the flash
> support but qC, qOffsets and ? don't seems mandatory to me. I don't know
> what is the Hc-1 command too.
I think ? is mandatory, at least, I have no idea what will happen when
you connect GDB if you don't support it. GDB tries to figure out
the state of the target when it connects.
qOffsets and qC are not needed unless you want to support the things
they describe:
`qOffsets'
Get section offsets that the target used when relocating the
downloaded image.
and
`qC'
Return the current thread id.
So if you are not relocating your target image, and you do not need
thread support, you don't need these.
There is currently no how-to chapter in the protocol documentation.
That would be a nice addition.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: GDB startup session with Eclipse
2007-12-19 15:37 ` Daniel Jacobowitz
@ 2007-12-19 17:01 ` Guillaume MENANT
2007-12-19 17:07 ` Daniel Jacobowitz
0 siblings, 1 reply; 11+ messages in thread
From: Guillaume MENANT @ 2007-12-19 17:01 UTC (permalink / raw)
To: gdb
Thanks for your answer. Eclipse sends me the ? command and then it waits and
a message "Target selection failed" pops up and "target not responding
(timeout)" in the details of the error.
Before that, Eclispe just sends a '03' character. What does Eclipse waits ?
Another question is about characters sent by eclipse like '2d' or '2b'. What
are their purpose ?
Thanks.
Daniel Jacobowitz-2 wrote:
>
> On Wed, Dec 19, 2007 at 07:30:04AM -0800, Guillaume MENANT wrote:
>> For now, I've implemented the qSupported command because I want the flash
>> support but qC, qOffsets and ? don't seems mandatory to me. I don't know
>> what is the Hc-1 command too.
>
> I think ? is mandatory, at least, I have no idea what will happen when
> you connect GDB if you don't support it. GDB tries to figure out
> the state of the target when it connects.
>
> qOffsets and qC are not needed unless you want to support the things
> they describe:
>
> `qOffsets'
> Get section offsets that the target used when relocating the
> downloaded image.
>
> and
>
> `qC'
> Return the current thread id.
>
> So if you are not relocating your target image, and you do not need
> thread support, you don't need these.
>
> There is currently no how-to chapter in the protocol documentation.
> That would be a nice addition.
>
> --
> Daniel Jacobowitz
> CodeSourcery
>
>
--
View this message in context: http://www.nabble.com/GDB-startup-session-with-Eclipse-tp14416165p14420820.html
Sent from the Sourceware - gdb list mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: GDB startup session with Eclipse
2007-12-19 17:01 ` Guillaume MENANT
@ 2007-12-19 17:07 ` Daniel Jacobowitz
2007-12-19 18:02 ` Guillaume MENANT
0 siblings, 1 reply; 11+ messages in thread
From: Daniel Jacobowitz @ 2007-12-19 17:07 UTC (permalink / raw)
To: Guillaume MENANT; +Cc: gdb
On Wed, Dec 19, 2007 at 09:01:02AM -0800, Guillaume MENANT wrote:
>
> Thanks for your answer. Eclipse sends me the ? command and then it waits and
> a message "Target selection failed" pops up and "target not responding
> (timeout)" in the details of the error.
>
> Before that, Eclispe just sends a '03' character. What does Eclipse waits ?
I don't know. To stop the target if it's running? \003 is an
interrupt. Still, it shouldn't be doing this.
Eclipse does not send anything. Eclipse is running GDB in the
background. Try reproducing problems using GDB from the command line,
and then you can turn on remote protocol debugging to follow the
conversation.
> Another question is about characters sent by eclipse like '2d' or '2b'. What
> are their purpose ?
Those are + and -. Read the Overview section, where it talks about
acknowledgements.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: GDB startup session with Eclipse
2007-12-19 17:07 ` Daniel Jacobowitz
@ 2007-12-19 18:02 ` Guillaume MENANT
2007-12-19 18:40 ` Daniel Jacobowitz
0 siblings, 1 reply; 11+ messages in thread
From: Guillaume MENANT @ 2007-12-19 18:02 UTC (permalink / raw)
To: gdb
Thanks. I've seen this part about the '+' and '-' but I haven't realized that
it was in both sides :-/ Here is the current conversation between my
software (<-) and GDB controlled by Eclipse (->) :
-> 'qSupported'
<- 'qXfer:memory-map:read+'
-> '-'
-> '-'
-> '-'
-> '+'
-> '+'
-> 'Hc-1'
<- ''
-> '+'
-> 'qC'
<- ''
-> '+'
-> 'qOffsets'
<- ''
-> '+'
-> '?'
<- ''
-> '+'
-> '3' (just after this one an error occurs in Eclipse)
I don't support '-' and '+' from GDB for now but I don't understand why it
sends me 3 '-' and then 2 '+'.
I will test directly with GDB in remote mode in order to see if I have the
same issues.
Thanks.
Daniel Jacobowitz-2 wrote:
>
> On Wed, Dec 19, 2007 at 09:01:02AM -0800, Guillaume MENANT wrote:
>>
>> Thanks for your answer. Eclipse sends me the ? command and then it waits
>> and
>> a message "Target selection failed" pops up and "target not responding
>> (timeout)" in the details of the error.
>>
>> Before that, Eclispe just sends a '03' character. What does Eclipse waits
>> ?
>
> I don't know. To stop the target if it's running? \003 is an
> interrupt. Still, it shouldn't be doing this.
>
> Eclipse does not send anything. Eclipse is running GDB in the
> background. Try reproducing problems using GDB from the command line,
> and then you can turn on remote protocol debugging to follow the
> conversation.
>
>> Another question is about characters sent by eclipse like '2d' or '2b'.
>> What
>> are their purpose ?
>
> Those are + and -. Read the Overview section, where it talks about
> acknowledgements.
>
>
> --
> Daniel Jacobowitz
> CodeSourcery
>
>
--
View this message in context: http://www.nabble.com/GDB-startup-session-with-Eclipse-tp14416165p14422110.html
Sent from the Sourceware - gdb list mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: GDB startup session with Eclipse
2007-12-19 18:02 ` Guillaume MENANT
@ 2007-12-19 18:40 ` Daniel Jacobowitz
2008-01-17 9:56 ` Guillaume MENANT
0 siblings, 1 reply; 11+ messages in thread
From: Daniel Jacobowitz @ 2007-12-19 18:40 UTC (permalink / raw)
To: Guillaume MENANT; +Cc: gdb
On Wed, Dec 19, 2007 at 10:02:12AM -0800, Guillaume MENANT wrote:
>
> Thanks. I've seen this part about the '+' and '-' but I haven't realized that
> it was in both sides :-/ Here is the current conversation between my
> software (<-) and GDB controlled by Eclipse (->) :
>
> -> 'qSupported'
> <- 'qXfer:memory-map:read+'
Make sure you have the encapsulation and checksumming right.
Try 'set debug serial 1' and 'set debug remote 1'.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: GDB startup session with Eclipse
2007-12-19 18:40 ` Daniel Jacobowitz
@ 2008-01-17 9:56 ` Guillaume MENANT
[not found] ` <14923786.post@talk.nabble.com>
0 siblings, 1 reply; 11+ messages in thread
From: Guillaume MENANT @ 2008-01-17 9:56 UTC (permalink / raw)
To: gdb
I'm still working on the GDB startup management in my stub. The log of the
sent commands is the following :
GDB -> $Hc-1#
Wrapper reply -> $+#
Call unsupported or unrecognized command method
Wrapper reply -> $#00
GDB -> $+#
GDB -> $qC#
Wrapper reply -> $+#
Call unsupported or unrecognized command method
Wrapper reply -> $#00
GDB -> $+#
GDB -> $qOffsets#
Wrapper reply -> $+#
Call unsupported or unrecognized command method
Wrapper reply -> $#00
GDB -> $+#
GDB -> $?#
Wrapper reply -> $+#
Call ? method
Sending stop reply
Wrapper reply -> $S12#B6
GDB -> $+#
GDB -> $Hg0#
Wrapper reply -> $+#
Call unsupported or unrecognized command method
Wrapper reply -> $#00
GDB -> $+#
GDB -> $p44#
Wrapper reply -> $+#
Call unsupported or unrecognized command method
Wrapper reply -> $#00
GDB -> $+#
GDB -> $g#
Wrapper reply -> $+#
Call g command method
Wrapper reply ->
$000074A3400010544000105440001054400010544000105440001054400010540001C4A9400010544000105440001054400010544000105440001054400010540003137F400010544000105440001054400010544000105440001054400010544000105440001054400010544000105440001054400010544000105440001054400010544000105440001054400010544000105440001054400010544000105440001054400010544000105440001054400010544000105440001054400010544000105440001054400010544000105440001054400010544000105440001054400010544000105440001054400010544000105440001054400010544000105400000000009000E60000000240000000400012584A71AA200000404000000000#52
GDB -> $+#
GDB -> $!#
Wrapper reply -> $+#
Call unsupported or unrecognized command method
Wrapper reply -> $#00
GDB -> $+#
GDB -> $qSymbol::#
Wrapper reply -> $+#
Call unsupported or unrecognized command method
Wrapper reply -> $#00
GDB -> $+#
GDB -> $k#
Wrapper reply -> $+#
Call unsupported or unrecognized command method
Wrapper reply -> $#00
GDB -> $k#
Wrapper reply -> $+#
Call unsupported or unrecognized command method
Wrapper reply -> $#00
GDB -> $+#
Deleting socket.
1 - What is the real purpose of the '!' command (I'm french and I don't
understand weel the explanation in the GDB documentation).
2 - Is qSymbol mandatory ? What is a symbol and what are their use ?
3 - Why GDB sends me a 'k' command ? Yet, I'm assuming there is no running
software in my AT697 to kill. I just want to connect to GDB and make my
board enter in debug mode in order to load my application in my board using
GDB. Am I right ?
4 - Why GDB closes the TCP/IP socket at the end of this exchange ?
Thanks a lot for your answers which will be very usefull to me :)
Daniel Jacobowitz-2 wrote:
>
> On Wed, Dec 19, 2007 at 10:02:12AM -0800, Guillaume MENANT wrote:
>>
>> Thanks. I've seen this part about the '+' and '-' but I haven't realized
>> that
>> it was in both sides :-/ Here is the current conversation between my
>> software (<-) and GDB controlled by Eclipse (->) :
>>
>> -> 'qSupported'
>> <- 'qXfer:memory-map:read+'
>
> Make sure you have the encapsulation and checksumming right.
>
> Try 'set debug serial 1' and 'set debug remote 1'.
>
> --
> Daniel Jacobowitz
> CodeSourcery
>
>
--
View this message in context: http://www.nabble.com/GDB-startup-session-with-Eclipse-tp14416165p14915621.html
Sent from the Sourceware - gdb list mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-01-18 7:53 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-19 12:35 GDB startup session with Eclipse Guillaume MENANT
2007-12-19 13:55 ` Daniel Jacobowitz
2007-12-19 15:30 ` Guillaume MENANT
2007-12-19 15:37 ` Daniel Jacobowitz
2007-12-19 17:01 ` Guillaume MENANT
2007-12-19 17:07 ` Daniel Jacobowitz
2007-12-19 18:02 ` Guillaume MENANT
2007-12-19 18:40 ` Daniel Jacobowitz
2008-01-17 9:56 ` Guillaume MENANT
[not found] ` <14923786.post@talk.nabble.com>
2008-01-17 18:00 ` Vladimir Prus
2008-01-18 7:53 ` Guillaume MENANT
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox