[RESOLVED] [BOCHS] GDB stops on all page fault

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Haoud
Member
Member
Posts: 31
Joined: Wed Aug 10, 2016 3:07 am
Libera.chat IRC: Haoud

[RESOLVED] [BOCHS] GDB stops on all page fault

Post by Haoud »

Hello, my problem is very simple but I can't solve it. When I debug my kernel with gdb and bochs (compiled on my pc), gdb stops on all page faults, which is very annoying because my kernel uses demand paging. How to disable this feature?
If you want more information, do not hesitate to ask me
Last edited by Haoud on Fri Jun 28, 2019 2:24 am, edited 1 time in total.
User avatar
iansjack
Member
Member
Posts: 4604
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: [BOCHS] GDB stops on all page fault

Post by iansjack »

Are you sure it's not triple faulting? Unless you set a breakpoint, gdb won't halt on an exception. But I believe that Bochs can be configured to halt on a triple fault.
Haoud
Member
Member
Posts: 31
Joined: Wed Aug 10, 2016 3:07 am
Libera.chat IRC: Haoud

Re: [BOCHS] GDB stops on all page fault

Post by Haoud »

No, I'm sure my kernel doesn't triple fault because the execution continues normally. Maybe it's a bochs problem?
In the terminal, i can read "stopped with ac0"

EDIT: Okay, I found a solution to my problem. I modified the bochs source code. In cpu.cc, i removed this lines:

Code: Select all

#if BX_GDBSTUB
    if (bx_dbg.gdbstub_enabled) return;
#endif
And now all of them work as I wish, even if I don't know all the consequences of this change.
Post Reply