From: Luis Machado via Gdb <gdb@sourceware.org>
To: Meg Yuan <meg.yuan@sifive.com>, gdb@sourceware.org
Cc: Carsten Gosvig <carsten.gosvig@sifive.com>
Subject: Re: Using qemu (user mode) with gdb testsuites
Date: Wed, 2 Oct 2024 08:28:30 +0100 [thread overview]
Message-ID: <b48c59d8-304e-4fe1-9ec0-86da287c672c@arm.com> (raw)
In-Reply-To: <CAGw=KyQtJ4rA=yAc7eMr036yGz=9AM1VfZCUZUkUzQvM9AbsYw@mail.gmail.com>
On 10/2/24 01:01, Meg Yuan via Gdb wrote:
> Hi there,
>
> I'm wondering if it is possible to use qemu as gdbserver when running gdb
> testsuites from a riscv cross-compiler with dejagnu.
>
> Here is an example of starting qemu (user mode) with the program at
> localhost:1234:
>
> qemu-riscv64 -g 1234 <program>
>
> Then, we can start gdb with connection to qemu with this command:
>
> riscv64-unknown-linux-gnu-gdb <program> -ex "target remote localhost:1234"
>
> I am new to dejagnu. Though I tried some existing recipes, none worked out
> of the box. Has anyone done this before? If so, could you give me a recipe
> for an exp file?
>
> Thanks,
> Meg
It is possible to do it, but you'll need some additional layers of expect code (board files)
that override functions like gdbserver startup (firing up qemu-user) and other things.
I don't think we have this in upstream gdb at the moment, unfortunately.
prev parent reply other threads:[~2024-10-02 7:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-02 0:01 Meg Yuan via Gdb
2024-10-02 7:28 ` Luis Machado via Gdb [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=b48c59d8-304e-4fe1-9ec0-86da287c672c@arm.com \
--to=gdb@sourceware.org \
--cc=carsten.gosvig@sifive.com \
--cc=luis.machado@arm.com \
--cc=meg.yuan@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