Yeah, I don't think gdb in SE mode handles page faults well, but there was
actually a change proposed very recently which should help improve that.
You can probably cherry-pick that change locally if you want to try it out.

https://gem5-review.googlesource.com/c/public/gem5/+/44685

Gabe

On Tue, Apr 20, 2021 at 11:16 PM Liyichao <liyic...@huawei.com> wrote:

> Thanks Gabe.
>
> I think run gdb inside gem5 is of course a better method but slow speed.
>
> In se mode,I also have tried it,
> but my program in se mode has a page fault  panic before segment fault.I 
> think se mode cannot process page fault.
>
>
>
>
> ------------------------------
>
> 李翼超 charlie
> Mobile:+86-15858232899
> Email:liyic...@huawei.com
>
>
> *发件人: *Gabe Black<gabe.bl...@gmail.com>
> *收件人: *gem5 users mailing list<gem5-users@gem5.org>
> *抄送: *Liyichao<liyic...@huawei.com>
> *主题: *Re: [gem5-users] How to debug a program in GEM5 FS mode.
> *时间: *2021-04-21 14:06:58
>
> 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