Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Raja Saleru <iap_sraja@access.co.jp>
Cc: saleru.raja@iap-online.com, gdb@sources.redhat.com
Subject: Re: remote serial protocol - gdbserver
Date: Sat, 11 Oct 2003 15:40:00 -0000	[thread overview]
Message-ID: <3F88245B.3080504@redhat.com> (raw)
In-Reply-To: <000001c38eed$89aa2b50$88444e9d@access.co.jp>

My wild guess appears to be correct ...


> (gdb) l
> 53              T_RFLG pk_rflg;
> 54              T_RVER pk_rver;
> 55
> 56              INT     err;
> 57
> 58              mmUserPrint(" Enter Root task\n");
> 59
> 60              /* o[WQ?*/
> 61              err = tk_ref_ver( &pk_rver );
> 62              if( err != E_OK)
> (gdb) n
> Sending packet: $m8c5e83d4,2#03...Ack
> Packet received: 04d1
> Sending packet: $M8c5e83d4,2:20c3#15...Ack
> Packet received: OK
> Sending packet: $s#73...Ack
> Packet received: T0510:1e845e8c;0e:1466658c;0f:da835e8c;
> Sending packet: $s#73...Ack
> Packet received: T0510:20845e8c;0e:1466658c;0f:da835e8c;
> Sending packet: $s#73...Ack
> Packet received: T0510:22845e8c;0e:1466658c;0f:da835e8c;
> Sending packet: $s#73...Ack
> Packet received: T0510:2874008c;0e:1466658c;0f:26845e8c;

I'm guessing that 2874008c is the PC in little-endian byte order.  It's 
just stepped the target into mmUserPrint.

> Sending packet: $Hg2#e1...Ack
> Packet received: OK
> Sending packet: $g#67...Ack
> Packet received:
> 000000002874008ca866658c00000000b0935e8ca866658c000000000000000000000000
> 00000000000000000000000000000000000000001466658c26845e8c2874008c00000000
> 0000008c0000000000000000000000000000006008000000000000000000000004000000
> 000000002e000000040000000000000000000000487d0000180000001600000004000000
> 040000000c00000039000000080000000300000000000000c81200000000000000000000
> 0000000004000000000000003e000000010000000000000000000000c812000030000000
> 000000000000000001000000000000004c000000

It's pulled the target's registers looking for the "link-register" which 
should contain the return address.

> Sending packet: $m0,2#fb...Ack
> ------------------------------------- <1>
> Packet received: b0935e8c
> Sending packet: $M0,2:20c3#0d...Ack

and then sets a breakpoint at that return-address.  For some reason GDB 
think's that's zero (bad packet? bad gdb?).

BTW: "b0935e8c" is a bogus return value for "$m0,2,#fb", only two bytes 
were requested but four were returned, which is wrong (at present).

Andrew


> ------------------------------------- <2>
> Packet received: OK
> Sending packet: $c#63...Ack
> Packet received: T0510:2874008c;0e:1466658c;0f:26845e8c;
> 
> Program received signal SIGTRAP, Trace/breakpoint trap.




      reply	other threads:[~2003-10-11 15:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-09 13:13 target_op(..) -> target_op(target, ...) obvious Andrew Cagney
2003-10-09 13:55 ` Andrew Cagney
2003-10-09 19:39 ` Jim Blandy
2003-10-09 20:36   ` Andrew Cagney
2003-10-10  2:06     ` remote serial protocol - gdbserver saleru.raja
2003-10-10  2:28       ` Andrew Cagney
2003-10-10  5:15         ` Raja Saleru
2003-10-11 15:40           ` Andrew Cagney [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F88245B.3080504@redhat.com \
    --to=ac131313@redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=iap_sraja@access.co.jp \
    --cc=saleru.raja@iap-online.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox