Re: GDB stub question?

Inder
2006-04-24T08:29:09Z

Hi Ramana

The stub is capable of single steping but can only step one
instruction at a time, when debugging C code, the next or step should
acutally step to the next source line, but in my case for every next
or step i am only able to step one instruction.

The stub has no information about the source lines so the host is
capable of doing this, by reading the debug info.

Communication between my GDB host and the target is like

>>> when GDB is connected to the target
Host - +$Hc-1#09
Target Reply- +$OK#9a|
Host - +$qC#b4
Target Reply- +$#00|
Host - +$qOffsets#4b
Target Reply- +$#00|
Host - +$?#3f
Target Reply- +$S12#b6|
Host - +
Host - $Hg0#df
Target Reply- +$OK#9a|
Host - +$pf#d6
Target Reply- +$#00|
Host - +$g#67
Target Reply- +$020000007c03|
Target Reply- 8500a8224d0001|
Target Reply- 00000056f38400|
Target Reply- a8ee8400000000|
Target Reply- 00000000000000|
Target Reply- 00000000000000|
Target Reply- 00000078038500|
Target Reply- 7c038500140385|
Target Reply- 0030df3700a08e|
Target Reply- 00001f0000201f|
Target Reply- 000020#96|
Host - +
Host - $m8ea0,4#fb
Target Reply- +$64004be2#f7|
Host - +
Host - $qSymbol::#5b
Target Reply- +$#00|
Host - +

>> i am connected to the target
>> after the step command

Host - $vCont?#49
Target Reply- +$#00|
Host - +$Hc0#db
Target Reply- +$OK#9a|
Host - +$S12#b6
Target Reply- +|
Target Reply- $S12#b6|

this S12 packet is a single step with a signal packet which in my case only
steps one instructions.

Is there any packed which i need to support in order to support source stepping?

Thanks
Inder.

On 4/24/06, Ramana Radhakrishnan <ramana.radhakrishnan@codito.com> wrote:
> This means your stub is capable of doing single stepping by itself. S12
> would mean give signal 12 to the debuggee.
>
> >From the manual ->
>
> `S'SIG`;'ADDR -- step with signal
> Like `C' but step not continue.
>
> If you need more help show a complete log of the remote protocol for the
> steps you did and the behaviour you expected / observed.
>
>
> - Ramana
>
> On Mon, 2006-04-24 at 11:43 +0530, Inder wrote:
> > Hi All
> >
> > I have ported a GDB stub for ARM based system, but when i tried doing
> > source stepping GDB (GDB 6.4) host sends the following packet to the
> > target system:
> >
> > ---> $S12#b6
> >
> > which tell the target to actually do a single instruction step. I
> > believe in the previous versions of GDB source stepping was done by
> > setting the breakpoint to the next source line and then continue.
> >
> > Am i missing something here.
> >
> > Any help will be appriciated.
> >
> > --
> > Thanks,
> > Inder