From: "Alex Bennée" <alex.bennee@linaro.org>
To: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"David Hildenbrand" <david@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
qemu-devel@nongnu.org, qemu-arm@nongnu.org,
qemu-s390x@nongnu.org
Subject: Re: [PATCH v3 3/3] tests/tcg: Add the PROT_NONE gdbstub test
Date: Mon, 22 Jan 2024 23:19:05 +0000 [thread overview]
Message-ID: <87jzo1lzx2.fsf@draig.linaro.org> (raw)
In-Reply-To: <aybsdiscvgcl5kici5lfupjtykvkyw4u5g3bdncmv3wufzwgou@r42zm6labldl> (Ilya Leoshkevich's message of "Mon, 22 Jan 2024 22:31:08 +0100")
Ilya Leoshkevich <iii@linux.ibm.com> writes:
> On Mon, Jan 22, 2024 at 03:54:32PM +0000, Alex Bennée wrote:
>> Ilya Leoshkevich <iii@linux.ibm.com> writes:
>>
>> > Make sure that qemu gdbstub, like gdbserver, allows reading from and
>> > writing to PROT_NONE pages.
>> >
>> > Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
>> > ---
>> > tests/tcg/multiarch/Makefile.target | 9 +++++-
>> > tests/tcg/multiarch/gdbstub/prot-none.py | 22 +++++++++++++
>> > tests/tcg/multiarch/prot-none.c | 40 ++++++++++++++++++++++++
>> > 3 files changed, 70 insertions(+), 1 deletion(-)
>> > create mode 100644 tests/tcg/multiarch/gdbstub/prot-none.py
>> > create mode 100644 tests/tcg/multiarch/prot-none.c
>
> [...]
>
>> > +def run_test():
>> > + """Run through the tests one by one"""
>> > + gdb.Breakpoint("break_here")
>> > + gdb.execute("continue")
>> > + val = gdb.parse_and_eval("*(char[2] *)q").string()
>>
>> Better traceback:
>>
>> Breakpoint 1, break_here (q=0x400000802fff) at /home/alex/lsrc/qemu.git/tests/tcg/multiarch/prot-none.c:14
>> 14 }
>> GDB Exception:
>> Traceback (most recent call last):
>> File "/home/alex/lsrc/qemu.git/tests/guest-debug/test_gdbstub.py", line 42, in main
>> test()
>> File "./tests/tcg/multiarch/gdbstub/prot-none.py", line 14, in run_test
>> val = gdb.parse_and_eval("*(char[2] *)q").string()
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> gdb.MemoryError: Cannot access memory at address 0x400000802fff
>> Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linux
>> Type "help", "copyright", "credits" or "license" for more information.
>> (InteractiveConsole)
>> >>>
>
> Thanks for the debug output. This shows that the feature being tested
> doesn't work (the value of `q` looks sane to me). May I ask what host
> distro is this? I tried on x86_64 Fedora 38 and x86_64 Ubuntu 22.04 so
> far, and the test was successful.
Debian Bookworm (x86_64) with gdb-multiarch installed.
>
> [...]
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2024-01-22 23:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-16 0:31 [PATCH v3 0/3] linux-user: Allow gdbstub to ignore page protection Ilya Leoshkevich
2024-01-16 0:31 ` [PATCH v3 1/3] " Ilya Leoshkevich
2024-01-16 0:31 ` [PATCH v3 2/3] tests/tcg: Factor out gdbstub test functions Ilya Leoshkevich
2024-01-22 16:00 ` Alex Bennée
2024-01-22 21:08 ` Ilya Leoshkevich
2024-01-16 0:31 ` [PATCH v3 3/3] tests/tcg: Add the PROT_NONE gdbstub test Ilya Leoshkevich
2024-01-22 15:43 ` Alex Bennée
2024-01-22 15:54 ` Alex Bennée
2024-01-22 21:31 ` Ilya Leoshkevich
2024-01-22 23:19 ` Alex Bennée [this message]
2024-01-25 2:39 ` Ilya Leoshkevich
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=87jzo1lzx2.fsf@draig.linaro.org \
--to=alex.bennee@linaro.org \
--cc=david@redhat.com \
--cc=iii@linux.ibm.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.