From: <duane@duaneellis.com>
To: "Tim Newsome" <tim@sifive.com>, "Yao Qi" <qiyaoltc@gmail.com>
Cc: "gdb" <gdb@sourceware.org>
Subject: RE: can target code change architecture setting?
Date: Mon, 10 Oct 2016 16:48:00 -0000 [thread overview]
Message-ID: <20161010094844.5c1bb9f86d671edec44bb378f25c04cc.aef8a9655c.wbe@email03.godaddy.com> (raw)
Yao> > You need to add two target descriptions for 32-bit and 64-bit
variants
> respectively, and OpenOCD need to send back the right target
> description to GDB.
Tim>> That sounds like a good solution. I'll see if I can make it
happen.
For an application level, I think this is 100% correct.
However in the bare metal case, I have a question about RISCV (and
arm-arch64)
In Arm-ARCH64 - you can have both 32bit application, and 64bit kernel.
I'm not sure about the x86_64 case - because I am not familiar with bare
metal debug there.
As a result, when a "jtag-halt" (aka: Bare metal halt) the CPU may halt
in either mode.
Described another way:
You are stepping through 32bit user space code.
Set a breakpoint.
Click RUN
Option 1:
The 64bit kernel crashes, and the jtag debugger reports HALT
but the registers are 100% wrong.
Option 2:
A hardware read/write breakpoint is configured
And that hardware break point is triggered.
maybe you are debugging memory corruption issues, these things
happen
Option 3:
The program is taking a long time, the human hits "control-C"
GDB sends a stop/halt packet
And the CPU stops/halts in 64bit mode
Question #1 Is this dual mode possible in RISCV?
Question #2 - How should the remote debugger respond to GDB?
I don't think there is an "architecture change" packet.
Thanks.
next reply other threads:[~2016-10-10 16:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-10 16:48 duane [this message]
2016-10-10 19:46 ` Tim Newsome
2016-10-11 11:48 ` Yao Qi
2016-10-11 14:30 ` Duane Ellis
2016-11-03 19:47 ` Doug Evans
-- strict thread matches above, loose matches on Subject: below --
2016-10-07 17:38 Tim Newsome
2016-10-10 9:26 ` Yao Qi
2016-10-10 15:39 ` Tim Newsome
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=20161010094844.5c1bb9f86d671edec44bb378f25c04cc.aef8a9655c.wbe@email03.godaddy.com \
--to=duane@duaneellis.com \
--cc=gdb@sourceware.org \
--cc=qiyaoltc@gmail.com \
--cc=tim@sifive.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