From: Bernd Edlinger <bernd.edlinger@hotmail.de>
To: Andrew Burgess <aburgess@redhat.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] sim: riscv: Fix PC at gdb breakpoints
Date: Mon, 15 Apr 2024 10:21:59 +0200 [thread overview]
Message-ID: <AS8P193MB12856B402ACB860BA1459816E4092@AS8P193MB1285.EURP193.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <87h6g66hkv.fsf@redhat.com>
On 4/12/24 11:44, Andrew Burgess wrote:
> Bernd Edlinger <bernd.edlinger@hotmail.de> writes:
>
>> The uncompressed EBREAK instruction does not work
>> correctly this way, and the comment saying that
>> GDB expects us to step over EBREAK is just wrong.
>> The PC was always 4 bytes too high, which skips one
>> instruction at break and step over commands, and
>> causes complete chaos. The compressed EBREAK was
>> already implemented correctly.
>>
>> Tested by using gdb's "target sim" and single-stepping.
>
> Thanks for fixing this.
>
> For the record, in v1.12 of the RISC-V privileged architecture
> specification, section 3.3.1: Environment Call and Breakpoint documents
> that the $pc value should be the address of the EBREAK instruction, not
> the address of the following instruction.
>
> Approved-By: Andrew Burgess <aburgess@redhat.com>
>
> Thanks,
> Andrew
>
Pushed.
Thanks
Bernd.
prev parent reply other threads:[~2024-04-15 8:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 7:31 Bernd Edlinger
2024-04-12 9:44 ` Andrew Burgess
2024-04-15 8:21 ` Bernd Edlinger [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=AS8P193MB12856B402ACB860BA1459816E4092@AS8P193MB1285.EURP193.PROD.OUTLOOK.COM \
--to=bernd.edlinger@hotmail.de \
--cc=aburgess@redhat.com \
--cc=gdb-patches@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).