Hello, Liyichao. While gdb debugging in gem5 is a great tool, it's a bit
limited as far as the sort of debugging you're talking about. It can see
the CPU state when you're in user space programs, but it doesn't understand
that different user space programs are different things, or know how to
look up their symbols, etc. It's intended primarily for debugging the
kernel, since that's frankly a more tractable problem. It would be possible
to extend that support to give it more insight into what's going on inside
the kernel so it can do more in that regard, and while I'd like to do that
at some point, that's not anything that will happen soon.

If you want to debug a user space program inside gem5, I think your best
bet is to debug it in SE mode where the only thing running is your program.
SE mode is more approximate than FS mode and can't run every program, but
if it can run yours that's probably what you'll want to do.

Another option would be to run gdb *inside* gem5, as part of the
simulation. I don't know if anybody has tried that, but then gdb should
work like it would on a real ARM host, more or less.

Gabe

On Tue, Apr 20, 2021 at 7:27 PM Liyichao via gem5-users <gem5-users@gem5.org>
wrote:

> Hi All:
>
>          I am currently debugging a program with an SVE instruction in the
> FS mode of GEM5. However, a segment error occurs in the program. Therefore,
> I want to locate which instruction is causing the error and check the
> contents of the register of the error instruction. What are the debugging
> methods of GEM5 for applications in FS mode? Because programs with SVE
> instructions cannot be debugged directly on the ARM server, I want to debug
> in FS mode of GEM5.
>
>
>
> Does the Remote GDB support the preceding operations? Are there detailed
> instructions for REMOTE GDB? The Remote GDB guidance on the GEM5 website is
> a little brief.
>
>
>
> TKS.
> _______________________________________________
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to