* Using qemu (user mode) with gdb testsuites
@ 2024-10-02 0:01 Meg Yuan via Gdb
2024-10-02 7:28 ` Luis Machado via Gdb
0 siblings, 1 reply; 2+ messages in thread
From: Meg Yuan via Gdb @ 2024-10-02 0:01 UTC (permalink / raw)
To: gdb; +Cc: Carsten Gosvig
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Using qemu (user mode) with gdb testsuites
2024-10-02 0:01 Using qemu (user mode) with gdb testsuites Meg Yuan via Gdb
@ 2024-10-02 7:28 ` Luis Machado via Gdb
0 siblings, 0 replies; 2+ messages in thread
From: Luis Machado via Gdb @ 2024-10-02 7:28 UTC (permalink / raw)
To: Meg Yuan, gdb; +Cc: Carsten Gosvig
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-02 7:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-02 0:01 Using qemu (user mode) with gdb testsuites Meg Yuan via Gdb
2024-10-02 7:28 ` Luis Machado via Gdb
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox