From: Christopher Bainbridge <cb0128@my.bristol.ac.uk>
To: gdb@sourceware.org
Subject: [help] Issues with 'g' packet and MIPS - gdb interprets the packet reply wrong
Date: Tue, 21 Oct 2014 11:15:00 -0000 [thread overview]
Message-ID: <54464055.9020100@my.bristol.ac.uk> (raw)
Hi all,
I am trying to implement a remote stub for a MIPS cpu (using GDB version
7.8). When GDB asks for the general registers using the 'g' packet, I
reply with:
00000000000000000d01000000000000fffdffff00000000000000000080c0bf30000000f0fec0bf000000002e0000000000000000000000000000008080808000000000000000000000000000000000000000000000000000000000000000000000000000000000000001800000000000000000e8fec0bf00000000702ec0bf0000000000000000000000000000000000000000702ec0bf
As each register is 32 bits (represented by 8 hex characters), this
should be all the registers up to and including the PC.
However, GDB prints this out:
info reg
zero at v0 v1 a0 a1 a2 a3
R0 00000000 0000010d fffffdff 00000000 00000030 00000000 00000000
00000000
t0 t1 t2 t3 t4 t5 t6 t7
R8 00000000 00000000 00000000 00000000 00000000 80010000 00000000
00000000
s0 s1 s2 s3 s4 s5 s6 s7
Sending packet: $p13#d4...Ack
Packet received: 00000000
Sending packet: $p14#d5...Ack
Packet received: 00000000
Sending packet: $p15#d6...Ack
Packet received: 00000000
Sending packet: $p16#d7...Ack
Packet received: 00000000
Sending packet: $p17#d8...Ack
Packet received: 00000000
R16 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000
t8 t9 k0 k1 gp sp s8 ra
Sending packet: $p18#d9...Ack
Packet received: 00000000
Sending packet: $p19#da...Ack
Packet received: 00000000
Sending packet: $p1a#02...Ack
Packet received: 00000180
Sending packet: $p1b#03...Ack
etc
This looks to be that it is determining the size of each register
incorrectly, and is thus asking for more registers using the 'p' packet.
Is this a bug on my end or in GDB?
I use the command
set processor mips:14000
beforehand, as this is the processor we're using.
Thanks,
Chris
next reply other threads:[~2014-10-21 11:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-21 11:15 Christopher Bainbridge [this message]
2014-10-21 20:34 ` Maciej W. Rozycki
2014-10-22 10:31 ` Christopher Bainbridge
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=54464055.9020100@my.bristol.ac.uk \
--to=cb0128@my.bristol.ac.uk \
--cc=gdb@sourceware.org \
/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